fixed PermitFacts CSV Export button
This commit is contained in:
+71
-64
@@ -12,69 +12,75 @@ $(document).ready(function () {
|
||||
// ----------------------
|
||||
|
||||
ClassicEditor
|
||||
.create(document.querySelector('#alert_message'), {
|
||||
toolbar: {
|
||||
items: [
|
||||
'heading',
|
||||
'|',
|
||||
'bold',
|
||||
'italic',
|
||||
'underline',
|
||||
'link',
|
||||
'bulletedList',
|
||||
'numberedList',
|
||||
'|',
|
||||
'fontColor',
|
||||
'fontSize',
|
||||
'fontFamily',
|
||||
'|',
|
||||
'indent',
|
||||
'outdent',
|
||||
'alignment',
|
||||
'|',
|
||||
'horizontalLine',
|
||||
'insertTable',
|
||||
'|',
|
||||
'undo',
|
||||
'redo',
|
||||
'|'
|
||||
]},
|
||||
link: {
|
||||
addTargetToExternalLinks: true,
|
||||
defaultProtocol: "http://"
|
||||
.create(document.querySelector('#alert_message'), {
|
||||
toolbar: {
|
||||
items: [
|
||||
'heading',
|
||||
'|',
|
||||
'bold',
|
||||
'italic',
|
||||
'underline',
|
||||
'link',
|
||||
'bulletedList',
|
||||
'numberedList',
|
||||
'|',
|
||||
'fontColor',
|
||||
'fontSize',
|
||||
'fontFamily',
|
||||
'|',
|
||||
'indent',
|
||||
'outdent',
|
||||
'alignment',
|
||||
'|',
|
||||
'horizontalLine',
|
||||
'insertTable',
|
||||
'|',
|
||||
'undo',
|
||||
'redo',
|
||||
'|'
|
||||
]
|
||||
},
|
||||
link: {
|
||||
addTargetToExternalLinks: true,
|
||||
defaultProtocol: "http://"
|
||||
|
||||
}
|
||||
})
|
||||
.then(editor => {
|
||||
$CKEditor = editor;
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('CK-Editor error...');
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
})
|
||||
.then(editor => {
|
||||
$CKEditor = editor;
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('CK-Editor error...');
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
|
||||
// ------------
|
||||
// Date Pickers
|
||||
// ------------
|
||||
|
||||
$("#alert_starts_date").datepicker({format: "yyyy-mm-dd",
|
||||
$("#alert_starts_date").datepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
container: "div.starts-date",
|
||||
keyboardNavigation: false,
|
||||
autoclose: true,
|
||||
orientation: "bottom",
|
||||
todayBtn: "linked",
|
||||
todayHighlight: true});
|
||||
todayHighlight: true
|
||||
});
|
||||
|
||||
$("#alert_expires_date").datepicker({format: "yyyy-mm-dd",
|
||||
$("#alert_expires_date").datepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
container: "div.expires-date",
|
||||
keyboardNavigation: false,
|
||||
autoclose: true,
|
||||
orientation: "bottom",
|
||||
todayBtn: "linked",
|
||||
todayHighlight: true});
|
||||
todayHighlight: true
|
||||
});
|
||||
|
||||
$("#alert_starts_time").inputmask({alias: "datetime",
|
||||
$("#alert_starts_time").inputmask({
|
||||
alias: "datetime",
|
||||
placeholder: "HH:MM",
|
||||
inputFormat: "HH:MM",
|
||||
insertMode: false,
|
||||
@@ -82,7 +88,8 @@ $(document).ready(function () {
|
||||
hourFormat: 24
|
||||
});
|
||||
|
||||
$("#alert_expires_time").inputmask({alias: "datetime",
|
||||
$("#alert_expires_time").inputmask({
|
||||
alias: "datetime",
|
||||
placeholder: "HH:MM",
|
||||
inputFormat: "HH:MM",
|
||||
insertMode: false,
|
||||
@@ -146,11 +153,11 @@ $(document).ready(function () {
|
||||
$("#addAlert").submit(function (e) {
|
||||
|
||||
var alert_title = $("#alert_title"),
|
||||
alert_starts_date = $("#alert_starts_date"),
|
||||
alert_starts_time = $("#alert_starts_time"),
|
||||
alert_expires_date = $("#alert_expires_date"),
|
||||
alert_expires_time = $("#alert_expires_time"),
|
||||
alert_message = $("#alert_message");
|
||||
alert_starts_date = $("#alert_starts_date"),
|
||||
alert_starts_time = $("#alert_starts_time"),
|
||||
alert_expires_date = $("#alert_expires_date"),
|
||||
alert_expires_time = $("#alert_expires_time"),
|
||||
alert_message = $("#alert_message");
|
||||
|
||||
clearInputErrors();
|
||||
|
||||
@@ -197,10 +204,10 @@ $(document).ready(function () {
|
||||
return false;
|
||||
}
|
||||
|
||||
// if (isBlank(alert_message)) {
|
||||
// createInputError(alert_message, "Please enter a Message");
|
||||
// return false;
|
||||
// }
|
||||
// if (isBlank(alert_message)) {
|
||||
// createInputError(alert_message, "Please enter a Message");
|
||||
// return false;
|
||||
// }
|
||||
|
||||
if (!checkDateTime(alert_starts_date, alert_starts_time, alert_expires_date, alert_expires_time)) {
|
||||
createInputError(alert_expires_time, "Cannot be prior to Start");
|
||||
@@ -213,15 +220,15 @@ $(document).ready(function () {
|
||||
|
||||
$.post("./", $(this).serialize())
|
||||
|
||||
.done(function () {
|
||||
.done(function () {
|
||||
|
||||
$sessionStorage.action = $sessionStorage.addAlert || "";
|
||||
$sessionStorage.action = $sessionStorage.addAlert || "";
|
||||
|
||||
sessionStorage.setItem($application, JSON.stringify($sessionStorage));
|
||||
sessionStorage.setItem($application, JSON.stringify($sessionStorage));
|
||||
|
||||
formSubmit($sessionStorage);
|
||||
formSubmit($sessionStorage);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -234,11 +241,11 @@ $(document).ready(function () {
|
||||
function checkDateTime(alert_starts_date, alert_starts_time, alert_expires_date, alert_expires_time) {
|
||||
|
||||
var starts_date_parts = alert_starts_date.val().split("-"),
|
||||
starts_time_parts = alert_starts_time.val().split(":"),
|
||||
expires_date_parts = alert_expires_date.val().split("-"),
|
||||
expires_time_parts = alert_expires_time.val().split(":"),
|
||||
starts_date,
|
||||
expires_date;
|
||||
starts_time_parts = alert_starts_time.val().split(":"),
|
||||
expires_date_parts = alert_expires_date.val().split("-"),
|
||||
expires_time_parts = alert_expires_time.val().split(":"),
|
||||
starts_date,
|
||||
expires_date;
|
||||
|
||||
starts_date = new Date(starts_date_parts[0], parseInt(starts_date_parts[1], 10) - 1, starts_date_parts[2]);
|
||||
expires_date = new Date(expires_date_parts[0], parseInt(expires_date_parts[1], 10) - 1, expires_date_parts[2]);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
// ==========
|
||||
// Add County
|
||||
// ==========
|
||||
// ===================
|
||||
// Search Permit Facts
|
||||
// ===================
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
@@ -246,7 +246,7 @@ $(document).ready(function () {
|
||||
|
||||
$("#spinner-dialog").modal("show");
|
||||
|
||||
$sessionStorage.action = "Export_PermitFactsToExcel.export";
|
||||
$sessionStorage.action = "Export_PermitFactsToCSV.export";
|
||||
$sessionStorage.subscription_reference = $sessionStorage.subscription_serial;
|
||||
$sessionStorage.pagination = "off";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user