1. Olemis Lang
  2. bloodhound_theme-mq

Commits

Olemis Lang  committed b18958c

BH Theme #146 : Edit mode not reentrant plus .editing => .edit-active

  • Participants
  • Parent commits 68a6509
  • Branches t146_inline_edit

Comments (0)

Files changed (1)

File t146/t146_r1420132_inplace_ticket_form.diff

View file
  • Ignore whitespace
 # HG changeset patch
-# Parent c5495961f38694f1fdba6f390b170d1bedece3ad
+# Parent da551ebf15e9b37a196f868db05517def4a65f36
 BH Theme #146 : In-place editing form
 
-diff -r c5495961f386 bhtheme/htdocs/bloodhound.css
---- a/bhtheme/htdocs/bloodhound.css	Fri Dec 14 02:02:35 2012 -0500
-+++ b/bhtheme/htdocs/bloodhound.css	Fri Dec 14 04:37:37 2012 -0500
+diff -r da551ebf15e9 bhtheme/htdocs/bloodhound.css
+--- a/bhtheme/htdocs/bloodhound.css	Fri Dec 14 04:41:19 2012 -0500
++++ b/bhtheme/htdocs/bloodhound.css	Fri Dec 14 11:52:37 2012 -0500
 @@ -202,10 +202,6 @@
    width: 505px;
  }
  .bh-ticket-buttons {
    padding-left: 5px;
  }
-diff -r c5495961f386 bhtheme/templates/bh_ticket.html
---- a/bhtheme/templates/bh_ticket.html	Fri Dec 14 02:02:35 2012 -0500
-+++ b/bhtheme/templates/bh_ticket.html	Fri Dec 14 04:37:37 2012 -0500
-@@ -58,10 +58,43 @@
+@@ -281,6 +277,10 @@
+   white-space: nowrap;
+ }
+ 
++.clip.edit-active, .affix .clip-affix.edit-active {
++  overflow: visible;
++}
++
+ /* @end */
+ 
+ /* @group Alternate download links */
+diff -r da551ebf15e9 bhtheme/templates/bh_ticket.html
+--- a/bhtheme/templates/bh_ticket.html	Fri Dec 14 04:41:19 2012 -0500
++++ b/bhtheme/templates/bh_ticket.html	Fri Dec 14 11:52:37 2012 -0500
+@@ -48,8 +48,11 @@
+         modify_elem.parent().hide();
+   
+         function modify_ticket() {
++          if ($('#vc-summary').is('.edit-active'))
++            // Already in editable state
++            return;
+           $('[data-edit="inplace"]').each(function() {
+-              var fc = $(this);
++              var fc = $(this).addClass('edit-active');
+               var fieldurl = fc.find('a').attr('href');
+               var fieldnm = fc.attr('id').substr(3);
+               fc.empty();
+@@ -58,10 +61,43 @@
                  editor = $('#editor-' + fieldnm);
                var fieldval = editor.val();
                editor = editor.clone(false).appendTo(fc).val(fieldval);
              });
          }
    
-@@ -397,7 +430,8 @@
+@@ -397,7 +433,8 @@
                          <th><label for="field-summary">Summary:</label></th>
                          <td class="fullrow" colspan="3">
                            <input type="text" id="field-summary" name="field_summary"
                          </td>
                        </tr>
                        <py:if test="only_for_admin">
-@@ -593,5 +627,24 @@
+@@ -593,5 +630,24 @@
          </bh:widget>
        </div>
      </div>
 +          </fieldset>
 +        </ul>
 +      </div>
-+      <div class="btn-group pull-right">
-+      <button class="btn-link">Discard changes</button></div>
++      <div class="btn-group">
++      <button class="btn-link" title="Discard changes">Cancel</button></div>
 +      </div>
 +    </script>
    </body>