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

Commit

Permalink
Merge branch 'master' into greenkeeper-eslint-plugin-requirejs-3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher McCulloh authored Oct 26, 2016
2 parents 82bc8ad + 0774e31 commit 46b9f2d
Show file tree
Hide file tree
Showing 9 changed files with 97 additions and 212 deletions.
10 changes: 3 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -598,15 +598,8 @@ <h2>Infinite Scroll</h2>
<h2>Loader</h2>
<div class="clearfix thin-box" id="loaderWrapper">
<div class="loader" data-initialize="loader" id="myLoader1"></div>
<div class="loader" data-frame="5" data-initialize="loader" id="myLoader2"></div>
<div class="loader" data-delay="500" data-initialize="loader" id="myLoader3"></div>
<div class="loader" data-begin="3" data-end="6" data-initialize="loader" id="myLoader4"></div>
</div>
<div class="btn-panel">
<button type="button" class="btn btn-default" id="btnLoaderPlay">play</button>
<button type="button" class="btn btn-default" id="btnLoaderPause">pause</button>
<button type="button" class="btn btn-default" id="btnLoaderNext">next</button>
<button type="button" class="btn btn-default" id="btnLoaderPrevious">previous</button>
<button type="button" class="btn btn-default" id="btnLoaderDestroy">destroy and append</button>
</div>
</section>
Expand Down Expand Up @@ -2188,6 +2181,9 @@ <h3>only items selectable (please note structure of treebranch)</h3>

<section id="wizard">
<h2>Wizard</h2>
<div class="thin-box" id="myWizard1Wrapper">

