[Libreoffice-commits] .: 2 commits - bug/bug bug/bug.xhtml

Loic Dachary loic at kemper.freedesktop.org
Wed Oct 19 14:25:11 PDT 2011


 bug/bug.xhtml  |   11 ++++++-----
 bug/bug/bug.js |   35 +++++++++++++++++++----------------
 2 files changed, 25 insertions(+), 21 deletions(-)

New commits:
commit b68d1658adc8e7edcdf8e80500f507a7d0897ece
Author: Loic Dachary <loic at dachary.org>
Date:   Wed Oct 19 23:25:02 2011 +0200

    move the state success into the submission div, just after the submit state

diff --git a/bug/bug.xhtml b/bug/bug.xhtml
index 23081e3..534053e 100644
--- a/bug/bug.xhtml
+++ b/bug/bug.xhtml
@@ -204,6 +204,12 @@ Platform (if different from the browser):
               <div class="state state_submit">
                 <div class="bug"></div>
               </div>
+
+              <div class="state_success">
+                <p>The bug report has been successfully submitted.</p>
+                <p>You can edit it or add attachments using <a class="bug">the corresponding bugzilla page</a>.</p>
+              </div>
+
             </div>
 
 	    <div class="state state_subcomponent state_duplicates">
@@ -217,11 +223,6 @@ Platform (if different from the browser):
 
           </div>
 
-          <div class="state_success">
-            <p>The bug report has been successfully submitted.</p>
-            <p>You can edit it or add attachments using <a class="bug">the corresponding bugzilla page</a>.</p>
-          </div>
-
         </div>
       </div>
     </div>
commit 7a0dfad03b98925f4e3b8cf3b7b49d714e2364b1
Author: Loic Dachary <loic at dachary.org>
Date:   Wed Oct 19 23:20:24 2011 +0200

    protect the attach state from multiple runs

diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index 2acf8c6..0e367f0 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -176,8 +176,8 @@
                     }
                 };
 
-                $(".short", element).change(function() { validate(); });
-                $(".long", element).keyup(function() { validate(); });
+                $(".short", element).change(validate);
+                $(".long", element).keyup(validate);
                 element.addClass('initialized');
                 $.bug.current_step('description');
                 element.show();
@@ -186,22 +186,25 @@
 
         state_attach: function() {
             var element = $('.state_attach');
-            if($.browser.msie) {
-                // ie allow the input field to get focus, presumably to 
-                // type the filename. launch the browser instead.
-                $("input[type='file']", element).focus(function() {
-                    $(this).click();
-                    $(this).blur(); // loose focus so that no caret is shown even when in caret browsing
+            if(!element.hasClass('initialized')) {
+                if($.browser.msie) {
+                    // ie allow the input field to get focus, presumably to 
+                    // type the filename. launch the browser instead.
+                    $("input[type='file']", element).focus(function() {
+                        $(this).click();
+                        $(this).blur(); // loose focus so that no caret is shown even when in caret browsing
+                    });
+                }
+                $("input[type='file']", element).change(function() {
+                    // http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-March/018981.html
+                    // in a nutshell : deal with it, it won't go away
+                    var path = $(this).val().replace("C:\\fakepath\\","");
+                    $("input[name='ignored']", element).val(path);
                 });
+                element.addClass('initialized');
+                $.bug.current_step('attach');
+                element.show();
             }
-            $("input[type='file']", element).change(function() {
-                // http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-March/018981.html
-                // in a nutshell : deal with it, it won't go away
-                var path = $(this).val().replace("C:\\fakepath\\","");
-                $("input[name='ignored']", element).val(path);
-            });
-            $.bug.current_step('attach');
-            element.show();
         },
 
         state_submit_error_regexps: ['class="throw_error">([^<]*)', 'font size="\\+2">([^<]*)'],


More information about the Libreoffice-commits mailing list