[Libreoffice-commits] .: bug/bug bug/bug.xhtml bug/query.pl

Rob Snelders rsnelders at kemper.freedesktop.org
Sat Nov 24 12:59:13 PST 2012


 bug/bug.xhtml      |   11 +++++++++--
 bug/bug/bug.js     |   25 ++++++++++++++++++++-----
 bug/bug/select.css |    4 ++++
 bug/bug/skin.js    |    2 +-
 bug/query.pl       |    4 ++--
 5 files changed, 36 insertions(+), 10 deletions(-)

New commits:
commit f51b7d5fb781e110a394bb6cb2b6549d4b6bebef
Author: Rob Snelders <programming at ertai.nl>
Date:   Sat Nov 24 21:59:08 2012 +0100

    Adding regression-option to the BSA

diff --git a/bug/bug.xhtml b/bug/bug.xhtml
index f50b2da..748377b 100644
--- a/bug/bug.xhtml
+++ b/bug/bug.xhtml
@@ -152,17 +152,24 @@
               <div class="inlineblock">
                 <div class="state state_details versions">
                   <div class="input-label">Version</div>
-                  &versions;
+                  <div class="versions select">&versions;</div>
                 </div>
               </div>
+
             </div>
-            <div class="state_details">
+            <div class="state state_details">
               <div class="inlineblock">
                 <div class="state state_details op_sys">
 		  <div class="input-label">Operating System</div>
                   &op_sys;
                 </div>
               </div>
+              <div class="inlineblock">
+                <div class="state state_details regression">
+		  <div class="input-label">Last worked in:</div>
+                  <div class="regression select">&versions;</div>
+                </div>
+              </div>
             </div>
 
             <div class="state state_description">
diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index 07658bd..131f396 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -98,6 +98,7 @@
         sub_component: 'EMPTY',
         version: '',
         op_sys: '',
+        regression: '',
 
         state_signin_error_regexps: [/CLASS="THROW_ERROR">([^<]*)/i],
         state_signin_success_regexp: /LOG&NBSP;OUT<\/A>([^<]*)/i,
@@ -168,24 +169,35 @@
             $('.active_subcomponent .select .choice', element).click(function() {
                 $.bug.refresh_related_bugs();
                 $.bug.subcomponent = $('.state_details .active_subcomponent .chosen').attr('data');
-                if ($.bug.version != '' && $.bug.op_sys != '') {
+                if ($.bug.version != '' && $.bug.op_sys != '' && $.bug.regression != '') {
                     $.bug.state_description();
                 }
             });
-            $('.select', element).select();
+            $(".select", element).select();
+            $(".state_details .versions .choice[data='NONE']").remove();
             $(".versions .select .choice", element).click(function() {
                 $.bug.version = $('.state_details .version .chosen').attr('data');
-                if ($.bug.subcomponent != 'EMPTY' && $.bug.op_sys != '') {
+                if ($.bug.subcomponent != 'EMPTY' && $.bug.op_sys != '' && $.bug.regression != '') {
                     $.bug.state_description();
                 }
             });
-            $('.select', element).select();
+            $(".select", element).select();
             $(".op_sys .select .choice", element).click(function() {
                 $.bug.op_sys = $('.state_details .op_sys .chosen').attr('data');
-                if ($.bug.subcomponent != 'EMPTY' && $.bug.version != '') {
+                if ($.bug.subcomponent != 'EMPTY' && $.bug.version != '' && $.bug.regression != '') {
                     $.bug.state_description();
                 }
              });
+            $(".select", element).select();
+            $(".regression .select .choice", element).click(function() {
+                $.bug.regression = $('.state_details .regression .chosen').attr('data');
+                if ($.bug.subcomponent != 'EMPTY' && $.bug.version != '' && $.bug.op_sys != '') {
+                    $.bug.state_description();
+                }
+             });
+             $(".state_details .regression .choice[data='NONE']").click();
+
+
         },
 
         state_description: function() {
@@ -261,7 +273,9 @@
                     //Add Operating System
                     var op_sys = $('.state_op_sys .chosen').attr('data');
                     var comment = $('.state_description .long').val();
+                    var regression = (($.bug.regression != "NONE" && $.bug.regression != "")?$.bug.regression:"");
                     comment = comment + "\nOperating System: " + $(".op_sys .chosen").text();
+                    comment = comment + (regression != "")?"\nLast worked in: " + regression:"";
                     $("body").css("cursor", "progress");
                     $('input[name="token"]', form).val($.bug.token);
                     $('input[name="component"]', form).val(component);
@@ -269,6 +283,7 @@
                     $('input[name="op_sys"]', form).val($.bug.op_sys);
                     $('input[name="short_desc"]', form).val(short_desc);
                     $('input[name="comment"]', form).val(comment);
+                    $('input[name="keywords"]', form).val((regression != "")?"regression":"");
                     $.bug.token = '';
                     return true;
                 });
diff --git a/bug/bug/select.css b/bug/bug/select.css
index 509797f..7d68471 100644
--- a/bug/bug/select.css
+++ b/bug/bug/select.css
@@ -25,6 +25,10 @@
     z-index: 1;
 }
 
+.select.regression {
+    z-index: 1;
+}
+
 .select ul {
     list-style: none;
     margin: 0;
diff --git a/bug/bug/skin.js b/bug/bug/skin.js
index 164ac22..208da61 100644
--- a/bug/bug/skin.js
+++ b/bug/bug/skin.js
@@ -21,6 +21,7 @@
       $('.skin').show();
       $.bug.frame();
       $.bug.compatibility();
+      $.bug.token = "AA";
       function component() {
           $.bug.state_component();
       }
@@ -42,7 +43,6 @@
           description();
           $('.state_description .short').val('1234567890');
           $('.state_description .long').val('0123456789');
-          $.bug.token = "AA";
           $('.state_description .short').change();
       }
 
diff --git a/bug/query.pl b/bug/query.pl
index c56a2b5..c3e6c6c 100644
--- a/bug/query.pl
+++ b/bug/query.pl
@@ -1,3 +1,4 @@
+
 #
 #     Copyright (C) 2011 Loic Dachary <loic at dachary.org>
 #
@@ -42,7 +43,6 @@ print "<?xml version='1.0' encoding='ISO-8859-1'?>\n";
         return lc($b) cmp lc($a);
     } } @{$vers[$libreoffice]};
 print <<EOF;
-	  <div class="versions select">
             <div class="select-header">
               <div class="chosen">(chose one)</div>
             </div>
@@ -58,6 +58,7 @@ print <<EOF;
                       <div class="center">
                         <ul>
 EOF
+    print " <li class='choice' data='NONE'>None</li>\n";
     for($count = 0; $count < @versions; $count++) {
         print " <li class='choice' data='$versions[$count]'>$versions[$count]</li>\n";
     }
@@ -69,6 +70,5 @@ EOF
                 </div>
               </div>
             </div>
-	  </div>
 EOF
 


More information about the Libreoffice-commits mailing list