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 #1146 from cormacmccarthy/gh-pages
Browse files Browse the repository at this point in the history
Ignores dev.html, updates fuel ux version number and version, and bower dependencies
  • Loading branch information
interactivellama committed Mar 6, 2015
2 parents d21ad85 + c789d92 commit 450a9b6
Show file tree
Hide file tree
Showing 77 changed files with 4,658 additions and 5,454 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ validation-status.json
SAUCE_API_KEY.yml

# Webstorm
.idea
.idea

dev/dev.html
12 changes: 6 additions & 6 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ url: http://getfuelux.com
# url: http://0.0.0.0:4000/

# Custom vars
current_version: 3.5.0
current_version: 3.6.3
repo: https://github.com/ExactTarget/fuelux


download:
source: https://github.com/ExactTarget/fuelux/archive/3.5.0.zip
source: https://github.com/ExactTarget/fuelux/archive/3.6.3.zip
dist: https://github.com/ExactTarget/fuelux/raw/master/dist/fuelux.zip

blog: http://code.exacttarget.com

cdn:
css: //www.fuelcdn.com/fuelux/3.5.0/css/fuelux.min.css
js: //www.fuelcdn.com/fuelux/3.5.0/js/fuelux.min.js
js_amd: //www.fuelcdn.com/fuelux/3.5.0/js/fuelux.min
zip: //www.fuelcdn.com/fuelux/3.5.0/fuelux.zip
css: //www.fuelcdn.com/fuelux/3.6.3/css/fuelux.min.css
js: //www.fuelcdn.com/fuelux/3.6.3/js/fuelux.min.js
js_amd: //www.fuelcdn.com/fuelux/3.6.3/js/fuelux.min
zip: //www.fuelcdn.com/fuelux/3.6.3/fuelux.zip

mctheme:
css: //www.fuelcdn.com/fuelux-mctheme/1.0.0/css/fuelux-mctheme.min.css
Expand Down
4 changes: 2 additions & 2 deletions _includes/js/wizard-example.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ul class="steps">
<li data-step="1" class="active"><span class="badge">1</span>Campaign<span class="chevron"></span></li>
<li data-step="1" data-name="campaign" class="active"><span class="badge">1</span>Campaign<span class="chevron"></span></li>
<li data-step="2"><span class="badge">2</span>Recipients<span class="chevron"></span></li>
<li data-step="3"><span class="badge">3</span>Template<span class="chevron"></span></li>
<li data-step="3" data-name="template"><span class="badge">3</span>Template<span class="chevron"></span></li>
</ul>
<div class="actions">
<button type="button" class="btn btn-default btn-prev"><span class="glyphicon glyphicon-arrow-left"></span>Prev</button>
Expand Down
14 changes: 13 additions & 1 deletion _includes/js/wizard.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,22 @@ <h3 id="wizard-usage-methods">Methods</h3>
<dd>Moves to the next step</dd>

<dt id="wizard-usage-methods-selectedItem">.wizard('selectedItem')</dt>
<dd>Returns the current step index
<dd>Returns the current step index.
{% highlight js %}
$('#myWizard').wizard('selectedItem');
{% endhighlight %}
</dd>

<dt id="wizard-usage-methods-selectedItem">.wizard('selectedItem', 3)</dt>
<dd>Moves to passed in step. This can be either an integer or the `data-name` of a step.
{% highlight js %}
$('#myWizard').wizard('selectedItem', {
step: 3
});

$('#myWizard').wizard('selectedItem', {
step: "named item"
});
{% endhighlight %}
</dd>

Expand Down Expand Up @@ -220,6 +231,7 @@ <h5 id="wizard-examples-sample-methods">Sample Methods</h5>
<button type="button" class="btn btn-default" id="btnWizardNext">next</button>
<button type="button" class="btn btn-default" id="btnWizardStep">log current step index</button>
<button type="button" class="btn btn-default" id="btnWizardSetStep">jump to step 3</button>
<button type="button" class="btn btn-default" id="btnWizardSetStepByName">jump to named step (Template)</button>
</div>
<div class="btn-group">
<button type="button" class="btn btn-default" id="btnWizardAddSteps">add step at index 2</button>
Expand Down
4 changes: 2 additions & 2 deletions assets/js/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* details, see http://creativecommons.org/licenses/by/3.0/.
*/

