Changeset 19633


Ignore:
Timestamp:
02/02/12 23:25:01 (4 months ago)
Author:
anp
Message:

mainview des task : ajout de @closed[true|false] sur viewWidget, commentWidget, description widget

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Wsp_Modeling/es/content/collab/simpleTask/xml.xed.xml

    r19545 r19633  
    4949                <attribute se:id="att_position" se:name="position" se:bind="attribute" tooltiptext="Positions par défaut : creators(100), executors(200), followers(300), label(400), stage(500), deadline(600), description(700), comment(800)."> 
    5050                        <wordsInput trim="true" validRegExp="^[0-9]+$" frenchPonct="false"/> 
     51                </attribute> 
     52                <attribute se:id="att_closed" se:name="closed" se:bind="attribute"> 
     53                        <choiceInput> 
     54                                <ciItem label="true"/> 
     55                                <ciItem label="false"/> 
     56                        </choiceInput> 
    5157                </attribute> 
    5258        </se:lib> 
     
    359365                                                                                                        <se:ref se:refid="att_position"/> 
    360366                                                                                                        <se:ref se:refid="att_display"/> 
     367                                                                                                        <se:ref se:refid="att_closed"/> 
    361368                                                                                                </atts> 
    362369                                                                                                <childs> 
     
    386393                                                                                                        </attribute> 
    387394                                                                                                        <se:ref se:refid="att_position"/> 
     395                                                                                                        <se:ref se:refid="att_closed"/> 
    388396                                                                                                </atts> 
    389397                                                                                                <childs> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs/sm_simpleTask.xml

    r19571 r19633  
    326326                                                <xsl:value-of select="chaineProtegeJs(si($pFormWidget[@name], $pFormWidget/@name, @name))"/> 
    327327                                                <xsl:text>")</xsl:text> 
     328                                                <!-- @display --> 
    328329                                                <xsl:choose> 
    329330                                                        <xsl:when test="$pFormWidget/@display='none'">.setVisible(false)</xsl:when> 
    330331                                                        <xsl:when test="$pFormWidget/@display='readOnly'">.setReadOnly(true)</xsl:when> 
    331332                                                </xsl:choose> 
     333                                                <!-- @closed --> 
     334                                                <xsl:if test="$pFormWidget/@closed">.setClosed(<xsl:value-of select="$pFormWidget/@closed='true'"/>)</xsl:if> 
     335                                                <!-- sm:perms --> 
    332336                                                <!-- TODO perms  
    333337                                                .addWritePermName() 
  • trunk/Xul_Core/content/Core/widgets/jsForm/jsForm.xbl.css

    r19438 r19633  
    211211    padding: 3px 3px 6px; 
    212212} 
     213 
     214/* elements collapsables */ 
     215*[closed] label[anonid=label]{ 
     216        -moz-padding-start : 18px; 
     217        background-repeat: no-repeat; 
     218        -moz-user-select: element; 
     219} 
     220 
     221*[closed=true] label[anonid=label]{ 
     222        background-image: url("chrome://scenariCore/content/widgets/jsForm/img/right-button.png"); 
     223} 
     224*[closed=false] label[anonid=label]{ 
     225        background-image: url("chrome://scenariCore/content/widgets/jsForm/img/down-button.png"); 
     226} 
     227 
     228*[closed=true] .maskIfClosed{ 
     229        visibility: collapse; 
     230} 
  • trunk/Xul_Wsp/content/Collab/widgets/jsForm/taskInputs.jsm

    r19549 r19633  
    6868} 
    6969taskInputs.DescriptionInputArea.prototype = { 
    70         __proto__ : wspJsForm.XedInputArea.prototype 
     70        __proto__ : wspJsForm.XedInputArea.prototype, 
     71        setClosed: function(pValue) { 
     72                this._closedStatus = pValue; 
     73                return this; 
     74        }, 
     75        buildBody: function(pDomParentElt, pContext){ 
     76                var vInput = wspJsForm.XedInputArea.prototype.buildBody.call(this, pDomParentElt, pContext); 
     77                if("_closedStatus" in this) vInput.setAttribute("closed", this._closedStatus); 
     78                return vInput; 
     79        } 
    7180} 
    7281 
     
    8291                if(src.isNewSrcUri(pContext.shortDesc.srcUri)) return false; 
    8392                return wspJsForm.XedInputArea.prototype.isVisible.call(this, pContext); 
     93        }, 
     94        setClosed: function(pValue) { 
     95                this._closedStatus = pValue; 
     96                return this; 
     97        }, 
     98        buildBody: function(pDomParentElt, pContext){ 
     99                var vInput = wspJsForm.XedInputArea.prototype.buildBody.call(this, pDomParentElt, pContext); 
     100                if("_closedStatus" in this) vInput.setAttribute("closed", this._closedStatus); 
     101                return vInput; 
    84102        } 
    85103} 
     
    98116                return this; 
    99117        }, 
    100  
    101118        isVisible : function(pContext) { 
    102119                if(src.isNewSrcUri(pContext.shortDesc.srcUri)) return false; 
    103120                return jsForm.InputArea.prototype.isVisible.call(this, pContext); 
    104121        }, 
    105          
     122        setClosed: function(pValue) { 
     123                this._closedStatus = pValue; 
     124                return this; 
     125        }, 
    106126        buildBody: function(pDomParentElt, pContext){ 
    107127                var vInput = this.buildBaseBody(pDomParentElt, pContext); 
    108128                vInput.setAttribute("genCd", this.fGenCd); 
     129                if("_closedStatus" in this) vInput.setAttribute("closed", this._closedStatus); 
    109130                return vInput; 
    110131        } 
    111  
    112132} 
    113133 
  • trunk/Xul_Wsp/content/Collab/widgets/jsForm/taskInputs.xbl.xml

    r19549 r19633  
    298298        --> 
    299299        <binding id="generatorView"> 
     300                <resources> 
     301                        <stylesheet src="chrome://scenariCore/content/widgets/jsForm/jsForm.xbl.css"/> 
     302                </resources> 
    300303                <content orient="vertical"> 
    301                                 <xul:label anonid="label" xbl:inherits="value=label"/> 
    302                                 <xul:iframe anonid="genView" flex="1"/> 
     304                        <xul:label anonid="label" xbl:inherits="value=label" onclick="document.getBindingParent(this).toggleOpenState()"/> 
     305                        <xul:iframe anonid="genView" class="maskIfClosed" flex="1"/> 
    303306                </content> 
    304307                <implementation> 
     
    310313                                                var vUrl = "/u/itemDynGen/"+ encodeURIComponent(vUriObject.getWspCd()) + "/" + this.getAttribute("genCd") + "/refUri'" + encodeURIComponent(pContext.shortDesc.srcId) + "'/co"; 
    311314                                                var vIframe = document.getAnonymousElementByAttribute(this, "anonid", "genView"); 
     315                                                vIframe.addEventListener("underflow", function(pEvent) { 
     316                                                        vIframe.style.height = pEvent.target.scrollHeight + 'px'; 
     317                                                }.bind(this), true); 
    312318                                                vIframe.setAttribute("src", vUriObject.getWsp().getDataProvider().getServiceUrl(vUrl)); 
    313319                                                //window.setTimeout(function(){log.info("log::::::::::::::\n"+log.getXml(vIframe.contentDocument));}, 2000); 
     
    315321                                                this.hidden = true; 
    316322                                        } 
     323                                ]]></body>  
     324                        </method> 
     325                         
     326                        <method name="toggleOpenState"> 
     327                                <body><![CDATA[ 
     328                                        if(this.hasAttribute("closed")) this.setAttribute("closed", this.getAttribute("closed")!='true'); 
    317329                                ]]></body> 
    318330                        </method> 
  • trunk/Xul_Wsp/content/Collab/widgets/taskBox/taskBox.css

    r19630 r19633  
    4343.startBox{ 
    4444        background-color : #d4dbed; 
    45         width : 30px; 
     45        width : 35px; 
    4646        box-shadow: 0px 0px 5px 0px #777777; 
    4747        margin-right : 5px; 
     
    5353        width : 2px; 
    5454        box-shadow: 0px 0px 3px #777777; 
    55         margin-left : 10px;*/ 
     55        margin-left : 10px; 
     56        */ 
    5657} 
    5758 
  • trunk/Xul_Wsp/content/Collab/widgets/taskBox/taskBox.xbl.xml

    r19630 r19633  
    222222                                        this.fCancelBtn.disabled = true; 
    223223                                        this.fReloadBtn.disabled = false; 
    224                                         if(this._NeedSave) { 
     224                                        if(window.fNeedSave) { 
    225225                                                var vEvent = document.createEvent("Events"); 
    226226                                                vEvent.initEvent("XEDStatusNotDirty", true, false); 
    227227                                                this.fJsForm.dispatchEvent(vEvent); 
    228                                                 this._NeedSave = false; 
     228                                                window.fNeedSave = false; 
    229229                                        } 
    230230                        ]]></body> 
     
    241241                                                vEvent.initEvent("XEDStatusDirty", true, false); 
    242242                                                this.fJsForm.dispatchEvent(vEvent); 
    243                                                 this._NeedSave = true; 
     243                                                window.fNeedSave = true; 
    244244                                        } 
    245245                        ]]></body> 
  • trunk/Xul_Wsp/content/Wsp/widgets/jsForm/wspJsForm.xbl.xml

    r19488 r19633  
    4343        <!-- 
    4444        Input embarquant un XED. 
     45                @closed 
    4546        --> 
    4647        <binding id="xedInput" extends="chrome://scenariCore/content/widgets/jsForm/jsForm.xbl.xml#baseInput"> 
     48                <resources> 
     49                        <stylesheet src="chrome://scenariWsp/content/widgets/jsForm/wspJsForm.xbl.css"/> 
     50                </resources> 
    4751                <content orient="vertical"> 
    48                                 <xul:hbox minheight="25" align="center"> 
    49                                         <xul:label anonid="label" xbl:inherits="value=label"/> 
    50                                         <xul:xedToolBar anonid="toolBar" style="-moz-binding: url(chrome://scenariXedLib/content/libUiBase/widgets/xedUiBase.xbl.xml#xedToolBar);" /> 
    51                                 </xul:hbox> 
    52                                 <xul:editXedBox anonid="xedBox" hideStructBar="true" xmlErrorsAllowed="false" style="-moz-binding: url(chrome://scenariXedLib/content/core/xed.xbl.xml#xedBoxNoScroll);" xbl:inherits="hideStructBar,xmlErrorsAllowed"/> 
     52                        <xul:hbox minheight="25" align="center"> 
     53                                <xul:label anonid="label" xbl:inherits="value=label" onclick="document.getBindingParent(this).toggleOpenState()"/> 
     54                                <xul:xedToolBar anonid="toolBar" style="-moz-binding: url(chrome://scenariXedLib/content/libUiBase/widgets/xedUiBase.xbl.xml#xedToolBar);" /> 
     55                        </xul:hbox> 
     56                        <xul:editXedBox anonid="xedBox" class="maskIfClosed" hideStructBar="true" xmlErrorsAllowed="false" style="-moz-binding: url(chrome://scenariXedLib/content/core/xed.xbl.xml#xedBoxNoScroll);" xbl:inherits="hideStructBar,xmlErrorsAllowed"/> 
    5357                </content> 
    5458                <implementation> 
     
    7882                                ]]></body> 
    7983                        </method> 
     84                         
     85                        <!--  
     86                                ouvre/ferme l'élément 
     87                        --> 
     88                        <method name="toggleOpenState"> 
     89                                <body><![CDATA[ 
     90                                        if(this.hasAttribute("closed")) this.setAttribute("closed", this.getAttribute("closed")!='true'); 
     91                                ]]></body> 
     92                        </method> 
    8093                </implementation> 
    8194                <handlers> 
Note: See TracChangeset for help on using the changeset viewer.