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:
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
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.TreeDisableWrapExtension" );
|
||||
|
||||
dojo.require( "dojo.widget.HtmlWidget" );
|
||||
dojo.require( "dojo.widget.TreeExtension" );
|
||||
|
||||
// selector extension to emphasize node
|
||||
dojo.widget.defineWidget(
|
||||
"dojo.widget.TreeDisableWrapExtension",
|
||||
dojo.widget.TreeExtension,
|
||||
{
|
||||
/**
|
||||
* can't unlisten
|
||||
*/
|
||||
templateCssPath: dojo.uri.dojoUri( "src/widget/templates/TreeDisableWrap.css" ),
|
||||
|
||||
listenTree: function(tree) {
|
||||
|
||||
var wrappingDiv = document.createElement( "div" );
|
||||
var clazz = tree.classPrefix+"DisableWrap";
|
||||
if (dojo.render.html.ie) {
|
||||
clazz = clazz+' '+ tree.classPrefix+"IEDisableWrap";
|
||||
}
|
||||
dojo.html.setClass(wrappingDiv, clazz);
|
||||
|
||||
var table = document.createElement( "table" );
|
||||
wrappingDiv.appendChild( table );
|
||||
|
||||
var tbody = document.createElement( "tbody" );
|
||||
table.appendChild( tbody );
|
||||
|
||||
var tr = document.createElement( "tr" );
|
||||
tbody.appendChild( tr );
|
||||
|
||||
var td = document.createElement( "td" );
|
||||
tr.appendChild( td );
|
||||
|
||||
if( tree.domNode.parentNode ) {
|
||||
tree.domNode.parentNode.replaceChild( wrappingDiv, tree.domNode );
|
||||
}
|
||||
|
||||
td.appendChild( tree.domNode );
|
||||
tree.domNode = wrappingDiv;
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user