<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -31,4 +31,5 @@ Ron Fox Kendou (concurrence bug)
 - the Styler rails plugin   http://the.railsi.st
 - blueprint css             http://www.blueprintcss.org
 - will_paginate             http://github.com/mislav/will_paginate
+many more...
 </diff>
      <filename>CREDITS.txt</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,25 @@
 &lt;%= javascript_include_tag 'fluo-tred' %&gt;
 
 &lt;script&gt;
+
   linkToCss('fluo-tred');
+
+  function repositionFooter (editorVisible) {
+    var f = byId('footer-block');
+    if (editorVisible) {
+      var e = byId('editor')
+      f.style.top = &quot;&quot; + (e.offsetTop + e.offsetHeight + 15) + &quot;px&quot;;
+      f.style.position = 'absolute';
+    }
+    else {
+      f.style.position = 'static';
+    }
+  }
+
+  function toggleEditor () {
+    repositionFooter(toggleVisibility('editor'));
+  }
+
 &lt;/script&gt;
 
 &lt;div style=&quot;float: left;&quot;&gt;
@@ -33,7 +51,7 @@
             :title =&gt; 'cancels this expression, removes its branch from the process tree',
             :confirm =&gt; 'Are you sure ?'
           ) %&gt; |
-          &lt;%= link_to_function 'edit', 'toggleVisibility(&quot;editor&quot;)' %&gt; |
+          &lt;%= link_to_function 'edit', 'toggleEditor()' %&gt; |
           &lt;%= link_to 'back', :back %&gt;
         &lt;td&gt;
       &lt;/tr&gt;
@@ -45,9 +63,9 @@
     :expression,
     @expression,
     :url =&gt; { :action =&gt; 'update' },
-    :html =&gt; { :method =&gt; :put }) do |f|
+    :html =&gt; { :method =&gt; :put, :onkeypress =&gt; 'return filterEnterKeyOut(event);' }) do |f|
   %&gt;
-    &lt;div id=&quot;editor&quot; style=&quot;display: none;&quot;&gt;
+    &lt;div id=&quot;editor&quot;&gt;
 
       &lt;div id=&quot;editor-in&quot;&gt;
 
@@ -67,7 +85,7 @@
         :title =&gt; 'modifies the expression directly (warning this may ruin your process instance)',
         :confirm =&gt; 'Are you sure ?')
       %&gt; | 
-      &lt;%= link_to_function 'cancel', 'toggleVisibility(&quot;editor&quot;)' %&gt; |
+      &lt;%= link_to_function 'cancel', 'toggleEditor()' %&gt; |
       &lt;%= link_to_function 'reset', 'tredReset()' %&gt; |
       &lt;%= link_to_function 'undo', 'FluoTred.undo(&quot;tred&quot;)' %&gt;
 
@@ -103,6 +121,7 @@
   tred.onChange = function (tree) {
     FluoCan.renderFlow('editor-fluo', tree);
     FluoCan.crop('editor-fluo');
+    repositionFooter(true);
   };
 
   FluoCan.renderFlow('editor-fluo', original_tree);</diff>
      <filename>app/views/expressions/show.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -57,7 +57,7 @@
         &lt;%= yield :layout %&gt;
       &lt;/div&gt;
 
-      &lt;div class=&quot;column span-24 first last&quot;&gt;
+      &lt;div id=&quot;footer-block&quot; class=&quot;column span-24 first last&quot;&gt;
         &lt;div id=&quot;footer&quot; class=&quot;column span-24 first last&quot;&gt;
           &lt;div id=&quot;footer-left&quot; class=&quot;column span-12 first&quot;&gt;
             &lt;%= link_to_function('help', 'toggleHelp()') %&gt;</diff>
      <filename>app/views/layouts/application.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,9 @@
 
-//
 // $(whatever) style
 //
 function byId (i) { return document.getElementById(i); } 
   // I know, but let's get js framework independent
 
-//
 // links to a CSS file (in the document &lt;HEAD/&gt;)
 //
 function linkToCss (href) {
@@ -23,7 +21,6 @@ function linkToCss (href) {
     // making sure that controller-related css are placed last
 }
 
-//
 // when 'enter' is hit, will call 'func'
 //
 function onEnter (field, evt, func) {
@@ -33,11 +30,18 @@ function onEnter (field, evt, func) {
   return false;
 }
 
+function filterEnterKeyOut (evt) {
+  var e = evt || window.event;
+  var c = e.charCode || e.keyCode;
+  return (c != 13);
+}
+
 function toggleVisibility (i) {
   var e = i;
   if ((typeof e) == 'string') e = byId(i);
   if (e.style.display == 'block') e.style.display = 'none';
   else e.style.display = 'block';
+  return (e.style.display == 'block'); // true if now visible
 }
 
 function toggleHelp () {</diff>
      <filename>public/javascripts/application.js</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,9 @@
 
 #editor {
+  display: none;
+  position: absolute;
+  background-color: white;
+  padding: 1px;
 }
 
 #editor-in {</diff>
      <filename>public/stylesheets/expressions.css</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>bd21d7714910af68d3ec2f0a82d1b8df6117fb0d</id>
    </parent>
  </parents>
  <author>
    <name>John Mettraux</name>
    <email>jmettraux@gmail.com</email>
  </author>
  <url>http://github.com/jmettraux/ruote-web2/commit/c5ac4f185315b700f792623c354e2d3c7a09663a</url>
  <id>c5ac4f185315b700f792623c354e2d3c7a09663a</id>
  <committed-date>2009-04-05T21:27:54-07:00</committed-date>
  <authored-date>2009-04-05T21:27:54-07:00</authored-date>
  <message>better positioning for the expression editor</message>
  <tree>77acbf304a51a54a102e3bceec0629072c32ace4</tree>
  <committer>
    <name>John Mettraux</name>
    <email>jmettraux@gmail.com</email>
  </committer>
</commit>
