incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g..@apache.org
Subject svn commit: r1430903 - in /incubator/bloodhound/trunk/bloodhound_theme/bhtheme: htdocs/bloodhound.css templates/bh_ticket.html templates/bh_ticket_box.html
Date Wed, 09 Jan 2013 15:41:45 GMT
Author: gjm
Date: Wed Jan  9 15:41:44 2013
New Revision: 1430903

URL: http://svn.apache.org/viewvc?rev=1430903&view=rev
Log:
stop comment previews from conflicting with in-place edit - fixes #346 (from olemis)

Modified:
    incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css
    incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html
    incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_box.html

Modified: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css?rev=1430903&r1=1430902&r2=1430903&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css (original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css Wed Jan  9 15:41:44
2013
@@ -231,6 +231,13 @@ pre.wiki {
   width: auto;
 }
 
+.trac-loading {
+  background: url(../common/loading.gif) 0 50% no-repeat;
+  margin: 0 1em;
+  padding-left: 16px;
+  display: none;
+}
+
 /* @end */
 
 /* @group Quick Ticket fieldset */

Modified: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html?rev=1430903&r1=1430902&r2=1430903&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html (original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html Wed Jan 
9 15:41:44 2013
@@ -116,12 +116,16 @@
                   })
               }
             });
+
+          // Enable automatic preview
+          $('#inplace-propertyform').autoSubmit({preview : 1}, 
+              full_preview, '#overview .trac-loading')
         }
 
         function revert_ticket() {
           $('[data-edit="inplace"]').each(function() {
               var fc = $(this).removeClass('edit-active');
-              fc.html(fc.attr('data-edit-orig'));
+              fc.html(fc.attr('data-edit-orig')).attr('data-edit-orig', '');
             });
         }
 
@@ -154,10 +158,8 @@
         var comment_focused = false;
         $("#comment").focus(function() { comment_focused = true; })
                      .blur(function() { comment_focused = false; });
-        $("#propertyform").autoSubmit({preview: '1'}, function(data, reply) {
+        function full_preview(data, reply) {
           var items = $(reply);
-          // Update ticket box
-          $("#ticket").replaceWith(items.filter('#ticket'));
           // Unthread, unrevert and update changelog
           if (!$('#trac-comments-oldest').checked())
             $('#trac-comments-oldest').click().change();
@@ -176,7 +178,9 @@
           // Collapse property form if comment editor has focus
           if (show_preview && comment_focused)
             $("#modify").parent().addClass("collapsed");
-        }, "#ticketchange .trac-loading");
+        }
+        $("#propertyform").autoSubmit({preview: '1'}, full_preview,
+            "#ticketchange .trac-loading");
         $("#trac-comment-editor").autoSubmit({preview_comment: '1'}, function(data, reply)
{
           var comment = $("#trac-comment-editor").next("div.comment").html(reply);
           comment.toggle(comment.children().length != 0);
@@ -678,6 +682,9 @@ ${value}</textarea>
           Cancel
         </button>
       </div>
+      <div class="btn-group">
+        <span class="trac-loading">&nbsp;</span>
+      </div>
       </div>
     </script>
   </body>

Modified: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_box.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_box.html?rev=1430903&r1=1430902&r2=1430903&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_box.html (original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_box.html Wed Jan
 9 15:41:44 2013
@@ -100,10 +100,8 @@ Arguments:
         <div class="pull-right">
           <form py:if="ticket.exists and ticket.description and can_append"
               id="addreply" method="get" action="#comment">
-            <input type="hidden" name="replyto" value="description" />
-            <input type="submit" name="reply" value="${_('Reply')}"
-                class="btn btn-mini"
-                title="Reply, quoting this description" />
+            <a href="?replyto=description#trac-add-comment" class="btn btn-mini"
+                title="Reply, quoting this description" type="submit">Reply</a>
           </form>
         </div>
         <div class="searchable" xml:space="preserve"



Mime
View raw message