Merge branch 'master' of https://github.com/janeczku/calibre-web
This commit is contained in:
+29
-22
@@ -10,25 +10,36 @@ if ($("#description").length) {
|
||||
menubar: "edit view format",
|
||||
language: language
|
||||
});
|
||||
|
||||
if (!Modernizr.inputtypes.date) {
|
||||
$("#pubdate").datepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
language: language
|
||||
}).on("change", function () {
|
||||
// Show localized date over top of the standard YYYY-MM-DD date
|
||||
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);
|
||||
$("#fake_pubdate")
|
||||
.val(pubDate.toLocaleDateString(language))
|
||||
.removeClass("hidden");
|
||||
}
|
||||
}).trigger("change");
|
||||
}
|
||||
}
|
||||
|
||||
if ($(".tiny_editor").length) {
|
||||
tinymce.init({
|
||||
selector: ".tiny_editor",
|
||||
branding: false,
|
||||
menubar: "edit view format",
|
||||
language: language
|
||||
});
|
||||
}
|
||||
|
||||
tiny_editor
|
||||
if (!Modernizr.inputtypes.date) {
|
||||
$("#pubdate").datepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
language: language
|
||||
}).on("change", function () {
|
||||
// Show localized date over top of the standard YYYY-MM-DD date
|
||||
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);
|
||||
$("#fake_pubdate")
|
||||
.val(pubDate.toLocaleDateString(language))
|
||||
.removeClass("hidden");
|
||||
}
|
||||
}).trigger("change");
|
||||
}
|
||||
|
||||
|
||||
if (!Modernizr.inputtypes.date) {
|
||||
$("#Publishstart").datepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
@@ -63,6 +74,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.
|
||||
@@ -78,11 +90,6 @@ function prefixedSource(prefix, query, cb, bhAdapter) {
|
||||
});
|
||||
}
|
||||
|
||||
/*function getPath() {
|
||||
var jsFileLocation = $("script[src*=edit_books]").attr("src"); // the js file path
|
||||
return jsFileLocation.substr(0, jsFileLocation.search("/static/js/edit_books.js")); // the js folder path
|
||||
}*/
|
||||
|
||||
var authors = new Bloodhound({
|
||||
name: "authors",
|
||||
datumTokenizer: function datumTokenizer(datum) {
|
||||
|
||||
@@ -533,7 +533,7 @@ $(function() {
|
||||
$("#pub_new").toggleClass("disabled");
|
||||
$("#pub_old").toggleClass("disabled");
|
||||
var alternative_text = $("#toggle_order_shelf").data('alt-text');
|
||||
$("#toggle_order_shelf")[0].attributes['data-alt-text'].value = $("#toggle_order_shelf").html();
|
||||
$("#toggle_order_shelf").data('alt-text', $("#toggle_order_shelf").html());
|
||||
$("#toggle_order_shelf").html(alternative_text);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user