[bugzilla-gnome-org-extensions] Set attachment status after filling in select



commit 4b6f6cc2aab014e1d2f3902e84e36b386568a6be
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Wed Sep 16 21:45:37 2009 -0400

    Set attachment status after filling in select
    
    We have to to select the current value from the attachment status
    select *after* we actually create the options.

 js/splinter.js |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/js/splinter.js b/js/splinter.js
index 92bcb64..4bfcf5e 100644
--- a/js/splinter.js
+++ b/js/splinter.js
@@ -427,10 +427,6 @@ function start(xml) {
     $("#attachmentId").text(theAttachment.id);
     $("#attachmentDesc").text(theAttachment.description);
     $("#attachmentDate").text(Utils.formatDate(theAttachment.date));
-    if (theAttachment.status != null)
-        $("#attachmentStatus").val(theAttachment.status);
-    else
-        $("#attachmentStatusSpan").hide();
 
     for (i = 0; i < configAttachmentStatuses.length; i++) {
         $("<option></option")
@@ -438,6 +434,11 @@ function start(xml) {
             .appendTo($("#attachmentStatus"));
     }
 
+    if (theAttachment.status != null)
+        $("#attachmentStatus").val(theAttachment.status);
+    else
+        $("#attachmentStatusSpan").hide();
+
     if (thePatch.intro)
         $("#patchIntro").text(thePatch.intro);
     else


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