/*!
 * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014
 * @version 1.0.0
 *
 * Export Data Validation Module.
 *
 * Author: Kartik Visweswaran
 * Copyright: 2014, Kartik Visweswaran, Krajee.com
 * For more JQuery plugins visit http://plugins.krajee.com
 * For more Yii related demos visit http://demos.krajee.com
 */!function(t){var n=function(n,r){this.$element=t(n),this.confirmMsg=r.confirmMsg,this.$form=t("#"+r.formId),this.listen()};n.prototype={constructor:n,listen:function(){var n=this;n.$form.appendTo("body"),n.$element.on("click",function(r){if(r.preventDefault(),!n.confirmMsg||confirm(n.confirmMsg)){var e=t(this).data("format");n.$form.find('[name="export_type"]').val(e),n.$form.trigger("submit")}})}},t.fn.exportdata=function(r){var e=Array.apply(null,arguments);return e.shift(),this.each(function(){var a=t(this),o=a.data("exportdata"),i="object"==typeof r&&r;o||a.data("exportdata",o=new n(this,t.extend({},t.fn.exportdata.defaults,i,t(this).data()))),"string"==typeof r&&o[r].apply(o,e)})},t.fn.exportdata.defaults={filename:"export",alertMsg:"",confirmMsg:"",formId:""}}(window.jQuery);
