/
home
/
techb158
/
exp.abdallabala.com
/
ui
/
lib
/
/home/techb158/exp.abdallabala.com/ui/lib
mkdir
upload
Name
Size
Mode
Actions
ace/
-
0755
rm
c3/
-
0755
rm
chart/
-
0755
rm
contacts/
-
0755
rm
css/
-
0755
rm
dashboard/
-
0755
rm
dp/
-
0755
rm
dropzone/
-
0755
rm
dt/
-
0755
rm
fc/
-
0755
rm
fonts/
-
0755
rm
footable/
-
0755
rm
ibilling/
-
0755
rm
icons/
-
0755
rm
imgcrop/
-
0755
rm
imgs/
-
0755
rm
invoices/
-
0755
rm
js/
-
0755
rm
jslib/
-
0755
rm
moment/
-
0755
rm
multi-select/
-
0755
rm
orders/
-
0755
rm
popover/
-
0755
rm
prism/
-
0755
rm
redactor/
-
0755
rm
s2/
-
0755
rm
select/
-
0755
rm
settings/
-
0755
rm
sn/
-
0755
rm
spectrum/
-
0755
rm
terminal/
-
0755
rm
tinymce/
-
0755
rm
toggle/
-
0755
rm
transactions/
-
0755
rm
validator/
-
0755
rm
.DS_Store
10244
0644
edit
dl
rm
add-contact.js
6105
0644
edit
dl
rm
app.js
14410
0644
edit
dl
rm
blockui.js
19912
0644
edit
dl
rm
clipboard.min.js
10112
0644
edit
dl
rm
deposit.js
6463
0644
edit
dl
rm
edit-invoice-v2.js
17242
0644
edit
dl
rm
edit_invoice_v2n.js
11236
0644
edit
dl
rm
expense.js
3825
0644
edit
dl
rm
ibilling.js
625044
0644
edit
dl
rm
index.html
112
0644
edit
dl
rm
invoice.js
15739
0644
edit
dl
rm
invoice_add_v2.js
11360
0644
edit
dl
rm
jquery.steps.min.js
13634
0644
edit
dl
rm
locale.js
401
0644
edit
dl
rm
login.js
1461
0644
edit
dl
rm
modal.css
4696
0644
edit
dl
rm
modal.js
26634
0644
edit
dl
rm
numeric.js
63616
0644
edit
dl
rm
profile.js
14553
0644
edit
dl
rm
progress.js
6167
0644
edit
dl
rm
quicksearch.js
5462
0644
edit
dl
rm
quote-edit.js
10433
0644
edit
dl
rm
quotes.js
9537
0644
edit
dl
rm
require.js
15524
0644
edit
dl
rm
tr-manage.js
2615
0644
edit
dl
rm
transfer.js
1702
0644
edit
dl
rm
tr_filter.js
3607
0644
edit
dl
rm
typeahead.bundle.min.js
39749
0644
edit
dl
rm
Edit:
/home/techb158/exp.abdallabala.com/ui/lib/invoice_add_v2.js
(11360B)
$(document).ready(function () { var _url = $("#_url").val(); $('.amount').autoNumeric('init'); $('#notes').redactor( { minHeight: 200, // pixels plugins: ['fontcolor'] } ); var $invoice_items = $('#invoice_items'); $('.item_name').redactor({paragraphize: false, replaceDivs: false, linebreaks: true}); $invoice_items.on('change', 'select', function(){ // $('#taxtotal').html('dd'); var taxrate = $('#stax').val().replace(',', '.'); // $(this).val(taxrate); }); var item_remove = $('#item-remove'); item_remove.hide(); function update_address(){ var _url = $("#_url").val(); var cid = $('#cid').val(); if(cid != ''){ $.post(_url + 'contacts/render-address/', { cid: cid }) .done(function (data) { var adrs = $("#address"); adrs.html(data); }); } } update_address(); $('#cid').select2({ theme: "bootstrap", language: { noResults: function () { return $("#_lan_no_results_found").val(); } } }) .on("change", function(e) { // mostly used event, fired to the original element when the value changes // log("change val=" + e.val); // alert(e.val); update_address(); }); item_remove.on('click', function(){ $("#invoice_items tr.info").fadeOut(300, function(){ $(this).remove(); }); }); var $modal = $('#ajax-modal'); $('#item-add').on('click', function(){ // create the backdrop and wait for next modal to be triggered $('body').modalmanager('loading'); $modal.load( _url + 'ps/modal-list/', '', function(){ $modal.modal(); }); }); /* / @since v 2.0 */ $('#contact_add').on('click', function(e){ e.preventDefault(); // create the backdrop and wait for next modal to be triggered $('body').modalmanager('loading'); $modal.load( _url + 'contacts/modal_add/', '', function(){ $modal.modal(); $("#ajax-modal .country").select2({ theme: "bootstrap" }); }); }); var rowNum = 0; $('#blank-add').on('click', function(){ rowNum++; $invoice_items.find('tbody') .append( '<tr> <td></td> <td><textarea class="form-control item_name" name="desc[]" rows="3" id="i_' + rowNum + '"></textarea></td> <td><input type="text" class="form-control qty" value="" name="qty[]"></td> <td><input type="text" class="form-control item_price" name="amount[]" value=""></td> <td class="ltotal"><input type="text" class="form-control lvtotal" readonly value=""></td> <td> <select class="form-control taxed" name="taxed[]"> <option value="Yes">Yes</option> <option value="No" selected>No</option></select></td></tr>' ); $('#i_' + rowNum).redactor({paragraphize: false, replaceDivs: false, linebreaks: true}); }); $invoice_items.on('click', '.redactor-editor', function(){ $("tr").removeClass("info"); $(this).closest('tr').addClass("info"); item_remove.show(); }); $modal.on('click', '.update', function(){ var tableControl= document.getElementById('items_table'); $modal.modal('loading'); $modal.modal('loading'); //$modal // .modal('loading') // .find('.modal-body') // .prepend('<div class="alert alert-info fade in">' + // 'Updated!<button type="button" class="close" data-dismiss="alert">×</button>' + // '</div>'); // input type="text" class="form-control item_name" name="desc[]" value="' + item_name + '"> // var obj = new Array(); $('input:checkbox:checked', tableControl).each(function() { rowNum++; var item_code = $(this).closest('tr').find('td:eq(1)').text(); var item_name = $(this).closest('tr').find('td:eq(2)').text(); var item_price = $(this).closest('tr').find('td:eq(3)').text(); // obj.push(innertext); $invoice_items.find('tbody') .append( '<tr> <td>' + item_code + '</td> <td><textarea class="form-control item_name" name="desc[]" rows="3" id="i_' + rowNum + '">' + item_name + '</textarea></td> <td><input type="text" class="form-control qty" value="1" name="qty[]"></td> <td><input type="text" class="form-control item_price" name="amount[]" value="' + item_price + '"></td> <td class="ltotal"><input type="text" class="form-control lvtotal" readonly value=""></td> <td> <select class="form-control taxed" name="taxed[]"> <option value="Yes">Yes</option> <option value="No" selected>No</option></select></td></tr>' ); $('#i_' + rowNum).redactor({paragraphize: false, replaceDivs: false, linebreaks: true}); }); // console.debug(obj); // Write it to the console // calculateTotal(); $modal.modal('hide'); }); $modal.on('click', '.contact_submit', function(e){ e.preventDefault(); // var tableControl= document.getElementById('items_table'); $modal.modal('loading'); var _url = $("#_url").val(); $.post(_url + 'contacts/add-post/', { account: $('#account').val(), company: $('#company').val(), address: $('#m_address').val(), city: $('#city').val(), state: $('#state').val(), zip: $('#zip').val(), country: $('#country').val(), phone: $('#phone').val(), email: $('#email').val() }) .done(function (data) { var _url = $("#_url").val(); if ($.isNumeric(data)) { // location.reload(); var is_recurring = $('#is_recurring').val(); if(is_recurring == 'yes'){ window.location = _url + 'invoices/add/recurring/' + data + '/'; } else{ window.location = _url + 'invoices/add/1/' + data + '/'; } } else { $modal .modal('loading') .find('.modal-body') .prepend('<div class="alert alert-danger fade in">' + data + '<button type="button" class="close" data-dismiss="alert">×</button>' + '</div>'); $("#cid").select2('data', {id: newID, text: newText}); } }); }); $("#add_discount").click(function (e) { e.preventDefault(); var s_discount_amount = $('#discount_amount'); var c_discount = s_discount_amount.val(); var c_discount_type = $('#discount_type').val(); var p_checked = ""; var f_checked = ""; if( c_discount_type == "p" ){ p_checked = 'checked="checked"'; }else{ f_checked = 'checked="checked"'; } bootbox.dialog({ title: $("#_lan_set_discount").val(), message: '<div class="row"> ' + '<div class="col-md-12"> ' + '<form class="form-horizontal" action="javascript:void(0);"> ' + '<div class="form-group"> ' + '<label class="col-md-4 control-label" for="set_discount">' + $("#_lan_discount").val() +'</label> ' + '<div class="col-md-4"> ' + '<input id="set_discount" name="set_discount" type="text" class="form-control input-md" value="' + c_discount + '"> ' + '</div> ' + '</div> ' + '<div class="form-group"> ' + '<label class="col-md-4 control-label" for="set_discount_type">' + $("#_lan_discount_type").val() +'</label> ' + '<div class="col-md-4"> <div class="radio"> <label for="set_discount_type-0"> ' + '<input type="radio" name="set_discount_type" id="set_discount_type-0" value="p" ' + p_checked + '> ' + '' + $("#_lan_percentage").val() +' (%) </label> ' + '</div><div class="radio"> <label for="set_discount_type-1"> ' + '<input type="radio" name="set_discount_type" id="set_discount_type-1" value="f" ' + f_checked + '> ' + $("#_lan_fixed_amount").val() +' </label> ' + '</div> ' + '</div> </div>' + '</form> </div> </div>', buttons: { success: { label: $("#_lan_btn_save").val(), className: "btn-success", callback: function () { var discount_amount = $('#set_discount').val(); var discount_type = $("input[name='set_discount_type']:checked").val(); $('#discount_amount').val(discount_amount); $('#discount_type').val(discount_type); //calculateTotal(); //updateTax(); //updateTotal(); } } } } ); }); //var callbacks = $.Callbacks(); //callbacks.add( updateTotal ); //callbacks.fire( alert('done') ); $(".progress").hide(); $("#emsg").hide(); $("#submit").click(function (e) { e.preventDefault(); $('#ibox_form').block({ message: null }); var _url = $("#_url").val(); $.post(_url + 'invoices/add-post/', $('#invform').serialize(), function(data){ var _url = $("#_url").val(); if ($.isNumeric(data)) { window.location = _url + 'invoices/edit/' + data + '/'; } else { $('#ibox_form').unblock(); var body = $("html, body"); body.animate({scrollTop:0}, '1000', 'swing'); $("#emsgbody").html(data); $("#emsg").show("slow"); } }); }); $("#save_n_close").click(function (e) { e.preventDefault(); $('#ibox_form').block({ message: null }); var _url = $("#_url").val(); $.post(_url + 'invoices/add-post/', $('#invform').serialize(), function(data){ var _url = $("#_url").val(); if ($.isNumeric(data)) { window.location = _url + 'invoices/view/' + data + '/'; } else { $('#ibox_form').unblock(); var body = $("html, body"); body.animate({scrollTop:0}, '1000', 'swing'); $("#emsgbody").html(data); $("#emsg").show("slow"); } }); }); //function doStuff() { // $('.amount').autoNumeric('init'); // // alert('dd'); //} //setInterval(doStuff, 5000); });
Save
cmd:
run