| 1 |
define([ |
| 2 |
"dojo/_base/declare", |
| 3 |
"dijit/_Widget", |
| 4 |
"dijit/_TemplatedMixin", |
| 5 |
"dijit/_WidgetsInTemplateMixin", |
| 6 |
"dojo/text!../../templates/ClearFilterConfirmPane.html" |
| 7 |
], function(declare, _Widget, _TemplatedMixin, _WidgetsInTemplateMixin, template){ |
| 8 |
|
| 9 |
return declare("dojox.grid.enhanced.plugins.filter.ClearFilterConfirm", |
| 10 |
[_Widget, _TemplatedMixin, _WidgetsInTemplateMixin], { |
| 11 |
|
| 12 |
|
| 13 |
templateString: template, |
| 14 |
|
| 15 |
widgetsInTemplate: true, |
| 16 |
|
| 17 |
plugin: null, |
| 18 |
|
| 19 |
postMixInProperties: function(){ |
| 20 |
var nls = this.plugin.nls; |
| 21 |
this._clearBtnLabel = nls["clearButton"]; |
| 22 |
this._cancelBtnLabel = nls["cancelButton"]; |
| 23 |
this._clearFilterMsg = nls["clearFilterMsg"]; |
| 24 |
}, |
| 25 |
|
| 26 |
postCreate: function(){ |
| 27 |
this.inherited(arguments); |
| 28 |
this.cancelBtn.domNode.setAttribute("aria-label", this.plugin.nls["waiCancelButton"]); |
| 29 |
this.clearBtn.domNode.setAttribute("aria-label", this.plugin.nls["waiClearButton"]); |
| 30 |
}, |
| 31 |
|
| 32 |
uninitialize: function(){ |
| 33 |
this.plugin = null; |
| 34 |
}, |
| 35 |
|
| 36 |
_onCancel: function(){ |
| 37 |
this.plugin.clearFilterDialog.hide(); |
| 38 |
}, |
| 39 |
|
| 40 |
_onClear: function(){ |
| 41 |
this.plugin.clearFilterDialog.hide(); |
| 42 |
this.plugin.filterDefDialog.clearFilter(this.plugin.filterDefDialog._clearWithoutRefresh); |
| 43 |
} |
| 44 |
}); |
| 45 |
}); |