Fixed initial elements state not being restored

This commit is contained in:
Djamil Legato
2022-04-01 15:08:30 -07:00
parent f6ad1c7814
commit 87cd7c0129
4 changed files with 13 additions and 4 deletions

View File

@@ -8,6 +8,7 @@
1. [](#bugfix)
* Fixed nested element form fields
* Fixed `columns` and `column` fields with `.dotted` variables inside to ignore columns and column names
* Fixed initial elements state not being restored
# v1.10.32
## 03/28/2022

View File

@@ -8,3 +8,5 @@ $(document).on('change', '[data-grav-elements] select', (event) => {
$(`[id^="${id}_"]`).css('display', 'none');
$(`[id="${id}__${value}"]`).css('display', 'inherit');
});
$('[data-grav-elements] select').trigger('change');

View File

@@ -9695,6 +9695,7 @@ external_jQuery_default()(document).on('change', '[data-grav-elements] select',
external_jQuery_default()("[id^=\"".concat(id, "_\"]")).css('display', 'none');
external_jQuery_default()("[id=\"".concat(id, "__").concat(value, "\"]")).css('display', 'inherit');
});
external_jQuery_default()('[data-grav-elements] select').trigger('change');
;// CONCATENATED MODULE: ./app/forms/fields/index.js
@@ -15265,4 +15266,4 @@ module.exports = jQuery;
/******/ Grav = __webpack_exports__;
/******/
/******/ })()
;
;

View File

@@ -4599,7 +4599,7 @@ return Chartist;
// If we're not in Markdown mode, fall back to normal newlineAndIndent
var eolState = cm.getStateAfter(pos.line);
var inner = CodeMirror.innerMode(cm.getMode(), eolState);
if (inner.mode.name !== "markdown") {
if (inner.mode.name !== "markdown" && inner.mode.helperType !== "markdown") {
cm.execCommand("newlineAndIndent");
return;
} else {
@@ -15331,7 +15331,7 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
addLegacyProps(CodeMirror);
CodeMirror.version = "5.65.1";
CodeMirror.version = "5.65.2";
return CodeMirror;
@@ -15840,6 +15840,11 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
stream.eatWhile(/[\w\$_]/);
return "meta";
},
'"': function(stream, state) {
if (!stream.match('""\n')) return false;
state.tokenize = tokenTripleString;
return state.tokenize(stream, state);
}
},
modeProps: {fold: ["brace", "import"]}
@@ -17334,7 +17339,7 @@ CodeMirror.defineMode("gfm", function(config, modeConfig) {
}
function getTagRegexp(tagName, anchored) {
return new RegExp((anchored ? "^" : "") + "<\/\s*" + tagName + "\s*>", "i");
return new RegExp((anchored ? "^" : "") + "<\/\\s*" + tagName + "\\s*>", "i");
}
function addTags(from, to) {