diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-10-26 17:05:31 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-10-26 17:05:31 +0100 |
commit | 2849f19cfe606d5b76077c7d1dd50db0835a5121 (patch) | |
tree | da52c4c56ad6077a2a509cc89b0b2003fb4776f6 /settings | |
parent | e19c49295a4bba82b2e1fa613ad03608c79d6443 (diff) | |
download | nextcloud-server-2849f19cfe606d5b76077c7d1dd50db0835a5121.tar.gz nextcloud-server-2849f19cfe606d5b76077c7d1dd50db0835a5121.zip |
Fix backwards and forward button
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/apps.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/settings/js/apps.js b/settings/js/apps.js index df1181b1e71..9ffa74c7d93 100644 --- a/settings/js/apps.js +++ b/settings/js/apps.js @@ -476,17 +476,28 @@ OC.Settings.Apps = OC.Settings.Apps || { } }, + _onPopState: function(params) { + params = _.extend({ + category: 'enabled' + }, params); + + OC.Settings.Apps.loadCategory(params.category); + }, + /** * Initializes the apps list */ initialize: function($el) { OC.Plugins.register('OCA.Search', OC.Settings.Apps.Search); OC.Settings.Apps.loadCategories(); + OC.Util.History.addOnPopStateHandler(_.bind(this._onPopState, this)); $(document).on('click', 'ul#apps-categories li', function () { var categoryId = $(this).data('categoryId'); OC.Settings.Apps.loadCategory(categoryId); - OC.Util.History.pushState('category=' + categoryId); + OC.Util.History.pushState({ + category: categoryId + }); $('#searchbox').val(''); }); |