ItEr38S09CUAsignacionMateriaisAPedidoItEr37S13: Revamp Materials zul layout

* Change Unselect link to Button
  * Reload all materials when clicking on Unselect
This commit is contained in:
Diego Pino Garcia 2009-12-09 20:42:24 +01:00 committed by Javier Moran Rua
parent 0811a257d9
commit bc7376203f
3 changed files with 23 additions and 9 deletions

View file

@ -405,4 +405,9 @@ public class MaterialsController extends
Util.reloadBindings(gridMaterials);
}
public void clearSelectionCategoriesTree() {
categoriesTree.clearSelection();
Util.reloadBindings(gridMaterials);
}
}

View file

@ -48,11 +48,17 @@
<panel title="${i18n:_('Categories')}"
border="normal">
<panelchildren>
<textbox id="txtCategory" onOK="materialsController.addMaterialCategory()"
style="margin-bottom: 4px;" />
<button label="${i18n:_('Add')}"
onClick="materialsController.addMaterialCategory()" />
<toolbarbutton style="text-decoration: none" label="${i18n:_('Unselect')}" onClick="categoriesTree.clearSelection()" />
<hbox>
<textbox id="txtCategory" onOK="materialsController.addMaterialCategory()"
style="padding-bottom: 4px" />
<button label="${i18n:_('Add')}"
onClick="materialsController.addMaterialCategory()" />
</hbox>
<separator spacing="10px" orient="horizontal" />
<button label="${i18n:_('Unselect')}" onClick="materialsController.clearSelectionCategoriesTree()" />
<separator spacing="5px" orient="horizontal" />
<tree id="categoriesTree" zclass="z-dottree"
width="280px" rows="10" vflex="true" multiple="false"
model="@{materialsController.materialCategories}"

View file

@ -40,8 +40,9 @@
<vbox>
<panel title="${i18n:_('Categories')}" border="normal">
<panelchildren>
<toolbarbutton style="text-decoration: none" label="${i18n:_('Unselect')}"
onClick="assignedMaterialsController.clearSelectionCategoriesTree()" />
<button label="${i18n:_('Unselect')}"
onClick="assignedMaterialsController.clearSelectionCategoriesTree()" />
<separator spacing="5px" orient="horizontal" />
<tree id="categoriesTree"
fixedLayout="false"
width="280px" rows="10" vflex="true" multiple="false"
@ -140,13 +141,15 @@
<!-- Search textbox -->
<hbox>
<textbox id="txtSearchMaterial" width="250px" style="margin-top: 5px" />
<button label="${i18n:_('Search')}" style="margin-bottom: 5px"
<textbox id="txtSearchMaterial" width="250px" style="margin-top: 2px" />
<button label="${i18n:_('Search')}"
onClick="assignedMaterialsController.searchMaterials()"/>
<button label="${i18n:_('Assign')}"
onClick="assignedMaterialsController.assignSelectedMaterials()" />
</hbox>
<separator spacing="10px" orient="horizontal" />
<listbox id="lbFoundMaterials"
multiple="true"
fixedLayout="true"