/home/techb158/exp.abdallabala.com/ui/lib
NameSizeModeActions
ace/-0755rm
c3/-0755rm
chart/-0755rm
contacts/-0755rm
css/-0755rm
dashboard/-0755rm
dp/-0755rm
dropzone/-0755rm
dt/-0755rm
fc/-0755rm
fonts/-0755rm
footable/-0755rm
ibilling/-0755rm
icons/-0755rm
imgcrop/-0755rm
imgs/-0755rm
invoices/-0755rm
js/-0755rm
jslib/-0755rm
moment/-0755rm
multi-select/-0755rm
orders/-0755rm
popover/-0755rm
prism/-0755rm
redactor/-0755rm
s2/-0755rm
select/-0755rm
settings/-0755rm
sn/-0755rm
spectrum/-0755rm
terminal/-0755rm
tinymce/-0755rm
toggle/-0755rm
transactions/-0755rm
validator/-0755rm
.DS_Store102440644editdlrm
add-contact.js61050644editdlrm
app.js144100644editdlrm
blockui.js199120644editdlrm
clipboard.min.js101120644editdlrm
deposit.js64630644editdlrm
edit-invoice-v2.js172420644editdlrm
edit_invoice_v2n.js112360644editdlrm
expense.js38250644editdlrm
ibilling.js6250440644editdlrm
index.html1120644editdlrm
invoice.js157390644editdlrm
invoice_add_v2.js113600644editdlrm
jquery.steps.min.js136340644editdlrm
locale.js4010644editdlrm
login.js14610644editdlrm
modal.css46960644editdlrm
modal.js266340644editdlrm
numeric.js636160644editdlrm
profile.js145530644editdlrm
progress.js61670644editdlrm
quicksearch.js54620644editdlrm
quote-edit.js104330644editdlrm
quotes.js95370644editdlrm
require.js155240644editdlrm
tr-manage.js26150644editdlrm
transfer.js17020644editdlrm
tr_filter.js36070644editdlrm
typeahead.bundle.min.js397490644editdlrm
Edit: /home/techb158/exp.abdallabala.com/ui/lib/deposit.js (6463B)
Dropzone.autoDiscover = false; $(document).ready(function () { $('[data-toggle="datepicker"]').datepicker(); $("#account").select2({ theme: "bootstrap", language: { noResults: function () { return $("#_lan_no_results_found").val(); } } } ); $("#cats").select2({ theme: "bootstrap", language: { noResults: function () { return $("#_lan_no_results_found").val(); } } } ); $("#pmethod").select2({ theme: "bootstrap", language: { noResults: function () { return $("#_lan_no_results_found").val(); } } } ); $("#payer").select2({ theme: "bootstrap", language: { noResults: function () { return $("#_lan_no_results_found").val(); } } } ); $('#tags').select2({ tags: true, tokenSeparators: [','], theme: "bootstrap", language: { noResults: function () { return $("#_lan_no_results_found").val(); } } }); //$('.amount').autoNumeric('init'); $("#a_hide").hide(); $("#emsg").hide(); $("#a_toggle").click(function(e){ e.preventDefault(); $("#a_hide").toggle( "slow" ); }); /* * File upload * */ //Dropzone.options.myAwesomeDropzone = { // // autoProcessQueue: false, // uploadMultiple: true, // parallelUploads: 100, // maxFiles: 100, // // // Dropzone settings // init: function() { // var myDropzone = this; // // this.element.querySelector("button[type=submit]").addEventListener("click", function(e) { // e.preventDefault(); // e.stopPropagation(); // myDropzone.processQueue(); // }); // this.on("sendingmultiple", function() { // }); // this.on("successmultiple", function(files, response) { // }); // this.on("errormultiple", function(files, response) { // }); // } // //} var _url = $("#_url").val(); // $('#tags').select2({ // tags: true, // tokenSeparators: [','], // createSearchChoice: function (term) { // return { // id: $.trim(term), // text: $.trim(term) + ' (new tag)' // }; // }, // ajax: { // url: _url+'tags/income/', // dataType: 'json', // data: function(term, page) { // return { // q: term // }; // }, // results: function(data, page) { // return { // results: data // }; // } // }, // // // Take default tags from the input value // initSelection: function (element, callback) { // var data = []; // // function splitVal(string, separator) { // var val, i, l; // if (string === null || string.length < 1) return []; // val = string.split(separator); // for (i = 0, l = val.length; i < l; i = i + 1) val[i] = $.trim(val[i]); // return val; // } // // $(splitVal(element.val(), ",")).each(function () { // data.push({ // id: this, // text: this // }); // }); // // callback(data); // }, // // // Some nice improvements: // // // max tags is 3 // maximumSelectionSize: 15, // // // override message for max tags // formatSelectionTooBig: function (limit) { // return "Max tags is " + limit; // } //}); var upload_resp; var $ib_form_submit = $("#submit"); var ib_file = new Dropzone("#upload_container", { url: _url + "transactions/handle_attachment/", maxFiles: 1, acceptedFiles: "image/*,application/pdf" } ); ib_file.on("sending", function() { $ib_form_submit.prop('disabled', true); }); ib_file.on("success", function(file,response) { $ib_form_submit.prop('disabled', false); upload_resp = response; if(upload_resp.success == 'Yes'){ toastr.success(upload_resp.msg); // $file_link.val(upload_resp.file); // files.push(upload_resp.file); // // console.log(files); $('#attachments').val(function(i,val) { return val + (!val ? '' : ',') + upload_resp.file; }); } else{ toastr.error(upload_resp.msg); } }); $ib_form_submit.click(function (e) { e.preventDefault(); $('#ibox_form').block({ message: null }); var _url = $("#_url").val(); $.post(_url + 'transactions/deposit-post/', { account: $('#account').val(), date: $('#date').val(), amount: $('#amount').val(), cats: $('#cats').val(), description: $('#description').val(), attachments: $('#attachments').val(), tags: $('#tags').val(), payer: $('#payer').val(), pmethod: $('#pmethod').val(), ref: $('#ref').val() }) .done(function (data) { var sbutton = $("#submit"); var _url = $("#_url").val(); if ($.isNumeric(data)) { location.reload(); } else { $('#ibox_form').unblock(); var body = $("html, body"); body.animate({scrollTop:0}, '1000', 'swing'); $("#emsgbody").html(data); $("#emsg").show("slow"); } }); }); });