[bugzilla-gnome-org-extensions] Don't show "bugInfo" on the attachment page



commit cc783b6364ce58f8f24b9853a5cb1d2d449a8698
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Sat Oct 3 21:00:50 2009 -0400

    Don't show "bugInfo" on the attachment page
    
    Showing the title of the bug on the attachment page caused confusion
    between the patch subject and the bug title (which is often the patch
    subject of some *other* patch attached to the bug.) Omit it, and just
    put a link to the bug on the right side of the header.

 js/splinter.js      |   32 +++++++++++++++-----------------
 web/index.html.body |    2 +-
 2 files changed, 16 insertions(+), 18 deletions(-)
---
diff --git a/js/splinter.js b/js/splinter.js
index 1134d25..d4e3143 100644
--- a/js/splinter.js
+++ b/js/splinter.js
@@ -612,13 +612,11 @@ function addPatchFile(file) {
 }
 
 function showOverview() {
-    $("#bugInfo").show();
     $("#overview").show();
     $(".file").hide();
 }
 
 function showPatchFile(file) {
-    $("#bugInfo").hide();
     $("#overview").hide();
     $(".file").hide();
     if (file.div)
@@ -666,18 +664,17 @@ function start(xml) {
     $("#overview").show();
     $("#files").show();
 
-    $("#bugLink")
-        .click(flushSaveDraft)
-        .attr('href', newPageUrl(theBug.id));
-
     $("#subtitle").text("Attachment " + theAttachment.id + " - " + theAttachment.description);
-    $("#information").text(Utils.formatDate(theAttachment.date));
+    $("<a></a>")
+        .text("Bug " + theBug.id)
+        .attr('href', newPageUrl(theBug.id))
+        .attr('title', theBug.shortDesc)
+        .click(flushSaveDraft)
+        .appendTo("#information");
 
     for (i = 0; i < configAttachmentStatuses.length; i++) {
-        $("<option></option")
-            .text(configAttachmentStatuses[i])
-            .appendTo($("#attachmentStatus"));
-    }
+        $("<option></option") .text(configAttachmentStatuses[i])
+        .appendTo($("#attachmentStatus")); }
 
     if (theAttachment.status != null)
         $("#attachmentStatus").val(theAttachment.status);
@@ -763,14 +760,8 @@ function start(xml) {
 function gotBug(xml) {
     theBug = Bug.Bug.fromDOM(xml);
 
-    $("#bugInfo").show();
     showNote();
 
-    $("#bugId").text(theBug.id);
-    $("#bugShortDesc").text(theBug.shortDesc);
-    $("#bugReporter").text(theBug.getReporter());
-    $("#bugCreationDate").text(Utils.formatDate(theBug.creationDate));
-
     if (attachmentId != null) {
         theAttachment = theBug.getAttachment(attachmentId);
         if (theAttachment == null)
@@ -864,6 +855,13 @@ function showEnterBug() {
 }
 
 function showChooseAttachment() {
+    $("#bugId").text(theBug.id);
+    $("#bugShortDesc").text(theBug.shortDesc);
+    $("#bugReporter").text(theBug.getReporter());
+    $("#bugCreationDate").text(Utils.formatDate(theBug.creationDate));
+
+    $("#bugInfo").show();
+
     document.title = "Bug " + theBug.id + " - " + theBug.shortDesc + " - Patch Review";
     $("#originalBugLink").attr('href', configBugzillaUrl + "/show_bug.cgi?id=" + theBug.id);
 
diff --git a/web/index.html.body b/web/index.html.body
index 93ef06b..22d4f78 100644
--- a/web/index.html.body
+++ b/web/index.html.body
@@ -1,7 +1,7 @@
 <div id="error" style="display: none;"> </div>
 <div id="navigation" style="display: none;"></div>
 <div id="bugInfo" style="display: none;">
-  <a id="bugLink">Bug <span id="bugId"></span></a> -
+  Bug <span id="bugId"></span> -
   <span id="bugShortDesc"></span> -
   <span id="bugReporter"></span> -
   <span id="bugCreationDate"></span>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]