define(function(require){
define(function (require) {
var $body = $(document.body);
var $window = $(window);

Expand Down Expand Up @@ -48,7 +48,7 @@ define(function(require){
}, 100);

//programmatically injecting this is so much easier than writing the html by hand 376 times...
$('h1[id], h2[id], h3[id], h4[id], h5[id], h6[id], dt[id]').each(function(i){
$('h1[id], h2[id], h3[id], h4[id], h5[id], h6[id], dt[id]').each(function (i) {
$(this).prepend(['<a class="header-anchor" href="#', this.id, '"><span class="glyphicon glyphicon-link"></span></a>'].join(''));
});
});
8 changes: 3 additions & 5 deletions assets/js/combobox-examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* details, see http://creativecommons.org/licenses/by/3.0/.
*/

define(function(require){
define(function (require) {
var jquery = require('jquery');

require('bootstrap');
Expand Down Expand Up @@ -38,9 +38,7 @@ define(function(require){
});
$('#btnComboboxDestroy').on('click', function () {
var markup = $('#myCombobox').combobox('destroy');
console.log( markup );
console.log(markup);
$(this).closest('.section').append(markup);
});


});
});
37 changes: 18 additions & 19 deletions assets/js/datepicker-examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,47 @@
* details, see http://creativecommons.org/licenses/by/3.0/.
*/

define(function(require){
define(function (require) {
var jquery = require('jquery');

require('bootstrap');
require('fuelux');

// DATEPICKER

$('#myDatepicker').on('changed.fu.datepicker', function( event, data ) {
console.log( 'datepicker change event fired' );
$('#myDatepicker').on('changed.fu.datepicker', function (event, data) {
console.log('datepicker change event fired');
});

$('#myDatepicker').on('inputParsingFailed.fu.datepicker', function() {
console.log( 'datepicker inputParsingFailed event fired' );
$('#myDatepicker').on('inputParsingFailed.fu.datepicker', function () {
console.log('datepicker inputParsingFailed event fired');
});

$('#btnDatepickerEnable').on('click', function() {
$('#btnDatepickerEnable').on('click', function () {
$('#myDatepicker').datepicker('enable');
});

$('#btnDatepickerDisable').on('click', function() {
$('#btnDatepickerDisable').on('click', function () {
$('#myDatepicker').datepicker('disable');
});

$('#btnDatepickerLogFormattedDate').on('click', function() {
console.log( $('#myDatepicker').datepicker('getFormattedDate') );
$('#btnDatepickerLogFormattedDate').on('click', function () {
console.log($('#myDatepicker').datepicker('getFormattedDate'));
});

$('#btnDatepickerLogDateObj').on('click', function() {
console.log( $('#myDatepicker').datepicker('getDate') );
$('#btnDatepickerLogDateObj').on('click', function () {
console.log($('#myDatepicker').datepicker('getDate'));
});

$('#btnDatepickerSetDate').on('click', function() {
var futureDate = new Date(+new Date() + ( 7 * 24 * 60 * 60 * 1000 ) );
$('#myDatepicker').datepicker('setDate', futureDate );
console.log( $('#datepicker').datepicker('getDate') );
$('#btnDatepickerSetDate').on('click', function () {
var futureDate = new Date(+new Date() + (7 * 24 * 60 * 60 * 1000));
$('#myDatepicker').datepicker('setDate', futureDate);
console.log($('#datepicker').datepicker('getDate'));
});

$('#btnDatepickerDestroy').on('click', function() {
$('#btnDatepickerDestroy').on('click', function () {
var markup = $('#myDatepicker').datepicker('destroy');
console.log( markup );
console.log(markup);
$(this).closest('.section').append(markup);
});

});
});
10 changes: 4 additions & 6 deletions assets/js/form-builder/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
define(function(require) {

define(function (require) {
var $ = require('jquery');
var _ = require('underscore');
var Backbone = require('backbone');
Expand All @@ -17,7 +16,6 @@ define(function(require) {

return {
initialize: function initialize() {

//Bootstrap tabs from json.
new TabView({
title: 'Input',
Expand All @@ -36,8 +34,8 @@ define(function(require) {
collection: new AvailableComponents(JSON.parse(selectJSON))
});
new TabView({
title: "Buttons"
, collection: new AvailableComponents(JSON.parse(buttonsJSON))
title: "Buttons",
collection: new AvailableComponents(JSON.parse(buttonsJSON))
});
new TabView({
title: 'HTML',
Expand All @@ -64,7 +62,7 @@ define(function(require) {
])
});

$('#theme-toggle').on('change', function(e) {
$('#theme-toggle').on('change', function (e) {
if ($(e.target).is(':checked')) {
$('head').append('<link rel="stylesheet" href="http://www.fuelcdn.com/fuelux-mctheme/1.1.0/css/fuelux-mctheme.min.css" type="text/css" id="mctheme"/>');
} else {
Expand Down
8 changes: 4 additions & 4 deletions assets/js/form-builder/collections/placed-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ define(function placedComponent(require) {

return AvailableComponents.extend({
model: Component,
renderAll: function() {
return this.map(function(component) {
renderAll: function () {
return this.map(function (component) {
return new PlacedComponent({
model: component
}).render(true);
});
},
renderAllClean: function() {
return this.map(function(component) {
renderAllClean: function () {
return this.map(function (component) {
return new PlacedComponent({
model: component
}).render(false);
Expand Down
8 changes: 4 additions & 4 deletions assets/js/form-builder/helper/pubsub.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define([
'jquery', 'underscore', 'backbone'
], function($, _, Backbone) {
return _.extend({}, Backbone.Events);
});
'jquery', 'underscore', 'backbone'
], function ($, _, Backbone) {
return _.extend({}, Backbone.Events);
});
5 changes: 3 additions & 2 deletions assets/js/form-builder/models/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ define(function Snippet(require) {

return Backbone.Model.extend({
getValues: function getValues() {
return _.reduce(this.get('fields'), function(fields, field, index) {
return _.reduce(this.get('fields'), function (fields, field, index) {
if (field.type === 'select') {
fields[index] = _.find(field.value, function(fields) {
fields[index] = _.find(field.value, function (fields) {
return fields.selected;
}).value;
} else {
fields[index] = field.value;
}

return fields;
}, {});
},
Expand Down
6 changes: 3 additions & 3 deletions assets/js/form-builder/views/my-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ define(function MyForm(require) {
//Render Snippet Views
this.$el.empty();
var that = this;
_.each(this.collection.renderAll(), function(component) {
_.each(this.collection.renderAll(), function (component) {
that.$el.append(component);
});
$('#render').val(that.renderForm({
text: _.map(this.collection.renderAllClean(), function(e) {
text: _.map(this.collection.renderAllClean(), function (e) {
return e.html();
}).join('\n')
}));
Expand All @@ -38,7 +38,7 @@ define(function MyForm(require) {

getBottomAbove: function getBottomAbove(eventY) {
var myFormBits = $(this.$el.find('.component'));
var topelement = _.find(myFormBits, function(renderedSnippet) {
var topelement = _.find(myFormBits, function (renderedSnippet) {
if (($(renderedSnippet).offset().top + $(renderedSnippet).height()) > eventY - 90) {
return true;
} else {
Expand Down
16 changes: 8 additions & 8 deletions assets/js/form-builder/views/placed-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ define(function MyFormSnippet(require) {

return Component.extend({
events: {
'click': 'preventPropagation', //stops checkbox / radio reacting.
'click': 'preventPropagation',//stops checkbox / radio reacting.
'mousedown': 'mouseDownHandler',
'mouseup': 'mouseUpHandler'
},
Expand All @@ -24,7 +24,7 @@ define(function MyFormSnippet(require) {
$('.popover #cancel').on('click', this.cancelHandler(that));
//add drag event or all but form name
if (this.model.get('title') !== 'Form Name') {
$('body').on('mousemove', function(mouseMoveEvent) {
$('body').on('mousemove', function (mouseMoveEvent) {
if (
Math.abs(mouseDownEvent.pageX - mouseMoveEvent.pageX) > 10 ||
Math.abs(mouseDownEvent.pageY - mouseMoveEvent.pageY) > 10
Expand All @@ -47,12 +47,12 @@ define(function MyFormSnippet(require) {
},

saveHandler: function saveHandler(boundContext) {
return function(mouseEvent) {
return function (mouseEvent) {
mouseEvent.preventDefault();

var fields = $('.popover input:not([type=submit],[type=button]), textarea');

_.each(fields, function(e) {
_.each(fields, function (e) {
var $e = $(e),
type = $e.attr('data-type'),
name = $e.attr('id');
Expand All @@ -71,17 +71,17 @@ define(function MyFormSnippet(require) {
case 'textarea-split':
boundContext.model.setField(name,
_.chain($e.val().split('\n'))
.map(function(t) {
.map(function (t) {
return $.trim(t);
})
.filter(function(t) {
.filter(function (t) {
return t.length > 0;
})
.value()
);
break;
case 'select':
var valarr = _.map($e.find('option'), function(e) {
var valarr = _.map($e.find('option'), function (e) {
return {
value: e.value,
selected: e.selected,
Expand All @@ -98,7 +98,7 @@ define(function MyFormSnippet(require) {
},

cancelHandler: function cancelHandler(boundContext) {
return function(mouseEvent) {
return function (mouseEvent) {
mouseEvent.preventDefault();
$('.popover').remove();
boundContext.model.trigger('change');
Expand Down
3 changes: 2 additions & 1 deletion assets/js/form-builder/views/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ define(function Tab(require) {
// Render Snippet Views
var that = this;
if (that.collection !== undefined) {
_.each(this.collection.renderAll(), function(component) {
_.each(this.collection.renderAll(), function (component) {
that.$el.append(component);
});
} else if (that.options.content) {
that.$el.append(that.options.content);
}

// Render & append nav for tab
$('#formtabs').append(this.tabNavTemplate({
title: this.options.title,
Expand Down
Loading

0 comments on commit 450a9b6

Please sign in to comment.