Changeset 15058
- Timestamp:
- 03/06/10 11:58:53 (2 years ago)
- Location:
- trunk/Xul_Commons
- Files:
-
- 5 edited
-
content/scenariCommons/widgets/jsTree/jsTree.xbl.xml (modified) (2 diffs)
-
content/scenariCommons/widgets/tree/tree.css (modified) (1 diff)
-
content/scenariCommons/widgets/tree/tree.xml (modified) (2 diffs)
-
modules/scenariCommons/commons/actions.jsm (modified) (1 diff)
-
modules/scenariCommons/widgets/jsTree/columns.jsm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Xul_Commons/content/scenariCommons/widgets/jsTree/jsTree.xbl.xml
r15056 r15058 80 80 <method name="initColumns"> 81 81 <body><![CDATA[ 82 try{ 82 83 var vCdLists = this.getAttribute("columnsLists"); 83 84 if(vCdLists) { … … 116 117 Components.utils.import("resource://scenariCommons/widgets/jsTree/columns.jsm", vLib); 117 118 vLib.columns.injectSplitters(vTreeCols); 118 log.info("vTreeCols::::::::::::::::::::::::::\n"+log.getXml(vTreeCols));119 vLib.columns.computeBodyMinWidth(vTreeCols); 119 120 } 120 121 //Initialisation des CellBuilders. 121 122 this.fView.initTree(); 123 }catch(e){log.debug("jsTree.initColumns : "+e);} 122 124 ]]></body> 123 125 </method> -
trunk/Xul_Commons/content/scenariCommons/widgets/tree/tree.css
r14843 r15058 2 2 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); 3 3 4 /** 5 * fichier css à inclure en amont du widget tree (dans le xbl container ou dans la page xul). 6 */ 4 7 5 8 tree { -
trunk/Xul_Commons/content/scenariCommons/widgets/tree/tree.xml
r14843 r15058 47 47 48 48 <!-- 49 Implémentation du xul:tree avec une méthode supplémentaire canChangeSelect() pour pouvoir verrouiler 50 le changement de sélection. 49 Implémentation du xul:tree avec : 50 - une méthode supplémentaire canChangeSelect() pour pouvoir verrouiler 51 le changement de sélection. 52 - la gestion d'un attribut "bodyMinWidth" sur le noeud treecols permettant de forcer l'affichage 53 d'un scrollbar horizontal si la largeur du widget tree est inférieure à la valeur renseignée (en pixel). 54 55 ATTENTION : pour activer ces fonctionnalités, le css "chrome://scenariCommons/content/widgets/tree/tree.css" 56 doit être inclus dans le contexte amont du widget tree (dans le xbl container ou dans la page xul). 51 57 --> 52 58 <bindings id="treeBindings" … … 889 895 <content orient="horizontal"> 890 896 <xul:hbox class="tree-scrollable-columns" flex="1"> 891 <children includes="treecol|splitter"/> 897 <xul:hbox flex="1" xbl:inherits="minwidth=bodyMinWidth"> 898 <children includes="treecol|splitter"/> 899 </xul:hbox> 892 900 </xul:hbox> 893 901 <xul:treecolpicker class="treecol-image" fixed="true" xbl:inherits="tooltiptext=pickertooltiptext"/> -
trunk/Xul_Commons/modules/scenariCommons/commons/actions.jsm
r14781 r15058 246 246 vAccelKey = this.fAccelKeys[vIdx]; 247 247 if(vAccelKey) { 248 if(vAccelKey.getAction().is Enabled(pActionContext)) {248 if(vAccelKey.getAction().isVisible(pActionContext) && vAccelKey.getAction().isEnabled(pActionContext)) { 249 249 vAccelKey.getAction().execute(pEvent, pActionContext); 250 250 return 2; -
trunk/Xul_Commons/modules/scenariCommons/widgets/jsTree/columns.jsm
r15056 r15058 85 85 }, 86 86 87 getWidth : function(pTreeCols){ 88 return this.fWidth || 0; 89 }, 90 setWidth : function(pWidth){ 91 this.fWidth = pWidth; 92 return this; 93 }, 94 87 95 isHidden : function(pTreeCols){ 88 96 return this.fHidden || false; … … 128 136 vTreeCol.setAttribute("id", this.getId()); 129 137 vTreeCol.setAttribute("label", this.getLabel(pTreeCols)); 130 vTreeCol.setAttribute("flex", this.getFlex(pTreeCols)); 131 if(this.isIgnoreInColumnPicker()) vTreeCol.setAttribute("ignoreincolumnpicker", "true"); 132 if(this.isHidden()) vTreeCol.setAttribute("hidden", "true"); 138 if(this.getFlex(pTreeCols)>0) vTreeCol.setAttribute("flex", this.getFlex(pTreeCols)); 139 if(this.getWidth(pTreeCols)>0) vTreeCol.setAttribute("width", this.getWidth(pTreeCols)); 140 if(this.isIgnoreInColumnPicker(pTreeCols)) vTreeCol.setAttribute("ignoreincolumnpicker", "true"); 141 if(this.isHidden(pTreeCols)) vTreeCol.setAttribute("hidden", "true"); 133 142 vTreeCol.fCellBuilderFactory = this.getCellBuilderFactory(pTreeCols); 134 143 pTreeCols.appendChild(vTreeCol); … … 167 176 } 168 177 } 178 179 /** 180 * Additionne la largeur standard de toutes les colonnes et l'affecte comme 181 * largeur minimale de la zone de contnu de l'arbre forçant l'apparition 182 * d'une scrollbar horizontal si la lergeur du widget tree est insuffisante. 183 * 184 * ATTENTION : pour activer ces fonctionnalités, le css "chrome://scenariCommons/content/widgets/tree/tree.css" 185 * doit être inclus dans le contexte amont du widget tree (dans le xbl container ou dans la page xul). 186 */ 187 columns.computeBodyMinWidth = function(pTreeCols){ 188 var vMinWidth = 0; 189 var vChild = pTreeCols.firstElementChild; 190 while(vChild) { 191 if(vChild.localName=="treecol") { 192 var vW = vChild.getAttribute("width"); 193 if(vW) vMinWidth += parseInt(vW); 194 } 195 vChild = vChild.nextElementSibling; 196 } 197 if(vMinWidth>0) pTreeCols.setAttribute("bodyMinWidth", vMinWidth); 198 }
Note: See TracChangeset
for help on using the changeset viewer.