r101118 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101117‎ | r101118 | r101119 >
Date:05:26, 28 October 2011
Author:werdna
Status:resolved (Comments)
Tags:
Comment:
Remove functionality: Loading form state from cookies, and clicking on username --> filter by that user
Modified paths:
  • /trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js
@@ -333,12 +333,6 @@
334334 loadComments( 'filter' );
335335 } );
336336
337 - $( '.fbd-item-userLink' ).live( 'click', function( e ) {
338 - e.preventDefault();
339 - $('#fbd-filters-username').val( $(this).text() );
340 - $('#fbd-filters').children('form').submit();
341 - } );
342 -
343337 $( '#fbd-list-more' ).children( 'a' ).click( function( e ) {
344338 e.preventDefault();
345339 // We don't call saveFormState() here because we want to use the state of the form
@@ -346,15 +340,4 @@
347341 // you changed the form state then clicked More.
348342 loadComments( 'more' );
349343 } );
350 -
351 - saveFormState();
352 - var filterType = $( '#fbd-filters' ).children( 'form' ).data( 'filtertype' );
353 - // If filtering already happened on the PHP side, don't load the form state from cookies
354 - if ( filterType != 'filtered' ) {
355 - // Don't do an AJAX filter if we're on an ID view, or if the form is still blank after loadFromCookies()
356 - if ( loadFromCookies() && filterType != 'id' ) {
357 - saveFormState();
358 - loadComments( 'filter' );
359 - }
360 - }
361344 } );

Follow-up revisions

RevisionCommit summaryAuthorDate
r101642Partial revert r101118: reinstate the restore-from-cookie code, but only for ...catrope17:53, 2 November 2011

Comments

#Comment by Catrope (talk | contribs)   09:07, 28 October 2011
-	saveFormState();
-	var filterType = $( '#fbd-filters' ).children( 'form' ).data( 'filtertype' );
-	// If filtering already happened on the PHP side, don't load the form state from cookies
-	if ( filterType != 'filtered' ) {
-		// Don't do an AJAX filter if we're on an ID view, or if the form is still blank after loadFromCookies()
-		if ( loadFromCookies() && filterType != 'id' ) {
-			saveFormState();
-			loadComments( 'filter' );
-		}
-	}

Are you sure you want to remove this feature completely? It restores the checkbox states from the cookies, in addition to the username text box. Brandon specifically requested this feature in the first iteration of FBD.

#Comment by Jorm (WMF) (talk | contribs)   16:05, 2 November 2011

I don't want to keep the username filter saving, but the checkbox filtering, yes. If this can happen without the cookies, great.

#Comment by Catrope (talk | contribs)   16:44, 2 November 2011

I'll have to partially revert this then. Will do that after dinner.

Status & tagging log