Mobile theme:

- Implement categories list and edit view
This commit is contained in:
Hadi Nategh 2016-04-22 14:42:06 +00:00
parent c5d8602815
commit 103141312e
4 changed files with 208 additions and 0 deletions

View File

@ -30,4 +30,7 @@
content: ",";
font-size: 10pt;
}
.globalCat_hiddenCatid {
display: none;
}
}

View File

@ -37,4 +37,8 @@
}
}
}
.globalCat_hiddenCatid {
display: none;
}
}

View File

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE overlay PUBLIC "-//Stylite AG//eTemplate 2//EN" "http://www.egroupware.org/etemplate2.dtd">
<!-- $Id$ -->
<overlay>
<template id="admin.categories.delete" template="" lang="" group="0" version="1.9.001">
<grid>
<columns>
<column/>
</columns>
<rows>
<row>
<groupbox class="globalCat_confirmDelete">
<caption label="Delete this category"/>
<grid>
<columns>
<column/>
<column/>
</columns>
<rows>
<row height="30">
<description span="all"/>
</row>
<row>
<checkbox align="center" id="delete[subs]" span="all"/>
</row>
<row height="40">
<button align="center" label="Delete" id="delete[delete]" image="delete" background_image="1"/>
</row>
</rows>
</grid>
</groupbox>
</row>
</rows>
</grid>
<textbox id="delete[cat_id]" class="globalCat_hiddenCatid"/>
</template>
<template id="admin.categories.edit" template="" lang="" group="0" version="1.9.001">
<grid width="100%">
<columns>
<column width="120"/>
<column/>
</columns>
<rows>
<row class="dialogHeadbar" >
<hbox span="all">
<button id="button[save]" onclick="return app.admin.check_owner(widget);" image="save" background_image="1"/>
<button id="button[apply]" onclick="return app.admin.check_owner(widget);" image="apply" background_image="1"/>
<buttononly id="button[cancel]" onclick="window.close();" image="cancel" background_image="1"/>
<buttononly statustext="Delete this category" id="button[delete]" onclick="app.admin.delete_category" image="delete" background_image="1"/>
</hbox>
</row>
<row>
<description value="Name" for="name"/>
<textbox id="name" needed="1" size="50" maxlength="150" class="et2_fullWidth"/>
</row>
<row>
<description value="Parent category" for="parent"/>
<menulist>
<menupopup type="select-cat" id="parent" options="None,$cont[all_cats],,$cont[appname]"/>
</menulist>
</row>
<row valign="top">
<description value="Description" for="description"/>
<textbox multiline="true" id="description" rows="5" cols="10" class="et2_fullWidth" resize_ratio="0" height="200"/>
</row>
<row class="nmr" disabled="@no_private">
<description value="Private"/>
<checkbox id="access" options="private,public"/>
</row>
<row>
<description value="Color" for="cat_data[color]"/>
<colorpicker id="data[color]"/>
</row>
<row>
<description value="Icon" for="data[icon]"/>
<hbox options="0,0">
<menulist>
<menupopup id="data[icon]" onchange="app.admin.change_icon(widget);" options="None"/>
</menulist>
<image src="icon_url" id="icon_url"/>
</hbox>
</row>
<row disabled="@appname=phpgw" height="30">
<description value="Application"/>
<menulist>
<menupopup type="select-app" id="appname" readonly="true" options="All applications"/>
</menulist>
</row>
<row>
<description value="Category owner" for="owner"/>
<listbox statustext="Limit global category to members of a certain group" id="owner" needed="1" rows="6" height="150"/>
</row>
<row disabled="!@last_mod">
<description value="Modified"/>
<date-time id="last_mod" readonly="true"/>
</row>
</rows>
</grid>
<template id="admin.categories.delete" class="globalCat_hiddenCatid"/>
</template>
</overlay>

View File

@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE overlay PUBLIC "-//Stylite AG//eTemplate 2//EN" "http://www.egroupware.org/etemplate2.dtd">
<!-- $Id$ -->
<overlay>
<template id="admin.categories.index.rows" template="" lang="" group="0" version="1.9.002">
<grid width="100%">
<columns>
<column width="10"/>
<column width="80%" />
<column width="110"/>
</columns>
<rows>
<row class="th">
</row>
<row class="$row_cont[id] $row_cont[class]">
<description class=" cat_$row_cont[cat_id] mobile_cat_col"/>
<vbox>
<hbox options="0,0">
<html id="${row}[level_spacer]"/>
<description id="${row}[name]" class="$row_cont[class]"/>
</hbox>
<description id="${row}[description]"/>
<hbox>
<hbox>
<menulist>
<menupopup type="select-account" id="${row}[owner]" readonly="true" options="All users,groups"/>
</menulist>
</hbox>
<hbox align="right">
<menulist>
<menupopup id="${row}[appname]" readonly="true"/>
</menulist>
</hbox>
</hbox>
</vbox>
<vbox>
<image align="center" label="{$row_cont[data][icon]}" src="${row}[icon_url]"/>
<checkbox align="center" id="${row}[access]" readonly="true" options="private,public" disabled="@no_access"/>
<date-time id="${row}[last_mod]" readonly="true"/>
<description align="center" id="${row}[subs]"/>
</vbox>
</row>
</rows>
</grid>
</template>
<template id="admin.categories.index.add" template="" lang="" group="0" version="1.9.001">
<buttononly lable="Add" id="add" onclick="window.open('$cont[add_link]','_blank','dependent=yes,width=600,height=380,scrollbars=yes,status=yes'); return false;"/>
</template>
<template id="admin.categories.index" template="" lang="" group="0" version="1.9.001">
<nextmatch id="nm" options="admin.categories.index.rows" span="all" header_left="admin.categories.index.add"/>
<box class="action_popup prompt" id="owner_popup">
<vbox>
<description value="Change owner" class="promptheader"/>
<description value="Select owner"/>
<listbox id="owner" no_lang="1" rows="4" class="action_popup-content"/>
<hbox>
<button label="Add" id="owner_action[add]" onclick="nm_submit_popup(this); return false;"/>
<button label="Delete" id="owner_action[delete]" onclick="nm_submit_popup(this); return false;"/>
<button disabled="true" label="OK" onclick="nm_submit_popup(this); return false;"/>
<buttononly label="Cancel" onclick="nm_hide_popup(this,'owner_popup');"/>
</hbox>
</vbox>
</box>
<styles>
.level0 { font-weight: bold; }
.action_popup {
position: fixed;
top: 200px;
left: 450px;
width: 76ex;
z-index: 20000;
display: none;
border-collapse:collapse;
border-spacing:0px
}
.action_popup-content {
display:block;
padding:2ex;
color:#666666;
margin: -2px -1px 0px -2px;
}
.action_popup &gt; table {
width: 100%
}
.action_popup .promptheader {
padding: 1ex;
width: 100%
}
.action_select {
width: 100%
}
</styles>
</template>
</overlay>