[Libreoffice-commits] .: bug/bug

Loic Dachary loic at kemper.freedesktop.org
Wed Sep 14 07:12:15 PDT 2011


 bug/bug/bug.js |  108 ++++++++++++++++++++++++++++-----------------------------
 1 file changed, 54 insertions(+), 54 deletions(-)

New commits:
commit 261964a2c2fb1ac45ba433dc252d2471e148548c
Author: Loic Dachary <loic at dachary.org>
Date:   Wed Sep 14 16:10:05 2011 +0200

    remove extra comma and mixed tab/spaces to please jslint

diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index baf86f2..3f3ab29 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -29,20 +29,20 @@
 
         state_signin: function() {
             var element = $('.signin');
-	    $('.go', element).click(function() {
-		$('.error', element).empty();
-		$.bug.post('/index.cgi', {
+            $('.go', element).click(function() {
+                $('.error', element).empty();
+                $.bug.post('/index.cgi', {
                     Bugzilla_login: $('.user', element).val(),
                     Bugzilla_password: $('.password', element).val()
                 }, function(data) {
-		    if(data.indexOf($.bug.state_signin_error_string) < 0) {
-			element.hide();
-			$.bug.state_component();
-		    } else {
-               	        $('.error', element).text('invalid user or password');
-		    }
-		});
-	    });
+                    if(data.indexOf($.bug.state_signin_error_string) < 0) {
+                        element.hide();
+                        $.bug.state_component();
+                    } else {
+                        $('.error', element).text('invalid user or password');
+                    }
+                });
+            });
             element.show();
         },
 
@@ -50,14 +50,14 @@
             var element = $('.state_component');
 
             var change_component = function() {
-	        var component = $(this).val();
-	        $('.comment', element).hide();
-	        $('.comment.' + component, element).show();
-	        $.bug.state_subcomponent();
+                var component = $(this).val();
+                $('.comment', element).hide();
+                $('.comment.' + component, element).show();
+                $.bug.state_subcomponent();
             };
 
-	    $('.component', element).change(change_component);
-	    $('.component', element).prop("selectedIndex", 0);
+            $('.component', element).change(change_component);
+            $('.component', element).prop("selectedIndex", 0);
 
             element.show();
         },
@@ -69,11 +69,11 @@
             $('.active_subcomponent', element).html(subcomponent);
             var change_subcomponent = function() {
                 $.bug.refresh_related_bugs();
-	        $.bug.state_version();
+                $.bug.state_version();
             };
 
             $('.subcomponent', element).change(change_subcomponent);
-	    $('.subcomponent', element).prop("selectedIndex", 0);
+            $('.subcomponent', element).prop("selectedIndex", 0);
 
             element.show();
         },
@@ -81,10 +81,10 @@
         state_version: function() {
             var element = $('.state_version');
             if(!element.hasClass('initialized')) {
-	        $(".versions", element).change(function() {
+                $(".versions", element).change(function() {
                     $.bug.state_description();
                 });
-	        $(".versions").prop("selectedIndex", 0);
+                $(".versions").prop("selectedIndex", 0);
                 element.addClass('initialized');
                 element.show();
             }
@@ -100,8 +100,8 @@
                     }
                 };
 
-	        $(".short", element).change(function() { validate(); });
-	        $(".long", element).keyup(function() { validate(); });
+                $(".short", element).change(function() { validate(); });
+                $(".long", element).keyup(function() { validate(); });
                 element.addClass('initialized');
                 element.show();
             }
