git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube...
authorMárk Mérész <USER\mark.meresz>
Wed, 18 Jul 2018 08:05:41 +0000 (08:05 +0000)
committerMárk Mérész <USER\mark.meresz>
Wed, 18 Jul 2018 08:05:41 +0000 (08:05 +0000)
server/user.jobengine.osgi.server/pages/searchitems.zul
server/user.jobengine.osgi.server/src/user/jobengine/zk/model/SearchModel.java

index 3e1bd3b2d7eea4357e3da96f69bb40a9abb73e1a..59d2e955c3a962271019d6352229bba7e9304132 100644 (file)
@@ -7,8 +7,8 @@
 <zk xmlns:w="http://www.zkoss.org/2005/zk/client">\r
        <!-- csak igy jo a list sebessege -->\r
        <custom-attributes org.zkoss.zul.listbox.rod="true" />\r
-<!--   <custom-attributes org.zkoss.zul.listbox.initRodSize="50" /> -->\r
-<!--   <custom-attributes org.zkoss.zul.listbox.preloadSize="50" /> -->\r
+       <!--    <custom-attributes org.zkoss.zul.listbox.initRodSize="50" /> -->\r
+       <!--    <custom-attributes org.zkoss.zul.listbox.preloadSize="50" /> -->\r
        <style>\r
                .myimg { margin: 5px; border: 1px solid #CFCFCF; } div.z-row-content span { font-family: Tahoma,Arial,serif; } .z-row .z-detail-outer { padding: 3px\r
                6px; } .heavy { font-weight: bold; font-family: Tahoma,Arial,serif; } .ir { font-weight: bold; font-family: Tahoma,Arial,serif; text-color: green; }\r
