Improve javascript code and remove CSP errors

This commit is contained in:
Frédéric Guillot
2014-07-07 19:37:19 -03:00
parent 9f93407b5e
commit 7a64053cb8
11 changed files with 129 additions and 117 deletions

View File

@@ -1,33 +0,0 @@
(function () {
// Show popup
function popover_show(content)
{
$("body").append('<div id="popover-container"><div id="popover-content">' + content + '</div></div>');
$("#popover-container").click(function() {
$(this).remove();
});
$("#popover-content").click(function(e) {
e.stopPropagation();
});
}
$(".popover").click(function(e) {
e.preventDefault();
e.stopPropagation();
$.get($(this).attr("href"), function(data) {
popover_show(data);
});
});
$("#form-date_due").datepicker({
showOtherMonths: true,
selectOtherMonths: true,
dateFormat: 'yy-mm-dd'
});
}());