r109099 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109098‎ | r109099 | r109100 >
Date:01:34, 17 January 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
ui work on instrucor adittion dialog
Modified paths:
  • /trunk/extensions/EducationProgram/EducationProgram.i18n.php (modified) (history)
  • /trunk/extensions/EducationProgram/EducationProgram.php (modified) (history)
  • /trunk/extensions/EducationProgram/resources/ep.instructor.js (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php
@@ -399,7 +399,8 @@
400400 'ep-instructor-add-text' => 'You are adding an instructor for course $1. Enter the username of the instructor and a brief description why this person is being added.',
401401 'ep-instructor-add-self-text' => 'You are adding yourself as {{GENDER:$1|instructor}} for course $1. Please add a brief description why you are doing so.',
402402 'ep-instructor-add-cancel-button' => 'Cancel',
403 -
 403+ 'ep-instructor-summary-input' => 'Summary',
 404+ 'ep-instructor-name-input' => 'User name',
404405
405406 // EPInstrucor
406407 'ep-instructor-remove' => 'remove from course',
Index: trunk/extensions/EducationProgram/EducationProgram.php
@@ -375,6 +375,8 @@
376376 'ep-instructor-add-self-text',
377377 'ep-instructor-add-self-title',
378378 'ep-instructor-add-cancel-button',
 379+ 'ep-instructor-summary-input',
 380+ 'ep-instructor-name-input',
379381 ),
380382 );
381383
Index: trunk/extensions/EducationProgram/resources/ep.instructor.js
@@ -96,14 +96,16 @@
9797
9898 this.nameInput = $( '<input>' ).attr( {
9999 'type': 'text',
100 - 'size': 60,
101 - 'maxlength': 250
 100+ 'size': 30,
 101+ 'maxlength': 250,
 102+ 'id': 'ep-instructor-nameinput'
102103 } );
103104
104105 this.summaryInput = $( '<input>' ).attr( {
105106 'type': 'text',
106107 'size': 60,
107 - 'maxlength': 250
 108+ 'maxlength': 250,
 109+ 'id': 'ep-instructor-summaryinput'
108110 } );
109111
110112 this.doAdd = function() {
@@ -159,12 +161,26 @@
160162 ) ) );
161163
162164 if ( !this.selfMode ) {
163 - this.$dialog.append( this.nameInput );
 165+ this.$dialog.append(
 166+ $( '<label>' ).attr( {
 167+ 'for': 'ep-instructor-nameinput'
 168+ } ).text( ep.msg( 'ep-instructor-name-input' ) + ' ' ),
 169+ this.nameInput,
 170+ '<br />',
 171+ $( '<label>' ).attr( {
 172+ 'for': 'ep-instructor-summaryinput'
 173+ } ).text( ep.msg( 'ep-instructor-summary-input' ) )
 174+ );
164175 }
165176
166177 this.$dialog.append( this.summaryInput );
167178
168 - this.nameInput.focus();
 179+ if ( this.selfMode ) {
 180+ this.summaryInput.focus();
 181+ }
 182+ else {
 183+ this.nameInput.focus();
 184+ }
169185
170186 var enterHandler = function( event ) {
171187 if ( event.which == '13' ) {

Status & tagging log