Commit a56663b1 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Swapped order of edit and delete buttons on iframe - Bug #1543340"

parents bb752879 8e134bb9
......@@ -95,7 +95,7 @@ foreach ($iframesources as $url => $name) {
'name' => 'deleteurl_' . $i,
'successcallback' => 'deleteurl_submit',
'renderer' => 'div',
'class' => 'form-inline form-as-button pull-left',
'class' => 'form-inline form-as-button pull-right btn-group',
'elements' => array(
'submit' => array(
'type' => 'button',
......@@ -252,6 +252,9 @@ $js = <<<EOF
jQuery(function($) {
$('.url-open-editform').click(function(e) {
e.preventDefault();
$('#' + this.id).addClass('collapse-indicator');
$('#' + this.id).toggleClass('open');
$('#' + this.id).toggleClass('closed');
$('#' + this.id + '-form').toggleClass('js-hidden');
});
});
......
......@@ -363,18 +363,28 @@
padding-left: 10px;
}
.secreturls.table .list-group {
.btn-group.btn-group-top {
margin-top: -8px;
}
.secreturls .list-group-item,
.iframesources .buttonscell {
.collapse-indicator.open .icon-chevron-down {
transform: rotate(-180deg);
transition-duration: 0.3s;
padding: 0 5px 0 0;
}
.collapse-indicator.closed .icon-chevron-down {
transform: rotate(0deg);
transition-duration: 0.3s;
}
}
.secreturls .list-group-item {
.btn-group.btn-group-top {
margin-top: -10px;
}
.collapse-indicator.open .icon-chevron-down {
padding: 0 5px 0 0;
}
.collapse-indicator.closed .icon-chevron-down {
padding: 0 0 0 5px;
}
}
.iframesources .buttonscell a {
font-size: 12px;
}
......@@ -20,12 +20,13 @@
<td>{$item.url}</td>
<td class="buttonscell">
<div class="btn-group">
{$item.deleteform|safe}
<a id="edit-{$item.id}" class="url-open-editform btn btn-default btn-sm pull-left left" title="{str tag=edit}" href="">
<a id="edit-{$item.id}" class="url-open-editform btn btn-default btn-sm pull-left closed" title="{str tag=edit}" href="">
<span class="icon icon-pencil" role="presentation" aria-hidden="true"></span>
<span class="icon icon-chevron-down icon-sm" role="presentation" aria-hidden="true"></span>
<span class="sr-only">{str(tag=editspecific arg1=$item.name)|escape:html|safe}</span>
</a>
{$item.deleteform|safe}
</div>
</td>
......
......@@ -17,38 +17,31 @@
{if $editurls}
<div class="panel panel-default">
<table class="secreturls table">
<tbody>
<h2 class="panel-heading">
{str tag=secreturls section=view}
</h2>
<div class="secreturls list-group">
{foreach from=$editurls item=item name=urls}
<tr class="{cycle values='r0,r1' advance=false} list-group">
<td>
<strong>{$item.url}</strong>
</td>
<td>
<div class="btn-top-right btn-group btn-group-top">
<a id="copytoclipboard-{$item.id}" data-clipboard-text="{$item.url}" class="url-copytoclipboardbutton btn btn-default btn-xs" title="{str tag=copytoclipboard}" href="#">
<span class="icon icon-files-o icon-lg" role="presentation" aria-hidden="true"></span>
<span class="sr-only">{str tag=copytoclipboard}</span>
</a>
<a id="edit-{$item.id}" class="url-open-editform nojs-hidden-inline btn btn-default btn-xs closed" title="{str tag=edit}" href="">
<span class="icon icon-pencil icon-lg" role="presentation" aria-hidden="true"></span>
<span class="icon icon-chevron-down right" role="presentation" aria-hidden="true"></span>
<span class="sr-only">{str tag=edit}</span>
</a>
{$item.deleteform|safe}
</div>
</td>
</tr>
<tr class="editrow {cycle} url-editform js-hidden" id="edit-{$item.id}-form">
<td colspan=3>
{$item.editform|safe}
</td>
</tr>
<div class="{cycle values='r0,r1' advance=false} list-group-item">
<strong>{$item.url}</strong>
<div class="btn-top-right btn-group btn-group-top">
<a id="copytoclipboard-{$item.id}" data-clipboard-text="{$item.url}" class="url-copytoclipboardbutton btn btn-default btn-xs" title="{str tag=copytoclipboard}" href="#">
<span class="icon icon-files-o icon-lg" role="presentation" aria-hidden="true"></span>
<span class="sr-only">{str tag=copytoclipboard}</span>
</a>
<a id="edit-{$item.id}" class="url-open-editform nojs-hidden-inline btn btn-default btn-xs closed" title="{str tag=edit}" href="">
<span class="icon icon-pencil icon-lg" role="presentation" aria-hidden="true"></span>
<span class="icon icon-chevron-down right" role="presentation" aria-hidden="true"></span>
<span class="sr-only">{str tag=edit}</span>
</a>
{$item.deleteform|safe}
</div>
</div>
<div class="editrow {cycle} url-editform js-hidden list-group-item" id="edit-{$item.id}-form">
{$item.editform|safe}
</div>
{/foreach}
</tbody>
</table>
</div>
</div>
{/if}
</div>
......
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