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_trashbin | |
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_trashbin')
-rw-r--r-- | apps/files_trashbin/src/filelist.js | 6 | ||||
-rw-r--r-- | apps/files_trashbin/src/trash.scss | 2 | ||||
-rw-r--r-- | apps/files_trashbin/templates/index.php | 20 | ||||
-rw-r--r-- | apps/files_trashbin/tests/js/filelistSpec.js | 12 |
4 files changed, 20 insertions, 20 deletions
diff --git a/apps/files_trashbin/src/filelist.js b/apps/files_trashbin/src/filelist.js index c1bf1b280ca..7fb55d4b932 100644 --- a/apps/files_trashbin/src/filelist.js +++ b/apps/files_trashbin/src/filelist.js @@ -54,7 +54,7 @@ * @augments OCA.Files.FileList * @classdesc List of deleted files * - * @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 */ @@ -160,8 +160,8 @@ updateEmptyContent: function() { var exists = this.$fileList.find('tr:first').exists() - this.$el.find('#emptycontent').toggleClass('hidden', exists) - this.$el.find('#filestable th').toggleClass('hidden', !exists) + this.$el.find('.emptyfilelist.emptycontent').toggleClass('hidden', exists) + this.$el.find('.files-filestable th').toggleClass('hidden', !exists) }, _removeCallback: function(files) { diff --git a/apps/files_trashbin/src/trash.scss b/apps/files_trashbin/src/trash.scss index 2ed57b51918..633107c9d6d 100644 --- a/apps/files_trashbin/src/trash.scss +++ b/apps/files_trashbin/src/trash.scss @@ -16,7 +16,7 @@ #app-content-trashbin .summary :last-child { padding: 0; } -#app-content-trashbin #filestable .summary .filesize { +#app-content-trashbin .files-filestable .summary .filesize { display: none; } diff --git a/apps/files_trashbin/templates/index.php b/apps/files_trashbin/templates/index.php index fcd5448db4b..c134d2c75c6 100644 --- a/apps/files_trashbin/templates/index.php +++ b/apps/files_trashbin/templates/index.php @@ -1,10 +1,10 @@ <?php /** @var \OCP\IL10N $l */ ?> -<div id="controls"> - <div id="file_action_panel"></div> +<div class="files-controls"> + <div></div> </div> <div id='notification'></div> -<div id="emptycontent" class="hidden"> +<div class="emptyfilelist emptycontent hidden"> <div class="icon-delete"></div> <h2><?php p($l->t('No deleted files')); ?></h2> <p><?php p($l->t('You will be able to recover deleted files from here')); ?></p> @@ -18,19 +18,19 @@ <p></p> </div> -<table id="filestable" class="list-container <?php p($_['showgridview'] ? 'view-grid' : '') ?>"> +<table class="files-filestable list-container <?php p($_['showgridview'] ? 'view-grid' : '') ?>"> <thead> <tr> - <th id="headerSelection" class="hidden column-selection"> + <th class="hidden column-selection"> <input type="checkbox" id="select_all_trash" class="select-all checkbox"/> <label for="select_all_trash"> <span class="hidden-visually"><?php p($l->t('Select all'))?></span> </label> </th> - <th id='headerName' class="hidden column-name"> - <div id="headerName-container"> + <th class="hidden column-name"> + <div class="column-name-container"> <a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a> - <span id="selectedActionsList" class='selectedActions'> + <span class='selectedActions'> <a href="" class="actions-selected"> <span class="icon icon-more"></span> <span><?php p($l->t('Actions'))?></span> @@ -38,12 +38,12 @@ </span> </div> </th> - <th id="headerDate" class="hidden column-mtime"> + <th class="hidden column-mtime"> <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Deleted')); ?></span><span class="sort-indicator"></span></a> </th> </tr> </thead> - <tbody id="fileList"> + <tbody class="files-fileList"> </tbody> <tfoot> </tfoot> diff --git a/apps/files_trashbin/tests/js/filelistSpec.js b/apps/files_trashbin/tests/js/filelistSpec.js index 0f4661ba09a..4b75e2a14fd 100644 --- a/apps/files_trashbin/tests/js/filelistSpec.js +++ b/apps/files_trashbin/tests/js/filelistSpec.js @@ -49,24 +49,24 @@ describe('OCA.Trashbin.FileList tests', function () { // files app) '<input type="hidden" id="permissions" value="31"></input>' + // dummy controls - '<div id="controls">' + + '<div class="files-controls">' + ' <div class="actions creatable"></div>' + ' <div class="notCreatable"></div>' + '</div>' + // dummy table // TODO: at some point this will be rendered by the fileList class itself! - '<table id="filestable" class="list-container view-grid">' + - '<thead><tr><th id="headerName" class="hidden">' + + '<table class="files-filestable list-container view-grid">' + + '<thead><tr><th class="hidden column-name">' + '<input type="checkbox" id="select_all_trash" class="select-all">' + '<span class="name">Name</span>' + '<span class="selectedActions hidden">' + '<a href="" class="actions-selected"><span class="icon icon-more"></span><span>Actions</span>' + '</span>' + '</th></tr></thead>' + - '<tbody id="fileList"></tbody>' + + '<tbody class="files-fileList"></tbody>' + '<tfoot></tfoot>' + '</table>' + - '<div id="emptycontent">Empty content message</div>' + + '<div class="emptyfilelist emptycontent">Empty content message</div>' + '</div>' ); @@ -161,7 +161,7 @@ describe('OCA.Trashbin.FileList tests', function () { it('links the breadcrumb to the trashbin view', function () { fileList.changeDirectory('/subdir', false, true); fakeServer.respond(); - var $crumbs = fileList.$el.find('#controls .crumb'); + var $crumbs = fileList.$el.find('.files-controls .crumb'); expect($crumbs.length).toEqual(3); expect($crumbs.eq(1).find('a').text()).toEqual('Home'); expect($crumbs.eq(1).find('a').attr('href')) |