@@ -56,8 +56,8 @@
 \r
                .type-inlist { width:80px; border-left:1px solid #008AC8; border-bottom:1px solid #008AC8; padding:4px; }\r
 \r
-               .buttonBold{ font-weight:bold; width:200px;} .menuButtons{ display: flex; justify-content: space-between; padding:5px 10px 5px 10px; } .menuButtons\r
-               >button{ width:200px; } .z-messagebox-window{ top:40% !important; width:30% !important; }\r
+               .buttonBold{ font-weight:bold; width:200px;} .menuButtons{ display: flex; justify-content: space-around; padding:5px 20px 5px 20px; } .menuButtons\r
+               >button{ width:200px; } .z-messagebox-window{ top:40% !important; width:30% !important; } .z-toolbar-start{ width:100%; }\r
        </style>\r
        <div id="scdiv" width="100%" height="100%" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('user.jobengine.zk.model.SearchModel')">\r
                <timer id="timer" delay="1" repeats="false" onTimer="@command('uiTick')" />\r
@@ -97,8 +97,7 @@
                                                                </template>\r
                                                        </combobox>\r
                                                        <button hflex="min" image="/img/ic_search_black_18dp.png" onClick="@command('doSearch')" />\r
-                                                       <button dir="reverse" image="/img/baseline_expand_more_black_18dp.png"\r
-                                                               popup="searchSettings, after_start" iconSclass="caret">\r
+                                                       <button dir="reverse" image="/img/baseline_expand_more_black_18dp.png" popup="searchSettings, after_start" iconSclass="caret">\r
                                                        </button>\r
                                                        <menupopup id="searchSettings">\r
                                                                <menuitem label="10 találat oldalanként" value="10" checked="true" onClick="@command('setPageSize', source=self)" />\r
                                                                                                                <label style="font:20px Century Gothic; color:#008AC8;" value="@load(each.item.title)" />\r
                                                                                                        </hlayout>\r
                                                                                                        <html sclass="relevant">\r
+\r
                                                                                                                \r
                                                                                                                <![CDATA[ <div style='width: 90%'>${each.relevant}</div> ]]>\r
                                                                                                                \r
+                                                                                                               \r
                                                                                                        </html>\r
                                                                                                </div>\r
                                                                                        </hlayout>\r
                                                </div>\r
                                        </north>\r
                                        <center border="none">\r
-\r
-                                               <groupbox closable="false" mold="3d" width="100%" height="100%">\r
-                                                       <div width="100%" sclass="menuButtons">\r
-                                                               <toolbar vflex="min" width="100%" style="font-size:8px">\r
-                                                                       <toolbarbutton image="/img/ic_compare_arrows_black_18dp.png" autodisable="self" onClick="@command('showInResults')"\r
-                                                                               disabled="@load(vm.selectedObject eq null)" label="Szinkronizálás" hflex="min" />\r
-                                                                       <toolbarbutton image="/img/ic_shopping_cart_black_18dp.png" autodisable="self" onClick="@command('downloadMedia')"\r
-                                                                               disabled="@load(not vm.hasTSMMediaFile)" hflex="min" label="Visszatöltés" />\r
-                                                                       <toolbarbutton image="/img/baseline_share_black_18dp.png" autodisable="self" onClick="@command('copyMediaIdToClipboard')"\r
-                                                                               disabled="@load(not sessionScope.userPrincipal.editor or sessionScope.userPrincipal.anonymous or vm.selectedObject eq null)" label="Megosztás"\r
-                                                                               hflex="min" />\r
-                                                                       <toolbarbutton image="/img/baseline_edit_black_18dp.png" autodisable="self" onClick="@command('openMetaDataDialog')"\r
-                                                                               disabled="@load(not sessionScope.userPrincipal.editor or sessionScope.userPrincipal.anonymous or vm.selectedObject eq null)" label="Szerkesztés"\r
-                                                                               hflex="min" />\r
+                                               <div height="100%">\r
+                                                               <toolbar width="100%" height="40px" style="font-size:8px">\r
+                                                                       <div sclass="menuButtons">\r
+                                                                               <toolbarbutton image="/img/ic_compare_arrows_black_18dp.png" autodisable="self" onClick="@command('showInResults')"\r
+                                                                                       disabled="@load(vm.selectedObject eq null)" label="Szinkronizálás" />\r
+                                                                               <toolbarbutton image="/img/ic_shopping_cart_black_18dp.png" autodisable="self" onClick="@command('downloadMedia')"\r
+                                                                                       disabled="@load(not vm.hasTSMMediaFile)" label="Visszatöltés" />\r
+                                                                               <toolbarbutton image="/img/baseline_share_black_18dp.png" autodisable="self"\r
+                                                                                       onClick="@command('copyMediaIdToClipboard')"\r
+                                                                                       disabled="@load(not sessionScope.userPrincipal.editor or sessionScope.userPrincipal.anonymous or vm.selectedObject eq null)" label="Megosztás" />\r
+                                                                               <toolbarbutton image="/img/baseline_edit_black_18dp.png" autodisable="self" onClick="@command('openMetaDataDialog')"\r
+                                                                                       disabled="@load(not sessionScope.userPrincipal.editor or sessionScope.userPrincipal.anonymous or vm.selectedObject eq null)" label="Szerkesztés" />\r
+                                                                       </div>\r
                                                                </toolbar>\r
-                                                       </div>\r
-\r
-                                                       <div width="100%" height="90%" style="padding: 4px; overflow:auto; background-color: white">\r
-                                                               <div>\r
-                                                                       <label style="font-size:8pt; color: gray" value="Anyag azonosító" />\r
-                                                                       <div style="margin: 4px">\r
-                                                                               <label value="@load(vm.selectedObject.item.houseId)" />\r
+                                                               <div width="100%" vflex="true" style="padding: 4px; overflow:auto; background-color: white">\r
+                                                                       <div>\r
+                                                                               <label style="font-size:8pt; color: gray" value="Anyag azonosító" />\r
+                                                                               <div style="margin: 4px">\r
+                                                                                       <label value="@load(vm.selectedObject.item.houseId)" />\r
+                                                                               </div>\r
+                                                                               <space bar="false" />\r
                                                                        </div>\r
-                                                                       <space bar="false" />\r
-                                                               </div>\r
-                                                               <div>\r
-                                                                       <label style="font-size:8pt; color: gray" value="Anyag címe" />\r
-                                                                       <div style="margin: 4px">\r
-                                                                               <label value="@load(vm.selectedObject.item.title)" />\r
+                                                                       <div>\r
+                                                                               <label style="font-size:8pt; color: gray" value="Anyag címe" />\r
+                                                                               <div style="margin: 4px">\r
+                                                                                       <label value="@load(vm.selectedObject.item.title)" />\r
+                                                                               </div>\r
+                                                                               <space bar="false" />\r
                                                                        </div>\r
-                                                                       <space bar="false" />\r
-                                                               </div>\r
-                                                               <div>\r
-                                                                       <label style="font-size:8pt; color: gray" value="Anyag leírása" />\r
-                                                                       <div style="margin: 4px">\r
-                                                                               <label value="@load(vm.selectedObject.item.description)" />\r
+                                                                       <div>\r
+                                                                               <label style="font-size:8pt; color: gray" value="Anyag leírása" />\r
+                                                                               <div style="margin: 4px">\r
+                                                                                       <label value="@load(vm.selectedObject.item.description)" />\r
+                                                                               </div>\r
+                                                                               <space bar="false" />\r
                                                                        </div>\r
-                                                                       <space bar="false" />\r
-                                                               </div>\r
-                                                               <div>\r
-                                                                       <label style="font-size:8pt; color: gray" value="Média azonosító" />\r
-                                                                       <div style="margin: 4px">\r
-                                                                               <label value="@load(vm.selectedObject.media.houseId)" />\r
+                                                                       <div>\r
+                                                                               <label style="font-size:8pt; color: gray" value="Média azonosító" />\r
+                                                                               <div style="margin: 4px">\r
+                                                                                       <label value="@load(vm.selectedObject.media.houseId)" />\r
+                                                                               </div>\r
+                                                                               <space bar="false" />\r
                                                                        </div>\r
-                                                                       <space bar="false" />\r
-                                                               </div>\r
-                                                               <div>\r
-                                                                       <label style="font-size:8pt; color: gray" value="Média címe" />\r
-                                                                       <div style="margin: 4px">\r
-                                                                               <label value="@load(vm.selectedObject.media.title)" />\r
+                                                                       <div>\r
+                                                                               <label style="font-size:8pt; color: gray" value="Média címe" />\r
+                                                                               <div style="margin: 4px">\r
+                                                                                       <label value="@load(vm.selectedObject.media.title)" />\r
+                                                                               </div>\r
+                                                                               <space bar="false" />\r
                                                                        </div>\r
-                                                                       <space bar="false" />\r
-                                                               </div>\r
-                                                               <div>\r
-                                                                       <label style="font-size:8pt; color: gray" value="Média leírása" />\r
-                                                                       <div style="margin: 4px">\r
-                                                                               <label multiline="true" value="@load(vm.selectedObject.media.description)" />\r
+                                                                       <div>\r
+                                                                               <label style="font-size:8pt; color: gray" value="Média leírása" />\r
+                                                                               <div style="margin: 4px">\r
+                                                                                       <label multiline="true" value="@load(vm.selectedObject.media.description)" />\r
+                                                                               </div>\r
                                                                        </div>\r
                                                                </div>\r
+                                               </div>\r
+                                               <!-- <groupbox closable="false" mold="3d" width="100%" height="98%">\r
+                                                       <div width="100%" sclass="menuButtons">\r
+                                                       <toolbar vflex="min" width="100%" style="font-size:8px">\r
+                                                       <toolbarbutton image="/img/ic_compare_arrows_black_18dp.png" autodisable="self" onClick="@command('showInResults')"\r
+                                                       disabled="@load(vm.selectedObject eq null)" label="Szinkronizálás" hflex="min" />\r
+                                                       <toolbarbutton image="/img/ic_shopping_cart_black_18dp.png" autodisable="self" onClick="@command('downloadMedia')"\r
+                                                       disabled="@load(not vm.hasTSMMediaFile)" hflex="min" label="Visszatöltés" />\r
+                                                       <toolbarbutton image="/img/baseline_share_black_18dp.png" autodisable="self" onClick="@command('copyMediaIdToClipboard')"\r
+                                                       disabled="@load(not sessionScope.userPrincipal.editor or sessionScope.userPrincipal.anonymous or vm.selectedObject eq null)" label="Megosztás"\r
+                                                       hflex="min" />\r
+                                                       <toolbarbutton image="/img/baseline_edit_black_18dp.png" autodisable="self" onClick="@command('openMetaDataDialog')"\r
+                                                       disabled="@load(not sessionScope.userPrincipal.editor or sessionScope.userPrincipal.anonymous or vm.selectedObject eq null)" label="Szerkesztés"\r
+                                                       hflex="min" />\r
+                                                       </toolbar>\r
+                                                       </div>\r
+                                                       \r
+                                                       <div width="100%" height="90%" style="padding: 4px; overflow:auto; background-color: white">\r
+                                                       <div>\r
+                                                       <label style="font-size:8pt; color: gray" value="Anyag azonosító" />\r
+                                                       <div style="margin: 4px">\r
+                                                       <label value="@load(vm.selectedObject.item.houseId)" />\r
+                                                       </div>\r
+                                                       <space bar="false" />\r
+                                                       </div>\r
+                                                       <div>\r
+                                                       <label style="font-size:8pt; color: gray" value="Anyag címe" />\r
+                                                       <div style="margin: 4px">\r
+                                                       <label value="@load(vm.selectedObject.item.title)" />\r
+                                                       </div>\r
+                                                       <space bar="false" />\r
+                                                       </div>\r
+                                                       <div>\r
+                                                       <label style="font-size:8pt; color: gray" value="Anyag leírása" />\r
+                                                       <div style="margin: 4px">\r
+                                                       <label value="@load(vm.selectedObject.item.description)" />\r
+                                                       </div>\r
+                                                       <space bar="false" />\r
+                                                       </div>\r
+                                                       <div>\r
+                                                       <label style="font-size:8pt; color: gray" value="Média azonosító" />\r
+                                                       <div style="margin: 4px">\r
+                                                       <label value="@load(vm.selectedObject.media.houseId)" />\r
+                                                       </div>\r
+                                                       <space bar="false" />\r
+                                                       </div>\r
+                                                       <div>\r
+                                                       <label style="font-size:8pt; color: gray" value="Média címe" />\r
+                                                       <div style="margin: 4px">\r
+                                                       <label value="@load(vm.selectedObject.media.title)" />\r
+                                                       </div>\r
+                                                       <space bar="false" />\r
+                                                       </div>\r
+                                                       <div>\r
+                                                       <label style="font-size:8pt; color: gray" value="Média leírása" />\r
+                                                       <div style="margin: 4px">\r
+                                                       <label multiline="true" value="@load(vm.selectedObject.media.description)" />\r
+                                                       </div>\r
+                                                       </div>\r
                                                        </div>\r
-                                               </groupbox>\r
+                                                       </groupbox> -->\r
                                        </center>\r
                                </borderlayout>\r
                        </center>\r
index 7dcefbadb3244b181821cc270a72f9e1c59cec98..46868864feab0ad58b9f8ee393f9f44e040c74c4 100644 (file)
@@ -414,22 +414,6 @@ public class SearchModel extends AsyncBaseModel {
                }\r
        }\r
 \r
