TT#10054 Csc implement callblocking privacy module

As agreed in 27.01 meeting, create callblocking privacy module. Also
add missing strings to locales, fix css green bg on conversations
"new xxx" icons, and add xtype variable to show/hide all callblocking
modules.

Change-Id: If25be661097c755368fe99495a531e1438e29fbd
changes/40/11540/1
Robert Axelsen 8 years ago
parent c98315c487
commit 0fe39dd29c

@ -534,6 +534,69 @@ Ext.define('Ngcp.csc.locales', {
de: 'Please enter a number.',
fr: 'Please enter a number.',
sp: 'Please enter a number.'
},
hide_own: {
en: 'Hide own number on outgoing calls',
it: 'Hide own number on outgoing calls',
de: 'Hide own number on outgoing calls',
fr: 'Hide own number on outgoing calls',
sp: 'Hide own number on outgoing calls'
},
mode: {
en: 'Mode',
it: 'Mode',
de: 'Mode',
fr: 'Mode',
sp: 'Mode'
},
hide_mode_on: {
en: 'Hide mode succcessfully turned on.',
it: 'Hide mode succcessfully turned on.',
de: 'Hide mode succcessfully turned on.',
fr: 'Hide mode succcessfully turned on.',
sp: 'Hide mode succcessfully turned on.'
},
hide_mode_off: {
en: 'Hide mode succcessfully turned off.',
it: 'Hide mode succcessfully turned off.',
de: 'Hide mode succcessfully turned off.',
fr: 'Hide mode succcessfully turned off.',
sp: 'Hide mode succcessfully turned off.'
},
allow: {
en: 'Allow',
it: 'Allow',
de: 'Allow',
fr: 'Allow',
sp: 'Allow'
},
block: {
en: 'Block',
it: 'Block',
de: 'Block',
fr: 'Block',
sp: 'Block'
},
on: {
en: 'On',
it: 'On',
de: 'On',
fr: 'On',
sp: 'On'
},
off: {
en: 'Off',
it: 'Off',
de: 'Off',
fr: 'Off',
sp: 'Off'
},
add_number: {
en: 'Add number',
it: 'Add number',
de: 'Add number',
fr: 'Add number',
sp: 'Add number'
}
},
password: {

@ -52,7 +52,7 @@ Ext.define('NgcpCsc.store.NavigationTree', {
}, {
text: 'Privacy',
iconCls: 'x-fa fa-user-secret',
viewType: 'pageblank',
viewType: 'privacy',
routeId: 'callblocking/privacy',
acl: ['administrator'],
leaf: true

@ -59,6 +59,8 @@
}
}
.conversations-btn-over {
background: white;
.conversations-btn-over,
.x-btn-focus.x-btn-conversations-actions-btn-medium {
background: white !important;
box-shadow: none !important;
}

@ -21,40 +21,69 @@ Ext.define('NgcpCsc.view.pages.callblocking.CallBlocking', {
width: Ext.os.is.Desktop ? 810 : '100%',
items: [{
userCls: 'callblocking-header',
html: 'Mode',
margin: '0 0 10 0'
html: Ngcp.csc.locales.callblocking.mode[localStorage.getItem('languageSelected')],
margin: '0 0 10 0',
hidden: !this._displayIncomingOutgoingSection
}, {
items: [{
xtype: 'segmentedbutton',
allowMultiple: false,
hidden: !this._displayIncomingOutgoingSection,
bind: {
value: '{block_mode}'
},
defaults: {
handler: 'clickModeButton'
handler: 'clickAllowModeButton'
},
items: [{
text: 'Allow',
text: Ngcp.csc.locales.callblocking.allow[localStorage.getItem('languageSelected')],
value: 'allow'
}, {
text: 'Block',
text: Ngcp.csc.locales.callblocking.block[localStorage.getItem('languageSelected')],
value: 'block'
}]
}]
}, {
userCls: 'callblocking-header',
html: 'Add number',
margin: '20 0 10 0'
html: Ngcp.csc.locales.callblocking.hide_own[localStorage.getItem('languageSelected')],
margin: '0 0 10 0',
hidden: !this._displayPrivacySection
}, {
items: [{
xtype: 'segmentedbutton',
allowMultiple: false,
hidden: !this._displayPrivacySection,
bind: {
value: '{hide_mode}'
},
defaults: {
handler: 'clickHideModeButton'
},
items: [{
text: Ngcp.csc.locales.callblocking.on[localStorage.getItem('languageSelected')],
value: 'on'
}, {
text: Ngcp.csc.locales.callblocking.off[localStorage.getItem('languageSelected')],
value: 'off'
}]
}]
}, {
userCls: 'callblocking-header',
html: Ngcp.csc.locales.callblocking.add_number[localStorage.getItem('languageSelected')],
margin: '20 0 10 0',
hidden: !this._displayIncomingOutgoingSection
}, {
xtype: 'textfield',
width: 300,
bind: '{new_number}',
listeners: {
specialkey: 'onEnterPressed'
}
},
hidden: !this._displayIncomingOutgoingSection
}, {
xtype: 'container',
html: instructionText
html: instructionText,
hidden: !this._displayIncomingOutgoingSection
}]
}]
}];

