mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 01:58:47 +02:00
N°931 TagSet widget : disable/enable methods for mass edit (need to be plugged, but where ?!??)
This commit is contained in:
@@ -78,6 +78,8 @@ $.widget('itop.tagset_widget',
|
||||
/** will hold all interactions done : code as key and one of STATUS_* constant as value */
|
||||
tagSetCodesStatus: null,
|
||||
|
||||
selectizeWidget: null,
|
||||
|
||||
// the constructor
|
||||
_create: function () {
|
||||
var $this = this.element;
|
||||
@@ -137,6 +139,8 @@ $.widget('itop.tagset_widget',
|
||||
tagSetWidget._onTagRemove(value, selectizeWidget);
|
||||
}
|
||||
});
|
||||
|
||||
this.selectizeWidget = $inputWidget[0].selectize; // keeping this for widget public methods
|
||||
},
|
||||
|
||||
refresh: function () {
|
||||
@@ -166,6 +170,14 @@ $.widget('itop.tagset_widget',
|
||||
this.element.val(JSON.stringify(widgetPublicData, null, (this.options.isDebug ? 2 : null)));
|
||||
},
|
||||
|
||||
disable: function () {
|
||||
this.selectizeWidget.disable();
|
||||
},
|
||||
|
||||
enable: function () {
|
||||
this.selectizeWidget.enable();
|
||||
},
|
||||
|
||||
/**
|
||||
* Updating items to have a specific rendering for partial codes.<br>
|
||||
* At first I was thinking about using the Selectize render callback, but it is called before onItemAdd/onItemRemove :(<br>
|
||||
|
||||
Reference in New Issue
Block a user