Commits

Olemis Lang committed c0267f8

BH Theme #146 : Ticket in-plece submit controls

Comments (0)

Files changed (2)

-t289/t289_r1418195_anchor_pos_v2.diff
+#t289/t289_r1418195_anchor_pos_v2.diff
 #hgsvn/rm_files.diff
 #t146/t146_r1418195_scrollspy_btn.diff
 t146/t146_r1418195_ticket_header.diff
 t146/t146_r1420132_inplace_ticket_fields.diff
 t146/t146_r1420132_inplace_ticket_desc.diff
+t146/t146_r1420132_inplace_ticket_form.diff
 #t146/t146_r1386655_inplace_ticket.diff
 #t146/t146_r1386655_inplace_ticket_backend.diff

t146/t146_r1420132_inplace_ticket_form.diff

+# HG changeset patch
+# Parent 5a354dce18bcb05f5dd160078262be3e3bf21a43
+BH Theme #146 : In-place editing form
+
+diff -r 5a354dce18bc bhtheme/htdocs/bloodhound.css
+--- a/bhtheme/htdocs/bloodhound.css	Fri Dec 14 00:02:08 2012 -0500
++++ b/bhtheme/htdocs/bloodhound.css	Fri Dec 14 01:35:43 2012 -0500
+@@ -202,10 +202,6 @@
+   width: 505px;
+ }
+ 
+-#field-summary {
+-  width: 505px;
+-}
+-
+ .bh-ticket-buttons {
+   padding-left: 5px;
+ }
+diff -r 5a354dce18bc bhtheme/templates/bh_ticket.html
+--- a/bhtheme/templates/bh_ticket.html	Fri Dec 14 00:02:08 2012 -0500
++++ b/bhtheme/templates/bh_ticket.html	Fri Dec 14 01:35:43 2012 -0500
+@@ -58,10 +58,28 @@
+                 editor = $('#editor-' + fieldnm);
+               var fieldval = editor.val();
+               editor = editor.clone(false).appendTo(fc).val(fieldval);
+-              if (editor.prop('tagName') == 'TEXTAREA') {
++              if (editor.prop('tagName') === 'TEXTAREA') {
+                 if (editor.is('.wikitext'))
+                   addWikiFormattingToolbar(editor.get(0));
+               }
++              if (fieldnm === 'summary') {
++                // Install inline edit form 
++                var submit_ticket = $(
++                '<div class="btn-toolbar" style="margin: 0px">' +
++                '<div class="btn-group input-append">' +
++                  '<button class="btn btn-primary" type="submit" value="Submit changes" name="submit">Update</button>' +
++                '<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">' +
++                    '<span class="caret"></span>' +
++                  '</button>' +
++                  '<ul class="dropdown-menu" id="workflow-actions">' +
++                    '<li><span>xxx</span></li>' +
++                  '</ul>' +
++                '</div>' +
++                '<div class="btn-group">' +
++                '<button class="btn-link">Discard changes</button></div>' +
++                '</div>').prepend(editor).appendTo(fc);
++                editor.wrap('<div class="btn-group"></div>')
++              }
+             });
+         }
+   
+@@ -397,7 +415,8 @@
+                         <th><label for="field-summary">Summary:</label></th>
+                         <td class="fullrow" colspan="3">
+                           <input type="text" id="field-summary" name="field_summary"
+-                                 value="$ticket.summary" size="70" />
++                                 value="$ticket.summary" size="70" 
++                                 class="input-xlarge" />
+                         </td>
+                       </tr>
+                       <py:if test="only_for_admin">