Changeset 10525
- Timestamp:
- 09/16/07 19:47:23 (11 months ago)
- Location:
- dijit/branches/attributemap
- Files:
-
- 15 modified
- 4 copied
-
Declaration.js (modified) (1 diff)
-
demos/chat/client.html (modified) (1 diff)
-
demos/chat/room.js (modified) (2 diffs)
-
demos/mail.html (modified) (6 diffs)
-
form/InlineEditBox.js (modified) (2 diffs)
-
form/_DropDownTextBox.js (modified) (2 diffs)
-
layout/StackContainer.js (modified) (3 diffs)
-
tests/form/test_ComboBox.html (modified) (2 diffs)
-
tests/test_Tree.html (modified) (2 diffs)
-
tests/tree (copied) (copied from dijit/trunk/tests/tree)
-
themes/themeTester.html (modified) (3 diffs)
-
themes/tundra/tundra.css (modified) (10 diffs)
-
Tree.js (modified) (17 diffs)
-
_base/focus.js (modified) (1 diff)
-
_base/manager.js (modified) (1 diff)
-
_tree/dndContainer.js (copied) (copied from dijit/trunk/_tree/dndContainer.js)
-
_tree/dndSelector.js (copied) (copied from dijit/trunk/_tree/dndSelector.js)
-
_tree/dndSource.js (copied) (copied from dijit/trunk/_tree/dndSource.js)
-
_Widget.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
dijit/branches/attributemap/Declaration.js
r10418 r10525 36 36 } 37 37 propList.widgetsInTemplate = true; 38 propList.templateString = "<"+srcType+" class='"+src.className+"'>"+src.innerHTML.replace(/\%7B/g,"{").replace(/\%7D/g,"}")+"</"+srcType+">"; 38 propList.templateString = "<"+srcType+" class='"+src.className+"' dojoAttachPoint='"+(src.getAttribute("dojoAttachPoint")||'')+"' dojoAttachEvent='"+(src.getAttribute("dojoAttachEvent")||'')+"' >"+src.innerHTML.replace(/\%7B/g,"{").replace(/\%7D/g,"}")+"</"+srcType+">"; 39 // console.debug(propList.templateString); 39 40 40 41 // strip things so we don't create stuff under us in the initial setup phase -
dijit/branches/attributemap/demos/chat/client.html
r10454 r10525 59 59 <div title="Chat with Technical Support:" id="helpPane" dojoType="dijit.TitlePane" 60 60 style="width:275px; height:400px; position:absolute; top:4px; right:4px; margin:0; padding:0; display:none;" open="false" > 61 <div dojoType="dijit.demos.chat.Room" id="chatroom" private="true"></div>61 <div dojoType="dijit.demos.chat.Room" id="chatroom" isPrivate="true"></div> 62 62 </div> 63 63 -
dijit/branches/attributemap/demos/chat/room.js
r10454 r10525 12 12 _username: null, 13 13 roomId: "public", 14 private: false,14 isPrivate: false, 15 15 prompt: "Name:", 16 16 … … 32 32 alert('Please enter a username!'); 33 33 }else{ 34 if(this. private){ this.roomId = name; }34 if(this.isPrivate){ this.roomId = name; } 35 35 this._username=name; 36 36 this.joining.className='hidden'; -
dijit/branches/attributemap/demos/mail.html
r10477 r10525 39 39 dojo.require("dijit.layout.ContentPane"); 40 40 41 function initWai(){ 42 dijit.wai.setAttr(dojo.body(), "waiRole", "role", "application"); 43 } 44 dojo.addOnLoad(initWai); 45 41 46 var paneId=1; 42 47 … … 58 63 // set progress back to indeterminate. we're cheating, because this 59 64 // doesn't actually have any data to "progress" 60 onEnd: function(){ dijit.byId('fakeFetch').update({ indeterminate: true }) } 65 onEnd: function(){ 66 dijit.byId('fakeFetch').update({ indeterminate: true }); 67 dojo.byId('fetchMail').style.visibility='hidden'; // remove progress bar from tab order 68 } 61 69 }).play(); 62 70 } … … 65 73 // FIXME: can't set a label on an indeterminate progress bar 66 74 // like if(this.indeterminate) { return " connecting."; } 67 return "Fetching: "+(percent*this.maximum) + " of " + this.maximum + " mess gaes.";75 return "Fetching: "+(percent*this.maximum) + " of " + this.maximum + " messages."; 68 76 } 69 77 var fakeDownload = function(){ 78 dojo.byId('fetchMail').style.visibility='visible'; 70 79 numMails = Math.floor(Math.random()*10)+1; 71 80 dijit.byId('fakeFetch').update({ maximum: numMails, progress:0 }); … … 88 97 setTimeout("stopSendBar()", 3000); 89 98 } 90 91 92 99 93 100 </script> 94 101 … … 243 250 <div dojoType="dijit.Toolbar" layoutAlign="top" style="height:25px;"> 244 251 <div id="getMail" dojoType="dijit.form.ComboButton" 245 iconClass="mailIconGetMail" >252 iconClass="mailIconGetMail" optionsTitle="Mail Source Options"> 246 253 <script type="dojo/method" event="onClick"> 247 254 fakeDownload(); … … 286 293 <div dojoType="dijit.layout.ContentPane" layoutAlign="bottom" id="footer" align="left"> 287 294 <span style="float:right;">DojoMail v0.9b (demo only)</span> 288 <div id="fetchMail" style="opacity:0; ">295 <div id="fetchMail" style="opacity:0;visibility:hidden"> 289 296 <div annotate="true" id="fakeFetch" dojoType="dijit.ProgressBar" style="height:15px; width:275px;" indeterminate="true" report="fakeReport"></div> 290 297 </div> -
dijit/branches/attributemap/form/InlineEditBox.js
r10455 r10525 209 209 // e is passed in if click on save button or user presses Enter. It's not 210 210 // passed in when called by _onBlur. 211 if( e){ dojo.stopEvent(e); }211 if(typeof e == "object"){ dojo.stopEvent(e); } 212 212 if(!this.enableSave()){ return; } 213 213 this.editing = false; … … 293 293 this._showText(); // asynchronous update made famous by ComboBox/FilteringSelect 294 294 }else if(this.autoSave){ 295 this.save( );295 this.save(1); 296 296 }else{ 297 297 // #3752 -
dijit/branches/attributemap/form/_DropDownTextBox.js
r10418 r10525 153 153 var popupbox=dojo.marginBox(this._popupWidget.domNode); 154 154 this._popupWidget.domNode.style.overflow=((best.h==popupbox.h)&&(best.w==popupbox.w))?"hidden":"auto"; 155 dojo.marginBox(this._popupWidget.domNode, {h:best.h,w:Math.max(best.w,this.domNode.offsetWidth)}); 156 155 // #4134: borrow TextArea scrollbar test so content isn't covered by scrollbar and horizontal scrollbar doesn't appear 156 var newwidth=best.w; 157 if(best.h<this._popupWidget.domNode.scrollHeight){newwidth+=16;} 158 dojo.marginBox(this._popupWidget.domNode, {h:best.h,w:Math.max(newwidth,this.domNode.offsetWidth)}); 157 159 } 158 160 }, … … 175 177 open:function(){ 176 178 this.makePopup(); 177 var self=this; 178 self._isShowingNow=true; 179 this._isShowingNow=true; 179 180 return dijit.popup.open({ 180 181 popup: this._popupWidget, -
dijit/branches/attributemap/layout/StackContainer.js
r10418 r10525 23 23 _started: false, 24 24 25 // selectedChildWidget: Widget 26 // References the currently selected child widget, if any 27 25 28 startup: function(){ 26 29 if(this._started){ return; } … … 39 42 }, this); 40 43 44 var selected = this.selectedChildWidget; 45 41 46 // Default to the first child 42 if(! this.selectedChildWidget&& children[0]){43 this.selectedChildWidget = children[0];44 this.selectedChildWidget.selected = true;45 } 46 if( this.selectedChildWidget){47 this._showChild( this.selectedChildWidget);47 if(!selected && children[0]){ 48 selected = this.selectedChildWidget = children[0]; 49 selected.selected = true; 50 } 51 if(selected){ 52 this._showChild(selected); 48 53 } 49 54 50 55 // Now publish information about myself so any StackControllers can initialize.. 51 dojo.publish(this.id+"-startup", [{children: children, selected: this.selectedChildWidget}]);56 dojo.publish(this.id+"-startup", [{children: children, selected: selected}]); 52 57 53 58 dijit.layout._LayoutWidget.prototype.startup.apply(this, arguments); … … 158 163 // Keystroke handling for keystrokes on the tab panel itself (that were bubbled up to me) 159 164 // Ctrl-w: close tab 160 if (e.ctrlKey){165 if(e.ctrlKey){ 161 166 switch(e.keyCode){ 162 167 case dojo.keys.PAGE_DOWN: -
dijit/branches/attributemap/tests/form/test_ComboBox.html
r10418 r10525 185 185 <hr> 186 186 <p>ComboBox #4: url, autocomplete=false required=true:</p> 187 <label for=" datatest">US State test 4: </label>187 <label for="combobox4">US State test 4: </label> 188 188 <input dojoType="dijit.form.ComboBox" 189 189 value="" … … 195 195 onChange="setVal4" 196 196 autocomplete="false" 197 id=" datatest"197 id="combobox4" 198 198 required="true" 199 199 > -
dijit/branches/attributemap/tests/test_Tree.html
r10455 r10525 36 36 alert("Execute of node " + continentStore.getLabel(item) 37 37 +", population=" + continentStore.getValue(item, "population")); 38 </script> 39 <script type="dojo/method" event="getIconClass" args="item"> 40 return "noteIcon"; 38 41 </script> 39 42 </div> … … 97 100 }); 98 101 </script> 102 <script type="dojo/method" event="getIconClass" args="item"> 103 return "noteIcon"; 104 </script> 99 105 </div> 100 106 -
dijit/branches/attributemap/themes/themeTester.html
r10418 r10525 433 433 intermediateChanges="true" 434 434 style="width:50%; height: 20px;" 435 id=" slider1">435 id="horizontal1"> 436 436 <ol dojoType="dijit.form.HorizontalRuleLabels" container="topDecoration" style="height:1.2em;font-size:75%;color:gray;"> 437 437 <li> … … 453 453 <br>Value: <input id="slider1input" size="5"> 454 454 455 <div dojoType="dijit.form.HorizontalSlider" name="horizontal 1"455 <div dojoType="dijit.form.HorizontalSlider" name="horizontal2" 456 456 minimum="1" 457 457 value="2" … … 461 461 intermediateChanges="true" 462 462 style="width:300px; height: 40px;" 463 id=" slider1">463 id="horizontal2"> 464 464 <div dojoType="dijit.form.HorizontalRule" container="bottomDecoration" count=3 style="height:5px;"></div> 465 465 <ol dojoType="dijit.form.HorizontalRuleLabels" container="bottomDecoration"style="height:1em;font-size:75%;color:gray;"> -
dijit/branches/attributemap/themes/tundra/tundra.css
r10455 r10525 8 8 .dj_safari .tundra .dijitPopup { 9 9 /* -webkit-border-radius: 5px; */ 10 -webkit-box-shadow: 0px 3px 7px #adadad;10 -webkit-box-shadow: 0px 5px 10px #adadad; 11 11 } 12 12 … … 36 36 .dj_ie6 .tundra .dijitButtonNode { 37 37 position:relative; 38 } 39 40 .tundra .dijitA11yDownArrow, 41 .tundra .dijitDownArrowButton, 42 .tundra .dijitUpArrowButton { 43 font-size: 0.75em; 44 color: #848484; 38 45 } 39 46 … … 181 188 .tundra .dijitComboBox { 182 189 /* put margin on the outer element of the autocompleter rather than the input */ 183 margin: .0em .1em .2em.1em;190 margin: 0em 0.1em 0.2em 0.1em; 184 191 } 185 192 … … 201 208 border-color:#366dba; 202 209 border-style:inset; 210 /* outline: auto 5px -webkit-focus-ring-color; */ 203 211 } 204 212 … … 256 264 .tundra .dijitInputFieldValidationIconText { 257 265 visibility: hidden; 266 } 267 268 .tundra td.dijitInputField { 269 margin: 0px; 270 padding: 0px 0px 0px 0.3em; 258 271 } 259 272 … … 384 397 385 398 .tundra .dijitMenuItemHover { 386 background-color: # 95a0b0; /* #555555; #aaaaaa; #646464; #60a1ea; */399 background-color: #808080; /* #95a0b0; #555555; #aaaaaa; #646464; #60a1ea; #848484; */ 387 400 color:#fff; 388 401 } … … 657 670 background: #eee; 658 671 border: 1px solid #999; 659 -webkit-box-shadow: 0px 3px 7px #adadad;672 -webkit-box-shadow: 0px 5px 10px #adadad; 660 673 } 661 674 … … 826 839 .tundra .dijitAccordionPane .dijitAccordionTitle { 827 840 background:#fafafa url("images/titleBar.png") repeat-x bottom left; 828 border: 1px solid #bfbfbf; 841 border-left: 1px solid #bfbfbf; 842 border-top: 1px solid #bfbfbf; 843 border-right: 1px solid #bfbfbf; 829 844 padding:4px 4px 2px 4px; 830 845 } … … 833 848 background: #ededed url("images/buttonActive.png") bottom repeat-x; 834 849 font-weight: bold; 835 /* border:1px solid #84a3d1; */ 836 border: 1px solid #aaaaaa; 850 border-left: 1px solid #aaaaaa; 851 border-top: 1px solid #aaaaaa; 852 border-right: 1px solid #aaaaaa; 837 853 padding: 4px 4px 2px 4px; 838 854 } … … 858 874 .tundra .dijitAccordionPane .dijitAccordionBody { 859 875 background: #fff; 876 /* 860 877 border:1px solid #bfbfbf; 878 */ 879 border-left: 1px solid #bfbfbf; 880 border-top: 1px solid #bfbfbf; 881 border-right: 1px solid #bfbfbf; 861 882 } 862 883 -
dijit/branches/attributemap/Tree.js
r10418 r10525 20 20 state: "UNCHECKED", 21 21 locked: false, 22 startExpanded: true, 22 23 23 24 lock: function(){ … … 48 49 return false; 49 50 }, 51 50 52 51 53 _setChildren: function(/* Object[] */ childrenArray){ … … 82 84 child._updateLayout(); 83 85 }); 84 85 86 }else{ 86 87 this.isExpandable=false; … … 97 98 // change expando to/form dot or + icon, as appropriate 98 99 this._setExpando(false); 100 } 101 102 if (this.isTree && this.startExpanded) { 103 var children = this.getChildren(); 104 for(var i=0; i<children.length;i++){ 105 if (children[i].isExpandable){ 106 this._expandNode(children[i]); 107 } 108 } 99 109 } 100 110 … … 129 139 }, 130 140 131 deleteNode: function(/* treeNode */ node) {141 deleteNode: function(/* treeNode */ node){ 132 142 node.destroy(); 133 143 … … 137 147 }, 138 148 139 makeExpandable: function() {149 makeExpandable: function(){ 140 150 //summary 141 151 // if this node wasn't already showing the expando node, … … 159 169 160 170 // childrenAttr: String 161 // name of attributethat holds children of a tree node171 // one ore more attributes that holds children of a tree node 162 172 childrenAttr: "children", 163 173 … … 167 177 168 178 isTree: true, 179 180 // dndController: String 181 // class name to use as as the dnd controller 182 dndController: null, 183 184 //parameters to pull off of the tree and pass on to the dndController as its params 185 dndParams: ["onDndDrop","itemCreator","onDndCancel","checkAcceptance", "checkItemAcceptance"], 186 187 //declare the above items so they can be pulled from the tree's markup 188 onDndDrop:null, 189 itemCreator:null, 190 onDndCancel:null, 191 checkAcceptance:null, 192 checkItemAcceptance:null, 169 193 170 194 _publish: function(/*String*/ topicName, /*Object*/ message){ … … 179 203 this._itemNodeMap={}; 180 204 181 // if the store supports Notification, subscribe to the notif cation events205 // if the store supports Notification, subscribe to the notification events 182 206 if (this.store.getFeatures()['dojo.data.api.Notification']){ 183 207 this.connect(this.store, "onNew", "_onNewItem"); … … 200 224 // load top level children 201 225 this.getItemChildren(null, dojo.hitch(this, "_onLoadAllItems", this)); 226 227 if (this.dndController){ 228 if (dojo.isString(this.dndController)){ 229 this.dndController= dojo.getObject(this.dndController); 230 } 231 var params={}; 232 for (var i=0; i<this.dndParams.length;i++){ 233 if (this[this.dndParams[i]]){ 234 params[this.dndParams[i]]=this[this.dndParams[i]]; 235 } 236 } 237 this.dndController= new this.dndController(this, params); 238 } 202 239 }, 203 240 … … 210 247 // (For efficiency reasons we may not want to check if an element has 211 248 // children until user clicks the expando node) 212 return this.store.hasAttribute(item, this.childrenAttr); 249 250 if (dojo.isString(this.childrenAttr)){ 251 this.childrenAttr = this.childrenAttr.split(/,\s*/); 252 } 253 254 if (!dojo.isArray(this.childrenAttr)){ 255 this.childrenAttr=[this.childrenAttr]; 256 } 257 258 for (var i=0; i<this.childrenAttr.length; i++){ 259 if (this.store.hasAttribute(item, this.childrenAttr[i])){ 260 return true; 261 } 262 } 263 return false; 213 264 }, 214 265 … … 220 271 if(parentItem == null){ 221 272 // get top level nodes 222 store.fetch({ query: this.query, onComplete: onComplete });273 store.fetch({ query: this.query, onComplete: onComplete}); 223 274 }else{ 224 275 // get children of specified node 225 var childItems = store.getValues(parentItem, this.childrenAttr); 226 276 var childItems = []; 277 for (var i=0; i<this.childrenAttr.length; i++){ 278 childItems= childItems.concat(store.getValues(parentItem, this.childrenAttr[i])); 279 } 227 280 // count how many items need to be loaded 228 281 var _waitCount = 0; … … 256 309 }, 257 310 258 getLabel: function(/*dojo.data.Item*/ item) {311 getLabel: function(/*dojo.data.Item*/ item){ 259 312 // summary: user overridable function to get the label for a tree node (given the item) 260 313 return this.store.getLabel(item); // String … … 648 701 //summary: callback when new item has been added to the store. 649 702 703 var loadNewItem=false; 650 704 if (parentInfo){