[elvystrac] r1725 - some changes in layout/category UC's

  • From: elvys@xxxxxxxxxxxxxxxxxxxxxx
  • To: elvystrac@xxxxxxxxxxxxx
  • Date: Mon, 15 Feb 2010 08:21:21 +0100

Author: DavidK
Date: 2010-02-15 08:21:21 +0100 (Mon, 15 Feb 2010)
New Revision: 1725

Added:
   trunk/server/webServer2/WebContent/js/layout/
   trunk/server/webServer2/WebContent/js/layout/layoutSelectAndCloseComp.js
   trunk/server/webServer2/WebContent/secured/components/layout/
   
trunk/server/webServer2/WebContent/secured/components/layout/layoutSelectAndCloseComp.xhtml
   
trunk/server/webServer2/WebContent/styles/components/layout/layoutSelectAndCloseComp.css
Removed:
   
trunk/server/webServer2/WebContent/secured/components/layoutSelectAndCloseComp.xhtml
Modified:
   
trunk/server/webServer2/JavaSource/cz/elvys/webServer/messages/labels_cs.properties
   trunk/server/webServer2/WebContent/WEB-INF/elvystags.xml
   trunk/server/webServer2/WebContent/secured/categrel/editCatDefForm.xhtml
   trunk/server/webServer2/WebContent/secured/categrel/listOfCatDefs.xhtml
   
trunk/server/webServer2/WebContent/secured/components/layoutListComponent.xhtml
Log:
some changes in layout/category UC's

Modified: 
trunk/server/webServer2/JavaSource/cz/elvys/webServer/messages/labels_cs.properties
===================================================================
--- 
trunk/server/webServer2/JavaSource/cz/elvys/webServer/messages/labels_cs.properties
 2010-02-14 22:16:40 UTC (rev 1724)
+++ 
trunk/server/webServer2/JavaSource/cz/elvys/webServer/messages/labels_cs.properties
 2010-02-15 07:21:21 UTC (rev 1725)
@@ -127,7 +127,7 @@
 layout.list.modified=Modifikov\u00E1no
 layout.list.created=Vytvo\u0159eno
 layout.list.preview=N\u00E1hled
-layout.list.previewtooltip=Zobraz\u00ED n\u00E1hled rozvr\u017Een\u00ED 
dokument\u016F
+layout.list.previewtooltip=Zobrazit n\u00E1hled
 layout.list.newlayouttooltip=Nov\u00E9 rozvr\u017Een\u00ED
 layout.list.operations=Operace
 layout.list.editlayouttooltip=Editovat
@@ -141,7 +141,6 @@
 layout.edit.header=Editor rozvr\u017Een\u00ED
 layout.create.header=Editor rozvr\u017Een\u00ED
 layout.modalselectcomp.header=Rozvr\u017Een\u00ED obrazovky
-layout.modalselectcomp.list.header=Zvolte rozvr\u017Een\u00ED obrazovky
 layout.modalselectcomp.list.select.tooltip=Zvolit rozvr\u017Een\u00ED obrazovky
 
 
@@ -150,14 +149,13 @@
 catdef.list.body.name=Jm\u00E9no kategorie
 catdef.list.body.created=Vytvo\u0159eno
 catdef.list.body.layout.name=Jm\u00E9no rozvr\u017Een\u00ED
-catdef.list.body.layout.preview=Schema
-catdef.list.body.layout.preview.tooltip=Uk\u00E1\u017Ee schematick\u00FD 
n\u00E1kres rozvr\u017Een\u00ED obrazovky
+catdef.list.body.layout.preview=N\u00E1kres
+catdef.list.body.layout.preview.tooltip=Uk\u00E1zat n\u00E1kres 
rozvr\u017Een\u00ED obrazovky
 catdef.list.body.usage=Pou\u017Eito
