From d6ffbc416cea93955f561ad80a9ded16dcb1cb3e Mon Sep 17 00:00:00 2001 From: zlax Date: Tue, 14 Dec 2021 22:44:24 +0300 Subject: [PATCH] 6.4 --- ussrbasicpub/tpl/navbar_default.tpl | 437 +++++++++++++++------------- 1 file changed, 239 insertions(+), 198 deletions(-) diff --git a/ussrbasicpub/tpl/navbar_default.tpl b/ussrbasicpub/tpl/navbar_default.tpl index c4eb47c..8a8c43a 100644 --- a/ussrbasicpub/tpl/navbar_default.tpl +++ b/ussrbasicpub/tpl/navbar_default.tpl @@ -1,198 +1,200 @@ -
- {{if $nav.login && !$userinfo}} -
- {{if $nav.loginmenu.1.4}} - - {{$nav.loginmenu.1.1}} - - {{else}} - - {{$nav.loginmenu.1.1}} - - {{/if}} - {{if $nav.register}} - - {{$nav.register.1}} - - {{/if}} -
- {{/if}} - {{if $userinfo}} -
- - {{if $sel.name}} - - {{if $settings_url}} - - {{/if}} - {{/if}} -
- {{/if}} - - - - {{if $nav.help.6}} -
- {{$nav.help.5}} - + {{/if}} + {{if $userinfo}} +
+ + {{if $sel.name}} + + {{if $settings_url}} + + {{/if}} + {{/if}} +
+ {{/if}} + + + + {{if $nav.help.6}} +
+ {{$nav.help.5}} + +
+ {{/if}}
- {{/if}} -
+
@@ -204,6 +206,7 @@
{{/if}}
+
@@ -216,20 +219,20 @@ {{/foreach}} {{/if}} {{if $navbar_apps.0}} + {{/if}} {{if $is_owner}} +
- {{foreach $nav_apps as $nav_app}} {{$nav_app}} {{/foreach}} @@ -253,14 +256,19 @@ animation: 150, delay: 200, delayOnTouchOnly: true, + onStart: function (e) { + $('#app-bin-trash').removeClass('d-none'); + }, onEnd: function (e) { + $('#app-bin-trash').addClass('d-none'); + let app_str = ''; - $('#app-bin-container a').each(function () { + $('#app-bin-container a:visible').each(function () { if(app_str.length) { - app_str = app_str.concat(',', $(this).text()); + app_str = app_str.concat(',', this.text); } else { - app_str = app_str.concat($(this).text()); + app_str = app_str.concat(this.text); } }); $.post( @@ -404,6 +412,39 @@ }); + + $('#app-bin-trash').on('dragover', function (e) { + e.preventDefault(); + e.stopPropagation(); + + $('#app-bin-container a[href=\'' + app_url + '\']').fadeOut(); + }); + $('#app-bin-trash').on('dragleave', function (e) { + e.preventDefault(); + e.stopPropagation(); + + $('#app-bin-container a[href=\'' + app_url + '\']').fadeIn(); + + }); + $('#app-bin-trash').on('drop', function (e) { + e.preventDefault(); + e.stopPropagation(); + + if (papp === null) + return; + + $.ajax({ + type: 'post', + url: 'appman', + data: { + 'aj' : 1, + 'feature' : 'nav_featured_app', + 'papp' : papp + } + }); + + }); + var papp, app_icon, app_url; $(document).on('dragstart', function (e) { papp = e.target.dataset.papp || null;