diff --git a/CHANGELOG.md b/CHANGELOG.md index ca9fce978..a201097e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## Unreleased +### Unreleased ### Added +- Added Trash button to delete section [#347](https://github.com/clowder-framework/clowder/issues/347) - Add "when" parameter in a few GET API endpoints to enable pagination [#266](https://github.com/clowder-framework/clowder/issues/266) - Extractors can now specify an extractor_key and an owner (email address) when sending a registration or heartbeat to Clowder that will restrict use of that extractor to them. diff --git a/app/views/file.scala.html b/app/views/file.scala.html index d6788f083..ed6b3d72b 100644 --- a/app/views/file.scala.html +++ b/app/views/file.scala.html @@ -483,6 +483,7 @@

Sections

Position Description Find + Delete @@ -541,6 +542,9 @@

Sections

} Similar + + + } @@ -1167,6 +1171,27 @@

Tags

return false; } + + function removeSection(sectionId) { + var request = window.jsRoutes.api.Sections.delete(sectionId).ajax({ + type: 'DELETE' + }); + + request.done(function (response, textStatus, jqXHR) { + console.log("Response " + textStatus); + location.reload(); + }); + + request.fail(function (jqXHR, textStatus, errorThrown){ + console.error("The following error occurred: " + textStatus, errorThrown); + var errMsg = "You must be logged in to remove a section from a file."; + if (!checkErrorAndRedirect(jqXHR, errMsg)) { + notify("The section was not removed from the file due to : " + errorThrown, "error"); + } + }); + + return false; + } //The removeTag code is almost identical to the code in tags.scala.html. Should be unified. function removeTag() { var tagId = $(this).attr("id"); diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css index 774cd1737..906bc9a46 100644 --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -760,11 +760,15 @@ table#sensorsListTable>thead>tr>th.headerSortDown { } #scrollTableGalleria .galleriaDescr { - width: 35%; + width: 30%; } #scrollTableGalleria .galleriaFindSimilar { - width: 20%; + width: 15%; +} + +#scrollTableGalleria .galleriaDelete { + width: 10%; } #scrollTableGalleria thead {