-catdef.list.body.edit=Editace
-catdef.list.body.edit.tooltip=Umo\u017En\u00ED zm\u011Bnit parametry dan\u00E9 
kategorie
-catdef.list.body.delete=Odstran\u011Bn\u00ED
-catdef.list.body.delete.tooltip=Odstran\u00ED dan\u00E9 rozvr\u017Een\u00ED. 
M\u016F\u017Ee zas\u00E1hnout do pl\u00E1nov\u00E1n\u00ED, kter\u00E1 tuto 
kategorii pou\u017E\u00EDvaj\u00ED\!
-catdef.list.body.create.tooltip=Vytvo\u0159\u00ED novou kategorii
+catdef.list.body.operations=Operace
+catdef.list.body.edit.tooltip=Editovat
+catdef.list.body.delete.tooltip=Odstranit
+catdef.list.body.create.tooltip=Vytvo\u0159it novou kategorii
 catdef.list.body.delete.modal.deletequestion=Chcete opravdu odstranit tuto 
kategorii ze syst\u00E9mu?
 catdef.list.body.delete.modal.deletecaution=Dan\u00E1 kategorie je 
p\u0159i\u0159azena k jednomu \u010Di v\u00EDce kiosk\u016Fm. Ve\u0161ker\u00E1 
data napl\u00E1novan\u00E1 na tyto p\u0159i\u0159azen\u00E9 kategorie budou 
smaz\u00E1na.
 catdef.list.body.delete.modal.deletecaution.line2=Opravdu smazat danou 
kategorii?

Modified: trunk/server/webServer2/WebContent/WEB-INF/elvystags.xml
===================================================================
--- trunk/server/webServer2/WebContent/WEB-INF/elvystags.xml    2010-02-14 
22:16:40 UTC (rev 1724)
+++ trunk/server/webServer2/WebContent/WEB-INF/elvystags.xml    2010-02-15 
07:21:21 UTC (rev 1725)
@@ -56,7 +56,7 @@
        </tag>
        <tag>
                <tag-name>layoutSelectAndCloseComp</tag-name>
-               
<source>../secured/components/layoutSelectAndCloseComp.xhtml</source>
+               
<source>../secured/components/layout/layoutSelectAndCloseComp.xhtml</source>
        </tag>
        <tag>
                <tag-name>layoutSelectAndCloseTagHandler</tag-name>

Added: trunk/server/webServer2/WebContent/js/layout/layoutSelectAndCloseComp.js
===================================================================
Modified: 
trunk/server/webServer2/WebContent/secured/categrel/editCatDefForm.xhtml
===================================================================
--- trunk/server/webServer2/WebContent/secured/categrel/editCatDefForm.xhtml    
2010-02-14 22:16:40 UTC (rev 1724)
+++ trunk/server/webServer2/WebContent/secured/categrel/editCatDefForm.xhtml    
2010-02-15 07:21:21 UTC (rev 1725)
@@ -47,7 +47,7 @@
                                        <h:outputText 
vlaue="#{lbl['catdef.edit.form.layout.preview']}: " />
                                        <a4j:commandButton 
id="ShowLayoutPreviewButton"
                                                        
reRender="LayoutPreviewContent"
-                                                       
onclick="Richfaces.showModalPanel('LayoutPreviewModalWin',{left:50, top:50})"
+                                                       
onclick="Richfaces.showModalPanel('LayoutPreviewModalWin')"
                                                        
image="/images/icons/detail.png">
                                                        
<f:setPropertyActionListener value="#{catDefEditBean.selectedLayout.id}"
                                                                
target="#{layoutPreviewModalBean.layoutId}" />
@@ -66,7 +66,7 @@
                                <a4j:commandButton 
                                        id="SetLayoutButton"
                                        image="/images/icons/edit.png"
-                                       
onclick="Richfaces.showModalPanel('SetLayoutModalWindow',{left:10, top:10})"
+                                       
onclick="Richfaces.showModalPanel('SetLayoutModalWindow')"
                                        reRender="SetLayoutModalWindowContent, 
layoutListComponent">
                                </a4j:commandButton>
                        </h:panelGroup>

