[Jifty-commit] r4914 - in jifty/trunk: . lib/Jifty/Plugin share/web/static/js share/web/templates/__jifty

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Wed Jan 23 19:39:00 EST 2008


Author: sartak
Date: Wed Jan 23 19:39:00 2008
New Revision: 4914

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Plugin/Halo.pm
   jifty/trunk/share/web/static/css/halos.css
   jifty/trunk/share/web/static/js/halo.js
   jifty/trunk/share/web/templates/__jifty/halo

Log:
 r50698 at onn:  sartak | 2008-01-23 19:36:03 -0500
 Split between "Draw halos" and "Page info". Make halos look less offensive as well.


Modified: jifty/trunk/lib/Jifty/Plugin/Halo.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Halo.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/Halo.pm	Wed Jan 23 19:39:00 2008
@@ -87,9 +87,6 @@
     return << "    HEADER";
         <div id="halo-$id" class="halo">
             <div class="halo_header">
-                <span class="halo_name">
-                    $frame->{name}
-                </span>
                 <span class="halo_rendermode">
                     [
                     <a style="font-weight: bold"
@@ -102,6 +99,9 @@
                        href="#">S</a>
                     ]
                 </span>
+                <div class="halo_name">
+                    $frame->{name}
+                </div>
             </div>
             <div id="halo-inner-$id">
     HEADER

Modified: jifty/trunk/share/web/static/css/halos.css
==============================================================================
--- jifty/trunk/share/web/static/css/halos.css	(original)
+++ jifty/trunk/share/web/static/css/halos.css	Wed Jan 23 19:39:00 2008
@@ -1,9 +1,18 @@
 .halo {
+    border-color: #ffd700;
+    border-style: solid;
+    border-width: 0;
+    margin: 0;
 }
 
 .halo_header {
     display: none;
-    border-bottom: 1px dotted #666666;
+    border-bottom: 1px dashed #ffd700;
+    background: #fff;
+}
+
+.halo_rendermode {
+    float: right;
 }
 
 .halo_source {
@@ -108,7 +117,7 @@
 
 #render_info {
     position: fixed;
-    right:0.5em;
+    right:.5em;
     bottom:0;
 }
 

Modified: jifty/trunk/share/web/static/js/halo.js
==============================================================================
--- jifty/trunk/share/web/static/js/halo.js	(original)
+++ jifty/trunk/share/web/static/js/halo.js	Wed Jan 23 19:39:00 2008
@@ -1,4 +1,5 @@
 var halo_shown = null;
+var halos_drawn = null;
 
 var halo_top;
 var halo_left;
@@ -63,16 +64,17 @@
     grip.xFrom = x;
 }
 
-function render_info_tree() {
+function draw_halos() {
     var halo_header_display = 'none';
-    var halo_border = '0';
+    var halo_border_width   = '0';
+    var halo_margin         = '0';
 
-    var info_tree = $("render_info_tree");
-    Element.toggle(info_tree);
+    halos_drawn = !halos_drawn;
 
-    if (Element.visible(info_tree)) {
+    if (halos_drawn) {
         halo_header_display = 'block';
-        halo_border = '2px solid #666666';
+        halo_border_width   = '1px';
+        halo_margin         = '2px';
     }
 
     YAHOO.util.Dom.getElementsByClassName("halo_header", null, null,
@@ -83,10 +85,14 @@
 
     YAHOO.util.Dom.getElementsByClassName("halo", null, null,
         function (e) {
-            e.style.border = halo_border;
+            e.style.borderWidth = halo_border_width;
+            e.style.margin = halo_margin;
         }
     );
+}
 
+function render_info_tree() {
+    Element.toggle("render_info_tree");
 }
 
 function halo_render(id) {

Modified: jifty/trunk/share/web/templates/__jifty/halo
==============================================================================
--- jifty/trunk/share/web/templates/__jifty/halo	(original)
+++ jifty/trunk/share/web/templates/__jifty/halo	Wed Jan 23 19:39:00 2008
@@ -1,4 +1,7 @@
-<div><a href="#" id="render_info" onclick="render_info_tree(); return false"><%_('Page info')%></a></div>
+<div id="render_info">
+    <a href="#" onclick="draw_halos(); return false"><%_('Draw halos')%></a>
+    <a href="#" onclick="render_info_tree(); return false"><%_('Page info')%></a>
+</div>
 <div style="display: none" id="render_info_tree">
 % foreach my $item (@stack) {
 %     if ( $item->{depth} > $depth ) {


More information about the Jifty-commit mailing list