*** empty log message ***

This commit is contained in:
sebastian 2005-02-08 15:10:09 +00:00
parent a261746cb8
commit d81941a8c8
13 changed files with 89 additions and 49 deletions

View File

@ -23,7 +23,7 @@
Author : $Author: sebastian $ 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 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/htmlUI/var/Attic/conf.php,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/

View File

@ -2979,7 +2979,7 @@
* libs/Smarty.class.php * libs/Smarty.class.php
libs/Smarty_Compiler.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 <messju@lammfellpuschen.de> 2003-03-31 Messju Mohr <messju@lammfellpuschen.de>

View File

@ -25,7 +25,7 @@
* @package Smarty * @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 * Config file reading class

View File

@ -30,7 +30,7 @@
* @version 2.6.6 * @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 * DIR_SEP isn't used anymore, but third party apps might

View File

@ -26,7 +26,7 @@
* @package Smarty * @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 * Template compiling class

View File

@ -1,4 +1,4 @@
<!-- $Id: smarty-dynamic-fancygroup.tpl,v 1.2 2005/02/08 11:39:31 sebastian Exp $ --> <!-- $Id: smarty-dynamic-fancygroup.tpl,v 1.3 2005/02/08 15:09:25 sebastian Exp $ -->
<tr> <tr>
<td valign="top" align="right"> <td valign="top" align="right">

View File

@ -1,4 +1,4 @@
<!-- $Id: smarty-dynamic-green.tpl,v 1.2 2005/02/08 11:39:31 sebastian Exp $ --> <!-- $Id: smarty-dynamic-green.tpl,v 1.3 2005/02/08 15:09:25 sebastian Exp $ -->
<tr> <tr>
<td align="right" valign="top" class="green"><b>{$element.label}:</b></td> <td align="right" valign="top" class="green"><b>{$element.label}:</b></td>

View File

@ -1,5 +1,5 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- $Id: smarty-dynamic.tpl,v 1.2 2005/02/08 11:39:31 sebastian Exp $ --> <!-- $Id: smarty-dynamic.tpl,v 1.3 2005/02/08 15:09:25 sebastian Exp $ -->
<html> <html>
<head> <head>
<title>Smarty template for Array renderer</title> <title>Smarty template for Array renderer</title>

View File

@ -0,0 +1,47 @@
<script type='text/javascript'>
{literal}
function displayRow(row)
{
document.getElementById('searchRow_' + row).style.visibility = 'visible';
document.getElementById('searchRow_' + row).style.height = '30px';
}
function addRow()
{
if (document.forms['search'].elements['counter'].value < document.forms['search'].elements['max_rows'].value) {
document.forms['search'].elements['counter'].value++;
displayRow(document.forms['search'].elements['counter'].value);
return true;
} else {
alert('Maximum reached');
return false;
}
}
function hideRow(row)
{
document.getElementById('searchRow_' + row).style.visibility = 'hidden';
document.getElementById('searchRow_' + row).style.height = '0px';
document.forms['search'].elements['row_' + Number(row) + '[0]'].value = '';
document.forms['search'].elements['row_' + Number(row) + '[1]'].value = '';
document.forms['search'].elements['row_' + Number(row) + '[2]'].value = '';
}
function dropRow(row)
{
var n;
for (n=row; n<document.forms['search'].elements['counter'].value; n++) {
document.forms['search'].elements['row_' + Number(n) + '[0]'].value = document.forms['search'].elements['row_' + (Number(n)+1) + '[0]'].value;
document.forms['search'].elements['row_' + Number(n) + '[1]'].value = document.forms['search'].elements['row_' + (Number(n)+1) + '[1]'].value;
document.forms['search'].elements['row_' + Number(n) + '[2]'].value = document.forms['search'].elements['row_' + (Number(n)+1) + '[2]'].value;
}
document.forms['search'].elements['counter'].value--;
hideRow(Number(n));
}
{/literal}
</script>

View File

@ -1,5 +1,7 @@
{*Smarty template*} {*Smarty template*}
{include file="script/search.js.tpl"}
{if $showSearchForm} {if $showSearchForm}
{literal} {literal}
<style type="text/css"> <style type="text/css">

View File

@ -1,5 +1,5 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- $Id: smarty-static.tpl,v 1.3 2005/02/08 11:39:31 sebastian Exp $ --> <!-- $Id: smarty-static.tpl,v 1.4 2005/02/08 15:09:25 sebastian Exp $ -->
<html> <html>
<head> <head>
<title>Smarty template for ArraySmarty renderer: 2 column layout example</title> <title>Smarty template for ArraySmarty renderer: 2 column layout example</title>

View File

