mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-02-01 18:25:05 -05:00
wiki: Include page in request automatically.
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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}'" />
|
||||
|
||||
Reference in New Issue
Block a user