Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/files/css/detailsView.scss
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@
position: absolute;
top: 0;
right: 0;
padding: 14px;
opacity: .5;
z-index: 1;
width: 44px;
height: 44px;
}
1 change: 1 addition & 0 deletions apps/files/css/files.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#filestable {
position: relative;
width: 100%;
min-width: 500px;
}

#filestable tbody tr {
Expand Down
2 changes: 1 addition & 1 deletion apps/files/css/mobile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

/* don’t require a minimum width for files table */
#body-user #filestable {
min-width: initial !important;
min-width: 300px;
}

table th#headerSize,
Expand Down
7 changes: 7 additions & 0 deletions apps/files/js/detailsview.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@
* Renders this details view
*/
render: function() {
// remove old instances
if ($('#app-sidebar').length === 0) {
this.$el.insertAfter($('#app-content'));
} else {
$('#app-sidebar').replaceWith(this.$el)
}

var templateVars = {
closeLabel: t('files', 'Close')
};
Expand Down
4 changes: 2 additions & 2 deletions apps/files/js/filelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,12 @@

/**
* Number of files per page
* Always show a minimum of 1
*
* @return {int} page size
*/
pageSize: function() {
return Math.ceil(this.$container.height() / 50);
return Math.max(Math.ceil(this.$container.height() / 50), 1);
},

/**
Expand Down Expand Up @@ -274,7 +275,6 @@

if (_.isUndefined(options.detailsViewEnabled) || options.detailsViewEnabled) {
this._detailsView = new OCA.Files.DetailsView();
this._detailsView.$el.insertBefore(this.$el);
this._detailsView.$el.addClass('disappear');
}

Expand Down
2 changes: 2 additions & 0 deletions apps/files/tests/js/favoritespluginspec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ describe('OCA.Files.FavoritesPlugin tests', function() {

beforeEach(function() {
$('#testArea').append(
'<div id="content">' +
'<div id="app-navigation">' +
'<ul><li data-id="files"><a>Files</a></li>' +
'<li data-id="sharingin"><a></a></li>' +
Expand All @@ -25,6 +26,7 @@ describe('OCA.Files.FavoritesPlugin tests', function() {
'<div id="app-content-favorites" class="hidden">' +
'</div>' +
'</div>' +
'</div>' +
'</div>'
);
OC.Plugins.attach('OCA.Files.App', Plugin);
Expand Down
5 changes: 3 additions & 2 deletions apps/files/tests/js/filelistSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2491,7 +2491,8 @@ describe('OCA.Files.FileList tests', function() {

expect($('#app-sidebar').hasClass('disappear')).toEqual(false);
fileList.remove('One.txt');
expect($('#app-sidebar').hasClass('disappear')).toEqual(true);
// sidebar is removed on close before being
expect($('#app-sidebar').length).toEqual(0);
jQuery.fx.off = false;
});
it('returns the currently selected model instance when calling getModelForFile', function() {
Expand All @@ -2515,7 +2516,7 @@ describe('OCA.Files.FileList tests', function() {

expect($('#app-sidebar').hasClass('disappear')).toEqual(false);
fileList.changeDirectory('/another');
expect($('#app-sidebar').hasClass('disappear')).toEqual(true);
expect($('#app-sidebar').length).toEqual(0);
jQuery.fx.off = false;
});
});
Expand Down
2 changes: 1 addition & 1 deletion apps/files_sharing/js/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ OCA.Sharing.PublicApp = {
$el,
{
id: 'files.public',
scrollContainer: $('#content-wrapper'),
scrollContainer: $('#app-content'),
dragOptions: dragOptions,
folderDropOptions: folderDropOptions,
fileActions: fileActions,
Expand Down
Loading