diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-08-14 15:54:27 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-08-14 16:51:04 +0200 |
commit | e2549fa660630c1345dcdc84be9114ad2e54c0aa (patch) | |
tree | 0529f045d6f03f793bae98aac58894fd663a0913 /apps/files/js/detailtabview.js | |
parent | 4e327d058c66b98b8ff357589f339e57400c7a63 (diff) | |
download | nextcloud-server-e2549fa660630c1345dcdc84be9114ad2e54c0aa.tar.gz nextcloud-server-e2549fa660630c1345dcdc84be9114ad2e54c0aa.zip |
Improve right sidebar tabs behavior
Tab heads are not rendered if only one tab.
The tab contents is updated on-demand. This means that if a tab is not
visible it is not rendered at first. If the tab was already rendered
through switching, its model will not get updated until the next time it
becomes visible. This will prevent needless rerendering of invisible tab
contents, especially considering that some tabs might need extra ajax
requests.
Diffstat (limited to 'apps/files/js/detailtabview.js')
-rw-r--r-- | apps/files/js/detailtabview.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files/js/detailtabview.js b/apps/files/js/detailtabview.js index b2e02971fb4..67f8b535abd 100644 --- a/apps/files/js/detailtabview.js +++ b/apps/files/js/detailtabview.js @@ -71,8 +71,10 @@ * @param {OCA.Files.FileInfoModel} fileInfo file info to set */ setFileInfo: function(fileInfo) { - this.model = fileInfo; - this.render(); + if (this.model !== fileInfo) { + this.model = fileInfo; + this.render(); + } }, /** |