mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
New build scripts
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5282 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
43
source/web/scripts/ajax/dojo/src/widget/LinkPane.js
Normal file
43
source/web/scripts/ajax/dojo/src/widget/LinkPane.js
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
Copyright (c) 2004-2006, The Dojo Foundation
|
||||
All Rights Reserved.
|
||||
|
||||
Licensed under the Academic Free License version 2.1 or above OR the
|
||||
modified BSD license. For more information on Dojo licensing, see:
|
||||
|
||||
http://dojotoolkit.org/community/licensing.shtml
|
||||
*/
|
||||
|
||||
dojo.provide("dojo.widget.LinkPane");
|
||||
|
||||
dojo.require("dojo.widget.*");
|
||||
dojo.require("dojo.widget.ContentPane");
|
||||
dojo.require("dojo.html.style");
|
||||
|
||||
dojo.widget.defineWidget(
|
||||
"dojo.widget.LinkPane",
|
||||
dojo.widget.ContentPane,
|
||||
{
|
||||
// summary
|
||||
// LinkPane is just a ContentPane that loads data remotely (via the href attribute),
|
||||
// and has markup similar to an anchor. The anchor's body (the words between <a> and </a>)
|
||||
// become the label of the widget (used for TabContainer, AccordionContainer, etc.)
|
||||
// usage
|
||||
// <a href="foo.html">my label</a>
|
||||
|
||||
// I'm using a template because the user may specify the input as
|
||||
// <a href="foo.html">label</a>, in which case we need to get rid of the
|
||||
// <a> because we don't want a link.
|
||||
templateString: '<div class="dojoLinkPane"></div>',
|
||||
|
||||
fillInTemplate: function(args, frag){
|
||||
var source = this.getFragNodeRef(frag);
|
||||
|
||||
// If user has specified node contents, they become the label
|
||||
// (the link must be plain text)
|
||||
this.label += source.innerHTML;
|
||||
|
||||
var source = this.getFragNodeRef(frag);
|
||||
dojo.html.copyStyle(this.domNode, source);
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user