From cddc0217724f1a7661014d50e4c940e623a0c2dc Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 3 Aug 2021 07:12:35 +0000 Subject: Apps drag and drop feature --- view/css/bootstrap-red.css | 6 ++ view/js/mod_cloud.js | 4 +- view/php/theme_init.php | 1 + view/theme/redbasic/js/redbasic.js | 2 +- view/tpl/app.tpl | 2 +- view/tpl/item_categories.tpl | 2 +- view/tpl/item_filer.tpl | 2 +- view/tpl/navbar_default.tpl | 173 ++++++++++++++++++++++++++++++++++++- 8 files changed, 184 insertions(+), 8 deletions(-) (limited to 'view') diff --git a/view/css/bootstrap-red.css b/view/css/bootstrap-red.css index 79817ebd0..d1e8b87cf 100644 --- a/view/css/bootstrap-red.css +++ b/view/css/bootstrap-red.css @@ -52,6 +52,12 @@ nav .dropdown-menu { .navbar-dark .navbar-toggler { color: rgba(255,255,255,1); } + +.offcanvas, +.modal-backdrop.fade { + transition: none; +} + /* nav overrides end */ label { diff --git a/view/js/mod_cloud.js b/view/js/mod_cloud.js index 5ca1f52a9..928ce8689 100644 --- a/view/js/mod_cloud.js +++ b/view/js/mod_cloud.js @@ -47,7 +47,7 @@ $(document).ready(function () { let id = $(this).data('id'); activate_id(id); $('#id_categories_' + id).tagsinput({ - tagClass: 'badge badge-pill badge-warning text-dark' + tagClass: 'badge rounded-pill bg-warning text-dark' }); $('#cloud-tool-categories-' + id).show(); }); @@ -278,7 +278,7 @@ $(document).ready(function () { disable_multi_acl(); $('#id_categories').tagsinput({ - tagClass: 'badge badge-pill badge-warning text-dark' + tagClass: 'badge rounded-pill bg-warning text-dark' }); $('#cloud-multi-tool-submit, #cloud-multi-tool-categories').show(); diff --git a/view/php/theme_init.php b/view/php/theme_init.php index bf34f210a..4aa695aeb 100644 --- a/view/php/theme_init.php +++ b/view/php/theme_init.php @@ -33,6 +33,7 @@ head_add_js('/library/colorbox/jquery.colorbox-min.js'); head_add_js('/library/jquery.AreYouSure/jquery.are-you-sure.js'); head_add_js('/library/tableofcontents/jquery.toc.js'); +head_add_js('/library/Sortable/Sortable.min.js'); head_add_js('/vendor/desandro/imagesloaded/imagesloaded.pkgd.min.js'); /** diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 9312d8390..c0c03d4f8 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -50,7 +50,7 @@ $(document).ready(function() { }); $("input[data-role=cat-tagsinput]").tagsinput({ - tagClass: 'badge badge-pill badge-warning text-dark' + tagClass: 'badge rounded-pill bg-warning text-dark' }); $('a.disabled').click(function(e) { diff --git a/view/tpl/app.tpl b/view/tpl/app.tpl index 774b75b31..597e38637 100644 --- a/view/tpl/app.tpl +++ b/view/tpl/app.tpl @@ -1,7 +1,7 @@ {{if ! ($navapps || $order)}}
diff --git a/view/tpl/item_categories.tpl b/view/tpl/item_categories.tpl index fa07fa39f..68f8944bc 100644 --- a/view/tpl/item_categories.tpl +++ b/view/tpl/item_categories.tpl @@ -1,7 +1,7 @@ {{if $categories}} {{foreach $categories as $cat}} - {{if $cat.url}}{{$cat.term}}{{else}}{{$cat.term}}{{/if}} + {{if $cat.url}}{{$cat.term}}{{else}}{{$cat.term}}{{/if}} {{/foreach}} {{/if}} diff --git a/view/tpl/item_filer.tpl b/view/tpl/item_filer.tpl index f814b374c..3ecf9aa41 100644 --- a/view/tpl/item_filer.tpl +++ b/view/tpl/item_filer.tpl @@ -1,7 +1,7 @@ {{if $categories}} {{foreach $categories as $cat}} - {{$cat.term}}  + {{$cat.term}}  {{/foreach}} {{/if}} diff --git a/view/tpl/navbar_default.tpl b/view/tpl/navbar_default.tpl index 6c3cf3ff5..5e46c2263 100644 --- a/view/tpl/navbar_default.tpl +++ b/view/tpl/navbar_default.tpl @@ -168,7 +168,7 @@ {{/if**}} {{if $navbar_apps}} {{foreach $navbar_apps as $navbar_app}} -
  • +
  • {{/foreach}} @@ -262,13 +262,182 @@ {{$sysapps}}
    {{/if}} + + {{if $is_owner}} +
    + {{/if}} {{foreach $nav_apps as $nav_app}} {{$nav_app}} {{/foreach}} {{if $is_owner}} +
    + {{/if}} + {{if $is_owner}} {{$addapps}} - {{$orderapps}} {{/if}} +{{if $is_owner}} + +{{/if}} -- cgit v1.2.3