mirror of https://github.com/portainer/portainer
fix(config-creation): fix an issue setting config editor as read-only (#1634)
parent
23a565243a
commit
7365e69c59
|
@ -15,10 +15,10 @@ angular.module('portainer.app')
|
||||||
var service = {};
|
var service = {};
|
||||||
|
|
||||||
service.applyCodeMirrorOnElement = function(element, yamlLint, readOnly) {
|
service.applyCodeMirrorOnElement = function(element, yamlLint, readOnly) {
|
||||||
var options = codeMirrorGenericOptions;
|
var options = angular.copy(codeMirrorGenericOptions);
|
||||||
|
|
||||||
if (yamlLint) {
|
if (yamlLint) {
|
||||||
options = codeMirrorYAMLOptions;
|
_.assign(options, codeMirrorYAMLOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (readOnly) {
|
if (readOnly) {
|
||||||
|
|
Loading…
Reference in New Issue