@@ -114,7 +114,7 @@
             var element = $('.state_submit');
             if(!element.hasClass('initialized')) {
                 $('.go', element).click(function() {
-	            $.bug.post('/post_bug.cgi', {
+                    $.bug.post('/post_bug.cgi', {
                         product: 'LibreOffice',
                         bug_status: 'UNCONFIRMED',
                         rep_platform: 'Other',
@@ -125,7 +125,7 @@
                         component: $('.state_component .component').val(),
                         short_desc: $('.state_subcomponent .active_subcomponent .subcomponent').val() + ': ' + $('.state_description .short').val(),
                         version: $('.state_version .versions').val(),
-                        comment: $('.state_description .long').val(),
+                        comment: $('.state_description .long').val()
                     }, function(data) {
                         var error = data.indexOf($.bug.state_submit_error_string);
                         if(error >= 0) {
@@ -135,7 +135,7 @@
                             var start = success + $.bug.state_submit_success_string.length;
                             $('.bug', element).text(data.substring(start, data.indexOf(' ', start)));
                             $.bug.state_success();
-		            $.bug.state_attach();
+                            $.bug.state_attach();
                         }
                     });
                 });
@@ -145,24 +145,24 @@
         },
 
         state_attach_error_string: 'class="throw_error">',
-	state_attach_success_string: 'Attachment #',
+        state_attach_success_string: 'Attachment #',
 
-	state_attach: function() {
+        state_attach: function() {
             var element = $('.state_attach');
-	    var bug = $('.state_submit .bug').text();
-	    $('.bug', element).val(bug);
-	    $('form', element).iframePostForm({ complete: function(data) {
+            var bug = $('.state_submit .bug').text();
+            $('.bug', element).val(bug);
+            $('form', element).iframePostForm({ complete: function(data) {
                 var error = data.indexOf($.bug.state_attach_error_string);
                 if(error >= 0) {
                     $('.error', element).text(data.substring(error + $.bug.state_attach_error_string.length, data.indexOf('<', error)));
-		} else {
-	            var success = data.indexOf($.bug.state_attach_success_string);
-		    var attachment = data.substring(success + $.bug.state_attach_success_string.length, data.indexOf('<', success));
-		    $('img', element).attr('src', '/attachment.cgi?id=' + attachment);
-		}
-	    }});
+                } else {
+                    var success = data.indexOf($.bug.state_attach_success_string);
+                    var attachment = data.substring(success + $.bug.state_attach_success_string.length, data.indexOf('<', success));
+                    $('img', element).attr('src', '/attachment.cgi?id=' + attachment);
+                }
+            }});
             element.show();
-	},
+        },
 
         state_success: function() {
             $('.submission').hide();
@@ -178,35 +178,35 @@
 
         logged_in: function() {
             $("body").css("cursor", "progress");
-	    return $.bug.get('/enter_bug.cgi').pipe(function(data) {
+            return $.bug.get('/enter_bug.cgi').pipe(function(data) {
                 $("body").css("cursor", "default");
-		return data.indexOf($.bug.logged_in_false) < 0;
-	    });
+                return data.indexOf($.bug.logged_in_false) < 0;
+            });
         },
-	
+        
         refresh_related_bugs: function() {
             $('.related_bugs').empty();
             var component = $('.state_component .component').val().replace('_','%20');
             var subcomponent = $('.state_subcomponent .subcomponent').val();
             var list = '/buglist.cgi?columnlist=short_desc&component=' + component + '&product=LibreOffice&query_format=advanced&short_desc_type=allwordssubstr&ctype=csv&short_desc=' + subcomponent;
             $.bug.get(list, undefined, function(data) {
-		var lines = data.split('\n');
-		var bug_urls = [];
-		for(var i = 1; i < lines.length; i++) {
-		    bug_urls.push(lines[i].replace(/([0-9]*),"(.*)"/,'<a href="/show_bug.cgi?id=$1">$2</a>'));
-		}
+                var lines = data.split('\n');
+                var bug_urls = [];
+                for(var i = 1; i < lines.length; i++) {
+                    bug_urls.push(lines[i].replace(/([0-9]*),"(.*)"/,'<a href="/show_bug.cgi?id=$1">$2</a>'));
+                }
                 $('.related_bugs').html(bug_urls.join('<br>'));
             });
         },
 
         main: function() {
-	    $.bug.logged_in().done(function(status) {
-	        if(status) {
-		    $.bug.state_component();
-	        } else {
-		    $.bug.state_signin();
-	        }
-	    });
+            $.bug.logged_in().done(function(status) {
+                if(status) {
+                    $.bug.state_component();
+                } else {
+                    $.bug.state_signin();
+                }
+            });
         }
     };
 


More information about the Libreoffice-commits mailing list