[FIX] web_editor: checkbox without text change can now be checked
This commit is contained in:
@@ -97,7 +97,7 @@ class Web_Editor(http.Controller):
|
||||
|
||||
li = htmlelem.find(".//li[@id='checklist-id-" + str(checklistId) + "']")
|
||||
|
||||
if not self._update_checklist_recursive(li, checked, children=True, ancestors=True):
|
||||
if not li or not self._update_checklist_recursive(li, checked, children=True, ancestors=True):
|
||||
return value
|
||||
|
||||
value = etree.tostring(htmlelem[0][0], encoding='utf-8', method='html')[5:-6]
|
||||
|
||||
@@ -1790,6 +1790,7 @@ $.summernote.pluginEvents.insertUnorderedList = function (event, editor, layoutI
|
||||
}
|
||||
r.clean().select();
|
||||
event.preventDefault();
|
||||
|
||||
return false;
|
||||
};
|
||||
$.summernote.pluginEvents.insertOrderedList = function (event, editor, layoutInfo) {
|
||||
@@ -1797,6 +1798,7 @@ $.summernote.pluginEvents.insertOrderedList = function (event, editor, layoutInf
|
||||
};
|
||||
$.summernote.pluginEvents.insertCheckList = function (event, editor, layoutInfo) {
|
||||
$.summernote.pluginEvents.insertUnorderedList(event, editor, layoutInfo, "checklist");
|
||||
$(range.create().sc.parentNode).trigger('input'); // to update checklist-id
|
||||
};
|
||||
$.summernote.pluginEvents.indent = function (event, editor, layoutInfo, outdent) {
|
||||
var $editable = layoutInfo.editable();
|
||||
|
||||
Reference in New Issue
Block a user