forked from extern/egroupware
added "progress"(-bar) widget to differ from image and using it in templates
This commit is contained in:
parent
41952d70ea
commit
89847abae6
@ -35,6 +35,7 @@ class boetemplate extends soetemplate
|
||||
'hrule' => 'Horizontal Rule',
|
||||
'template' => 'Template', // $cell['name'] contains template-name, $cell['size'] index into $content,$cname,$readonlys
|
||||
'image' => 'Image', // label = url, name=link or method, help=alt or title
|
||||
'progress' => 'Progressbar',// for BC, identical to image with percent value
|
||||
'date' => '', // Datefield, size='' timestamp or size=format like 'm/d/Y'
|
||||
'select'=> 'Selectbox', // Selectbox ($sel_options[$name] or $content[options-$name] is array with options)
|
||||
// if size > 1 then multiple selections, size lines showed
|
||||
|
@ -573,9 +573,10 @@ class etemplate extends boetemplate
|
||||
* We have to take the smaler one of upload_max_filesize AND post_max_size-2800 into account.
|
||||
* memory_limit does NOT matter any more, because of the stream-interface of the vfs.
|
||||
*
|
||||
* @param int &$max_upload=null on return max. upload size in byte
|
||||
* @return string
|
||||
*/
|
||||
static function max_upload_size_message()
|
||||
static function max_upload_size_message(&$max_upload=null)
|
||||
{
|
||||
$upload_max_filesize = ini_get('upload_max_filesize');
|
||||
$post_max_size = ini_get('post_max_size');
|
||||
@ -1087,7 +1088,7 @@ class etemplate extends boetemplate
|
||||
{
|
||||
$cell['size'] = $this->expand_name($cell['size'],$show_c,$show_row,$content['.c'],$content['.row'],$content);
|
||||
}
|
||||
if ($cell['disabled'] && $readonlys[$name] !== false || $readonly && in_array($cell['type'],array('button','buttononly','image')) && strpos($cell['size'],',') === false)
|
||||
if ($cell['disabled'] && $readonlys[$name] !== false || $readonly && in_array($cell['type'],array('button','buttononly','image','progress')) && strpos($cell['size'],',') === false)
|
||||
{
|
||||
if ($this->rows == 1)
|
||||
{
|
||||
@ -1655,6 +1656,12 @@ class etemplate extends boetemplate
|
||||
}
|
||||
break;
|
||||
case 'image': // size: [link],[link_target],[imagemap],[link_popup],[id]
|
||||
case 'progress':
|
||||
if (is_string($value) && $value !== '' &&
|
||||
($is_progress = substr($value,-1) == '%' && is_numeric(substr($value,0,-1))) !== ($type == 'progress'))
|
||||
{
|
||||
error_log("Please use correct widget-type '".($is_progress?'progress':'image')."' in eTemplate '$this->name'!");
|
||||
}
|
||||
$image = $value != '' ? $value : $name;
|
||||
if (is_string($image)) list($app,$img) = explode('/',$image,2);
|
||||
if (!$app || !$img || !is_dir(EGW_SERVER_ROOT.'/'.$app) || strpos($img,'/')!==false)
|
||||
|
File diff suppressed because one or more lines are too long
@ -13,7 +13,7 @@
|
||||
<button statustext="Add a new Note" label="Note" id="add[note]" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&type=note&action=$cont[action]&action_id=$cont[action_id]&cat_id=$cont[cat_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;" image="note"/>
|
||||
</hbox>
|
||||
</template>
|
||||
<template id="infolog.index.rows" template="" lang="" group="0" version="1.9.002">
|
||||
<template id="infolog.index.rows" template="" lang="" group="0" version="1.9.003">
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column width="2%"/>
|
||||
@ -84,7 +84,7 @@
|
||||
<image label="$row_cont[info_type]" src="${row}[info_type]"/>
|
||||
<button statustext="Change the status of an entry, eg. close it" label="$row_cont[info_status_label]" id="edit_status[$row_cont[info_id]]" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;" image="$row_cont[info_status_label]" ro_image="$row_cont[info_status_label]"/>
|
||||
<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&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;" image="$row_cont[info_percent]"/>
|
||||
<image label="$row_cont[info_percent2]" src="{$row}[info_percent2]" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<progress label="$row_cont[info_percent2]" id="{$row}[info_percent2]" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&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">
|
||||
<link label="%s $row_cont[info_addr]" id="${row}[info_link]" options="b"/>
|
||||
@ -93,7 +93,7 @@
|
||||
<description align="right" id="{$row}[info_number]" no_lang="1" class="infoId"/>
|
||||
</hbox>
|
||||
<box class="infoDes">
|
||||
<description id="${row}[info_des]" no_lang="1" options=",,1"/>
|
||||
<description id="${row}[info_des]" no_lang="1" activate_links="1"/>
|
||||
</box>
|
||||
<link-string id="${row}[filelinks]"/>
|
||||
</vbox>
|
||||
|
Loading…
Reference in New Issue
Block a user