editor: limit fields auto identation depth level to 1

This commit is contained in:
jean-emmanuel 2017-07-14 11:52:46 +02:00
parent f3c8c85040
commit 73552c55dc
3 changed files with 21 additions and 17 deletions

View file

@ -29,9 +29,9 @@
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.5173077"
inkscape:cx="331.11092"
inkscape:cy="153.07016"
inkscape:zoom="0.60172068"
inkscape:cx="315.87534"
inkscape:cy="375.30189"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
@ -39,10 +39,10 @@
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1024"
inkscape:window-height="730"
inkscape:window-x="0"
inkscape:window-y="38"
inkscape:window-width="742"
inkscape:window-height="485"
inkscape:window-x="196"
inkscape:window-y="149"
inkscape:window-maximized="0"
showguides="true" />
<metadata
@ -61,6 +61,13 @@
inkscape:groupmode="layer"
id="layer1"
inkscape:label="Layer 1">
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.819;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#1a1a1a;fill-opacity:0.33160622;fill-rule:nonzero;stroke:#ffffff;stroke-width:7.49999965;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 261.27684,38.57666 c -138.98447,0 -252.0208589,113.03638 -252.0208589,252.02086 0,70.16669 28.8215489,133.70969 75.2362029,179.44335 L 108.65112,445.88194 C 68.506687,406.42298 43.635863,351.4771 43.635863,290.59752 c 0,-120.40349 97.237497,-217.640978 217.640977,-217.640979 120.4035,0 217.64098,97.237489 217.64098,217.640979 0,61.10926 -25.05967,116.23905 -65.47118,155.72937 l 24.15894,24.15893 c 46.68197,-45.76612 75.69579,-109.49245 75.69579,-179.8883 0,-138.98448 -113.04005,-252.02086 -252.02453,-252.02086 z"
id="circle942"
inkscape:connector-curvature="0"
inkscape:transform-center-x="1.8122676"
inkscape:transform-center-y="-32.620818" />
<circle
style="opacity:0.819;fill:#fbfbfb;fill-opacity:1;stroke:none;stroke-width:41.35679245;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.33160622"
id="circle940"
@ -84,11 +91,11 @@
id="path956"
inkscape:connector-curvature="0" />
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.819;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:none;fill-opacity:0.33160622;fill-rule:nonzero;stroke:#ffffff;stroke-width:7.49999965;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 261.27684,38.57666 c -138.98447,0 -252.0208589,113.03638 -252.0208589,252.02086 0,70.16669 28.8215489,133.70969 75.2362029,179.44335 L 108.65112,445.88194 C 68.506687,406.42298 43.635863,351.4771 43.635863,290.59752 c 0,-120.40349 97.237497,-217.640978 217.640977,-217.640979 120.4035,0 217.64098,97.237489 217.64098,217.640979 0,61.10926 -25.05967,116.23905 -65.47118,155.72937 l 24.15894,24.15893 c 46.68197,-45.76612 75.69579,-109.49245 75.69579,-179.8883 0,-138.98448 -113.04005,-252.02086 -252.02453,-252.02086 z"
id="circle942"
inkscape:connector-curvature="0"
inkscape:transform-center-y="-32.620818"
inkscape:transform-center-x="1.8122676"
inkscape:transform-center-y="-32.620818" />
inkscape:connector-curvature="0"
id="path4487"
d="m 261.27684,38.57666 c -138.98447,0 -252.0208589,113.03638 -252.0208589,252.02086 0,70.16669 28.8215489,133.70969 75.2362029,179.44335 L 108.65112,445.88194 C 68.506687,406.42298 43.635863,351.4771 43.635863,290.59752 c 0,-120.40349 97.237497,-217.640978 217.640977,-217.640979 120.4035,0 217.64098,97.237489 217.64098,217.640979 0,61.10926 -25.05967,116.23905 -65.47118,155.72937 l 24.15894,24.15893 c 46.68197,-45.76612 75.69579,-109.49245 75.69579,-179.8883 0,-138.98448 -113.04005,-252.02086 -252.02453,-252.02086 z"
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.819;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:none;fill-opacity:0.33160622;fill-rule:nonzero;stroke:#989898;stroke-width:7.49999965;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Before After
Before After

View file

@ -4,14 +4,11 @@ repo_url: https://github.com/jean-emmanuel/open-stage-control
copyright: "Open Stage Control is an <a href='http://ammd.net'>AMMD</a> software licensed under the <a href='https://github.com/jean-emmanuel/open-stage-control/blob/master/LICENSE'>GNU/GPLv3</a> License"
site_description: "A libre desktop OSC bi-directionnal control surface application."
theme: material
theme_dir: mkdocs-material/material
site_favicon: img/logo.png
extra:
palette:
primary: blue grey
accent: blue
feature:
tabs: false
logo: img/logo-material.svg

View file

@ -48,7 +48,7 @@ var editObject = function(container, data, refresh){
if (i=='type' && (data.type == 'tab' || data.type == 'root')) continue
let type = typeof data[i],
value = type != 'string'?JSON.stringify(data[i], null, ' '):data[i],
value = type != 'string'?JSON.stringify(data[i], null, ' ').replace(/\n\s\s\s\s/g, ' ').replace(/\n\s\s(\}|\])/g, ' $1'):data[i],
wrapper = $('<div class="input-wrapper"></div>').appendTo(form),
label = $(`<label>${i}</label>`).appendTo(wrapper),
input