wiki: Include page in request automatically.

This commit is contained in:
Andre D
2012-10-01 06:52:27 -05:00
committed by Neil Williams
parent 9e8c66fab8
commit 9b98e05392
2 changed files with 3 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ r.wiki = {
request: function(req) {
if (reddit.logged)
req.data.uh = r.config.modhash
req.data.page = r.config.wiki_page
$.ajax(req)
},
@@ -36,8 +37,7 @@ r.wiki = {
type: 'POST',
dataType: 'json',
data: {
revision: $this.data('revision'),
page: r.config.wiki_page
revision: $this.data('revision')
},
error: function() {
$this_parent.toggleClass('hidden')
@@ -61,8 +61,7 @@ r.wiki = {
url: url,
type: 'POST',
data: {
username: $this.find('[name="username"]').val(),
page: r.config.wiki_page
username: $this.find('[name="username"]').val()
},
dataType: 'json',
error: function() {

View File

@@ -45,7 +45,6 @@
<label for="reason">${_("reason for revision")}</label><br/>
<input type="text" name="reason" id="wiki_revision_reason" />
%endif
<input type="hidden" id="page" name="page" value="${thing.page}" />
<input type="hidden" id="previous" name="previous" value="${thing.previous}" />
<br/><br/><input type="submit" value="${_('save page')}" />
<input type="button" value="${_('cancel edit')}" onclick="location.href='${thing.base_url}/${c.wiki_page}'" />