Changeset 12184
- Timestamp:
- 01/28/08 15:46:34 (12 months ago)
- Location:
- dijit/trunk
- Files:
-
- 21 modified
-
ColorPalette.js (modified) (1 diff)
-
Dialog.js (modified) (1 diff)
-
form/ComboBox.js (modified) (3 diffs)
-
form/Textarea.js (modified) (4 diffs)
-
form/ValidationTextBox.js (modified) (1 diff)
-
InlineEditBox.js (modified) (1 diff)
-
layout/BorderContainer.js (modified) (1 diff)
-
layout/SplitContainer.js (modified) (4 diffs)
-
layout/StackContainer.js (modified) (1 diff)
-
layout/_LayoutWidget.js (modified) (1 diff)
-
Menu.js (modified) (3 diffs)
-
Tree.js (modified) (2 diffs)
-
_base/place.js (modified) (1 diff)
-
_base/popup.js (modified) (2 diffs)
-
_base/wai.js (modified) (1 diff)
-
_base/window.js (modified) (1 diff)
-
_Calendar.js (modified) (1 diff)
-
_editor/range.js (modified) (1 diff)
-
_editor/RichText.js (modified) (5 diffs)
-
_editor/selection.js (modified) (3 diffs)
-
_TimePicker.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dijit/trunk/ColorPalette.js
r11519 r12184 113 113 for(var row=0; row < choices.length; row++){ 114 114 for(var col=0; col < choices[row].length; col++) { 115 var highlightNode = do cument.createElement("img");115 var highlightNode = dojo.doc.createElement("img"); 116 116 highlightNode.src = url; 117 117 dojo.addClass(highlightNode, "dijitPaletteImg"); -
dijit/trunk/Dialog.js
r12179 r12184 310 310 311 311 this._modalconnects.push(dojo.connect(window, "onscroll", this, "layout")); 312 this._modalconnects.push(dojo.connect(do cument.documentElement, "onkeypress", this, "_onKey"));312 this._modalconnects.push(dojo.connect(dojo.doc.documentElement, "onkeypress", this, "_onKey")); 313 313 314 314 dojo.style(this.domNode, "opacity", 0); -
dijit/trunk/form/ComboBox.js
r12149 r12184 102 102 }else if(dojo.isIE){ 103 103 // in the case of a mouse click in a popup being handled, 104 // then the do cument.selection is not the textarea, but the popup105 // var r = do cument.selection.createRange();104 // then the dojo.doc.selection is not the textarea, but the popup 105 // var r = dojo.doc.selection.createRange(); 106 106 // hack to get IE 6 to play nice. What a POS browser. 107 var tr = do cument.selection.createRange().duplicate();107 var tr = dojo.doc.selection.createRange().duplicate(); 108 108 var ntr = element.createTextRange(); 109 109 tr.move("character",0); … … 154 154 var tcc = tchar.charCodeAt(0); 155 155 for(var x = 0; x < dist; x++){ 156 var te = do cument.createEvent("KeyEvents");156 var te = dojo.doc.createEvent("KeyEvents"); 157 157 te.initKeyEvent("keypress", true, true, null, false, false, false, false, tcc, tcc); 158 158 element.dispatchEvent(te); … … 733 733 734 734 var labelObject = labelFunc(item); 735 var menuitem = do cument.createElement("div");735 var menuitem = dojo.doc.createElement("div"); 736 736 if(labelObject.html){ 737 737 menuitem.innerHTML = labelObject.label; 738 738 }else{ 739 739 menuitem.appendChild( 740 do cument.createTextNode(labelObject.label)740 dojo.doc.createTextNode(labelObject.label) 741 741 ); 742 742 } -
dijit/trunk/form/Textarea.js
r11994 r12184 65 65 if(isFirst){ isFirst = false; } 66 66 else{ 67 editNode.appendChild(do cument.createElement("BR")); // preserve line breaks67 editNode.appendChild(dojo.doc.createElement("BR")); // preserve line breaks 68 68 } 69 69 if(line){ 70 editNode.appendChild(do cument.createTextNode(line)); // use text nodes so that imbedded tags can be edited70 editNode.appendChild(dojo.doc.createTextNode(line)); // use text nodes so that imbedded tags can be edited 71 71 } 72 72 }); 73 73 }else if(value){ 74 editNode.appendChild(do cument.createTextNode(value));74 editNode.appendChild(dojo.doc.createTextNode(value)); 75 75 } 76 76 if(!dojo.isIE){ 77 editNode.appendChild(do cument.createElement("BR")); // so that you see a cursor77 editNode.appendChild(dojo.doc.createElement("BR")); // so that you see a cursor 78 78 } 79 79 }else{ … … 93 93 this.value = this.formValueNode.value = value; 94 94 if(this.iframe){ 95 var sizeNode = do cument.createElement('div');95 var sizeNode = dojo.doc.createElement('div'); 96 96 editNode.appendChild(sizeNode); 97 97 var newHeight = sizeNode.offsetTop; … … 149 149 this._iframeEditTitle = label[0].innerHTML + " " + this._iframeEditTitle; 150 150 } 151 var body = this.focusNode = this.editNode = do cument.createElement('BODY');151 var body = this.focusNode = this.editNode = dojo.doc.createElement('BODY'); 152 152 body.style.margin="0px"; 153 153 body.style.padding="0px"; … … 236 236 // it will not hear anything. 237 237 // Create an equivalent event so everyone else knows what is going on. 238 var te = do cument.createEvent("KeyEvents");238 var te = dojo.doc.createEvent("KeyEvents"); 239 239 te.initKeyEvent("keypress", true, true, null, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.keyCode, e.charCode); 240 240 this.iframe.dispatchEvent(te); -
dijit/trunk/form/ValidationTextBox.js
r12072 r12184 192 192 postCreate: function(){ 193 193 var textbox = this.textbox; 194 var valueNode = (this.valueNode = do cument.createElement("input"));194 var valueNode = (this.valueNode = dojo.doc.createElement("input")); 195 195 valueNode.setAttribute("type", textbox.type); 196 196 valueNode.setAttribute("value", this.toString()); -
dijit/trunk/InlineEditBox.js
r12030 r12184 138 138 // Put place holder (and eventually editWidget) before the display node so that it's positioned correctly 139 139 // when Calendar dropdown appears, which happens automatically on focus. 140 var placeholder = do cument.createElement("span");140 var placeholder = dojo.doc.createElement("span"); 141 141 dojo.place(placeholder, this.domNode, "before"); 142 142 -
dijit/trunk/layout/BorderContainer.js
r12175 r12184 244 244 if(this._right){ borderBox(this._right, {h: sidebarHeight}); } 245 245 246 if(dojo.isIE && (do cument.compatMode == "BackCompat" || dojo.isIE < 7)){246 if(dojo.isIE && (dojo.doc.compatMode == "BackCompat" || dojo.isIE < 7)){ 247 247 //TODO: use dojo.marginBox instead of dojo.style? 248 248 /* -
dijit/trunk/layout/SplitContainer.js
r11924 r12184 60 60 }catch(e){ this.sizerWidth = 7; } 61 61 } 62 var sizer = this.virtualSizer = do cument.createElement('div');62 var sizer = this.virtualSizer = dojo.doc.createElement('div'); 63 63 sizer.style.position = 'relative'; 64 64 … … 110 110 111 111 // TODO: use a template for this!!! 112 var sizer = this.sizers[i] = do cument.createElement('div');112 var sizer = this.sizers[i] = dojo.doc.createElement('div'); 113 113 this.domNode.appendChild(sizer); 114 114 … … 116 116 117 117 // add the thumb div 118 var thumb = do cument.createElement('div');118 var thumb = dojo.doc.createElement('div'); 119 119 thumb.className = 'thumb'; 120 120 sizer.appendChild(thumb); … … 386 386 // 387 387 this._ownconnects = []; 388 this._ownconnects.push(dojo.connect(do cument.documentElement, "onmousemove", this, "changeSizing"));389 this._ownconnects.push(dojo.connect(do cument.documentElement, "onmouseup", this, "endSizing"));388 this._ownconnects.push(dojo.connect(dojo.doc.documentElement, "onmousemove", this, "changeSizing")); 389 this._ownconnects.push(dojo.connect(dojo.doc.documentElement, "onmouseup", this, "endSizing")); 390 390 391 391 dojo.stopEvent(e); -
dijit/trunk/layout/StackContainer.js
r11982 r12184 276 276 277 277 // add a node that will be promoted to the button widget 278 var refNode = do cument.createElement("span");278 var refNode = dojo.doc.createElement("span"); 279 279 this.domNode.appendChild(refNode); 280 280 // create an instance of the button widget -
dijit/trunk/layout/_LayoutWidget.js
r12157 r12184 20 20 // summary: 21 21 // Called after all the widgets have been instantiated and their 22 // dom nodes have been inserted somewhere under do cument.body.22 // dom nodes have been inserted somewhere under dojo.doc.body. 23 23 // 24 24 // Widgets should override this method to do any initialization -
dijit/trunk/Menu.js
r12029 r12184 151 151 // Moz. TODO: is this available when defaultView isn't? 152 152 dijit.Menu._iframeContentDocument(iframe_el)['__parent__'] || 153 (iframe_el.name && do cument.frames[iframe_el.name]) || null;153 (iframe_el.name && dojo.doc.frames[iframe_el.name]) || null; 154 154 return win; // Window 155 155 }, … … 160 160 var doc = iframe_el.contentDocument // W3 161 161 || (iframe_el.contentWindow && iframe_el.contentWindow.document) // IE 162 || (iframe_el.name && do cument.frames[iframe_el.name] && document.frames[iframe_el.name].document)162 || (iframe_el.name && dojo.doc.frames[iframe_el.name] && dojo.doc.frames[iframe_el.name].document) 163 163 || null; 164 164 return doc; // HTMLDocument … … 427 427 428 428 // we didn't copy the dropdown widget from the this.srcNodeRef, so it's in no-man's 429 // land now. move it to do cument.body.429 // land now. move it to dojo.doc.body. 430 430 if(!this.popup){ 431 431 var node = dojo.query("[widgetId]", this.dropDownContainer)[0]; -
dijit/trunk/Tree.js
r12118 r12184 140 140 setLabelNode: function(label){ 141 141 this.labelNode.innerHTML=""; 142 this.labelNode.appendChild(do cument.createTextNode(label));142 this.labelNode.appendChild(dojo.doc.createTextNode(label)); 143 143 }, 144 144 … … 341 341 // make template for container node (we will clone this and insert it into 342 342 // any nodes that have children) 343 var div = do cument.createElement('div');343 var div = dojo.doc.createElement('div'); 344 344 div.style.display = 'none'; 345 345 div.className = "dijitTreeContainer"; -
dijit/trunk/_base/place.js
r12145 r12184 102 102 103 103 // This won't work if the node is inside a <div style="position: relative">, 104 // so reattach it to do cument.body. (Otherwise, the positioning will be wrong104 // so reattach it to dojo.doc.body. (Otherwise, the positioning will be wrong 105 105 // and also it might get cutoff) 106 106 if(!node.parentNode || String(node.parentNode.tagName).toLowerCase() != "body"){ -
dijit/trunk/_base/popup.js
r12162 r12184 19 19 // 20 20 // description: 21 // Attaches node to do cument.body, and21 // Attaches node to dojo.doc.body, and 22 22 // positions it off screen, but not display:none, so that 23 23 // the widget doesn't appear in the page flow and/or cause a blank … … 246 246 node.appendChild(iframe); 247 247 if(dojo.isIE){ 248 iframe.style.setExpression("width", "do cument.getElementById('" + node.id + "').offsetWidth");249 iframe.style.setExpression("height", "do cument.getElementById('" + node.id + "').offsetHeight");248 iframe.style.setExpression("width", "dojo.doc.getElementById('" + node.id + "').offsetWidth"); 249 iframe.style.setExpression("height", "dojo.doc.getElementById('" + node.id + "').offsetHeight"); 250 250 } 251 251 this.iframe = iframe; -
dijit/trunk/_base/wai.js
r12048 r12184 14 14 var div; 15 15 // create div for testing if high contrast mode is on or images are turned off 16 div = do cument.createElement("div");16 div = dojo.doc.createElement("div"); 17 17 div.id = "a11yTestNode"; 18 18 div.style.cssText = 'border: 1px solid;' -
dijit/trunk/_base/window.js
r9728 r12184 20 20 } 21 21 22 //In some IE versions (at least 6.0), do cument.parentWindow does not return a22 //In some IE versions (at least 6.0), dojo.doc.parentWindow does not return a 23 23 //reference to the real window object (maybe a copy), so we must fix it as well 24 24 //We use IE specific execScript to attach the real window reference to 25 25 //document._parentWindow for later use 26 if(dojo.isIE && window !== do cument.parentWindow && !doc._parentWindow){26 if(dojo.isIE && window !== dojo.doc.parentWindow && !doc._parentWindow){ 27 27 /* 28 28 In IE 6, only the variable "window" can be used to connect events (others 29 29 may be only copies). 30 30 */ 31 doc.parentWindow.execScript("do cument._parentWindow = window;", "Javascript");31 doc.parentWindow.execScript("dojo.doc._parentWindow = window;", "Javascript"); 32 32 //to prevent memory leak, unset it after use 33 33 //another possibility is to add an onUnload handler which seems overkill to me (liucougar) -
dijit/trunk/_Calendar.js
r11897 r12184 61 61 node.removeChild(node.firstChild); 62 62 } 63 node.appendChild(do cument.createTextNode(text));63 node.appendChild(dojo.doc.createTextNode(text)); 64 64 }, 65 65 -
dijit/trunk/_editor/range.js
r11966 r12184 187 187 dijit.range.create = function(){ 188 188 if(dijit.range._w3c){ 189 return do cument.createRange();189 return dojo.doc.createRange(); 190 190 }else{//IE 191 191 return new dijit.range.W3CRange; -
dijit/trunk/_editor/RichText.js
r12169 r12184 7 7 8 8 // used to restore content when user leaves this page then comes back 9 // but do not try doing do cument.write if we are using xd loading.10 // do cument.write will only work if RichText.js is included in the dojo.js9 // but do not try doing dojo.doc.write if we are using xd loading. 10 // dojo.doc.write will only work if RichText.js is included in the dojo.js 11 11 // file. If it is included in dojo.js and you want to allow rich text saving 12 12 // for back/forward actions, then set dojo.config.allowXdRichTextSave = true. … … 206 206 } 207 207 //queryCommandValue returns empty if we hide editNode, so move it out of screen temporary 208 var div=do cument.createElement('div');208 var div=dojo.doc.createElement('div'); 209 209 div.style.position = "absolute"; 210 210 div.style.left = "-2000px"; 211 211 div.style.top = "-2000px"; 212 do cument.body.appendChild(div);212 dojo.doc.body.appendChild(div); 213 213 div.innerHTML = localhtml; 214 214 var node = div.firstChild; … … 217 217 dojo.withGlobal(this.window, "selectElement", dijit._editor.selection, [node.firstChild]); 218 218 var nativename = node.tagName.toLowerCase(); 219 this._local2NativeFormatNames[nativename] = do cument.queryCommandValue("formatblock");//this.queryCommandValue("formatblock");219 this._local2NativeFormatNames[nativename] = dojo.doc.queryCommandValue("formatblock");//this.queryCommandValue("formatblock"); 220 220 this._native2LocalFormatNames[this._local2NativeFormatNames[nativename]] = nativename; 221 221 node = node.nextSibling; 222 222 } 223 do cument.body.removeChild(div);223 dojo.doc.body.removeChild(div); 224 224 }, 225 225 … … 328 328 // Safari's selections go all out of whack if we do it inline, 329 329 // so for now IE is our only hero 330 //if (typeof do cument.body.contentEditable != "undefined") {330 //if (typeof dojo.doc.body.contentEditable != "undefined") { 331 331 if(dojo.isIE || dojo.isSafari || dojo.isOpera){ // contentEditable, easy 332 332 var ifr = this.iframe = dojo.doc.createElement('iframe'); … … 433 433 ifr.id=this.id; 434 434 // this.iframe.src = "about:blank"; 435 // do cument.body.appendChild(this.iframe);435 // dojo.doc.body.appendChild(this.iframe); 436 436 // console.debug(this.iframe.contentDocument.open()); 437 437 // dojo.body().appendChild(this.iframe); -
dijit/trunk/_editor/selection.js
r11964 r12184 8 8 dojo.mixin(dijit._editor.selection, { 9 9 getType: function(){ 10 // summary: Get the selection type (like do cument.select.type in IE).10 // summary: Get the selection type (like dojo.doc.select.type in IE). 11 11 if(dojo.doc.selection){ //IE 12 12 return dojo.doc.selection.type.toLowerCase(); … … 62 62 if(selection && selection.rangeCount){ 63 63 var frag = selection.getRangeAt(0).cloneContents(); 64 var div = do cument.createElement("div");64 var div = dojo.doc.createElement("div"); 65 65 div.appendChild(frag); 66 66 return div.innerHTML; … … 167 167 selection.collapse(beginning); 168 168 } 169 }else if(do cument.selection){ // IE169 }else if(dojo.doc.selection){ // IE 170 170 var range = dojo.doc.selection.createRange(); 171 171 range.collapse(beginning); -
dijit/trunk/_TimePicker.js
r11920 r12184 137 137 _createOption:function(/*Number*/ index){ 138 138 // summary: creates a clickable time option 139 var div=do cument.createElement("div");139 var div=dojo.doc.createElement("div"); 140 140 var date = (div.date = new Date(this._refDate)); 141 141 div.index=index; … … 145 145 date.getSeconds()+incrementDate.getSeconds()*index); 146 146 147 var innerDiv = do cument.createElement('div');147 var innerDiv = dojo.doc.createElement('div'); 148 148 dojo.addClass(div,this.baseClass+"Item"); 149 149 dojo.addClass(innerDiv,this.baseClass+"ItemInner");