You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by rj...@apache.org on 2013/12/10 07:26:28 UTC

svn commit: r1549765 - in /bloodhound/trunk/bloodhound_theme/bhtheme: htdocs/bloodhound.css htdocs/js/theme.js templates/bloodhound_theme.html

Author: rjollos
Date: Tue Dec 10 06:26:28 2013
New Revision: 1549765

URL: http://svn.apache.org/r1549765
Log:
0.8dev: Show the last created ticket in the QCT form. Refs #696.

Based on a mock-up by jdreimann. Patch by olemis with minor modifications.

Modified:
    bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css
    bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/js/theme.js
    bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html

Modified: bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css?rev=1549765&r1=1549764&r2=1549765&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css (original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css Tue Dec 10 06:26:28 2013
@@ -354,6 +354,11 @@ pre {
  display: inline;
 }
 
+#qct-last-container {
+  background-color: #FFFFCC;
+  margin-top: 4px;
+}
+
 /* @end */
 
 /* @group Generic rules */

Modified: bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/js/theme.js
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/js/theme.js?rev=1549765&r1=1549764&r2=1549765&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/js/theme.js (original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/js/theme.js Tue Dec 10 06:26:28 2013
@@ -99,7 +99,13 @@ $( function () {
     // Display & hide message triggered by quick create box
     function qct_alert(msg) {
       qct_info = msg;
-      jQuery('#qct-newticket').popover('show');
+      var link_content = '#' + qct_info.product + '-' + qct_info.ticket;
+      var link = $(qct_info.msg).filter('a').html(link_content);
+      $('#qct-last').empty()
+                    .append('Last ticket created: ')
+                    .append(link);
+      $('#qct-last-container').show();
+      $('#qct-newticket').popover('show');
       if (qct_timeout)
         clearTimeout(qct_timeout);
       qct_timeout = setTimeout(qct_alert_close, 4000);
@@ -156,6 +162,7 @@ $( function () {
               function(ticket) {
                 qct_alert({
                     ticket: ticket.id,
+                    product: ticket.product,
                     msg: '<span class="alert alert-success">' +
                          'Has been created</span> ' +
                          '<a href="' + ticket.url + '">View / Edit</a>'
@@ -246,4 +253,3 @@ function setup_sticky_panel(selector) {
       }
     })
 }
-

Modified: bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html?rev=1549765&r1=1549764&r2=1549765&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html (original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html Tue Dec 10 06:26:28 2013
@@ -182,6 +182,9 @@
                             <a id="qct-more" class="btn btn-link" href="${href.newticket()}">More fields</a>
                             <button id="qct-cancel" class="btn btn-link">Cancel</button>
                           </div>
+                          <div id="qct-last-container" style="display:none">
+                            <small class="pull-right" id="qct-last"></small>&nbsp;
+                          </div>
                         </py:when>
                         <div py:otherwise="" class="alert alert-info">
                           <p>