From d886b44c1e9da653ef7812d417ef690d1495a1c6 Mon Sep 17 00:00:00 2001 From: KodeStar Date: Wed, 23 Nov 2022 15:09:10 +0000 Subject: [PATCH 1/2] Updated translations using lokalise.com --- resources/lang/cs/app.php | 2 ++ resources/lang/da/app.php | 2 ++ resources/lang/de/app.php | 2 ++ resources/lang/el/app.php | 2 ++ resources/lang/en/app.php | 4 ++-- resources/lang/es/app.php | 2 ++ resources/lang/fi/app.php | 2 ++ resources/lang/fr/app.php | 2 ++ resources/lang/hu/app.php | 2 ++ resources/lang/it/app.php | 2 ++ resources/lang/ko/app.php | 2 ++ resources/lang/nl/app.php | 2 ++ resources/lang/no/app.php | 2 ++ resources/lang/pl/app.php | 2 ++ resources/lang/pt/app.php | 2 ++ resources/lang/ru/app.php | 2 ++ resources/lang/sl/app.php | 2 ++ resources/lang/sv/app.php | 2 ++ resources/lang/tr/app.php | 2 ++ resources/lang/zh_TW/app.php | 2 ++ 20 files changed, 40 insertions(+), 2 deletions(-) diff --git a/resources/lang/cs/app.php b/resources/lang/cs/app.php index e304f035..a11a757b 100644 --- a/resources/lang/cs/app.php +++ b/resources/lang/cs/app.php @@ -101,4 +101,6 @@ return array ( 'alert.success.user_updated' => 'Uživatel úspěšně aktualizován', 'alert.success.user_deleted' => 'Uživatel úspěšně smazán', 'alert.success.user_restored' => 'Uživatel úspěšně obnoven', + 'dashboard.reorder' => 'Změňte pořadí a připněte položky', + 'dashboard.settings' => 'Nastavení', ); \ No newline at end of file diff --git a/resources/lang/da/app.php b/resources/lang/da/app.php index 1acb714a..4f3d436f 100644 --- a/resources/lang/da/app.php +++ b/resources/lang/da/app.php @@ -101,4 +101,6 @@ return array ( 'alert.success.user_updated' => 'Bruger opdateret med succes', 'alert.success.user_deleted' => 'Bruger slettet med succes', 'alert.success.user_restored' => 'Bruger genskabt med succes', + 'dashboard.reorder' => 'Genbestil og fastgør varer', + 'dashboard.settings' => 'Indstillinger', ); \ No newline at end of file diff --git a/resources/lang/de/app.php b/resources/lang/de/app.php index be86241a..8a3810b2 100644 --- a/resources/lang/de/app.php +++ b/resources/lang/de/app.php @@ -101,4 +101,6 @@ return array ( 'alert.success.user_updated' => 'Nutzer erfolgreich aktualisiert', 'alert.success.user_deleted' => 'Nutzer erfolgreich gelöscht', 'alert.success.user_restored' => 'Nutzer erfolgreich wiederhergestellt', + 'dashboard.reorder' => 'Elemente neu anordnen und anheften', + 'dashboard.settings' => 'Einstellungen', ); \ No newline at end of file diff --git a/resources/lang/el/app.php b/resources/lang/el/app.php index 95c6210e..1ba00266 100644 --- a/resources/lang/el/app.php +++ b/resources/lang/el/app.php @@ -101,4 +101,6 @@ return array ( 'alert.success.user_updated' => 'Ο χρήστης ενημερώθηκε επιτυχώς', 'alert.success.user_deleted' => 'Ο χρήστης διαγράφηκε επιτυχώς', 'alert.success.user_restored' => 'Ο χρήστης επαναφέρθηκε επιτυχώς', + 'dashboard.reorder' => 'Παραγγείλετε ξανά και καρφιτσώστε αντικείμενα', + 'dashboard.settings' => 'Ρυθμίσεις', ); \ No newline at end of file diff --git a/resources/lang/en/app.php b/resources/lang/en/app.php index 0d75e060..49ab1df1 100644 --- a/resources/lang/en/app.php +++ b/resources/lang/en/app.php @@ -1,8 +1,6 @@ 'Reorder and pin items', - 'dashboard.settings' => 'Settings', 'settings.system' => 'System', 'settings.appearance' => 'Appearance', 'settings.miscellaneous' => 'Miscellaneous', @@ -103,4 +101,6 @@ return array ( 'alert.success.user_updated' => 'User updated successfully', 'alert.success.user_deleted' => 'User deleted successfully', 'alert.success.user_restored' => 'User restored successfully', + 'dashboard.reorder' => 'Reorder and pin items', + 'dashboard.settings' => 'Settings', ); \ No newline at end of file diff --git a/resources/lang/es/app.php b/resources/lang/es/app.php index 30917822..16af3ea1 100644 --- a/resources/lang/es/app.php +++ b/resources/lang/es/app.php @@ -101,4 +101,6 @@ return array ( 'alert.success.user_updated' => 'Usuario actualizado exitósamente', 'alert.success.user_deleted' => 'Usuario eliminado exitósamente', 'alert.success.user_restored' => 'Usuario restaurado exitósamente', + 'dashboard.reorder' => 'Reordenar y anclar elementos', + 'dashboard.settings' => 'Ajustes', ); \ No newline at end of file diff --git a/resources/lang/fi/app.php b/resources/lang/fi/app.php index 83c3ded5..e6e4267e 100644 --- a/resources/lang/fi/app.php +++ b/resources/lang/fi/app.php @@ -101,4 +101,6 @@ return array ( 'alert.success.user_updated' => 'Käyttäjä päivitetty onnistuneesti', 'alert.success.user_deleted' => 'Käyttäjä poistettu onnistuneesti', 'alert.success.user_restored' => 'Käyttäjä palautettu onnistuneesti', + 'dashboard.reorder' => 'Järjestä ja kiinnitä kohteita uudelleen', + 'dashboard.settings' => 'asetukset', ); \ No newline at end of file diff --git a/resources/lang/fr/app.php b/resources/lang/fr/app.php index 978f2f42..fafc118f 100644 --- a/resources/lang/fr/app.php +++ b/resources/lang/fr/app.php @@ -101,4 +101,6 @@ return array ( 'alert.success.user_updated' => 'Utilisateur mis à jour avec succès', 'alert.success.user_deleted' => 'Utilisateur supprimé avec succès', 'alert.success.user_restored' => 'Utilisateur restoré avec succès', + 'dashboard.reorder' => 'Réorganiser et épingler les éléments', + 'dashboard.settings' => 'Réglages', ); \ No newline at end of file diff --git a/resources/lang/hu/app.php b/resources/lang/hu/app.php index a0964075..01739e90 100644 --- a/resources/lang/hu/app.php +++ b/resources/lang/hu/app.php @@ -101,4 +101,6 @@ return array ( 'alert.success.user_updated' => 'Felhasználó sikeresen frissítve', 'alert.success.user_deleted' => 'Felhasználó sikeresen törölve', 'alert.success.user_restored' => 'Felhasználó sikeresen visszaállítva', + 'dashboard.reorder' => 'Elemek átrendezése és rögzítése', + 'dashboard.settings' => 'Beállítások', ); \ No newline at end of file diff --git a/resources/lang/it/app.php b/resources/lang/it/app.php index 3376f196..5c8bef46 100644 --- a/resources/lang/it/app.php +++ b/resources/lang/it/app.php @@ -101,4 +101,6 @@ return array ( 'alert.success.user_updated' => 'Utente aggiornato con successo', 'alert.success.user_deleted' => 'Utente eliminato con successo', 'alert.success.user_restored' => 'Utente ripristinato con successo', + 'dashboard.reorder' => 'Riordina e fissa gli elementi', + 'dashboard.settings' => 'Impostazioni', ); \ No newline at end of file diff --git a/resources/lang/ko/app.php b/resources/lang/ko/app.php index d18d4670..07d8c237 100644 --- a/resources/lang/ko/app.php +++ b/resources/lang/ko/app.php @@ -101,4 +101,6 @@ return array ( 'alert.success.user_updated' => '사용자를 성공적으로 업데이트했습니다', 'alert.success.user_deleted' => '사용자를 성공적으로 제거했습니다', 'alert.success.user_restored' => '사용자를 성공적으로 복원했습니다', + 'dashboard.reorder' => '항목 재정렬 및 고정', + 'dashboard.settings' => '설정', ); \ No newline at end of file diff --git a/resources/lang/nl/app.php b/resources/lang/nl/app.php index 4cc3a616..41bcb203 100644 --- a/resources/lang/nl/app.php +++ b/resources/lang/nl/app.php @@ -101,4 +101,6 @@ return array ( 'alert.success.user_updated' => 'Gebruiker met succes bewerkt', 'alert.success.user_deleted' => 'Gebruiker met succes verwijderd', 'alert.success.user_restored' => 'Gebruiker met succes hersteld', + 'dashboard.reorder' => 'Items opnieuw ordenen en vastzetten', + 'dashboard.settings' => 'Instellingen', ); \ No newline at end of file diff --git a/resources/lang/no/app.php b/resources/lang/no/app.php index 672a670a..3c575c8c 100644 --- a/resources/lang/no/app.php +++ b/resources/lang/no/app.php @@ -101,4 +101,6 @@ return array ( 'alert.success.user_updated' => 'Brukeren er oppdatert', 'alert.success.user_deleted' => 'Brukeren ble slettet', 'alert.success.user_restored' => 'Brukeren ble gjenopprettet', + 'dashboard.reorder' => 'Ombestill og fest varer', + 'dashboard.settings' => 'Innstillinger', ); \ No newline at end of file diff --git a/resources/lang/pl/app.php b/resources/lang/pl/app.php index 8c251b31..d3ad7b22 100644 --- a/resources/lang/pl/app.php +++ b/resources/lang/pl/app.php @@ -101,4 +101,6 @@ return array ( 'alert.success.user_updated' => 'Użytkownik został pomyślnie zaktualizowany', 'alert.success.user_deleted' => 'Użytkownik został pomyślnie usunięty', 'alert.success.user_restored' => 'Pomyślnie przywrócono użytkownika', + 'dashboard.reorder' => 'Zmień kolejność i przypnij elementy', + 'dashboard.settings' => 'Ustawienia', ); \ No newline at end of file diff --git a/resources/lang/pt/app.php b/resources/lang/pt/app.php index a929d2b7..b0eae7d5 100644 --- a/resources/lang/pt/app.php +++ b/resources/lang/pt/app.php @@ -101,4 +101,6 @@ return array ( 'alert.success.user_updated' => 'Utilizador atualizada com sucesso', 'alert.success.user_deleted' => 'Utilizador apagada com sucesso', 'alert.success.user_restored' => 'Utilizador restaurada com sucesso', + 'dashboard.reorder' => 'Reordenar e fixar itens', + 'dashboard.settings' => 'Definições', ); \ No newline at end of file diff --git a/resources/lang/ru/app.php b/resources/lang/ru/app.php index 42648122..896368ec 100644 --- a/resources/lang/ru/app.php +++ b/resources/lang/ru/app.php @@ -101,4 +101,6 @@ return array ( 'alert.success.user_updated' => 'Пользователь обновлен успешно', 'alert.success.user_deleted' => 'Пользователь удален успешно', 'alert.success.user_restored' => 'Пользователь восстановлен успешно', + 'dashboard.reorder' => 'Изменить порядок и закрепить элементы', + 'dashboard.settings' => 'Настройки', ); \ No newline at end of file diff --git a/resources/lang/sl/app.php b/resources/lang/sl/app.php index e20d2349..a7fac7a9 100644 --- a/resources/lang/sl/app.php +++ b/resources/lang/sl/app.php @@ -101,4 +101,6 @@ return array ( 'alert.success.user_updated' => 'Uporabnik uspešno posodobljen', 'alert.success.user_deleted' => 'Uporabnik uspešno izbrisan', 'alert.success.user_restored' => 'Uporabnik uspešno obnovljen', + 'dashboard.reorder' => 'Preuredite in pripnite elemente', + 'dashboard.settings' => 'nastavitve', ); \ No newline at end of file diff --git a/resources/lang/sv/app.php b/resources/lang/sv/app.php index a41af2bb..b67c9422 100644 --- a/resources/lang/sv/app.php +++ b/resources/lang/sv/app.php @@ -101,4 +101,6 @@ return array ( 'alert.success.user_updated' => 'Anvädare uppdaterad', 'alert.success.user_deleted' => 'Användare borttagen', 'alert.success.user_restored' => 'Användare återställd', + 'dashboard.reorder' => 'Ordna om och fäst föremål', + 'dashboard.settings' => 'inställningar', ); \ No newline at end of file diff --git a/resources/lang/tr/app.php b/resources/lang/tr/app.php index 5ec3a57b..dee904b1 100644 --- a/resources/lang/tr/app.php +++ b/resources/lang/tr/app.php @@ -101,4 +101,6 @@ return array ( 'alert.success.user_updated' => 'Kullanıcı başarıyla güncellendi', 'alert.success.user_deleted' => 'Kullanıcı başarıyla silindi', 'alert.success.user_restored' => 'Kullanıcı başarıyla geri yüklendi', + 'dashboard.reorder' => 'Öğeleri yeniden sırala ve sabitle', + 'dashboard.settings' => 'Ayarlar', ); \ No newline at end of file diff --git a/resources/lang/zh_TW/app.php b/resources/lang/zh_TW/app.php index cc4ea25d..7afea5bc 100644 --- a/resources/lang/zh_TW/app.php +++ b/resources/lang/zh_TW/app.php @@ -101,4 +101,6 @@ return array ( 'alert.success.user_updated' => '用户修改成功', 'alert.success.user_deleted' => '用户移除成功', 'alert.success.user_restored' => '用户恢复成功', + 'dashboard.reorder' => '重新排序和固定項目', + 'dashboard.settings' => '設置', ); \ No newline at end of file From 2836dadf1a398c0763ae2556fe3d30f7bb3dcba6 Mon Sep 17 00:00:00 2001 From: Attila Kerekes Date: Wed, 23 Nov 2022 18:14:31 +0100 Subject: [PATCH 2/2] fix: Disable saerch submit when tile search is active --- public/js/app.js | 2 +- public/mix-manifest.json | 2 +- resources/assets/js/app.js | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/public/js/app.js b/public/js/app.js index 2c635664..4fc72149 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1 +1 @@ -function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var n=this._events=this._events||{},i=n[t]=n[t]||[];return-1==i.indexOf(e)&&i.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var n=this._onceEvents=this._onceEvents||{};return(n[t]=n[t]||{})[e]=!0,this}},e.off=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var i=n.indexOf(e);return-1!=i&&n.splice(i,1),this}},e.emitEvent=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var i=0,o=n[i];e=e||[];for(var s=this._onceEvents&&this._onceEvents[t];o;){var r=s&&s[o];r&&(this.off(t,o),delete s[o]),o.apply(this,e),o=n[i+=r?0:1]}return this}},t}),function(t,e){"function"==typeof define&&define.amd?define("unipointer/unipointer",["ev-emitter/ev-emitter"],function(n){return e(t,n)}):"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=e(t,require("ev-emitter")):t.Unipointer=e(t,t.EvEmitter)}(window,function(t,e){function n(){}var i=n.prototype=Object.create(e.prototype);i.bindStartEvent=function(t){this._bindStartEvent(t,!0)},i.unbindStartEvent=function(t){this._bindStartEvent(t,!1)},i._bindStartEvent=function(e,n){var i=(n=void 0===n||!!n)?"addEventListener":"removeEventListener";t.navigator.pointerEnabled?e[i]("pointerdown",this):t.navigator.msPointerEnabled?e[i]("MSPointerDown",this):(e[i]("mousedown",this),e[i]("touchstart",this))},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.getTouch=function(t){for(var e=0;e.5;var o=this.colorGrid[e.toUpperCase()];this.updateCursor(o),this.setTexts(),this.setBackgrounds(),n||this.emitEvent("change",[e,t.hue,t.sat,t.lum])}},h.setTexts=function(){if(this.setTextElems)for(var t=0;t0&&o.attr("value","*****")}$(".message-container").length&&setTimeout(function(){$(".message-container").fadeOut()},3500),void 0!==document.hidden?(t="hidden",e="visibilitychange"):void 0!==document.msHidden?(t="msHidden",e="msvisibilitychange"):void 0!==document.webkitHidden&&(t="webkitHidden",e="webkitvisibilitychange");var s=[],r=[],a=$(".livestats-container");a.length>0&&(void 0===document.addEventListener||void 0===t?console.log("This browser does not support visibilityChange"):document.addEventListener(e,function(){document[t]?function(){for(var t=0,e=s;t299||(s[t]=window.setTimeout(r,a))}})};r[t]=h,h()})),$("#upload").change(function(){!function(t){if(t.files&&t.files[0]){var e=new FileReader;e.onload=function(t){$("#appimage img").attr("src",t.target.result)},e.readAsDataURL(t.files[0])}}(this)}),$("#sortable").sortable({stop:function(t,e){var i=$("#sortable").sortable("toArray",{attribute:"data-id"});$.post(n+"order",{order:i})}}),$("#sortable").sortable("disable"),$("#main").on("mouseenter","#sortable.ui-sortable-disabled .item",function(){$(this).siblings(".tooltip").addClass("active"),$(".refresh",this).addClass("active")}).on("mouseleave",".item",function(){$(this).siblings(".tooltip").removeClass("active"),$(".refresh",this).removeClass("active")}),$("#config-buttons").on("mouseenter","a",function(){$(".tooltip",this).addClass("active")}).on("mouseleave","a",function(){$(".tooltip",this).removeClass("active")}),$("#search-container").on("input","input[name=q]",function(){var t=this.value,e=$("#sortable").children(".item-container");"tiles"===$("#search-container select[name=provider]").val()&&t.length>0?(e.hide(),e.filter(function(){return $(this).data("name").toLowerCase().includes(t.toLowerCase())}).show()):e.show()}).on("change","select[name=provider]",function(){var t=$("#sortable").children(".item-container");if("tiles"===$(this).val()){$("#search-container button").hide();var e=$("#search-container input[name=q]").val();e.length>0?(t.hide(),t.filter(function(){return $(this).data("name").toLowerCase().includes(e.toLowerCase())}).show()):t.show()}else $("#search-container button").show(),t.show()}),$("#app").on("click","#config-button",function(t){t.preventDefault();var e=$("#app"),n=e.hasClass("header");e.toggleClass("header"),n?($(".add-item").hide(),$(".item-edit").hide(),$("#app").removeClass("sidebar"),$("#sortable .tooltip").css("display",""),$("#sortable").sortable("disable")):($("#sortable .tooltip").css("display","none"),$("#sortable").sortable("enable"),setTimeout(function(){$(".add-item").fadeIn(),$(".item-edit").fadeIn()},350))}).on("click","#add-item, #pin-item",function(t){t.preventDefault();var e=$("#app");e.hasClass("sidebar");e.toggleClass("sidebar")}).on("click",".close-sidenav",function(t){t.preventDefault(),$("#app").removeClass("sidebar")}).on("click","#test_config",function(t){t.preventDefault();var e=$("#create input[name=url]").val(),i=$('#sapconfig input[name="config[override_url]"]').val();i.length&&""!=i&&(e=i);var o={};o.url=e,$(".config-item").each(function(t){var e=$(this).data("config");o[e]=$(this).val()}),o.id=$("form[data-item-id]").data("item-id"),o.password&&"*****"===o.password&&(o.password=""),$.post(n+"test_config",{data:o},function(t){alert(t)})}),$("#pinlist").on("click","a",function(t){t.preventDefault();var e=$(this),i=e.data("id"),o=e.data("tag");$.get(n+"items/pintoggle/"+i+"/true/"+o,function(t){var n=$(t).filter("#sortable").html();$("#sortable").html(n),e.toggleClass("active")})}),$("#itemform").on("submit",function(t){var e=$('input[name="config[password]"]').first();e.length>0&&"*****"===e.attr("value")&&e.attr("value","")})});var focusSearch=function(t){var e=document.querySelector('input[name="q"]');e&&(t.preventDefault(),e.focus())},openFirstNonHiddenItem=function(t){if(t.target===document.querySelector('input[name="q"]')){var e=document.querySelector('#sortable section.item-container:not([style="display: none;"]) a');"href"in e&&(t.preventDefault(),window.open(e.href))}},KEY_BINDINGS={"/":focusSearch,Enter:openFirstNonHiddenItem};document.addEventListener("keydown",function(t){try{t.key in KEY_BINDINGS&&KEY_BINDINGS[t.key](t)}catch(t){}}); +function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var n=this._events=this._events||{},i=n[t]=n[t]||[];return-1==i.indexOf(e)&&i.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var n=this._onceEvents=this._onceEvents||{};return(n[t]=n[t]||{})[e]=!0,this}},e.off=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var i=n.indexOf(e);return-1!=i&&n.splice(i,1),this}},e.emitEvent=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var i=0,o=n[i];e=e||[];for(var s=this._onceEvents&&this._onceEvents[t];o;){var r=s&&s[o];r&&(this.off(t,o),delete s[o]),o.apply(this,e),o=n[i+=r?0:1]}return this}},t}),function(t,e){"function"==typeof define&&define.amd?define("unipointer/unipointer",["ev-emitter/ev-emitter"],function(n){return e(t,n)}):"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=e(t,require("ev-emitter")):t.Unipointer=e(t,t.EvEmitter)}(window,function(t,e){function n(){}var i=n.prototype=Object.create(e.prototype);i.bindStartEvent=function(t){this._bindStartEvent(t,!0)},i.unbindStartEvent=function(t){this._bindStartEvent(t,!1)},i._bindStartEvent=function(e,n){var i=(n=void 0===n||!!n)?"addEventListener":"removeEventListener";t.navigator.pointerEnabled?e[i]("pointerdown",this):t.navigator.msPointerEnabled?e[i]("MSPointerDown",this):(e[i]("mousedown",this),e[i]("touchstart",this))},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.getTouch=function(t){for(var e=0;e.5;var o=this.colorGrid[e.toUpperCase()];this.updateCursor(o),this.setTexts(),this.setBackgrounds(),n||this.emitEvent("change",[e,t.hue,t.sat,t.lum])}},h.setTexts=function(){if(this.setTextElems)for(var t=0;t0&&o.attr("value","*****")}$(".message-container").length&&setTimeout(function(){$(".message-container").fadeOut()},3500),void 0!==document.hidden?(t="hidden",e="visibilitychange"):void 0!==document.msHidden?(t="msHidden",e="msvisibilitychange"):void 0!==document.webkitHidden&&(t="webkitHidden",e="webkitvisibilitychange");var s=[],r=[],a=$(".livestats-container");a.length>0&&(void 0===document.addEventListener||void 0===t?console.log("This browser does not support visibilityChange"):document.addEventListener(e,function(){document[t]?function(){for(var t=0,e=s;t299||(s[t]=window.setTimeout(r,a))}})};r[t]=h,h()})),$("#upload").change(function(){!function(t){if(t.files&&t.files[0]){var e=new FileReader;e.onload=function(t){$("#appimage img").attr("src",t.target.result)},e.readAsDataURL(t.files[0])}}(this)}),$("#sortable").sortable({stop:function(t,e){var i=$("#sortable").sortable("toArray",{attribute:"data-id"});$.post(n+"order",{order:i})}}),$("#sortable").sortable("disable"),$("#main").on("mouseenter","#sortable.ui-sortable-disabled .item",function(){$(this).siblings(".tooltip").addClass("active"),$(".refresh",this).addClass("active")}).on("mouseleave",".item",function(){$(this).siblings(".tooltip").removeClass("active"),$(".refresh",this).removeClass("active")}),$("#config-buttons").on("mouseenter","a",function(){$(".tooltip",this).addClass("active")}).on("mouseleave","a",function(){$(".tooltip",this).removeClass("active")}),$(".searchform > form").on("submit",function(t){"tiles"===$("#search-container select[name=provider]").val()&&t.preventDefault()}),$("#search-container").on("input","input[name=q]",function(){var t=this.value,e=$("#sortable").children(".item-container");"tiles"===$("#search-container select[name=provider]").val()&&t.length>0?(e.hide(),e.filter(function(){return $(this).data("name").toLowerCase().includes(t.toLowerCase())}).show()):e.show()}).on("change","select[name=provider]",function(){var t=$("#sortable").children(".item-container");if("tiles"===$(this).val()){$("#search-container button").hide();var e=$("#search-container input[name=q]").val();e.length>0?(t.hide(),t.filter(function(){return $(this).data("name").toLowerCase().includes(e.toLowerCase())}).show()):t.show()}else $("#search-container button").show(),t.show()}),$("#app").on("click","#config-button",function(t){t.preventDefault();var e=$("#app"),n=e.hasClass("header");e.toggleClass("header"),n?($(".add-item").hide(),$(".item-edit").hide(),$("#app").removeClass("sidebar"),$("#sortable .tooltip").css("display",""),$("#sortable").sortable("disable")):($("#sortable .tooltip").css("display","none"),$("#sortable").sortable("enable"),setTimeout(function(){$(".add-item").fadeIn(),$(".item-edit").fadeIn()},350))}).on("click","#add-item, #pin-item",function(t){t.preventDefault();var e=$("#app");e.hasClass("sidebar");e.toggleClass("sidebar")}).on("click",".close-sidenav",function(t){t.preventDefault(),$("#app").removeClass("sidebar")}).on("click","#test_config",function(t){t.preventDefault();var e=$("#create input[name=url]").val(),i=$('#sapconfig input[name="config[override_url]"]').val();i.length&&""!=i&&(e=i);var o={};o.url=e,$(".config-item").each(function(t){var e=$(this).data("config");o[e]=$(this).val()}),o.id=$("form[data-item-id]").data("item-id"),o.password&&"*****"===o.password&&(o.password=""),$.post(n+"test_config",{data:o},function(t){alert(t)})}),$("#pinlist").on("click","a",function(t){t.preventDefault();var e=$(this),i=e.data("id"),o=e.data("tag");$.get(n+"items/pintoggle/"+i+"/true/"+o,function(t){var n=$(t).filter("#sortable").html();$("#sortable").html(n),e.toggleClass("active")})}),$("#itemform").on("submit",function(t){var e=$('input[name="config[password]"]').first();e.length>0&&"*****"===e.attr("value")&&e.attr("value","")})});var focusSearch=function(t){var e=document.querySelector('input[name="q"]');e&&(t.preventDefault(),e.focus())},openFirstNonHiddenItem=function(t){if(t.target===document.querySelector('input[name="q"]')){var e=document.querySelector('#sortable section.item-container:not([style="display: none;"]) a');"href"in e&&(t.preventDefault(),window.open(e.href))}},KEY_BINDINGS={"/":focusSearch,Enter:openFirstNonHiddenItem};document.addEventListener("keydown",function(t){try{t.key in KEY_BINDINGS&&KEY_BINDINGS[t.key](t)}catch(t){}}); diff --git a/public/mix-manifest.json b/public/mix-manifest.json index ccea868f..06d6ca05 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,4 +1,4 @@ { "/css/app.css": "/css/app.css?id=cdbee4d3b17bce4786a2", - "/js/app.js": "/js/app.js?id=c15b7d6018358ee45de9" + "/js/app.js": "/js/app.js?id=bf17db5adf00db2c59ef" } diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index 8841b25f..5c97b618 100644 --- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -158,6 +158,11 @@ $.when( $.ready ).then(function() { $('.tooltip', this).removeClass('active'); }) + $('.searchform > form').on('submit', function (event) { + if ($('#search-container select[name=provider]').val() === 'tiles') { + event.preventDefault(); + } + }); $('#search-container').on('input', 'input[name=q]', function () { const search = this.value