Changeset 15019
- Timestamp:
- 03/03/10 18:28:52 (2 years ago)
- File:
-
- 1 edited
-
trunk/Xul_Wsp/modules/scenariWsp/commons/src.jsm (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Xul_Wsp/modules/scenariWsp/commons/src.jsm
r14773 r15019 39 39 40 40 /** 41 * Propri étés et fonctions relatives àl'API Src (uri, paths, id...).41 * Propriétés et fonctions relatives à l'API Src (uri, paths, id...). 42 42 */ 43 43 const EXPORTED_SYMBOLS = ["src"]; … … 61 61 62 62 /** 63 * Ajoute un élément fils àune uri et retourne la nouvelle Uri.63 * Ajoute un élément fils à une uri et retourne la nouvelle Uri. 64 64 */ 65 65 src.addLeafToUri = function(pUriParent, pLeafName){ … … 80 80 81 81 /** 82 * Retourne l' élément terminal d'une Uri.82 * Retourne l'élément terminal d'une Uri. 83 83 */ 84 84 src.getLeafFromUri = function(pUri){ … … 92 92 93 93 /** 94 * pAncestorUri est-elle un anc être de pUri.94 * pAncestorUri est-elle un ancêtre de pUri. 95 95 * Si pAncestorUri==pUri retourne false. 96 96 */ … … 115 115 return pSrcPath ? /^id\:/.test(pSrcPath) : false; 116 116 } 117 118 /** 119 * Enrichit les fields définissant le contenu du shortDesc. 120 * 121 * @param pExtPoints extPoints à modifier 122 * @param pFields Tableau Js de fields 123 */ 124 src.appendShortDescFields = function(pExtPoints, pFields){ 125 const PREF = "srcShortDesc.fields"; 126 var vFields = pExtPoints.getPref(PREF); 127 if(vFields) { 128 var vLevel = pExtPoints.getPrefLevel(PREF); 129 var vCurrentFields = vFields.split("*"); 130 for(var i = 0; i < pFields.length; i++) { 131 if(vCurrentFields.indexOf(pFields[i]) < 0) { 132 vCurrentFields.push(pFields[i]); 133 } 134 } 135 pExtPoints.setPrefFromXpcom(PREF, vLevel+1, vCurrentFields.join("*")); 136 } else { 137 pExtPoints.setPrefFromXpcom(PREF, 1, pFields.join("*")); 138 } 139 }
Note: See TracChangeset
for help on using the changeset viewer.