[bugzilla-gnome-org-extensions] 4.4 migration: Fix javascript ajax calls
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bugzilla-gnome-org-extensions] 4.4 migration: Fix javascript ajax calls
- Date: Thu, 20 Nov 2014 22:27:04 +0000 (UTC)
commit c57b4ab12075bb34be079869bef0bafcb2099fbb
Author: Krzesimir Nowak <qdlacz gmail com>
Date: Tue Nov 18 13:08:36 2014 +0100
4.4 migration: Fix javascript ajax calls
I have bugzilla under 'localhost/bugzilla' and ajax calls were trying
to perform queries on 'localhost/attachment.cgi' for example, instead
of 'localhost/bugzilla/attachment.cgi'.
template/en/default/pages/splinter.html.tmpl | 4 ++--
web/splinter.js | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/template/en/default/pages/splinter.html.tmpl b/template/en/default/pages/splinter.html.tmpl
index 3699da6..4fe217f 100644
--- a/template/en/default/pages/splinter.html.tmpl
+++ b/template/en/default/pages/splinter.html.tmpl
@@ -35,11 +35,11 @@
];
configBase = '[% Param('splinter_base') FILTER js %]';
- $(function() { init(); });
- configBugzillaUrl = '/';
+ configBugzillaUrl = '[% Param('urlbase') FILTER js %]';
configHaveExtension = true;
configHelp = 'page.cgi?id=splinter/help.html';
configNote = '';
+ $(function() { init(); });
</script>
<!--[if lt IE 7]>
diff --git a/web/splinter.js b/web/splinter.js
index 3923e0c..a2418fa 100644
--- a/web/splinter.js
+++ b/web/splinter.js
@@ -1562,7 +1562,7 @@ function updateAttachmentStatus(attachment, newStatus, success, failure) {
}
},
type: 'POST',
- url: "/attachment.cgi"
+ url: configBugzillaUrl + 'attachment.cgi'
});
}
@@ -1589,7 +1589,7 @@ function addComment(bug, comment, success, failure) {
}
},
type: 'POST',
- url: "/process_bug.cgi"
+ url: configBugzillaUrl + 'process_bug.cgi'
});
}
@@ -1618,7 +1618,7 @@ function publishReview() {
params['attachment_status'] = newStatus;
XmlRpc.call({
- url: '/xmlrpc.cgi',
+ url: configBugzillaUrl + 'xmlrpc.cgi',
name: 'Splinter.publish_review',
params: params,
error: function(message) {
@@ -2647,7 +2647,7 @@ function init() {
$.ajax({
type: 'GET',
dataType: 'xml',
- url: '/show_bug.cgi',
+ url: configBugzillaUrl + 'show_bug.cgi',
data: {
id: bugId,
ctype: 'xml',
@@ -2673,7 +2673,7 @@ function init() {
$.ajax({
type: 'GET',
dataType: 'text',
- url: '/attachment.cgi',
+ url: configBugzillaUrl + 'attachment.cgi',
data: {
id: attachmentId
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]