summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bug/bug/bug.js15
-rw-r--r--bug/bug/test.js8
2 files changed, 3 insertions, 20 deletions
diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index 9a1ab1e..c6f5966 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -233,21 +233,10 @@
state_submit_element: 'html',
state_submit: function() {
- $.bug.logged_in().done(function(status) {
- if(status) {
- $.bug.submit_bug();
- } else {
- $.bug.error_set("You're not logged in. Please login first");
- $.bug.state_signin();
- }
- });
- },
-
- submit_bug: function() {
var element = $('.state_submit');
if(!element.hasClass('initialized')) {
- $.bug.ajax('GET', $.bug.url + '/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED').pipe(function(data){
- $.bug.token = data.match(/<input type="hidden" name="token" value="([A-Za-z0-9]{10})">/)[1];
+ $.bug.ajax('GET', $.bug.url + '/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED').pipe(function(data){
+ $.bug.token = data.match(/<input type="hidden" name="token" value="([A-Za-z0-9]{10})">/)[1];
});
var form = $('.submission_form form');
diff --git a/bug/bug/test.js b/bug/bug/test.js
index 1a36df2..f6a3e24 100644
--- a/bug/bug/test.js
+++ b/bug/bug/test.js
@@ -241,12 +241,6 @@ test("state_submit", function() {
equal(element.css('display'), 'none');
ok(!element.hasClass('initialized'), 'is not initialized');
$.bug.state_submit();
-
- /*$.bug.ajax = function(type, url) {
- return $.Deferred().resolve('logged in ok');
- };
-
- $.bug.state_submit();
equal(element.css('display'), 'block');
ok(element.hasClass('initialized'), 'is initialized');
$.bug.state_component();
@@ -308,7 +302,7 @@ test("state_submit", function() {
equal($('.error').text(), error, 'error is set');
$.bug.state_success = state_success;
- $.bug.ajax = $.ajax;*/
+ $.bug.ajax = $.ajax;
});
test("state_success", function() {