Browse Source

Added an option to hide tab name

Fixes #666
v0.5.8
Ramiro Saenz 8 years ago
parent
commit
af6df9a89d
  1. 4
      app/model/Service.js
  2. 4
      app/ux/WebView.js
  3. 20
      app/view/add/Add.js
  4. 4
      app/view/add/AddController.js

4
app/model/Service.js

@ -37,6 +37,10 @@ Ext.define('Rambox.model.Service', {
name: 'muted'
,type: 'boolean'
,defaultValue: false
},{
name: 'tabname'
,type: 'boolean'
,defaultValue: true
},{
name: 'statusbar'
,type: 'boolean'

4
app/ux/WebView.js

@ -38,7 +38,7 @@ Ext.define('Rambox.ux.WebView',{
Ext.apply(me, {
items: me.webViewConstructor()
,title: me.record.get('name')
,title: me.record.get('tabname') ? me.record.get('name') : ''
,icon: me.record.get('type') === 'custom' ? (me.record.get('logo') === '' ? 'resources/icons/custom.png' : me.record.get('logo')) : 'resources/icons/'+me.record.get('logo')
,src: me.record.get('url')
,type: me.record.get('type')
@ -173,7 +173,7 @@ Ext.define('Rambox.ux.WebView',{
}
}];
if ( Ext.getStore('ServicesList').getById(me.record.get('type')).get('allow_popups') ) cfg.autoEl.allowpopups = 'on';
if ( Ext.getStore('ServicesList').getById(me.record.get('type')).get('allow_popups') ) cfg[0].autoEl.allowpopups = 'on';
}
return cfg;

20
app/view/add/Add.js

@ -156,17 +156,25 @@ Ext.define('Rambox.view.add.Add',{
}
,{
xtype: 'checkbox'
,boxLabel: 'Show notifications'
,name: 'notifications'
,checked: me.edit ? me.record.get('notifications') : true
,boxLabel: 'Mute all sounds'
,name: 'muted'
,checked: me.edit ? me.record.get('muted') : false
,uncheckedValue: false
,inputValue: true
}
,{
xtype: 'checkbox'
,boxLabel: 'Mute all sounds'
,name: 'muted'
,checked: me.edit ? me.record.get('muted') : false
,boxLabel: 'Show service name in Tab'
,name: 'tabname'
,checked: me.edit ? me.record.get('tabname') : true
,uncheckedValue: false
,inputValue: true
}
,{
xtype: 'checkbox'
,boxLabel: 'Show notifications'
,name: 'notifications'
,checked: me.edit ? me.record.get('notifications') : true
,uncheckedValue: false
,inputValue: true
}

4
app/view/add/AddController.js

@ -35,6 +35,7 @@ Ext.define('Rambox.view.add.AddController', {
,notifications: formValues.notifications
,muted: formValues.muted
,statusbar: formValues.statusbar
,tabname: formValues.tabname
,displayTabUnreadCounter: formValues.displayTabUnreadCounter
,includeInGlobalUnreadCounter: formValues.includeInGlobalUnreadCounter
,trust: formValues.trust
@ -44,7 +45,7 @@ Ext.define('Rambox.view.add.AddController', {
var view = Ext.getCmp('tab_'+win.record.get('id'));
// Change the title of the Tab
view.setTitle(formValues.serviceName);
view.setTitle( formValues.tabname ? formValues.serviceName : '' );
// Change sound of the Tab
view.setAudioMuted(formValues.muted);
// Change statusbar of the Tab
@ -88,6 +89,7 @@ Ext.define('Rambox.view.add.AddController', {
,align: formValues.align
,notifications: formValues.notifications
,muted: formValues.muted
,tabname: formValues.tabname
,statusbar: formValues.statusbar
,displayTabUnreadCounter: formValues.displayTabUnreadCounter
,includeInGlobalUnreadCounter: formValues.includeInGlobalUnreadCounter

Loading…
Cancel
Save