support for some html5 form features, if browser supports it

This commit is contained in:
Ralf Becker 2011-06-30 15:19:08 +00:00
parent d9e452ce52
commit 3f6fcf60d2
5 changed files with 32 additions and 16 deletions

View File

@ -1240,6 +1240,9 @@ class etemplate extends boetemplate
case 'int': // size: [min],[max],[len],[precission/sprint format]
case 'float':
list($min,$max,$cell_options,$pre) = explode(',',$cell_options);
// a few html5 options
if ((string)$min !== '') $options .= ' min="'.htmlspecialchars($min).'"';
if ((string)$max !== '') $options .= ' max="'.htmlspecialchars($max).'"';
if ($cell_options == '' && !$readonly)
{
$cell_options = $cell['type'] == 'int' ? 5 : 8;
@ -1248,12 +1251,23 @@ class etemplate extends boetemplate
{
$value = is_numeric($pre) ? self::number_format($value,$pre,$readonly) : sprintf($pre,$value);
}
$cell_options .= ',,'.($cell['type'] == 'int' ? '/^-?[0-9]*$/' : '/^-?[0-9]*[,.]?[0-9]*$/');
$cell_options .= ',,'.($cell['type'] == 'int' ? '/^-?[0-9]*$/' : '/^-?[0-9]*[,.]?[0-9]*$/').',number';
// fall-through
case 'hidden':
case 'passwd':
case 'text': // size: [length][,maxLength[,preg]]
$cell_opts = explode(',',$cell_options,3);
case 'text': // size: [length][,maxLength[,preg[,html5type]]]
$cell_opts = $c = explode(',',$cell_options);
// fix preg, in case it contains a comma (html5type is only letters and always last option!)
if (count($cell_opts) > 3)
{
$html5type = array_pop($cell_opts);
$cell_opts = explode(',',$cell_options,3);
if (preg_match('/^[a-z]+$/i',$html5type))
{
$cell_opts[2] = substr($cell_opts[2],0,-strlen($html5type)-1);
$cell_opts[] = $html5type;
}
}
if ($readonly && (int)$cell_opts[0] >= 0)
{
$html .= strlen($value) ? html::bold(html::htmlspecialchars($value)) : '';
@ -1261,8 +1275,8 @@ class etemplate extends boetemplate
else
{
if ($cell_opts[0] < 0) $cell_opts[0] = abs($cell_opts[0]);
$html .= html::input($form_name,$value,$type == 'passwd' ? 'password' : ($type == 'hidden' ? 'hidden' : ''),
$options.html::formatOptions($cell_opts,'SIZE,MAXLENGTH'));
$html .= html::input($form_name,$value,$type == 'passwd' ? 'password' : ($type == 'hidden' ? 'hidden' : $cell_opts[3]),
$options.html::formatOptions($cell_opts,'SIZE,MAXLENGTH').($cell['needed']?' required="required"':''));
if (!$readonly)
{
@ -1288,7 +1302,7 @@ class etemplate extends boetemplate
// browser would only send the content of the readonly (and therefore unchanged) field
if ($readonly && self::$request->isset_to_process($form_name)) $form_name = '';
$html .= html::textarea($form_name,$value,
$options.html::formatOptions($cell_options,'ROWS,COLS'));
$options.html::formatOptions($cell_options,'ROWS,COLS').($cell['needed']?' required="required"':''));
}
if (!$readonly)
{

View File

@ -100,7 +100,7 @@ class url_widget
{
$cell['size'] .= '|[^<]+ ?<'.self::EMAIL_PREG.'>';
}
$cell['size'] .= ')$/i';
$cell['size'] .= ')$/i,email';
}
#_debug_array($cell);
break;
@ -141,6 +141,7 @@ class url_widget
if (!$readonly)
{
$cell['type'] = 'text';
$cell['size'] = "$size,$max_size,$preg,url";
// todo: (optional) validation
break;
}
@ -171,6 +172,7 @@ class url_widget
if (!$readonly)
{
$cell['type'] = 'text';
$cell['size'] = "$size,$max_size,$preg,tel";
// todo: (optional) validation
break;
}

View File

@ -2,7 +2,7 @@
/**
* EGroupware - eTemplates for Application etemplate
* http://www.egroupware.org
* generated by soetemplate::dump4setup() 2011-05-18 11:39
* generated by soetemplate::dump4setup() 2011-06-30 17:17
*
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package etemplate
@ -125,7 +125,7 @@ $templ_data[] = array('name' => 'etemplate.link_widget.attach','template' => '',
$templ_data[] = array('name' => 'etemplate.link_widget.create','template' => '','lang' => '','group' => '0','version' => '0.9.15.001','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:6:"row_on";s:2:"c2";s:7:"row_off";}i:1;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"name";s:3:"app";}s:1:"B";a:4:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:2:"id";s:4:"help";s:28:"Select an entry to link with";}s:1:"C";a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Link";s:4:"name";s:6:"create";s:4:"help";s:29:"click here to create the Link";}s:1:"D";a:4:{s:4:"type";s:6:"button";s:5:"label";s:10:"New search";s:4:"name";s:3:"new";s:4:"help";s:36:"start a new search, cancel this link";}}i:2;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Comment";}s:1:"B";a:5:{s:4:"type";s:4:"text";s:4:"size";s:5:"50,50";s:4:"span";s:3:"all";s:4:"name";s:6:"remark";s:4:"help";s:28:"optional note about the Link";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:2;s:4:"cols";i:4;}}','size' => '','style' => '','modified' => '1035043515',);
$templ_data[] = array('name' => 'etemplate.link_widget.entry','template' => '','lang' => '','group' => '0','version' => '1.7.002','data' => 'a:1:{i:0;a:8:{s:4:"type";s:3:"box";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:"size";s:1:"2";i:1;a:8:{s:4:"type";s:3:"box";s:4:"size";s:6:"4,,0,0";i:1;a:4:{s:4:"name";s:3:"app";s:4:"help";s:28:"Select application to search";s:4:"type";s:9:"link-apps";s:8:"onchange";s:177:"xajax_doXMLHTTP(\'etemplate.link_widget.ajax_get_types\',document.getElementById(form::name(\'app\')).value,form::name(\'link_type\'),this.form.etemplate_exec_id.value); return false;";}i:2;a:5:{s:4:"type";s:3:"box";s:4:"name";s:8:"type_box";s:4:"size";s:1:"1";i:1;a:3:{s:4:"type";s:6:"select";s:4:"name";s:9:"link_type";s:4:"help";s:51:"Search only selected record type in the application";}s:4:"span";s:10:",type_hide";}s:4:"span";s:11:",box_inline";s:4:"name";s:11:"search_line";i:3;a:4:{s:4:"type";s:4:"text";s:4:"name";s:5:"query";s:4:"blur";s:5:"@blur";s:4:"size";s:6:"@extra";}i:4;a:5:{s:4:"type";s:6:"button";s:4:"name";s:6:"search";s:5:"label";s:1:">";s:4:"help";s:30:"Click here to start the search";s:7:"onclick";s:345:"xajax_doXMLHTTP(\'etemplate.link_widget.ajax_search\',document.getElementById(form::name(\'app\')).value,document.getElementById(form::name(\'link_type\')).value,document.getElementById(form::name(\'query\')).value,form::name(\'id\'),form::name(\'search_line\'),form::name(\'select_line\'),form::name(\'query\'),this.form.etemplate_exec_id.value); return false;";}}i:2;a:5:{s:4:"type";s:3:"box";s:4:"size";s:1:"1";s:4:"span";s:22:",link_select link_hide";i:1;a:4:{s:4:"type";s:6:"select";s:4:"name";s:2:"id";s:8:"onchange";s:254:"if (this.value == \'\') { document.getElementById(form::name(\'search_line\')).style.display=\'inline\'; document.getElementById(form::name(\'select_line\')).style.display=\'none\';} else if (this.options[0].value == \' \' || this.value == 0) { this.form.submit(); }";s:7:"no_lang";s:1:"1";}s:4:"name";s:11:"select_line";}s:4:"span";s:7:",@class";}}','size' => '','style' => '.link_hide { display: none; }
$templ_data[] = array('name' => 'etemplate.link_widget.entry','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:8:{s:4:"type";s:3:"box";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:"size";s:1:"2";i:1;a:8:{s:4:"type";s:3:"box";s:4:"size";s:6:"4,,0,0";i:1;a:4:{s:4:"name";s:3:"app";s:4:"help";s:28:"Select application to search";s:4:"type";s:9:"link-apps";s:8:"onchange";s:177:"xajax_doXMLHTTP(\'etemplate.link_widget.ajax_get_types\',document.getElementById(form::name(\'app\')).value,form::name(\'link_type\'),this.form.etemplate_exec_id.value); return false;";}i:2;a:5:{s:4:"type";s:3:"box";s:4:"name";s:8:"type_box";s:4:"size";s:1:"1";i:1;a:3:{s:4:"type";s:6:"select";s:4:"name";s:9:"link_type";s:4:"help";s:51:"Search only selected record type in the application";}s:4:"span";s:10:",type_hide";}s:4:"span";s:11:",box_inline";s:4:"name";s:11:"search_line";i:3;a:4:{s:4:"type";s:4:"text";s:4:"name";s:5:"query";s:4:"blur";s:5:"@blur";s:4:"size";s:21:"$cont[extra],,,search";}i:4;a:5:{s:4:"type";s:6:"button";s:4:"name";s:6:"search";s:5:"label";s:1:">";s:4:"help";s:30:"Click here to start the search";s:7:"onclick";s:345:"xajax_doXMLHTTP(\'etemplate.link_widget.ajax_search\',document.getElementById(form::name(\'app\')).value,document.getElementById(form::name(\'link_type\')).value,document.getElementById(form::name(\'query\')).value,form::name(\'id\'),form::name(\'search_line\'),form::name(\'select_line\'),form::name(\'query\'),this.form.etemplate_exec_id.value); return false;";}}i:2;a:5:{s:4:"type";s:3:"box";s:4:"size";s:1:"1";s:4:"span";s:22:",link_select link_hide";i:1;a:4:{s:4:"type";s:6:"select";s:4:"name";s:2:"id";s:8:"onchange";s:254:"if (this.value == \'\') { document.getElementById(form::name(\'search_line\')).style.display=\'inline\'; document.getElementById(form::name(\'select_line\')).style.display=\'none\';} else if (this.options[0].value == \' \' || this.value == 0) { this.form.submit(); }";s:7:"no_lang";s:1:"1";}s:4:"name";s:11:"select_line";}s:4:"span";s:7:",@class";}}','size' => '','style' => '.link_hide { display: none; }
.type_hide { display: none;}
.type_show { display: inline;}','modified' => '1258396333',);
@ -135,10 +135,10 @@ $templ_data[] = array('name' => 'etemplate.link_widget.list','template' => '','l
.note_following { font-style: italic; padding-left: 5px; }
','modified' => '1192470162',);
$templ_data[] = array('name' => 'etemplate.link_widget.search','template' => '','lang' => '','group' => '0','version' => '1.2.001','data' => 'a:2:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:5:{s:2:"c1";s:6:"row_on";s:2:"c3";s:7:"row_off";s:2:"h3";s:10:",@no_files";s:2:"c2";s:6:"row_on";s:2:"h2";s:6:",!@msg";}i:1;a:4:{s:1:"A";a:4:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"app";s:4:"help";s:26:"Select an App to search in";}s:1:"B";a:5:{s:4:"type";s:4:"text";s:4:"size";s:2:"32";s:4:"name";s:5:"query";s:4:"help";s:22:"Enter a search pattern";s:8:"tabindex";i:99;}s:1:"C";a:6:{s:4:"type";s:6:"button";s:5:"label";s:6:"Search";s:4:"name";s:6:"search";s:4:"help";s:30:"Click here to start the search";s:4:"span";s:3:"all";s:8:"tabindex";i:100;}s:1:"D";a:1:{s:4:"type";s:5:"label";}}i:2;a:4:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:4:"name";s:3:"msg";s:5:"align";s:6:"center";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}i:3;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:11:"Attach file";}s:1:"B";a:4:{s:4:"type";s:4:"file";s:4:"name";s:4:"file";s:4:"help";s:69:"Enter filename to upload and attach, use [Browse...] to search for it";s:4:"size";s:2:"12";}s:1:"C";a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Attach";s:4:"name";s:6:"attach";s:4:"help";s:29:"Click here to attach the file";}s:1:"D";a:4:{s:4:"type";s:8:"checkbox";s:4:"name";s:7:"comment";s:4:"help";s:28:"optional note about the Link";s:8:"onchange";s:81:"set_style_by_class(\'*\',\'hide_comment\',\'display\',this.checked ? \'block\' : \'none\');";}}}s:4:"rows";i:3;s:4:"cols";i:4;}i:1;a:6:{s:4:"type";s:4:"text";s:4:"name";s:6:"remark";s:4:"size";s:5:"50,50";s:4:"span";s:13:",hide_comment";s:5:"label";s:7:"Comment";s:4:"help";s:28:"optional note about the Link";}}','size' => '','style' => '.redItalic { font-style: italic; color: red; }
$templ_data[] = array('name' => 'etemplate.link_widget.search','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:2:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:5:{s:2:"c1";s:6:"row_on";s:2:"c3";s:7:"row_off";s:2:"h3";s:10:",@no_files";s:2:"c2";s:6:"row_on";s:2:"h2";s:6:",!@msg";}i:1;a:4:{s:1:"A";a:4:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"app";s:4:"help";s:26:"Select an App to search in";}s:1:"B";a:5:{s:4:"type";s:4:"text";s:4:"size";s:11:"32,,,search";s:4:"name";s:5:"query";s:4:"help";s:22:"Enter a search pattern";s:8:"tabindex";i:99;}s:1:"C";a:6:{s:4:"type";s:6:"button";s:5:"label";s:6:"Search";s:4:"name";s:6:"search";s:4:"help";s:30:"Click here to start the search";s:4:"span";s:3:"all";s:8:"tabindex";i:100;}s:1:"D";a:1:{s:4:"type";s:5:"label";}}i:2;a:4:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:4:"name";s:3:"msg";s:5:"align";s:6:"center";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}i:3;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:11:"Attach file";}s:1:"B";a:4:{s:4:"type";s:4:"file";s:4:"name";s:4:"file";s:4:"help";s:69:"Enter filename to upload and attach, use [Browse...] to search for it";s:4:"size";s:2:"12";}s:1:"C";a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Attach";s:4:"name";s:6:"attach";s:4:"help";s:29:"Click here to attach the file";}s:1:"D";a:4:{s:4:"type";s:8:"checkbox";s:4:"name";s:7:"comment";s:4:"help";s:28:"optional note about the Link";s:8:"onchange";s:81:"set_style_by_class(\'*\',\'hide_comment\',\'display\',this.checked ? \'block\' : \'none\');";}}}s:4:"rows";i:3;s:4:"cols";i:4;}i:1;a:6:{s:4:"type";s:4:"text";s:4:"name";s:6:"remark";s:4:"size";s:5:"50,50";s:4:"span";s:13:",hide_comment";s:5:"label";s:7:"Comment";s:4:"help";s:28:"optional note about the Link";}}','size' => '','style' => '.redItalic { font-style: italic; color: red; }
.hide_comment { display: none; }','modified' => '1131608831',);
$templ_data[] = array('name' => 'etemplate.link_widget.to','template' => '','lang' => '','group' => '0','version' => '1.7.004','data' => 'a:1:{i:0;a:7:{s:4:"rows";s:1:"1";s:4:"cols";s:1:"1";s:4:"type";s:3:"box";s:4:"size";s:1:"3";i:1;a:5:{s:4:"name";s:11:"search_line";s:4:"size";s:6:"2,,0,0";s:4:"type";s:3:"box";i:1;a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";i:1;a:5:{s:5:"label";s:13:"@search_label";s:4:"name";s:3:"app";s:4:"type";s:9:"link-apps";s:4:"help";s:28:"Select application to search";s:8:"onchange";s:177:"xajax_doXMLHTTP(\'etemplate.link_widget.ajax_get_types\',document.getElementById(form::name(\'app\')).value,form::name(\'link_type\'),this.form.etemplate_exec_id.value); return false;";}i:2;a:5:{s:4:"type";s:3:"box";s:4:"name";s:8:"type_box";s:4:"size";s:1:"1";i:1;a:3:{s:4:"type";s:6:"select";s:4:"name";s:9:"link_type";s:4:"help";s:51:"Search only selected record type in the application";}s:4:"span";s:10:",type_hide";}i:3;a:3:{s:4:"blur";s:6:"Search";s:4:"name";s:5:"query";s:4:"type";s:4:"text";}i:4;a:5:{s:5:"label";s:1:">";s:7:"onclick";s:345:"xajax_doXMLHTTP(\'etemplate.link_widget.ajax_search\',document.getElementById(form::name(\'app\')).value,document.getElementById(form::name(\'link_type\')).value,document.getElementById(form::name(\'query\')).value,form::name(\'id\'),form::name(\'search_line\'),form::name(\'select_line\'),form::name(\'query\'),this.form.etemplate_exec_id.value); return false;";s:4:"name";s:12:"start_search";s:4:"type";s:6:"button";s:4:"help";s:30:"Click here to start the search";}}i:2;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:1:{s:2:"h1";s:10:",@no_files";}i:1;a:3:{s:1:"A";a:5:{s:5:"label";s:11:"attach file";s:4:"name";s:4:"file";s:4:"size";s:2:"12";s:4:"type";s:4:"file";s:4:"help";s:69:"Enter filename to upload and attach, use [Browse...] to search for it";}s:1:"B";a:4:{s:5:"label";s:6:"Attach";s:4:"name";s:6:"attach";s:4:"type";s:6:"button";s:4:"help";s:29:"Click here to attach the file";}s:1:"C";a:4:{s:8:"onchange";s:88:"document.getElementById(form::name(\'remark\')).style.display=this.checked?\'block\':\'none\';";s:4:"name";s:7:"comment";s:4:"type";s:8:"checkbox";s:4:"help";s:28:"optional note about the Link";}}}s:4:"cols";i:3;s:4:"rows";i:1;}}i:2;a:7:{s:5:"class";s:21:"link_select link_hide";s:4:"name";s:11:"select_line";s:4:"type";s:3:"box";s:4:"size";s:1:"2";i:1;a:4:{s:8:"onchange";s:227:"if (!this.value) { document.getElementById(form::name(\'search_line\')).style.display=\'inline\'; document.getElementById(form::name(\'remark\')).style.display=document.getElementById(form::name(\'select_line\')).style.display=\'none\';}";s:7:"no_lang";s:1:"1";s:4:"name";s:2:"id";s:4:"type";s:6:"select";}i:2;a:4:{s:5:"label";s:4:"Link";s:4:"name";s:6:"create";s:4:"type";s:6:"button";s:4:"help";s:29:"click here to create the Link";}s:4:"span";s:23:" ,link_select link_hide";}i:3;a:6:{s:4:"size";s:5:"50,50";s:4:"blur";s:7:"Comment";s:4:"name";s:6:"remark";s:4:"type";s:4:"text";s:4:"help";s:28:"optional note about the Link";s:4:"span";s:13:",hide_comment";}}}','size' => '','style' => '.link_select { white-space: nowrap; }
$templ_data[] = array('name' => 'etemplate.link_widget.to','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:7:{s:4:"rows";s:1:"1";s:4:"cols";s:1:"1";s:4:"type";s:3:"box";s:4:"size";s:1:"3";i:1;a:5:{s:4:"name";s:11:"search_line";s:4:"size";s:6:"2,,0,0";s:4:"type";s:3:"box";i:1;a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";i:1;a:5:{s:5:"label";s:13:"@search_label";s:4:"name";s:3:"app";s:4:"type";s:9:"link-apps";s:4:"help";s:28:"Select application to search";s:8:"onchange";s:177:"xajax_doXMLHTTP(\'etemplate.link_widget.ajax_get_types\',document.getElementById(form::name(\'app\')).value,form::name(\'link_type\'),this.form.etemplate_exec_id.value); return false;";}i:2;a:5:{s:4:"type";s:3:"box";s:4:"name";s:8:"type_box";s:4:"size";s:1:"1";i:1;a:3:{s:4:"type";s:6:"select";s:4:"name";s:9:"link_type";s:4:"help";s:51:"Search only selected record type in the application";}s:4:"span";s:10:",type_hide";}i:3;a:4:{s:4:"blur";s:6:"Search";s:4:"name";s:5:"query";s:4:"type";s:4:"text";s:4:"size";s:9:",,,search";}i:4;a:5:{s:5:"label";s:1:">";s:7:"onclick";s:345:"xajax_doXMLHTTP(\'etemplate.link_widget.ajax_search\',document.getElementById(form::name(\'app\')).value,document.getElementById(form::name(\'link_type\')).value,document.getElementById(form::name(\'query\')).value,form::name(\'id\'),form::name(\'search_line\'),form::name(\'select_line\'),form::name(\'query\'),this.form.etemplate_exec_id.value); return false;";s:4:"name";s:12:"start_search";s:4:"type";s:6:"button";s:4:"help";s:30:"Click here to start the search";}}i:2;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:1:{s:2:"h1";s:10:",@no_files";}i:1;a:3:{s:1:"A";a:5:{s:5:"label";s:11:"attach file";s:4:"name";s:4:"file";s:4:"size";s:2:"12";s:4:"type";s:4:"file";s:4:"help";s:69:"Enter filename to upload and attach, use [Browse...] to search for it";}s:1:"B";a:4:{s:5:"label";s:6:"Attach";s:4:"name";s:6:"attach";s:4:"type";s:6:"button";s:4:"help";s:29:"Click here to attach the file";}s:1:"C";a:4:{s:8:"onchange";s:88:"document.getElementById(form::name(\'remark\')).style.display=this.checked?\'block\':\'none\';";s:4:"name";s:7:"comment";s:4:"type";s:8:"checkbox";s:4:"help";s:28:"optional note about the Link";}}}s:4:"cols";i:3;s:4:"rows";i:1;}}i:2;a:7:{s:5:"class";s:21:"link_select link_hide";s:4:"name";s:11:"select_line";s:4:"type";s:3:"box";s:4:"size";s:1:"2";i:1;a:4:{s:8:"onchange";s:227:"if (!this.value) { document.getElementById(form::name(\'search_line\')).style.display=\'inline\'; document.getElementById(form::name(\'remark\')).style.display=document.getElementById(form::name(\'select_line\')).style.display=\'none\';}";s:7:"no_lang";s:1:"1";s:4:"name";s:2:"id";s:4:"type";s:6:"select";}i:2;a:4:{s:5:"label";s:4:"Link";s:4:"name";s:6:"create";s:4:"type";s:6:"button";s:4:"help";s:29:"click here to create the Link";}s:4:"span";s:23:" ,link_select link_hide";}i:3;a:6:{s:4:"size";s:5:"50,50";s:4:"blur";s:7:"Comment";s:4:"name";s:6:"remark";s:4:"type";s:4:"text";s:4:"help";s:28:"optional note about the Link";s:4:"span";s:13:",hide_comment";}}}','size' => '','style' => '.link_select { white-space: nowrap; }
.link_hide { display: none; }
.type_hide { display: none; }
.hide_comment input { display: none; width: 99%; }','modified' => '1260292296',);
@ -148,7 +148,7 @@ $templ_data[] = array('name' => 'etemplate.nextmatch_widget','template' => '','l
$templ_data[] = array('name' => 'etemplate.nextmatch_widget.header_only','template' => '','lang' => '','group' => '0','version' => '0.9.15.002','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:2:{s:1:"A";s:3:"50%";s:1:"B";s:3:"50%";}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"name";s:12:"@header_left";}s:1:"B";a:3:{s:4:"type";s:8:"template";s:5:"align";s:5:"right";s:4:"name";s:13:"@header_right";}}i:2;a:2:{s:1:"A";a:5:{s:4:"type";s:8:"template";s:4:"size";s:4:"rows";s:4:"span";s:3:"all";s:5:"align";s:6:"center";s:4:"name";s:9:"@template";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:2;s:4:"cols";i:2;s:4:"size";s:4:"100%";}}','size' => '100%','style' => '.activ_sortcolumn { color: red; font-weight: bold; }
.inactiv_sortcolumn { color: green; font-weight: normal; }','modified' => '1075985789',);
$templ_data[] = array('name' => 'etemplate.nextmatch_widget.nm_row','template' => '','lang' => '','group' => '0','version' => '1.7.001','data' => 'a:1:{i:0;a:7:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:12:{s:1:"A";s:2:"1%";s:1:"B";s:2:"1%";s:1:"D";s:3:"30%";s:1:"G";s:2:"5%";s:1:"I";s:2:"1%";s:2:"c1";s:2:"th";s:1:"C";s:3:"30%";s:1:"F";s:3:"15%";s:1:"J";s:2:"1%";s:1:"K";s:20:",@no_columnselection";s:1:"L";s:15:",@no_csv_export";s:2:"h1";s:8:",,header";}i:1;a:12:{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:7:{s:4:"type";s:10:"select-cat";s:4:"size";s:37:"-1,,,$cont[cat_app],$cont[cat_parent]";s:5:"label";s:8:"Category";s:4:"name";s:6:"cat_id";s:8:"onchange";i:1;s:4:"help";s:17:"select a Category";s:5:"align";s:6:"center";}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:6:"center";s:4:"name";s:7:"filter2";s:8:"onchange";s:17:"@filter2_onchange";s:4:"help";s:13:"@filter2_help";}s:1:"F";a:6:{s:4:"type";s:4:"text";s:5:"align";s:5:"right";s:4:"name";s:6:"search";s:8:"onchange";i:1;s:4:"help";s:28:"a pattern to be searched for";s:4:"size";s:2:"12";}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:6:{s:4:"type";s:6:"select";s:4:"name";s:8:"num_rows";s:7:"no_lang";s:1:"1";s:8:"onchange";i:1;s:4:"help";s:37:"How many entries should the list show";s:4:"span";s:12:",nm_num_rows";}s:1:"I";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:"J";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:1:"K";a:5:{s:4:"type";s:3:"box";s:4:"size";s:1:"2";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:10:"selectcols";s:5:"label";s:14:"Select columns";s:4:"help";s:41:"Select the columns to display in the list";i:1;a:6:{s:4:"type";s:3:"box";s:4:"size";s:10:"selectcols";s:5:"label";s:14:"Select columns";s:4:"help";s:41:"Select the columns to display in the list";s:7:"onclick";s:174:"document.getElementById(form::name(\'colselection\')).style.display=document.getElementById(form::name(\'colselection\')).style.display==\'block\' ? \'none\' : \'block\'; return false;";s:12:"onclick_type";s:6:"custom";}s:7:"onclick";s:174:"document.getElementById(form::name(\'colselection\')).style.display=document.getElementById(form::name(\'colselection\')).style.display==\'block\' ? \'none\' : \'block\'; return false;";}i:2;a:7:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"2";i:1;a:5:{s:4:"type";s:6:"select";s:4:"size";s:3:"012";s:4:"name";s:10:"selectcols";s:4:"help";s:41:"Select the columns to display in the list";s:7:"no_lang";s:1:"1";}i:2;a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:8:"savecols";i:1;a:1:{s:4:"type";s:4:"hbox";}}i:2;a:4:{s:4:"type";s:6:"button";s:4:"name";s:6:"cancel";s:5:"label";s:6:"Cancel";s:7:"onclick";s:87:"document.getElementById(form::name(\'colselection\')).style.display=\'none\'; return false;";}i:3;a:4:{s:4:"type";s:8:"checkbox";s:4:"name";s:13:"default_prefs";s:5:"label";s:10:"as default";s:4:"help";s:58:"Save selected columns as default preference for all users.";}}s:4:"span";s:13:",colselection";s:4:"name";s:12:"colselection";s:5:"label";s:14:"Select columns";}s:4:"span";s:11:",selectcols";}s:1:"L";a:4:{s:4:"type";s:6:"button";s:4:"name";s:6:"export";s:4:"size";s:8:"filesave";s:5:"label";s:10:"CSV Export";}}}s:4:"rows";i:1;s:4:"cols";i:12;s:4:"size";s:11:"100%,,,,0,3";s:4:"span";s:17:",nextmatch_header";s:7:"options";a:3:{i:0;s:4:"100%";i:4;s:1:"0";i:5;s:1:"3";}}}','size' => '100%,,,,0,3','style' => '','modified' => '1113294054',);
$templ_data[] = array('name' => 'etemplate.nextmatch_widget.nm_row','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:7:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:12:{s:1:"A";s:2:"1%";s:1:"B";s:2:"1%";s:1:"D";s:3:"30%";s:1:"G";s:2:"5%";s:1:"I";s:2:"1%";s:2:"c1";s:2:"th";s:1:"C";s:3:"30%";s:1:"F";s:3:"15%";s:1:"J";s:2:"1%";s:1:"K";s:20:",@no_columnselection";s:1:"L";s:15:",@no_csv_export";s:2:"h1";s:8:",,header";}i:1;a:12:{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:7:{s:4:"type";s:10:"select-cat";s:4:"size";s:37:"-1,,,$cont[cat_app],$cont[cat_parent]";s:5:"label";s:8:"Category";s:4:"name";s:6:"cat_id";s:8:"onchange";i:1;s:4:"help";s:17:"select a Category";s:5:"align";s:6:"center";}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:6:"center";s:4:"name";s:7:"filter2";s:8:"onchange";s:17:"@filter2_onchange";s:4:"help";s:13:"@filter2_help";}s:1:"F";a:7:{s:4:"type";s:4:"text";s:5:"align";s:5:"right";s:4:"name";s:6:"search";s:8:"onchange";i:1;s:4:"help";s:28:"a pattern to be searched for";s:4:"size";s:11:"12,,,search";s:4:"blur";s:6:"Search";}s:1:"G";a:4:{s:4:"type";s:6:"button";s:5:"label";s:1:">";s:4:"name";s:12:"start_search";s:4:"help";s:19:"to start the search";}s:1:"H";a:6:{s:4:"type";s:6:"select";s:4:"name";s:8:"num_rows";s:7:"no_lang";s:1:"1";s:8:"onchange";i:1;s:4:"help";s:37:"How many entries should the list show";s:4:"span";s:12:",nm_num_rows";}s:1:"I";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:"J";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:1:"K";a:5:{s:4:"type";s:3:"box";s:4:"size";s:1:"2";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:10:"selectcols";s:5:"label";s:14:"Select columns";s:4:"help";s:41:"Select the columns to display in the list";i:1;a:6:{s:4:"type";s:3:"box";s:4:"size";s:10:"selectcols";s:5:"label";s:14:"Select columns";s:4:"help";s:41:"Select the columns to display in the list";s:7:"onclick";s:174:"document.getElementById(form::name(\'colselection\')).style.display=document.getElementById(form::name(\'colselection\')).style.display==\'block\' ? \'none\' : \'block\'; return false;";s:12:"onclick_type";s:6:"custom";}s:7:"onclick";s:174:"document.getElementById(form::name(\'colselection\')).style.display=document.getElementById(form::name(\'colselection\')).style.display==\'block\' ? \'none\' : \'block\'; return false;";}i:2;a:7:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"2";i:1;a:5:{s:4:"type";s:6:"select";s:4:"size";s:3:"012";s:4:"name";s:10:"selectcols";s:4:"help";s:41:"Select the columns to display in the list";s:7:"no_lang";s:1:"1";}i:2;a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:8:"savecols";i:1;a:1:{s:4:"type";s:4:"hbox";}}i:2;a:4:{s:4:"type";s:6:"button";s:4:"name";s:6:"cancel";s:5:"label";s:6:"Cancel";s:7:"onclick";s:87:"document.getElementById(form::name(\'colselection\')).style.display=\'none\'; return false;";}i:3;a:4:{s:4:"type";s:8:"checkbox";s:4:"name";s:13:"default_prefs";s:5:"label";s:10:"as default";s:4:"help";s:58:"Save selected columns as default preference for all users.";}}s:4:"span";s:13:",colselection";s:4:"name";s:12:"colselection";s:5:"label";s:14:"Select columns";}s:4:"span";s:11:",selectcols";}s:1:"L";a:4:{s:4:"type";s:6:"button";s:4:"name";s:6:"export";s:4:"size";s:8:"filesave";s:5:"label";s:10:"CSV Export";}}}s:4:"rows";i:1;s:4:"cols";i:12;s:4:"size";s:11:"100%,,,,0,3";s:4:"span";s:17:",nextmatch_header";s:7:"options";a:3:{i:0;s:4:"100%";i:4;s:1:"0";i:5;s:1:"3";}}}','size' => '100%,,,,0,3','style' => '','modified' => '1113294054',);
$templ_data[] = array('name' => 'etemplate.nm-test','template' => '','lang' => '','group' => '0','version' => '','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:1:{s:1:"A";a:3:{s:4:"type";s:9:"nextmatch";s:4:"name";s:2:"nm";s:4:"size";s:4:"rows";}}}s:4:"rows";i:1;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1248806355',);

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!-- $Id$ -->
<overlay>
<template id="etemplate.nextmatch_widget.nm_row" template="" lang="" group="0" version="1.7.001">
<template id="etemplate.nextmatch_widget.nm_row" template="" lang="" group="0" version="1.9.001">
<grid width="100%" spacing="0" padding="3">
<columns>
<column width="1%"/>
@ -30,8 +30,8 @@
<menulist>
<menupopup align="center" statustext="@filter2_help" label="@filter2_label" id="filter2" onchange="@filter2_onchange"/>
</menulist>
<textbox align="right" statustext="a pattern to be searched for" id="search" onchange="1" size="12"/>
<button statustext="to start the search" label="Search" id="start_search"/>
<textbox align="right" blur="Search" statustext="a pattern to be searched for" id="search" onchange="1" size="12" validator=",search"/>
<button statustext="to start the search" label="&gt;" id="start_search"/>
<menulist class="nm_num_rows">
<menupopup statustext="How many entries should the list show" id="num_rows" no_lang="1" onchange="1"/>
</menulist>

View File

@ -672,7 +672,7 @@ class html
case '';
break;
default:
$type = 'type="'.$type.'"';
$type = 'type="'.htmlspecialchars($type).'"';
}
return "<input $type name=\"$name\" value=\"".self::htmlspecialchars($value)."\" $options />\n";
}