[open-ils-commits] r12462 - trunk/Open-ILS/web/js/dojo/openils (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Mar 6 22:25:22 EST 2009
Author: miker
Date: 2009-03-06 22:25:20 -0500 (Fri, 06 Mar 2009)
New Revision: 12462
Added:
trunk/Open-ILS/web/js/dojo/openils/DojoPatch.js
Log:
holding pen for dojo functions that we need to backport from dojo trunk
Added: trunk/Open-ILS/web/js/dojo/openils/DojoPatch.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/DojoPatch.js (rev 0)
+++ trunk/Open-ILS/web/js/dojo/openils/DojoPatch.js 2009-03-07 03:25:20 UTC (rev 12462)
@@ -0,0 +1,28 @@
+if(!dojo._hasResource["openils.DojoPatch"]) {
+
+ dojo.provide("openils.DojoPatch");
+ //dojo.declare('openils.dojoPatch', null);
+
+
+ if(dojo.version.major == 1 && dojo.version.minor < 3) {
+ // a copy of dojo.create, from svn trunk's dojo/_base/html.js
+ // lots of useful doc comments snipped for brevity
+ dojo.create = function(tag, attrs, refNode, pos) {
+ var doc = d.doc;
+ if(refNode){
+ refNode = d.byId(refNode);
+ doc = refNode.ownerDocument;
+ }
+ if(d.isString(tag)){
+ tag = doc.createElement(tag);
+ }
+ if(attrs){ d.attr(tag, attrs); }
+ if(refNode){ d.place(tag, refNode, pos); }
+ return tag; // DomNode
+ }
+ };
+}
+
+
+
+
\ No newline at end of file
More information about the open-ils-commits
mailing list