Modified: 
trunk/server/webServer2/WebContent/secured/categrel/listOfCatDefs.xhtml
===================================================================
--- trunk/server/webServer2/WebContent/secured/categrel/listOfCatDefs.xhtml     
2010-02-14 22:16:40 UTC (rev 1724)
+++ trunk/server/webServer2/WebContent/secured/categrel/listOfCatDefs.xhtml     
2010-02-15 07:21:21 UTC (rev 1725)
@@ -30,7 +30,9 @@
                                        <!-- CREATED DATE -->
                                        <rich:column sortBy="#{catDef.created}">
                                                <f:facet 
name="header">#{lbl['catdef.list.body.created']}</f:facet>
-                                               <h:outputText 
value="#{catDef.created}"/>
+                                               <h:outputText 
value="#{catDef.created}">
+                                                       <f:convertDateTime 
pattern="dd.MM.yyyy HH:mm" timeZone="#{user.defaultTimezone}" type="both" 
timeStyle="short"/>
+                                               </h:outputText>
                                        </rich:column>
                                        
                                        <!-- LAYOUT NAME -->
@@ -44,7 +46,7 @@
                                                <f:facet 
name="header">#{lbl['catdef.list.body.layout.preview']}</f:facet>
                                                <a4j:commandButton 
id="ShowLayoutPreviewButton"
                                                                
reRender="LayoutPreviewContent"
-                                                               
onclick="Richfaces.showModalPanel('LayoutPreviewModalWin',{left:50, top:50})"
+                                                               
onclick="Richfaces.showModalPanel('LayoutPreviewModalWin')"
                                                                
image="/images/icons/detail.png">
                                                                
<f:setPropertyActionListener value="#{catDef.layout.id}"
                                                                        
target="#{layoutPreviewModalBean.layoutId}" />

Added: 
trunk/server/webServer2/WebContent/secured/components/layout/layoutSelectAndCloseComp.xhtml
===================================================================
--- 
trunk/server/webServer2/WebContent/secured/components/layout/layoutSelectAndCloseComp.xhtml
                         (rev 0)
+++ 
trunk/server/webServer2/WebContent/secured/components/layout/layoutSelectAndCloseComp.xhtml
 2010-02-15 07:21:21 UTC (rev 1725)
@@ -0,0 +1,111 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+<ui:component xmlns="http://www.w3.org/1999/xhtml";
+       xmlns:h="http://java.sun.com/jsf/html";
+       xmlns:f="http://java.sun.com/jsf/core";
+       xmlns:ui="http://java.sun.com/jsf/facelets";
+       xmlns:a4j="http://richfaces.org/a4j";
+       xmlns:rich="http://richfaces.org/rich";
+       xmlns:elvys="http://www.elvys.farm.particle.cz";>
+<!-- PROTOCOL
+INPUT:
+ |- REQUIRED modalWinId
+ |             id of modal window - used for invoking window-opening 
javascript from outside
+ |- REQUIRED modalWinContentId
+ |             id of modal window content - used for addressing rerender
+ |- REQUIRED target 
+ |      bean property of layout type which selected layout will be assign to
+ |- listeners
+ |             comma separated list of listeners which will be called on the
+ |             close of modal window
+ |- toRerender
+               comma separed list of componentIds which will be rerender on 
close of component modal window
+
+PRENOTE:
+       after loss, the session-scope bean was used..
+       if you want to change back to request-scope, uncomment <h:inputHidden 
and <elvys:elvysSettingInitTagHandler here in document and enjoy debugging 
+
+NOTE:
+
+ -->
+ 
+<a4j:loadStyle src="/styles/components/layout/layoutSelectAndCloseComp.css"/>
+<script type="text/javascript" language="javascript" 
src="/webServer2/js/components/layout/layoutSelectAndCloseComp.js"/> 
+ 
+ 
+ 
+       <!-- must be, because of setting listener called on close of modal win 
-->
+       <!-- on close of the modal win is also when selecting some layout from 
the list -->
+       <elvys:layoutSelectAndCloseTagHandler 
+               listeners="#{listeners}"/>
+       
+       <!-- MODAL WINDOW -->
+       <rich:modalPanel id="#{modalWinId}" autosized="true" 
+               minHeight="200" 
+               minWidth="200" zindex="2000">
+               <f:facet name="header">
+               <h:outputText value="#{lbl['layout.modalselectcomp.header']}" />
+       </f:facet>
+               <rich:panel 
+                       id="#{modalWinContentId}"
+                       styleClass="modal-layout-list-win" >
+               <h:panelGroup style="overflow:auto; display: block;">
+               
+                       <!--   REGION  -->
+                       <h:panelGroup id="layoutInfos" style="float: right; 
width: 50%;">
+                               <h:form id="listOfLayoutsForm" style="overflow: 
auto;">
+                                       
+                                       <!--  CLOSE BUTTON -->
+                                       <a4j:commandButton
+                                               id="elvysSettingCloseButton" 
+                                               reRender="#{toRerender}, 
#{modalWinContentId}"
+                                               
onclick="Richfaces.hideModalPanel('#{modalWinId}')"
+                                               
actionListener="#{layoutSelectAndCloseCompBean.doActionsOnClose}"
+                                               image="/images/icons/close.gif" 
+                                               style="position: absolute; 
right: -10px; top: -28px;" />
+                                       
+                                       <h:commandButton
+                                               id="elvysSettingCloseFireMaker"
+                                               
onclick="document.getElementById('listOfLayoutsForm:elvysSettingCloseButton').click();"
+                                               image="/images/icons/close.gif" 
style="float: right;" rendered="false" />
+                                                                               
        
