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

Mailing List Archive: Bricolage: commits

[8466] Don't show the hint for the top-level element.

 

 

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


theory at bricolage

Mar 7, 2009, 5:11 PM

Post #1 of 1 (385 views)
Permalink
[8466] Don't show the hint for the top-level element.

Revision: 8466
Author: theory
Date: 2009-03-07 17:11:51 -0800 (Sat, 07 Mar 2009)
ViewCVS: http://viewsvn.bricolage.cc/?rev=8466&view=rev

Log Message:
-----------
Don't show the hint for the top-level element.

Modified Paths:
--------------
bricolage/trunk/comp/widgets/container_prof/container.mc

Modified: bricolage/trunk/comp/widgets/container_prof/container.mc
===================================================================
--- bricolage/trunk/comp/widgets/container_prof/container.mc 2009-03-07 01:31:18 UTC (rev 8465)
+++ bricolage/trunk/comp/widgets/container_prof/container.mc 2009-03-08 01:11:51 UTC (rev 8466)
@@ -122,13 +122,15 @@
my $top_level = (get_state_data($widget, 'element') == $element);
my $displayed = $element->get_displayed;

-# Find something to indicate what the element contains.
+# Find something to indicate what the element contains, if appropriate.
my ($hint_name, $hint_val);
-foreach my $field ($element->get_fields) {
- $hint_val = $field->get_value or next;
- $hint_name = $field->get_name;
- $hint_val = substr($hint_val, 0, 64);
- last;
+if ($element->get_parent_id) {
+ for my $field ($element->get_fields) {
+ $hint_val = $field->get_value or next;
+ $hint_name = $field->get_name;
+ $hint_val = substr($hint_val, 0, 64);
+ last;
+ }
}

# Get the list of fields and subelements that can be added.

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.