From b59e2870ab47dab424d043dd51f70d427d92d7a5 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 27 Mar 2015 11:52:59 +0100 Subject: Move bootstrap dependencies (tagsinput) to theme redbasic (we only have it there). Comment out some most probably deprecated js includes. Some css cleanup. --- view/css/conversation.css | 9 ++++++--- view/css/mod_events.css | 7 +++++-- view/js/main.js | 10 +++++----- view/php/theme_init.php | 16 ++++++++-------- view/theme/redbasic/css/style.css | 13 +++++++------ view/theme/redbasic/js/redbasic.js | 6 +++++- view/theme/redbasic/php/theme_init.php | 4 +++- view/tpl/event_form.tpl | 2 +- view/tpl/jot.tpl | 5 ++--- 9 files changed, 42 insertions(+), 30 deletions(-) diff --git a/view/css/conversation.css b/view/css/conversation.css index 591a4e767..dced812b7 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -11,16 +11,19 @@ code { .jothidden input { border: 0px; margin: 0px; - padding: 8px; height: 39px; - width: 70%; - margin-bottom: 5px; + width: 100%; } .jothidden { display:none; } +#jot-title-wrap input { + padding: 8px; + margin-bottom: 5px; +} + #profile-jot-text { height: 39px; padding: 8px; diff --git a/view/css/mod_events.css b/view/css/mod_events.css index 37e8bbb84..f2ffb9a2e 100644 --- a/view/css/mod_events.css +++ b/view/css/mod_events.css @@ -25,7 +25,10 @@ .event-cats { margin-top: 15px; - width: 100%; +} + +.bootstrap-tagsinput { + width: 100%; } @@ -47,4 +50,4 @@ #event-edit-preview-btn { margin-right: 15px; -} \ No newline at end of file +} diff --git a/view/js/main.js b/view/js/main.js index 07035aee3..b9fb9f85e 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -275,7 +275,7 @@ $(function() { }); /* setup field_richtext */ - setupFieldRichtext(); + //setupFieldRichtext(); /* Turn elements with one of our special rel tags into popup menus */ @@ -1060,9 +1060,9 @@ function fcFileBrowser (field_name, url, type, win) { return false; } -function setupFieldRichtext(){ - return; /* +function setupFieldRichtext(){ + tinyMCE.init({ theme : "advanced", mode : "specific_textareas", @@ -1086,9 +1086,9 @@ function setupFieldRichtext(){ theme_advanced_path : false, file_browser_callback : "fcFileBrowser", }); -*/ -} +} +*/ /** * sprintf in javascript diff --git a/view/php/theme_init.php b/view/php/theme_init.php index b695bd54e..8168eb2c0 100644 --- a/view/php/theme_init.php +++ b/view/php/theme_init.php @@ -10,9 +10,9 @@ head_add_css('view/css/conversation.css'); head_add_css('view/css/widgets.css'); head_add_css('view/css/colorbox.css'); head_add_css('library/justifiedGallery/justifiedGallery.css'); -head_add_css('library/bootstrap-tagsinput/bootstrap-tagsinput.css'); + head_add_js('jquery.js'); -head_add_js('jquery-migrate-1.1.1.js'); +//head_add_js('jquery-migrate-1.1.1.js'); head_add_js('library/justifiedGallery/jquery.justifiedGallery.js'); //head_add_js('jquery-compat.js'); @@ -21,13 +21,13 @@ head_add_js('jquery.spin.js'); head_add_js('jquery.textinputs.js'); head_add_js('autocomplete.js'); head_add_js('library/jquery-textcomplete/jquery.textcomplete.js'); -head_add_js('library/colorbox/jquery.colorbox.js'); +//head_add_js('library/colorbox/jquery.colorbox.js'); head_add_js('library/jquery.timeago.js'); head_add_js('library/readmore.js/readmore.js'); -head_add_js('library/jquery_ac/friendica.complete.js'); -head_add_js('library/tiptip/jquery.tipTip.minified.js'); +//head_add_js('library/jquery_ac/friendica.complete.js'); +//head_add_js('library/tiptip/jquery.tipTip.minified.js'); head_add_js('library/jgrowl/jquery.jgrowl_minimized.js'); -head_add_js('library/tinymce/jscripts/tiny_mce/tiny_mce.js'); +//head_add_js('library/tinymce/jscripts/tiny_mce/tiny_mce.js'); head_add_js('library/cryptojs/components/core-min.js'); head_add_js('library/cryptojs/rollups/aes.js'); head_add_js('library/cryptojs/rollups/rabbit.js'); @@ -38,9 +38,9 @@ head_add_js('webtoolkit.base64.js'); head_add_js('main.js'); head_add_js('crypto.js'); head_add_js('library/jRange/jquery.range.js'); -head_add_js('docready.js'); +//head_add_js('docready.js'); head_add_js('library/colorbox/jquery.colorbox-min.js'); -head_add_js('library/bootstrap-tagsinput/bootstrap-tagsinput.js'); + head_add_js('library/jquery.AreYouSure/jquery.are-you-sure.js'); head_add_js('library/tableofcontents/jquery.toc.js'); diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index ca324a89e..647fcda34 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -2214,15 +2214,19 @@ aside .nav > li > a:hover, aside .nav > li > a:focus { } /* Modified original CSS to match input in Redbasic */ -.bootstrap-tagsinput { +.jothidden .bootstrap-tagsinput { border-color:#fff; background-color: #fff; box-shadow: none; display: inline-block; border-radius: $radiuspx; cursor: text; - padding: 0 6px; - width: 70% !important; + padding: 0px 8px; + width: 100%; +} + +.bootstrap-tagsinput .label { + font-size: 100%; } .jothidden .bootstrap-tagsinput:hover, .jothidden .bootstrap-tagsinput:focus { @@ -2305,9 +2309,6 @@ aside .nav > li > a:hover, aside .nav > li > a:focus { right: 0px; background-color: #337AB7; } -.label-info { - background-color: #337AB7; -} .channels_ckbx, .pending_ckbx, .users_ckbx { margin-top: -5px !important; diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index c825b0485..68190778c 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -34,6 +34,10 @@ $(document).ready(function() { if($('#tabs-collapse-1').length === 0) { $('#expand-tabs').hide(); } + + $("input[data-role=cat-tagsinput]").tagsinput({ + tagClass: 'label label-primary' + }); }); $(document).ready(function(){ @@ -48,4 +52,4 @@ $(document).ready(function(){ } } setInterval(function () {checkNotify();}, 10 * 1000); -}); \ No newline at end of file +}); diff --git a/view/theme/redbasic/php/theme_init.php b/view/theme/redbasic/php/theme_init.php index 498d1ee15..3179c7078 100644 --- a/view/theme/redbasic/php/theme_init.php +++ b/view/theme/redbasic/php/theme_init.php @@ -1,7 +1,8 @@ - + {{/if}} diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl index 47787676e..ed1d1e35f 100755 --- a/view/tpl/jot.tpl +++ b/view/tpl/jot.tpl @@ -10,8 +10,7 @@ - - + {{if $showacl}}{{$acl}}{{/if}} {{$mimeselect}} {{$layoutselect}} @@ -25,7 +24,7 @@ {{if $catsenabled}} {{/if}} {{if $webpage}} -- cgit v1.2.3