Merge remote-tracking branch 'adv/es5-syntax'

This commit is contained in:
OzzieIsaacs 2017-09-01 20:12:22 +02:00
commit 429f4a11a9

View File

@ -8,18 +8,17 @@ tinymce.init({
selector: "#description",
branding: false,
menubar: "edit view format",
language
language: language
});
if (!Modernizr.inputtypes.date) {
$("#pubdate").datepicker({
format: "yyyy-mm-dd",
language
language: language
}).on("change", function () {
// Show localized date over top of the standard YYYY-MM-DD date
let pubDate;
const results = /(\d{4})[-\/\\](\d{1,2})[-\/\\](\d{1,2})/.exec(this.value); // YYYY-MM-DD
var pubDate;
var results = /(\d{4})[-\/\\](\d{1,2})[-\/\\](\d{1,2})/.exec(this.value); // YYYY-MM-DD
if (results) {
pubDate = new Date(results[1], parseInt(results[2], 10) - 1, results[3]) || new Date(this.value);
}
@ -29,6 +28,7 @@ if (!Modernizr.inputtypes.date) {
}).trigger("change");
}
}
/*
Takes a prefix, query typeahead callback, Bloodhound typeahead adapter
and returns the completions it gets from the bloodhound engine prefixed.
@ -43,6 +43,7 @@ function prefixedSource(prefix, query, cb, bhAdapter) {
cb(matches);
});
}
function getPath() {
var jsFileLocation = $("script[src*=edit_books]").attr("src"); // the js file path
jsFileLocation = jsFileLocation.replace("/static/js/edit_books.js", ""); // the js folder path