1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-06-24 11:56:36 +02:00
ttrss/lib/dijit/form/_ButtonMixin.js
Anders Kaseorg 6887a0f573 lib: Upgrade Dojo and Dijit from 1.8.3 to 1.12.1
The itemNode and expandoNode elements have changed from img to
span (https://bugs.dojotoolkit.org/ticket/16699), so we now put our
tree icons inside them rather than replacing them.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2017-01-21 13:22:14 -05:00

2 lines
1.2 KiB
JavaScript

//>>built
define("dijit/form/_ButtonMixin",["dojo/_base/declare","dojo/dom","dojo/has","../registry"],function(_1,_2,_3,_4){var _5=_1("dijit.form._ButtonMixin"+(_3("dojo-bidi")?"_NoBidi":""),null,{label:"",type:"button",__onClick:function(e){e.stopPropagation();e.preventDefault();if(!this.disabled){this.valueNode.click(e);}return false;},_onClick:function(e){if(this.disabled){e.stopPropagation();e.preventDefault();return false;}if(this.onClick(e)===false){e.preventDefault();}var _6=e.defaultPrevented;if(!_6&&this.type=="submit"&&!(this.valueNode||this.focusNode).form){for(var _7=this.domNode;_7.parentNode;_7=_7.parentNode){var _8=_4.byNode(_7);if(_8&&typeof _8._onSubmit=="function"){_8._onSubmit(e);e.preventDefault();_6=true;break;}}}return !_6;},postCreate:function(){this.inherited(arguments);_2.setSelectable(this.focusNode,false);},onClick:function(){return true;},_setLabelAttr:function(_9){this._set("label",_9);var _a=this.containerNode||this.focusNode;_a.innerHTML=_9;this.onLabelSet();},onLabelSet:function(){}});if(_3("dojo-bidi")){_5=_1("dijit.form._ButtonMixin",_5,{onLabelSet:function(){this.inherited(arguments);var _b=this.containerNode||this.focusNode;this.applyTextDir(_b);}});}return _5;});