Commit 81aa70a2 authored by bbaer's avatar bbaer
Browse files

grey out tinymce controls when readonly

parent 67c7c5f8
......@@ -75,8 +75,10 @@ QfqNS.Helper = QfqNS.Helper || {};
$parent.on("change", function(e, configuration) {
if(configuration.disabled || configuration.readonly) {
me.setMode("readonly");
$(this).siblings(".mce-tinymce").addClass("qfq-tinymce-readonly");
} else {
me.setMode("design");
$(this).siblings(".mce-tinymce").removeClass("qfq-tinymce-readonly");
}
});
};
......@@ -84,6 +86,7 @@ QfqNS.Helper = QfqNS.Helper || {};
tinymce.init(config);
if($(this).is('[disabled]')) {
myEditor.setMode("readonly");
$(this).siblings(".mce-tinymce").addClass("qfq-tinymce-readonly");
}
}
);
......
......@@ -353,6 +353,10 @@ i.@{spinner_class} {
/* ERROR END */
.qfq-tinymce-readonly .mce-panel {
background-color: #eee;
}
/* inline elements in horizontal mode are too much left */
.form-horizontal {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment