diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-10-23 16:44:09 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-10-23 16:44:20 +0200 |
commit | b6981dcecb0fb80b3b519af70f2c29329fe2c2b0 (patch) | |
tree | a0042912470bd4be6e84ccf0e176fa1afb9b1781 /apps/files_sharing/js | |
parent | 26ca7a0e2f86cb76726073f2d73fd5cb8a1e09d9 (diff) | |
parent | 39338aaa676168b0a53c3a1f6d5363569f303361 (diff) | |
download | nextcloud-server-b6981dcecb0fb80b3b519af70f2c29329fe2c2b0.tar.gz nextcloud-server-b6981dcecb0fb80b3b519af70f2c29329fe2c2b0.zip |
Merge branch 'master' of https://github.com/nextcloud/server into gridview-table
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r-- | apps/files_sharing/js/app.js | 30 | ||||
-rw-r--r-- | apps/files_sharing/js/sharedfilelist.js | 22 | ||||
-rw-r--r-- | apps/files_sharing/js/sharetabview.js | 4 |
3 files changed, 38 insertions, 18 deletions
diff --git a/apps/files_sharing/js/app.js b/apps/files_sharing/js/app.js index 750f66236ae..b6ca71e15d1 100644 --- a/apps/files_sharing/js/app.js +++ b/apps/files_sharing/js/app.js @@ -34,7 +34,11 @@ OCA.Sharing.App = { id: 'shares.self', sharedWithUser: true, fileActions: this._createFileActions(), - config: OCA.Files.App.getFilesConfig() + config: OCA.Files.App.getFilesConfig(), + // The file list is created when a "show" event is handled, so + // it should be marked as "shown" like it would have been done + // if handling the event with the file list already created. + shown: true } ); @@ -56,7 +60,11 @@ OCA.Sharing.App = { id: 'shares.others', sharedWithUser: false, fileActions: this._createFileActions(), - config: OCA.Files.App.getFilesConfig() + config: OCA.Files.App.getFilesConfig(), + // The file list is created when a "show" event is handled, so + // it should be marked as "shown" like it would have been done + // if handling the event with the file list already created. + shown: true } ); @@ -78,7 +86,11 @@ OCA.Sharing.App = { id: 'shares.link', linksOnly: true, fileActions: this._createFileActions(), - config: OCA.Files.App.getFilesConfig() + config: OCA.Files.App.getFilesConfig(), + // The file list is created when a "show" event is handled, so + // it should be marked as "shown" like it would have been done + // if handling the event with the file list already created. + shown: true } ); @@ -101,7 +113,11 @@ OCA.Sharing.App = { showDeleted: true, sharedWithUser: true, fileActions: this._restoreShareAction(), - config: OCA.Files.App.getFilesConfig() + config: OCA.Files.App.getFilesConfig(), + // The file list is created when a "show" event is handled, so + // it should be marked as "shown" like it would have been done + // if handling the event with the file list already created. + shown: true } ); @@ -122,7 +138,11 @@ OCA.Sharing.App = { { id: 'shares.overview', config: OCA.Files.App.getFilesConfig(), - isOverview: true + isOverview: true, + // The file list is created when a "show" event is handled, so + // it should be marked as "shown" like it would have been done + // if handling the event with the file list already created. + shown: true } ); diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js index 3a6de0d5012..7fa38a58c59 100644 --- a/apps/files_sharing/js/sharedfilelist.js +++ b/apps/files_sharing/js/sharedfilelist.js @@ -90,7 +90,7 @@ var permission = fileData.permissions; $tr.attr('data-share-permissions', permission); } - + // add row with expiration date for link only shares - influenced by _createRow of filelist if (this._linksOnly) { var expirationTimestamp = 0; @@ -107,6 +107,8 @@ modifiedColor = 160; } + var formatted; + var text; if (expirationTimestamp > 0) { formatted = OC.Util.formatDate(expirationTimestamp); text = OC.Util.relativeModifiedDate(expirationTimestamp); @@ -232,7 +234,7 @@ promises.push($.ajax(remoteShares)); } if (this._isOverview) { - shares.data.shared_with_me = !shares.data.shared_with_me + shares.data.shared_with_me = !shares.data.shared_with_me; promises.push($.ajax(shares)); } } @@ -242,7 +244,7 @@ return this._reloadCall.then(callBack, callBack); }, - reloadCallback: function(shares, remoteShares, additionnalShares) { + reloadCallback: function(shares, remoteShares, additionalShares) { delete this._reloadCall; this.hideMask(); @@ -259,8 +261,8 @@ if (remoteShares && remoteShares[0] && remoteShares[0].ocs) { remoteShares = remoteShares[0]; } - if (additionnalShares && additionnalShares[0] && additionnalShares[0].ocs) { - additionnalShares = additionnalShares[0]; + if (additionalShares && additionalShares[0] && additionalShares[0].ocs) { + additionalShares = additionalShares[0]; } if (shares.ocs && shares.ocs.data) { @@ -271,8 +273,8 @@ files = files.concat(this._makeFilesFromRemoteShares(remoteShares.ocs.data)); } - if (additionnalShares && additionnalShares && additionnalShares.ocs && additionnalShares.ocs.data) { - files = files.concat(this._makeFilesFromShares(additionnalShares.ocs.data, !this._sharedWithUser)); + if (additionalShares && additionalShares.ocs && additionalShares.ocs.data) { + files = files.concat(this._makeFilesFromShares(additionalShares.ocs.data, !this._sharedWithUser)); } @@ -444,12 +446,6 @@ // Sort by expected sort comparator return files.sort(this._sortComparator); }, - - _onUrlChanged: function(e) { - if (e && _.isString(e.dir)) { - this.changeDirectory(e.dir, false, true); - } - } }); /** diff --git a/apps/files_sharing/js/sharetabview.js b/apps/files_sharing/js/sharetabview.js index fc7f2c5f045..3944293d5c1 100644 --- a/apps/files_sharing/js/sharetabview.js +++ b/apps/files_sharing/js/sharetabview.js @@ -32,6 +32,10 @@ return t('files_sharing', 'Sharing'); }, + getIcon: function() { + return 'icon-shared'; + }, + /** * Renders this details view */ |