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:
@@ -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("") +
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user