You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
874 B
JavaScript
40 lines
874 B
JavaScript
define([
|
|
"dijit/_CssStateMixin",
|
|
"dijit/_TemplatedMixin",
|
|
"dijit/_WidgetBase",
|
|
"dojo/_base/declare",
|
|
"dojo/dom-class",
|
|
"dojo/text!./templates/LinkButton.html",
|
|
], function (
|
|
_CssStateMixin,
|
|
_TemplatedMixin,
|
|
_WidgetBase,
|
|
declare,
|
|
domClass,
|
|
template
|
|
) {
|
|
"use strict";
|
|
|
|
return declare(
|
|
"Sandcastle.LinkButton",
|
|
[_WidgetBase, _TemplatedMixin, _CssStateMixin],
|
|
{
|
|
baseClass: "dijitButton",
|
|
templateString: template,
|
|
showLabel: true,
|
|
|
|
_setShowLabelAttr: function (val) {
|
|
if (this.containerNode) {
|
|
domClass.toggle(this.containerNode, "dijitDisplayNone", !val);
|
|
}
|
|
this._set("showLabel", val);
|
|
},
|
|
|
|
_setLabelAttr: function (/*String*/ content) {
|
|
this._set("label", content);
|
|
(this.containerNode || this.focusNode).innerHTML = content;
|
|
},
|
|
}
|
|
);
|
|
});
|