diff --git a/i18n/en-US.json b/i18n/en-US.json index e3b30d7..8112e70 100644 --- a/i18n/en-US.json +++ b/i18n/en-US.json @@ -33,7 +33,10 @@ "name": "Name this group", "selectedUsers": "Selected Users", "title": "Creating a group", - "missingDataAlert": "You must choose a name and an extension for this group" + "missingDataAlert": "You must choose a name and an extension for this group", + "__comment": "UI-2666: Added VMBox module", + "__version": "4.1", + "findExtension": "Find one" }, "groupDeleted": "You successfully deleted {{name}}'s Group", "name": "Group Name", diff --git a/submodules/groups/groups.css b/submodules/groups/groups.css index 7ea7057..d3d4a58 100644 --- a/submodules/groups/groups.css +++ b/submodules/groups/groups.css @@ -294,6 +294,7 @@ #creation_group_dialog .one-line-form input[type="text"] { margin-right: 20px; margin-left: 5px; + margin-bottom: 0; } #creation_group_dialog .one-line-form label { line-height: 30px; diff --git a/submodules/groups/groups.js b/submodules/groups/groups.js index 5e9647e..ab8a520 100644 --- a/submodules/groups/groups.js +++ b/submodules/groups/groups.js @@ -251,13 +251,13 @@ define(function(require){ $row.data('search').toLowerCase().indexOf(searchString) < 0 ? $row.hide() : $row.show(); }); - if(rows.size() > 0) { + if (rows.size() > 0) { rows.is(':visible') ? emptySearch.hide() : emptySearch.show(); } }); template.on('click', '.cancel-link', function() { - template.find('.edit-groups').slideUp("400", function() { + template.find('.edit-groups').slideUp('400', function() { $(this).empty(); template.find('.grid-cell.active').css({ 'position': 'inline-block', @@ -283,22 +283,29 @@ define(function(require){ monster.ui.mask(groupForm.find('#inputExtension'), 'extension'); groupTemplate.find('#create_group').on('click', function() { - if(monster.ui.valid(groupForm)) { + if (monster.ui.valid(groupForm)) { var formattedData = self.groupsCreationMergeData(data, groupTemplate); - if(!_.isEmpty(formattedData.group.endpoints)) { + if (!_.isEmpty(formattedData.group.endpoints)) { self.groupsCreate(formattedData, function(data) { popup.dialog('close').remove(); self.groupsRender({ groupId: data.id }); }); - } - else { + } else { monster.ui.alert('warning', self.i18n.active().groups.emptyEndpointsWarning); } } }); + groupTemplate.find('.search-extension').on('click', function() { + monster.pub('common.extensionTools.select', { + callback: function(number) { + groupTemplate.find('#inputExtension').val(number); + } + }); + }); + groupTemplate.find('#group_user_selector .selected-users, #group_user_selector .available-users').sortable({ connectWith: '.connectedSortable' }).disableSelection(); @@ -310,7 +317,7 @@ define(function(require){ }); $('body').on('click', '#groups_container_overlay', function() { - template.find('.edit-groups').slideUp("400", function() { + template.find('.edit-groups').slideUp('400', function() { $(this).empty(); }); diff --git a/views/groups-creation.html b/views/groups-creation.html index e596743..0507e49 100644 --- a/views/groups-creation.html +++ b/views/groups-creation.html @@ -5,7 +5,10 @@
- +