+                                               <!--
+                                                       don't need anymore, 
session scope bean used for elvysSettingBean 
+                                                       <h:inputHidden 
id="keepElvysIdAlive" value="#{elvysSettingBean.elvysId}"/> 
+                                               -->
+                                               
+                                               <br/>
+                                       
+                               </h:form>
+                       </h:panelGroup>
+                       
+                       
+                       <!--  LIST WITH LAYOUTS -->
+                       <h:panelGroup id="LayoutListComponentArea" 
styleClass="layout-list-component">
+                               <elvys:layoutListComponent 
id="layoutListComponent" 
+                               companyID="#{user.companyID}" 
+                               notSelectLayouts=""     
+                               showSchema="true"
+                               showEdit="false"
+                               showDelete="false"
+                               showNew="false"
+                               
chooseListener1="layoutSelectAndCloseCompBean.doActionsOnClose"
+                               target1="#{target}"
+                               toRerender1="#{toRerender}, 
#{modalWinContentId}"
+                               
jsOnClick1="alert('lili');Richfaces.hideModalPanel('#{modalWinId}')"
+                               
chListenerTooltip1="#{lbl['layout.modalselectcomp.list.select.tooltip']}"/>
+                       </h:panelGroup>
+               </h:panelGroup>
+       </rich:panel>
+       </rich:modalPanel>
+       
+       
+       
+       
+       <elvys:layoutPreviewModal
+               modalWinId="ModalWin"
+               contentId="ModalImageContent"
+               toRerender="#{modalWinContentId}, layoutListComponent"
+       />
+       
+       
+</ui:component>
\ No newline at end of file

Modified: 
trunk/server/webServer2/WebContent/secured/components/layoutListComponent.xhtml
===================================================================
--- 
trunk/server/webServer2/WebContent/secured/components/layoutListComponent.xhtml 
    2010-02-14 22:16:40 UTC (rev 1724)
+++ 
trunk/server/webServer2/WebContent/secured/components/layoutListComponent.xhtml 
    2010-02-15 07:21:21 UTC (rev 1725)
@@ -33,6 +33,8 @@
  |- chooseListener1
  |- target1
  |- toRerender1
+ |- jsOnClick1
+ |- jsOnComplete1
  |- chListenerTooltip1
  |
  | -||- for #2
@@ -70,7 +72,10 @@
        <h:form id="LayoutListForm" style="overflow:auto">
                <h:panelGroup style="border: solid 1px black; padding: 0px; 
