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

updates to qunit 2 #1894

Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- 5.8
- 6.8.1
sudo: false
install:
- time npm install
Expand Down
36 changes: 16 additions & 20 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*jshint expr:true*/
/*global module:false, process:false*/
module.exports = function (grunt) {
/* jshint expr:true*/
/* global module:false, process:false*/
module.exports = function gruntFile (grunt) {
'use strict';

/*
Expand All @@ -16,14 +16,14 @@ module.exports = function (grunt) {
}

// use --no-livereload to disable livereload. Helpful to 'serve' multiple projects
var isLivereloadEnabled = (typeof grunt.option('livereload') !== 'undefined') ? grunt.option('livereload') : true;
// var isLivereloadEnabled = (typeof grunt.option('livereload') !== 'undefined') ? grunt.option('livereload') : true;

// external libraries
var semver = require('semver');
var packageVersion = getPackage().version;
var fs = require('fs');
// var semver = require('semver');
// var packageVersion = getPackage().version;
// var fs = require('fs');
var path = require('path');
var commonJSBundledReferenceModule = require('./grunt/other/commonjs-reference-module.js');
// var commonJSBundledReferenceModule = require('./grunt/other/commonjs-reference-module.js');

// variables used in shared variables below
var connectTestServerOptionsPort = 9000;
Expand Down Expand Up @@ -57,22 +57,19 @@ module.exports = function (grunt) {
cdnLoginFile: grunt.file.exists('FUEL_CDN.yml') ? grunt.file.readYAML('FUEL_CDN.yml') : undefined,
sauceUser: process.env.SAUCE_USERNAME || 'fuelux',
// TEST URLS
allTestUrls: ['2.1.0', '1.11.0', '1.9.1', 'browserGlobals', 'noMoment', 'codeCoverage' ].map(function (type) {
allTestUrls: ['2.1.0', '1.11.0', '1.9.1', 'browserGlobals', 'noMoment', 'codeCoverage' ].map(function allTestUrls (type) {
if (type === 'browserGlobals') {
return 'http://localhost:' + connectTestServerOptionsPort + '/test/browser-globals.html';
}
else if (type === 'codeCoverage') {
} else if (type === 'codeCoverage') {
return 'http://localhost:' + connectTestServerOptionsPort + '/test/?coverage=true';
}
else if (type === 'noMoment') {
} else if (type === 'noMoment') {
return 'http://localhost:' + connectTestServerOptionsPort + '/test/?no-moment=true';
}
else {
// test dist with multiple jQuery versions
return 'http://localhost:' + connectTestServerOptionsPort + '/test/?testdist=true';
}

// test dist with multiple jQuery versions
return 'http://localhost:' + connectTestServerOptionsPort + '/test/?testdist=true';
}),
connectTestServerOptionsPort: connectTestServerOptionsPort,
connectTestServerOptionsPort: connectTestServerOptionsPort
}
});

Expand All @@ -81,5 +78,4 @@ module.exports = function (grunt) {

// load custom build, release, serve, and test tasks from the folder specified
grunt.loadTasks('./grunt/tasks');

};
};
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"devDependencies": {
"jquery": null,
"jquery-1.9.1": "jquery#1.9.1",
"qunit": "1.x",
"qunit": "2.x",
"requirejs-text": "2.x",
"underscore": "1.x",
"blanket": "1.x",
Expand Down
68 changes: 17 additions & 51 deletions dist/css/fuelux.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/css/fuelux.css.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions dist/css/fuelux.min.css

Large diffs are not rendered by default.

Binary file modified dist/fuelux.zip
Binary file not shown.
93 changes: 18 additions & 75 deletions dist/js/fuelux.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*!
* Fuel UX v3.15.8
* Fuel UX EDGE - Built 2016/10/28, 5:23:06 PM
* Previous release: v3.15.8
* Copyright 2012-2016 ExactTarget
* Licensed under the BSD-3-Clause license (https://github.com/ExactTarget/fuelux/blob/master/LICENSE)
*/
Expand Down Expand Up @@ -1552,31 +1553,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 @@ -1586,60 +1569,19 @@
return this.$element[ 0 ].outerHTML;
},

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

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;
}
},
msieVersion: function() {},

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

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

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

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

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

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

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

// LOADER PLUGIN DEFINITION
Expand Down Expand Up @@ -3840,8 +3782,6 @@
// WIZARD CONSTRUCTOR AND PROTOTYPE

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

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 @@ -3850,22 +3790,25 @@
this.$prevBtn = this.$element.find( 'button.btn-prev' );
this.$nextBtn = this.$element.find( 'button.btn-next' );

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 ( this.$element.children( '.steps-container' ).length === 0 ) {
if ( steps.length === 0 ) {
steps = this.$element;
this.$element.addClass( 'no-steps-container' );
if ( window && window.console && window.console.warn ) {
window.console.warn( 'please update your wizard markup to include ".steps-container" as seen in http://getfuelux.com/javascript.html#wizard-usage-markup' );
}
}

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

// handle events
this.$prevBtn.on( 'click.fu.wizard', $.proxy( this.previous, this ) );
this.$nextBtn.on( 'click.fu.wizard', $.proxy( this.next, this ) );
this.$element.on( 'click.fu.wizard', 'li.complete', $.proxy( this.stepclicked, this ) );
steps.on( 'click.fu.wizard', 'li.complete', $.proxy( this.stepclicked, this ) );

this.selectedItem( this.options.selectedItem );

Expand Down
13 changes: 7 additions & 6 deletions dist/js/fuelux.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ require('../../js/repeater');
require('../../js/repeater-list');
require('../../js/repeater-thumbnail');
require('../../js/scheduler');
require('../../js/picker');
require('../../js/picker');
2 changes: 1 addition & 1 deletion dist/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
13 changes: 0 additions & 13 deletions grunt/config/blanket_qunit.js

This file was deleted.

2 changes: 1 addition & 1 deletion grunt/config/browserify.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ module.exports = {
'test/commonjs-bundle.js': ['test/commonjs-test.js']
}
}
};
};
2 changes: 1 addition & 1 deletion grunt/config/compress.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ module.exports = {
mode: 'zip'
}
}
};
};
8 changes: 3 additions & 5 deletions grunt/config/qunit.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
module.exports = function (grunt) {

module.exports = function qunit (grunt) {
return {
release: {
options: {
Expand Down Expand Up @@ -35,6 +34,5 @@ module.exports = function (grunt) {
]
}
}
}

};
};
};
Loading