r96784 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96783‎ | r96784 | r96785 >
Date:15:21, 11 September 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Follow up to r96779;
Modified paths:
  • /trunk/extensions/Survey/Survey.i18n.php (modified) (history)
  • /trunk/extensions/Survey/resources/ext.survey.special.survey.js (modified) (history)
  • /trunk/extensions/Survey/specials/SpecialSurvey.php (modified) (history)
  • /trunk/extensions/Survey/specials/SpecialSurveys.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Survey/Survey.i18n.php
@@ -54,7 +54,7 @@
5555 'surveys-special-newname' => 'New survey name:',
5656 'surveys-special-add' => 'Add survey',
5757 'surveys-special-existing' => 'Existing surveys',
58 - 'surveys-special-name' => 'Name',
 58+ 'surveys-special-title' => 'Title',
5959 'surveys-special-status' => 'Status',
6060 'surveys-special-stats' => 'Statistics',
6161 'surveys-special-edit' => 'Edit',
Index: trunk/extensions/Survey/specials/SpecialSurvey.php
@@ -178,11 +178,16 @@
179179 );
180180
181181 $fields[] = array(
 182+ 'type' => 'hidden',
 183+ 'default' => $survey->getField( 'name' ),
 184+ 'name' => 'survey-name',
 185+ 'id' => 'survey-name',
 186+ );
 187+
 188+ $fields[] = array(
182189 'class' => 'SurveyNameField',
183190 'default' => $survey->getField( 'name' ),
184191 'label-message' => 'survey-special-label-name',
185 - 'id' => 'survey-name',
186 - 'name' => 'survey-name',
187192 'style' => 'font-weight: bold;'
188193 );
189194
@@ -303,8 +308,6 @@
304309 return Html::element(
305310 'span',
306311 array(
307 - 'id' => $this->mParams['id'],
308 - 'name' => $this->mParams['name'],
309312 'style' => $this->mParams['style']
310313 ),
311314 $value
Index: trunk/extensions/Survey/specials/SpecialSurveys.php
@@ -51,7 +51,7 @@
5252 protected function displaySurveys() {
5353 $this->displayAddNewControl();
5454
55 - $surveys = Survey::select( array( 'id', 'name', 'enabled' ) );
 55+ $surveys = Survey::select( array( 'id', 'name', 'enabled', 'title' ) );
5656
5757 if ( count( $surveys ) > 0 ) {
5858 $this->displaySurveysTable( $surveys );
@@ -117,7 +117,7 @@
118118
119119 $out->addHTML(
120120 '<thead><tr>' .
121 - Html::element( 'th', array(), wfMsg( 'surveys-special-name' ) ) .
 121+ Html::element( 'th', array(), wfMsg( 'surveys-special-title' ) ) .
122122 Html::element( 'th', array(), wfMsg( 'surveys-special-status' ) ) .
123123 Html::element( 'th', array( 'class' => 'unsortable' ), wfMsg( 'surveys-special-stats' ) ) .
124124 Html::element( 'th', array( 'class' => 'unsortable' ), wfMsg( 'surveys-special-edit' ) ) .
@@ -130,13 +130,13 @@
131131 foreach ( $surveys as $survey ) {
132132 $out->addHTML(
133133 '<tr>' .
134 - '<td>' .
 134+ '<td data-sort-value="' . htmlspecialchars( $survey->getField( 'title' ) ) . '">' .
135135 Html::element(
136136 'a',
137137 array(
138138 'href' => SpecialPage::getTitleFor( 'TakeSurvey', $survey->getField( 'name' ) )->getLocalURL()
139139 ),
140 - $survey->getField( 'name' )
 140+ $survey->getField( 'title' )
141141 ) .
142142 '</td>' .
143143 Html::element( 'td', array(), wfMsg( 'surveys-special-' . ( $survey->getField( 'enabled' ) ? 'enabled' : 'disabled' ) ) ) .
Index: trunk/extensions/Survey/resources/ext.survey.special.survey.js
@@ -202,7 +202,7 @@
203203 };
204204
205205 function setup() {
206 - $table = $( '#survey-name' ).closest( 'tbody' );
 206+ $table = $( '#survey-title' ).closest( 'tbody' );
207207
208208 $table.append( '<tr><td colspan="2"><hr /></td></tr>' );
209209

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r96779work on survey admin uijeroendedauw14:36, 11 September 2011

Status & tagging log