1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-21 02:27:40 +00:00

html editor in books list

This commit is contained in:
Ozzie Isaacs
2021-10-19 19:10:40 +02:00
parent 9e4aeac16d
commit fe4db16a7e
7 changed files with 544 additions and 2 deletions

View File

@@ -149,6 +149,10 @@ $(function() {
}
}
};
if ($(this).attr("data-editable-type") == "wysihtml5") {
//if (this.id == "comments") {
element.editable.display = shorten_html;
}
var validateText = $(this).attr("data-edit-validate");
if (validateText) {
element.editable.validate = function (value) {
@@ -158,6 +162,7 @@ $(function() {
}
column.push(element);
});
// $.fn.editable.defaults.display = comment_display;
$("#books-table").bootstrapTable({
sidePagination: "server",
@@ -875,3 +880,10 @@ function user_handle (userId) {
});
$("#user-table").bootstrapTable("refresh");
}
function shorten_html(value, response) {
if(value) {
$(this).html("[...]");
// value.split('\n').slice(0, 2).join("") +
}
}