diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-07-22 16:11:01 +0200 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2022-07-26 10:19:19 +0200 |
commit | bb2557c38974bea38dcc48185723b33781412cbd (patch) | |
tree | c44ba38e9283120d290bb242f9ddf46231d8464d /apps/files_sharing/js | |
parent | a9c23e1afbda3de62c3436b667bbb1053f426af5 (diff) | |
download | nextcloud-server-bb2557c38974bea38dcc48185723b33781412cbd.tar.gz nextcloud-server-bb2557c38974bea38dcc48185723b33781412cbd.zip |
Replace files app ids to classes
Replaced ids to classes for the following:
- #filestable -> .files-filestable
- #fileList -> .files-fileList
- #controls -> .files-controls
- #emptycontent -> .emptyfilelist.emptycontent
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r-- | apps/files_sharing/js/app.js | 12 | ||||
-rw-r--r-- | apps/files_sharing/js/files_drop.js | 2 | ||||
-rw-r--r-- | apps/files_sharing/js/public.js | 4 | ||||
-rw-r--r-- | apps/files_sharing/js/sharedfilelist.js | 6 |
4 files changed, 12 insertions, 12 deletions
diff --git a/apps/files_sharing/js/app.js b/apps/files_sharing/js/app.js index 24416fd5a3f..b9a60c73dab 100644 --- a/apps/files_sharing/js/app.js +++ b/apps/files_sharing/js/app.js @@ -46,7 +46,7 @@ OCA.Sharing.App = { this._extendFileList(this._inFileList) this._inFileList.appName = t('files_sharing', 'Shared with you') - this._inFileList.$el.find('#emptycontent').html('<div class="icon-shared"></div>' + this._inFileList.$el.find('.emptyfilelist.emptycontent').html('<div class="icon-shared"></div>' + '<h2>' + t('files_sharing', 'Nothing shared with you yet') + '</h2>' + '<p>' + t('files_sharing', 'Files and folders others share with you will show up here') + '</p>') return this._inFileList @@ -72,7 +72,7 @@ OCA.Sharing.App = { this._extendFileList(this._outFileList) this._outFileList.appName = t('files_sharing', 'Shared with others') - this._outFileList.$el.find('#emptycontent').html('<div class="icon-shared"></div>' + this._outFileList.$el.find('.emptyfilelist.emptycontent').html('<div class="icon-shared"></div>' + '<h2>' + t('files_sharing', 'Nothing shared yet') + '</h2>' + '<p>' + t('files_sharing', 'Files and folders you share will show up here') + '</p>') return this._outFileList @@ -98,7 +98,7 @@ OCA.Sharing.App = { this._extendFileList(this._linkFileList) this._linkFileList.appName = t('files_sharing', 'Shared by link') - this._linkFileList.$el.find('#emptycontent').html('<div class="icon-public"></div>' + this._linkFileList.$el.find('.emptyfilelist.emptycontent').html('<div class="icon-public"></div>' + '<h2>' + t('files_sharing', 'No shared links') + '</h2>' + '<p>' + t('files_sharing', 'Files and folders you share by link will show up here') + '</p>') return this._linkFileList @@ -126,7 +126,7 @@ OCA.Sharing.App = { this._extendFileList(this._deletedFileList) this._deletedFileList.appName = t('files_sharing', 'Deleted shares') - this._deletedFileList.$el.find('#emptycontent').html('<div class="icon-share"></div>' + this._deletedFileList.$el.find('.emptyfilelist.emptycontent').html('<div class="icon-share"></div>' + '<h2>' + t('files_sharing', 'No deleted shares') + '</h2>' + '<p>' + t('files_sharing', 'Shares you deleted will show up here') + '</p>') return this._deletedFileList @@ -155,7 +155,7 @@ OCA.Sharing.App = { this._extendFileList(this._pendingFileList) this._pendingFileList.appName = t('files_sharing', 'Pending shares') - this._pendingFileList.$el.find('#emptycontent').html('<div class="icon-share"></div>' + this._pendingFileList.$el.find('.emptyfilelist.emptycontent').html('<div class="icon-share"></div>' + '<h2>' + t('files_sharing', 'No pending shares') + '</h2>' + '<p>' + t('files_sharing', 'Shares you have received but not confirmed will show up here') + '</p>') return this._pendingFileList @@ -181,7 +181,7 @@ OCA.Sharing.App = { this._extendFileList(this._overviewFileList) this._overviewFileList.appName = t('files_sharing', 'Shares') - this._overviewFileList.$el.find('#emptycontent').html('<div class="icon-share"></div>' + this._overviewFileList.$el.find('.emptyfilelist.emptycontent').html('<div class="icon-share"></div>' + '<h2>' + t('files_sharing', 'No shares') + '</h2>' + '<p>' + t('files_sharing', 'Shares will show up here') + '</p>') return this._overviewFileList diff --git a/apps/files_sharing/js/files_drop.js b/apps/files_sharing/js/files_drop.js index e2830aeea9e..42151bca1cb 100644 --- a/apps/files_sharing/js/files_drop.js +++ b/apps/files_sharing/js/files_drop.js @@ -140,7 +140,7 @@ }); $('#public-upload .button.icon-upload').click(function(e) { e.preventDefault(); - $('#public-upload #emptycontent input').focus().trigger('click'); + $('#public-upload .emptycontent input').focus().trigger('click'); }); window.onbeforeunload = function() { return self.confirmBeforeUnload(); diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index bfb035fb817..c08d72d6e05 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -60,7 +60,7 @@ OCA.Sharing.PublicApp = { } // file list mode ? - if ($el.find('#filestable').length) { + if ($el.find('.files-filestable').length) { var filesClient = new OC.Files.Client({ host: OC.getHost(), port: OC.getPort(), @@ -277,7 +277,7 @@ OCA.Sharing.PublicApp = { }; this.fileList.updateEmptyContent = function() { - this.$el.find('#emptycontent .uploadmessage').text( + this.$el.find('.emptycontent .uploadmessage').text( t('files_sharing', 'You can upload into this folder') ); OCA.Files.FileList.prototype.updateEmptyContent.apply(this, arguments); diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js index e8420113ad9..7d7e91dd965 100644 --- a/apps/files_sharing/js/sharedfilelist.js +++ b/apps/files_sharing/js/sharedfilelist.js @@ -17,7 +17,7 @@ * @classdesc Sharing file list. * Contains both "shared with others" and "shared with you" modes. * - * @param $el container element with existing markup for the #controls + * @param $el container element with existing markup for the .files-controls * and a table * @param [options] map of options, see other parameters * @param {boolean} [options.sharedWithUser] true to return files shared with @@ -158,8 +158,8 @@ var dir = this.getCurrentDirectory() if (dir === '/') { // root has special permissions - this.$el.find('#emptycontent').toggleClass('hidden', !this.isEmpty) - this.$el.find('#filestable thead th').toggleClass('hidden', this.isEmpty) + this.$el.find('.emptyfilelist.emptycontent').toggleClass('hidden', !this.isEmpty) + this.$el.find('.files-filestable thead th').toggleClass('hidden', this.isEmpty) // hide expiration date header for non link only shares if (!this._linksOnly) { |