some fixes for the improved nextmatch

This commit is contained in:
Ralf Becker 2003-12-10 01:21:31 +00:00
parent b7f35e229d
commit b05fc623e2
9 changed files with 75 additions and 94 deletions

View File

@ -1,7 +1,7 @@
<?php
/**************************************************************************\
* phpGroupWare - EditableTemplates - Buiseness Objects *
* http://www.phpgroupware.org *
* eGroupWare - EditableTemplates - Buiseness Objects *
* http://www.eGroupWare.org *
* Written by Ralf Becker <RalfBecker@outdoor-training.de> *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
@ -605,9 +605,11 @@
/*!
@function set_array
@syntax set_array( &$arr,$idx,$val )
@author ralfbecker
@abstract sets $arr[$idx] = $val
@author ralfbecker
@syntax set_array( &$arr,$idx,$val )
@param $arr array the array to search, referenz as a referenz gets returned
@param $idx string the index, may contain sub-indices like a[b], see example below
@discussion This works for non-trival indexes like 'a[b][c]' too: $arr['a']['b']['c'] = $val;
@author ralfbecker
*/
@ -628,14 +630,16 @@
/*!
@function get_array
@syntax get_array( &$arr,$idx )
@author ralfbecker
@abstract return a var-param to $arr[$idx]
@author ralfbecker
@syntax get_array( &$arr,$idx,$referenz_into=False )
@param $arr array the array to search, referenz as a referenz gets returned
@param $idx string the index, may contain sub-indices like a[b], see example below
@param $referenz_into boolean default False, if True none-existing sub-arrays/-indices get created to be returned as referenz, else False is returned
@example $sub = get_array($arr,'a[b]'); $sub = 'c'; is equivalent to $arr['a']['b'] = 'c';
@discussion This works for non-trival indexes like 'a[b][c]' too: it returns &$arr[a][b][c]
@author ralfbecker
*/
function &get_array(&$arr,$idx)
function &get_array(&$arr,$idx,$referenz_into=False)
{
if (!is_array($arr))
{
@ -645,6 +649,10 @@
$pos = &$arr;
foreach($idxs as $idx)
{
if (!is_array($pos) && !$referenz_info)
{
return False;
}
$pos = &$pos[$idx];
}
return $pos;
@ -652,12 +660,13 @@
/*!
@function unset_array
@syntax unset_array( &$arr,$idx )
@author ralfbecker
@abstract unsets $arr[$idx]
@author ralfbecker
@syntax unset_array( &$arr,$idx )
@param $arr array the array to search, referenz as a referenz gets returned
@param $idx string the index, may contain sub-indices like a[b], see example below
@example unset_array($arr,'a[b]'); is equivalent to unset($arr['a']['b']);
@discussion This works for non-trival indexes like 'a[b][c]' too
@author ralfbecker
*/
function unset_array(&$arr,$idx)
{

View File

@ -1,7 +1,7 @@
<?php
/**************************************************************************\
* phpGroupWare - eTemplates - Editor *
* http://www.phpgroupware.org *
* eGroupWare - eTemplates - Editor *
* http://www.eGroupWare.org *
* Written by Ralf Becker <RalfBecker@outdoor-training.de> *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
@ -646,7 +646,7 @@
{
return $this->edit('error');
}
if (!isset($cont['result']) || isset($cont['search']))
if (!isset($cont['result']) || isset($cont['search']))
{
$cont['result'] = $this->etemplate->search($cont);
}

View File

@ -44,8 +44,8 @@
function pre_process($name,&$value,&$cell,&$readonlys,&$extension_data,&$tmpl)
{
$nm_global = &$GLOBALS['phpgw_info']['etemplate']['nextmatch'];
//echo "<p>nextmatch_widget.pre_process(name='$name'): value = "; _debug_array($value);
//echo "<p>nextmatch_widget.pre_process(name='$name'): nm_global = "; _debug_array($nm_global);
//echo "<p>nextmatch_widget.pre_process(name='$name',type='$cell[type]'): value = "; _debug_array($value);
//echo "<p>nextmatch_widget.pre_process(name='$name',type='$cell[type]'): nm_global = "; _debug_array($nm_global);
$extension_data = array(
'type' => $cell['type']
@ -62,15 +62,15 @@
if ($this->last_part($name) == $nm_global['order']) // we're the active column
{
$cell[1] = $cell;
$cell[1]['span'] = ',activ_sortcolumn';
$cell[2] = $tmpl->empty_cell('image',$nm_global['sort']!='DESC'?'down':'up');
$cell[1]['span'] .= ',activ_sortcolumn';
$cell[2] = $tmpl->empty_cell('image',$nm_global['sort'] != 'DESC' ? 'down' : 'up');
$cell['type'] = 'hbox';
$cell['size'] = '2,0,0';
$cell['name'] = $cell['label'] = '';
}
else
{
$cell['span'] = ',inactiv_sortcolumn';
$cell['span'] .= ',inactiv_sortcolumn';
}
return True;

View File

@ -329,6 +329,7 @@
if (!(list($r_key) = each($this->data))) // no further row
{
if (!(($this->autorepeat_idx($cols['A'],0,$r,$idx,$idx_cname) && $idx_cname) ||
(substr($cols['A']['type'],1) == 'box' && $this->autorepeat_idx($cols['A'][1],0,$r,$idx,$idx_cname) && $idx_cname) ||
($this->autorepeat_idx($cols['B'],1,$r,$idx,$idx_cname) && $idx_cname)) ||
!$this->isset_array($content,$idx_cname))
{
@ -821,7 +822,7 @@
$box_row = 1;
$box_col = 'A';
$box_anz = 0;
for ($n = 1; $n <= $cell_options; ++$n)
for ($n = 1; $n <= intval($cell_options); ++$n)
{
$h = $this->show_cell($cell[$n],$content,$sel_options,$readonlys,$cname,$show_c,$show_row,$nul,$cl);
if ($h != '' && $h != '&nbsp;')
@ -983,7 +984,7 @@
{
$attr = array();
}
$value = $this->get_array($content_in,$form_name);
$value = $this->get_array($content_in,$form_name,True);
if (isset($attr['blur']) && $attr['blur'] == stripslashes($value))
{
@ -994,7 +995,7 @@
switch ($type)
{
case 'ext':
if (!$this->extensionPostProcess($sub,$form_name,$this->get_array($content,$form_name),$value))
if (!$this->extensionPostProcess($sub,$form_name,$this->get_array($content,$form_name,True),$value))
{
$this->unset_array($content,$form_name);
}

View File

@ -1,7 +1,7 @@
<?php
/**************************************************************************\
* phpGroupWare - InfoLog Admin-, Preferences- and SideboxMenu-Hooks *
* http://www.phpgroupware.org *
* eGroupWare - InfoLog Admin-, Preferences- and SideboxMenu-Hooks *
* http://www.eGroupWare.org *
* Written by Ralf Becker <RalfBecker@outdoor-training.de> *
* ------------------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
@ -23,7 +23,7 @@ class admin_prefs_sidebox_hooks
if ($location == 'sidebox_menu')
{
$file = array(
'infolog index' => $GLOBALS['phpgw']->link('/index.php',array(
'infolog list' => $GLOBALS['phpgw']->link('/index.php',array(
'menuaction' => 'infolog.uiinfolog.index' )),
'add' => $GLOBALS['phpgw']->link('/index.php',array(
'menuaction' => 'infolog.uiinfolog.edit' ))

View File

@ -1,7 +1,8 @@
<?php
/**************************************************************************\
* phpGroupWare - InfoLog Preferences *
* http://www.phpgroupware.org *
* eGroupWare - InfoLog Preferences *
* http://www.eGroupWare.org *
* Written by Ralf Becker <RalfBecker@outdoor-training.de> *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
@ -21,7 +22,7 @@
unset($show_entries);
create_input_box('Max number of entries to display on the main screen','mainscreen_maxshow',
'The maximum number of entries to display on the main screen.','10',3);
'Only up to this number of entries are displayed on the main screen.','10',3);
$ui = CreateObject('infolog.uiinfolog'); // need some labels from
foreach($ui->filters as $key => $label)

File diff suppressed because one or more lines are too long

View File

@ -117,6 +117,7 @@ infolog - import csv-file infolog de InfoLog - Import CSV-Datei
infolog - new infolog de InfoLog - Anlegen
infolog - new subproject infolog de InfoLog - Anlegen Teilprojekt
infolog - subprojects from infolog de InfoLog - Teilprojekte von
infolog list infolog de InfoLog Liste
infolog preferences common de InfoLog Einstellungen
infolog-fieldname infolog de InfoLog-Feldname
invalid filename infolog de Ungültiger Dateiname
@ -133,6 +134,7 @@ list no subs/childs infolog de Untereintr
longer textual description infolog de längere textliche Beschreibung
low infolog de niedrig
max length of the input [, length of the inputfield (optional)] infolog de max. Länge der Eingabe [, Länge des Eingabefeldes (optional)]
max number of entries to display on the main screen infolog de Wieviele Einträge sollen maximal auf der Startseite angezeigt werden
name must not be empty !!! infolog de Name darf nicht leer sein !!!
name of new type to create infolog de Name des neu anzulegenden Types
new name infolog de neuer name
@ -152,6 +154,7 @@ offer infolog de Angebot
ongoing infolog de in Arbeit
only the attachments infolog de nur die Anhänge
only the links infolog de nur die Verknüpfungen
only up to this number of entries are displayed on the main screen. infolog de Nur bis zu dieser Anzahl Einträge wird auf der Startseite angezeigt.
open infolog de offen
optional note to the link infolog de zusätzliche Notiz zur Verknüfung
order infolog de Reihenfolge
@ -196,12 +199,15 @@ should infolog use full names (surname and familyname) or just the loginnames. i
should this entry only be visible to you and people you grant privat access via the acl infolog de soll dieser Eintrag nur sichtbar sein für Sie und Personen denen Sie privaten Zugriff über die ACL erlaubt haben
show full usernames infolog de Kompletten Benutzernamen anzeigen
show in the infolog list infolog de In der InfoLog Liste anzeigen
show list of upcoming entries infolog de Liste zukünftiger Einträge anzeigen
show open entries: tasks/calls/notes on main screen infolog de Nicht erledigte Einträge: Aufgaben/Anrufe/Notizen auf Startseite anzeigen
small view infolog de schmale Ansicht
start a new search, cancel this link infolog de eine neue Suche starten, diese Verknüpfung abbrechen
startdate infolog de Startdatum
startdate enddate infolog de Startdatum Endedatum
startrecord infolog de Startdatensatz
status infolog de Status
status ... infolog de Status ...
sub infolog de Unter-<br>einträge
subject infolog de Titel
task infolog de Auftrag
@ -217,6 +223,7 @@ translation infolog de Translation
typ infolog de Typ
typ '%1' already exists !!! infolog de Typ '%1' existiert bereits !!!
type infolog de Typ
type ... infolog de Typ ...
type of the log-entry: note, phonecall or todo infolog de Typ des Eintrags: Notiz, Anruf oder Auftrag
unlink infolog de Verküpfung lösen
upcoming infolog de zukünftig

View File

@ -29,7 +29,6 @@ add: infolog en Add:
all infolog en All
all links and attachments infolog en all links and attachments
allows to set the status of an entry, eg. set a todo to done if it's finished (values depend on entry-typ) infolog en allows to set the status of an entry, eg. set a ToDo to done if it's finished (values depend on entry-type)
allows to set the status of an entry, eg. set a todo to done if it\'s finished (values depend on entry-typ) infolog en allows to set the status of an entry, eg. set a ToDo to done if it's finished (values depend on entry-type)
applies the changes infolog en applies the changes
are you shure you want to delete this entry ? infolog en Are you sure you want to delete this entry ?
are you sure you want to delete this entry infolog en Are you sure you want to delete this entry
@ -118,6 +117,7 @@ infolog - import csv-file infolog en InfoLog - Import CSV-File
infolog - new infolog en InfoLog - New
infolog - new subproject infolog en InfoLog - New Subproject
infolog - subprojects from infolog en InfoLog - Subprojects from
infolog list infolog en InfoLog list
infolog preferences common en InfoLog preferences
infolog-fieldname infolog en Info Log-Fieldname
invalid filename infolog en Invalid filename
@ -154,6 +154,7 @@ offer infolog en offer
ongoing infolog en ongoing
only the attachments infolog en only the attachments
only the links infolog en only the links
only up to this number of entries are displayed on the main screen. infolog en Only up to this number of entries are displayed on the main screen.
open infolog en open
optional note to the link infolog en optional note to the Link
order infolog en Order
@ -174,7 +175,6 @@ private infolog en Private
project infolog en Project
re: infolog en Re:
reg. expr. for local ip's<br>eg. ^192\.168\.1\. infolog en reg. expr. for local IP's<br>eg. ^192\.168\.1\.
reg. expr. for local ip\'s<br>eg. ^192\\.168\\.1\\. infolog en reg. expr. for local IP's<br>eg. ^192\.168\.1\.
remark infolog en Remark
remove this link (not the entry itself) infolog en Remove this link (not the entry itself)
responsible infolog en Responsible
@ -189,7 +189,6 @@ select a category for this entry infolog en select a category for this entry
select a priority for this task infolog en select a priority for this task
select a responsible user: a person you want to delegate this task infolog en select a responsible user: a person you want to delegate this task
select a typ to edit it's status-values or delete it infolog en select a type to edit it's status-values or delete it
select a typ to edit it\'s status-values or delete it infolog en select a type to edit it's status-values or delete it
select an app to search in infolog en Select an App to search in
select an entry to link with infolog en Select an entry to link with
should infolog display your open entries - not finised tasks, phonecalls or notes - on the main screen. works only if you dont selected an application for the main screen (in your preferences). infolog en Should InfoLog display your open entries - not finised tasks, phone calls or notes - on the main screen. Works only if you dont selected an application for the main screen (in your preferences).
@ -207,11 +206,11 @@ startdate infolog en Start Date
startdate enddate infolog en Start Date End Date
startrecord infolog en Startrecord
status infolog en Status
status ... infolog en Status ...
sub infolog en Sub
subject infolog en Subject
task infolog en ToDo
test import (show importable records <u>only</u> in browser) infolog en Test Import (show importable records <u>only</u> in browser)
the maximum number of entries to display on the main screen. infolog en The maximum number of entries to display on the main screen.
the name used internaly (<= 32 chars), changeing it makes existing data unavailible infolog en the name used internaly (<= 32 chars), changeing it makes existing data unavailible
the text displayed to the user infolog en the text displayed to the user
this is the filter infolog uses when you enter the application. filters limit the entries to show in the actual view. there are filters to show only finished, still open or futures entries of yourself or all users. infolog en This is the filter InfoLog uses when you enter the application. Filters limit the entries to show in the actual view. There are filters to show only finished, still open or futures entries of yourself or all users.
@ -222,8 +221,8 @@ todo infolog en ToDo
translation infolog en Translation
typ infolog en Type
typ '%1' already exists !!! infolog en Type '%1' already exists !!!
typ \'%1\' already exists !!! infolog en Type '%1' already exists !!!
type infolog en Type
type ... infolog en Type ...
type of the log-entry: note, phonecall or todo infolog en Type of the log-entry: Note, Phone call or ToDo
unlink infolog en Unlink
upcoming infolog en upcoming
@ -231,7 +230,6 @@ urgency infolog en urgency
urgent infolog en urgent
use button to search for address infolog en use Button to search for Address
use button to search for project infolog en use Button to search for Project
valid path on clientside<br>eg. \\\\server\\share or e:\\ infolog en valid path on clientside<br>eg. \\Server\Share or e:\
valid path on clientside<br>eg. \\server\share or e:\ infolog en valid path on clientside<br>eg. \\Server\Share or e:\
values for selectbox infolog en Values for selectbox
view all subs of this entry infolog en View all subs of this entry
@ -244,7 +242,6 @@ when should the todo or phonecall be started, it shows up from that date in the
will-call infolog en will call
yes - delete infolog en Yes - Delete
you can't delete one of the stock types !!! infolog en You can't delete one of the stock types !!!
you can\'t delete one of the stock types !!! infolog en You can't delete one of the stock types !!!
you have entered an invalid ending date infolog en You have entered an invalid ending date
you have entered an invalid starting date infolog en You have entered an invalid starting date
you have to enter a name, to create a new typ!!! infolog en You have to enter a name, to create a new type!!!