[Libreoffice-commits] .: 3 commits - bug/bug bug/bug.xhtml bug/subcomponents.xsl

Thorsten Behrens thorsten at kemper.freedesktop.org
Mon Jul 9 12:11:57 PDT 2012


 bug/bug.xhtml         |    4 ++--
 bug/bug/bug.css       |    2 +-
 bug/bug/bug.js        |   23 ++++++++++++++---------
 bug/bug/qunit.css     |   10 +++++-----
 bug/bug/select.js     |    2 +-
 bug/bug/skin.js       |    6 +++---
 bug/bug/test.html     |    2 +-
 bug/bug/test.js       |    2 +-
 bug/subcomponents.xsl |    2 +-
 9 files changed, 29 insertions(+), 24 deletions(-)

New commits:
commit 7ce9eca14b6a9dd0d945ad987d34b54f99d364e2
Author: Rob Snelders <programming at ertai.nl>
Date:   Thu Jul 5 23:05:42 2012 +0200

    Solves a crash of javascript when running on your own machine without the skin-option

diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index 9b7f906..9947ff2 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -26,7 +26,12 @@
                 url: url,
                 data: args
             }).pipe(null, function(error) {
-                var message = url + '(' + $.param(args) + ') XHR error. ';
+                var message;
+		if (args == undefined) {
+		  message = url + '() XHR error. ';
+		} else {
+		  message = url + '(' + $.param(args) + ') XHR error. ';
+		}
                 if('status' in error) {
                     message += 'status = ' + error.status + ' ';
                 }
@@ -300,7 +305,7 @@
             }
         },
 
-        main: function() {
+        main: function(in_isTest) {
             $.bug.compatibility();
             $.bug.frame();
             $.bug.logged_in().done(function(status) {
commit fc2091c151315a398ef7caef2891bb705292af0d
Author: Rob Snelders <programming at ertai.nl>
Date:   Thu Jul 5 22:19:47 2012 +0200

    Remove trailing whitespaces

diff --git a/bug/bug.xhtml b/bug/bug.xhtml
index ca70672..615d3a3 100644
--- a/bug/bug.xhtml
+++ b/bug/bug.xhtml
@@ -92,12 +92,12 @@
               </div>
             </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 class="username"></div>
 
           <div class="state signin">
diff --git a/bug/bug/bug.css b/bug/bug/bug.css
index 6fde858..a932f2a 100644
--- a/bug/bug/bug.css
+++ b/bug/bug/bug.css
@@ -15,7 +15,7 @@
      along with this program.  If not, see <http:www.gnu.org/licenses/>.
 */
 /* javascript and old browsers fallback */
-.javascript, .unsupported, .compatibility .version { 
+.javascript, .unsupported, .compatibility .version {
     display: none;
 }
 
diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index d670092..9b7f906 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -53,7 +53,7 @@
                 $.bug.error_set(error[1]);
                 throw error;
             } else {
-                var success = data.match(success_regexp);                
+                var success = data.match(success_regexp);
                 if(success !== null) {
                     return success[1];
                 } else {
@@ -114,23 +114,23 @@
             element.show();
             $('.select', element).select();
             $('.select .choice, img', element).hover(function() {
-                var component = $(this).attr('data');                
+                var component = $(this).attr('data');
                 $('.comment', element).hide();
                 $('.comment.' + component, element).show();
             });
             $('.select .choice', element).click(function() {
                 $(this).mouseenter();
-                var component = $(this).attr('data');                
+                var component = $(this).attr('data');
                 $('img', element).removeClass('selected');
                 $('img[data="' + component + '"]').addClass('selected');
                 $.bug.state_subcomponent();
             });
             $('img', element).click(function() {
-                var component = $(this).attr('data');                
+                var component = $(this).attr('data');
                 $(".select .choice[data='" + component + "']", element).click();
             });
             $('.components_icons').mouseleave(function() {
-                $('img.selected', element).mouseenter();                
+                $('img.selected', element).mouseenter();
             });
         },
 
@@ -263,7 +263,7 @@
             element.show();
         },
 
-        // if this string is found in the page returned when 
+        // if this string is found in the page returned when
         // trying to fill a bug, it means the user is not logged in
         logged_in_false: 'form name="login"',
 
@@ -274,7 +274,7 @@
                 return data.indexOf($.bug.logged_in_false) < 0;
             });
         },
-        
+
         refresh_related_bugs: function() {
             $('.related_bugs').empty();
             var component = $('.state_component .chosen').attr('data').replace('_','%20');
diff --git a/bug/bug/qunit.css b/bug/bug/qunit.css
index a6a831c..9b74192 100644
--- a/bug/bug/qunit.css
+++ b/bug/bug/qunit.css
@@ -27,7 +27,7 @@
 	font-size: 1.5em;
 	line-height: 1em;
 	font-weight: normal;
-	
+
 	border-radius: 15px 15px 0 0;
 	-moz-border-radius: 15px 15px 0 0;
 	-webkit-border-top-right-radius: 15px;
@@ -81,13 +81,13 @@
 #qunit-tests ol {
 	margin-top: 0.5em;
 	padding: 0.5em;
-	
+
 	background-color: #fff;
-	
+
 	border-radius: 15px;
 	-moz-border-radius: 15px;
 	-webkit-border-radius: 15px;
-	
+
 	box-shadow: inset 0px 2px 13px #999;
 	-moz-box-shadow: inset 0px 2px 13px #999;
 	-webkit-box-shadow: inset 0px 2px 13px #999;
@@ -150,7 +150,7 @@
 
 #qunit-tests .pass                          { color: #528CE0; background-color: #D2E0E6; }
 #qunit-tests .pass .test-name               { color: #366097; }
- 
+
 #qunit-tests .pass .test-actual,
 #qunit-tests .pass .test-expected           { color: #999999; }
 
diff --git a/bug/bug/select.js b/bug/bug/select.js
index 74432c7..54aef31 100644
--- a/bug/bug/select.js
+++ b/bug/bug/select.js
@@ -44,5 +44,5 @@
 
     $.fn.select.defaults = {
     };
-		    
+
 })(jQuery);
