transmet/js/funcs.js

36 lines
850 B
JavaScript
Raw Normal View History

$(document).ready( function () {
2015-05-14 17:29:01 +02:00
$("#datepicker").datepicker();
2015-05-15 16:26:50 +02:00
$(".confirm-export").confirm({
2015-05-14 17:29:01 +02:00
"text": "Mark current batch exported?",
"title": "Export confrimation",
confirm: function() {
2015-07-14 17:10:22 +02:00
window.location = "/export-commit";
2015-05-14 17:29:01 +02:00
},
});
2015-05-16 21:48:42 +02:00
if( $('.addedLink').length > 0) {
setTimeout(function (){
window.close();
}, 500);
}
2015-05-16 23:29:31 +02:00
$("form.form-add").submit( function(e) {
if ( $(".add-category").val() == -1) {
e.preventDefault();
$(".add-category-col").addClass("has-error");
}
});
$(".category-change-parent").change(function (e) {
2015-06-21 20:42:05 +02:00
e.target.parentElement.submit();
});
$('.cat-delete').confirm({
text: "Are you sure you want to delete this category?",
title: "Confrimation required",
confirmButton: "Yes",
cancelButton: "No",
});
});