N°931 AttributeTagSet widget js wrapper : fix remaining console.debug call, and fix indentations

This commit is contained in:
Pierre Goiffon
2018-10-08 17:56:34 +02:00
parent 950ffcde2b
commit 860bb6d615

View File

@@ -166,13 +166,15 @@ $.widget('itop.set_widget',
_bindEvents: function($widgetElement) { _bindEvents: function($widgetElement) {
var setWidget = this; var setWidget = this;
$widgetElement.bind("update", function() { $widgetElement.bind("update", function() {
console.debug("update event in Selectize !", this); if (setWidget.options.isDebug) {
console.debug("update event in Selectize !", this);
}
var $this = $(this); var $this = $(this);
if ($this.prop("disabled")) { if ($this.prop("disabled")) {
setWidget.disable(); setWidget.disable();
} else { } else {
setWidget.enable(); setWidget.enable();
} }
}); });
}, },
@@ -212,20 +214,20 @@ $.widget('itop.set_widget',
}, },
/** /**
* <p>Updating selection widget : * <p>Updating selection widget :
* <ul> * <ul>
* <li>handles bulk edit disabling on widget opening * <li>handles bulk edit disabling on widget opening
* <li>adding specific CSS class to parent node * <li>adding specific CSS class to parent node
* <li>adding specific CSS classes to item node * <li>adding specific CSS classes to item node
* <li>items to have a specific rendering for partial codes. * <li>items to have a specific rendering for partial codes.
* </ul> * </ul>
*
* <p>For partial codes at first I was thinking about using the Selectize <code>render</code> callback, but it is called before <code>onItemAdd</code>/<code>onItemRemove</code> :(<br>
* Indeed as we only need to have partial items on first display, this callback is the right place O:)
* *
* @param inputWidget Selectize object * <p>For partial codes at first I was thinking about using the Selectize <code>render</code> callback, but it is called before <code>onItemAdd</code>/<code>onItemRemove</code> :(<br>
* @private * Indeed as we only need to have partial items on first display, this callback is the right place O:)
*/ *
* @param inputWidget Selectize object
* @private
*/
_onInitialize: function (inputWidget) { _onInitialize: function (inputWidget) {
var setWidget = this; var setWidget = this;
if (this.options.isDebug) { if (this.options.isDebug) {