Skip to content

Commit

Permalink
improve bookmark delete button
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Jun 28, 2023
1 parent baed4d1 commit 3558d15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions root/thruk/javascript/thruk-3.06.js
Original file line number Diff line number Diff line change
Expand Up @@ -2355,6 +2355,7 @@ function site_panel_bookmark_save() {
success: function(data) {
setBtnSuccess("#site_panel_bookmark_new_save", "bookmark saved");
jQuery("#site_panel_bookmark_new_save").attr('disabled', false).html("save");
jQuery("#site_panel_bookmark_delete").attr('disabled', false).addClass("hover-red");
create_site_panel_popup_tree_make_bookmarks_sortable();
jQuery("#site_panel_bookmark_new").val("").hide();
jQuery("#site_panel_bookmark_new_save").hide();
Expand Down
2 changes: 1 addition & 1 deletion templates/_header_sites.tt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<input type='text' value='' placeholder="enter name" id="site_panel_bookmark_new" class="w-20" style="display: none;">
<button id="site_panel_bookmark_new_save" class="w-20" style="display: none;" onclick="site_panel_bookmark_save()">save</button>
<button id="site_panel_bookmark_plus" onClick='jQuery(this).hide(); jQuery("#site_panel_bookmark_new").show().val("").focus(); jQuery("#site_panel_bookmark_new_save").show();'><i class="uil uil-plus"></i>add</button>
<button [% IF !user_data.exists('site_panel_bookmarks') || user_data.site_panel_bookmarks.size == 0 %]disabled[% ELSE %]class="hover-red" onclick="jQuery(this).toggleClass('red'); jQuery('#site_panel_bookmark_list_container').toggleClass('delete-mode')"[% END %] id="site_panel_bookmark_delete"><i class="uil uil-trash-alt"></i>remove</button>
<button [% IF !user_data.exists('site_panel_bookmarks') || user_data.site_panel_bookmarks.size == 0 %]disabled [% ELSE %] class="hover-red"[% END %] onclick="jQuery(this).toggleClass('red'); jQuery('#site_panel_bookmark_list_container').toggleClass('delete-mode')" id="site_panel_bookmark_delete"><i class="uil uil-trash-alt"></i>remove</button>
</div>
</div>
[% END %]
Expand Down

0 comments on commit 3558d15

Please sign in to comment.