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

itemSelector...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.