diff --git a/renderer.js b/renderer.js index 54d259c..1e47c6b 100644 --- a/renderer.js +++ b/renderer.js @@ -160,7 +160,7 @@ $( document).ready( function() { $( "#filters-amount" ).text( $( "#filters .collection-item:visible" ).length ); }; - // When clicking on 'Cancel editing' + // When clicking on 'Clear Filter' var cancelEditAction = function() { $( "#league" ).val( config.leagues[config.defaultLeagueIndex]); $( "#league").material_select(); @@ -200,10 +200,12 @@ $( document).ready( function() { $( "#item-type" ).val( "any" ); $( "#item-type").material_select(); + // If we are editing and the button is 'Clear Filter' if ( $( this ).text() !== "Clear filter" ) { $( "#add-filter" ).text( "Add filter" ); $( "#cancel-filter" ).text( "Clear filter" ); $( "#cancel-filter" ).removeClass( "red" ).addClass( "blue-grey" ); + editingFilter = ""; } }; @@ -1140,4 +1142,8 @@ $( document).ready( function() { } }, config.NOTIFICATION_QUEUE_INTERVAL ); + // setInterval( function() { + // console.log( "editingFilter: " + editingFilter ); + // }, 1000 ); + }); \ No newline at end of file diff --git a/templates/entry.html b/templates/entry.html index 988014a..28ae4c6 100644 --- a/templates/entry.html +++ b/templates/entry.html @@ -1,7 +1,7 @@