From 51af094be8aecf48e2f72d672e0556dbf266cbc5 Mon Sep 17 00:00:00 2001 From: Robert Lyon Date: Fri, 7 Jun 2019 11:52:02 +1200 Subject: [PATCH] Bug 1829940: Move 'add placeholder' to float on right Done in this patch: - - have the add block button on right - have text on large screens but only icon on smaller screens behatnotneeded Change-Id: I37b6a8e44036d2d9a43b25700c3f1812f94c9a81 Signed-off-by: Robert Lyon --- htdocs/js/views.js | 2 +- .../blocktype/placeholder/templates/body.tpl | 2 +- htdocs/theme/raw/sass/components/_btn.scss | 20 +++++++--------- .../theme/raw/sass/layout/_col-collapse.scss | 9 ++----- htdocs/theme/raw/sass/layout/_layout.scss | 3 +++ htdocs/theme/raw/templates/view/accessurl.tpl | 4 +++- htdocs/theme/raw/templates/view/blocks.tpl | 12 ++++------ .../raw/templates/view/blocktypelist.tpl | 18 ++++++-------- .../raw/templates/view/contenteditor.tpl | 2 +- htdocs/theme/raw/templates/view/edit.tpl | 4 +++- .../theme/raw/templates/view/editlayout.tpl | 4 +++- .../templates/view/editviewpageactions.tpl | 24 +++++++++++++++++++ .../theme/raw/templates/view/editviewtabs.tpl | 20 ---------------- htdocs/theme/raw/templates/view/layout.tpl | 4 +++- htdocs/view/blocks.php | 2 +- 15 files changed, 64 insertions(+), 66 deletions(-) create mode 100644 htdocs/theme/raw/templates/view/editviewpageactions.tpl diff --git a/htdocs/js/views.js b/htdocs/js/views.js index f3dca5d12a..d9bb411624 100644 --- a/htdocs/js/views.js +++ b/htdocs/js/views.js @@ -448,7 +448,7 @@ helper: function(event) { var original = $(this), helper = $("
").append(original.clone()); - + helper.find('label span').removeClass('hidden'); helper.children().each(function(index) { // Set helper cell sizes to match at least the original sizes $(this).css('min-width', '200px'); diff --git a/htdocs/theme/raw/plugintype/blocktype/placeholder/templates/body.tpl b/htdocs/theme/raw/plugintype/blocktype/placeholder/templates/body.tpl index e1b666c197..39a1b55c66 100644 --- a/htdocs/theme/raw/plugintype/blocktype/placeholder/templates/body.tpl +++ b/htdocs/theme/raw/plugintype/blocktype/placeholder/templates/body.tpl @@ -1 +1 @@ -

{str tag=placeholdertext section=blocktype.placeholder}

\ No newline at end of file +

{str tag=placeholdertext section=blocktype.placeholder}

\ No newline at end of file diff --git a/htdocs/theme/raw/sass/components/_btn.scss b/htdocs/theme/raw/sass/components/_btn.scss index cd4ef1483f..36a8f11e00 100644 --- a/htdocs/theme/raw/sass/components/_btn.scss +++ b/htdocs/theme/raw/sass/components/_btn.scss @@ -296,23 +296,20 @@ td.action-list-copy { } .title { white-space: normal; - margin-left: 5px; - display: inline-block; + display: none; + @include media-breakpoint-up(lg) { + display: inline-block; + margin-left: 5px; + } } .block-icon { display: inline-block; - vertical-align: top; - margin-top: 5px; - margin-left: -2px; - font-size: 14px; - .col-collapsed & { - margin-left: 2px; - font-size: 18px; + @include media-breakpoint-up(lg) { + display: none; } } &.btn-accordion { .btn { - font-size: 13px; margin-bottom: -1px; max-width: 100%; overflow: hidden; @@ -338,11 +335,10 @@ td.action-list-copy { white-space: normal; vertical-align: middle; padding: 0; - padding-right: 5px; - padding-top: 3px; width: auto; max-width: 85%; margin-left: 2px; + margin-bottom: 0; } } //page builder collapsible diff --git a/htdocs/theme/raw/sass/layout/_col-collapse.scss b/htdocs/theme/raw/sass/layout/_col-collapse.scss index a53f5dcbd7..88a691cf17 100644 --- a/htdocs/theme/raw/sass/layout/_col-collapse.scss +++ b/htdocs/theme/raw/sass/layout/_col-collapse.scss @@ -19,13 +19,8 @@ } .col-with-collapse { - @extend .col-lg-10; - @extend .col-sm-9; - - .col-collapsed & { - @extend .col-lg-11; - @extend .col-sm-10; - } + @extend .col-lg-11; + @extend .col-sm-10; } .col-collapse-offset { diff --git a/htdocs/theme/raw/sass/layout/_layout.scss b/htdocs/theme/raw/sass/layout/_layout.scss index 9bb3151a25..fec8f44dfe 100644 --- a/htdocs/theme/raw/sass/layout/_layout.scss +++ b/htdocs/theme/raw/sass/layout/_layout.scss @@ -191,6 +191,9 @@ body.presentation-iframe { right: -1px; margin-top: 30px; z-index: $zindex-fixed; + .btn.first-of-group { + border-top-left-radius: $border-radius; + } } } diff --git a/htdocs/theme/raw/templates/view/accessurl.tpl b/htdocs/theme/raw/templates/view/accessurl.tpl index 20380268cd..4de29a6e46 100644 --- a/htdocs/theme/raw/templates/view/accessurl.tpl +++ b/htdocs/theme/raw/templates/view/accessurl.tpl @@ -1,6 +1,8 @@ {include file="header.tpl"} -{include file="view/editviewtabs.tpl" selected='share' issiteview=$issiteview} +{include file="view/editviewtabs.tpl" issiteview=$issiteview} + +{include file="view/editviewpageactions.tpl" selected='share'}
diff --git a/htdocs/theme/raw/templates/view/blocks.tpl b/htdocs/theme/raw/templates/view/blocks.tpl index 67e7d52944..088dabb036 100644 --- a/htdocs/theme/raw/templates/view/blocks.tpl +++ b/htdocs/theme/raw/templates/view/blocks.tpl @@ -1,6 +1,6 @@ {include file="header.tpl"} -{include file="view/editviewtabs.tpl" selected='content' issiteview=$issiteview} +{include file="view/editviewtabs.tpl" issiteview=$issiteview}
@@ -9,11 +9,6 @@ -
-
- {include file="view/contenteditor.tpl" selected='content'} -
-
{if $instructions}
@@ -37,6 +32,7 @@
{/if}
+ {include file="view/editviewpageactions.tpl" selected='content' ineditor=true}
@@ -47,7 +43,7 @@ -
+
{$columns|safe} @@ -56,7 +52,7 @@
-
+
{if !$issitetemplate} {str tag=displayview section=view} diff --git a/htdocs/theme/raw/templates/view/blocktypelist.tpl b/htdocs/theme/raw/templates/view/blocktypelist.tpl index 06343d6bee..2230ee233b 100644 --- a/htdocs/theme/raw/templates/view/blocktypelist.tpl +++ b/htdocs/theme/raw/templates/view/blocktypelist.tpl @@ -2,19 +2,15 @@ {if $javascript} diff --git a/htdocs/theme/raw/templates/view/contenteditor.tpl b/htdocs/theme/raw/templates/view/contenteditor.tpl index 4dee6c57e1..87cecf63cf 100644 --- a/htdocs/theme/raw/templates/view/contenteditor.tpl +++ b/htdocs/theme/raw/templates/view/contenteditor.tpl @@ -2,7 +2,7 @@
{str tag=addcontent section=view}
-
+
{$placeholder_button|safe}
diff --git a/htdocs/theme/raw/templates/view/edit.tpl b/htdocs/theme/raw/templates/view/edit.tpl index c594430c21..995de12d35 100644 --- a/htdocs/theme/raw/templates/view/edit.tpl +++ b/htdocs/theme/raw/templates/view/edit.tpl @@ -1,6 +1,8 @@ {include file="header.tpl"} -{include file="view/editviewtabs.tpl" selected='title' issiteview=$issiteview} +{include file="view/editviewtabs.tpl" issiteview=$issiteview} + +{include file="view/editviewpageactions.tpl" selected='title'} {if $ADMIN || $INSTITUTIONALADMIN}
diff --git a/htdocs/theme/raw/templates/view/editlayout.tpl b/htdocs/theme/raw/templates/view/editlayout.tpl index 73ded0859e..6a95c536f5 100644 --- a/htdocs/theme/raw/templates/view/editlayout.tpl +++ b/htdocs/theme/raw/templates/view/editlayout.tpl @@ -1,6 +1,8 @@ {include file="header.tpl"} -{include file="view/editviewtabs.tpl" selected='editlayout' issiteview=$issiteview} +{include file="view/editviewtabs.tpl"issiteview=$issiteview} + +{include file="view/editviewpageactions.tpl" selected='editlayout'} {$form|safe} diff --git a/htdocs/theme/raw/templates/view/editviewpageactions.tpl b/htdocs/theme/raw/templates/view/editviewpageactions.tpl new file mode 100644 index 0000000000..20c45c4f15 --- /dev/null +++ b/htdocs/theme/raw/templates/view/editviewpageactions.tpl @@ -0,0 +1,24 @@ +
+
+ {if $ineditor} + {include file="view/contenteditor.tpl" selected='content'} +   + {/if} + + + {if ($edittitle || $canuseskins) }{str tag=settings section=view}{else}{str tag=editlayout section=view}{/if} + + + + {str tag=editcontent1 section=view} + + {if !$accesssuspended && ($edittitle || $viewtype == 'share') && !$issitetemplate} + + + {str tag=shareview1 section=view} + + {/if} +
+
\ No newline at end of file diff --git a/htdocs/theme/raw/templates/view/editviewtabs.tpl b/htdocs/theme/raw/templates/view/editviewtabs.tpl index 78c008bb9b..6df38d7f8b 100644 --- a/htdocs/theme/raw/templates/view/editviewtabs.tpl +++ b/htdocs/theme/raw/templates/view/editviewtabs.tpl @@ -1,23 +1,3 @@ - - {if !$issitetemplate}