transmet/js/funcs.js

46 lines
1.0 KiB
JavaScript
Raw Normal View History

$(document).ready( function () {
2015-05-14 15:29:01 +00:00
$("#datepicker").datepicker();
2015-05-15 14:26:50 +00:00
$(".confirm-export").confirm({
2015-05-14 15:29:01 +00:00
"text": "Mark current batch exported?",
"title": "Export confirmation",
"confirm": function(form) {
form.submit();
2015-05-14 15:29:01 +00:00
},
});
2015-05-16 19:48:42 +00:00
if( $('.addedLink').length > 0) {
setTimeout(function (){
window.close();
}, 500);
}
2015-05-16 21:29:31 +00: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 18:42:05 +00:00
e.target.parentElement.submit();
});
$('.cat-delete').confirm({
text: "Are you sure you want to delete this category?",
2015-11-20 04:00:33 +00:00
title: "Delete confrimation",
confirm: function(form) {
console.log("fooo");
form.submit();
}
2015-09-03 14:16:16 +00:00
});
$(".confirm-news-delete").confirm({
2015-09-03 14:16:16 +00:00
"text": "Delete news item?",
"title": "Delete confirmation",
2015-11-20 04:00:33 +00:00
confirm: function(form) {
form.submit();
}
});
});