http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89877
Revision: 89877 Author: wikinaut Date: 2011-06-11 10:51:40 +0000 (Sat, 11 Jun 2011) Log Message: ----------- 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 trunk/extensions/LiquidThreads/lqt.css trunk/extensions/LiquidThreads/lqt.js Modified: trunk/extensions/LiquidThreads/i18n/Lqt.i18n.php =================================================================== --- trunk/extensions/LiquidThreads/i18n/Lqt.i18n.php 2011-06-11 10:37:39 UTC (rev 89876) +++ trunk/extensions/LiquidThreads/i18n/Lqt.i18n.php 2011-06-11 10:51:40 UTC (rev 89877) @@ -259,7 +259,7 @@ 'change the subject of this thread: $1', 'lqt-ajax-invalid-subject' => 'The subject you specified was invalid, probably ' . 'because it was too long.', - 'lqt-ajax-no-subject' => 'You must specify a subject.', + 'lqt-ajax-no-subject' => 'You must specify a subject for the new thread.', 'lqt-save-subject-error-unknown' => 'An unknown error occurred when attempting ' . 'to set the subject of this thread. Please try to do this by clicking "edit" on the top post.', 'lqt-cancel-subject-edit' => 'Cancel', @@ -273,7 +273,7 @@ 'lqt-drag-save' => 'Confirm', 'lqt-drag-title' => 'Confirm drag', 'lqt-drag-reason' => 'Reason:', - 'lqt-drag-subject' => 'Subject for new thread:', + 'lqt-drag-subject' => 'Subject for new thread (mandatory):', 'lqt-edit-signature' => '(edit signature)', 'lqt-preview-signature' => '(preview)', Modified: trunk/extensions/LiquidThreads/lqt.css =================================================================== --- trunk/extensions/LiquidThreads/lqt.css 2011-06-11 10:37:39 UTC (rev 89876) +++ trunk/extensions/LiquidThreads/lqt.css 2011-06-11 10:51:40 UTC (rev 89877) @@ -467,7 +467,8 @@ border: 1px solid #3333ff !important; background: yellow; text-align: center; - color: #999999; + color: #444444; + font-weight: bold !important; } .lqt-drop-zone.lqt-drop-zone-active { @@ -479,7 +480,6 @@ border: 1px solid #3333ff !important; color: #3333ff !important; background: #00ff7f; - font-weight: bold !important; } .lqt-new-messages { Modified: trunk/extensions/LiquidThreads/lqt.js =================================================================== --- trunk/extensions/LiquidThreads/lqt.js 2011-06-11 10:37:39 UTC (rev 89876) +++ trunk/extensions/LiquidThreads/lqt.js 2011-06-11 10:51:40 UTC (rev 89877) @@ -1516,9 +1516,18 @@ apiRequest.sortkey = newSortkey; } - liquidThreads.apiRequest( apiRequest, doneCallback ); + if ( params.subject.length == "" ) { + $j( '.mw-ajax-loader' ).remove(); // remove spinner + alert( mediaWiki.msg( 'lqt-ajax-no-subject' ) ); + // here we should prompt the user again to enter a new subject + } else { + + liquidThreads.apiRequest( apiRequest, doneCallback ); + } + + } else if (newSortkey != 'none' ) { var apiRequest = { _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs