[Libreoffice-commits] .: bug/bug

2012-02-22 Thread Thorsten Behrens
 bug/bug/bug.js  |9 +
 bug/bug/test.js |5 +++--
 2 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 8a19cf7ea488f6b16989e7e49d18bef2452785af
Author: Kate Goss katherine.g...@gmail.com
Date:   Sat Feb 18 20:49:17 2012 +

fdo#42006: Make Bugzilla Assistant tests pass in IE8

diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index b2e4ed6..d670092 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -208,10 +208,11 @@
 element.show();
 }
 },
-
-state_submit_error_regexps: [/CLASS=THROW_ERROR([^]*)/i, /FONT 
SIZE=\\+2\([^]*)/i, // bugzilla  4
- /DIV CLASS=\BOX\\s+P([^]+)/i], 
// bugzilla = 4
-state_submit_success_regexp: /TITLEBug ([0-9]+)/i,
+// Making the double quotes optional caters for differing browser
+// behaviour with jquery .text() - IE8 removes double quotes.
+state_submit_error_regexps: [/CLASS=?THROW_ERROR?([^]*)/i, /FONT 
SIZE=\?\+2\?([^]*)/i, // bugzilla  4
+ /DIV CLASS=\?BOX\?\s+P([^]+)/i],   
  // bugzilla = 4
