Browse Source

UI-3053: Added Smart PBX SIP Device feature key drag and drop reordering (#55)

* UI-3053 Added Smart PBX SIP Device feature key drag and drop reordering

* Removed extra function around feature key sortable code
4.3
Anthony Perish 8 years ago
committed by Joris Tirado
parent
commit
836210239e
3 changed files with 21 additions and 3 deletions
  1. +9
    -3
      submodules/devices/devices.css
  2. +11
    -0
      submodules/devices/devices.js
  3. +1
    -0
      views/devices-sip_device.html

+ 9
- 3
submodules/devices/devices.css View File

@ -62,8 +62,8 @@
color: #22a5ff;
}
#devices_container .devices-header .search-box {
margin: 16px 0 16px 15px;
#devices_container .devices-header .search-box {
margin: 16px 0 16px 15px;
}
#devices_container .devices-grid {
@ -386,6 +386,12 @@
margin-right: 10px;
}
.voip-edit-device-popup .keys .fa {
display: inline-block;
padding-right: 15px;
cursor: move;
}
/* Codecs selector */
.voip-edit-device-popup .edit-device .content .codec-selector .box-selector {
float: left;
@ -429,4 +435,4 @@
/* Special checkbox case */
.voip-edit-device-popup .edit-device .form-horizontal .control-label.checkbox-basic {
margin-left: 160px;
}
}

+ 11
- 0
submodules/devices/devices.js View File

@ -337,6 +337,17 @@ define(function(require) {
});
});
templateDevice.find('.keys').sortable({
items: '.control-group',
update: function() {
templateDevice
.find('.feature-key-index')
.each(function(idx, el) {
$(el).text(idx + 1);
});
}
});
templateDevice
.find('.feature-key-index')
.each(function(idx, el) {


+ 1
- 0
views/devices-sip_device.html View File

@ -306,6 +306,7 @@
{{/compare}}
{{/compare}}
<label for="provision.keys.{{../id}}[{{@key}}].type" class="control-label">
<i class="fa fa-reorder monster-gray"></i>
{{ ../label }} <span class="feature-key-index">{{@key}}</span>
</label>
<div class="controls">


Loading…
Cancel
Save