Index: openacs-4/packages/new-portal/tcl/portal-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/tcl/portal-procs-oracle.xql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/new-portal/tcl/portal-procs-oracle.xql 23 Jan 2002 00:26:10 -0000 1.7 +++ openacs-4/packages/new-portal/tcl/portal-procs-oracle.xql 28 Jan 2002 17:51:46 -0000 1.8 @@ -67,6 +67,21 @@ + + + update portal_element_map + set page_id = :page_id, + region = :region, + sort_key = (select nvl((select max(sort_key) + 1 + from portal_element_map + where page_id = :page_id + and region = :region), + 1) + from dual) + where element_id = :element_id + + + insert into portal_element_map Index: openacs-4/packages/new-portal/tcl/portal-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/tcl/portal-procs.tcl,v diff -u -r1.108 -r1.109 --- openacs-4/packages/new-portal/tcl/portal-procs.tcl 25 Jan 2002 20:04:45 -0000 1.108 +++ openacs-4/packages/new-portal/tcl/portal-procs.tcl 28 Jan 2002 17:51:46 -0000 1.109 @@ -478,10 +478,17 @@ "move_to_page" { set page_id [ns_set get $form page_id] set element_id [ns_set get $form element_id] - - #ad_return_complaint 1 "$page_id/$element_id" + set curr_reg [db_string move_to_page_curr_select {}] + set target_reg_num [db_string move_to_page_target_select {}] - db_dml move_to_page {} + if {$curr_reg > $target_reg_num} { + # the new page dosent have this region, set to max region + set region $target_reg_num + } else { + set region $curr_reg + } + + db_dml move_to_page_update {} } "hide" { set element_id_list [list] Index: openacs-4/packages/new-portal/tcl/portal-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/tcl/portal-procs.xql,v diff -u -r1.14 -r1.15 --- openacs-4/packages/new-portal/tcl/portal-procs.xql 25 Jan 2002 20:04:45 -0000 1.14 +++ openacs-4/packages/new-portal/tcl/portal-procs.xql 28 Jan 2002 17:51:46 -0000 1.15 @@ -104,14 +104,24 @@ where element_id = :element_id - + + - update portal_element_map - set page_id = :page_id + select region + from portal_element_map where element_id = :element_id + + + select count(*) + from portal_pages pp, portal_supported_regions psr + where pp.layout_id = psr.layout_id + and pp.page_id = :page_id + + + update portal_element_map Index: openacs-4/packages/new-portal/www/place-element.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/www/place-element.adp,v diff -u -r1.26 -r1.27 --- openacs-4/packages/new-portal/www/place-element.adp 23 Jan 2002 00:26:10 -0000 1.26 +++ openacs-4/packages/new-portal/www/place-element.adp 28 Jan 2002 17:51:46 -0000 1.27 @@ -20,7 +20,7 @@ - + move right @@ -30,6 +30,7 @@ move left + [hide]