Skip to content

Commit

Permalink
Merge pull request #163 from dixso/develop
Browse files Browse the repository at this point in the history
3.0.2
  • Loading branch information
dixso committed Dec 5, 2015
2 parents 168ac9c + 61fd0ab commit 1234238
Show file tree
Hide file tree
Showing 8 changed files with 193 additions and 221 deletions.
60 changes: 16 additions & 44 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,6 @@ module.exports = function ( grunt ) {
grunt.initConfig( {
pkg: grunt.file.readJSON('package.json'),

files: {
js: [
'./src/js/*.js',
'./demo/js/*.js'
],
css: [
'./src/css/*.css',
'./demo/css/*.css'
],
html: [
'./index.html',
'./demo/xhr/*.html'
],
json: [
'package.json'
]
},

banner: '/*\n * <%= pkg.name %> v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>\n' +
' * Modal Window Effects with transitions CSS3.\n' +
' * http://dixso.github.io/custombox/\n' +
Expand All @@ -49,33 +31,23 @@ module.exports = function ( grunt ) {
' * Under MIT License - http://opensource.org/licenses/MIT\n' +
' */\n',

connect: {
default: {
options: {
hostname: 'localhost',
port: 9001,
keepalive: true,
open: true
browserSync: {
options: {
server: {
baseDir: './'
}
}
},

watch: {
default: {
files: [
'<%= files.js %>',
'<%= files.css %>',
'<%= files.html %>',
'<%= files.json %>'
],
options: {
livereload: true
},
tasks: ['dev']
},
karma: {
files: ['test/spec/*.js'],
tasks: ['karma:default']
dev: {
bsFiles: {
src: [
'src/*/**',
'demo/*/**'
]
},
options: {
codeSync: true,
port: 3001
}
}
},

Expand Down Expand Up @@ -242,7 +214,7 @@ module.exports = function ( grunt ) {
Task init
----------------------------
*/
grunt.registerTask('init', ['dev', 'connect']);
grunt.registerTask('init', ['dev', 'browserSync']);

/*
----------------------------
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"mobile",
"ui"
],
"version": "3.0.1",
"version": "3.0.2",
"author": {
"name": "Julio de la Calle",
"email": "juliodlcp@gmail.com"
Expand Down
4 changes: 2 additions & 2 deletions dist/custombox.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/custombox.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/legacy.min.js

Large diffs are not rendered by default.

36 changes: 15 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
{
"name": "custombox",
"description": "Modal Window Effects with transitions CSS3.",
"version": "3.0.1",
"licenses": [
{
"type": "MIT",
"url": "http://opensource.org/licenses/MIT"
}
],
"version": "3.0.2",
"license": "MIT",
"homepage": "http://dixso.github.io/custombox/",
"bugs": {
"url": "https://github.com/dixso/custombox/issues"
Expand All @@ -21,22 +16,21 @@
],
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-connect": "~0.9.0",
"grunt-contrib-watch": "~0.6.1",
"grunt-contrib-clean": "~0.6.0",
"grunt-contrib-cssmin": "~0.12.2",
"grunt-contrib-csslint": "~0.4.0",
"grunt-contrib-jshint": "~0.11.0",
"grunt-contrib-uglify": "~0.8.0",
"grunt-autoprefixer": "~2.2.0",
"grunt-replace": "~0.8.0",
"grunt-karma": "~0.10.1",
"karma-jasmine": "~0.3.5",
"karma-firefox-launcher": "~0.1.4",
"karma-chrome-launcher": "~0.1.7",
"grunt-contrib-cssmin": "~0.14.0",
"grunt-contrib-csslint": "~0.5.0",
"grunt-contrib-jshint": "~0.11.3",
"grunt-contrib-uglify": "~0.9.2",
"grunt-autoprefixer": "~3.0.3",
"grunt-replace": "~0.11.0",
"grunt-karma": "~0.12.1",
"karma-jasmine": "~0.3.6",
"karma-firefox-launcher": "~0.1.6",
"karma-chrome-launcher": "~0.2.1",
"grunt-browser-sync": "~2.1.2",
"grunt-injector": "~0.6.0",
"grunt-banner": "~0.3.1",
"time-grunt": "~1.1.0",
"grunt-banner": "~0.6.0",
"time-grunt": "~1.2.1",
"matchdep": "~0.3.0"
}
}
50 changes: 18 additions & 32 deletions src/js/custombox.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,19 @@
}
}

var open = function(listener) {
if ( listener ) {
cb.overlay.removeEventListener('transitionend', open);
}

// Load target.
_this.load();

if ( cb.inline) {
cb.wrapper.classList.add('custombox-modal-open');
}
};

if ( cb.settings.overlay ) {
if ( _config.overlay.perspective.indexOf(cb.settings.overlayEffect) > -1 || _config.overlay.together.indexOf( cb.settings.overlayEffect ) > -1 ) {
// Add class perspective.
Expand All @@ -412,47 +425,20 @@
cb.overlay.style.opacity = cb.settings.overlayOpacity;
}

var open = function() {
cb.overlay.removeEventListener('transitionend', open);

// Load target.
_this.load();

if ( cb.inline) {
cb.wrapper.classList.add('custombox-modal-open');
}
};

if ( _this.cb[_this.item].settings.loading ) {
setTimeout(function() {
open();
}, delay);
setTimeout(open, delay);
} else {
if ( _config.overlay.together.indexOf( cb.settings.overlayEffect ) > -1 || _config.oldIE ) {
if ( _this.cb[_this.item].settings.loading ) {
setTimeout(function() {
// Load target.
_this.load();

if ( cb.inline) {
cb.wrapper.classList.add('custombox-modal-open');
}
}, delay);
}
open(false);
} else {
cb.overlay.addEventListener('transitionend', open, false);
}
}
} else {
if ( _this.cb[_this.item].settings.loading ) {
setTimeout(function() {
// Load target.
_this.load();

if ( cb.inline) {
cb.wrapper.classList.add('custombox-modal-open');
}
}, delay);
setTimeout(open, delay);
} else {
open(false);
}
}
return _this;
Expand Down
Loading

0 comments on commit 1234238

Please sign in to comment.