Merge pull request #589 from owncloud/clear-search
Clear search on folder change
This commit is contained in:
Коммит
1b445a3dc5
|
@ -641,6 +641,8 @@ var Mail = {
|
|||
},
|
||||
|
||||
setFolderActive: function (accountId, folderId) {
|
||||
Mail.State.messageView.clearFilter();
|
||||
|
||||
$('.mail_folders li')
|
||||
.removeClass('active');
|
||||
$('.mail_folders[data-account_id="' + accountId + '"] li[data-folder_id="' + folderId + '"]')
|
||||
|
|
|
@ -246,6 +246,12 @@ views.Messages = Backbone.Marionette.CompositeView.extend({
|
|||
};
|
||||
this.loadNew();
|
||||
},
|
||||
|
||||
clearFilter: function() {
|
||||
$('#searchbox').val('');
|
||||
this.filterCriteria = null;
|
||||
},
|
||||
|
||||
loadMessages: function(reload) {
|
||||
reload = reload || false;
|
||||
var from = this.collection.size();
|
||||
|
|
Загрузка…
Ссылка в новой задаче