@ -307,13 +307,12 @@ class uiBrowser extends uiBase {
*/ */
function getSearchForm($id, &$formdata, &$mask) function getSearchForm($id, &$formdata, &$mask)
{ {
$rowsBegin = ($formdata['counter'] ? $formdata['counter']-1 : UI_SEARCH_MIN_ROWS);
$form = new HTML_QuickForm('search', UI_STANDARD_FORM_METHOD, UI_BROWSER); $form = new HTML_QuickForm('search', UI_STANDARD_FORM_METHOD, UI_BROWSER);
$form->setConstants(array('id'=>$id, 'counter'=>$rowsBegin+1)); $form->setConstants(array('id'=>$id, 'counter'=>($formdata['counter'] ? $formdata['counter'] : UI_SEARCH_MIN_ROWS)));
foreach ($mask['mData']['tabs']['group']['group'] as $k=>$v) { foreach ($mask['mData']['tabs']['group']['group'] as $k=>$v) {
foreach ($mask['mData']['pages'][$v] as $val){ foreach ($mask['mData']['pages'][$v] as $val){
$options[$val['element']] = $val['element']; $col1[$val['element']] = $val['element'];
if (isset($val['relation'])) if (isset($val['relation']))
$col2[$val['element']] = $mask['relations'][$val['relation']]; $col2[$val['element']] = $mask['relations'][$val['relation']];
else else
@ -321,19 +320,17 @@ class uiBrowser extends uiBase {
}; };
}; };
$col1 = $options;
for($n=1; $n<=UI_SEARCH_MAX_ROWS; $n++) { for($n=1; $n<=UI_SEARCH_MAX_ROWS; $n++) {
unset ($group); unset ($group);
$form->addElement('static', 's1', NULL, "<div id='searchRow_$n'>"); $form->addElement('static', 's1', NULL, "<div id='searchRow_$n'>");
if ($n>$rowsBegin) $form->addElement('static', 's1_style', NULL, "<style type='text/css'>#searchRow_$n {visibility : hidden; height : 0px;}</style>"); if ($n>($formdata['counter'] ? $formdata['counter'] : UI_SEARCH_MIN_ROWS)) $form->addElement('static', 's1_style', NULL, "<style type='text/css'>#searchRow_$n {visibility : hidden; height : 0px;}</style>");
$sel = &$form->createElement('hierselect', "row_$n", NULL); $sel = &$form->createElement('hierselect', "row_$n", NULL);
$sel->setOptions(array($col1, $col2)); $sel->setOptions(array($col1, $col2));
$group[] = &$sel; $group[] = &$sel;
$group[] = &$form->createElement('text', 'criteria['.$n.']', NULL); $group[] = &$form->createElement('text', 'row_'.$n.'[2]', 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('button', "dropRow_$n", 'Drop', array('onClick' => "dropRow('$n')"));
$form->addGroup($group); $form->addGroup($group);
$form->addElement('static', 's2', NULL, "</div id='searchRow_$n'>"); $form->addElement('static', 's2', NULL, "</div id='searchRow_$n'>");
@ -363,16 +360,16 @@ class uiBrowser extends uiBase {
*/ */
function getSearchRes($id, &$formdata) function getSearchRes($id, &$formdata)
{ {
foreach ($formdata['criteria'] as $key=>$val) { foreach ($formdata as $key=>$val) {
if (strlen($val)) { if (is_array($val) && strlen($val[2])) {
$critArr[] = array('cat' => $formdata['searchBy'][$key], $critArr[] = array('cat' => $val[0],
'op' => $formdata['relation'][$key], 'op' => $val[1],
'val' => $val 'val' => $val[2]
); );
} }
} }
$searchCriteria = array('filetype' => 'audioclip', $searchCriteria = array('filetype' => 'audioclip',
'operator' => 'or', 'operator' => $formdata['operator'],
'conditions'=> $critArr 'conditions'=> $critArr
); );

View File

@ -683,31 +683,25 @@ $ui_fmask = array(
'type' => 'hidden' 'type' => 'hidden'
), ),
array( array(
'element' => 'addRow', 'element' => 'max_rows',
'type' => 'button', 'type' => 'hidden',
'label' => 'One more Row', 'constant' => UI_SEARCH_MAX_ROWS
'attributes' => array('onClick' => 'showSearchRow()'),
'groupit' => TRUE,
), ),
array( array(
'element' => 'JS', 'element' => 'operator',
'type' => 'static', 'type' => 'select',
'text' => "<script langauge='javascript'> 'label' => 'Operator',
function showSearchRow() 'options' => array(
{ 'or' => 'Or',
var counter; 'and' => 'And',
)
counter = document.forms['search'].elements['counter'].value ),
array(
if (counter <= ".UI_SEARCH_MAX_ROWS.") { 'element' => 'addrow',
document.forms['search'].elements['counter'].value = Number(counter)+1; 'type' => 'button',
showRow = new Function('show', \"document.getElementById('searchRow_\" + counter + \"').style.visibility='visible'; document.getElementById('searchRow_\" + counter + \"').style.height='30px';\"); 'label' => 'One more Row',
showRow(); 'attributes' => array('onClick' => 'addRow()'),
} else { 'groupit' => TRUE,
alert('Maximum reached');
}
}
</script>",
), ),
array( array(
'element' => 'doSearch', 'element' => 'doSearch',
@ -715,13 +709,13 @@ $ui_fmask = array(
'label' => 'Submit', 'label' => 'Submit',
'groupit' => TRUE, 'groupit' => TRUE,
), ),
array('group' => array('addRow', 'doSearch') array('group' => array('addrow', 'doSearch')
), ),
), ),
'relations' => array( 'relations' => array(
'standard' => array( 'standard' => array(
'full' => 'full',
'partial' => 'partial', 'partial' => 'partial',
'full' => 'full',
'prefix' => 'prefix', 'prefix' => 'prefix',
'=' => '=' , '=' => '=' ,
'<' => '<', '<' => '<',
@ -730,8 +724,8 @@ $ui_fmask = array(
'>=' => '>=' '>=' => '>='
), ),
1 => array( 1 => array(
'full' => 'full',
'partial' => 'partial', 'partial' => 'partial',
'full' => 'full',
'prefix' => 'prefix', 'prefix' => 'prefix',
'=' => '=' '=' => '='
), ),