You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by ma...@apache.org on 2013/05/28 14:17:53 UTC

svn commit: r1486902 - in /bloodhound/trunk: bloodhound_dashboard/bhdashboard/widgets/templates/ bloodhound_theme/bhtheme/htdocs/ bloodhound_theme/bhtheme/templates/

Author: matevz
Date: Tue May 28 12:17:52 2013
New Revision: 1486902

URL: http://svn.apache.org/r1486902
Log:
Ref. #533 - inplace ticket editing modifications

Modified:
    bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_relations.html
    bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css
    bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_attach_file_form.html
    bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html

Modified: bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_relations.html
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_relations.html?rev=1486902&r1=1486901&r2=1486902&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_relations.html (original)
+++ bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_relations.html Tue May 28 12:17:52 2013
@@ -55,7 +55,9 @@
   </py:choose>
 
   <div class="btn-group">
-    <a class="btn" href="${href.ticket(ticket.id, 'relations')}"><i class="icon-retweet"></i> Manage relations</a>
+    <form method="get" action="${href.ticket(ticket.id, 'relations')}">
+      <button type="submit" class="btn" id="manage-relations"><i class="icon-retweet"></i> Manage relations</button>
+    </form>
   </div>
 </div>
 

Modified: bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css?rev=1486902&r1=1486901&r2=1486902&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css (original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css Tue May 28 12:17:52 2013
@@ -273,6 +273,10 @@ pre {
  margin-top: 0px;
 }
 
+#edit-comment {
+  margin-top: 30px;
+}
+
 .trac-loading {
  background: url(../common/loading.gif) 0 50% no-repeat;
  margin: 0 1em;

Modified: bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_attach_file_form.html
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_attach_file_form.html?rev=1486902&r1=1486901&r2=1486902&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_attach_file_form.html (original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_attach_file_form.html Tue May 28 12:17:52 2013
@@ -32,7 +32,7 @@ Arguments:
       id="attachfile" style="display: inline-block">
   <input type="hidden" name="action" value="new" />
   <div class="btn-group">
-    <button type="submit" class="btn" name="attachfilebutton">
+    <button type="submit" class="btn" name="attachfilebutton" id="attachfilebutton">
       <i class="icon-file"></i> ${value_of('add_button_title', None) or _('Attach file')}
     </button>
   </div>

Modified: bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html?rev=1486902&r1=1486901&r2=1486902&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html (original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html Tue May 28 12:17:52 2013
@@ -65,6 +65,7 @@
         // Install in place editing
         install_workflow();
         $('#edit-cancel').click(revert_ticket);
+        $('#edit-cancel-below').click(revert_ticket);
 
         var modify_elem = $('#modify');
         modify_elem.parent().hide();
@@ -119,12 +120,22 @@
           //$('#inplace-propertyform').autoSubmit({preview : 1}, 
           //    full_preview, '#overview .trac-loading')
           $('#inplace-propertyform').submit(function() {
-              $('#hidden-comment').val($('#comment').val());
+              $('#hidden-comment').val($('#edit-comment').val());
             })
           $('#inplace-edit').hide();
           $('#edit-state-buttons').show();
+          $('#edit-state-buttons-below').show();
           $('#vc-status a').hide();
           $('#edit-workflow-buttons').show();
+          $('#edit-comment').show();
+
+          $('.activityfeed').css('opacity', '0.3');
+          $('.relations').css('opacity', '0.3');
+          $('#attachments').css('opacity', '0.3');
+          $('#comment').attr('disabled', 'disabled');
+          $('#comment-submit').attr('disabled', 'disabled');
+          $('#manage-relations').attr('disabled', 'disabled');
+          $('#attachfilebutton').attr('disabled', 'disabled');
         }
 
         function add_update_hidden_summary_fn() {
@@ -146,8 +157,19 @@
           $('#inplace-edit').show();
           $('#vc-summary').attr('contenteditable', 'false');
           $('#edit-state-buttons').hide();
+          $('#edit-state-buttons-below').hide();
           $('#vc-status a').show();
           $('#edit-workflow-buttons').hide();
+          $('#edit-comment').hide();
+
+          $('#comment').removeAttr('disabled');
+          $('#comment-submit').removeAttr('disabled');
+          $('#manage-relations').removeAttr('disabled');
+          $('#attachfilebutton').removeAttr('disabled');
+          $('.activityfeed').css('opacity', '');
+          $('.relations').css('opacity', '');
+          $('#attachments').css('opacity', '');
+
           e.preventDefault();
         }
 
@@ -383,14 +405,21 @@
 
                 <div id="dummy-vc-summary" style="display: none"></div>
 
-                <div py:if="bhrelations and ticket.exists" class="relations">
-                  <bh:widget urn="TicketRelations">
-                    <bh:args>
-                      <bh:arg name="tid">$ticket.id</bh:arg>
-                      <bh:arg name="max">20</bh:arg>
-                    </bh:args>
-                  </bh:widget>
-                </div>
+                <py:if test="ticket.exists">
+                  <textarea id="edit-comment" class="trac-resizable span7 hide" name="edit-comment"
+                      rows="4" placeholder="Enter new comment" onfocus="this.placeholder = ''"
+                      onblur="this.placeholder = 'Enter new comment'"></textarea>
+
+                  <div id="edit-state-buttons-below" class="btn-toolbar hide">
+                    <button id="edit-submit-below" class="btn" type="submit"
+                        value="Submit changes" name="submit">
+                      Submit changes
+                    </button>
+                    <button id="edit-cancel-below" class="btn-link" title="Discard changes">
+                      Cancel
+                    </button>
+                  </div>
+                </py:if>
 
                 <py:if test="not ticket.exists">
                   <!--! Attachment on creation checkbox -->
@@ -409,6 +438,15 @@
             </div>
           </form>
 
+          <div py:if="bhrelations and ticket.exists" class="relations">
+            <bh:widget urn="TicketRelations">
+              <bh:args>
+                <bh:arg name="tid">$ticket.id</bh:arg>
+                <bh:arg name="max">20</bh:arg>
+              </bh:args>
+            </bh:widget>
+          </div>
+
           <!--! do not show attachments for old versions of this ticket or for new tickets -->
           <div py:if="not version and version != 0 and ticket.exists">
             <xi:include href="bh_list_of_attachments.html"
@@ -470,7 +508,7 @@
                 <fieldset class="iefix">
                   <textarea id="comment" name="comment" class="trac-resizable" rows="2"
                       placeholder="Enter new comment" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Enter new comment'">${comment}</textarea>
-                  <input type="submit" class="btn pull-right" name="submit" value="${_('Submit')}" />
+                  <input type="submit" id="comment-submit" class="btn pull-right" name="submit" value="${_('Submit')}" />
                   <label for="comment" class="help-block" i18n:msg="">
                     <span class="label label-info">Tip</span>
                     You may use