]>
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 var _TemplatedMixin = dijit._TemplatedMixin;
9 var ContentPane = dijit.layout.ContentPane;
13 // dijit/layout/LinkPane
15 // A ContentPane with an href where (when declared in markup)
16 // the title is specified as innerHTML rather than as a title attribute.
19 return declare("dijit.layout.LinkPane", [ContentPane
, _TemplatedMixin
], {
21 // A ContentPane with an href where (when declared in markup)
22 // the title is specified as innerHTML rather than as a title attribute.
24 // LinkPane is just a ContentPane that is declared in markup similarly
25 // to an anchor. The anchor's body (the words between `<a>` and `</a>`)
26 // become the title of the widget (used for TabContainer, AccordionContainer, etc.)
28 // | <a href="foo.html">my title</a>
30 // I'm using a template because the user may specify the input as
31 // <a href="foo.html">title</a>, in which case we need to get rid of the
32 // <a> because we don't want a link.
33 templateString
: '<div class="dijitLinkPane" data-dojo-attach-point="containerNode"></div>',
35 postMixInProperties: function(){
36 // If user has specified node contents, they become the title
37 // (the link must be plain text)
39 this.title
+= this.srcNodeRef
.innerHTML
;
41 this.inherited(arguments
);
44 _fillContent: function(){
45 // Overrides _Templated._fillContent().
47 // _Templated._fillContent() relocates srcNodeRef innerHTML to templated container node,
48 // but in our case the srcNodeRef innerHTML is the title, so shouldn't be