diff --git a/etemplate/inc/class.nextmatch_widget.inc.php b/etemplate/inc/class.nextmatch_widget.inc.php
index af3b990b3d..0e2c847b28 100644
--- a/etemplate/inc/class.nextmatch_widget.inc.php
+++ b/etemplate/inc/class.nextmatch_widget.inc.php
@@ -25,6 +25,7 @@
* 'no_filter2' => True// I disable the 2. filter (params are the same as for filter)
* 'no_cat' => True// I disable the cat-selectbox
* 'cat_app' => // I application the cat's should be from, default app in get_rows
+ * 'cat_is_select' => // I true||'no_lang' use selectbox instead of category selection, default null
* 'template' => // I template to use for the rows, if not set via options
* 'header_left' => // I template to show left of the range-value, left-aligned (optional)
* 'header_right' => // I template to show right of the range-value, right-aligned (optional)
@@ -60,6 +61,7 @@
* 'actions' => // I array with actions, see nextmatch_widget::egw_actions
* 'action_links' => // I array with enabled actions or ones which should be checked if they are enabled
* optional, default id of all first level actions plus the ones with enabled='javaScript:...'
+ * 'action_var' => 'action' // I name of var to return choosen action, default 'action'
* 'action' => // O string selected action
* 'selected' => // O array with selected id's
* 'checkboxes' => // O array with checkbox id as key and boolean checked value
@@ -372,6 +374,12 @@ class nextmatch_widget
// keep the editor away from the generated tmpls
$nextmatch->no_onclick = true;
+ // category is a selectbox, not a category select widget
+ if ($value['cat_is_select'] && ($cat_widget =& $nextmatch->get_widget_by_name('cat_id')))
+ {
+ $cat_widget['type'] = 'select';
+ if ($value['cat_is_select'] == 'no_lang') $cat_widget['no_lang'] = true;
+ }
if ($value['lettersearch'])
{
$lettersearch =& $nextmatch->get_widget_by_name('lettersearch'); // hbox for the letters
@@ -517,7 +525,8 @@ class nextmatch_widget
$value['rows']['_row_id'] =& $value['row_id'];
// values are NOT yet used on client side, but give warnings if array are not converted to strings
- $value['action'] = $value['checkboxes'] = $value['selected'] = '';
+ $extension_data['action_var'] = !empty($value['action_var']) ? $value['action_var'] : 'action';
+ $value[$extension_data['action_var']] = $value['checkboxes'] = $value['selected'] = '';
/*
$selected = $checkboxes = array();
foreach((array)$values['selected'] as $id)
@@ -604,6 +613,8 @@ class nextmatch_widget
'delete' => 'delete',
'cat' => 'attach', // add as category icon to api
'document' => 'etemplate/merge',
+ 'print'=> 'print',
+ 'copy' => 'copy',
);
$first_level = !$action_links; // add all first level actions
@@ -1345,8 +1356,8 @@ class nextmatch_widget
{
self::csv_export($extension_data);
}
-
// allows return selected as array
+ $value[$extension_data['action_var']] = $value['nm_action']; //unset($value['nm_action']);
$value['selected'] = $value['selected'] === '' ? array() : boetemplate::csv_split($value['selected']);
$checkboxes = $value['checkboxes'];
$value['checkboxes'] = array();
diff --git a/etemplate/js/nextmatch_action.js b/etemplate/js/nextmatch_action.js
index af951ba436..32010e19c4 100644
--- a/etemplate/js/nextmatch_action.js
+++ b/etemplate/js/nextmatch_action.js
@@ -156,7 +156,7 @@ function nm_action(_action, _senders)
checkboxes_elem.value += checkboxes[i].id + ":" + (checkboxes[i].checked ? "1" : "0") + ";";
var form = document.getElementsByName("eTemplate")[0];
- document.getElementById('exec[nm][action]').value = _action.id;
+ document.getElementById('exec[nm][nm_action]').value = _action.id;
document.getElementById('exec[nm][selected]').value = ids;
if (typeof _action.data.button != 'undefined')
{
diff --git a/etemplate/setup/etemplates.inc.php b/etemplate/setup/etemplates.inc.php
index 3c92674aca..08672ace50 100644
--- a/etemplate/setup/etemplates.inc.php
+++ b/etemplate/setup/etemplates.inc.php
@@ -1,14 +1,14 @@
'etemplate.link_widget.to','template' => '','lan
.type_hide { display: none; }
.hide_comment input { display: none; width: 99%; }','modified' => '1260292296',);
-$templ_data[] = array('name' => 'etemplate.nextmatch_widget','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:4:{i:0;a:2:{s:4:"type";s:6:"hidden";s:4:"name";s:6:"action";}i:1;a:2:{s:4:"type";s:6:"hidden";s:4:"name";s:8:"selected";}i:2;a:2:{s:4:"type";s:6:"hidden";s:4:"name";s:10:"checkboxes";}i:3;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:8:{s:1:"A";s:3:"35%";s:1:"C";s:3:"35%";s:2:"c1";s:7:"noPrint";s:2:"c2";s:7:"noPrint";s:2:"c5";s:7:"noPrint";s:2:"h5";s:13:",!@bottom_too";s:2:"h3";s:15:",!@lettersearch";s:2:"c3";s:7:"noPrint";}i:1;a:3:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"name";s:12:"@header_left";}s:1:"B";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";s:5:"align";s:6:"center";i:1;a:4:{s:4:"type";s:5:"label";s:5:"label";s:7:"showing";s:7:"no_lang";s:1:"1";s:4:"name";s:5:"range";}i:2;a:4:{s:4:"type";s:5:"label";s:5:"label";s:2:"of";s:7:"no_lang";s:1:"1";s:4:"name";s:5:"total";}s:4:"span";s:16:",nextmatch-range";}s:1:"C";a:3:{s:4:"type";s:8:"template";s:5:"align";s:5:"right";s:4:"name";s:13:"@header_right";}}i:2;a:3:{s:1:"A";a:4:{s:4:"type";s:8:"template";s:4:"span";s:3:"all";s:5:"align";s:6:"center";s:4:"name";s:33:"etemplate.nextmatch_widget.nm_row";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:8:"onchange";s:1:"1";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:3;a:3:{s:1:"A";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"1";s:4:"span";s:3:"all";s:4:"name";s:12:"lettersearch";i:1;a:6:{s:4:"type";s:5:"label";s:5:"label";s:3:"All";s:5:"align";s:5:"right";s:4:"name";s:3:"all";s:6:"needed";s:1:"1";s:4:"span";s:20:",lettersearch_active";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:4;a:3:{s:1:"A";a:5:{s:4:"type";s:8:"template";s:4:"size";s:4:"rows";s:4:"span";s:20:"all,egwGridView_grid";s:5:"align";s:6:"center";s:4:"name";s:9:"@template";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:5;a:3:{s:1:"A";a:5:{s:4:"type";s:8:"template";s:4:"size";s:6:"bottom";s:4:"span";s:3:"all";s:5:"align";s:6:"center";s:4:"name";s:33:"etemplate.nextmatch_widget.nm_row";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:5;s:4:"cols";i:3;s:4:"size";s:4:"100%";}}','size' => '100%','style' => '','modified' => '1155978375',);
+$templ_data[] = array('name' => 'etemplate.nextmatch_widget','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:4:{i:0;a:2:{s:4:"type";s:6:"hidden";s:4:"name";s:9:"nm_action";}i:1;a:2:{s:4:"type";s:6:"hidden";s:4:"name";s:8:"selected";}i:2;a:2:{s:4:"type";s:6:"hidden";s:4:"name";s:10:"checkboxes";}i:3;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:8:{s:1:"A";s:3:"35%";s:1:"C";s:3:"35%";s:2:"c1";s:7:"noPrint";s:2:"c2";s:7:"noPrint";s:2:"c5";s:7:"noPrint";s:2:"h5";s:13:",!@bottom_too";s:2:"h3";s:15:",!@lettersearch";s:2:"c3";s:7:"noPrint";}i:1;a:3:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"name";s:12:"@header_left";}s:1:"B";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";s:5:"align";s:6:"center";i:1;a:4:{s:4:"type";s:5:"label";s:5:"label";s:7:"showing";s:7:"no_lang";s:1:"1";s:4:"name";s:5:"range";}i:2;a:4:{s:4:"type";s:5:"label";s:5:"label";s:2:"of";s:7:"no_lang";s:1:"1";s:4:"name";s:5:"total";}s:4:"span";s:16:",nextmatch-range";}s:1:"C";a:3:{s:4:"type";s:8:"template";s:5:"align";s:5:"right";s:4:"name";s:13:"@header_right";}}i:2;a:3:{s:1:"A";a:4:{s:4:"type";s:8:"template";s:4:"span";s:3:"all";s:5:"align";s:6:"center";s:4:"name";s:33:"etemplate.nextmatch_widget.nm_row";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:8:"onchange";s:1:"1";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:3;a:3:{s:1:"A";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"1";s:4:"span";s:3:"all";s:4:"name";s:12:"lettersearch";i:1;a:6:{s:4:"type";s:5:"label";s:5:"label";s:3:"All";s:5:"align";s:5:"right";s:4:"name";s:3:"all";s:6:"needed";s:1:"1";s:4:"span";s:20:",lettersearch_active";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:4;a:3:{s:1:"A";a:5:{s:4:"type";s:8:"template";s:4:"size";s:4:"rows";s:4:"span";s:20:"all,egwGridView_grid";s:5:"align";s:6:"center";s:4:"name";s:9:"@template";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:5;a:3:{s:1:"A";a:5:{s:4:"type";s:8:"template";s:4:"size";s:6:"bottom";s:4:"span";s:3:"all";s:5:"align";s:6:"center";s:4:"name";s:33:"etemplate.nextmatch_widget.nm_row";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:5;s:4:"cols";i:3;s:4:"size";s:4:"100%";}}','size' => '100%','style' => '','modified' => '1155978375',);
$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',);
diff --git a/etemplate/templates/default/nextmatch_widget.xet b/etemplate/templates/default/nextmatch_widget.xet
index 43bb46d16b..adc2fb185c 100644
--- a/etemplate/templates/default/nextmatch_widget.xet
+++ b/etemplate/templates/default/nextmatch_widget.xet
@@ -19,43 +19,43 @@
-
-
+
+
-
+
-
+
-
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
@@ -68,26 +68,26 @@
-
-
+
+
-
+
-
-
+
+
-
+
-
+