@ -99,16 +99,23 @@ Ext.define('NgcpCsc.view.pages.callblocking.CallBlockingController', {
vm.set('new_number', '');
},
clickModeButton: function () {
clickAllowModeButton: function () {
var vm = this.getViewModel();
var blockAllowMode = vm.get('block_mode');
if (blockAllowMode === 'allow') {
this.fireEvent('showmessage', true, Ngcp.csc.locales.callblocking.allow_mode_success[localStorage.getItem('languageSelected')]);
} else if (blockAllowMode === 'block') {
this.fireEvent('showmessage', true, Ngcp.csc.locales.callblocking.block_mode_success[localStorage.getItem('languageSelected')]);
} else {
this.fireEvent('showmessage'
, false, Ngcp.csc.locales.common.save_unsuccess[localStorage.getItem('languageSelected')]);
};
},
clickHideModeButton: function () {
var vm = this.getViewModel();
var hideMode = vm.get('hide_mode');
if (hideMode === 'on') {
this.fireEvent('showmessage', true, Ngcp.csc.locales.callblocking.hide_mode_on[localStorage.getItem('languageSelected')]);
} else if (hideMode === 'off') {
this.fireEvent('showmessage', true, Ngcp.csc.locales.callblocking.hide_mode_off[localStorage.getItem('languageSelected')]);
};
},

@ -6,6 +6,7 @@ Ext.define('NgcpCsc.view.pages.callblocking.CallBlockingModel', {
data: {
block_mode: 'allow',
clir: true, // TODO: Privacy value
new_number: ''
new_number: '',
hide_mode: 'off'
}
});

@ -3,10 +3,11 @@ Ext.define('NgcpCsc.view.pages.callblocking.incoming.Incoming', {
xtype: 'incoming',
_displayIncomingOutgoingSection: true,
initComponent: function () {
var incomingGrid = Ext.create('NgcpCsc.view.pages.callblocking.CallBlockingGrid', {
store: 'CallBlockingIncoming',
reference: 'IncomingGrid'
store: 'CallBlockingIncoming'
});
this.items = [incomingGrid];
this.callParent();

@ -3,10 +3,11 @@ Ext.define('NgcpCsc.view.pages.callblocking.outgoing.Outgoing', {
xtype: 'outgoing',
_displayIncomingOutgoingSection: true,
initComponent: function () {
var outgoingGrid = Ext.create('NgcpCsc.view.pages.callblocking.CallBlockingGrid', {
store: 'CallBlockingOutgoing',
reference: 'OutgoingGrid'
store: 'CallBlockingOutgoing'
});
this.items = [outgoingGrid];
this.callParent();

@ -0,0 +1,8 @@
Ext.define('NgcpCsc.view.pages.callblocking.privacy.Privacy', {
extend: 'NgcpCsc.view.pages.callblocking.CallBlocking',
xtype: 'privacy',
_displayPrivacySection: true
});
Loading…
Cancel
Save