-       private void highlight(int index, boolean highlight) {\r
-               if (index >= itemsGrid.getRows().getChildren().size())\r
-                       return;\r
-               List<Component> components = itemsGrid.getRows().getChildren();\r
-               Row row = (Row) components.get(index);\r
-               Detail detail = (Detail) row.getChildren().get(0);\r
-               Hlayout hlayout = (Hlayout) detail.getChildren().get(0);\r
-               if (highlight) {\r
-                       row.setStyle("background: #F1F8E9;");\r
-                       hlayout.setStyle("border-bottom: 1px solid #C5E1A5; background: #F1F8E9;");\r
-               } else {\r
-                       row.setStyle("background: none;");\r
-                       hlayout.setStyle("border-bottom: 1px solid #ebebeb; background: none;");\r
-               }\r
-       }\r
-\r
        public boolean isAllChecked() {\r
                return allChecked;\r
        }\r
@@ -588,7 +572,7 @@ public class SearchModel extends AsyncBaseModel {
                        return;\r
                int activePageIndex = selectedRowIndex / itemsGrid.getPageSize();\r
                positionToScroll = selectedRowIndex - itemsGrid.getPageSize() * activePageIndex;\r
-               //preventAfterRender = true;\r
+               // preventAfterRender = true;\r
                if (activePageIndex != itemsGrid.getActivePage()) {\r
                        itemsGrid.setActivePage(activePageIndex);\r
                        logger.info("Selected media is shown in the results, which can be found on {} page and also it will be highlighted.", activePageIndex + 1);\r