Infolog: Prefix name on css classes

This commit is contained in:
Hadi Nategh 2013-09-19 12:52:50 +00:00
parent dd4c3c49eb
commit a661d52de2
10 changed files with 90 additions and 64 deletions

View File

@ -1394,7 +1394,7 @@ class infolog_bo
$infos[$row['info_id']] = array(
'status' => $row['info_type'] != 'phone' && $row['info_status'] == 'ongoing' ?
$row['info_percent'].'%' : 'infolog/'.$this->status[$row['info_type']][$row['info_status']],
'class' => $row['info_id_parent'] ? 'rowHasParent' : null,
'class' => $row['info_id_parent'] ? 'infolog_rowHasParent' : null,
);
if (common::image('infolog', $icon=$row['info_type'].'_element') ||
common::image('infolog', $icon=$row['info_type']))
@ -1404,7 +1404,7 @@ class infolog_bo
}
foreach($this->anzSubs(array_keys($infos)) as $info_id => $subs)
{
if ($subs) $infos[$info_id]['class'] .= ' rowHasSubs';
if ($subs) $infos[$info_id]['class'] .= ' infolog_rowHasSubs';
}
}
return $infos;

View File

@ -46,7 +46,7 @@ class infolog_customfields
function __construct( )
{
$this->bo = new infolog_bo();
$this->tmpl = new etemplate();
$this->tmpl = new etemplate_new();
$this->types = &$this->bo->enums['type'];
$this->status = &$this->bo->status;
$this->config_data = config::read('infolog');

View File

@ -166,7 +166,7 @@ class infolog_ui
$info['sub_class'] = $this->bo->enums['priority'][$info['info_priority']] . ($done ? '_done' : '');
if (!$done && $info['info_enddate'] < $this->bo->user_time_now)
{
$info['end_class'] = 'overdue';
$info['end_class'] = 'infolog_overdue';
}
if (!isset($info['info_anz_subs'])) $info['info_anz_subs'] = $this->bo->anzSubs($id);
$this->bo->link_id2from($info,$action,$action_id); // unset from for $action:$action_id
@ -206,8 +206,8 @@ class infolog_ui
{
$info['class'] .= 'rowNoSubs ';
}
if ($info['info_id_parent']) $info['class'] .= 'rowHasParent ';
if ($info['info_anz_subs'] > 0) $info['class'] .= 'rowHasSubs ';
if ($info['info_id_parent']) $info['class'] .= 'infolog_rowHasParent ';
if ($info['info_anz_subs'] > 0) $info['class'] .= 'infolog_rowHasSubs ';
$readonlys["view[$id]"] = $info['info_anz_subs'] < 1;
$readonlys['view[0]'] = True; // no parent
@ -958,7 +958,7 @@ class infolog_ui
'icon' => 'egw_action/arrow_left',
'group' => $group,
'hint' => 'View all subs of this entry',
'enableClass' => 'rowHasSubs',
'enableClass' => 'infolog_rowHasSubs',
),
'parent' => array(
'caption' => 'View parent',
@ -966,7 +966,7 @@ class infolog_ui
'group' => $group,
'hideOnDisabled' => true,
'hint' => 'View the parent of this entry and all his subs',
'enableClass' => 'rowHasParent'
'enableClass' => 'infolog_rowHasParent'
),
'add' => array(
'caption' => 'Add',

View File

@ -126,6 +126,33 @@ app.infolog = AppJS.extend(
egw.css(".et2_box.infoDes","display:" + (show ? "block;" : "none;"));
},
confirm_delete_2: function (_action, _senders)
{
var children = false;
var child_button = jQuery('#delete_sub').get(0) || jQuery('[id*="delete_sub"]').get(0);
if(child_button)
{
for(var i = 0; i < _senders.length; i++)
{
if ($j(_senders[i].iface.node).hasClass('infolog_rowHasSubs'))
{
children = true;
break;
}
}
child_button.style.display = children ? 'block' : 'none';
}
var callbackDeleteDialog = function (button_id)
{
if (button_id == et2_dialog.YES_BUTTON )
{
}
}
var confirmDeleteDialog = et2_dialog.show_dialog(callbackDeleteDialog, egw.lang("Do you really want to DELETE this Rule"),egw.lang("Delete"), {},et2_dialog.BUTTONS_YES_NO_CANCEL, et2_dialog.WARNING_MESSAGE);
},
/**
* Confirm delete
* If entry has children, asks if you want to delete children too
@ -141,7 +168,7 @@ app.infolog = AppJS.extend(
{
for(var i = 0; i < _senders.length; i++)
{
if ($j(_senders[i].iface.node).hasClass('rowHasSubs'))
if ($j(_senders[i].iface.node).hasClass('infolog_rowHasSubs'))
{
children = true;
break;

View File

@ -1,34 +1,33 @@
/* $Id$ */
.headertext { color: black; font-size: 120%; }
.lpadding5 { padding-left: 5px; }
.redItalic { color: red; font-style: italic; }
.infolog_headertext { color: black; font-size: 120%; }
.infolog_lpadding5 { padding-left: 5px; }
.low,.low_done,.normal,.normal_done,.high,.high_done,.urgent,.urgent_done { font-weight: bold; }
.low,.low_done { color:#606060; }
.normal,.normal_done { color:black }
.high { color:#cc0000; }
.high { color:#cc0000; }
.high_done { color:#800000; }
.urgent { color:#ff00ff; }
.urgent { color:#ff00ff; }
.urgent_done { color:#800080; }
.overdue { color:#cc0000; font-weight:bold; }
.infolog_overdue { color:#cc0000; font-weight:bold; }
.private { font-style:italic; }
.planned { font-style:italic; }
table.fullWidth { width: 100%; }
td.infoId:before { content:"#" }
.fixedHeight { height: 12px; }
.infolog_planned { font-style:italic; }
table.infolog_fullWidth { width: 100%; }
td.infolog_infoId:before { content:"#" }
.infolog_fixedHeight { height: 12px; }
.noWrap { white-space: nowrap; }
.user_filter select { width: 100px; }
.infolog_user_filter select { width: 100px; }
.inputFullWidth input { width: 100%; }
.image16 img { height: 16px; }
tr.rowHasSubs > td:first-child {
.infolog_image16 img { height: 16px; }
tr.infolog_rowHasSubs > td:first-child {
background-image: url(../../../phpgwapi/templates/default/images/egw_action/arrow_left.png);
background-repeat: no-repeat;
background-position: 0px 11px;
}
tr.rowHasParent > td:first-child {
tr.infolog_rowHasParent > td:first-child {
background-image: url(../../../phpgwapi/templates/default/images/egw_action/arrow_up.png);
background-repeat: no-repeat;
background-position: 0px 11px;
}
tr.row_on > td:first-child, tr.row_off > td:first-child {
padding-left: 10px;
padding-left: 10px;
}

View File

@ -118,7 +118,7 @@
<row>
<hbox options="0,0" span="all">
<description value="Group owner for" id="type2" class="header"/>
<menulist class="lpadding5">
<menulist class="infolog_lpadding5">
<menupopup type="select-account" statustext="If a type has a group owner, all entries of that type will be owned by the given group and NOT the user who created it!" id="group_owner" options="None,groups"/>
</menulist>
</hbox>
@ -137,4 +137,4 @@
.error_msg { color: red; font-style: italics; }
</styles>
</template>
</overlay>
</overlay>

View File

@ -45,7 +45,7 @@
</vbox>
<vbox>
<description value="Times"/>
<description class="planned" value="planned"/>
<description class="infolog_planned" value="planned"/>
<description class="replanned" value="Re-planned"/>
</vbox>
<vbox>
@ -63,20 +63,20 @@
<button image="$row_cont[info_percent]" label="$row_cont[info_percent]" id="edit_percent[$row_cont[info_id]]" statustext="Change the status of an entry, eg. close it" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&amp;info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
<image label="$row_cont[info_percent2]" src="{$row}[info_percent2]" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&amp;info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
</hbox>
<vbox options="0,0" class="fullWidth">
<vbox options="0,0" class="infolog_fullWidth">
<link label="%s $row_cont[info_addr]" id="${row}[info_link]" options="b"/>
<hbox options="0,0">
<description class="$row_cont[sub_class]" no_lang="1" id="${row}[info_subject]"/>
<description no_lang="1" align="right" id="{$row}[info_number]" class="infoId"/>
<description no_lang="1" align="right" id="{$row}[info_number]" class="infolog_infoId"/>
</hbox>
<description options=",,1" no_lang="1" id="${row}[info_des]"/>
<link-string id="${row}[filelinks]"/>
</vbox>
<customfields-list class="customfields" id="$row" readonly="true"/>
<vbox options="0,0,1" rows="3" cols="1">
<date-time options=",8" id="${row}[info_startdate]" readonly="true" class="fixedHeight"/>
<date class="$row_cont[end_class] fixedHeight" id="${row}[info_enddate]" readonly="true"/>
<date-time id="${row}[info_datecompleted]" readonly="true" class="fixedHeight"/>
<date-time options=",8" id="${row}[info_startdate]" readonly="true" class="infolog_fixedHeight"/>
<date class="$row_cont[end_class] infolog_fixedHeight" id="${row}[info_enddate]" readonly="true"/>
<date-time id="${row}[info_datecompleted]" readonly="true" class="infolog_fixedHeight"/>
</vbox>
<vbox rows="3" cols="1">
<hbox options="1,0" id="l_used_time">
@ -86,7 +86,7 @@
</hbox>
<hbox options="1,0" id="lplanified">
<image label="planned time" src="k_alarm.png" readonly="true"/>
<date-duration id="${row}[info_planned_time]" span="all" class="planned" readonly="true" options="@duration_format"/>
<date-duration id="${row}[info_planned_time]" span="all" class="infolog_planned" readonly="true" options="@duration_format"/>
</hbox>
<hbox options="1,0" id="replanified">
<image label="Re-planned time" src="agt_reload.png"/>
@ -170,12 +170,12 @@
</vbox>
<vbox rows="2" cols="1" options="2">
<nextmatch-sortheader label="Times" id="info_used_time"/>
<nextmatch-sortheader id="info_planned_time" class="planned" label="planned"/>
<nextmatch-sortheader id="info_planned_time" class="infolog_planned" label="planned"/>
<nextmatch-sortheader id="info_replanned_time" class="replanned" label="Re-planned"/>
</vbox>
<vbox options="0,0">
<nextmatch-accountfilter id="info_owner" options="Owner" statustext="Select to filter by owner" class="user_filter"/>
<nextmatch-accountfilter id="info_responsible" options="Responsible,both" statustext="Select to filter by responsible" class="user_filter"/>
<nextmatch-accountfilter id="info_owner" options="Owner" statustext="Select to filter by owner" class="infolog_user_filter"/>
<nextmatch-accountfilter id="info_responsible" options="Responsible,both" statustext="Select to filter by responsible" class="infolog_user_filter"/>
</vbox>
<nextmatch-sortheader label="last changed" id="info_datemodified" options="DESC"/>
<description value="Sub" class="noPrint"/>
@ -188,11 +188,11 @@
<button image="$row_cont[info_percent]" label="$row_cont[info_percent]" id="edit_percent[$row_cont[info_id]]" statustext="Change the status of an entry, eg. close it" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&amp;info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
<image label="$row_cont[info_percent2]" src="{$row}[info_percent2]" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&amp;info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
</hbox>
<vbox options="0,0" class="fullWidth">
<vbox options="0,0" class="infolog_fullWidth">
<link label="%s $row_cont[info_addr]" id="${row}[info_link]" options="b"/>
<hbox options="0,0">
<description class="$row_cont[sub_class]" no_lang="1" id="${row}[info_subject]"/>
<description no_lang="1" align="right" id="{$row}[info_number]" class="infoId"/>
<description no_lang="1" align="right" id="{$row}[info_number]" class="infolog_infoId"/>
</hbox>
<description no_lang="1" id="${row}[info_des]" options=",,1"/>
<link-string id="${row}[filelinks]"/>
@ -202,9 +202,9 @@
<menupopup type="select-cat" id="${row}[info_cat]" readonly="true"/>
</menulist>
<vbox options="0,0,1" rows="3" cols="1">
<date-time options=",8" id="${row}[info_startdate]" readonly="true" class="fixedHeight"/>
<date class="$row_cont[end_class] fixedHeight" id="${row}[info_enddate]" readonly="true"/>
<date-time id="${row}[info_datecompleted]" readonly="true" class="fixedHeight"/>
<date-time options=",8" id="${row}[info_startdate]" readonly="true" class="infolog_fixedHeight"/>
<date class="$row_cont[end_class] infolog_fixedHeight" id="${row}[info_enddate]" readonly="true"/>
<date-time id="${row}[info_datecompleted]" readonly="true" class="infolog_fixedHeight"/>
</vbox>
<vbox rows="3" cols="1">
<hbox options="1,0" id="r_used_time">
@ -214,7 +214,7 @@
</hbox>
<hbox options="1,0" id="planified">
<image label="planned time" src="k_alarm.png" readonly="true"/>
<date-duration id="${row}[info_planned_time]" span="all" class="planned" readonly="true" options="@duration_format"/>
<date-duration id="${row}[info_planned_time]" span="all" class="infolog_planned" readonly="true" options="@duration_format"/>
</hbox>
<hbox options="1,0" id="replanified">
<image label="Re-planned time" src="agt_reload.png"/>
@ -261,7 +261,7 @@
<template content="main" align="center" id="infolog.index.rows-noheader"/>
</row>
<row valign="bottom" height="30">
<description class="headertext" value="Are you shure you want to delete this entry ?" align="center"/>
<description class="infolog_headertext" value="Are you shure you want to delete this entry ?" align="center"/>
</row>
<row height="50">
<hbox align="center">

View File

@ -99,7 +99,7 @@
</columns>
<rows>
<row disabled="!@msg">
<html span="all" class="redItalic" align="center" id="msg" no_lang="1"/>
<html span="all" class="message" align="center" id="msg" no_lang="1"/>
<description/>
<description/>
<description/>
@ -113,7 +113,7 @@
<menulist>
<menupopup id="info_type" onchange="1" statustext="Type of the log-entry: Note, Phonecall or ToDo" no_lang="1" readonly="true"/>
</menulist>
<int id="info_number" class="infoId" readonly="true"/>
<int id="info_number" class="infolog_infoId" readonly="true"/>
</hbox>
</row>
<row class="row">
@ -227,7 +227,7 @@
<menulist>
<menupopup type="select-account" id="info_modifier" readonly="true"/>
</menulist>
<date-time class="lpadding5" id="info_datemodified" readonly="true"/>
<date-time class="infolog_lpadding5" id="info_datemodified" readonly="true"/>
</hbox>
</row>
</rows>
@ -238,4 +238,4 @@
.description textarea { width: 98%; }
</styles>
</template>
</overlay>
</overlay>

View File

@ -167,7 +167,7 @@
</columns>
<rows>
<row disabled="!@msg">
<html align="center" id="msg" no_lang="1" span="all" class="redItalic"/>
<html align="center" id="msg" no_lang="1" span="all" class="message"/>
<description/>
<description/>
<description/>
@ -181,7 +181,7 @@
<menupopup statustext="Type of the log-entry: Note, Phonecall or ToDo" id="info_type" no_lang="1" onchange="1"/>
</menulist>
</hbox>
<textbox type="integer" id="info_number" readonly="true" span="2" class="infoId"/>
<textbox type="integer" id="info_number" readonly="true" span="2" class="infolog_infoId"/>
</row>
<row class="row" valign="top">
<description value="Contact" for="info_from"/>
@ -312,4 +312,4 @@ select.et2_selectbox, #info_contact &gt; select { width: 117px; }
.responsible &gt; select {width: 550px;}
</styles>
</template>
</overlay>
</overlay>

View File

@ -2,12 +2,12 @@
<!-- $Id$ -->
<overlay>
<template id="infolog.index.header_left" template="" lang="" group="0" version="1.0.1.001">
<description value="InfoLog" class="headertext bold"/>
<description value="InfoLog" class="infolog_headertext bold"/>
<styles>.bold { font-weight: bold; }</styles>
</template>
<template id="infolog.index.header_right" template="" lang="" group="0" version="1.9.001">
<hbox>
<description value="Add:" class="headertext"/>
<description value="Add:" class="infolog_headertext"/>
<button statustext="Add a new ToDo" label="ToDo" id="add[task]" onclick="egw.open('','infolog','add',{type:'task',action: '$cont[action]',action_id:'$cont[action_id]',cat_id:widget.getRoot().getWidgetById('cat_id').getValue()})" image="task"/>
<button statustext="Add a new Phonecall" label="Phonecall" id="add[phone]" onclick="egw.open('','infolog','add',{type:'phone',action: '$cont[action]',action_id:'$cont[action_id]',cat_id:widget.getRoot().getWidgetById('cat_id').getValue()})" image="phone"/>
<button statustext="Add a new Note" label="Note" id="add[note]" onclick="egw.open('','infolog','add',{type:'note',action: '$cont[action]',action_id:'$cont[action_id]',cat_id:widget.getRoot().getWidgetById('cat_id').getValue()})" image="note"/>
@ -63,16 +63,16 @@
</vbox>
<vbox>
<nextmatch-sortheader label="Times" id="info_used_time"/>
<nextmatch-sortheader label="planned" id="info_planned_time" class="planned"/>
<nextmatch-sortheader label="planned" id="info_planned_time" class="infolog_planned"/>
</vbox>
<vbox options="0,0">
<nextmatch-sortheader label="Times" id="info_used_time"/>
<nextmatch-sortheader label="planned" id="info_planned_time" class="planned"/>
<nextmatch-sortheader label="planned" id="info_planned_time" class="infolog_planned"/>
<nextmatch-sortheader label="Re-planned" id="info_replanned_time" class="replanned"/>
</vbox>
<vbox options="0,0">
<nextmatch-accountfilter statustext="Select to filter by owner" id="info_owner" options="Owner,both" class="user_filter"/>
<nextmatch-accountfilter statustext="Select to filter by responsible" id="info_responsible" options="Responsible,both" class="user_filter"/>
<nextmatch-accountfilter statustext="Select to filter by owner" id="info_owner" options="Owner,both" class="infolog_user_filter"/>
<nextmatch-accountfilter statustext="Select to filter by responsible" id="info_responsible" options="Responsible,both" class="infolog_user_filter"/>
</vbox>
<nextmatch-sortheader label="last changed" id="info_datemodified" options="DESC"/>
<nextmatch-header label="Action" id="actions" class="noPrint"/>
@ -84,11 +84,11 @@
<button statustext="Change the status of an entry, eg. close it" label="$row_cont[info_percent]" id="edit_percent[$row_cont[info_id]]" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&amp;info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;" image="$row_cont[info_percent]"/>
<progress label="$row_cont[info_percent]" id="{$row}[info_percent2]" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&amp;info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
</hbox>
<vbox options="0,0" class="fullWidth">
<vbox options="0,0" class="infolog_fullWidth">
<link label="%s $row_cont[info_addr]" id="${row}[info_link]" options="b"/>
<hbox options="0,0">
<description id="${row}[info_subject]" no_lang="1" class="$row_cont[sub_class]"/>
<description align="right" id="{$row}[info_number]" no_lang="1" class="infoId"/>
<description align="right" id="{$row}[info_number]" no_lang="1" class="infolog_infoId"/>
</hbox>
<box class="infoDes">
<description id="${row}[info_des]" no_lang="1" activate_links="1"/>
@ -100,9 +100,9 @@
<menupopup type="select-cat" id="${row}[info_cat]" readonly="true"/>
</menulist>
<vbox options="0,0,1">
<date-time id="${row}[info_startdate]" readonly="true" options=",8" class="fixedHeight"/>
<date-time id="${row}[info_enddate]" readonly="true" options=",8" class="$row_cont[end_class] fixedHeight"/>
<date-time id="${row}[info_datecompleted]" readonly="true" class="fixedHeight"/>
<date-time id="${row}[info_startdate]" readonly="true" options=",8" class="infolog_fixedHeight"/>
<date-time id="${row}[info_enddate]" readonly="true" options=",8" class="$row_cont[end_class] infolog_fixedHeight"/>
<date-time id="${row}[info_datecompleted]" readonly="true" class="infolog_fixedHeight"/>
</vbox>
<vbox options="0,0">
<hbox readonly="true">
@ -112,7 +112,7 @@
</hbox>
<description/>
</hbox>
<date-duration id="${row}[info_planned_time]" readonly="true" options="@duration_format" span="all" class="planned"/>
<date-duration id="${row}[info_planned_time]" readonly="true" options="@duration_format" span="all" class="infolog_planned"/>
</vbox>
<vbox options="0,0">
<hbox id="r_used_time" options="1,0">
@ -122,7 +122,7 @@
</hbox>
<hbox id="planified" options="1,0">
<image label="planned time" src="k_alarm.png"/>
<date-duration id="${row}[info_planned_time]" readonly="true" options="@duration_format" span="all" class="planned"/>
<date-duration id="${row}[info_planned_time]" readonly="true" options="@duration_format" span="all" class="infolog_planned"/>
</hbox>
<hbox id="replanified" options="1,0">
<image label="Re-planned time" src="agt_reload.png"/>
@ -153,7 +153,7 @@
</hbox>
<hbox options="0,0" class="image16">
<button label="Insert in document" id="document[$row_cont[info_id]]" image="etemplate/merge"/>
<image label="Filemanager" src="filemanager/navbar" href="/index.php?menuaction=filemanager.filemanager_ui.index&amp;path=/apps/infolog/$row_cont[info_id]" class="image16"/>
<image label="Filemanager" src="filemanager/navbar" href="/index.php?menuaction=filemanager.filemanager_ui.index&amp;path=/apps/infolog/$row_cont[info_id]" class="infolog_image16"/>
</hbox>
</vbox>
</row>