Content deleted Content added
create nom page only after editing talk page, so that template behaves correctly |
community reassessment and individual reassessment unified to a single process |
||
Line 33:
mw.util.addCSS('.quickform * { font-size: 12px; }');
var field = form.append({
Line 94 ⟶ 72:
var form = e.target;
gar.params = {
notify: form.notify.checked,
reason: form.reason.value
};
Morebits.simpleWindow.setButtonsEnabled(false);
Line 123 ⟶ 98:
new Morebits.status('Notifications', ['The script has notified the the reviewer and page creator. ' +
'Please consider manually notifying other involved editors and WikiProjects using ',
Morebits.htmlNode('code', '{{subst:GARMessage|' + gar.title + '|
});
Line 138 ⟶ 113:
list: 'allpages',
};
query.apprefix = 'Good article reassessment/' + gar.title + '/';▼
▲ query.apnamespace = '1', // Talk
var api = new Morebits.wiki.api('Getting numbering', query);
api.post().then(function(apiobj) {
Line 156 ⟶ 126:
createNomPage: function() {
var def = $.Deferred();
var appendtext = '{{subst:GAR/header}}\n' + gar.params.reason;
'==GA Reassessment==\n' +▼
var pageobj = new Morebits.wiki.page(gar.garpage, 'Creating nomination page');
pageobj.setAppendText(appendtext);
Line 178 ⟶ 138:
editTalkPage: function() {
var def = $.Deferred();
var talkpage = new Morebits.wiki.page(gar.talktitle, 'Editing talk page');
talkpage.load(function(talkpage) {
Line 189 ⟶ 145:
text = '{{subst:GAR}}\n' + text;
// append transclusion:
▲ '{{' + gar.garpage + '}}';
talkpage.setPageText(text);
talkpage.setEditSummary('Nominating for good article reassessment' + gar.advert);
Line 266 ⟶ 218:
notify: function() {
var def = $.Deferred();
var users = Morebits.array.uniq(gar.usersToNotify).filter(
return user !== mw.config.get('wgUserName');
});
var appendtext = '\n\n' +
▲ '{{subst:GARMessage|' + gar.title + '|GARpage=' + gar.num + '}} ~~~~' :
var editsummary = '[[' + gar.title + ']] listed for good article reassessment' + gar.advert;
var notificationsDone = 0;
|