$('#listClients').on(
'click',
'button',
function(){
event.preventDefault();
console.log('1');
}
);
$('#tablePaySave').click(function() {
var test = [];
var month = 1;
var year = $('#tablePayYear').val();
$('.table').find(':input').each(function(i, input) {
var cell = {};
cell['id'] = input.id;
cell['type'] = $(this).data('type');
cell['value'] = input.value;
cell['month'] = month;
month++;
if (month > 12) {
month = 1;
};
cell['year'] = year;
test.push(cell);
});
$.ajax({
type: "POST",
url: "/accounting/save",
data: {test: test},
dataType: "json",
success: function(data) {
console.log('success');
},
error: function(data) {
console.log('error');
}
});
});
var domain = location.protocol + '//' + location.host;
var currentURL = location.href;
$(document).ready(function(){
$('#left-sidebar > ul > li >a').each(function () {
if (currentURL.indexOf(domain + $(this).attr('href')) === 0)
{
$(this).addClass('select');
}
});
});