var no_show = (function ($, window, jQuery) { var _vars_ = {}; return { set_vars: function (options) { $.extend(_vars_, options || {}); }, get_vars : function(){ return _vars_; }, message_reamining_seats : function(ev,event_schedule_id) { Helper.help.ajax( app.get_vars().baseurl+"check_remaining_seats/"+event_schedule_id, 'post' , false, function(result){ app.modal.confirm_box({ "message" : result.message, "_continue" : function() { no_show.export_no_show_list(ev,event_schedule_id) }, "id" : "save_confirm_box", "className" : "save_confirm_box" }); }); }, export_no_show_list : function(ev,event_schedule_id) { var event = $(ev); window.location = app.get_vars().baseurl+"export_noshow/"+event_schedule_id; }, import_no_show_list : function() { if (typeof FormData !== 'undefined') { var eventfiles = document.getElementById("upload_noshow"); if(eventfiles.files.length >0){ var file = (eventfiles.files[0].name).split("."); if(file[file.length-1] != "" && (file[file.length-1]=="xlsx" || file[file.length-1] == "xls")) { app.modal.confirm_box({ "message" : "Êtes-vous sûr de vouloir importer ce fichier?

"+app.get_vars()._app.cma_msg.note+"", "_continue" : function() { var formData = new FormData( $("#form_upload_excel")[0] ); $.ajax({ url : app.get_vars().baseurl+"import_noshow", type : "post", data : formData, async : false, cache : false, contentType : false, processData : false, success: function( result, textStatus, jQxhr ) { if(result.subscribers){ $("#modal_warnings").modal("show"); $.each(result.subscribers,function(i,v){ $(".subscribers_failed").append("