r89877 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89876‎ | r89877 | r89878 >
Date:10:51, 11 June 2011
Author:wikinaut
Status:ok (Comments)
Tags:
Comment:
fix for bug29320 "drag to new location": when moving a reply (down under a thread) to become a new thread and leaving new subject (required) open: ApiThreadAction crashes with "Error: no-valid-subject: undefined"
Modified paths:
  • /trunk/extensions/LiquidThreads/i18n/Lqt.i18n.php (modified) (history)
  • /trunk/extensions/LiquidThreads/lqt.css (modified) (history)
  • /trunk/extensions/LiquidThreads/lqt.js (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/i18n/Lqt.i18n.php
@@ -259,7 +259,7 @@
260260 'change the subject of this thread: $1',
261261 'lqt-ajax-invalid-subject' => 'The subject you specified was invalid, probably ' .
262262 'because it was too long.',
263 - 'lqt-ajax-no-subject' => 'You must specify a subject.',
 263+ 'lqt-ajax-no-subject' => 'You must specify a subject for the new thread.',
264264 'lqt-save-subject-error-unknown' => 'An unknown error occurred when attempting ' .
265265 'to set the subject of this thread. Please try to do this by clicking "edit" on the top post.',
266266 'lqt-cancel-subject-edit' => 'Cancel',
@@ -273,7 +273,7 @@
274274 'lqt-drag-save' => 'Confirm',
275275 'lqt-drag-title' => 'Confirm drag',
276276 'lqt-drag-reason' => 'Reason:',
277 - 'lqt-drag-subject' => 'Subject for new thread:',
 277+ 'lqt-drag-subject' => 'Subject for new thread (mandatory):',
278278 'lqt-edit-signature' => '(edit signature)',
279279 'lqt-preview-signature' => '(preview)',
280280
Index: trunk/extensions/LiquidThreads/lqt.css
@@ -467,7 +467,8 @@
468468 border: 1px solid #3333ff !important;
469469 background: yellow;
470470 text-align: center;
471 - color: #999999;
 471+ color: #444444;
 472+ font-weight: bold !important;
472473 }
473474
474475 .lqt-drop-zone.lqt-drop-zone-active {
@@ -479,7 +480,6 @@
480481 border: 1px solid #3333ff !important;
481482 color: #3333ff !important;
482483 background: #00ff7f;
483 - font-weight: bold !important;
484484 }
485485
486486 .lqt-new-messages {
Index: trunk/extensions/LiquidThreads/lqt.js
@@ -1516,9 +1516,18 @@
15171517 apiRequest.sortkey = newSortkey;
15181518 }
15191519
1520 - liquidThreads.apiRequest( apiRequest, doneCallback );
 1520+ if ( params.subject.length == "" ) {
15211521
 1522+ $j( '.mw-ajax-loader' ).remove(); // remove spinner
 1523+ alert( mediaWiki.msg( 'lqt-ajax-no-subject' ) );
 1524+ // here we should prompt the user again to enter a new subject
15221525
 1526+ } else {
 1527+
 1528+ liquidThreads.apiRequest( apiRequest, doneCallback );
 1529+ }
 1530+
 1531+
15231532 } else if (newSortkey != 'none' ) {
15241533 var apiRequest =
15251534 {

Follow-up revisions

RevisionCommit summaryAuthorDate
r89880fixed my mistake comparing string lengthwikinaut13:43, 11 June 2011

Comments

#Comment by Wikinaut (talk | contribs)   13:45, 11 June 2011

see r89880

#Comment by He7d3r (talk | contribs)   23:33, 5 August 2012

Status & tagging log