]>
git.wh0rd.org - tt-rss.git/blob - lib/dijit/layout/LinkPane.js.uncompressed.js
1 define("dijit/layout/LinkPane", [
4 "dojo/_base/declare" // declare
5 ], function(ContentPane
, _TemplatedMixin
, declare
){
8 // dijit/layout/LinkPane
11 return declare("dijit.layout.LinkPane", [ContentPane
, _TemplatedMixin
], {
13 // A ContentPane with an href where (when declared in markup)
14 // the title is specified as innerHTML rather than as a title attribute.
16 // LinkPane is just a ContentPane that is declared in markup similarly
17 // to an anchor. The anchor's body (the words between `<a>` and `</a>`)
18 // become the title of the widget (used for TabContainer, AccordionContainer, etc.)
20 // | <a href="foo.html">my title</a>
22 // I'm using a template because the user may specify the input as
23 // <a href="foo.html">title</a>, in which case we need to get rid of the
24 // <a> because we don't want a link.
25 templateString
: '<div class="dijitLinkPane" data-dojo-attach-point="containerNode"></div>',
27 postMixInProperties: function(){
28 // If user has specified node contents, they become the title
29 // (the link must be plain text)
31 this.title
+= this.srcNodeRef
.innerHTML
;
33 this.inherited(arguments
);
36 _fillContent: function(){
37 // Overrides _Templated._fillContent().
39 // _Templated._fillContent() relocates srcNodeRef innerHTML to templated container node,
40 // but in our case the srcNodeRef innerHTML is the title, so shouldn't be