mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
added ablity to set onchange via content
This commit is contained in:
parent
4519718d56
commit
fc5c2baa45
@ -38,8 +38,10 @@
|
||||
* 'col_filter' => // IO array of column-name value pairs (optional for the filterheaders)
|
||||
* 'filter' => // IO filter, if not 'no_filter' => True
|
||||
* 'filter_no_lang' => True// I set no_lang for filter (=dont translate the options)
|
||||
* 'filter_onchange'=> 'this.form.submit();' // I onChange action for filter, default: this.form.submit();
|
||||
* 'filter2' => // IO filter2, if not 'no_filter2' => True
|
||||
* 'filter2_no_lang'=> True// I set no_lang for filter2 (=dont translate the options)
|
||||
* 'filter2_onchange'=> 'this.form.submit();' // I onChange action for filter2, default: this.form.submit();
|
||||
* 'rows' => // O content set by callback
|
||||
* 'total' => // O the total number of entries
|
||||
* 'sel_options' => // O additional or changed sel_options set by the callback and merged into $tmpl->sel_options
|
||||
@ -165,6 +167,9 @@
|
||||
$extension_data['old_value'] = $value = $nm_global['col_filter'][$this->last_part($name)];
|
||||
return True;
|
||||
}
|
||||
if (!$value['filter_onchange']) $value['filter_onchange'] = 'this.form.submit();';
|
||||
if (!$value['filter2_onchange']) $value['filter2_onchange'] = 'this.form.submit();';
|
||||
|
||||
list($app,$class,$method) = explode('.',$value['get_rows']);
|
||||
if ($app && $class)
|
||||
{
|
||||
|
@ -853,6 +853,10 @@
|
||||
}
|
||||
if ($cell['onchange'] && $cell['type'] != 'button') // values != '1' can only set by a program (not in the editor so fa
|
||||
{
|
||||
if (strchr($cell['onchange'],'$') || $cell['onchange']{0} == '@')
|
||||
{
|
||||
$cell['onchange'] = $this->expand_name($cell['onchange'],$show_c,$show_row,$content['.c'],$content['.row'],$content);
|
||||
}
|
||||
$options .= ' onChange="'.($cell['onchange']=='1'?'this.form.submit();':$cell['onchange']).'"';
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// eTemplates for Application 'etemplate', generated by soetemplate::dump4setup() 2006-03-17 20:36
|
||||
// eTemplates for Application 'etemplate', generated by soetemplate::dump4setup() 2006-03-21 23:11
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
@ -81,7 +81,7 @@ $templ_data[] = array('name' => 'etemplate.editor.show','template' => '','lang'
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.editor.show-buttons','template' => '','lang' => '','group' => '0','version' => '0.9.15.002','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:4:{s:1:"A";a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Read";s:4:"name";s:4:"read";s:4:"help";s:49:"read eTemplate from database (for the keys above)";}s:1:"B";a:4:{s:4:"type";s:6:"button";s:5:"label";s:11:"Show Values";s:4:"name";s:6:"values";s:4:"help";s:65:"shows / allows you to enter values into the eTemplate for testing";}s:1:"C";a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Edit";s:4:"name";s:4:"edit";s:4:"help";s:30:"edit the eTemplate spez. above";}s:1:"D";a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:4:"name";s:6:"delete";s:4:"help";s:33:"deletes the eTemplate spez. above";}}}s:4:"rows";i:1;s:4:"cols";i:4;}}','size' => '','style' => '','modified' => '1032907904',);
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.editor.styles','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:1:{s:2:"h1";s:6:",!@msg";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"name";s:3:"msg";s:4:"span";s:10:",redItalic";s:7:"no_lang";s:1:"1";}}i:2;a:1:{s:1:"A";a:6:{s:4:"type";s:6:"select";s:5:"label";s:10:"CSS-Styles";s:4:"name";s:4:"from";s:8:"onchange";s:1:"1";s:7:"no_lang";s:1:"1";s:4:"help";s:60:" edit embeded CSS styles or of the applications app.css file";}}i:3;a:1:{s:1:"A";a:3:{s:4:"type";s:8:"textarea";s:4:"size";s:5:"22,70";s:4:"name";s:6:"styles";}}i:4;a:1:{s:1:"A";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:4:"save";s:4:"help";s:42:"save the changes made and close the window";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:5:"Apply";s:4:"name";s:5:"apply";s:4:"help";s:24:"applies the changes made";}i:3;a:5:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:4:"name";s:6:"cancel";s:4:"help";s:44:"closes the window without saving the changes";s:7:"onclick";s:15:"window.close();";}i:4;a:2:{s:4:"type";s:4:"html";s:4:"name";s:11:"java_script";}}}}s:4:"rows";i:4;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1109028002',);
|
||||
$templ_data[] = array('name' => 'etemplate.editor.styles','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:1:{s:2:"h1";s:6:",!@msg";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"name";s:3:"msg";s:4:"span";s:10:",redItalic";s:7:"no_lang";s:1:"1";}}i:2;a:1:{s:1:"A";a:6:{s:4:"type";s:6:"select";s:5:"label";s:10:"CSS-Styles";s:4:"name";s:4:"from";s:8:"onchange";s:1:"1";s:7:"no_lang";s:1:"1";s:4:"help";s:60:" edit embeded CSS styles or of the applications app.css file";}}i:3;a:1:{s:1:"A";a:3:{s:4:"type";s:8:"textarea";s:4:"size";s:5:"20,65";s:4:"name";s:6:"styles";}}i:4;a:1:{s:1:"A";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:4:"save";s:4:"help";s:42:"save the changes made and close the window";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:5:"Apply";s:4:"name";s:5:"apply";s:4:"help";s:24:"applies the changes made";}i:3;a:5:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:4:"name";s:6:"cancel";s:4:"help";s:44:"closes the window without saving the changes";s:7:"onclick";s:15:"window.close();";}i:4;a:2:{s:4:"type";s:4:"html";s:4:"name";s:11:"java_script";}}}}s:4:"rows";i:4;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1109028002',);
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.editor.values','template' => '','lang' => '','group' => '0','version' => '0.9.13.002','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:2:{s:2:"c1";s:3:"nmh";s:2:"c2";s:3:"nmr";}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:3:"Key";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Value";}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:4:"text";s:4:"name";s:8:"$col$row";s:8:"readonly";s:1:"1";}s:1:"B";a:2:{s:4:"type";s:4:"text";s:4:"name";s:8:"$col$row";}}}s:4:"rows";i:2;s:4:"cols";i:2;}}','size' => '','style' => '','modified' => '1081094454',);
|
||||
|
||||
@ -136,7 +136,7 @@ $templ_data[] = array('name' => 'etemplate.nextmatch_widget.header_only','templa
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.nextmatch_widget.nm_row','template' => '','lang' => '','group' => '0','version' => '0.9.15.006','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:9:{s:1:"A";s:2:"1%";s:1:"B";s:2:"1%";s:1:"C";s:3:"30%";s:1:"D";s:3:"30%";s:1:"F";s:3:"15%";s:1:"G";s:2:"5%";s:1:"H";s:2:"1%";s:1:"I";s:2:"1%";s:2:"c1";s:3:"nmh";}i:1;a:9:{s:1:"A";a:5:{s:4:"type";s:6:"button";s:4:"size";s:24:"first.gif,first-grey.gif";s:5:"label";s:5:"First";s:4:"name";s:5:"first";s:4:"help";s:21:"go to the first entry";}s:1:"B";a:5:{s:4:"type";s:6:"button";s:4:"size";s:22:"left.gif,left-grey.gif";s:5:"label";s:4:"Left";s:4:"name";s:4:"left";s:4:"help";s:34:"go to the previous page of entries";}s:1:"C";a:6:{s:4:"type";s:10:"select-cat";s:4:"size";s:2:"-1";s:5:"label";s:8:"Category";s:4:"name";s:6:"cat_id";s:8:"onchange";s:1:"1";s:4:"help";s:17:"select a Category";}s:1:"D";a:6:{s:4:"type";s:6:"select";s:5:"label";s:13:"@filter_label";s:5:"align";s:6:"center";s:4:"name";s:6:"filter";s:8:"onchange";s:1:"1";s:4:"help";s:12:"@filter_help";}s:1:"E";a:6:{s:4:"type";s:6:"select";s:5:"label";s:14:"@filter2_label";s:5:"align";s:5:"right";s:4:"name";s:7:"filter2";s:8:"onchange";s:1:"1";s:4:"help";s:13:"@filter2_help";}s:1:"F";a:5:{s:4:"type";s:4:"text";s:5:"align";s:5:"right";s:4:"name";s:6:"search";s:8:"onchange";s:1:"1";s:4:"help";s:28:"a pattern to be searched for";}s:1:"G";a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Search";s:4:"name";s:12:"start_search";s:4:"help";s:19:"to start the search";}s:1:"H";a:5:{s:4:"type";s:6:"button";s:4:"size";s:24:"right.gif,right-grey.gif";s:5:"label";s:5:"Right";s:4:"name";s:5:"right";s:4:"help";s:30:"go to the next page of entries";}s:1:"I";a:5:{s:4:"type";s:6:"button";s:4:"size";s:22:"last.gif,last-grey.gif";s:5:"label";s:4:"Last";s:4:"name";s:4:"last";s:4:"help";s:20:"go to the last entry";}}}s:4:"rows";i:1;s:4:"cols";i:9;s:4:"size";s:11:"100%,,,,0,5";s:4:"span";s:11:",thinBorder";}}','size' => '100%,,,,0,5','style' => '.thinBorder { border: 1px solid black; }','modified' => '1061331789',);
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.nextmatch_widget.nm_row','template' => '','lang' => '','group' => '0','version' => '1.0.0.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:9:{s:1:"A";s:2:"1%";s:1:"B";s:2:"1%";s:1:"C";s:3:"30%";s:1:"D";s:3:"30%";s:1:"F";s:3:"15%";s:1:"G";s:2:"5%";s:1:"H";s:2:"1%";s:1:"I";s:2:"1%";s:2:"c1";s:3:"nmh";}i:1;a:9:{s:1:"A";a:5:{s:4:"type";s:6:"button";s:4:"size";s:24:"first.gif,first-grey.gif";s:5:"label";s:5:"First";s:4:"name";s:5:"first";s:4:"help";s:21:"go to the first entry";}s:1:"B";a:5:{s:4:"type";s:6:"button";s:4:"size";s:22:"left.gif,left-grey.gif";s:5:"label";s:4:"Left";s:4:"name";s:4:"left";s:4:"help";s:34:"go to the previous page of entries";}s:1:"C";a:6:{s:4:"type";s:10:"select-cat";s:4:"size";s:2:"-1";s:5:"label";s:8:"Category";s:4:"name";s:6:"cat_id";s:8:"onchange";s:1:"1";s:4:"help";s:17:"select a Category";}s:1:"D";a:6:{s:4:"type";s:6:"select";s:5:"label";s:13:"@filter_label";s:5:"align";s:6:"center";s:4:"name";s:6:"filter";s:8:"onchange";s:1:"1";s:4:"help";s:12:"@filter_help";}s:1:"E";a:6:{s:4:"type";s:6:"select";s:5:"label";s:14:"@filter2_label";s:5:"align";s:5:"right";s:4:"name";s:7:"filter2";s:8:"onchange";s:1:"1";s:4:"help";s:13:"@filter2_help";}s:1:"F";a:5:{s:4:"type";s:4:"text";s:5:"align";s:5:"right";s:4:"name";s:6:"search";s:8:"onchange";s:1:"1";s:4:"help";s:28:"a pattern to be searched for";}s:1:"G";a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Search";s:4:"name";s:12:"start_search";s:4:"help";s:19:"to start the search";}s:1:"H";a:5:{s:4:"type";s:6:"button";s:4:"size";s:24:"right.gif,right-grey.gif";s:5:"label";s:5:"Right";s:4:"name";s:5:"right";s:4:"help";s:30:"go to the next page of entries";}s:1:"I";a:5:{s:4:"type";s:6:"button";s:4:"size";s:22:"last.gif,last-grey.gif";s:5:"label";s:4:"Last";s:4:"name";s:4:"last";s:4:"help";s:20:"go to the last entry";}}}s:4:"rows";i:1;s:4:"cols";i:9;s:4:"size";s:11:"100%,,,,0,5";s:4:"span";s:11:",thinBorder";}}','size' => '100%,,,,0,5','style' => '.thinBorder { border: 1px solid black; }','modified' => '1113294054',);
|
||||
$templ_data[] = array('name' => 'etemplate.nextmatch_widget.nm_row','template' => '','lang' => '','group' => '0','version' => '1.0.0.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:9:{s:1:"A";s:2:"1%";s:1:"B";s:2:"1%";s:1:"C";s:3:"30%";s:1:"D";s:3:"30%";s:1:"F";s:3:"15%";s:1:"G";s:2:"5%";s:1:"H";s:2:"1%";s:1:"I";s:2:"1%";s:2:"c1";s:3:"nmh";}i:1;a:9:{s:1:"A";a:5:{s:4:"type";s:6:"button";s:4:"size";s:24:"first.gif,first-grey.gif";s:5:"label";s:5:"First";s:4:"name";s:5:"first";s:4:"help";s:21:"go to the first entry";}s:1:"B";a:5:{s:4:"type";s:6:"button";s:4:"size";s:22:"left.gif,left-grey.gif";s:5:"label";s:4:"Left";s:4:"name";s:4:"left";s:4:"help";s:34:"go to the previous page of entries";}s:1:"C";a:6:{s:4:"type";s:10:"select-cat";s:4:"size";s:2:"-1";s:5:"label";s:8:"Category";s:4:"name";s:6:"cat_id";s:8:"onchange";s:1:"1";s:4:"help";s:17:"select a Category";}s:1:"D";a:6:{s:4:"type";s:6:"select";s:5:"label";s:13:"@filter_label";s:5:"align";s:6:"center";s:4:"name";s:6:"filter";s:8:"onchange";s:16:"@filter_onchange";s:4:"help";s:12:"@filter_help";}s:1:"E";a:6:{s:4:"type";s:6:"select";s:5:"label";s:14:"@filter2_label";s:5:"align";s:5:"right";s:4:"name";s:7:"filter2";s:8:"onchange";s:17:"@filter2_onchange";s:4:"help";s:13:"@filter2_help";}s:1:"F";a:5:{s:4:"type";s:4:"text";s:5:"align";s:5:"right";s:4:"name";s:6:"search";s:8:"onchange";s:1:"1";s:4:"help";s:28:"a pattern to be searched for";}s:1:"G";a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Search";s:4:"name";s:12:"start_search";s:4:"help";s:19:"to start the search";}s:1:"H";a:5:{s:4:"type";s:6:"button";s:4:"size";s:24:"right.gif,right-grey.gif";s:5:"label";s:5:"Right";s:4:"name";s:5:"right";s:4:"help";s:30:"go to the next page of entries";}s:1:"I";a:5:{s:4:"type";s:6:"button";s:4:"size";s:22:"last.gif,last-grey.gif";s:5:"label";s:4:"Last";s:4:"name";s:4:"last";s:4:"help";s:20:"go to the last entry";}}}s:4:"rows";i:1;s:4:"cols";i:9;s:4:"size";s:11:"100%,,,,0,5";s:4:"span";s:11:",thinBorder";}}','size' => '100%,,,,0,5','style' => '.thinBorder { border: 1px solid black; }','modified' => '1113294054',);
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.popup.manual','template' => '','lang' => '','group' => '0','version' => '1.2','data' => 'a:1:{i:0;a:5:{s:4:"type";s:6:"manual";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"span";s:12:",popupManual";}}','size' => '','style' => '.popupManual { position: absolute; right: 27px; top: 24px; }','modified' => '1131553453',);
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<textbox multiline="true" rows="22" cols="70" id="styles"/>
|
||||
<textbox multiline="true" rows="20" cols="65" id="styles"/>
|
||||
</row>
|
||||
<row>
|
||||
<hbox>
|
||||
|
@ -1,7 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id$ -->
|
||||
<overlay>
|
||||
<grid id="etemplate.nextmatch_widget.nm_row" template="" lang="" group="0" version="0.9.15.006" width="100%" spacing="0" padding="5">
|
||||
<template id="etemplate.nextmatch_widget.nm_row" template="" lang="" group="0" version="1.0.0.001">
|
||||
<grid width="100%" spacing="0" padding="5">
|
||||
<columns>
|
||||
<column width="1%"/>
|
||||
<column width="1%"/>
|
||||
@ -21,10 +22,10 @@
|
||||
<menupopup type="select-cat" options="-1" label="Category" id="cat_id" onchange="1" statustext="select a Category"/>
|
||||
</menulist>
|
||||
<menulist>
|
||||
<menupopup label="@filter_label" align="center" id="filter" onchange="1" statustext="@filter_help"/>
|
||||
<menupopup label="@filter_label" align="center" id="filter" onchange="@filter_onchange" statustext="@filter_help"/>
|
||||
</menulist>
|
||||
<menulist>
|
||||
<menupopup label="@filter2_label" align="right" id="filter2" onchange="1" statustext="@filter2_help"/>
|
||||
<menupopup label="@filter2_label" align="right" id="filter2" onchange="@filter2_onchange" statustext="@filter2_help"/>
|
||||
</menulist>
|
||||
<textbox align="right" id="search" onchange="1" statustext="a pattern to be searched for"/>
|
||||
<button label="Search" id="start_search" statustext="to start the search"/>
|
||||
@ -33,34 +34,40 @@
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<grid id="etemplate.nextmatch_widget" template="" lang="" group="" version="0.9.15.008" width="100%">
|
||||
<styles>
|
||||
.thinBorder { border: 1px solid black; }
|
||||
</styles>
|
||||
</template>
|
||||
<template id="etemplate.nextmatch_widget" template="" lang="" group="0" version="1.0.0.001">
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column width="40%"/>
|
||||
<column width="35%"/>
|
||||
<column/>
|
||||
<column width="40%"/>
|
||||
<column width="35%"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<grid id="@header_left"/>
|
||||
<template id="@header_left"/>
|
||||
<hbox align="center">
|
||||
<description value="showing" no_lang="1" id="range"/>
|
||||
<description value="of" no_lang="1" id="total"/>
|
||||
</hbox>
|
||||
<grid align="right" id="@header_right"/>
|
||||
<template align="right" id="@header_right"/>
|
||||
</row>
|
||||
<row>
|
||||
<grid span="all" align="center" id="etemplate.nextmatch_widget.nm_row"/>
|
||||
<template span="all" align="center" id="etemplate.nextmatch_widget.nm_row"/>
|
||||
</row>
|
||||
<row>
|
||||
<grid content="rows" span="all" align="center" id="@template"/>
|
||||
<template content="rows" span="all" align="center" id="@template"/>
|
||||
</row>
|
||||
<row disabled="!@bottom_too">
|
||||
<grid content="bottom" span="all" align="center" id="etemplate.nextmatch_widget.nm_row"/>
|
||||
<template content="bottom" span="all" align="center" id="etemplate.nextmatch_widget.nm_row"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<styles>
|
||||
.activ_sortcolumn { color: red; font-weight: bold; }
|
||||
.inactiv_sortcolumn { color: green; font-weight: normal; }
|
||||
</styles>
|
||||
</grid>
|
||||
</template>
|
||||
</overlay>
|
Loading…
Reference in New Issue
Block a user