diff --git a/admin/themes/default/js/history.js b/admin/themes/default/js/history.js index 90bca5d66..77049cd53 100644 --- a/admin/themes/default/js/history.js +++ b/admin/themes/default/js/history.js @@ -51,4 +51,26 @@ $(document).ready(() => { // console.log(line); } + $(".search-line").find(".img-option").hide(); + + /* Display the option on the click on "..." */ + $(".search-line").find(".toggle-img-option").on("click", function () { + $(this).find(".img-option").toggle(); + }) + + /* Hide img options and rename field on click on the screen */ + + $(document).mouseup(function (e) { + e.stopPropagation(); + let option_is_clicked = false + $(".img-option span").each(function () { + if (!($(this).has(e.target).length === 0)) { + option_is_clicked = true; + } + }) + if (!option_is_clicked) { + $(".search-line").find(".img-option").hide(); + } + }); + }) \ No newline at end of file diff --git a/admin/themes/default/template/history.tpl b/admin/themes/default/template/history.tpl index f3edaf998..6127d3ae0 100644 --- a/admin/themes/default/template/history.tpl +++ b/admin/themes/default/template/history.tpl @@ -105,7 +105,7 @@ const API_METHOD = "{$API_METHOD}"; {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if} -
| {'Date'|@translate} | @@ -132,7 +132,110 @@ const API_METHOD = "{$API_METHOD}";
|---|