Changeset 19671


Ignore:
Timestamp:
02/07/12 15:05:14 (4 months ago)
Author:
anp
Message:

taskEditor : debug F5

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs/sm_simpleTask/mainview.xul.xsl

    r19654 r19671  
    6060                        <script src="chrome://scenariWsp/content/windows/contentView/mainview.init.js"/> 
    6161                        <script src="chrome://scenariXedLib/content/core/xed.js"/> 
    62                         <script>Components.utils.import("chrome://scenariCollab/content/utils/task.jsm");</script> 
    63                         <taskBox title="{resultatAgent('//nameTask')}" 
     62                        <script><![CDATA[ 
     63                                Components.utils.import("chrome://scenariCollab/content/utils/task.jsm"); 
     64                                 
     65                                var vTaskBox = document.getElementById("taskBox"); 
     66                                 
     67                                // Surcharge de cette action pour réinitialisation correcte de la taskBox (bug reload datepicker) 
     68                                var actionRefreshTask = new actions.Action("actionRefreshTask").setGroup("admin").setLabel("Recharger la fenêtre"); 
     69                                actionRefreshTask.execute = function(pEvent, pContext) { 
     70                                        try { 
     71                                                var vTaskBox = pContext.window.document.getElementById("taskBox"); 
     72                                                if(vTaskBox && pContext.window.desk && pContext.window.desk.canCloseDesk && pContext.window.desk.canCloseDesk()) { 
     73                                                        vTaskBox.reload(); 
     74                                                } 
     75                                        }catch(e){log.debug(e);} 
     76                                }; 
     77                                extPoints.registerSvcByInst("actionRefreshWin", 21, actionRefreshTask); 
     78                        ]]></script> 
     79                        <taskBox id="taskBox" 
     80                                         title="{resultatAgent('//nameTask')}" 
    6481                                         taskCode="{resultatAgent('//codeTask')}" 
    6582                                         editorKey=""> 
  • trunk/Xul_Wsp/content/Collab/widgets/taskBox/taskBox.xbl.xml

    r19656 r19671  
    8383                        <constructor> 
    8484                                try{ 
    85                                         this._IsEditorInited = false; 
    8685                                        this.reload(); 
    8786                                        //Reception des events externes 
     
    122121                        <method name="reload"> 
    123122                                <body><![CDATA[@xmlCdata.jsStr 
    124                                         this._IsEditorInited = false; 
    125                                         this.xOnInputClean(); 
    126                                         if(src.isNewSrcUri(this.uriObject.getSrcUri())) { 
    127                                                 this.fSaveBtn.setAttribute("tooltiptext", "Créer"); 
    128                                                 this.xLaunchEditor(); 
    129                                         } else { 
    130                                                 this.fSaveBtn.setAttribute("tooltiptext", "Modifier"); 
    131                                                 this.fCancelBtn.hidden = false; 
    132                                                 function onContentLoaded(pEvent){ 
    133                                                         try { 
    134                                                                 this._DomContent = pEvent.target.responseXML; 
    135                                                                 this.xLaunchEditor(); 
    136                                                         }catch(e){log.debug(e);} 
    137                                                 } 
    138  
    139                                                 this.uriObject.loadDomContent(null, onContentLoaded.bind(this)); 
     123                                        if(!("_IsEditorInited" in this) || this._IsEditorInited){ 
     124                                                this._IsEditorInited = false; 
     125                                                this.xOnInputClean(); 
     126                                                if(src.isNewSrcUri(this.uriObject.getSrcUri())) { 
     127                                                        this.fSaveBtn.setAttribute("tooltiptext", "Créer"); 
     128                                                        this.xLaunchEditor(); 
     129                                                } else { 
     130                                                        this.fSaveBtn.setAttribute("tooltiptext", "Modifier"); 
     131                                                        this.fCancelBtn.hidden = false; 
     132                                                        function onContentLoaded(pEvent){ 
     133                                                                try { 
     134                                                                        this._DomContent = pEvent.target.responseXML; 
     135                                                                        this.xLaunchEditor(); 
     136                                                                }catch(e){log.debug(e);} 
     137                                                        } 
     138         
     139                                                        this.uriObject.loadDomContent(null, onContentLoaded.bind(this)); 
     140                                                } 
    140141                                        } 
    141142                        ]]></body> 
     
    265266                                this.xOnInputDirty(); 
    266267                        </handler> 
     268                        <!-- 
    267269                        <handler event="XEDStatusDirty"><![CDATA[ 
    268270                                window.fNeedSave = true; 
     
    271273                                window.fNeedSave = false; 
    272274                        ]]></handler> 
     275                        --> 
    273276                </handlers> 
    274277        </binding> 
Note: See TracChangeset for help on using the changeset viewer.