From cf6b64426f3a14adffa3bf322d5b095d93f8e571 Mon Sep 17 00:00:00 2001 From: mistic100 Date: Sun, 10 Jan 2016 12:28:16 +0100 Subject: [PATCH] Version 2.2.0 --- Gruntfile.js | 2 +- README.md | 2 +- bootstrap-confirmation.js | 2 +- bootstrap-confirmation.min.js | 6 +++--- bower.json | 6 +++--- package.json | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 93d2a58..a8d4267 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -6,7 +6,7 @@ module.exports = function(grunt) { '/*!\n'+ ' * Bootstrap Confirmation <%= pkg.version %>\n'+ ' * Copyright 2013 Nimit Suwannagate \n'+ - ' * Copyright <%= grunt.template.today("yyyy") %> Damien "Mistic" Sorel \n'+ + ' * Copyright 2014-<%= grunt.template.today("yyyy") %> Damien "Mistic" Sorel \n'+ ' * Licensed under the Apache License, Version 2.0 (the "License")\n'+ ' */', diff --git a/README.md b/README.md index 51e2d07..61d72c6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Bootstrap-Confirmation -[![Bower version](https://badge.fury.io/bo/bootstrap-confirmation2.svg)](http://badge.fury.io/bo/bootstrap-confirmation2) +[![Bower version](https://img.shields.io/bower/v/bootstrap-confirmation2.svg?style=flat-square)](http://mistic100.github.io/Bootstrap-Confirmation) Bootstrap plugin for on-place confirm boxes using Popover. diff --git a/bootstrap-confirmation.js b/bootstrap-confirmation.js index 881a55b..80553d7 100644 --- a/bootstrap-confirmation.js +++ b/bootstrap-confirmation.js @@ -1,7 +1,7 @@ /*! * Bootstrap Confirmation * Copyright 2013 Nimit Suwannagate - * Copyright 2014 Damien "Mistic" Sorel + * Copyright 2014-2016 Damien "Mistic" Sorel * Licensed under the Apache License, Version 2.0 (the "License") */ diff --git a/bootstrap-confirmation.min.js b/bootstrap-confirmation.min.js index 309619f..c74d328 100644 --- a/bootstrap-confirmation.min.js +++ b/bootstrap-confirmation.min.js @@ -1,7 +1,7 @@ /*! - * Bootstrap Confirmation 2.1.3 + * Bootstrap Confirmation 2.2.0 * Copyright 2013 Nimit Suwannagate - * Copyright 2015 Damien "Mistic" Sorel + * Copyright 2014-2016 Damien "Mistic" Sorel * Licensed under the Apache License, Version 2.0 (the "License") */ -!function(a){"use strict";function b(a){for(var b=window,c=a.split("."),d=c.pop(),e=0,f=c.length;f>e;e++)b=b[c[e]];return function(){b[d].call(this)}}if(!a.fn.popover)throw new Error("Confirmation requires popover.js");var c=function(b,c){this.init("confirmation",b,c);var d=this;this.options.selector||(this.$element.attr("href")&&(this.options.href=this.$element.attr("href"),this.$element.removeAttr("href"),this.$element.attr("target")&&(this.options.target=this.$element.attr("target"))),this.$element.on(d.options.trigger,function(a,b){b||(a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation())}),this.$element.on("confirmed.bs.confirmation",function(b){a(this).trigger(d.options.trigger,[!0])}),this.$element.on("show.bs.confirmation",function(b){d.options.singleton&&a(d.options._selector).not(a(this)).filter(function(){return void 0!==a(this).data("bs.confirmation")}).confirmation("hide")})),this.options._isDelegate||(this.eventBody=!1,this.uid=this.$element[0].id||this.getUID("group_"),this.$element.on("shown.bs.confirmation",function(b){if(d.options.popout&&!d.eventBody){a(this);d.eventBody=a("body").on("click.bs.confirmation."+d.uid,function(b){a(d.options._selector).is(b.target)||(a(d.options._selector).filter(function(){return void 0!==a(this).data("bs.confirmation")}).confirmation("hide"),a("body").off("click.bs."+d.uid),d.eventBody=!1)})}}))};c.DEFAULTS=a.extend({},a.fn.popover.Constructor.DEFAULTS,{placement:"top",title:"Are you sure?",html:!0,href:!1,popout:!1,singleton:!1,target:"_self",onConfirm:a.noop,onCancel:a.noop,btnOkClass:"btn-xs btn-primary",btnOkIcon:"glyphicon glyphicon-ok",btnOkLabel:"Yes",btnCancelClass:"btn-xs btn-default",btnCancelIcon:"glyphicon glyphicon-remove",btnCancelLabel:"No",template:'

'}),c.prototype=a.extend({},a.fn.popover.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.init=function(b,c,d){a.fn.popover.Constructor.prototype.init.call(this,b,c,d),this.options._isDelegate=!1,d.selector?this.options._selector=this._options._selector=d._root_selector+" "+d.selector:d._selector?(this.options._selector=d._selector,this.options._isDelegate=!0):this.options._selector=d._root_selector},c.prototype.setContent=function(){var b=this,c=this.tip(),d=this.options;c.find(".popover-title")[d.html?"html":"text"](this.getTitle()),c.find('[data-apply="confirmation"]').addClass(d.btnOkClass).html(d.btnOkLabel).prepend(a("").addClass(d.btnOkIcon)," ").off("click").one("click",function(a){b.getOnConfirm.call(b).call(b.$element),b.$element.trigger("confirmed.bs.confirmation"),b.$element.confirmation("hide")}),d.href&&"#"!=d.href&&c.find('[data-apply="confirmation"]').attr({href:d.href,target:d.target}),c.find('[data-dismiss="confirmation"]').addClass(d.btnCancelClass).html(d.btnCancelLabel).prepend(a("").addClass(d.btnCancelIcon)," ").off("click").one("click",function(a){b.getOnCancel.call(b).call(b.$element),b.$element.trigger("canceled.bs.confirmation"),b.$element.confirmation("hide")}),c.removeClass("fade top bottom left right in"),c.find(".popover-title").html()||c.find(".popover-title").hide()},c.prototype.getOnConfirm=function(){return this.$element.attr("data-on-confirm")?b(this.$element.attr("data-on-confirm")):this.options.onConfirm},c.prototype.getOnCancel=function(){return this.$element.attr("data-on-cancel")?b(this.$element.attr("data-on-cancel")):this.options.onCancel};var d=a.fn.confirmation;a.fn.confirmation=function(b){var d="object"==typeof b&&b||{};return d._root_selector=this.selector,this.each(function(){var e=a(this),f=e.data("bs.confirmation");(f||"destroy"!=b)&&(f||e.data("bs.confirmation",f=new c(this,d)),"string"==typeof b&&f[b]())})},a.fn.confirmation.Constructor=c,a.fn.confirmation.noConflict=function(){return a.fn.confirmation=d,this}}(jQuery); \ No newline at end of file +!function(a){"use strict";function b(a){for(var b=window,c=a.split("."),d=c.pop(),e=0,f=c.length;f>e;e++)b=b[c[e]];return function(){b[d].call(this)}}if(!a.fn.popover)throw new Error("Confirmation requires popover.js");var c=function(b,c){c.trigger="click",this.init("confirmation",b,c),this.options._isDelegate=!1,c.selector?this.options._selector=this._options._selector=c._root_selector+" "+c.selector:c._selector?(this.options._selector=c._selector,this.options._isDelegate=!0):this.options._selector=c._root_selector;var d=this;this.options.selector||(this.options._attributes={},this.options.copyAttributes?"string"==typeof this.options.copyAttributes&&(this.options.copyAttributes=this.options.copyAttributes.split(" ")):this.options.copyAttributes=[],this.options.copyAttributes.forEach(function(a){this.options._attributes[a]=this.$element.attr(a)},this),this.$element.on(d.options.trigger,function(a,b){b||(a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation())}),this.$element.on("show.bs.confirmation",function(b){d.options.singleton&&a(d.options._selector).not(a(this)).filter(function(){return void 0!==a(this).data("bs.confirmation")}).confirmation("hide")})),this.options._isDelegate||(this.eventBody=!1,this.uid=this.$element[0].id||this.getUID("group_"),this.$element.on("shown.bs.confirmation",function(b){if(d.options.popout&&!d.eventBody){a(this);d.eventBody=a("body").on("click.bs.confirmation."+d.uid,function(b){a(d.options._selector).is(b.target)||(a(d.options._selector).filter(function(){return void 0!==a(this).data("bs.confirmation")}).confirmation("hide"),a("body").off("click.bs."+d.uid),d.eventBody=!1)})}}))};c.DEFAULTS=a.extend({},a.fn.popover.Constructor.DEFAULTS,{placement:"top",title:"Are you sure?",html:!0,popout:!1,singleton:!1,copyAttributes:"href target",onConfirm:a.noop,onCancel:a.noop,btnOkClass:"btn-xs btn-primary",btnOkIcon:"glyphicon glyphicon-ok",btnOkLabel:"Yes",btnCancelClass:"btn-xs btn-default",btnCancelIcon:"glyphicon glyphicon-remove",btnCancelLabel:"No",template:'

'}),c.prototype=a.extend({},a.fn.popover.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var b=this,c=this.tip(),d=this.options;c.find(".popover-title")[d.html?"html":"text"](this.getTitle()),c.find('[data-apply="confirmation"]').addClass(d.btnOkClass).html(d.btnOkLabel).attr(this.options._attributes).prepend(a("").addClass(d.btnOkIcon)," ").off("click").one("click",function(a){b.getOnConfirm.call(b).call(b.$element),b.$element.trigger("confirmed.bs.confirmation"),b.$element.trigger(b.options.trigger,[!0]),b.$element.confirmation("hide")}),c.find('[data-dismiss="confirmation"]').addClass(d.btnCancelClass).html(d.btnCancelLabel).prepend(a("").addClass(d.btnCancelIcon)," ").off("click").one("click",function(a){b.getOnCancel.call(b).call(b.$element),b.inState&&(b.inState.click=!1),b.$element.trigger("canceled.bs.confirmation"),b.$element.confirmation("hide")}),c.removeClass("fade top bottom left right in"),c.find(".popover-title").html()||c.find(".popover-title").hide()},c.prototype.getOnConfirm=function(){return this.$element.attr("data-on-confirm")?b(this.$element.attr("data-on-confirm")):this.options.onConfirm},c.prototype.getOnCancel=function(){return this.$element.attr("data-on-cancel")?b(this.$element.attr("data-on-cancel")):this.options.onCancel};var d=a.fn.confirmation;a.fn.confirmation=function(b){var d="object"==typeof b&&b||{};return d._root_selector=this.selector,this.each(function(){var e=a(this),f=e.data("bs.confirmation");(f||"destroy"!=b)&&(f||e.data("bs.confirmation",f=new c(this,d)),"string"==typeof b&&f[b]())})},a.fn.confirmation.Constructor=c,a.fn.confirmation.noConflict=function(){return a.fn.confirmation=d,this}}(jQuery); \ No newline at end of file diff --git a/bower.json b/bower.json index 8373cde..bc23d38 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,8 @@ { "name": "bootstrap-confirmation2", - "version": "2.1.2", - "homepage": "https://github.com/mistic100/Bootstrap-Confirmation", + "version": "2.2.0", + "homepage": "http://mistic100.github.io/Bootstrap-Confirmation", + "description": "Bootstrap plugin for on-place confirm boxes using Popover", "authors": [ "ethaizone", { @@ -9,7 +10,6 @@ "homepage": "http://www.strangeplanet.fr" } ], - "description": "Bootstrap plugin for on-place confirm boxes using Popover", "main": "bootstrap-confirmation.js", "keywords": [ "confirmation", diff --git a/package.json b/package.json index ba82bb3..8cd10a6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bootstrap-confirmation2", - "version": "2.1.3", - "homepage": "https://github.com/mistic100/Bootstrap-Confirmation", + "version": "2.2.0", + "homepage": "http://mistic100.github.io/Bootstrap-Confirmation", "description": "Bootstrap plugin for on-place confirm boxes using Popover", "authors": [ "ethaizone",