[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: admin/inc class.bocategories.inc.php,1.12,1.13 c
From: |
Bettina Gille <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: admin/inc class.bocategories.inc.php,1.12,1.13 class.uicategories.inc.php,1.23,1.24 |
Date: |
Sat, 12 Oct 2002 13:23:58 -0400 |
Update of /cvsroot/phpgroupware/admin/inc
In directory subversions:/tmp/cvs-serv16339/inc
Modified Files:
class.bocategories.inc.php class.uicategories.inc.php
Log Message:
update edit_cats to move the subtree with the cat if the parent changes
Index: class.bocategories.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.bocategories.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** class.bocategories.inc.php 25 Sep 2002 03:55:43 -0000 1.12
--- class.bocategories.inc.php 12 Oct 2002 17:23:56 -0000 1.13
***************
*** 117,121 ****
function save_cat($values)
{
! if ($values['id'] && $values['id'] != 0)
{
return $this->cats->edit($values);
--- 117,121 ----
function save_cat($values)
{
! if ($values['cat_id'] && $values['cat_id'] != 0)
{
return $this->cats->edit($values);
***************
*** 171,175 ****
'type' => 'appandmains',
'cat_name' => $values['name'],
! 'cat_id' => $values['id']
));
}
--- 171,175 ----
'type' => 'appandmains',
'cat_name' => $values['name'],
! 'cat_id' => $values['cat_id']
));
}
***************
*** 180,184 ****
'type' => 'appandsubs',
'cat_name' => $values['name'],
! 'cat_id' => $values['id']
));
}
--- 180,184 ----
'type' => 'appandsubs',
'cat_name' => $values['name'],
! 'cat_id' => $values['cat_id']
));
}
Index: class.uicategories.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uicategories.inc.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** class.uicategories.inc.php 12 Oct 2002 00:48:19 -0000 1.23
--- class.uicategories.inc.php 12 Oct 2002 17:23:56 -0000 1.24
***************
*** 151,157 ****
{
$tr_color =
$this->nextmatchs->alternate_row_color($tr_color);
!
$GLOBALS['phpgw']->template->set_var(tr_color,$tr_color);
! $id = $categories[$i]['id'];
$level = $categories[$i]['level'];
$cat_name =
$GLOBALS['phpgw']->strip_html($categories[$i]['name']);
--- 151,157 ----
{
$tr_color =
$this->nextmatchs->alternate_row_color($tr_color);
!
$GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);
! $id = $categories[$i]['cat_id'];
$level = $categories[$i]['level'];
$cat_name =
$GLOBALS['phpgw']->strip_html($categories[$i]['name']);
***************
*** 164,168 ****
}
! $descr =
$GLOBALS['phpgw']->strip_html($categories[$i]['description']);
if (!$descr) { $descr = ' '; }
--- 164,168 ----
}
! $descr =
$GLOBALS['phpgw']->strip_html($categories[$i]['descr']);
if (!$descr) { $descr = ' '; }
***************
*** 237,241 ****
function add()
{
! $global_cats =
get_var('global_cats',array('POST','GET'));
$link_data = array
--- 237,241 ----
function add()
{
! $global_cats =
get_var('global_cats',array('POST','GET'));
$link_data = array
***************
*** 250,258 ****
$this->set_langs();
! $new_parent = $GLOBALS['HTTP_POST_VARS']['new_parent'];
! $submit = $GLOBALS['HTTP_POST_VARS']['submit'];
! $cat_parent = $GLOBALS['HTTP_POST_VARS']['cat_parent']
? $GLOBALS['HTTP_POST_VARS']['cat_parent'] :
$GLOBALS['HTTP_GET_VARS']['cat_parent'];
! $cat_name = $GLOBALS['HTTP_POST_VARS']['cat_name'];
! $cat_description =
$GLOBALS['HTTP_POST_VARS']['cat_description'];
$GLOBALS['phpgw']->template->set_file(array('cat_form'
=> 'category_form.tpl'));
--- 250,254 ----
$this->set_langs();
! $values = get_var('values',array('POST'));
$GLOBALS['phpgw']->template->set_file(array('cat_form'
=> 'category_form.tpl'));
***************
*** 272,289 ****
}
! if ($new_parent)
{
! $cat_parent = $new_parent;
! }
!
! if ($submit)
! {
! $values = array
! (
! 'parent' => $cat_parent,
! 'descr' => $cat_description,
! 'name' => $cat_name,
! 'access' => 'public'
! );
$error = $this->bo->check_values($values);
--- 268,277 ----
}
! if (get_var('submit',array('POST')))
{
! if(is_array($values))
! {
! $values['access'] = 'public';
! }
$error = $this->bo->check_values($values);
***************
*** 302,306 ****
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
!
$GLOBALS['phpgw']->template->set_var('category_list',$this->bo->formatted_list(array(
'select' => 'select',
'all' => 'all',
--- 290,295 ----
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
!
$GLOBALS['phpgw']->template->set_var('category_list',$this->bo->formatted_list(array
! (
'select' => 'select',
'all' => 'all',
***************
*** 336,345 ****
$this->set_langs();
! $new_parent =
$GLOBALS['HTTP_POST_VARS']['new_parent'];
! $submit =
$GLOBALS['HTTP_POST_VARS']['submit'];
! $cat_parent =
$GLOBALS['HTTP_POST_VARS']['cat_parent'];
! $cat_name =
$GLOBALS['HTTP_POST_VARS']['cat_name'];
! $cat_description =
$GLOBALS['HTTP_POST_VARS']['cat_description'];
! $old_parent =
$GLOBALS['HTTP_POST_VARS']['old_parent'];
$GLOBALS['phpgw']->template->set_file(array('cat_form'
=> 'category_form.tpl'));
--- 325,329 ----
$this->set_langs();
! $values = get_var('values',array('POST'));
$GLOBALS['phpgw']->template->set_file(array('cat_form'
=> 'category_form.tpl'));
***************
*** 350,369 ****
$GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
! if ($new_parent)
{
! $cat_parent = $new_parent;
! }
!
! if ($submit)
! {
! $values = array
! (
! 'id' =>
$this->cat_id,
! 'old_parent' => $old_parent,
! 'parent' => $cat_parent,
! 'descr' =>
$cat_description,
! 'name' => $cat_name,
! 'access' => 'public'
! );
$error = $this->bo->check_values($values);
--- 334,344 ----
$GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
! if (get_var('submit',array('POST')))
{
! if (is_array($values))
! {
! $values['cat_id'] = $this->cat_id;
! $values['access'] = 'public';
! }
$error = $this->bo->check_values($values);
***************
*** 390,408 ****
}
- $hidden_vars = '<input type="hidden" name="cat_id"
value="' . $this->cat_id . '">' . "\n"
- . '<input type="hidden"
name="old_parent" value="' . $cats[0]['parent'] . '">' . "\n";
-
$GLOBALS['phpgw']->template->set_var('hidden_vars',$hidden_vars);
-
$link_data['menuaction'] = 'admin.uicategories.edit';
$link_data['cat_id'] = $this->cat_id;
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
$link_data['menuaction'] = 'admin.uicategories.delete';
$GLOBALS['phpgw']->template->set_var('deleteurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
!
$GLOBALS['phpgw']->template->set_var('cat_name',$GLOBALS['phpgw']->strip_html($cats[0]['name']));
!
$GLOBALS['phpgw']->template->set_var('cat_description',$GLOBALS['phpgw']->strip_html($cats[0]['description']));
$GLOBALS['phpgw']->template->set_var('category_list',$this->bo->formatted_list(array('select'
=> 'select',
'all' => 'all',
!
'cat_parent' => $cats[0]['parent'],
'global_cats' => $global_cats)));
$GLOBALS['phpgw']->template->parse('buttons','edit');
--- 365,382 ----
}
$link_data['menuaction'] = 'admin.uicategories.edit';
$link_data['cat_id'] = $this->cat_id;
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
+
$link_data['menuaction'] = 'admin.uicategories.delete';
$GLOBALS['phpgw']->template->set_var('deleteurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
!
$GLOBALS['phpgw']->template->set_var('old_parent',$cats['parent']);
!
!
$GLOBALS['phpgw']->template->set_var('cat_name',$GLOBALS['phpgw']->strip_html($cats['name']));
!
$GLOBALS['phpgw']->template->set_var('cat_description',$GLOBALS['phpgw']->strip_html($cats['descr']));
$GLOBALS['phpgw']->template->set_var('category_list',$this->bo->formatted_list(array('select'
=> 'select',
'all' => 'all',
!
'cat_parent' => $cats['parent'],
'global_cats' => $global_cats)));
$GLOBALS['phpgw']->template->parse('buttons','edit');
***************
*** 474,478 ****
$GLOBALS['phpgw']->common->phpgw_header();
-
$GLOBALS['phpgw']->template->set_var('hidden_vars','<input type="hidden"
name="cat_id" value="' . $this->cat_id . '">');
if ($apps_cats)
--- 448,451 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: admin/inc class.bocategories.inc.php,1.12,1.13 class.uicategories.inc.php,1.23,1.24,
Bettina Gille <address@hidden> <=