Browse Source

UI-3048: Replace chosen plugin method with monster helper (#54)

4.3
Joris Tirado 8 years ago
committed by GitHub
parent
commit
f7cba46b22
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 17 deletions
  1. +3
    -1
      submodules/devices/devices.js
  2. +1
    -1
      submodules/groups/groups.js
  3. +12
    -8
      submodules/strategy/strategy.js
  4. +3
    -3
      submodules/users/users.js
  5. +1
    -4
      submodules/vmboxes/vmboxes.js

+ 3
- 1
submodules/devices/devices.js View File

@ -414,7 +414,9 @@ define(function(require) {
monster.ui.tooltips(templateDevice);
monster.ui.mask(templateDevice.find('#mac_address'), 'macAddress');
monster.ui.mask(templateDevice.find('[name="call_forward.number"]'), 'phoneNumber');
templateDevice.find('.chosen-feature-key-user').chosen({ search_contains: true, width: 'inherit' });
monster.ui.chosen(templateDevice.find('.chosen-feature-key-user'), {
width: 'inherit'
});
if (!(data.media.encryption.enforce_security)) {
templateDevice.find('#rtp_method').hide();


+ 1
- 1
submodules/groups/groups.js View File

@ -785,7 +785,7 @@ define(function(require) {
switchFeature = featureTemplate.find('.switch-state'),
popup;
featureTemplate.find('.next-action-select').chosen({ search_contains: true, width: '220px' });
monster.ui.chosen(featureTemplate.find('.next-action-select'));
featureTemplate.find('.cancel-link').on('click', function() {
popup.dialog('close').remove();


+ 12
- 8
submodules/strategy/strategy.js View File

@ -782,17 +782,19 @@ define(function(require) {
$.each(template.find('.user-select select'), function() {
var $this = $(this);
$this.chosen({ search_contains: true, width: '160px' });
monster.ui.chosen($this, {
width: '160px'
});
$this.siblings('.title').text($this.find('option:selected').closest('optgroup').prop('label'));
});
template
.find('.voicemail-select select')
.chosen({ search_contains: true, width: '160px' });
monster.ui.chosen(template.find('.voicemail-select select'), {
width: '160px'
});
template
.find('.advancedCallflows-select select')
.chosen({ search_contains: true, width: '160px' });
monster.ui.chosen(template.find('.advancedCallflows-select select'), {
width: '160px'
});
callback && callback();
@ -2458,7 +2460,9 @@ define(function(require) {
chooseExisting = container.find('#strategy_menu_popup_choose_existing'),
mediaToUpload;
container.find('.target-select').chosen({ search_contains: true, width: '150px' });
monster.ui.chosen(container.find('.target-select'), {
width: '150px'
});
container.find('.upload-input').fileUpload({
inputOnly: true,


+ 3
- 3
submodules/users/users.js View File

@ -610,7 +610,7 @@ define(function(require) {
if (type === 'name') {
currentUser = data;
template.find('#user_timezone').chosen({ search_contains: true, width: '220px' });
monster.ui.chosen(template.find('#user_timezone'));
data.extra.differentEmail ? template.find('.email-group').show() : template.find('.email-group').hide();
} else if (type === 'numbers') {
@ -686,7 +686,7 @@ define(function(require) {
monster.ui.mask(userTemplate.find('#extension'), 'extension');
userTemplate.find('#licensed_role').chosen({search_contains: true, width: '220px'});
monster.ui.chosen(userTemplate.find('#licensed_role'));
monster.ui.validate(userTemplate.find('#form_user_creation'), {
rules: {
@ -3189,7 +3189,7 @@ define(function(require) {
var formattedData = self.usersFormatLicensedRolesData(user),
template = $(monster.template(self, 'users-licensed-roles', formattedData));
template.find('#licensed_role').chosen({search_contains: true, width: '220px'});
monster.ui.chosen(template.find('#licensed_role'));
callback && callback(template, user);
});


+ 1
- 4
submodules/vmboxes/vmboxes.js View File

@ -180,10 +180,7 @@ define(function(require) {
monster.ui.tabs(templateVMBox);
timezone.populateDropdown(templateVMBox.find('#timezone'), data.timezone || 'inherit', {inherit: self.i18n.active().defaultTimezone});
templateVMBox.find('#timezone').chosen({
search_contains: true,
width: '220px'
});
monster.ui.chosen(templateVMBox.find('#timezone'));
monster.ui.tooltips(templateVMBox);


Loading…
Cancel
Save