Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1684 from cormacmccarthy/GH1676---add-handlebars-…
Browse files Browse the repository at this point in the history
…templates-for-fuel-ux-controls-to-distfuelux

(GH1676) adds HBS templates for controls
  • Loading branch information
swilliamset committed Jan 26, 2016
2 parents e963d7d + 1e39c9a commit b2960c9
Show file tree
Hide file tree
Showing 53 changed files with 2,238 additions and 1 deletion.
3 changes: 3 additions & 0 deletions dist/templates/handlebars/bootstrap/modal-trigger.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<button type="button" class="btn{{#if btn-style}} {{btn-style}}{{else}} btn-default{{/if}}" data-toggle="modal" data-target="#{{target-id}}" {{#each data}}data-{{name}}="{{value}}" {{/each}}>
{{text}}
</button>
17 changes: 17 additions & 0 deletions dist/templates/handlebars/bootstrap/modal.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<div class="modal {{#unless no-fade}}fade{{/unless}}" id="{{#if id}}{{id}}{{else}}myModal{{/if}}" tabindex="-1" role="dialog" aria-labelledby="{{#if id}}{{id}}{{else}}myModal{{/if}}Label">
<div class="modal-dialog {{#if modal-size}}modal-{{modal-size}}{{/if}}">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="{{#if exit}}{{exit}}{{else}}{{#if close}}{{close}}{{else}}Close{{/if}}{{/if}}"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="{{#if id}}{{id}}{{else}}myModal{{/if}}Label">{{title}}</h4>
</div>
<div class="modal-body">
{{#if body}}{{{body}}}{{/if}}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{#if close}}{{close}}{{else}}Close{{/if}}</button>
<button type="button" class="btn btn-primary">{{#if confirm}}{{confirm}}{{else}}Save changes{{/if}}</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
6 changes: 6 additions & 0 deletions dist/templates/handlebars/fuelux/checkbox.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{#unless inline}}<div class="checkbox{{#if highlight}} highlight{{/if}}">{{/unless}}
<label class="checkbox-custom{{#if inline}} checkbox-inline{{/if}}{{#if highlight}} highlight{{/if}}"{{#unless doNotInit}} data-initialize="checkbox"{{/unless}} id="{{#if id}}{{id}}{{else}}myCustomCheckbox{{/if}}">
<input class="sr-only" type="checkbox" {{#if data-toggle}}data-toggle="{{data-toggle}}" {{/if}}{{#if checked}}checked="checked" {{/if}}{{#if disabled}}disabled="disabled" {{/if}}value="" name="{{#if name}}{{name}}{{else}}myCustomCheckboxName{{/if}}">
<span class="checkbox-label">{{#if label}}{{label}}{{else}}Checkbox Label{{/if}}</span>
</label>
{{#unless inline}}</div>{{/unless}}
11 changes: 11 additions & 0 deletions dist/templates/handlebars/fuelux/combobox.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div class="input-group input-append dropdown combobox{{#if cols}} col-sm-{{cols}}{{/if}}" {{#unless doNotInit}}data-initialize="combobox"{{/unless}} id="{{#if id}}{{id}}{{else}}myCombobox{{/if}}">
<input type="text" class="form-control">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
{{#each options}}
<li data-value="{{value}}"{{#each data}} data-{{name}}="{{value}}"{{/each}}><a href="#">{{text}}</a></li>
{{/each}}
</ul>
</div>
</div>
79 changes: 79 additions & 0 deletions dist/templates/handlebars/fuelux/datepicker.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<div class="datepicker" {{#unless doNotInit}}data-initialize="datepicker"{{/unless}} id="{{#if id}}{{id}}{{else}}myDatepicker{{/if}}">
<div class="input-group">
<input class="form-control" id="{{#if id}}{{id}}{{else}}myDatepicker{{/if}}Input" type="text"/>
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<span class="glyphicon glyphicon-calendar"></span>
<span class="sr-only">Toggle Calendar</span>
</button>
<div class="dropdown-menu dropdown-menu-right datepicker-calendar-wrapper" role="menu">
<div class="datepicker-calendar">
<div class="datepicker-calendar-header">
<button type="button" class="prev"><span class="glyphicon glyphicon-chevron-left"></span><span class="sr-only">Previous Month</span></button>
<button type="button" class="next"><span class="glyphicon glyphicon-chevron-right"></span><span class="sr-only">Next Month</span></button>
<button type="button" class="title">
<span class="month">
<span data-month="0">January</span>
<span data-month="1">February</span>
<span data-month="2">March</span>
<span data-month="3">April</span>
<span data-month="4">May</span>
<span data-month="5">June</span>
<span data-month="6">July</span>
<span data-month="7">August</span>
<span data-month="8">September</span>
<span data-month="9">October</span>
<span data-month="10">November</span>
<span data-month="11">December</span>
</span> <span class="year"></span>
</button>
</div>
<table class="datepicker-calendar-days">
<thead>
<tr>
<th>Su</th>
<th>Mo</th>
<th>Tu</th>
<th>We</th>
<th>Th</th>
<th>Fr</th>
<th>Sa</th>
</tr>
</thead>
<tbody></tbody>
</table>
<div class="datepicker-calendar-footer">
<button type="button" class="datepicker-today">Today</button>
</div>
</div>
<div class="datepicker-wheels" aria-hidden="true">
<div class="datepicker-wheels-month">
<h2 class="header">Month</h2>
<ul>
<li data-month="0"><button type="button">Jan</button></li>
<li data-month="1"><button type="button">Feb</button></li>
<li data-month="2"><button type="button">Mar</button></li>
<li data-month="3"><button type="button">Apr</button></li>
<li data-month="4"><button type="button">May</button></li>
<li data-month="5"><button type="button">Jun</button></li>
<li data-month="6"><button type="button">Jul</button></li>
<li data-month="7"><button type="button">Aug</button></li>
<li data-month="8"><button type="button">Sep</button></li>
<li data-month="9"><button type="button">Oct</button></li>
<li data-month="10"><button type="button">Nov</button></li>
<li data-month="11"><button type="button">Dec</button></li>
</ul>
</div>
<div class="datepicker-wheels-year">
<h2 class="header">Year</h2>
<ul></ul>
</div>
<div class="datepicker-wheels-footer clearfix">
<button type="button" class="btn datepicker-wheels-back"><span class="glyphicon glyphicon-arrow-left"></span><span class="sr-only">Return to Calendar</span></button>
<button type="button" class="btn datepicker-wheels-select">Select <span class="sr-only">Month and Year</span></button>
</div>
</div>
</div>
</div>
</div>
</div>
1 change: 1 addition & 0 deletions dist/templates/handlebars/fuelux/infinite-scroll.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div class="infinitescroll" id="{{#if id}}{{id}}{{else}}myInfiniteScroll{{/if}}">{{#if content}}{{content}}{{/if}}</div>
1 change: 1 addition & 0 deletions dist/templates/handlebars/fuelux/loader.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div class="loader" {{#unless doNotInit}}data-initialize="loader"{{/unless}} {{#each data}}data-{{name}}="{{value}}" {{/each}}id="{{#if id}}{{id}}{{else}}myLoader{{/if}}"></div>
21 changes: 21 additions & 0 deletions dist/templates/handlebars/fuelux/pillbox.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<div class="pillbox" {{#unless doNotInit}}data-initialize="pillbox"{{/unless}} id="{{#if id}}{{id}}{{else}}myPillbox{{/if}}">
<ul class="clearfix pill-group">
{{#each items}}
<li class="btn btn-default pill{{#if class}} {{class}}{{/if}}" data-value="{{value}}">
<span>{{title}}</span>
<span class="glyphicon glyphicon-close">
<span class="sr-only">Remove</span>
</span>
</li>
{{/each}}
<li class="pillbox-input-wrap btn-group">
<a class="pillbox-more">and <span class="pillbox-more-count"></span> more...</a>
<input type="text" class="form-control dropdown-toggle pillbox-add-item" placeholder="add item">
<button type="button" class="dropdown-toggle sr-only">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="suggest dropdown-menu" role="menu" data-toggle="dropdown" data-flip="auto"></ul>
</li>
</ul>
</div>
20 changes: 20 additions & 0 deletions dist/templates/handlebars/fuelux/placard.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<div class="placard"{{#unless doNotInit}} data-initialize="placard"{{/unless}}{{#if ellipsis}} data-ellipsis="true"{{/if}} id="{{#if id}}{{id}}{{else}}myPlacard{{/if}}">
<div class="placard-popup"></div>
{{#if header}}
<div class="placard-header"><h5>{{header}}</h5></div>
{{/if}}
{{!-- div must come first, because if a placard has both div and textarea set to true, it is a div that behaves like a textarea --}}
{{#if div}}
<div class="form-control placard-field{{#if glass}} glass{{/if}}"{{#if textarea}} data-textarea="true"{{/if}} contenteditable="true">{{#if placeholder}}{{placeholder}}{{/if}}</div>
{{else if textarea}}
<textarea class="form-control placard-field{{#if glass}} glass{{/if}}">{{#if placeholder}}{{placeholder}}{{/if}}</textarea>
{{else}}
<input class="form-control placard-field{{#if glass}} glass{{/if}}" type="text"{{#if placeholder}} placeholder="{{placeholder}}"{{/if}}/>
{{/if}}
{{#if footer}}
<div class="placard-footer">
<a class="placard-cancel" href="#">Cancel</a>
<button class="btn btn-primary btn-xs placard-accept" type="button">Save</button>
</div>
{{/if}}
</div>
6 changes: 6 additions & 0 deletions dist/templates/handlebars/fuelux/radio.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{#unless inline}}<div class="radio{{#if highlight}} highlight{{/if}}">{{/unless}}
<label class="radio-custom{{#if inline}} radio-inline{{/if}}{{#if highlight}} highlight{{/if}}"{{#unless doNotInit}} data-initialize="radio"{{/unless}} id="{{#if id}}{{id}}{{else}}myCustomRadio{{/if}}">
<input class="sr-only" type="radio" {{#if data-toggle}}data-toggle="{{data-toggle}}" {{/if}}{{#if checked}}checked="checked" {{/if}}{{#if disabled}}disabled="disabled" {{/if}}value="" name="{{#if name}}{{name}}{{else}}myCustomRadioName{{/if}}">
<span class="radio-label">{{#if label}}{{label}}{{else}}Radio Label{{/if}}</span>
</label>
{{#unless inline}}</div>{{/unless}}
93 changes: 93 additions & 0 deletions dist/templates/handlebars/fuelux/repeater.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<div class="repeater" id="{{#if id}}{{id}}{{else}}myRepeater{{/if}}">
<div class="repeater-header">
<div class="repeater-header-left">
<span class="repeater-title">{{#if title}}{{title}}{{else}}Awesome Repeater{{/if}}</span>
<div class="repeater-search">
<div class="search input-group">
<input type="search" class="form-control" placeholder="Search"/>
<span class="input-group-btn">
<button class="btn btn-default" type="button">
<span class="glyphicon glyphicon-search"></span>
<span class="sr-only">Search</span>
</button>
</span>
</div>
</div>
</div>
<div class="repeater-header-right">
<div class="btn-group selectlist repeater-filters" data-resize="auto">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<span class="selected-label">&nbsp;</span>
<span class="caret"></span>
<span class="sr-only">Toggle Filters</span>
</button>
<ul class="dropdown-menu" role="menu">
{{#each filters}}
<li data-value="{{value}}" {{#if selected}}data-selected="true"{{/if}}><a href="#">{{text}}</a></li>
{{/each}}
</ul>
<input class="hidden hidden-field" name="filterSelection" readonly="readonly" aria-hidden="true" type="text"/>
</div>
<div class="btn-group repeater-views" data-toggle="buttons">
<label class="btn btn-default active">
<input name="repeaterViews" type="radio" value="list"><span class="glyphicon glyphicon-list"></span>
</label>
<label class="btn btn-default">
<input name="repeaterViews" type="radio" value="thumbnail"><span class="glyphicon glyphicon-th"></span>
</label>
</div>
</div>
</div>
<div class="repeater-viewport">
<div class="repeater-canvas"></div>
<div class="loader repeater-loader"></div>
</div>
<div class="repeater-footer">
<div class="repeater-footer-left">
<div class="repeater-itemization">
<span><span class="repeater-start"></span> - <span class="repeater-end"></span> of <span class="repeater-count"></span> items</span>
<div class="btn-group selectlist" data-resize="auto">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<span class="selected-label">&nbsp;</span>
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu" role="menu">
{{#each itemsPerPage}}
<li data-value="{{value}}" {{#if selected}}data-selected="true"{{/if}}><a href="#">{{text}}</a></li>
{{/each}}
</ul>
<input class="hidden hidden-field" name="itemsPerPage" readonly="readonly" aria-hidden="true" type="text"/>
</div>
<span>Per Page</span>
</div>
</div>
<div class="repeater-footer-right">
<div class="repeater-pagination">
<button type="button" class="btn btn-default btn-sm repeater-prev">
<span class="glyphicon glyphicon-chevron-left"></span>
<span class="sr-only">Previous Page</span>
</button>
<label id="{{pageLabelID}}" class="page-label">{{pageLabel}}</label>
<div class="repeater-primaryPaging active">
<div class="input-group input-append dropdown combobox">
<input type="text" class="form-control" aria-labelledby="{{pageLabelID}}">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu dropdown-menu-right"></ul>
</div>
</div>
</div>
<input type="text" class="form-control repeater-secondaryPaging" aria-labelledby="{{pageLabelID}}">
<span>of <span class="repeater-pages"></span></span>
<button type="button" class="btn btn-default btn-sm repeater-next">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next Page</span>
</button>
</div>
</div>
</div>
</div>
Loading

0 comments on commit b2960c9

Please sign in to comment.