</div>
<div class="thin-box">
<div class="wizard" data-initialize="wizard" id="myWizard">
<div class="steps-container">
Expand Down
77 changes: 65 additions & 12 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,18 +246,6 @@ define(function (require) {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

// sample method buttons
$('#btnLoaderPlay').on('click', function () {
$('#myLoader1').loader('play');
});
$('#btnLoaderPause').on('click', function () {
$('#myLoader1').loader('pause');
});
$('#btnLoaderNext').on('click', function () {
$('#myLoader1').loader('next');
});
$('#btnLoaderPrevious').on('click', function () {
$('#myLoader1').loader('previous');
});
$('#btnLoaderDestroy').on('click', function () {
var $container = $('#myLoader1').parent();
var markup = $('#myLoader1').loader('destroy');
Expand Down Expand Up @@ -1419,6 +1407,71 @@ define(function (require) {
log(item);
});

var wizardStepsData = {
steps: [
{
step: 1,
stepBadge: 1,
stepLabel: 'Campaign',
secondaryText: 'This is secondary',
styles: 'alert',
active: true,
title: 'Setup Campaign',
content:'<p>Veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo melon azuki bean garlic. Beetroot water spinach okra water chestnut ricebean pea catsear courgette.</p>' +
'<p>Turnip greens yarrow ricebean rutabaga endive cauliflower sea lettuce kohlrabi amaranth water spinach avocado daikon napa cabbage asparagus winter purslane kale. Celery potato scallion desert raisin horseradish spinach carrot soko. Lotus root water spinach fennel kombu maize bamboo shoot green bean swiss chard seakale pumpkin onion chickpea gram corn pea. Brussels sprout coriander water chestnut gourd swiss chard wakame kohlrabi beetroot carrot watercress. Corn amaranth salsify bunya nuts nori azuki bean chickweed potato bell pepper artichoke. Beetroot water spinach okra water chestnut ricebean pea catsear courgette.</p>' +
'<p>Gumbo beet greens corn soko endive gumbo gourd. Parsley shallot courgette tatsoi pea sprouts fava bean collard greens dandelion okra wakame tomato. Dandelion cucumber earthnut pea peanut soko zucchini. </p>'
},
{
step: 2,
stepBadge: 2,
stepLabel: 'Recipients',
secondaryText: 'This is secondary',
styles: 'bg-info alert alert-info',
title: 'Choose Recipients',
content:'<p>Celery quandong swiss chard chicory earthnut pea potato. Salsify taro catsear garlic gram celery bitterleaf wattle seed collard greens nori. Grape wattle seed kombu beetroot horseradish carrot squash brussels sprout chard. </p>' +
'<p>Pea horseradish azuki bean lettuce avocado asparagus okra. Kohlrabi radish okra azuki bean corn fava bean mustard tigernut jícama green bean celtuce collard greens avocado quandong fennel gumbo black-eyed pea. Grape silver beet watercress potato tigernut corn groundnut. Chickweed okra pea winter purslane coriander yarrow sweet pepper radish garlic brussels sprout groundnut summer purslane earthnut pea tomato spring onion azuki bean gourd. Gumbo kakadu plum komatsuna black-eyed pea green bean zucchini gourd winter purslane silver beet rock melon radish asparagus spinach. </p>' +
'<p>Beetroot water spinach okra water chestnut ricebean pea catsear courgette summer purslane. Water spinach arugula pea tatsoi aubergine spring onion bush tomato kale radicchio turnip chicory salsify pea sprouts fava bean. Dandelion zucchini burdock yarrow chickpea dandelion sorrel courgette turnip greens. </p>'
},
{
step: 3,
stepBadge: 3,
stepLabel: 'Template',
secondaryText: 'This is secondary',
styles: 'bg-danger alert alert-danger',
title: 'Design Template',
content:'<p>Nori grape silver beet broccoli kombu beet greens fava bean potato quandong celery. Bunya nuts black-eyed pea prairie turnip leek lentil turnip greens parsnip. Sea lettuce lettuce water chestnut eggplant winter purslane fennel azuki bean earthnut pea sierra leone bologi leek soko chicory celtuce parsley jícama salsify. </p>' +
'<p>Celery quandong swiss chard chicory earthnut pea potato. Salsify taro catsear garlic gram celery bitterleaf wattle seed collard greens nori. Grape wattle seed kombu beetroot horseradish carrot squash brussels sprout chard. </p>' +
'<p>Pea horseradish azuki bean lettuce avocado asparagus okra. Kohlrabi radish okra azuki bean corn fava bean mustard tigernut jícama green bean celtuce collard greens avocado quandong fennel gumbo black-eyed pea. Grape silver beet watercress potato tigernut corn groundnut. Chickweed okra pea winter purslane coriander yarrow sweet pepper radish garlic brussels sprout groundnut summer purslane earthnut pea tomato spring onion azuki bean gourd. Gumbo kakadu plum komatsuna black-eyed pea green bean zucchini gourd winter purslane silver beet rock melon radish asparagus spinach. </p>'
},
{
step: 4,
stepBadge: 4,
stepLabel: 'Preview',
secondaryText: 'This is secondary',
styles: 'bg-warning alert alert-warning',
title: 'Preview Message',
content:'<p>Beetroot water spinach okra water chestnut ricebean pea catsear courgette summer purslane. Water spinach arugula pea tatsoi aubergine spring onion bush tomato kale radicchio turnip chicory salsify pea sprouts fava bean. Dandelion zucchini burdock yarrow chickpea dandelion sorrel courgette turnip greens tigernut soybean radish artichoke wattle seed endive groundnut broccoli arugula. Beetroot water spinach okra water chestnut ricebean pea catsear courgette.</p>' +
'<p>Soko radicchio bunya nuts gram dulse silver beet parsnip napa cabbage lotus root sea lettuce brussels sprout cabbage. Catsear cauliflower garbanzo yarrow salsify chicory garlic bell pepper napa cabbage lettuce tomato kale arugula melon sierra leone bologi rutabaga tigernut. Sea lettuce gumbo grape kale kombu cauliflower salsify kohlrabi okra sea lettuce broccoli celery lotus root carrot winter purslane turnip greens garlic.</p>' +
'<p>Ja­cama garlic courgette coriander radicchio plantain scallion cauliflower fava bean desert raisin spring onion chicory bunya nuts. Sea lettuce water spinach gram fava bean leek dandelion silver beet eggplant bush tomato. </p>'
},
{
step: 5,
stepBadge: 5,
stepLabel: 'Send',
secondaryText: 'This is secondary',
styles: 'bg-success alert alert-success',
title: 'Send Message',
content:'<p>Soko radicchio bunya nuts gram dulse silver beet parsnip napa cabbage lotus root sea lettuce brussels sprout cabbage. Catsear cauliflower garbanzo yarrow salsify chicory garlic bell pepper napa cabbage lettuce tomato kale arugula melon sierra leone bologi rutabaga tigernut.</p>' +
'<p>Sea lettuce gumbo grape kale kombu cauliflower salsify kohlrabi okra sea lettuce broccoli celery lotus root carrot winter purslane turnip greens garlic. Jícama garlic courgette coriander radicchio plantain scallion cauliflower fava bean desert raisin spring onion chicory bunya nuts. Sea lettuce water spinach gram fava bean leek dandelion silver beet eggplant bush tomato. </p>' +
'<p>Pea horseradish azuki bean lettuce avocado asparagus okra. Kohlrabi radish okra azuki bean corn fava bean mustard tigernut jícama green bean celtuce collard greens avocado quandong fennel gumbo black-eyed pea. Grape silver beet watercress potato tigernut corn groundnut. Chickweed okra pea winter purslane coriander yarrow sweet pepper radish garlic brussels sprout groundnut summer purslane earthnut pea tomato spring onion azuki bean gourd. </p>'
}
]
}

var wizard = require('hbs!fuelux_templates/wizard');
var $myWizard1Wrapper = $('#myWizard1Wrapper');
$myWizard1Wrapper.html(wizard(wizardStepsData));


$('#btnWizardAddSteps').on('click', function () {
$('#myWizard').wizard('addSteps', 2, [{
Expand Down
73 changes: 7 additions & 66 deletions js/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,13 @@
var Loader = function (element, options) {
this.$element = $(element);
this.options = $.extend({}, $.fn.loader.defaults, options);

this.begin = (this.$element.is('[data-begin]')) ? parseInt(this.$element.attr('data-begin'), 10) : 1;
this.delay = (this.$element.is('[data-delay]')) ? parseFloat(this.$element.attr('data-delay')) : 150;
this.end = (this.$element.is('[data-end]')) ? parseInt(this.$element.attr('data-end'), 10) : 8;
this.frame = (this.$element.is('[data-frame]')) ? parseInt(this.$element.attr('data-frame'), 10) : this.begin;
this.isIElt9 = false;
this.timeout = {};

var ieVer = this.msieVersion();
if (ieVer !== false && ieVer < 9) {
this.$element.addClass('iefix');
this.isIElt9 = true;
}

this.$element.attr('data-frame', this.frame + '');
this.play();
};

Loader.prototype = {

constructor: Loader,

destroy: function () {
this.pause();

this.$element.remove();
// any external bindings
// [none]
Expand All @@ -68,60 +50,19 @@
return this.$element[0].outerHTML;
},

ieRepaint: function () {
if (this.isIElt9) {
this.$element.addClass('iefix_repaint').removeClass('iefix_repaint');
}
},

msieVersion: function () {
var ua = window.navigator.userAgent;
var msie = ua.indexOf('MSIE ');
if (msie > 0) {
return parseInt(ua.substring(msie + 5, ua.indexOf(".", msie)), 10);
} else {
return false;
}
},

next: function () {
this.frame++;
if (this.frame > this.end) {
this.frame = this.begin;
}
ieRepaint: function () {},

this.$element.attr('data-frame', this.frame + '');
this.ieRepaint();
},
msieVersion: function () {},

pause: function () {
clearTimeout(this.timeout);
},
next: function () {},

play: function () {
var self = this;
clearTimeout(this.timeout);
this.timeout = setTimeout(function () {
self.next();
self.play();
}, this.delay);
},
pause: function () {},

previous: function () {
this.frame--;
if (this.frame < this.begin) {
this.frame = this.end;
}
play: function () {},

this.$element.attr('data-frame', this.frame + '');
this.ieRepaint();
},
previous: function () {},

reset: function () {
this.frame = this.begin;
this.$element.attr('data-frame', this.frame + '');
this.ieRepaint();
}
reset: function () {}
};

// LOADER PLUGIN DEFINITION
Expand Down
12 changes: 5 additions & 7 deletions js/wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
// WIZARD CONSTRUCTOR AND PROTOTYPE

var Wizard = function (element, options) {
var kids, steps;

this.$element = $(element);
this.options = $.extend({}, $.fn.wizard.defaults, options);
this.options.disablePreviousStep = (this.$element.attr('data-restrict') === 'previous') ? true : this.options.disablePreviousStep;
Expand All @@ -42,7 +40,11 @@
this.$prevBtn = this.$element.find('button.btn-prev');
this.$nextBtn = this.$element.find('button.btn-next');

steps = this.$element.children('.steps-container');
var kids = this.$nextBtn.children().detach();
this.nextText = $.trim(this.$nextBtn.text());
this.$nextBtn.append(kids);

var steps = this.$element.children('.steps-container');
// maintains backwards compatibility with < 3.8, will be removed in the future
if (steps.length === 0) {
steps = this.$element;
Expand All @@ -53,10 +55,6 @@
}
steps = steps.find('.steps');

kids = this.$nextBtn.children().detach();
this.nextText = $.trim(this.$nextBtn.text());
this.$nextBtn.append(kids);

// handle events
this.$prevBtn.on('click.fu.wizard', $.proxy(this.previous, this));
this.$nextBtn.on('click.fu.wizard', $.proxy(this.next, this));
Expand Down
54 changes: 1 addition & 53 deletions less/loader.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,59 +6,7 @@
font-size: 64px;
position: relative;
width: 64px;

&:after, &:before {
#fuelux > .icon-base-styles();

bottom: 0;
display: block;
left: 0;
position: absolute;
right: 0;
top: 0;
}

&:before {
content: '\e000';
opacity: 0.33;
}

&.iefix:before{
color: @gray74;
opacity: 1;
}

&[data-frame="1"]:after {
content: '\e001';
}

&[data-frame="2"]:after {
content: '\e002';
}

&[data-frame="3"]:after {
content: '\e003';
}

&[data-frame="4"]:after {
content: '\e004';
}

&[data-frame="5"]:after {
content: '\e005';
}

&[data-frame="6"]:after {
content: '\e006';
}

&[data-frame="7"]:after {
content: '\e007';
}

&[data-frame="8"]:after {
content: '\e008';
}
background-image: url("data:image/svg+xml;base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mVmPSIjVG9wUmlnaHQiIHBhdGg9Ik0gMCAwIEwgNSAtNSBaIiBkdXI9Ii4yNXMiIGJlZ2luPSJUb3BBbmltLmVuZCIgaWQ9IlRvcFJpZ2h0QW5pbSIgLz48YW5pbWF0ZU1vdGlvbiB4bGluazpocmVmPSIjQm90dG9tUmlnaHQiIHBhdGg9Ik0gMCAwIEwgNSA1IFoiIGR1cj0iLjI1cyIgYmVnaW49IlRvcFJpZ2h0QW5pbS5lbmQiIGlkPSJCb3R0b21SaWdodEFuaW0iIC8+PGFuaW1hdGVNb3Rpb24geGxpbms6aHJlZj0iI0JvdHRvbSIgcGF0aD0iTSAwIDAgViA1IFoiIGR1cj0iLjI1cyIgYmVnaW49IkJvdHRvbVJpZ2h0QW5pbS5lbmQiIGlkPSJCb3R0b21BbmltIiAvPjxhbmltYXRlTW90aW9uIHhsaW5rOmhyZWY9IiNCb3R0b21MZWZ0IiBwYXRoPSJNIDAgMCBMIC01IDUgWiIgZHVyPSIuMjVzIiBiZWdpbj0iQm90dG9tQW5pbS5lbmQiIGlkPSJCb3R0b21MZWZ0QW5pbSIgLz48YW5pbWF0ZU1vdGlvbiB4bGluazpocmVmPSIjVG9wTGVmdCIgcGF0aD0iTSAwIDAgTCAtNSAtNSBaIiBkdXI9Ii4yNXMiIGJlZ2luPSJCb3R0b21MZWZ0QW5pbS5lbmQiIGlkPSJUb3BMZWZ0QW5pbSIgLz48L3N2Zz4=");
}

}
14 changes: 14 additions & 0 deletions less/wizard.less
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,20 @@
font-size: 16px;
cursor: not-allowed;

> .has-secondary-text {
display: inline;

> h4 {
display: inline;
font-size: 16px;
font-weight: normal;
}

> small {
display: none;
}
}

.chevron {
border: 24px solid transparent;
border-left: 14px solid @navbar-border;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": {
"bootstrap": "3.3.7",
"jquery": "3.1.1",
"moment": "2.15.1"
"moment": "2.15.2"
},
"description": "Base Fuel UX styles and controls",
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion templates/handlebars/fuelux/wizard.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="steps-container">
<ul class="steps">
{{#each steps}}
<li data-step="{{step}}" class="{{#if active}}active{{/if}}{{#if complete}}complete{{/if}}"><span class="badge">{{stepBadge}}</span>{{stepLabel}}<span class="chevron"></span></li>
<li data-step="{{step}}" class="{{#if active}}active{{/if}}{{#if complete}}complete{{/if}}"><span class="badge">{{stepBadge}}</span>{{#if secondaryText}}<div class="has-secondary-text"><h4>{{/if}}{{stepLabel}}{{#if secondaryText}}</h4><small>{{secondaryText}}</small></div>{{/if}}<span class="chevron"></span></li>
{{/each}}
</ul>
</div>
Expand Down
Loading

0 comments on commit 46b9f2d

Please sign in to comment.