Commit 51af094b authored by Robert Lyon's avatar Robert Lyon

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's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 4d9a5645
...@@ -448,7 +448,7 @@ ...@@ -448,7 +448,7 @@
helper: function(event) { helper: function(event) {
var original = $(this), var original = $(this),
helper = $("<div />").append(original.clone()); helper = $("<div />").append(original.clone());
helper.find('label span').removeClass('hidden');
helper.children().each(function(index) { helper.children().each(function(index) {
// Set helper cell sizes to match at least the original sizes // Set helper cell sizes to match at least the original sizes
$(this).css('min-width', '200px'); $(this).css('min-width', '200px');
......
<p class="content-text lead text-center">{str tag=placeholdertext section=blocktype.placeholder}</p> <p class="content-text lead">{str tag=placeholdertext section=blocktype.placeholder}</p>
\ No newline at end of file \ No newline at end of file
...@@ -296,23 +296,20 @@ td.action-list-copy { ...@@ -296,23 +296,20 @@ td.action-list-copy {
} }
.title { .title {
white-space: normal; white-space: normal;
margin-left: 5px; display: none;
display: inline-block; @include media-breakpoint-up(lg) {
display: inline-block;
margin-left: 5px;
}
} }
.block-icon { .block-icon {
display: inline-block; display: inline-block;
vertical-align: top; @include media-breakpoint-up(lg) {
margin-top: 5px; display: none;
margin-left: -2px;
font-size: 14px;
.col-collapsed & {
margin-left: 2px;
font-size: 18px;
} }
} }
&.btn-accordion { &.btn-accordion {
.btn { .btn {
font-size: 13px;
margin-bottom: -1px; margin-bottom: -1px;
max-width: 100%; max-width: 100%;
overflow: hidden; overflow: hidden;
...@@ -338,11 +335,10 @@ td.action-list-copy { ...@@ -338,11 +335,10 @@ td.action-list-copy {
white-space: normal; white-space: normal;
vertical-align: middle; vertical-align: middle;
padding: 0; padding: 0;
padding-right: 5px;
padding-top: 3px;
width: auto; width: auto;
max-width: 85%; max-width: 85%;
margin-left: 2px; margin-left: 2px;
margin-bottom: 0;
} }
} }
//page builder collapsible //page builder collapsible
......
...@@ -19,13 +19,8 @@ ...@@ -19,13 +19,8 @@
} }
.col-with-collapse { .col-with-collapse {
@extend .col-lg-10; @extend .col-lg-11;
@extend .col-sm-9; @extend .col-sm-10;
.col-collapsed & {
@extend .col-lg-11;
@extend .col-sm-10;
}
} }
.col-collapse-offset { .col-collapse-offset {
......
...@@ -191,6 +191,9 @@ body.presentation-iframe { ...@@ -191,6 +191,9 @@ body.presentation-iframe {
right: -1px; right: -1px;
margin-top: 30px; margin-top: 30px;
z-index: $zindex-fixed; z-index: $zindex-fixed;
.btn.first-of-group {
border-top-left-radius: $border-radius;
}
} }
} }
......
{include file="header.tpl"} {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'}
<div id="accessurl-container"> <div id="accessurl-container">
......
{include file="header.tpl"} {include file="header.tpl"}
{include file="view/editviewtabs.tpl" selected='content' issiteview=$issiteview} {include file="view/editviewtabs.tpl" issiteview=$issiteview}
<div class="view-instructions"> <div class="view-instructions">
<form action="{$formurl}" method="post" class="row"> <form action="{$formurl}" method="post" class="row">
<input type="submit" name="{$action_name}" id="action-dummy" class="d-none"> <input type="submit" name="{$action_name}" id="action-dummy" class="d-none">
...@@ -9,11 +9,6 @@ ...@@ -9,11 +9,6 @@
<input type="hidden" id="category" name="c" value="{$category}"> <input type="hidden" id="category" name="c" value="{$category}">
<input type="hidden" name="sesskey" value="{$SESSKEY}"> <input type="hidden" name="sesskey" value="{$SESSKEY}">
<div id="editcontent-sidebar-wrapper">
<div id="editcontent-sidebar">
{include file="view/contenteditor.tpl" selected='content'}
</div>
</div>
<div class="col-with-collapse"> <div class="col-with-collapse">
{if $instructions} {if $instructions}
<div id="viewinstructions" class="last form-group collapsible-group small-group"> <div id="viewinstructions" class="last form-group collapsible-group small-group">
...@@ -37,6 +32,7 @@ ...@@ -37,6 +32,7 @@
</div> </div>
{/if} {/if}
</div> </div>
{include file="view/editviewpageactions.tpl" selected='content' ineditor=true}
</form> </form>
</div> </div>
<div class="view-container" selected='content'> <div class="view-container" selected='content'>
...@@ -47,7 +43,7 @@ ...@@ -47,7 +43,7 @@
<input type="hidden" id="category" name="c" value="{$category}"> <input type="hidden" id="category" name="c" value="{$category}">
<input type="hidden" name="sesskey" value="{$SESSKEY}"> <input type="hidden" name="sesskey" value="{$SESSKEY}">
<div class="fullwidth"> <div class="col">
<div id="bottom-pane" data-role="workspace"> <div id="bottom-pane" data-role="workspace">
<div id="column-container" class="user-page-content"> <div id="column-container" class="user-page-content">
{$columns|safe} {$columns|safe}
...@@ -56,7 +52,7 @@ ...@@ -56,7 +52,7 @@
</div> </div>
</form> </form>
<div id="view-return-controls" class="col-collapse-offset col-with-collapse"> <div id="view-return-controls">
{if !$issitetemplate} {if !$issitetemplate}
<a class="btn btn-secondary" href="{$displaylink}"> <a class="btn btn-secondary" href="{$displaylink}">
{str tag=displayview section=view} {str tag=displayview section=view}
......
...@@ -2,19 +2,15 @@ ...@@ -2,19 +2,15 @@
{if $javascript} {if $javascript}
<div class='btn-group-vertical'> <div class='btn-group-vertical'>
{/if} {/if}
{foreach from=$blocktypes item=blocktype} {foreach from=$blocktypes item=blocktype}{strip}
{* TODO at this point we have now $blocktype.singleonly *} <a class="blocktype-drag blocktypelink btn btn-primary hide-title-collapsed text-left" href="#" title="{$blocktype.title}">
<a class="blocktype-drag blocktypelink btn btn-secondary hide-title-collapsed text-left" href="#" title="{$blocktype.description}">
<span class="icon icon-arrows-alt icon-sm left move-indicator" role="presentation" aria-hidden="true"></span>
<input type="radio" id="blocktype-list-radio-{$blocktype.name}" class="blocktype-radio" name="blocktype" value="{$blocktype.name}"> <input type="radio" id="blocktype-list-radio-{$blocktype.name}" class="blocktype-radio" name="blocktype" value="{$blocktype.name}">
{if $blocktype.cssicon}{* <span class="icon icon-{$blocktype.cssicon} {$blocktype.cssicontype} icon-lg" title="{$blocktype.title}" role="presentation" aria-hidden="true"></span>
*}<span class="icon icon-{$blocktype.cssicon} {$blocktype.cssicontype} block-icon" title="{$blocktype.title}" role="presentation" aria-hidden="true"></span>{* <label for="blocktype-list-radio-{$blocktype.name}" class="blocktypetitle title">
*}{else}{* <span class="hidden">{$blocktype.title}</span>
*}<img class="icon block-icon" src="{$blocktype.thumbnail_path}" title="{$blocktype.description}" alt="{$blocktype.description}" width="14" height="14">{* </label>
*}{/if}
<label for="blocktype-list-radio-{$blocktype.name}" class="blocktypetitle title">{$blocktype.title}</label>
<span class="sr-only">({$blocktype.description})</span> <span class="sr-only">({$blocktype.description})</span>
</a> </a>{/strip}
{/foreach} {/foreach}
{if $javascript} {if $javascript}
</div> </div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div id="content-editor-header" class="sr-only"> <div id="content-editor-header" class="sr-only">
<div>{str tag=addcontent section=view}</div> <div>{str tag=addcontent section=view}</div>
</div> </div>
<div id="content-editor-foldable" class="btn-group-vertical btn-accordion fullwidth"> <div id="content-editor-foldable" class="btn-accordion">
{$placeholder_button|safe} {$placeholder_button|safe}
</div> </div>
</div> </div>
{include file="header.tpl"} {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} {if $ADMIN || $INSTITUTIONALADMIN}
<div class="row"> <div class="row">
......
{include file="header.tpl"} {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'}
<!-- Layout --> <!-- Layout -->
{$form|safe} {$form|safe}
......
<div class="pageactions" id="toolbar-buttons">
<div class="btn-group-vertical in-editor">
{if $ineditor}
{include file="view/contenteditor.tpl" selected='content'}
<span>&nbsp;</span>
{/if}
<a class="btn btn-secondary first-of-group editviews editlayout {if $selected == 'layout' or $selected == 'editlayout'}active{/if}"
href="{$WWWROOT}view/editlayout.php?id={$viewid}"
title="{if $edittitle || $canuseskins}{str tag=settings section=view}{else}{str tag=editlayout section=view}{/if}">
<span class="icon icon-lg icon-cogs"></span>
<span class="btn-title sr-only">{if ($edittitle || $canuseskins) }{str tag=settings section=view}{else}{str tag=editlayout section=view}{/if}</span>
</a>
<a class="btn btn-secondary editviews editcontent {if $selected == 'content'}active{/if}" href="{$WWWROOT}view/blocks.php?id={$viewid}" title="{str tag=editcontent1 section=view}">
<span class="icon icon-lg icon-pencil-alt" aria-hidden="true" role="presentation"></span>
<span class="btn-title sr-only">{str tag=editcontent1 section=view}</span>
</a>
{if !$accesssuspended && ($edittitle || $viewtype == 'share') && !$issitetemplate}
<a class="btn btn-secondary editviews editshare {if $selected == 'share'}active{/if}" href="{$WWWROOT}view/accessurl.php?id={$viewid}{if $collectionid}&collection={$collectionid}{/if}" title="{str tag=shareview1 section=view}">
<span class="icon icon-lg icon-unlock" aria-hidden="true" role="presentation"></span>
<span class="btn-title sr-only">{str tag=shareview1 section=view}</span>
</a>
{/if}
</div>
</div>
\ No newline at end of file
<div id="toolbar-buttons" class="btn-group btn-toolbar btn-group-top">
<a class="btn btn-secondary editviews editlayout {if $selected == 'layout' or $selected == 'editlayout'}active{/if}"
href="{$WWWROOT}view/editlayout.php?id={$viewid}"
title="{if $edittitle || $canuseskins}{str tag=settings section=view}{else}{str tag=editlayout section=view}{/if}">
<span class="icon icon-lg icon-cogs"></span>
<span class="btn-title">{if ($edittitle || $canuseskins) }{str tag=settings section=view}{else}{str tag=editlayout section=view}{/if}</span>
</a>
<a class="btn btn-secondary editviews editcontent {if $selected == 'content'}active{/if}" href="{$WWWROOT}view/blocks.php?id={$viewid}" title="{str tag=editcontent1 section=view}">
<span class="icon icon-lg icon-pencil-alt" aria-hidden="true" role="presentation"></span>
<span class="btn-title">{str tag=editcontent1 section=view}</span>
</a>
{if !$accesssuspended && ($edittitle || $viewtype == 'share') && !$issitetemplate}
<a class="btn btn-secondary editviews editshare {if $selected == 'share'}active{/if}" href="{$WWWROOT}view/accessurl.php?id={$viewid}{if $collectionid}&collection={$collectionid}{/if}" title="{str tag=shareview1 section=view}">
<span class="icon icon-lg icon-unlock" aria-hidden="true" role="presentation"></span>
<span class="btn-title">{str tag=shareview1 section=view}</span>
</a>
{/if}
</div>
{if !$issitetemplate} {if !$issitetemplate}
<div id="view-wizard-controls" class="with-heading"> <div id="view-wizard-controls" class="with-heading">
<a href="{$displaylink}" id="display_page" class=""> <a href="{$displaylink}" id="display_page" class="">
......
{include file="header.tpl"} {include file="header.tpl"}
{include file="view/editviewtabs.tpl" selected='layout' issiteview=$issiteview} {include file="view/editviewtabs.tpl" issiteview=$issiteview}
{include file="view/editviewpageactions.tpl" selected='layout'}
{$form|safe} {$form|safe}
......
...@@ -201,7 +201,7 @@ $placeholderbutton = ''; ...@@ -201,7 +201,7 @@ $placeholderbutton = '';
if ($placeholderblock) { if ($placeholderblock) {
// it's active so make the button with different display title // it's active so make the button with different display title
$placeholderblock[0]['title'] = get_string('addnewblock', 'view'); $placeholderblock[0]['title'] = get_string('addnewblock', 'view');
$placeholderblock[0]['cssicon'] = '_'; $placeholderblock[0]['cssicon'] = 'plus';
$smarty = smarty_core(); $smarty = smarty_core();
$smarty->assign('blocktypes', $placeholderblock); $smarty->assign('blocktypes', $placeholderblock);
$smarty->assign('javascript', false); $smarty->assign('javascript', false);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment