From 886e231091d77fbcb6108d161a7389ae65f61d69 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 15 Jan 2024 09:55:46 -0500 Subject: [PATCH 1/2] Exclude Apple keyboard Meta key from the Pause shortcut --- view/js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/view/js/main.js b/view/js/main.js index 0da6c1df10..2d684088ac 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -379,7 +379,7 @@ $(function() { // Allow folks to stop the ajax page updates with the pause/break key $(document).keydown(function(event) { // Pause/Break or Ctrl + Space - if (event.which === 19 || (!event.shiftKey && !event.altKey && event.ctrlKey && event.which === 32)) { + if (event.which === 19 || (!event.metaKey && !event.shiftKey && !event.altKey && event.ctrlKey && event.which === 32)) { event.preventDefault(); if (stopped === false) { stopped = true; @@ -643,7 +643,7 @@ function liveUpdate(src) { function updateItem(itemNo) { force_update = true; - update_item = itemNo; + update_item = itemNo; } function imgbright(node) { From 0b93270d7b4985d303ceca458dafc3fcd3b025f8 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 15 Jan 2024 10:22:37 -0500 Subject: [PATCH 2/2] [frio] Move item deletion rotator to button --- view/theme/frio/templates/jot-header.tpl | 39 +++++++++---------- .../frio/templates/threaded_conversation.tpl | 1 - 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/view/theme/frio/templates/jot-header.tpl b/view/theme/frio/templates/jot-header.tpl index 498ed7fb24..9ee720ae74 100644 --- a/view/theme/frio/templates/jot-header.tpl +++ b/view/theme/frio/templates/jot-header.tpl @@ -145,45 +145,42 @@ }); function deleteCheckedItems() { - if(confirm('{{$delitems}}')) { - var checkedstr = ''; - var ItemsToDelete = {}; + if (confirm('{{$delitems}}')) { + let checkedstr = ''; + const ItemsToDelete = {}; - $("#item-delete-selected").hide(); - $('#item-delete-selected-rotator').show(); - $('body').css('cursor', 'wait'); + $('#item-delete-selected').prop('disabled', true); + $('#item-delete-selected i').toggleClass('fa-trash fa-hourglass fa-spin'); - $('.item-select').each( function() { - if($(this).is(':checked')) { - if(checkedstr.length != 0) { + $('.item-select').each(function () { + if ($(this).is(':checked')) { + if (checkedstr.length > 0) { checkedstr = checkedstr + ',' + $(this).val(); - var deleteItem = this.closest(".wall-item-container"); - ItemsToDelete[deleteItem.id] = deleteItem; - } - else { + } else { checkedstr = $(this).val(); } // Get the corresponding item container - var deleteItem = this.closest(".wall-item-container"); + const deleteItem = this.closest(".wall-item-container"); ItemsToDelete[deleteItem.id] = deleteItem; } }); // Fade the container from the items we want to delete - for(var key in ItemsToDelete) { + for (const key in ItemsToDelete) { $(ItemsToDelete[key]).fadeTo('fast', 0.33); - }; + } - $.post('item', { dropitems: checkedstr }, function(data) { - }).done(function() { + $.post('item', {dropitems: checkedstr}, function (data) { + }).done(function () { // Loop through the ItemsToDelete Object and remove // corresponding item div - for(var key in ItemsToDelete) { + for (const key in ItemsToDelete) { $(ItemsToDelete[key]).remove(); } - $('body').css('cursor', 'auto'); - $('#item-delete-selected-rotator').hide(); + + $('#item-delete-selected i').toggleClass('fa-trash fa-hourglass fa-spin') + $('#item-delete-selected').prop('disabled', false).hide(); }); } } diff --git a/view/theme/frio/templates/threaded_conversation.tpl b/view/theme/frio/templates/threaded_conversation.tpl index dab28d8ca1..6eb687d87b 100644 --- a/view/theme/frio/templates/threaded_conversation.tpl +++ b/view/theme/frio/templates/threaded_conversation.tpl @@ -20,6 +20,5 @@ - {{/if}} {{/if}}