Changeset 15051


Ignore:
Timestamp:
03/05/10 19:38:19 (2 years ago)
Author:
sys
Message:

itemSelector...

Location:
trunk/Xul_Wsp
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Xul_Wsp/content/scenariWsp/desks/wspDesk/wspDesk.js

    r15050 r15051  
    191191                extPoints.addToList("event:load:wspDesk", "windowTitle", 1, function(){ 
    192192                        document.documentElement.setAttribute("title", desk.getWsp().getCode() + " - " + document.documentElement.getAttribute("title")); 
    193                 }); 
     193                }, 0); 
    194194                 
    195195                //onload : Gestion de la fonction de maximisation d'un block. 
     
    197197                        document.addEventListener(SCMAXIMIZEBLOCK_EVENT, scMaxBlockOnMaximize, false); 
    198198                        document.addEventListener(SCNORMALIZEBLOCK_EVENT, scMaxBlockOnNormalize, false); 
    199                 }); 
     199                }, 0); 
    200200                 
    201201                //onload : Ajustements et inits graphiques menus, matrix... 
     
    209209                        accelKeyMgr.initFromMapActions(extPoints.getListAsMap("accelKey:deskWsp")); 
    210210                        accelKeyMgr.listenEventsOnWindow(window); 
    211                 }); 
     211                }, 0); 
    212212                 
    213213                //onload : Ouverture d'une Uri... 
    214214                extPoints.addToList("event:load:wspDesk", "launchUri", 1, function(){ 
    215                         if(window.arguments.length > 0) { 
     215                        if(window.arguments && window.arguments.length > 0) { 
    216216                                var vLaunchContext = window.arguments[0]; 
    217217                                if(vLaunchContext && vLaunchContext.refUriToOpen) { 
     
    219219                                } 
    220220                        } 
    221                 }); 
     221                }, 100); 
    222222                 
    223223                 
  • trunk/Xul_Wsp/content/scenariWsp/views/wspNavView/wspNavView.xbl.css

    r15016 r15051  
    6868} 
    6969 
     70treechildren:-moz-tree-cell-text(WrongType){ 
     71        color:gray; 
     72} 
     73treechildren:-moz-tree-cell-text(GoodType){ 
     74        font-weight: bold; 
     75} 
     76 
    7077 
    7178vbox[anonid="noContent"] description{ 
  • trunk/Xul_Wsp/content/scenariWsp/views/wspNavView/wspNavView.xbl.xml

    r14994 r15051  
    8282                                try{ 
    8383                                        if(this.fViewMgr) return; //déja initialisé 
     84                                        this.xInitViewMgr(); 
     85                                }catch(e){log.debug("wspNavView.onViewShown:: " + e);} 
     86                                ]]></body> 
     87                        </method> 
     88                        <method name="xInitViewMgr"> 
     89                                <body><![CDATA[ 
     90                                try{ 
    8491                                        var vWsp = desk.getWsp(); 
    8592                                        Components.utils.import("resource://scenariWsp/views/wspNavView/WspNavView.jsm", this); 
    8693                                        this.fViewMgr = new this.WspNavView(window, vWsp, this.fTree, document.getAnonymousElementByAttribute(this, "anonid", "tooltip"), document.getAnonymousElementByAttribute(this, "anonid", "noContent")); 
    8794                                        this.fViewMgr.setAccelKeyMgr(new actions.AccelKeyMgr().initFromMapActions(extPoints.mergeListsAsMap(["accelKey:wspNavView", "accelKey:common:uri"]))); 
    88                                 }catch(e){log.debug("wspNavView.onViewShown:: " + e);} 
     95                                }catch(e){log.debug("wspNavView.xInitViewMgr:: " + e);} 
    8996                                ]]></body> 
    9097                        </method> 
     
    97104                </implementation> 
    98105                <handlers> 
    99                         <handler event="viewShown"> 
     106                        <handler event="viewShown" phase="target"> 
    100107                                this.onViewShown(); 
    101108                        </handler> 
     
    122129                </handlers> 
    123130        </binding> 
     131         
    124132</bindings> 
  • trunk/Xul_Wsp/content/scenariWsp/widgets/refItem/refItem.xbl.css

    r15049 r15051  
    4040@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); 
    4141 
    42 ptritem{ 
    43         -moz-user-focus: normal; 
    44         padding: 1px; 
    45         cursor: pointer; 
    46         margin-left: 4px; 
    47 } 
    48  
    49 ptritem[isNull][notnull]{ 
    50         background-image: url(chrome://scenariXedLib/content/libUiBase/skin/img/error.png); 
    51         background-repeat: no-repeat; 
    52         padding-left: 15px; 
    53 } 
    54  
    55 *[empty] ptritem[isNull][notnull]{ 
    56         background-image: none; 
    57         padding-left: 4px; 
    58 } 
    59  
    60 shortDescDrawerRef { 
    61         -moz-binding: url("chrome://scenariWsp/content/widgets/shortDescDrawer/shortDescDrawer.xbl.xml#ref"); 
    62 } 
    6342shortDescDrawerRefMini { 
    6443        -moz-binding: url("chrome://scenariWsp/content/widgets/shortDescDrawer/shortDescDrawer.xbl.xml#refMini"); 
     
    6847        -moz-binding: url("chrome://scenariCms/content/widgets/item/tooltipItemTypes.xbl.xml#tooltip"); 
    6948} 
     49 
     50hbox[anonid="errorLink"] { 
     51        display: none; 
     52} 
     53*[error]>hbox[anonid="errorLink"] { 
     54        display: block; 
     55} 
     56 
     57image[anonid="imgError"] { 
     58        list-style: url(chrome://scenariXedLib/content/libUiBase/skin/img/error.png); 
     59        margin: 0px 3px; 
     60} 
  • trunk/Xul_Wsp/content/scenariWsp/widgets/refItem/refItem.xbl.xml

    r15050 r15051  
    5151                <content orient="vertical"> 
    5252                        <xul:shortDescDrawerRefMini anonid="drawer"/> 
    53                         <xul:hbox tooltip="_child" hidden="true"> 
     53                        <xul:hbox anonid="errorLink" tooltip="_child"> 
    5454                                <xul:tooltip anonid="typesAllowed"/> 
    55                                 <xul:image/> 
    56                                 <xul:text/> 
     55                                <xul:image anonid="imgError"/> 
     56                                <xul:text value="Cet item n'est pas du bon type."/> 
    5757                        </xul:hbox> 
    5858                </content> 
     
    6060                         
    6161                        <field name="fUriObject">ut.searchUriObject(this)</field> 
     62                         
     63                        <field name="fRegexpSgn"/> 
    6264                         
    6365                        <property name="isEmpty" onget="return this.getAttribute('empty')=='true';"/> 
     
    163165        </binding> 
    164166 
     167 
     168        <!-- TODO... --> 
    165169        <binding id="refItemEdit" extends="#refItemView"> 
    166170                <implementation> 
  • trunk/Xul_Wsp/content/scenariWsp/windows/itemSelector/selItem.css

    r15049 r15051  
    4747        /*-moz-binding: url("chrome://scenariWsp/content/widgets/shortDescDrawer/shortDescDrawer.xbl.xml#refMini");*/ 
    4848} 
     49#btnsBar{ 
     50        min-height: 4em; 
     51        padding: 3px 10px; 
     52} 
    4953 
  • trunk/Xul_Wsp/content/scenariWsp/windows/itemSelector/selItem.js

    r15050 r15051  
    101101                                //Init du contexte 
    102102                                vRefItemView.fUriObject = new UriObjectWsp(desk.getWsp().getCode(), desk.getWsp().getDataProvider()); 
     103                                vRefItemView.fRegexpSgn = sContext.regexpSgn; 
    103104                                //Abonnement à DeskInfo pour mettre à jour l'item sélectionné 
    104105                                var vListener = { 
  • trunk/Xul_Wsp/content/scenariWsp/windows/itemSelector/selItem.xul

    r15049 r15051  
    6262        <matrix id="matrix" orient="horizontal"/> 
    6363         
    64         <hbox id="btnsBar"> 
     64        <hbox id="btnsBar" align="center"> 
    6565                <hbox id="itemViewBox" align="center"> 
    6666                        <text id="itemViewLabel" value="Item sélectionné : "/> 
     
    7979                var sThisCallback = window.arguments[2] || sContext.window; 
    8080                var sResult = {}; 
    81                 log.info("sContext::::::::::"+log.listProperties(sContext)); 
    8281                 
    8382                //Init de la fontSize de la window 
  • trunk/Xul_Wsp/modules/scenariWsp/views/wspNavView/WspNavView.jsm

    r15037 r15051  
    116116WspNavView.prototype.getAccelKeyMgr = function(){ 
    117117        return this.fAccelKeyMgr; 
     118} 
     119 
     120WspNavView.prototype.setRegexpSgn = function(pRegexpSgn){ 
     121        this.fRegexpSgn = pRegexpSgn; 
     122        if(pRegexpSgn) { 
     123                var vServiceAtom = Cc["@mozilla.org/atom-service;1"].getService(Ci.nsIAtomService); 
     124                this.fWrongType = vServiceAtom.getAtom("WrongType"); 
     125                this.fGoodType = vServiceAtom.getAtom("GoodType"); 
     126        } 
     127} 
     128WspNavView.prototype.getRegexpSgn = function(){ 
     129        return this.fRegexpSgn; 
    118130} 
    119131 
     
    232244WspNavView.prototype.getCellProperties = function(pRow, pCol, pProps){ 
    233245        if(this.fIsCutting && this.xGetItem(pRow).isCutting) pProps.AppendElement(this.fInCut); 
    234         if(this.xGetItem(pRow).tmpItem) pProps.AppendElement(this.fTmpItem); 
     246        var vItem = this.xGetItem(pRow); 
     247        if(vItem.tmpItem) pProps.AppendElement(this.fTmpItem); 
     248        if(this.fRegexpSgn) { 
     249                if(!("ittyOk" in vItem)){ 
     250                        vItem.ittyOk = 0; 
     251                        if(vItem.itSgn) vItem.ittyOk = this.fRegexpSgn.test(vItem.itSgn) ? 1 : -1; 
     252                } 
     253                if(vItem.ittyOk != 0) pProps.AppendElement(vItem.ittyOk>0 ? this.fGoodType : this.fWrongType); 
     254        } 
    235255} 
    236256 
Note: See TracChangeset for help on using the changeset viewer.