Commit 91927381 authored by Pat Kira's avatar Pat Kira Committed by Aaron Wells

Attachment panel (bootstrap)

Bug 1465107: Use Bootstrap CSS Framework

Change-Id: I9b6202468045ea1d3508e90f8cfbc9a195b1d37b
parent 94f02000
// Should we delete this? We have changed the mark up to use
// bootstrap carousel classes
function Slideshow(id, count) {
var self = this;
this.id = '#slideshow' + id;
......
......@@ -384,7 +384,7 @@ EOF;
),
'managenotes' => array(
'type' => 'html',
'class' => 'right hidden',
'class' => 'text-right hidden',
'value' => '<a href="' . $manageurl . '" target="_blank">'
. get_string('managealltextboxcontent1', 'blocktype.internal/textbox') . ' &raquo;</a>',
),
......
......@@ -289,6 +289,7 @@ function renderpost($post, $indent, $mode) {
),
'details' => array(
'type' => 'fieldset',
'class' => 'last',
'collapsible' => true,
'collapsed' => true,
'legend' => get_string('reporteddetails', 'interaction.forum'),
......
......@@ -166,11 +166,10 @@ if (ul) {
// Hide the search form
connect(a, 'onclick', function(e) {
hideElement('artefactchooser-searchform');
removeElementClass(searchA.parentNode, 'current');
removeElementClass(searchA.parentNode, 'active');
jQuery(browseA).find('.accessible-hidden').html('(' + get_string_ajax('tab', 'mahara') + ' ' + get_string_ajax('selected', 'mahara') + ')');
jQuery(searchA).find('.accessible-hidden').html('(' + get_string_ajax('tab', 'mahara') + ')');
addElementClass(browseA.parentNode, 'current');
addElementClass(browseA.parentNode, 'active');
browseA.blur();
$('artefactchooser-searchfield').value = ''; // forget the search for now, easier than making the tabs remember it
if (!browseTabCurrent) {
......@@ -186,10 +185,10 @@ if (ul) {
// Display the search form
connect(a, 'onclick', function(e) {
showElement('artefactchooser-searchform');
removeElementClass(browseA.parentNode, 'current');
removeElementClass(browseA.parentNode, 'active');
jQuery(searchA).find('.accessible-hidden').html('(' + get_string_ajax('tab', 'mahara') + ' ' + get_string_ajax('selected', 'mahara') + ')');
jQuery(browseA).find('.accessible-hidden').html('(' + get_string_ajax('tab', 'mahara') + ')');
addElementClass(searchA.parentNode, 'current');
addElementClass(searchA.parentNode, 'active');
connect('artefactchooser-searchfield', 'onkeypress', function(e) {
if (e.key().code == 13) { // enter pressed - submitting form
......
<div class="checkbox fullwidth">
{$formcontrols|safe}
<label for="{$elementname}_{$artefact->id}">{$artefact->title}{if $artefact->draft} [{str tag=draft section=artefact.blog}]{/if}
<span class="metadata">({if $artefact->blog}{$artefact->blog}{/if})</span>
<span class="metadata">{if $artefact->blog}({$artefact->blog}){/if}</span>
</label>
{if $artefact->description}
<div class="text-small with-label">{$artefact->description|clean_html|safe}</div>
......
......@@ -60,16 +60,18 @@
</p>
{if $post->files}
<div class="panel panel-default mbm" id="postfiles_{$post->id}">
<a class="panel-heading collapsible collapsed" data-toggle="collapse" href="#attach_{$post->id}" aria-expanded="false">
<span class="fa fa-lg prm fa-paperclip"></span>
<span class="text-small"> {str tag=attachedfiles section=artefact.blog} </span>
<span class="metadata">
({$post->files|count})
</span>
<span class="fa fa-chevron-down collapse-indicator pull-right"></span>
</a>
<div class="has-attachment panel panel-default collapsible mbm" id="postfiles_{$post->id}">
<h5 class="panel-heading">
<a class="text-left pts pbm collapsed" data-toggle="collapse" href="#attach_{$post->id}" aria-expanded="false">
<span class="fa fa-lg prm fa-paperclip"></span>
<span class="text-small"> {str tag=attachedfiles section=artefact.blog} </span>
<span class="metadata">
({$post->files|count})
</span>
<span class="pts fa fa-chevron-down collapse-indicator pull-right"></span>
</a>
</h5>
<div class="collapse" id="attach_{$post->id}">
<ul class="list-group list-unstyled mb0">
{foreach from=$post->files item=file}
......
......@@ -18,7 +18,7 @@
{/if}
{if isset($attachments)}
<div class="has-attachment in-panel panel panel-default collapsible last">
<div class="has-attachment panel panel-default collapsible">
<h4 class="panel-heading">
<a class="text-left pts pbm collapsed" aria-expanded="false" href="#blog-attach-{$postid}" data-toggle="collapse">
<span class="fa prm fa-paperclip"></span>
......
{foreach from=$posts item=post}
<div class="post">
<div class="post ptm pbm">
<h4 class="title">
<a href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$options.viewid}">{$post->title}</a>
</h4>
<div class="postdetails metadata pbs">{$post->postedby}</div>
<div>{$post->description|clean_html|safe}
<div class="postdetails metadata">
<span class="fa fa-calendar mrs"></span>
{$post->postedby}
</div>
{if $post->tags}
<div class="tags">{str tag=tags}: {list_tags owner=$post->owner tags=$post->tags}</div>
{/if}</div>
<div class="tags metadata">
<span class="fa fa-tags"></span>
<strong>{str tag=tags}:</strong>
{list_tags owner=$post->owner tags=$post->tags}
</div>
{/if}
<div class="mtl mbl">{$post->description|clean_html|safe}
</div>
{if $post->files}
<div class="has-attachment in-panel panel panel-default collapsible last">
<div class="has-attachment panel panel-default collapsible" id="postfiles_{$post->id}">
<h5 class="panel-heading">
<a class="text-left pts pbm collapsed" aria-expanded="false" href="#blog-post-attach-{$post->id}" data-toggle="collapse">
<span class="fa prm fa-paperclip"></span>
<a href="#blogpost-attach-{$post->id}" class="text-left pts pbm collapsed" aria-expanded="false" data-toggle="collapse">
<span class="fa fa-paperclip prm"></span>
<span class="text-small">{str tag=attachedfiles section=artefact.blog}</span>
<span class="metadata">({$post->files|count})</span>
......@@ -23,8 +31,7 @@
</a>
</h5>
<div id="blog-post-attach-{$post->id}" class="collapse">
<div id="blogpost-attach-{$post->id}" class="collapse">
<ul class="list-unstyled list-group">
{foreach from=$post->files item=file}
<li class="list-group-item-text list-group-item-link">
......
......@@ -10,7 +10,7 @@
{if isset($attachments)}
<!-- to do: this could probably be a reusable template -->
<div class="has-attachment in-panel panel panel-default collapsible last">
<div class="has-attachment panel panel-default collapsible">
<h4 class="panel-heading">
<a class="text-left pts pbm collapsed" aria-expanded="false" href="#note-attach-{$blockid}" data-toggle="collapse">
<span class="fa prm fa-paperclip"></span>
......
<div class="list-group-item">
<div>
{$formcontrols|safe}
<label for="{$elementname}_{$artefact->id}">
{$artefact->title|str_shorten_text:60:true}
......
......@@ -33,7 +33,7 @@
</div>
{if $n->files}
<div id="resume_{$n->id}" class="has-attachment">
<a class="collapsible collapsed in-panel panel-footer" aria-expanded="false" href="#attach_goal_{$.foreach.default.index}" data-toggle="collapse">
<a class="collapsible collapsed panel-footer" aria-expanded="false" href="#attach_goal_{$.foreach.default.index}" data-toggle="collapse">
<p class="text-left mbs">
<span class="fa fa-lg prm fa-paperclip"></span>
......
{$description|clean_html|safe}
{if isset($attachments)}
<div class="has-attachment in-panel panel panel-default collapsible last">
<div class="has-attachment panel panel-default collapsible">
<h4 class="panel-heading">
<a class="text-left pts pbm collapsed" aria-expanded="false" href="#cv-attach-{$id}" data-toggle="collapse">
<span class="fa prm fa-paperclip"></span>
......
......@@ -35,7 +35,7 @@
{/if}
{if $n->files}
<div id="resume_{$n->id}" class="has-attachment">
<a class="panel-footer in-panel collapsed" aria-expanded="false" href="#attach_skill_{$n->id}" data-toggle="collapse">
<a class="panel-footer collapsed" aria-expanded="false" href="#attach_skill_{$n->id}" data-toggle="collapse">
<p class="text-left mbs">
<span class="fa fa-lg prm fa-paperclip"></span>
......
<div class="googleapps-container center"><div class="googleapps">
<iframe width="100%" height="{$height}" frameborder="0" src="{$url}"></iframe>
</div></div>
<div class="googleapps-container text-center">
<div class="googleapps">
<iframe width="100%" height="{$height}" frameborder="0" src="{$url}"></iframe>
</div>
</div>
{include file="header.tpl"}
{if $membership}
<div id="forumbtns" class="btn-top-right btn-group btn-group-top">
{if !$topic->forumsubscribed}
......@@ -7,7 +6,7 @@
{/if}
{if $topic->canedit}
<a href="{$WWWROOT}interaction/forum/edittopic.php?id={$topic->id}" class="btn btn-default editforum">
<span class="fa fa-pencil"></span>
<span class="fa fa-pencil fa-lg prs"></span>
{str tag=edittopic section=interaction.forum}
</a>
{if $moderator}
......@@ -21,7 +20,6 @@
</div>
{/if}
<h2 class="ptxl pbm">
<span class="lead text-small mbs inline ptl">
<a href="{$WWWROOT}interaction/forum/view.php?id={$topic->forumid}">
......@@ -31,9 +29,13 @@
<br />
{$topic->subject}
</h2>
<hr class="mbxl" />
<h2>
{str tag=nameplural section=interaction.forum} &gt;
<a href="{$WWWROOT}interaction/forum/view.php?id={$topic->forumid}">
{$topic->forumtitle}
</a>
</h2>
{if $topic->closed}
<div class="message closed">
{str tag=topicisclosed section=interaction.forum}
......
......@@ -58,7 +58,7 @@
&.has-attachment .panel-heading,
.collapsible-group & .panel-heading,
legend h4,
legend h3 {
legend h3 {
margin: 0;
font-size: 16px;
padding: 0;
......@@ -96,13 +96,23 @@
// @todo: Rethink this, it's too complex
// What is in-panel?
.panel.collapsible:not(.panel-secondary):not(.in-panel) {
.panel.collapsible:not(.panel-secondary) {
border-width: 0;
// Remove border from heading - add to link tag.
// In this case we have a nested a tag that takes up the whole of the heading space
// rather than applying the panel-header to the link
// For attachment collapsible
&.has-attachment {
@include border-radius(3px);
border-width: 1px;
.panel-heading a {
border-width: 0;
&:not(.collapsed) {
border-bottom-width: 1px;
}
}
}
// Remove border from heading - add to link tag.
// In this case we have a nested a tag that takes up the whole of the heading space
// rather than applying the panel-header to the link
.panel-heading {
border: 0;
a {
......@@ -121,11 +131,14 @@
.panel-heading a {
border: 1px solid $panel-default-border;
}
.panel-heading a,
.panel-body:not(.no-footer) {
border-bottom-width:0;
}
// last class will add bottom border to collapsible element(s)
// Except has-attachment, it doesn't need one.
&.last .panel-heading a.collapsed {
border-bottom-width: 1px;
}
......
{if $searchable}<ul class="artefactchooser-tabs">
<li{if !$.request.s} class="current"{/if}><a href="{$browseurl}">{str tag=Browse section=view}</a></li>
<li{if $.request.s} class="current"{/if}><a href="{$searchurl}">{str tag=Search section=view}</a></li>
{if $searchable}
<ul class="artefactchooser-tabs nav nav-tabs">
<li{if !$.request.s} class="current active"{/if}><a href="{$browseurl}">{str tag=Browse section=view}</a></li>
<li{if $.request.s} class="current active"{/if}><a href="{$searchurl}">{str tag=Search section=view}</a></li>
</ul>{/if}
<div id="artefactchooser-body">
<div class="cb artefactchooser-splitter">
<div id="artefactchooser-searchform" class="form-group {if !$.request.s} hidden{/if}"> {* Use a smarty var, not smarty.request *}
<div id="artefactchooser-searchform" class="form-group" {if !$.request.s} class="hidden"{/if}> {* Use a smarty var, not smarty.request *}
<label for="artefactchooser-searchfield">{str tag=search section=mahara}</label>
<input type="text" class="text" id="artefactchooser-searchfield" name="search" value="{$.request.search}" tabindex="42">
<input type="hidden" name="s" value="1">
......@@ -18,4 +19,4 @@
</div>
{$pagination|safe}
</div>
</div>
</div>
\ No newline at end of file
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