Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: commits

[8482] Fixed a bug where, once child elements were added or deleted,

 

 

Bricolage commits RSS feed   Index | Next | Previous | View Threaded


theory at bricolage

Mar 9, 2009, 11:28 PM

Post #1 of 1 (410 views)
Permalink
[8482] Fixed a bug where, once child elements were added or deleted,

Revision: 8482
Author: theory
Date: 2009-03-09 23:28:10 -0700 (Mon, 09 Mar 2009)
ViewCVS: http://viewsvn.bricolage.cc/?rev=8482&view=rev

Log Message:
-----------
Fixed a bug where, once child elements were added or deleted, from a container
element, the container was prevented from being deleted until the page is
refreshed. Reported by Matt Rolf (Bug #1392). [David]

Bugzilla Links:
--------------
http://bugs.bricolage.cc/show_bug.cgi?id=1392

Modified Paths:
--------------
bricolage/trunk/comp/widgets/container_prof/container.html
bricolage/trunk/comp/widgets/container_prof/container.mc
bricolage/trunk/lib/Bric/Changes.pod

Modified: bricolage/trunk/comp/widgets/container_prof/container.html
===================================================================
--- bricolage/trunk/comp/widgets/container_prof/container.html 2009-03-10 05:45:21 UTC (rev 8481)
+++ bricolage/trunk/comp/widgets/container_prof/container.html 2009-03-10 06:28:10 UTC (rev 8482)
@@ -1,6 +1,7 @@
<& 'container.mc',
widget => $widget,
- element => $element
+ element => $element,
+ parent => $parent,
&>

<%once>
@@ -21,9 +22,13 @@

<%init>
my $element = get_state_data($widget, 'element');
-my $container_id = $ARGS{"container_id"};
-
+my $container_id = $ARGS{container_id};
$element = $find_subelement->($element, $container_id) if $container_id;
+# Find the parent element in the session for the appropriate type of profile
+# (story or media).
+my $type = $element->get_object_type;
+my $doc = get_state_data("$type\_prof", $type);
+my $parent = $find_subelement->($doc->get_element, $element->get_parent_id);
</%init>

<%flags>

Modified: bricolage/trunk/comp/widgets/container_prof/container.mc
===================================================================
--- bricolage/trunk/comp/widgets/container_prof/container.mc 2009-03-10 05:45:21 UTC (rev 8481)
+++ bricolage/trunk/comp/widgets/container_prof/container.mc 2009-03-10 06:28:10 UTC (rev 8482)
@@ -88,7 +88,7 @@

% if ( $parent && !$top_level) {
% my $minimum_occurrence = 0;
-% if (my $sub_type = $parent->get_element_type->get_containers($element->get_key_name) ) {
+% if (my $sub_type = $parent->get_element_type->get_containers($element->get_key_name) ) {
% $minimum_occurrence = $sub_type->get_min_occurrence;
% }
% if ( $minimum_occurrence < $parent->get_elem_occurrence($element->get_key_name) ) {

Modified: bricolage/trunk/lib/Bric/Changes.pod
===================================================================
--- bricolage/trunk/lib/Bric/Changes.pod 2009-03-10 05:45:21 UTC (rev 8481)
+++ bricolage/trunk/lib/Bric/Changes.pod 2009-03-10 06:28:10 UTC (rev 8482)
@@ -276,6 +276,12 @@
element with which it is newly associated. Reported by Matt Rolf (Bug #1432).
[David]

+=item *
+
+Fixed a bug where, once child elements were added or deleted, from a container
+element, the container was prevented from being deleted until the page is
+refreshed. Reported by Matt Rolf (Bug #1392). [David]
+
=back

=head1 VERSION 1.11.1 (2008-10-03)

Bricolage commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.