+state_submit_success_regexp: /Bug ([0-9]+)/i,
 state_submit_element: 'html',
 
 state_submit: function() {
diff --git a/bug/bug/test.js b/bug/bug/test.js
index 93daea0..73b194b 100644
--- a/bug/bug/test.js
+++ b/bug/bug/test.js
@@ -274,12 +274,13 @@ test(state_submit, function() {
 
 $.bug.state_submit_element = 'div'; // because html can't be inserted in 
the dom
 
-$('#submissionoutput').html('divdivtitleBug ' + bug + ' 
Submitted/title/div/div');
+// title cannot be inserted by IE8
+$('#submissionoutput').html('divdivBug ' + bug + ' 
Submitted/div/div');
 $('#submissionoutput').load();
 equal($('.bug', element).text(), bug, 'bug number');
 ok(!element.hasClass('inprogress'), 'is no longer progress');
 
-var error = ' ERROR ';
+var error = 'ERROR';
 equal($('.error').text(), '', 'error is not set');
 
 // make sure you enclose the useful elements with divdiv ... 
/div/div
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: bug/bug

2011-12-13 Thread Petr Mladek
 bug/bug/bug.js |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 84dfe9a9cbe15a9a83e201fbd800f78694f7e05f
Author: Nino nn.l...@kflog.org
Date:   Tue Dec 13 19:59:13 2011 +0100

Show related bug reports in a new widnow (fdo#41157)

diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index 47a88b8..294bc79 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -284,6 +284,7 @@
 var bug_urls = [];
 for(var i = 1; i  lines.length; i++) {
 bug_urls.push(lines[i].replace(/([0-9]*),(.*)/,'a 
href=' + $.bug.url + '/show_bug.cgi?id=$1$2/a'));
+bug_urls.push(lines[i].replace(/([0-9]*),(.*)/,'a 
href=' + $.bug.url + '/show_bug.cgi?id=$1 target=_blank$2/a'));
 }
 $('.related_bugs').html(bug_urls.join('br'));
 });
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: bug/bug

2011-12-13 Thread Petr Mladek
 bug/bug/bug.js |1 -
 1 file changed, 1 deletion(-)

New commits:
commit da41f6063376c393399d1d62d609f9ede2affdf7
Author: Nino nn.l...@kflog.org
Date:   Tue Dec 13 20:02:28 2011 +0100

fix the last commit in bugreport assistant

problem caused by Petr Mladek who commited it wrong way

diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index 294bc79..b2e4ed6 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -283,7 +283,6 @@
 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=' + $.bug.url + '/show_bug.cgi?id=$1$2/a'));
 bug_urls.push(lines[i].replace(/([0-9]*),(.*)/,'a 
href=' + $.bug.url + '/show_bug.cgi?id=$1 target=_blank$2/a'));
 }
 $('.related_bugs').html(bug_urls.join('br'));
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: bug/bug

2011-12-03 Thread Korrawit Pruegsanusak
 bug/bug/test.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0cae07f8d74b1c14967accee729c8af3cd256f5a
Author: Korrawit Pruegsanusak detective.conan.1...@gmail.com
Date:   Sat Dec 3 16:44:24 2011 +0700

Also make the test successful after fixing create-account-link

diff --git a/bug/bug/test.js b/bug/bug/test.js
index 0f3ef00..93daea0 100644
--- a/bug/bug/test.js
+++ b/bug/bug/test.js
@@ -115,7 +115,7 @@ test(state_signin, function() {
 $.bug.state_component = function() { ok(true, 'state_component'); };
 $.bug.state_signin();
 equal($('.login-link').attr('href'), '/');
-equal($('.create-account-link').attr('href'), '/enter_bug.cgi');
+equal($('.create-account-link').attr('href'), '/createaccount.cgi');
 equal($('.signin').css('display'), 'block');
 // fail to login, shows error
 equal($('.error-container').css('display'), 'none', 'no error');
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: bug/bug

2011-11-27 Thread Korrawit Pruegsanusak
 bug/bug/bug.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 535d0a62962dab98fe4ec6caecd063890496bf01
Author: Korrawit Pruegsanusak detective.conan.1...@gmail.com
Date:   Tue Oct 25 14:45:23 2011 +0700

'Create account' link fixed

diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index a875eaf..47a88b8 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -102,7 +102,7 @@
 });
 });
 $('.login-link', element).attr('href', $.bug.url + '/');
-$('.create-account-link', element).attr('href', $.bug.url + 
'/enter_bug.cgi');
+$('.create-account-link', element).attr('href', $.bug.url + 
'/createaccount.cgi');
 $.bug.current_step('signin');
 element.show();
 },
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: bug/bug

2011-11-03 Thread Loic Dachary
 bug/bug/bug.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7d5caeb31b3bb42d2efe48f6bab1695a110ce637
Author: Loic Dachary l...@dachary.org
Date:   Thu Nov 3 10:39:02 2011 +0100

https://bugs.freedesktop.org/show_bug.cgi?id=42525
Add missing $.bug.url when building the related bugs urls.

diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index 388f04f..a875eaf 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -283,7 +283,7 @@
 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'));
+bug_urls.push(lines[i].replace(/([0-9]*),(.*)/,'a 
href=' + $.bug.url + '/show_bug.cgi?id=$1$2/a'));
 }
 $('.related_bugs').html(bug_urls.join('br'));
 });
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: bug/bug

2011-10-20 Thread Loic Dachary
 bug/bug/bug.js |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit e20dcb0f54d8b0634943051a644baec358e26ed0
Author: Loic Dachary l...@dachary.org
Date:   Thu Oct 20 16:40:06 2011 +0200

Lookup in the HTML output using case insensitive match because IE8 converts 
element names to upper case where firefox converts them to lowercase.

diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index dad6af5..545b825 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -79,8 +79,8 @@
 
 url: '',
 
-state_signin_error_regexps: ['class=throw_error([^]*)'],
-state_signin_success_regexp: 'Lognbsp;out/a([^]*)',
+state_signin_error_regexps: [/CLASS=THROW_ERROR([^]*)/i],
+state_signin_success_regexp: /LOGNBSP;OUT/A([^]*)/i,
 
 state_signin: function() {
 var element = $('.signin');
@@ -207,8 +207,8 @@
 }
 },
 
-state_submit_error_regexps: ['class=throw_error([^]*)', 'font 
size=\\+2([^]*)'],
-state_submit_success_regexp: 'titleBug ([0-9]+)',
+state_submit_error_regexps: [/CLASS=THROW_ERROR([^]*)/i, /FONT 
SIZE=\\+2([^]*)/i],
+state_submit_success_regexp: /TITLEBug ([0-9]+)/i,
 state_submit_element: 'html',
 
 state_submit: function() {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: bug/bug

2011-10-19 Thread Loic Dachary
 bug/bug/bug.js  |2 +-
 bug/bug/test.js |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 22a4a09c366b30d7ea938a2acb93bd123a369b0f
Author: Loic Dachary l...@dachary.org
Date:   Wed Oct 19 19:38:19 2011 +0200

apply submit and action to the form instead of the enclosing div

diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index 88fff59..ad3f3d5 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -211,7 +211,7 @@
 state_submit: function() {
 var element = $('.state_submit');
 if(!element.hasClass('initialized')) {
-var form = $('.submission_form');
+var form = $('.submission_form form');
 form.attr('action', $.bug.url + '/post_bug.cgi');
 form.submit(function() {
 if($(element).hasClass('inprogress')) {
diff --git a/bug/bug/test.js b/bug/bug/test.js
index d8db7af..98c1f65 100644
--- a/bug/bug/test.js
+++ b/bug/bug/test.js
@@ -253,7 +253,7 @@ test(state_submit, function() {
 $('.state_description .long').val(comment);
 
 var bug = '40763';
-var form = $('.submission_form');
+var form = $('.submission_form form');
 
 form.submit(function() {
 ok(element.hasClass('inprogress'), 'is in progress');
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: bug/bug

2011-10-19 Thread Loic Dachary
 bug/bug/bug.js  |4 +---
 bug/bug/skin.js |1 +
 bug/bug/test.js |3 +--
 3 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 70ac5ff7ba049773b7a965e3b399df0b3c64a34a
Author: Loic Dachary l...@dachary.org
Date:   Wed Oct 19 23:03:18 2011 +0200

Do not use scrollTop to ensure the feedback is visible. Replace the submit 
button with the feedback instead because the submit button has to be visible to 
the user otherwise it would not be able to click it.

diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index ad3f3d5..2acf8c6 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -224,8 +224,6 @@
 var short_desc = $('.state_subcomponent 
.active_subcomponent .chosen').attr('data') + ': ' + $('.state_description 
.short').val();
 var comment = $('.state_description .long').val();
 $(body).css(cursor, progress);
-// 
http://stackoverflow.com/questions/1852518/how-to-get-scrolltop-of-an-iframe
-$('html, body').animate({scrollTop: '0px'}, 300);
 $('input[name=component]', form).val(component);
 $('input[name=version]', form).val(version);
 $('input[name=short_desc]', form).val(short_desc);
@@ -250,7 +248,7 @@
 },
 
 state_success: function() {
-$('.submission').hide();
+$('.state_submit').hide();
 var element = $('.state_success');
 var bug = $('.state_submit .bug').text();
 $('.bug', element).attr('href', $.bug.url + '/show_bug.cgi?id=' + 
bug);
diff --git a/bug/bug/skin.js b/bug/bug/skin.js
index 5de87ab..8a51ea1 100644
--- a/bug/bug/skin.js
+++ b/bug/bug/skin.js
@@ -60,6 +60,7 @@
   } else if(location.search.indexOf('skin=submit') = 0) {
   submit();
   } else if(location.search.indexOf('skin=complete') = 0) {
+  submit();
   $.bug.state_success();
   }
   };
diff --git a/bug/bug/test.js b/bug/bug/test.js
index b470292..83e4af5 100644
--- a/bug/bug/test.js
+++ b/bug/bug/test.js
@@ -297,7 +297,7 @@ test(state_submit, function() {
 });
 
 test(state_success, function() {
-expect(5);
+expect(4);
 
 var bug = '4242';
 var element = $('.state_success');
@@ -306,7 +306,6 @@ test(state_success, function() {
 $('.state_submit .bug').text(bug);
 $.bug.state_success();
 equal(element.css('display'), 'block');
-equal($('.submission').css('display'), 'none');
 ok($('.bug', element).attr('href').indexOf(bug)  0, 'bug found');
 });
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: bug/bug

2011-10-08 Thread Loic Dachary
 bug/bug/bug.js |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 38fe6a669b4fa44eb791aae87cc7776aa4b44e73
Author: Loic Dachary l...@dachary.org
Date:   Sat Oct 8 11:27:35 2011 +0200

http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-March/018981.html
in a nutshell : deal with it, it won't go away

The original plan was to just have the filename. Unfortunately, it turns
out that if you do that, there are certain sites that break, because they
expect the path (and they expect a Windows path, no less). This is why
Opera and IE8 return a fake path -- not because HTML5 says to do it. In
fact I made HTML5 say it because they were doing it.

diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index 955d408..964af78 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -186,7 +186,10 @@
 });
 }
 $(input[type='file'], element).change(function() {
-$(input[name='ignored'], element).val($(this).val());
+// 
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();
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: bug/bug

2011-09-29 Thread Loic Dachary
 bug/bug/bug.js  |6 ++
 bug/bug/test.js |5 -
 2 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 07706f06bf47fde2dce9b853583afa3b577f00a5
Author: Loic Dachary l...@dachary.org
Date:   Thu Sep 29 11:15:38 2011 +0200

Prevent double submission of the form.
  https://freedesktop.dachary.org/show_bug.cgi?id=41269
  https://freedesktop.dachary.org/show_bug.cgi?id=41270
are most likely examples of what happens when the form is submitted twice 
because of a double click.

diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index d391adb..3429bcf 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -179,6 +179,11 @@
 var element = $('.state_submit');
 if(!element.hasClass('initialized')) {
 $('.go', element).click(function() {
+if($(element).hasClass('inprogress')) {
+return;
+} else {
+$(element).addClass('inprogress');
+}
 var version = $('.state_version .chosen').attr('data');
 var component = $('.state_component 
.chosen').attr('data').replace('_',' ');
 var short_desc = $('.state_subcomponent 
.active_subcomponent .chosen').attr('data') + ': ' + $('.state_description 
.short').val();
@@ -199,6 +204,7 @@
 comment: comment,
 status_whiteboard: 'BSA'
 }).pipe(function(data) {
+$(element).removeClass('inprogress');
 $(body).css(cursor, default);
 return $.bug.lookup_result(data,

$.bug.state_submit_error_regexps,
diff --git a/bug/bug/test.js b/bug/bug/test.js
index 55db48c..56f0ddb 100644
--- a/bug/bug/test.js
+++ b/bug/bug/test.js
@@ -200,7 +200,7 @@ test(state_description, function() {
 });
 
 test(state_submit, function() {
-expect(14);
+expect(16);
 
 var state_success = $.bug.state_success;
 $.bug.state_success = function() { ok(true, 'state_success'); };
@@ -226,6 +226,8 @@ test(state_submit, function() {
 $('.state_description .long').val(comment);
 var bug = '40763';
 $.bug.ajax = function(type, url, data) {
+ok(element.hasClass('inprogress'), 'is in progress');
+$('.go', element).click(); // noop
 if(data.component == component_text 
data.version == version 
data.short_desc == subcomponent + ': ' + short_desc 
@@ -235,6 +237,7 @@ test(state_submit, function() {
 };
 $('.go', element).click();
 equal($('.bug', element).text(), bug, 'bug number');
+ok(!element.hasClass('inprogress'), 'is no longer progress');
 
 var error = ' ERROR ';
 equal($('.error').text(), '', 'error is not set');
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: bug/bug

2011-09-22 Thread Loic Dachary
 bug/bug/bug.js  |   22 ++
 bug/bug/test.js |   35 +++
 2 files changed, 33 insertions(+), 24 deletions(-)

New commits:
commit 38a1d38130f3006af9712d58a64f6b7bb7ea46a4
Author: Loic Dachary l...@dachary.org
Date:   Thu Sep 22 12:11:49 2011 +0200

The HTML returned by the submit needs more than one regexp to detect the 
errors. The lookup_result function now accepts a list of error regexps

diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index 684ccde..0940d31 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -40,8 +40,14 @@
 });
 },
 
-lookup_result: function(data, error_regexp, success_regexp) {
-var error = data.match(error_regexp);
+lookup_result: function(data, error_regexps, success_regexp) {
+var error = null;
+for(var i = 0; i  error_regexps.length; i++) {
+error = data.match(error_regexps[i]);
+if(error !== null) {
+break;
+}
+}
 if(error !== null) {
 $.bug.error_set(error[1]);
 throw error;
@@ -70,7 +76,7 @@
 $('.error-container').show();
 },
 
-state_signin_error_regexp: 'class=throw_error([^]*)',
+state_signin_error_regexps: ['class=throw_error([^]*)'],
 state_signin_success_regexp: 'Lognbsp;out/a([^]*)',
 
 state_signin: function() {
@@ -84,7 +90,7 @@
 }).pipe(function(data) {
 $(body).css(cursor, default);
 return $.bug.lookup_result(data,
-   $.bug.state_signin_error_regexp,
+   
$.bug.state_signin_error_regexps,

$.bug.state_signin_success_regexp);
 }).pipe(function(data) {
 $('.username').html(data);
@@ -165,7 +171,7 @@
 }
 },
 
-state_submit_error_regexp: 'font size=\\+2([^]*)',
+state_submit_error_regexps: ['class=throw_error([^]*)', 'font 
size=\\+2([^]*)'],
 state_submit_success_regexp: 'titleBug ([0-9]+)',
 
 state_submit: function() {
@@ -192,7 +198,7 @@
 }).pipe(function(data) {
 $(body).css(cursor, default);
 return $.bug.lookup_result(data,
-   
$.bug.state_submit_error_regexp,
+   
$.bug.state_submit_error_regexps,

$.bug.state_submit_success_regexp);
 }).pipe(function(data) {
 $('.bug', element).text(data);
@@ -206,7 +212,7 @@
 }
 },
 
-state_attach_error_regexp: 'class=throw_error([^]*)',
+state_attach_error_regexps: ['class=throw_error([^]*)'],
 state_attach_success_regexp: 'Attachment #([0-9]+)',
 
 state_attach: function() {
@@ -215,7 +221,7 @@
 $('.bug', element).val(bug);
 $('form', element).iframePostForm({ complete: function(data) {
 var attachment = $.bug.lookup_result(data,
- 
$.bug.state_attach_error_regexp,
+ 
$.bug.state_attach_error_regexps,
  
$.bug.state_attach_success_regexp);
 $('img', element).
 attr('src', '/attachment.cgi?id=' + attachment).
diff --git a/bug/bug/test.js b/bug/bug/test.js
index 86dc7a9..70785f8 100644
--- a/bug/bug/test.js
+++ b/bug/bug/test.js
@@ -54,7 +54,7 @@ test(lookup_result, function() {
 
 // error
 try {
-$.bug.lookup_result('ERR_' + what + '_OR', error_regexp, 
success_regexp);
+$.bug.lookup_result('ERR_' + what + '_OR', [error_regexp], 
success_regexp);
 } catch(e) {
 equal(e[1], what);
 equal($('.error').text(), what);
@@ -65,7 +65,7 @@ test(lookup_result, function() {
 // output is not as expected
 var bugous = 'BUGOUS OUTPUT';
 try {
-$.bug.lookup_result(bugous, error_regexp, success_regexp);
+$.bug.lookup_result(bugous, [error_regexp], success_regexp);
 } catch(ee) {
 equal(ee, bugous);
 ok($('.error').text().indexOf(success_regexp) = 0, 'error displayed');
@@ -74,7 +74,7 @@ test(lookup_result, function() {
 ok(caught, 'caught exception');
 
 // success
-equal($.bug.lookup_result('SUC_' + value + '_ESS', error_regexp, 
success_regexp), value);
+equal($.bug.lookup_result('SUC_' + value + '_ESS', [error_regexp], 
success_regexp), value);
 });
 
 test(state_signin, function() {
@@ -201,7 +201,7 @@ test(state_description, function() {
 });
 
 test(state_submit, function() {
-expect(11);
+expect(14);
 
 var 

[Libreoffice-commits] .: bug/bug

2011-09-22 Thread Loic Dachary
 bug/bug/bug.js |8 
 1 file changed, 8 insertions(+)

New commits:
commit 14ffc3a998cb587a3a19394082c19b21c13ab7f6
Author: Loic Dachary l...@dachary.org
Date:   Thu Sep 22 19:38:06 2011 +0200

ie specific code to disable the text part of the input[type=file]
http://stackoverflow.com/questions/3914142/file-input-behaviour-in-ie
explains it in more words:

I have noticed a difference in behaviour between chrome and IE of handling 
file input clicks.

In Chrome, clicking anywhere on the input (text or button bit) triggers the 
file dialogue.

In IE (testing on 7), you have to click on the actual button, not the text 
bit.

The problem is that I'm using a transparent file input on top of a regular 
text box. Clicking on the text box should open the dialog. In Chrome this is 
working fine, as the total size of the input is the same size as my text box.

In IE it doesn't work properly as the user needs to be clicking on the 
actual button part of the transparent file input.

Any ideas of how to fix this??

diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index c116a3c..f997a47 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -229,6 +229,14 @@
 show();
 
 }});
+if($.browser.ie) {
+// 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() {
 $(input[type='text'], element).val($(this).val());
 });
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: bug/bug

2011-09-22 Thread Loic Dachary
 bug/bug/bug.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ed1c0df6a9cb3132356c7d1d42ef28f34afd7817
Author: Loic Dachary l...@dachary.org
Date:   Thu Sep 22 19:47:58 2011 +0200

browser.msie and not browser.ie

diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index f997a47..7df7db8 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -229,7 +229,7 @@
 show();
 
 }});
-if($.browser.ie) {
+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() {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2011-09-20 Thread Loic Dachary
 bug/bug.xhtml|   16 +---
 bug/bug/bug.css  |   72 +++
 bug/bug/bug.js   |8 +++-
 bug/bug/images/upload-browse.png |binary
 bug/bug/images/upload-hover.png  |binary
 bug/bug/images/upload-input.png  |binary
 bug/bug/images/upload.png|binary
 7 files changed, 84 insertions(+), 12 deletions(-)

New commits:
commit d71220144894a4839f94b7780335c5e553b73e79
Author: Loic Dachary l...@dachary.org
Date:   Tue Sep 20 17:10:39 2011 +0200

integrate file upload

diff --git a/bug/bug.xhtml b/bug/bug.xhtml
index 1135cf1..f12362a 100644
--- a/bug/bug.xhtml
+++ b/bug/bug.xhtml
@@ -145,11 +145,17 @@
 input type=hidden name=description value=SCREENSHOT/input
 input type=hidden name=comment value=SCREENSHOT 
COMMENT/input
 input type=hidden name=contenttypemethod 
value=autodetect/input
- div class=attach-file
-  input type=file name=data/input
- /div
- div class=attach-submit
-  input type=submit value=Upload/input
+ div class=attach-file-and-submit
+   div class=attach-file
+input type=file name=data /
+div class=attach-file-style
+  divinput type=text name=ignored/input/div
+  div class=attach-browseBrowse/div
+/div
+   /div
+   div class=attach-submit
+input type=submit value=Upload/input
+   /div
  /div
  /form
  img title=screenshot /
diff --git a/bug/bug/bug.css b/bug/bug/bug.css
index 8680d87..2b77811 100644
--- a/bug/bug/bug.css
+++ b/bug/bug/bug.css
@@ -414,17 +414,25 @@ body {
 padding: 10px;
 }
 
+.state_attach .attach-file-and-submit {
+text-align: right;
+vertical-align: top;
+width: 79%;
+}
+
+.state_attach .attach-file-style  div {
+display: inline-block;
+}
+
 .state_attach .attach-submit input {
-margin-left: auto;
-margin-right: 40px;
 background: url('images/upload.png') no-repeat;
-width: 163px;
-height: 49px;
+width: 94px;
+height: 38px;
 font-weight: bold;
-font-size: 20px;
+font-size: 14px;
 color: #fff;
 text-align: center;
-line-height: 49px;
+line-height: 38px;
 border: 0;
 }
 
@@ -432,6 +440,58 @@ body {
 background: url('images/upload-hover.png') no-repeat;
 }
 
+.state_attach .attach-file {
+position: relative;
+height: 38px;
+}
+
+.state_attach .attach-file .attach-file-style {
+position: absolute;
+top: 0;
+right: 0;
+z-index: 1;
+}
+
+.state_attach .attach-file .attach-file-style  div {
+vertical-align: top;
+}
+
+.state_attach .attach-file input[type='file'] {
+position: relative;
+text-align: right;
+-moz-opacity:0 ;
+filter:alpha(opacity: 0);
+opacity: 0;
+z-index: 2;
+width: 400px;
+height: 39px;
+}
+
+.state_attach .attach-file input[type='text'] {
+margin-top: 6px;
+width: 242px;
+height: 27px;
+background: url('images/upload-input.png') no-repeat;
+border: 0;
+padding: 0;
+}
+
+.state_attach .attach-browse {
+background: url('images/upload-browse.png') no-repeat;
+width: 94px;
+height: 39px;
+font-weight: bold;
+font-size: 14px;
+color: #057cc0;
+text-align: center;
+line-height: 38px;
+border: 0;
+}
+
+.state_attach img {
+display: none;
+}
+
 /* skin */
 .skin {
 display: none;
diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index db5a6c2..c765dc2 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -207,8 +207,14 @@
 var attachment = $.bug.lookup_result(data,
  
$.bug.state_attach_error_regexp,
  
$.bug.state_attach_success_regexp);
-$('img', element).attr('src', '/attachment.cgi?id=' + 
attachment);
+$('img', element).
+attr('src', '/attachment.cgi?id=' + attachment).
+show();
+
 }});
+$(input[type='file'], element).change(function() {
+$(input[type='text'], element).val($(this).val());
+});
 $.bug.current_step('attach');
 element.show();
 },
diff --git a/bug/bug/images/upload-browse.png b/bug/bug/images/upload-browse.png
new file mode 100644
index 000..ab210f1
Binary files /dev/null and b/bug/bug/images/upload-browse.png differ
diff --git a/bug/bug/images/upload-hover.png b/bug/bug/images/upload-hover.png
index 886c540..489785a 100644
Binary files a/bug/bug/images/upload-hover.png and 
b/bug/bug/images/upload-hover.png differ
diff --git a/bug/bug/images/upload-input.png b/bug/bug/images/upload-input.png
new file mode 100644
index 000..a77e5ed
Binary files /dev/null and 

[Libreoffice-commits] .: bug/bug

2011-09-20 Thread Loic Dachary
 bug/bug/bug.css |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 1d4453433f332c4a0e2f7333c13b0af94ed07ef6
Author: Loic Dachary l...@dachary.org
Date:   Tue Sep 20 18:20:19 2011 +0200

background set to white so that the libreoffice gradient is not visible

diff --git a/bug/bug/bug.css b/bug/bug/bug.css
index 5a87c9a..42eb58c 100644
--- a/bug/bug/bug.css
+++ b/bug/bug/bug.css
@@ -1,5 +1,6 @@
 body {
 margin: 0;
+background-color: #fff;
 height: 1024px;
 font-family: helvetica, arial;
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: bug/bug

2011-09-20 Thread Loic Dachary
 bug/bug/bug.js |4 
 1 file changed, 4 insertions(+)

New commits:
commit c5b2bd2e7c04ef9e3cca527ca1fd747daae261f2
Author: Loic Dachary l...@dachary.org
Date:   Tue Sep 20 18:27:21 2011 +0200

set progress cursor when appropriate

diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index c765dc2..c366b0a 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -76,11 +76,13 @@
 state_signin: function() {
 var element = $('.signin');
 $('.go', element).click(function() {
+$(body).css(cursor, progress);
 $.bug.error_clear();
 $.bug.ajax('POST', '/index.cgi', {
 Bugzilla_login: $('.user', element).val(),
 Bugzilla_password: $('.password', element).val()
 }).pipe(function(data) {
+$(body).css(cursor, default);
 return $.bug.lookup_result(data,
$.bug.state_signin_error_regexp,

$.bug.state_signin_success_regexp);
@@ -168,6 +170,7 @@
 var component = $('.state_component .chosen').attr('data');
 var short_desc = $('.state_subcomponent 
.active_subcomponent .chosen').attr('data') + ': ' + $('.state_description 
.short').val();
 var comment = $('.state_description .long').val();
+$(body).css(cursor, progress);
 $.bug.ajax('POST', '/post_bug.cgi', {
 product: 'LibreOffice',
 bug_status: 'UNCONFIRMED',
@@ -181,6 +184,7 @@
 short_desc: short_desc,
 comment: comment
 }).pipe(function(data) {
+$(body).css(cursor, default);
 return $.bug.lookup_result(data,

$.bug.state_submit_error_regexp,

$.bug.state_submit_success_regexp);
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2011-09-17 Thread Loic Dachary
 bug/bug.xhtml   |7 ---
 bug/bug/bug.css |   14 ++
 bug/bug/bug.js  |3 ---
 3 files changed, 10 insertions(+), 14 deletions(-)

New commits:
commit b29748e63b2872390010ac8e1f78d1cf3b8b
Author: Loic Dachary l...@dachary.org
Date:   Sat Sep 17 13:31:30 2011 +0200

all state share the same error, remove useless comment and factorize the css

diff --git a/bug/bug.xhtml b/bug/bug.xhtml
index 077178b..affe3e1 100644
--- a/bug/bug.xhtml
+++ b/bug/bug.xhtml
@@ -30,6 +30,8 @@
 /div
   /div
   div class=right
+div class=username/div
+
 div class=submission
   Thank you for using LibreOffice, we regret that you seem to have 
found a problem in our software, so that you decided to report a bug. This 
assistant will lead you step by step through the bug report process.
 /div
@@ -42,7 +44,6 @@
User: input class='user' type=text name=user/input
Password: input class='password' type=password 
name=password/input
div class=goSign in/div
-   div class=error/div
  /div
  div
Or a href=/enter_bug.cgi target=_blanksignup/a.
@@ -98,7 +99,6 @@
 
   div class=state state_submit
div class=goSUBMIT/div
-div class=error/div
 div class=bug/div
  /div
 
@@ -128,10 +128,11 @@
 input type=file name=data/input
 input type=submit value=Upload/input
  /form
- div class=error/div
  img title=SCREENSHOT /
/div
 
+   div class=error/div
+
 div class=copyright
   Bug Submission Assistant is copyright (C) 2011 Loic Dachary 
published under a href=http://www.gnu.org/licenses/gpl.txt;GNU GPLv3+/a : 
download the a href=bug.jssources/a.
 /div
diff --git a/bug/bug/bug.css b/bug/bug/bug.css
index 1302565..e33 100644
--- a/bug/bug/bug.css
+++ b/bug/bug/bug.css
@@ -40,6 +40,12 @@ body {
 border: 3px solid #18A303;
 }
 
+/* error */
+
+.error {
+background-color: #ff;
+}
+
 /* signin */
 .signin {
 margin: 5px;
@@ -47,10 +53,6 @@ body {
 display: none;
 }
 
-.signin .error {
-background-color: #ff;
-}
-
 .signin .go {
 background-color: #BADA55;
 }
@@ -97,10 +99,6 @@ body {
 display: none;
 }
 
-.state_submit .error {
-background-color: #ff;
-}
-
 .state_submit .go {
 background-color: #BADA55;
 }
diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index 2aeec07..5525e37 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -38,9 +38,6 @@
 }
 },
 
-// if this string is found in the page returned when 
-// trying to login, it means the login / password combination
-// is invalid.
 state_signin_error_regexp: 'class=throw_error([^]*)',
 state_signin_success_regexp: 'Lognbsp;out/a([^]*)',
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits