-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
210 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,78 @@ | ||
$(document).ready(function() { | ||
var $subject; | ||
var silverstrap = { | ||
carousel: { | ||
interval: 8000 | ||
}, | ||
scrollspy: { | ||
target: '#ss-toc' | ||
}, | ||
affix: { | ||
offset: { | ||
top: $('#ss-toc').data('offset-top') || 72, | ||
bottom: $('#ss-toc').data('offset-bottom') || 350 | ||
} | ||
}, | ||
colorbox: { | ||
rel: 'group', | ||
maxWidth: '98%', | ||
maxHeight: '98%', | ||
photo: true | ||
}, | ||
fotorama: { | ||
nav: 'thumbs', | ||
click: ! $.isFunction($.colorbox), | ||
allowfullscreen: 'native', | ||
width: '100%' | ||
} | ||
}; | ||
|
||
// Enable colorbox support on Fotorama frames | ||
if ($.isFunction($.colorbox) && $.isFunction($.Fotorama)) { | ||
var transition; | ||
$(document).on('fotorama:show', function () { | ||
transition = true; | ||
}) | ||
.on('fotorama:showend', function () { | ||
transition = false; | ||
}) | ||
.on('fotorama:load', function (ev, fotorama, extra) { | ||
extra.frame['$stageFrame'].find('.fotorama__img').not('.fotorama__img--full') | ||
.css('cursor', 'zoom-in') | ||
.on('click', function () { | ||
if (transition) | ||
return; | ||
$.colorbox({ | ||
href: extra.frame.full, | ||
title: function () { | ||
return extra.frame.summary || extra.frame.caption; | ||
}, | ||
maxWidth: '98%', | ||
maxHeight: '98%', | ||
photo: true | ||
}); | ||
}); | ||
}); | ||
} | ||
$(document).ready(function () { | ||
var $subject; | ||
|
||
// Add ColorBox support for zooming images (silverstrap) | ||
$subject = $('.zoom'); | ||
if ($subject.length && $.isFunction($.colorbox)) { | ||
$subject.colorbox({ | ||
rel: 'group', | ||
maxWidth: '98%', | ||
maxHeight: '98%', | ||
photo: true | ||
}); | ||
} | ||
// Enable colorbox support on Fotorama frames | ||
if ($.isFunction($.colorbox) && $.isFunction($.Fotorama)) { | ||
var transition; | ||
$(document).on('fotorama:show', function () { | ||
transition = true; | ||
}) | ||
.on('fotorama:showend', function () { | ||
transition = false; | ||
}) | ||
.on('fotorama:load', function (ev, fotorama, extra) { | ||
extra.frame['$stageFrame'].find('.fotorama__img').not('.fotorama__img--full') | ||
.css('cursor', 'zoom-in') | ||
.on('click', function () { | ||
if (! transition) | ||
$.colorbox($.extend({ | ||
href: extra.frame.full, | ||
title: function () { | ||
return extra.frame.summary || extra.frame.caption; | ||
}}, silverstrap.colorbox)); | ||
}); | ||
}); | ||
} | ||
|
||
// Customize the behavior of the table of contents (silverstripe-autotoc) | ||
$subject = $('#ss-toc'); | ||
if ($subject.length && $.isFunction($.affix)) { | ||
$('body').scrollspy({ | ||
target: '#ss-toc' | ||
}); | ||
$subject.affix({ | ||
offset: { | ||
top: $subject.attr('data-offset-top') || 72, | ||
bottom: $subject.attr('data-offset-bottom') || 350 | ||
} | ||
}); | ||
} | ||
// Add ColorBox support for zooming images (silverstrap) | ||
$subject = $('.zoom'); | ||
if ($subject.length && $.isFunction($.colorbox)) { | ||
$subject.colorbox(silverstrap.colorbox); | ||
} | ||
|
||
// Enable the Bootstrap carousel (silverstripe-carousel) | ||
$subject = $('#ss-carousel'); | ||
if ($subject.length && $.isFunction($.carousel)) { | ||
$subject.carousel({ | ||
interval: 8000 | ||
}); | ||
} | ||
// Customize the behavior of the table of contents (silverstripe-autotoc) | ||
$subject = $('#ss-toc'); | ||
if ($subject.length && $.isFunction($.affix)) { | ||
$('body').scrollspy(silverstrap.scrollspy); | ||
$subject.affix(silverstrap.affix); | ||
} | ||
|
||
// Enable the Fotorama gallery (silverstripe-gallery) | ||
$subject = $('#ss-gallery'); | ||
if ($subject.length && $.isFunction($.Fotorama)) { | ||
$subject.fotorama({ | ||
// Enable the Bootstrap carousel (silverstripe-carousel) | ||
$subject = $('#ss-carousel'); | ||
if ($subject.length && $.isFunction($.carousel)) { | ||
$subject.carousel(silverstrap.carousel); | ||
} | ||
|
||
nav: 'thumbs', | ||
click: ! $.isFunction($.colorbox), | ||
allowfullscreen: 'native', | ||
width: '100%' | ||
}); | ||
} | ||
// Enable the Fotorama gallery (silverstripe-gallery) | ||
$subject = $('#ss-gallery'); | ||
if ($subject.length && $.isFunction($.Fotorama)) { | ||
$subject.fotorama(silverstrap.fotorama); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<input $getAttributesHTML(class)> | ||
<input $AttributesHTML<% if $isReadonly %> readonly<% else_if $isDisabled %> disabled<% end_if %>> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
<div class="form-group $HolderClasses<% if $Message %> has-error<% end_if %>"> | ||
<div class="col-sm-offset-3 col-sm-6"> | ||
<div class="checkbox"> | ||
<label> | ||
$Field | ||
$Title | ||
</label><% if $Message %> | ||
<p class="help-block">$Message</p><% end_if %> | ||
</div> | ||
</div> | ||
<div class="col-sm-offset-3 col-sm-6"> | ||
<div class="checkbox<% if $isReadonly || $isDisabled %> disabled<% end_if %>"> | ||
<label> | ||
$Field | ||
$Title | ||
</label><% if $Message %> | ||
<p class="help-block">$Message</p><% else_if $Description %> | ||
<p class="help-block">$Description</p><% end_if %> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<label class="checkbox-inline ss-without-label<% if $isReadonly || $isDisabled %> disabled<% end_if %>"> | ||
$Field | ||
$Title | ||
</label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<% loop $Options %><label class="checkbox-inline $Class"> | ||
<input type="checkbox"<% if $ID %> id="$ID"<% end_if %> name="$Name" value="$Value"<% if $isChecked %> checked<% end_if %><% if $isDisabled %> disabled<% end_if %>> | ||
$Title | ||
</label><% end_loop %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<$Tag class="$extraClass"><% if $Tag == 'fieldset' && $Legend %> | ||
<legend>$Legend</legend><% end_if %><% loop $FieldList %><% if $ColumnCount %> | ||
<div class="column-{$ColumnCount} $FirstLast"> | ||
$Field | ||
</div><% else %> | ||
$Field<% end_if %><% end_loop %> | ||
<legend>$Legend</legend><% end_if %><% loop $FieldList %><% if $ColumnCount %> | ||
<div class="column-{$ColumnCount} $FirstLast"> | ||
$Field | ||
</div><% else %> | ||
$Field<% end_if %><% end_loop %> | ||
</$Tag> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<$Tag 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 | ||
</div><% else %> | ||
$FieldHolder<% end_if %><% end_loop %> | ||
<legend>$Legend</legend><% end_if %><% loop $FieldList %><% if $ColumnCount %> | ||
<div class="column-{$ColumnCount} $FirstLast"> | ||
$FieldHolder | ||
</div><% else %> | ||
$FieldHolder<% end_if %><% end_loop %> | ||
</$Tag> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<select class="form-control $extraClass" $getAttributesHTML('class')<% if $isReadonly %> readonly<% else_if $isDisabled %> disabled<% end_if %>><% loop $Options %> | ||
<option value="$Value.XML"<% if $Selected %> selected<% end_if %><% if $Disabled %> disabled<% end_if %>><% if $Title.exists %>$Title.XML<% else %> <% end_if %></option><% end_loop %> | ||
</select> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
<div class="form-group $HolderClasses<% if $Message %> has-error<% end_if %>"><% if $Title %> | ||
<label class="control-label col-sm-3" for="$ID">$Title</label><% end_if %> | ||
<div class="<% if not $Title %>col-sm-offset-3 <% end_if %>col-sm-6"><% loop $FieldList %> | ||
$SmallFieldHolder<% end_loop %><% if $Message %> | ||
<p class="help-block">$Message</p><% end_if %> | ||
</div><% if $RightTitle %> | ||
<label class="control-label col-sm-3" for="$ID">$RightTitle</label><% end_if %> | ||
<label class="control-label col-sm-3"<% if $ID %> for="$ID"<% end_if %>>$Title</label><% end_if %><% loop $FieldList %> | ||
<%-- The following div should pertain to SmallFieldHolder but I cannot pass parameters | ||
to the underlying templates for applying the offset only to the first field --%> | ||
<div class="col-sm-2<% if not $Up.Title && $First %> col-sm-offset-3<% end_if %>"> | ||
$SmallFieldHolder | ||
</div><% end_loop %><% if $Message %> | ||
<p class="help-block">$Message</p><% end_if %><% if $RightTitle %> | ||
<label class="control-label col-sm-3"<% if $ID %> for="$ID"<% end_if %>>$RightTitle</label><% end_if %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<%-- | ||
Originally there was a symlink between forms/Form.ss and Includes/Form.ss | ||
but git or composer seem not able to properly handle symlinks. | ||
but git and composer seem not able to handle symlinks properly. | ||
--%> | ||
<% include Form %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<button class="btn<% if $Type=="action" %> btn-primary<% end_if %> $extraClass" $getAttributesHTML('class')><% if $ButtonContent %> | ||
$ButtonContent<% else %> | ||
$Title<% end_if %> | ||
$ButtonContent<% else %> | ||
$Title<% end_if %> | ||
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<input $AttributesHTML<% if $isReadonly %> disabled<% end_if %>> | ||
<input class="form-control $extraClass" $getAttributesHTML('class')<% if $isReadonly %> readonly<% else_if $isDisabled %> disabled<% end_if %>> |
Oops, something went wrong.