display: block; overflow: auto; float: left;">
                        <rich:dataTable id="#{id}"
-                               value="#{layoutListComponentBean.layoutsList}" 
var="layout" rows="10">
+                               width="700px"
+                               value="#{layoutListComponentBean.layoutsList}" 
+                               var="layout" 
+                               rows="10">
                                <h:column>
                                        <f:facet 
name="header">#{lbl['layout.list.id']}</f:facet>
                                        <h:outputText value="#{layout.id}" />
@@ -126,7 +131,9 @@
                                                        rendered="#{not empty 
chooseListener1}">
                                                        <a4j:commandButton 
id="ChooseButton1"
                                                                
image="/images/icons/select.png"
-                                                               
reRender="#{toRerender1}">
+                                                               
reRender="#{toRerender1}"
+                                                               
onclick="#{jsOnClick1}"
+                                                               
oncomplete="#{jsOnComplete1}">
                                                                
<f:setPropertyActionListener value="#{layout}"
                                                                
target="#{target1}" />
                                                                
<f:setPropertyActionListener value="#{chooseListener1}"
@@ -142,7 +149,9 @@
                                                        rendered="#{not empty 
chooseListener2}">
                                                        <a4j:commandButton 
id="ChooseButton2"
                                                                
image="/images/icons/select.png"
-                                                               
reRender="#{toRerender2}">
+                                                               
reRender="#{toRerender2}"
+                                                               
onclick="#{jsOnClick2}"
+                                                               
oncomplete="#{jsOnComplete2}">
                                                                
<f:setPropertyActionListener value="#{layout}"
                                                                
target="#{target2}" />
                                                                
<f:setPropertyActionListener value="#{chooseListener2}"

Deleted: 
trunk/server/webServer2/WebContent/secured/components/layoutSelectAndCloseComp.xhtml
===================================================================
--- 
trunk/server/webServer2/WebContent/secured/components/layoutSelectAndCloseComp.xhtml
        2010-02-14 22:16:40 UTC (rev 1724)
+++ 
trunk/server/webServer2/WebContent/secured/components/layoutSelectAndCloseComp.xhtml
        2010-02-15 07:21:21 UTC (rev 1725)
@@ -1,110 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
-<ui:component xmlns="http://www.w3.org/1999/xhtml";
-       xmlns:h="http://java.sun.com/jsf/html";
-       xmlns:f="http://java.sun.com/jsf/core";
-       xmlns:ui="http://java.sun.com/jsf/facelets";
-       xmlns:a4j="http://richfaces.org/a4j";
-       xmlns:rich="http://richfaces.org/rich";
-       xmlns:elvys="http://www.elvys.farm.particle.cz";>
-<!-- PROTOCOL
-INPUT:
- |- REQUIRED modalWinId
- |             id of modal window - used for invoking window-opening 
javascript from outside
- |- REQUIRED modalWinContentId
- |             id of modal window content - used for addressing rerender
- |- REQUIRED target 
- |      bean property of layout type which selected layout will be assign to
- |- listeners
- |             comma separated list of listeners which will be called on the
- |             close of modal window
- |- toRerender
-               comma separed list of componentIds which will be rerender on 
close of component modal window
-
-PRENOTE:
-       after loss, the session-scope bean was used..
-       if you want to change back to request-scope, uncomment <h:inputHidden 
and <elvys:elvysSettingInitTagHandler here in document and enjoy debugging 
-
-NOTE:
-
- -->
- 
-       <!-- must be, because of setting listener called on close of modal win 
-->
-       <!-- on close of the modal win is also when selecting some layout from 
the list -->
-       <elvys:layoutSelectAndCloseTagHandler 
-               listeners="#{listeners}"/>
-       
-       <!-- MODAL WINDOW -->
-       <rich:modalPanel id="#{modalWinId}" minHeight="100" 
-               minWidth="200" height="500" width="800" zindex="2000">
-               <f:facet name="header">
-               <h:outputText value="#{lbl['layout.modalselectcomp.header']}" />
-       </f:facet>
-               <rich:panel 
-                       id="#{modalWinContentId}"
-                       style="left:1%; width: 98%; height: 98%;" >
-               <h:panelGroup style="overflow:auto; display: block;">
-               
-                       <!--  DAY/NIGHT REGION  -->
-                       <h:panelGroup id="layoutInfos" style="float: right; 
width: 50%;">
-                               <h:form id="listOfLayoutsForm" style="overflow: 
auto;">
-                                       
-                                       <!--  CLOSE BUTTON -->
-                                       <a4j:commandButton
-                                               id="elvysSettingCloseButton" 
-                                               reRender="#{toRerender}, 
#{modalWinContentId}"
-                                               
onclick="Richfaces.hideModalPanel('#{modalWinId}')"
-                                               
actionListener="#{layoutSelectAndCloseCompBean.doActionsOnClose}"
-                                               image="/images/icons/close.gif" 
-                                               style="position: absolute; 
right: -10px; top: -28px;" />
-                                       
-                                       <h:commandButton
-                                               id="elvysSettingCloseFireMaker"
-                                               
onclick="document.getElementById('listOfLayoutsForm:elvysSettingCloseButton').click();"
-                                               image="/images/icons/close.gif" 
style="float: right;" rendered="false" />
-                                                                               
        
