r96226 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96225‎ | r96226 | r96227 >
Date:14:14, 4 September 2011
Author:werdna
Status:deferred
Tags:
Comment:
Remove some old code
Modified paths:
  • /branches/lqt-updates/extensions/LiquidThreads/lqt.js (modified) (history)

Diff [purge]

Index: branches/lqt-updates/extensions/LiquidThreads/lqt.js
@@ -905,96 +905,6 @@
906906 callback(token);
907907 }, 'json' );
908908 },
909 -
910 - // Old AJAX save code
911 -// var replyCallback = function( data ) {
912 -// $parent = $j( '#lqt-post-tree-wrapper_id_' + data.threadaction.thread['parent-id'] );
913 -// $html = $j( data.threadaction.thread['html'] );
914 -// $newThread = $html.find( '#lqt-post-tree-wrapper_id_' + data.threadaction.thread['thread-id'] );
915 -// $parent.find( '.lqt-replies:first' ).append( $newThread );
916 -// $parent.closest( '.lqt-thread-topmost' )
917 -// .find( 'input.lqt-thread-modified' )
918 -// .val( data.threadaction.thread['modified'] );
919 -// liquidThreads.setupThread( $newThread.find( '.lqt-post-wrapper' ) );
920 -// $j( 'html,body' ).animate({scrollTop: $newThread.offset().top}, 'slow');
921 -// };
922 -//
923 -// var newCallback = function( data ) {
924 -// var $newThread = $j( data.threadaction.thread['html'] );
925 -// $j( '.lqt-threads' ).prepend( $newThread );
926 -// // remove the no threads message if it's on the page
927 -// $j('.lqt-no-threads').remove();
928 -// liquidThreads.setupThread( $newThread.find( '.lqt-post-wrapper' ) );
929 -// $j( 'html,body' ).animate( { scrollTop: $newThread.offset().top }, 'slow' );
930 -// };
931 -//
932 -// var editCallback = function( data ) {
933 -// var thread = editform.closest('.lqt-thread-topmost');
934 -//
935 -// liquidThreads.doReloadThread( thread );
936 -// }
937 -//
938 -// var doneCallback = function(data) {
939 -// try {
940 -// var result = data.threadaction.thread.result;
941 -// } catch ( err ) {
942 -// result = 'error';
943 -// }
944 -//
945 -// if ( result != 'Success' ) {
946 -// // Create a hidden field to mimic the save button, and
947 -// // submit it normally, so they'll get a real error message.
948 -//
949 -// var saveHidden = $j('<input/>');
950 -// saveHidden.attr( 'type', 'hidden' );
951 -// saveHidden.attr( 'name', 'wpSave' );
952 -// saveHidden.attr( 'value', 'Save' );
953 -//
954 -// var form = editform.find('#editform');
955 -// form.append(saveHidden);
956 -// form.submit();
957 -// return;
958 -// }
959 -//
960 -// var callback;
961 -//
962 -// if ( type == 'reply' ) {
963 -// callback = replyCallback;
964 -// }
965 -//
966 -// if ( type == 'talkpage_new_thread' ) {
967 -// callback = newCallback;
968 -// }
969 -//
970 -// if ( type == 'edit' ) {
971 -// callback = editCallback;
972 -// }
973 -//
974 -// editform.empty().hide();
975 -//
976 -// callback(data);
977 -//
978 -// // Load the new TOC
979 -// liquidThreads.reloadTOC();
980 -// };
981 -//
982 -// if ( type == 'reply' ) {
983 -// liquidThreads.doReply( replyThread, text, summary,
984 -// doneCallback, bump, signature );
985 -//
986 -// e.preventDefault();
987 -// } else if ( type == 'new' ) {
988 -// var container = editform.closest('.lqt-new-thread');
989 -// var page = container.data('lqt-talkpage');
990 -// liquidThreads.doNewThread( page, subject, text, summary,
991 -// doneCallback, bump, signature );
992 -//
993 -// e.preventDefault();
994 -// } else if ( type == 'edit' ) {
995 -// liquidThreads.doEditThread( replyThread, subject, text, summary,
996 -// doneCallback, bump, signature );
997 -// e.preventDefault();
998 -// }
999909
1000910 'handleAJAXSave' : function( e ) {
1001911 e.preventDefault();

Status & tagging log