diff --git a/bug/bug/test.html b/bug/bug/test.html
index 54f2665..72a84fb 100644
--- a/bug/bug/test.html
+++ b/bug/bug/test.html
@@ -76,7 +76,7 @@
     <div class="state_subcomponent">
       <div class="active_subcomponent"></div>
     </div>
-    
+
     <div class="state_subcomponent">
       <div class="subcomponents">
         <div xmlns="" class="Formula_editor">
diff --git a/bug/bug/test.js b/bug/bug/test.js
index 73b194b..defb842 100644
--- a/bug/bug/test.js
+++ b/bug/bug/test.js
@@ -271,7 +271,7 @@ test("state_submit", function() {
     });
     form.submit();
     form.submit(); // noop
-    
+
     $.bug.state_submit_element = 'div'; // because <html> can't be inserted in the dom
 
     // <title> cannot be inserted by IE8
diff --git a/bug/subcomponents.xsl b/bug/subcomponents.xsl
index eddc70d..ba87311 100644
--- a/bug/subcomponents.xsl
+++ b/bug/subcomponents.xsl
@@ -60,5 +60,5 @@
 	 </xsl:element>
 	</xsl:if>
     </xsl:template>
-    
+
 </xsl:stylesheet>
commit cd1af6c769db93542bdee91724282276d98508a4
Author: Rob Snelders <programming at ertai.nl>
Date:   Thu Jul 5 21:04:54 2012 +0200

    Select the first options in the select-boxes so the skin-options always work.

diff --git a/bug/bug/skin.js b/bug/bug/skin.js
index 1399fac..7858f67 100644
--- a/bug/bug/skin.js
+++ b/bug/bug/skin.js
@@ -26,18 +26,18 @@
       }
       function subcomponent() {
           component();
-          $('.state_component .choice:nth(3)').click();
+          $('.state_component .choice:nth(0)').click();
       }
       function version() {
           subcomponent();
           $.bug.ajax = function(settings) {
               return $.Deferred().resolve('NUM,DESC\n100,"BUG 1"\n200,"BUG 2"\n');
           };
-          $('.state_subcomponent .active_subcomponent .choice:nth(2)').click();
+          $('.state_subcomponent .active_subcomponent .choice:nth(0)').click();
       }
       function description() {
           version();
-          $('.state_version .choice:nth(2)').click();
+          $('.state_version .choice:nth(0)').click();
           $('.state_description .short').val('12');
       }
       function submit() {


More information about the Libreoffice-commits mailing list