diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2015-07-24 23:07:09 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2015-08-07 01:22:43 +0200 |
commit | 5af59c68712032ef387ccd4410eb4b8b04c27df9 (patch) | |
tree | 691bc9429cd0a1f5d856ddcac2ea9cbda870927a /apps/files/js | |
parent | f508cf40da93eba05a17b4ffa834a125dbdb2bcb (diff) | |
download | nextcloud-server-5af59c68712032ef387ccd4410eb4b8b04c27df9.tar.gz nextcloud-server-5af59c68712032ef387ccd4410eb4b8b04c27df9.zip |
rename sidebar element and use css and js utility functions to core
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/detailsview.js | 6 | ||||
-rw-r--r-- | apps/files/js/filelist.js | 12 |
2 files changed, 6 insertions, 12 deletions
diff --git a/apps/files/js/detailsview.js b/apps/files/js/detailsview.js index 0cf4ade0767..03fe736856e 100644 --- a/apps/files/js/detailsview.js +++ b/apps/files/js/detailsview.js @@ -74,15 +74,13 @@ */ initialize: function() { var self = this; - this.$el = $('<div class="detailsView"></div>'); + this.$el = $('<div id="app-sidebar"></div>'); this.fileInfo = null; this._tabViews = []; this._detailFileInfoViews = []; this.$el.on('click', 'a.close', function(event) { - self.$el - .addClass('disappear') - .siblings('.with-sidebar').removeClass('with-sidebar'); + OC.Apps.hideAppSidebar(); event.preventDefault(); }); diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 7e94d5c3d4e..8ec7e626162 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -214,7 +214,7 @@ if (_.isUndefined(options.detailsViewEnabled) || options.detailsViewEnabled) { this._detailsView = new OCA.Files.DetailsView(); this._detailsView.addDetailView(new OCA.Files.MainFileInfoDetailView()); - this._detailsView.$el.insertAfter(this.$el); + this._detailsView.$el.insertBefore(this.$el); this._detailsView.$el.addClass('disappear'); } @@ -232,7 +232,7 @@ this.$el.on('click', function(event) { var $target = $(event.target); // click outside file row ? - if (!$target.closest('tbody').length && !$target.closest('.detailsView').length) { + if (!$target.closest('tbody').length && !$target.closest('#app-sidebar').length) { self._updateDetailsView(null); } }); @@ -300,8 +300,7 @@ } if (!fileInfo) { - this._detailsView.$el.addClass('disappear'); - this.$el.removeClass('with-sidebar'); + OC.Apps.hideAppSidebar(); this._detailsView.setFileInfo(null); return; } @@ -311,10 +310,7 @@ path: this.getCurrentDirectory() }, fileInfo)); this._detailsView.$el.scrollTop(0); - _.defer(function() { - self._detailsView.$el.removeClass('disappear hidden'); - self.$el.addClass('with-sidebar'); - }); + _.defer(OC.Apps.showAppSidebar); }, /** |