From c63e5f1a627742ba48335dd45e0f9093e0c74a11 Mon Sep 17 00:00:00 2001 From: Sergey Nagaytsev Date: Tue, 20 Mar 2018 15:43:03 +0300 Subject: [PATCH 1/2] FIX deprecation, breaking updates --- gulpfile.js | 4 ++-- package.json | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 784aa89..bdacec0 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -5,7 +5,7 @@ var gulp = require("gulp"), eslint = require("gulp-eslint"), less = require("gulp-less"), - minifyCSS = require("gulp-minify-css"), + cleanCSS = require("gulp-clean-css"), path = require("path"), notify = require("gulp-notify"), clean = require("gulp-clean"), @@ -27,7 +27,7 @@ gulp.task("less", function() { .pipe(gulp.dest("dist/css")) .pipe(gulp.dest("src/css")) .pipe(rename("bootstrap-dialog.min.css")) - .pipe(minifyCSS()) + .pipe(cleanCSS()) .pipe(gulp.dest("dist/css")); }); diff --git a/package.json b/package.json index 8d0b91c..aef9564 100644 --- a/package.json +++ b/package.json @@ -24,17 +24,17 @@ }, "homepage": "http://nakupanda.github.io/bootstrap3-dialog", "devDependencies": { - "bootstrap": ">=3.1.0", + "bootstrap": "^3.3.7", "eslint": ">=0.6.2", - "gulp": ">=3.8.1", + "gulp": "^3.9.1", "gulp-clean": ">=0.3.0", + "gulp-clean-css": "^3.9.3", "gulp-concat": "^2.5.2", "gulp-eslint": ">=0.1.7", "gulp-less": ">=1.2.3", - "gulp-minify-css": "^0.3.4", "gulp-notify": ">=1.3.1", "gulp-rename": ">=1.2.0", - "gulp-streamify": "0.0.5", + "gulp-streamify": "^1.0.2", "gulp-uglify": ">=0.3.0", "vinyl-source-stream": "^0.1.1" } From ac6d0c797d8ac904efaf8bc03128cdb6fd6f8925 Mon Sep 17 00:00:00 2001 From: Sergey Nagaytsev Date: Tue, 20 Mar 2018 15:43:48 +0300 Subject: [PATCH 2/2] FIX jQuery 3.3.1 deprecations --- examples/index.html | 4 ++-- src/js/bootstrap-dialog.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/index.html b/examples/index.html index 19bea23..c064452 100644 --- a/examples/index.html +++ b/examples/index.html @@ -190,7 +190,7 @@

Manipulating Buttons

message: function(dialog) { var $content = $('
'); var $footerButton = dialog.getButton('btn-1'); - $content.find('button').click({$footerButton: $footerButton}, function(event) { + $content.find('button').on('click',{$footerButton: $footerButton}, function(event) { event.data.$footerButton.enable(); event.data.$footerButton.stopSpin(); dialog.setClosable(true); @@ -379,7 +379,7 @@

Button with identifier

}); dialog.realize(); var btn1 = dialog.getButton('btn-1'); - btn1.click({'name': 'Apple'}, function(event){ + btn1.on('click',{'name': 'Apple'}, function(event){ alert('Hi, ' + event.data.name); }); dialog.open(); diff --git a/src/js/bootstrap-dialog.js b/src/js/bootstrap-dialog.js index b613564..2a6956d 100644 --- a/src/js/bootstrap-dialog.js +++ b/src/js/bootstrap-dialog.js @@ -312,7 +312,7 @@ } }); if (lastDialogInstance !== null) { - lastDialogInstance.getModal().focus(); + lastDialogInstance.getModal().trigger('focus'); } }; @@ -1092,7 +1092,7 @@ var dialog = event.data.dialog; if (typeof dialog.registeredButtonHotkeys[event.which] !== 'undefined') { var $button = $(dialog.registeredButtonHotkeys[event.which]); - !$button.prop('disabled') && !$button.is(':focus') && $button.focus().trigger('click'); + !$button.prop('disabled') && !$button.is(':focus') && $button.trigger('focus').trigger('click'); } });