# HG changeset patch # User Dan # Date 1208821051 14400 # Node ID 1beddd693f2dbca485891c5ab3ac94f9dff75fe4 # Parent a43f9d646dc7621a174b1ba7000f69d19b640e19 Replaced some confirmation boxes with miniPromptMessage versions. This commit will require a re-langimport and shift-reload. diff -r a43f9d646dc7 -r 1beddd693f2d includes/clientside/static/ajax.js --- a/includes/clientside/static/ajax.js Mon Apr 14 22:02:32 2008 -0400 +++ b/includes/clientside/static/ajax.js Mon Apr 21 19:37:31 2008 -0400 @@ -417,15 +417,37 @@ // IE <6 pseudo-compatibility if ( KILL_SWITCH ) return true; - c = confirm($lang.get('ajax_delvote_confirm')); - if(!c) return; - setAjaxLoading(); - ajaxGet(stdAjaxPrefix+'&_mode=delvote', function() { - if ( ajax.readyState == 4 && ajax.status == 200 ) { - unsetAjaxLoading(); - alert(ajax.responseText); - } - }, true); + miniPromptMessage({ + title: $lang.get('ajax_delvote_confirm_title'), + message: $lang.get('ajax_delvote_confirm_body'), + buttons: [ + { + text: $lang.get('ajax_delvote_btn_submit'), + color: 'red', + style: { + fontWeight: 'bold' + }, + onclick: function(e) + { + miniPromptDestroy(this); + setAjaxLoading(); + ajaxGet(stdAjaxPrefix+'&_mode=delvote', function() { + if ( ajax.readyState == 4 && ajax.status == 200 ) { + unsetAjaxLoading(); + alert(ajax.responseText); + } + }, true); + } + }, + { + text: $lang.get('etc_cancel'), + onclick: function(e) + { + miniPromptDestroy(this); + } + } + ] + }); } function ajaxResetDelVotes() @@ -433,21 +455,43 @@ // IE <6 pseudo-compatibility if ( KILL_SWITCH ) return true; - c = confirm($lang.get('ajax_delvote_reset_confirm')); - if(!c) return; - setAjaxLoading(); - ajaxGet(stdAjaxPrefix+'&_mode=resetdelvotes', function() { - if ( ajax.readyState == 4 && ajax.status == 200 ) { - unsetAjaxLoading(); - alert(ajax.responseText); - item = document.getElementById('mdgDeleteVoteNoticeBox'); - if(item) - { - opacity('mdgDeleteVoteNoticeBox', 100, 0, 1000); - setTimeout("document.getElementById('mdgDeleteVoteNoticeBox').style.display = 'none';", 1000); - } - } - }, true); + miniPromptMessage({ + title: $lang.get('ajax_delvote_reset_confirm_title'), + message: $lang.get('ajax_delvote_reset_confirm_body'), + buttons: [ + { + text: $lang.get('ajax_delvote_reset_btn_submit'), + color: 'red', + style: { + fontWeight: 'bold', + }, + onclick: function(e) + { + miniPromptDestroy(this); + setAjaxLoading(); + ajaxGet(stdAjaxPrefix+'&_mode=resetdelvotes', function() { + if ( ajax.readyState == 4 && ajax.status == 200 ) { + unsetAjaxLoading(); + alert(ajax.responseText); + item = document.getElementById('mdgDeleteVoteNoticeBox'); + if(item) + { + opacity('mdgDeleteVoteNoticeBox', 100, 0, 1000); + setTimeout("document.getElementById('mdgDeleteVoteNoticeBox').style.display = 'none';", 1000); + } + } + }, true); + } + }, + { + text: $lang.get('etc_cancel'), + onclick: function(e) + { + miniPromptDestroy(this); + } + } + ] + }); } function ajaxSetWikiMode(val) { @@ -502,8 +546,7 @@ query=''; for(i=0;i 0 ) + return false; if(document.getElementById('specialLayer_darkener')) { if(nofade) diff -r a43f9d646dc7 -r 1beddd693f2d language/english/core.json --- a/language/english/core.json Mon Apr 14 22:02:32 2008 -0400 +++ b/language/english/core.json Mon Apr 21 19:37:31 2008 -0400 @@ -435,10 +435,15 @@ rename_notice: 'This won\'t change the URL to this page. To change the URL to this page, use Page Manager in the administration panel.', delete_prompt_reason: 'Please enter your reason for deleting this page.', delete_confirm: 'You are about to REVERSIBLY delete this page. Do you REALLY want to do this?\n\n(Comments and categorization data, as well as any attached files, will be permanently lost)', - delvote_confirm: 'Are you sure that you want to vote that this page be deleted?', - delvote_reset_confirm: 'This action will reset the number of votes against this page to zero. Do you really want to do this?', - clearlogs_confirm: 'You are about to DESTROY all log entries for this page. As opposed to (example) deleting this page, this action is completely IRREVERSIBLE and should not be used except in dire circumstances. Do you REALLY want to do this?', - clearlogs_confirm_nag: 'You\'re ABSOLUTELY sure???', + delvote_confirm_title: 'Vote to delete this page?', + delvote_confirm_body: 'Administrators and moderators will see a notice on this page showing who voted.', + delvote_btn_submit: 'Vote', + delvote_reset_confirm_title: 'Reset votes for deletion?', + delvote_reset_confirm_body: 'This will reset the number of votes against this page to zero.', + delvote_reset_btn_submit: 'Reset', + clearlogs_confirm_title: 'Clear this page\'s logs?', + clearlogs_confirm_body: 'This will erase this page\'s entire history and is an irreversible operation.', + clearlogs_btn_submit: 'Clear Logs', changestyle_select: '[Select]', changestyle_title: 'Change your theme', changestyle_pleaseselect_theme: 'Please select a theme from the list.',