r110850 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110849‎ | r110850 | r110851 >
Date:15:08, 7 February 2012
Author:jeroendedauw
Status:deferred
Tags:educationprogram, nodeploy 
Comment:
added summary input to deletion dialog
Modified paths:
  • /trunk/extensions/EducationProgram/EducationProgram.i18n.php (modified) (history)
  • /trunk/extensions/EducationProgram/EducationProgram.php (modified) (history)
  • /trunk/extensions/EducationProgram/resources/ep.pager.js (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/EducationProgram.php
@@ -324,6 +324,7 @@
325325 'ep-pager-confirm-message-course',
326326 'ep-pager-confirm-message-course-many',
327327 'ep-pager-retry-button-course',
 328+ 'ep-pager-summary-message-course',
328329 ),
329330 'dependencies' => array(
330331 'ep.pager',
@@ -338,6 +339,7 @@
339340 'ep-pager-confirm-message-org',
340341 'ep-pager-confirm-message-org-many',
341342 'ep-pager-retry-button-org',
 343+ 'ep-pager-summary-message-org',
342344 ),
343345 'dependencies' => array(
344346 'ep.pager',
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php
@@ -211,6 +211,7 @@
212212 'ep-pager-delete-button-org' => 'Remove {{PLURAL:$1|institution|institutions}}',
213213 'ep-pager-confirm-delete-org' => '{{PLURAL:$1|Confirm institution removal|Confirm removal of multiple institutions}}',
214214 'ep-pager-retry-button-org' => 'Retry',
 215+ 'ep-pager-summary-message-org' => 'Summary:',
215216 // Yeah we need two of these - having a jQuery node in PLURAL breaks, at least at r110788.
216217 'ep-pager-confirm-message-org' => 'You are about to remove institution $1. This will remove all associated courses and their student data!',
217218 'ep-pager-confirm-message-org-many' => 'You are about to remove these institutions: $1. This will remove all associated courses and their student data!',
@@ -233,6 +234,7 @@
234235 'ep-pager-delete-button-course' => 'Remove {{PLURAL:$1|course|courses}}',
235236 'ep-pager-confirm-delete-course' => '{{PLURAL:$1|Confirm course removal|Confirm removal of multiple courses}}',
236237 'ep-pager-retry-button-course' => 'Retry',
 238+ 'ep-pager-summary-message-course' => 'Summary:',
237239 // Yeah we need two of these - having a jQuery node in PLURAL breaks, at least at r110788.
238240 'ep-pager-confirm-message-course' => 'You are about to remove course $1. This will remove all associated student data!',
239241 'ep-pager-confirm-message-course-many' => 'You are about to remove these courses: $1. This will remove all associated student data!',
Index: trunk/extensions/EducationProgram/resources/ep.pager.js
@@ -67,6 +67,28 @@
6868 args.names.length
6969 );
7070
 71+ var summaryLabel = $( '<label>' ).attr( {
 72+ 'for': 'epsummaryinput'
 73+ } ).msg( 'ep-pager-summary-message-' + args.type ).append( '&#160;' );
 74+
 75+ var summaryInput = $( '<input>' ).attr( {
 76+ 'type': 'text',
 77+ 'size': 60,
 78+ 'maxlength': 250,
 79+ 'id': 'epsummaryinput'
 80+ } );
 81+
 82+ $dialog.append( '<br /><br />', summaryLabel, summaryInput );
 83+
 84+ summaryInput.keypress( function( event ) {
 85+ if ( event.which == '13' ) {
 86+ event.preventDefault();
 87+ onConfirm();
 88+ }
 89+ } );
 90+
 91+ summaryInput.focus();
 92+
7193 return deferred.promise();
7294 };
7395
@@ -161,8 +183,8 @@
162184 alert( window.gM( 'ep-pager-delete-selected-fail', ids.length ) );
163185 } );
164186 } );
165 - } );
166 -
 187+ }
 188+ );
167189 } );
168190
169191 })( window.jQuery, window.mediaWiki );
\ No newline at end of file

Status & tagging log