diff --git a/livesupport/modules/htmlUI/var/conf.php b/livesupport/modules/htmlUI/var/conf.php index 80b65c494..38e75fafb 100644 --- a/livesupport/modules/htmlUI/var/conf.php +++ b/livesupport/modules/htmlUI/var/conf.php @@ -23,7 +23,7 @@ Author : $Author: sebastian $ - Version : $Revision: 1.3 $ + Version : $Revision: 1.4 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/htmlUI/var/Attic/conf.php,v $ ------------------------------------------------------------------------------*/ diff --git a/livesupport/modules/htmlUI/var/html/Smarty/ChangeLog b/livesupport/modules/htmlUI/var/html/Smarty/ChangeLog index 2fc522e97..f70bb2fa4 100644 --- a/livesupport/modules/htmlUI/var/html/Smarty/ChangeLog +++ b/livesupport/modules/htmlUI/var/html/Smarty/ChangeLog @@ -2979,7 +2979,7 @@ * libs/Smarty.class.php libs/Smarty_Compiler.class.php: - added CVS $Id: ChangeLog,v 1.2 2005/02/08 11:39:30 sebastian Exp $ + added CVS $Id: ChangeLog,v 1.3 2005/02/08 15:09:25 sebastian Exp $ 2003-03-31 Messju Mohr diff --git a/livesupport/modules/htmlUI/var/html/Smarty/libs/Config_File.class.php b/livesupport/modules/htmlUI/var/html/Smarty/libs/Config_File.class.php index b0283aa17..b329daecd 100644 --- a/livesupport/modules/htmlUI/var/html/Smarty/libs/Config_File.class.php +++ b/livesupport/modules/htmlUI/var/html/Smarty/libs/Config_File.class.php @@ -25,7 +25,7 @@ * @package Smarty */ -/* $Id: Config_File.class.php,v 1.2 2005/02/08 11:39:30 sebastian Exp $ */ +/* $Id: Config_File.class.php,v 1.3 2005/02/08 15:09:25 sebastian Exp $ */ /** * Config file reading class diff --git a/livesupport/modules/htmlUI/var/html/Smarty/libs/Smarty.class.php b/livesupport/modules/htmlUI/var/html/Smarty/libs/Smarty.class.php index f2a96ea5d..d3fc94a8a 100644 --- a/livesupport/modules/htmlUI/var/html/Smarty/libs/Smarty.class.php +++ b/livesupport/modules/htmlUI/var/html/Smarty/libs/Smarty.class.php @@ -30,7 +30,7 @@ * @version 2.6.6 */ -/* $Id: Smarty.class.php,v 1.2 2005/02/08 11:39:30 sebastian Exp $ */ +/* $Id: Smarty.class.php,v 1.3 2005/02/08 15:09:25 sebastian Exp $ */ /** * DIR_SEP isn't used anymore, but third party apps might diff --git a/livesupport/modules/htmlUI/var/html/Smarty/libs/Smarty_Compiler.class.php b/livesupport/modules/htmlUI/var/html/Smarty/libs/Smarty_Compiler.class.php index e818353c2..ebd81fe59 100644 --- a/livesupport/modules/htmlUI/var/html/Smarty/libs/Smarty_Compiler.class.php +++ b/livesupport/modules/htmlUI/var/html/Smarty/libs/Smarty_Compiler.class.php @@ -26,7 +26,7 @@ * @package Smarty */ -/* $Id: Smarty_Compiler.class.php,v 1.2 2005/02/08 11:39:31 sebastian Exp $ */ +/* $Id: Smarty_Compiler.class.php,v 1.3 2005/02/08 15:09:25 sebastian Exp $ */ /** * Template compiling class diff --git a/livesupport/modules/htmlUI/var/html/templates/examples/smarty-dynamic-fancygroup.tpl b/livesupport/modules/htmlUI/var/html/templates/examples/smarty-dynamic-fancygroup.tpl index ae6dea62f..c33353bf2 100644 --- a/livesupport/modules/htmlUI/var/html/templates/examples/smarty-dynamic-fancygroup.tpl +++ b/livesupport/modules/htmlUI/var/html/templates/examples/smarty-dynamic-fancygroup.tpl @@ -1,4 +1,4 @@ - + diff --git a/livesupport/modules/htmlUI/var/html/templates/examples/smarty-dynamic-green.tpl b/livesupport/modules/htmlUI/var/html/templates/examples/smarty-dynamic-green.tpl index c90e69dcc..bac39ae55 100644 --- a/livesupport/modules/htmlUI/var/html/templates/examples/smarty-dynamic-green.tpl +++ b/livesupport/modules/htmlUI/var/html/templates/examples/smarty-dynamic-green.tpl @@ -1,4 +1,4 @@ - + {$element.label}: diff --git a/livesupport/modules/htmlUI/var/html/templates/examples/smarty-dynamic.tpl b/livesupport/modules/htmlUI/var/html/templates/examples/smarty-dynamic.tpl index a4b3c61be..ac899e3b3 100644 --- a/livesupport/modules/htmlUI/var/html/templates/examples/smarty-dynamic.tpl +++ b/livesupport/modules/htmlUI/var/html/templates/examples/smarty-dynamic.tpl @@ -1,5 +1,5 @@ - + Smarty template for Array renderer diff --git a/livesupport/modules/htmlUI/var/html/templates/script/search.js.tpl b/livesupport/modules/htmlUI/var/html/templates/script/search.js.tpl new file mode 100644 index 000000000..3cb77758a --- /dev/null +++ b/livesupport/modules/htmlUI/var/html/templates/script/search.js.tpl @@ -0,0 +1,47 @@ + + diff --git a/livesupport/modules/htmlUI/var/html/templates/search.tpl b/livesupport/modules/htmlUI/var/html/templates/search.tpl index 68ba1eba3..e8e0e043b 100644 --- a/livesupport/modules/htmlUI/var/html/templates/search.tpl +++ b/livesupport/modules/htmlUI/var/html/templates/search.tpl @@ -1,5 +1,7 @@ {*Smarty template*} +{include file="script/search.js.tpl"} + {if $showSearchForm} {literal} "); + if ($n>($formdata['counter'] ? $formdata['counter'] : UI_SEARCH_MIN_ROWS)) $form->addElement('static', 's1_style', NULL, ""); $sel = &$form->createElement('hierselect', "row_$n", NULL); $sel->setOptions(array($col1, $col2)); $group[] = &$sel; - $group[] = &$form->createElement('text', 'criteria['.$n.']', NULL); - $group[] = &$form->createElement('button', "dropRow_$n", 'Drop', array('onClick' => "document.getElementById('searchRow_$n').style.visibility = 'hidden'; document.getElementById('searchRow_$n').style.height = '0px'")); + $group[] = &$form->createElement('text', 'row_'.$n.'[2]', NULL); + $group[] = &$form->createElement('button', "dropRow_$n", 'Drop', array('onClick' => "dropRow('$n')")); $form->addGroup($group); $form->addElement('static', 's2', NULL, ""); @@ -363,16 +360,16 @@ class uiBrowser extends uiBase { */ function getSearchRes($id, &$formdata) { - foreach ($formdata['criteria'] as $key=>$val) { - if (strlen($val)) { - $critArr[] = array('cat' => $formdata['searchBy'][$key], - 'op' => $formdata['relation'][$key], - 'val' => $val + foreach ($formdata as $key=>$val) { + if (is_array($val) && strlen($val[2])) { + $critArr[] = array('cat' => $val[0], + 'op' => $val[1], + 'val' => $val[2] ); } } $searchCriteria = array('filetype' => 'audioclip', - 'operator' => 'or', + 'operator' => $formdata['operator'], 'conditions'=> $critArr ); diff --git a/livesupport/modules/htmlUI/var/ui_fmask.inc.php b/livesupport/modules/htmlUI/var/ui_fmask.inc.php index 1e1543c24..afd155713 100644 --- a/livesupport/modules/htmlUI/var/ui_fmask.inc.php +++ b/livesupport/modules/htmlUI/var/ui_fmask.inc.php @@ -683,31 +683,25 @@ $ui_fmask = array( 'type' => 'hidden' ), array( - 'element' => 'addRow', - 'type' => 'button', - 'label' => 'One more Row', - 'attributes' => array('onClick' => 'showSearchRow()'), - 'groupit' => TRUE, + 'element' => 'max_rows', + 'type' => 'hidden', + 'constant' => UI_SEARCH_MAX_ROWS ), array( - 'element' => 'JS', - 'type' => 'static', - 'text' => "", + 'element' => 'operator', + 'type' => 'select', + 'label' => 'Operator', + 'options' => array( + 'or' => 'Or', + 'and' => 'And', + ) + ), + array( + 'element' => 'addrow', + 'type' => 'button', + 'label' => 'One more Row', + 'attributes' => array('onClick' => 'addRow()'), + 'groupit' => TRUE, ), array( 'element' => 'doSearch', @@ -715,13 +709,13 @@ $ui_fmask = array( 'label' => 'Submit', 'groupit' => TRUE, ), - array('group' => array('addRow', 'doSearch') + array('group' => array('addrow', 'doSearch') ), ), 'relations' => array( 'standard' => array( - 'full' => 'full', 'partial' => 'partial', + 'full' => 'full', 'prefix' => 'prefix', '=' => '=' , '<' => '<', @@ -730,8 +724,8 @@ $ui_fmask = array( '>=' => '>=' ), 1 => array( - 'full' => 'full', 'partial' => 'partial', + 'full' => 'full', 'prefix' => 'prefix', '=' => '=' ),