Browse Source

Notes for Services

Displays a note if the service have one, inside the Add Window.
pull/92/merge
Ramiro Saenz 9 years ago
parent
commit
991459ece9
  1. 4
      app/model/ServiceList.js
  2. 7
      app/store/ServicesList.js
  3. 11
      app/view/main/MainController.js

4
app/model/ServiceList.js

@ -20,5 +20,9 @@ Ext.define('Rambox.model.ServiceList', {
name: 'js_unread' name: 'js_unread'
,type: 'string' ,type: 'string'
,defaultValue: '' ,defaultValue: ''
},{
name: 'note'
,type: 'string'
,defaultValue: ''
}] }]
}); });

7
app/store/ServicesList.js

@ -49,6 +49,7 @@ Ext.define('Rambox.store.ServicesList', {
,name: 'Messenger' ,name: 'Messenger'
,url: 'https://www.messenger.com/login/' ,url: 'https://www.messenger.com/login/'
,type: 'messaging' ,type: 'messaging'
,note: 'To enable desktop notifications, you have to go to Options inside Messenger.'
}, },
{ {
id: 'skype' id: 'skype'
@ -56,6 +57,7 @@ Ext.define('Rambox.store.ServicesList', {
,name: 'Skype' ,name: 'Skype'
,url: 'https://web.skype.com/' ,url: 'https://web.skype.com/'
,type: 'messaging' ,type: 'messaging'
,note: 'Text and Audio calls support only. Video for now is not working.'
}, },
{ {
id: 'hangouts' id: 'hangouts'
@ -107,6 +109,7 @@ Ext.define('Rambox.store.ServicesList', {
,name: 'ChatWork' ,name: 'ChatWork'
,url: 'https://www.chatwork.com/login.php' ,url: 'https://www.chatwork.com/login.php'
,type: 'messaging' ,type: 'messaging'
,note: 'To enable desktop notifications, you have to go to Options inside ChatWork.'
}, },
{ {
id: 'groupme' id: 'groupme'
@ -114,6 +117,7 @@ Ext.define('Rambox.store.ServicesList', {
,name: 'GroupMe' ,name: 'GroupMe'
,url: 'https://web.groupme.com/signin' ,url: 'https://web.groupme.com/signin'
,type: 'messaging' ,type: 'messaging'
,note: 'To enable desktop notifications, you have to go to Options inside GroupMe.'
}, },
{ {
id: 'grape' id: 'grape'
@ -267,9 +271,10 @@ Ext.define('Rambox.store.ServicesList', {
id: 'mysms' id: 'mysms'
,logo: 'mysms.png' ,logo: 'mysms.png'
,name: 'mysms' ,name: 'mysms'
,url: 'https://app.mysms.com/' ,url: 'https://app.mysms.com/#login'
,type: 'messaging' ,type: 'messaging'
,js_unread: 'function checkUnread(){var e=document.getElementsByClassName("unread"),t=0;for(i=0;i<e.length;i++)t+=parseInt(e[i].firstChild.innerHTML.trim());updateBadge(t)}function updateBadge(e){e>=1?document.title="("+e+") "+originalTitle:document.title=originalTitle}var originalTitle=document.title;setInterval(checkUnread,3000);' ,js_unread: 'function checkUnread(){var e=document.getElementsByClassName("unread"),t=0;for(i=0;i<e.length;i++)t+=parseInt(e[i].firstChild.innerHTML.trim());updateBadge(t)}function updateBadge(e){e>=1?document.title="("+e+") "+originalTitle:document.title=originalTitle}var originalTitle=document.title;setInterval(checkUnread,3000);'
,note: 'You have to use this service by signing in with your mobile number.'
}, },
{ {
id: 'icq' id: 'icq'

11
app/view/main/MainController.js

@ -74,6 +74,17 @@ Ext.define('Rambox.view.main.MainController', {
} }
] ]
} }
,{
xtype: 'container'
,hidden: record.get('note') === ''
,data: { note: record.get('note') }
,margin: '10 0 0 0'
,style: 'background-color:#93CFE0;color:#053767;'
,tpl: [
'<i class="fa fa-info-circle" aria-hidden="true" style="font-size:40px;margin:20px;"></i>'
,'<span style="font-size: 15px;position: absolute;top: 25px;padding-right: 10px;">{note}</span>'
]
}
] ]
} }
] ]

Loading…
Cancel
Save