Changeset 10525

Show
Ignore:
Timestamp:
09/16/07 19:47:23 (11 months ago)
Author:
peller
Message:

raise attributemap branch revs from [10478] to [10524]. Refs #3058

Location:
dijit/branches/attributemap
Files:
15 modified
4 copied

Legend:

Unmodified
Added
Removed
  • dijit/branches/attributemap/Declaration.js

    r10418 r10525  
    3636                        } 
    3737                        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); 
    3940 
    4041                        // strip things so we don't create stuff under us in the initial setup phase 
  • dijit/branches/attributemap/demos/chat/client.html

    r10454 r10525  
    5959        <div title="Chat with Technical Support:" id="helpPane" dojoType="dijit.TitlePane"  
    6060                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> 
    6262        </div> 
    6363 
  • dijit/branches/attributemap/demos/chat/room.js

    r10454 r10525  
    1212        _username: null, 
    1313        roomId: "public", 
    14         private: false, 
     14        isPrivate: false, 
    1515        prompt: "Name:", 
    1616 
     
    3232                        alert('Please enter a username!'); 
    3333                }else{ 
    34                         if(this.private){ this.roomId = name; }  
     34                        if(this.isPrivate){ this.roomId = name; }  
    3535                        this._username=name; 
    3636                        this.joining.className='hidden'; 
  • dijit/branches/attributemap/demos/mail.html

    r10477 r10525  
    3939                dojo.require("dijit.layout.ContentPane"); 
    4040 
     41                function initWai(){ 
     42                        dijit.wai.setAttr(dojo.body(), "waiRole", "role", "application"); 
     43                } 
     44                dojo.addOnLoad(initWai); 
     45                 
    4146                var paneId=1; 
    4247 
     
    5863                                        // set progress back to indeterminate. we're cheating, because this 
    5964                                        // 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                                        } 
    6169                                }).play(); 
    6270                        } 
     
    6573                        // FIXME: can't set a label on an indeterminate progress bar 
    6674                        // like if(this.indeterminate) { return " connecting."; } 
    67                         return "Fetching: "+(percent*this.maximum) + " of " + this.maximum + " messgaes."; 
     75                        return "Fetching: "+(percent*this.maximum) + " of " + this.maximum + " messages."; 
    6876                } 
    6977                var fakeDownload = function(){ 
     78                        dojo.byId('fetchMail').style.visibility='visible'; 
    7079                        numMails = Math.floor(Math.random()*10)+1; 
    7180                        dijit.byId('fakeFetch').update({ maximum: numMails, progress:0 }); 
     
    8897                        setTimeout("stopSendBar()", 3000); 
    8998                } 
    90                  
    91  
    92                  
     99 
    93100        </script> 
    94101 
     
    243250                <div dojoType="dijit.Toolbar" layoutAlign="top" style="height:25px;"> 
    244251                        <div id="getMail" dojoType="dijit.form.ComboButton" 
    245                                 iconClass="mailIconGetMail"> 
     252                                iconClass="mailIconGetMail" optionsTitle="Mail Source Options"> 
    246253                                <script type="dojo/method" event="onClick"> 
    247254                                        fakeDownload(); 
     
    286293                <div dojoType="dijit.layout.ContentPane" layoutAlign="bottom" id="footer" align="left"> 
    287294                        <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"> 
    289296                        <div annotate="true" id="fakeFetch" dojoType="dijit.ProgressBar" style="height:15px; width:275px;" indeterminate="true" report="fakeReport"></div> 
    290297                        </div> 
  • dijit/branches/attributemap/form/InlineEditBox.js

    r10455 r10525  
    209209                // e is passed in if click on save button or user presses Enter.  It's not 
    210210                // passed in when called by _onBlur. 
    211                 if(e){ dojo.stopEvent(e); } 
     211                if(typeof e == "object"){ dojo.stopEvent(e); } 
    212212                if(!this.enableSave()){ return; } 
    213213                this.editing = false; 
     
    293293                        this._showText(); // asynchronous update made famous by ComboBox/FilteringSelect 
    294294                }else if(this.autoSave){ 
    295                         this.save(); 
     295                        this.save(1); 
    296296                }else{ 
    297297                        // #3752 
  • dijit/branches/attributemap/form/_DropDownTextBox.js

    r10418 r10525  
    153153                                var popupbox=dojo.marginBox(this._popupWidget.domNode); 
    154154                                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)}); 
    157159                        } 
    158160                }, 
     
    175177                open:function(){ 
    176178                        this.makePopup(); 
    177                         var self=this; 
    178                         self._isShowingNow=true; 
     179                        this._isShowingNow=true; 
    179180                        return dijit.popup.open({ 
    180181                                popup: this._popupWidget, 
  • dijit/branches/attributemap/layout/StackContainer.js

    r10418 r10525  
    2323        _started: false, 
    2424 
     25        // selectedChildWidget: Widget 
     26        //      References the currently selected child widget, if any 
     27 
    2528        startup: function(){ 
    2629                if(this._started){ return; } 
     
    3942                }, this); 
    4043 
     44                var selected = this.selectedChildWidget; 
     45 
    4146                // 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); 
    4853                } 
    4954 
    5055                // 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}]); 
    5257 
    5358                dijit.layout._LayoutWidget.prototype.startup.apply(this, arguments); 
     
    158163                //      Keystroke handling for keystrokes on the tab panel itself (that were bubbled up to me) 
    159164                //      Ctrl-w: close tab 
    160                 if (e.ctrlKey){ 
     165                if(e.ctrlKey){ 
    161166                        switch(e.keyCode){ 
    162167                                case dojo.keys.PAGE_DOWN: 
  • dijit/branches/attributemap/tests/form/test_ComboBox.html

    r10418 r10525  
    185185        <hr> 
    186186        <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> 
    188188        <input dojoType="dijit.form.ComboBox" 
    189189                        value="" 
     
    195195                        onChange="setVal4" 
    196196                        autocomplete="false" 
    197                         id="datatest" 
     197                        id="combobox4" 
    198198                        required="true" 
    199199        > 
  • dijit/branches/attributemap/tests/test_Tree.html

    r10455 r10525  
    3636                        alert("Execute of node " + continentStore.getLabel(item) 
    3737                                +", population=" + continentStore.getValue(item, "population")); 
     38                </script> 
     39                <script type="dojo/method" event="getIconClass" args="item"> 
     40                        return "noteIcon"; 
    3841                </script> 
    3942        </div> 
     
    97100                        }); 
    98101                </script> 
     102                <script type="dojo/method" event="getIconClass" args="item"> 
     103                        return "noteIcon"; 
     104                </script> 
    99105        </div> 
    100106 
  • dijit/branches/attributemap/themes/themeTester.html

    r10418 r10525  
    433433                                                        intermediateChanges="true" 
    434434                                                        style="width:50%; height: 20px;" 
    435                                                         id="slider1"> 
     435                                                        id="horizontal1"> 
    436436                                                                <ol dojoType="dijit.form.HorizontalRuleLabels" container="topDecoration" style="height:1.2em;font-size:75%;color:gray;"> 
    437437                                                                        <li> 
     
    453453                                                <br>Value: <input id="slider1input" size="5"> 
    454454 
    455                                                 <div dojoType="dijit.form.HorizontalSlider" name="horizontal1" 
     455                                                <div dojoType="dijit.form.HorizontalSlider" name="horizontal2" 
    456456                                                        minimum="1" 
    457457                                                        value="2" 
     
    461461                                                        intermediateChanges="true" 
    462462                                                        style="width:300px; height: 40px;" 
    463                                                         id="slider1"> 
     463                                                        id="horizontal2"> 
    464464                                                                <div dojoType="dijit.form.HorizontalRule" container="bottomDecoration" count=3 style="height:5px;"></div> 
    465465                                                                <ol dojoType="dijit.form.HorizontalRuleLabels" container="bottomDecoration"style="height:1em;font-size:75%;color:gray;"> 
  • dijit/branches/attributemap/themes/tundra/tundra.css

    r10455 r10525  
    88.dj_safari .tundra .dijitPopup { 
    99        /* -webkit-border-radius: 5px; */ 
    10         -webkit-box-shadow: 0px 3px 7px #adadad; 
     10        -webkit-box-shadow: 0px 5px 10px #adadad; 
    1111} 
    1212 
     
    3636.dj_ie6 .tundra .dijitButtonNode { 
    3737        position:relative;  
     38} 
     39 
     40.tundra .dijitA11yDownArrow, 
     41.tundra .dijitDownArrowButton, 
     42.tundra .dijitUpArrowButton { 
     43        font-size: 0.75em; 
     44        color: #848484; 
    3845} 
    3946 
     
    181188.tundra .dijitComboBox { 
    182189        /* 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; 
    184191} 
    185192 
     
    201208        border-color:#366dba; 
    202209        border-style:inset; 
     210        /* outline: auto 5px -webkit-focus-ring-color; */ 
    203211} 
    204212 
     
    256264.tundra .dijitInputFieldValidationIconText { 
    257265        visibility: hidden; 
     266} 
     267 
     268.tundra td.dijitInputField { 
     269        margin: 0px; 
     270        padding: 0px 0px 0px 0.3em; 
    258271} 
    259272 
     
    384397 
    385398.tundra .dijitMenuItemHover { 
    386         background-color: #95a0b0; /* #555555; #aaaaaa; #646464;  #60a1ea; */ 
     399        background-color: #808080; /* #95a0b0; #555555; #aaaaaa; #646464;  #60a1ea; #848484; */ 
    387400        color:#fff; 
    388401} 
     
    657670        background: #eee; 
    658671        border: 1px solid #999; 
    659         -webkit-box-shadow: 0px 3px 7px #adadad; 
     672        -webkit-box-shadow: 0px 5px 10px #adadad; 
    660673} 
    661674 
     
    826839.tundra .dijitAccordionPane .dijitAccordionTitle { 
    827840        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; 
    829844        padding:4px 4px 2px 4px; 
    830845} 
     
    833848        background: #ededed url("images/buttonActive.png") bottom repeat-x; 
    834849        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; 
    837853        padding: 4px 4px 2px 4px; 
    838854} 
     
    858874.tundra .dijitAccordionPane .dijitAccordionBody { 
    859875        background: #fff; 
     876        /* 
    860877        border:1px solid #bfbfbf; 
     878        */ 
     879        border-left: 1px solid #bfbfbf; 
     880        border-top: 1px solid #bfbfbf; 
     881        border-right: 1px solid #bfbfbf; 
    861882} 
    862883 
  • dijit/branches/attributemap/Tree.js

    r10418 r10525  
    2020        state: "UNCHECKED", 
    2121        locked: false, 
     22        startExpanded: true, 
    2223 
    2324        lock: function(){ 
     
    4849                return false; 
    4950        }, 
     51 
    5052 
    5153        _setChildren: function(/* Object[] */ childrenArray){ 
     
    8284                                child._updateLayout(); 
    8385                        }); 
    84  
    8586                }else{ 
    8687                        this.isExpandable=false; 
     
    9798                        // change expando to/form dot or + icon, as appropriate 
    9899                        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                        } 
    99109                } 
    100110 
     
    129139        }, 
    130140 
    131         deleteNode: function(/* treeNode */ node) { 
     141        deleteNode: function(/* treeNode */ node){ 
    132142                node.destroy(); 
    133143 
     
    137147        }, 
    138148 
    139         makeExpandable: function() { 
     149        makeExpandable: function(){ 
    140150                //summary 
    141151                //              if this node wasn't already showing the expando node, 
     
    159169 
    160170        // childrenAttr: String 
    161         //              name of attribute that holds children of a tree node 
     171        //              one ore more attributes that holds children of a tree node 
    162172        childrenAttr: "children", 
    163173 
     
    167177 
    168178        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, 
    169193 
    170194        _publish: function(/*String*/ topicName, /*Object*/ message){ 
     
    179203                this._itemNodeMap={}; 
    180204 
    181                 // if the store supports Notification, subscribe to the notifcation events 
     205                // if the store supports Notification, subscribe to the notification events 
    182206                if (this.store.getFeatures()['dojo.data.api.Notification']){ 
    183207                        this.connect(this.store, "onNew", "_onNewItem"); 
     
    200224                // load top level children 
    201225                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                } 
    202239        }, 
    203240 
     
    210247                //              (For efficiency reasons we may not want to check if an element has 
    211248                //              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; 
    213264        }, 
    214265 
     
    220271                if(parentItem == null){ 
    221272                        // get top level nodes 
    222                         store.fetch({ query: this.query, onComplete: onComplete }); 
     273                        store.fetch({ query: this.query, onComplete: onComplete}); 
    223274                }else{ 
    224275                        // 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                        } 
    227280                        // count how many items need to be loaded 
    228281                        var _waitCount = 0; 
     
    256309        }, 
    257310 
    258         getLabel: function(/*dojo.data.Item*/ item) { 
     311        getLabel: function(/*dojo.data.Item*/ item){ 
    259312                // summary: user overridable function to get the label for a tree node (given the item) 
    260313                return this.store.getLabel(item);       // String 
     
    648701                //summary: callback when new item has been added to the store. 
    649702 
     703                var loadNewItem=false; 
    650704                if (parentInfo){