-                                               <!--
-                                                       don't need anymore, 
session scope bean used for elvysSettingBean 
-                                                       <h:inputHidden 
id="keepElvysIdAlive" value="#{elvysSettingBean.elvysId}"/> 
-                                               -->
-                                               
-                                               <br/>
-                                               
-                                               <!--  DAY LAYOUT -->
-                                               
-                                               
-                                       
-                               </h:form>
-                       </h:panelGroup>
-                       
-                       
-                       <!--  LIST WITH LAYOUTS -->
-                       <h:panelGroup id="OtherLayouts" style="float: left; 
height: 400px; width:50%">
-                               <h:outputText 
value="#{lbl['layout.modalselectcomp.list.header']}:" />
-                               
-                               <elvys:layoutListComponent 
id="layoutListComponent" 
-                               companyID="#{user.companyID}" 
-                               notSelectLayouts=""     
-                               showSchema="true"
-                               showEdit="false"
-                               showDelete="false"
-                               showNew="false"
-                               
chooseListener1="layoutSelectAndCloseCompBean.doActionsOnClose"
-                               target1="#{target}"
-                               toRerender1="#{modalWinContentId}"
-                               
chListenerTooltip1="#{lbl['layout.modalselectcomp.list.select.tooltip']}"/>
-                       </h:panelGroup>
-               </h:panelGroup>
-       </rich:panel>
-       </rich:modalPanel>
-       
-       
-       
-       
-       <elvys:layoutPreviewModal
-               modalWinId="ModalWin"
-               contentId="ModalImageContent"
-               toRerender="#{modalWinContentId}, layoutListComponent"
-       />
-       
-       
-</ui:component>
\ No newline at end of file

Added: 
trunk/server/webServer2/WebContent/styles/components/layout/layoutSelectAndCloseComp.css
===================================================================
--- 
trunk/server/webServer2/WebContent/styles/components/layout/layoutSelectAndCloseComp.css
                            (rev 0)
+++ 
trunk/server/webServer2/WebContent/styles/components/layout/layoutSelectAndCloseComp.css
    2010-02-15 07:21:21 UTC (rev 1725)
@@ -0,0 +1,24 @@
+.modal-layout-list-win {
+       left: 1%;
+       width: 98%; 
+       height: 98%;
+       display: block;
+}
+
+.modal-layout-list {
+
+
+}
+
+.close-button {
+       position: absolute;
+       right: -15px;
+       top: -30px;
+}
+
+
+.layout-list-component {
+       float: left;
+       width: 800px;
+       height: 600px;  
+}
\ No newline at end of file


Other related posts:

  • » [elvystrac] r1725 - some changes in layout/category UC's - elvys