Browse Source

Moved Custom Service button inside list of services

pull/92/merge
Ramiro Saenz 9 years ago
parent
commit
be168c0afb
  1. 6
      app/store/ServicesList.js
  2. 5
      app/view/main/Main.js
  3. 3
      app/view/main/MainController.js
  4. BIN
      resources/icons/custom.png

6
app/store/ServicesList.js

@ -285,6 +285,12 @@ Ext.define('Rambox.store.ServicesList', {
,name: 'TweetDeck'
,url: 'https://tweetdeck.twitter.com/'
,type: 'messaging'
},
{
id: 'custom'
,logo: 'custom.png'
,name: '_Custom Service'
,type: 'custom'
}
]
});

5
app/view/main/Main.js

@ -101,11 +101,6 @@ Ext.define('Rambox.view.main.Main', {
,specialkey: 'onSearchEnter'
}
}
,{
type: 'plus'
,tooltip: 'Add a custom service'
,handler: 'addCustomService'
}
]
,items: [
{

3
app/view/main/MainController.js

@ -590,7 +590,7 @@ Ext.define('Rambox.view.main.MainController', {
Ext.getStore('ServicesList').getFilters().replaceAll({
fn: function(record) {
return Ext.Array.contains(Ext.Object.getKeys(cg.getValue()), record.get('type'));
return Ext.Array.contains(Ext.Object.getKeys(cg.getValue()), record.get('type')) || record.get('type') === 'custom';
}
});
}
@ -604,6 +604,7 @@ Ext.define('Rambox.view.main.MainController', {
Ext.getStore('ServicesList').getFilters().replaceAll({
fn: function(record) {
if ( record.get('type') === 'custom' ) return true;
if ( !Ext.Array.contains(Ext.Object.getKeys(cg.getValue()), record.get('type')) ) return false;
return record.get('name').toLowerCase().indexOf(newValue.toLowerCase()) > -1 ? true : false;
}

BIN
resources/icons/custom.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Loading…
Cancel
Save