Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ntd committed Aug 19, 2016
2 parents c1f32b8 + 05d5d89 commit 0cd97fb
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
9 changes: 9 additions & 0 deletions js/silverstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ $(document).ready(function () {
}
});

// Set hidden input of SilverstrapSelectionGroup
$subject = $('ul.silverstrapselectiongroup.nav a');
$subject.on('click', function () {
var href = $(this).attr('href'),
pivot = href.lastIndexOf('-'),
name = href.substr(1, pivot - 1);
$('input[type="hidden"][name="' + name + '"]').val($(this).data('value'));
});

// Enable colorbox support on Fotorama frames
if ($.isFunction($.colorbox) && $.isFunction($.Fotorama)) {
var transition;
Expand Down
2 changes: 1 addition & 1 deletion templates/forms/CompositeField.ss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<$Tag class="$extraClass"><% if $Tag == 'fieldset' && $Legend %>
<$Tag $AttributesHTML><% if $Tag == 'fieldset' && $Legend %>
<legend>$Legend</legend><% end_if %><% loop $FieldList %><% if $ColumnCount %>
<div class="column-{$ColumnCount} $FirstLast">
$Field
Expand Down
2 changes: 1 addition & 1 deletion templates/forms/CompositeField_holder.ss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<$Tag class="$extraClass<% if ColumnCount %> multicolumn<% end_if %>"><% if $Tag == 'fieldset' && $Legend %>
<$Tag $getAttributesHTML('class') class="$extraClass<% if $ColumnCount %> multicolumn<% end_if %>"><% if $Tag == 'fieldset' && $Legend %>
<legend>$Legend</legend><% end_if %><% loop $FieldList %><% if $ColumnCount %>
<div class="column-{$ColumnCount} $FirstLast">
$FieldHolder
Expand Down
11 changes: 11 additions & 0 deletions templates/forms/SelectionGroup.ss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<input type="hidden" name="$Name.ATT" value="$Value.ATT">
<ul class="nav nav-pills<% if extraClass %> $extraClass<% end_if %>"><% loop $FieldSet %>
<li role="presentation"<% if $Selected || $Up.IsReadonly %> class="<% if $Selected %>active<% end_if %> <% if $Up.IsReadOnly %>disabled<% end_if %>"<% end_if %>>
<a href="#$Up.Name.ATT-$Pos" aria-controls="$Up.Name.ATT-$Pos" role="tab" data-toggle="tab" data-value="$value.ATT">$Title</a>
</li><% end_loop %>
</ul>
<div class="tab-content"><% loop $FieldSet %>
<div id="$Up.Name.ATT-$Pos" role="tab-panel" class="tab-pane fade<% if $Selected %> in active<% end_if %>"><% if $FieldList %>
$FieldHolder<% end_if %>
</div><% end_loop %>
</div>

0 comments on commit 0cd97fb

Please sign in to comment.