Styling fixes + hightlight in files sidebar

Sidebar scrolls with contents
Highlight currently show file
This commit is contained in:
Vincent Petry 2015-07-15 17:35:35 +02:00 committed by Arthur Schiwon
parent ff614a7dbd
commit ad90ba27cd
7 changed files with 17 additions and 3 deletions

View File

@ -8,9 +8,9 @@
position: absolute;
width: 350px;
top: 0;
bottom: 0;
right: 0;
left: auto;
min-height: 100%;
background-color: white;
-webkit-transition: margin-right 300ms;
-moz-transition: margin-right 300ms;
@ -28,11 +28,11 @@
}
.app-files .detailsView .detailFileInfoContainer {
min-height: 200px;
min-height: 80px;
padding: 10px;
}
.app-files .detailsView .detailFileInfoContainer > div{
.app-files .detailsView .detailFileInfoContainer > div {
clear: both;
margin-left: 5px;
}

View File

@ -143,6 +143,7 @@
#filestable tbody tr:active {
background-color: rgb(240,240,240);
}
#filestable tbody tr.highlighted,
#filestable tbody tr.selected {
background-color: rgb(230,230,230);
}

View File

@ -153,6 +153,7 @@
setFileInfo: function(fileInfo) {
this._fileInfo = fileInfo;
// FIXME: this will render panels twice
this.render();
// notify all panels

View File

@ -286,12 +286,19 @@
*/
_updateDetailsView: function(fileInfo) {
var self = this;
var oldFileInfo = this._detailsView.getFileInfo();
if (oldFileInfo) {
// TODO: use more efficient way, maybe track the highlight
this.$fileList.children().filterAttr('data-id', '' + oldFileInfo.id).removeClass('highlighted');
}
if (!fileInfo) {
this._detailsView.$el.addClass('disappear');
this._detailsView.setFileInfo(null);
return;
}
this.$fileList.children().filterAttr('data-id', '' + fileInfo.id).addClass('highlighted');
this._detailsView.setFileInfo(_.extend({
path: this.getCurrentDirectory()
}, fileInfo));

View File

@ -56,6 +56,7 @@ $application->setupPropagation();
\OCP\Util::addScript('files_sharing', 'share');
\OCP\Util::addScript('files_sharing', 'external');
\OCP\Util::addStyle('files_sharing', 'sharetabview');
// FIXME: registering a job here will cause additional useless SQL queries
// when the route is not cron.php, needs a better way

View File

@ -0,0 +1,3 @@
.app-files .shareTabView {
min-height: 200px;
}

View File

@ -55,6 +55,7 @@
this.$el.append(this._template({
owner: this._fileInfo.shareOwner || OC.currentUser
}));
} else {
// TODO: render placeholder text?
}