Loading editor/html/js/survey-manager.js +14 −7 Changes for editor/html/js/survey-manager.js: 14 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -420,21 +420,24 @@ var SurveyManager = (function() { function buildOptionRow(opt) { var row = document.createElement('div'); row.className = 'sm-opt-row'; row.style.cssText = 'display:grid;grid-template-columns:1fr 1fr auto auto;gap:4px;align-items:start;'; row.style.cssText = 'display:flex;flex-wrap:wrap;gap:6px;align-items:flex-start;' + 'padding-bottom:6px;border-bottom:1px solid var(--border);'; var inpVal = document.createElement('input'); inpVal.type = 'text'; inpVal.placeholder = 'wert'; inpVal.className = 'sm-opt-val'; inpVal.value = opt.value || ''; inpVal.style.cssText = 'flex:1 1 90px;min-width:90px;'; var inpLbl = document.createElement('input'); inpLbl.type = 'text'; inpLbl.placeholder = 'Text'; inpLbl.className = 'sm-opt-lbl'; inpLbl.value = opt.label || ''; inpLbl.style.cssText = 'flex:2 1 150px;min-width:150px;'; var selExcl = document.createElement('select'); selExcl.className = 'sm-opt-excl'; selExcl.multiple = true; selExcl.title = 'Fragen ausblenden (Mehrfachauswahl)'; selExcl.style.cssText = 'min-height:36px;max-height:80px;font-size:.85em;'; selExcl.style.cssText = 'flex:1 1 150px;min-width:150px;min-height:36px;max-height:80px;font-size:.85em;'; var currentExcludes = (opt.excludes || '').split(',').map(function(s) { return s.trim(); }).filter(Boolean); (_current.questions || []).forEach(function(oq) { if (oq.id === q.id) return; Loading @@ -447,7 +450,7 @@ var SurveyManager = (function() { var btnRemove = document.createElement('button'); btnRemove.type = 'button'; btnRemove.textContent = '×'; btnRemove.style.cssText = 'padding:4px 8px;cursor:pointer;background:#c00;color:#fff;border:none;border-radius:3px;'; btnRemove.style.cssText = 'flex:0 0 auto;padding:4px 8px;cursor:pointer;background:#c00;color:#fff;border:none;border-radius:3px;'; btnRemove.addEventListener('click', function() { row.remove(); }); row.appendChild(inpVal); row.appendChild(inpLbl); Loading Loading @@ -484,25 +487,29 @@ var SurveyManager = (function() { function buildIconRow(opt) { var row = document.createElement('div'); row.className = 'sm-icon-opt-row'; row.style.cssText = 'display:grid;grid-template-columns:1fr 1fr 1fr auto auto auto;gap:4px;align-items:start;'; row.style.cssText = 'display:flex;flex-wrap:wrap;gap:6px;align-items:flex-start;' + 'padding-bottom:6px;border-bottom:1px solid var(--border);'; var inpVal = document.createElement('input'); inpVal.type = 'text'; inpVal.placeholder = 'wert'; inpVal.className = 'sm-icon-val'; inpVal.value = opt.value || ''; inpVal.style.cssText = 'flex:1 1 80px;min-width:80px;'; var inpLbl = document.createElement('input'); inpLbl.type = 'text'; inpLbl.placeholder = 'Text'; inpLbl.className = 'sm-icon-lbl'; inpLbl.value = opt.label || ''; inpLbl.style.cssText = 'flex:2 1 130px;min-width:130px;'; var inpUrl = document.createElement('input'); inpUrl.type = 'text'; inpUrl.placeholder = 'Icon URL'; inpUrl.className = 'sm-icon-url'; inpUrl.value = opt.icon || ''; inpUrl.style.cssText = 'flex:2 1 130px;min-width:130px;'; var btnBrowse = document.createElement('button'); btnBrowse.type = 'button'; btnBrowse.textContent = '🖼️'; btnBrowse.title = 'Bild aus Mediathek wählen'; btnBrowse.style.cssText = 'padding:4px 8px;cursor:pointer;'; btnBrowse.style.cssText = 'flex:0 0 auto;padding:4px 8px;cursor:pointer;'; (function(urlInp) { btnBrowse.addEventListener('click', function() { if (typeof MediaBrowser !== 'undefined') { Loading @@ -517,7 +524,7 @@ var SurveyManager = (function() { selExcl.className = 'sm-icon-excl'; selExcl.multiple = true; selExcl.title = 'Fragen ausblenden (Mehrfachauswahl)'; selExcl.style.cssText = 'min-height:36px;max-height:80px;font-size:.85em;'; selExcl.style.cssText = 'flex:1 1 150px;min-width:150px;min-height:36px;max-height:80px;font-size:.85em;'; var currentExcludes = (opt.excludes || '').split(',').map(function(s) { return s.trim(); }).filter(Boolean); (_current.questions || []).forEach(function(oq) { if (oq.id === q.id) return; Loading @@ -530,7 +537,7 @@ var SurveyManager = (function() { var btnRemove = document.createElement('button'); btnRemove.type = 'button'; btnRemove.textContent = '×'; btnRemove.style.cssText = 'padding:4px 8px;cursor:pointer;background:#c00;color:#fff;border:none;border-radius:3px;'; btnRemove.style.cssText = 'flex:0 0 auto;padding:4px 8px;cursor:pointer;background:#c00;color:#fff;border:none;border-radius:3px;'; btnRemove.addEventListener('click', function() { row.remove(); }); row.appendChild(inpVal); row.appendChild(inpLbl); row.appendChild(inpUrl); Loading Loading
editor/html/js/survey-manager.js +14 −7 Changes for editor/html/js/survey-manager.js: 14 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -420,21 +420,24 @@ var SurveyManager = (function() { function buildOptionRow(opt) { var row = document.createElement('div'); row.className = 'sm-opt-row'; row.style.cssText = 'display:grid;grid-template-columns:1fr 1fr auto auto;gap:4px;align-items:start;'; row.style.cssText = 'display:flex;flex-wrap:wrap;gap:6px;align-items:flex-start;' + 'padding-bottom:6px;border-bottom:1px solid var(--border);'; var inpVal = document.createElement('input'); inpVal.type = 'text'; inpVal.placeholder = 'wert'; inpVal.className = 'sm-opt-val'; inpVal.value = opt.value || ''; inpVal.style.cssText = 'flex:1 1 90px;min-width:90px;'; var inpLbl = document.createElement('input'); inpLbl.type = 'text'; inpLbl.placeholder = 'Text'; inpLbl.className = 'sm-opt-lbl'; inpLbl.value = opt.label || ''; inpLbl.style.cssText = 'flex:2 1 150px;min-width:150px;'; var selExcl = document.createElement('select'); selExcl.className = 'sm-opt-excl'; selExcl.multiple = true; selExcl.title = 'Fragen ausblenden (Mehrfachauswahl)'; selExcl.style.cssText = 'min-height:36px;max-height:80px;font-size:.85em;'; selExcl.style.cssText = 'flex:1 1 150px;min-width:150px;min-height:36px;max-height:80px;font-size:.85em;'; var currentExcludes = (opt.excludes || '').split(',').map(function(s) { return s.trim(); }).filter(Boolean); (_current.questions || []).forEach(function(oq) { if (oq.id === q.id) return; Loading @@ -447,7 +450,7 @@ var SurveyManager = (function() { var btnRemove = document.createElement('button'); btnRemove.type = 'button'; btnRemove.textContent = '×'; btnRemove.style.cssText = 'padding:4px 8px;cursor:pointer;background:#c00;color:#fff;border:none;border-radius:3px;'; btnRemove.style.cssText = 'flex:0 0 auto;padding:4px 8px;cursor:pointer;background:#c00;color:#fff;border:none;border-radius:3px;'; btnRemove.addEventListener('click', function() { row.remove(); }); row.appendChild(inpVal); row.appendChild(inpLbl); Loading Loading @@ -484,25 +487,29 @@ var SurveyManager = (function() { function buildIconRow(opt) { var row = document.createElement('div'); row.className = 'sm-icon-opt-row'; row.style.cssText = 'display:grid;grid-template-columns:1fr 1fr 1fr auto auto auto;gap:4px;align-items:start;'; row.style.cssText = 'display:flex;flex-wrap:wrap;gap:6px;align-items:flex-start;' + 'padding-bottom:6px;border-bottom:1px solid var(--border);'; var inpVal = document.createElement('input'); inpVal.type = 'text'; inpVal.placeholder = 'wert'; inpVal.className = 'sm-icon-val'; inpVal.value = opt.value || ''; inpVal.style.cssText = 'flex:1 1 80px;min-width:80px;'; var inpLbl = document.createElement('input'); inpLbl.type = 'text'; inpLbl.placeholder = 'Text'; inpLbl.className = 'sm-icon-lbl'; inpLbl.value = opt.label || ''; inpLbl.style.cssText = 'flex:2 1 130px;min-width:130px;'; var inpUrl = document.createElement('input'); inpUrl.type = 'text'; inpUrl.placeholder = 'Icon URL'; inpUrl.className = 'sm-icon-url'; inpUrl.value = opt.icon || ''; inpUrl.style.cssText = 'flex:2 1 130px;min-width:130px;'; var btnBrowse = document.createElement('button'); btnBrowse.type = 'button'; btnBrowse.textContent = '🖼️'; btnBrowse.title = 'Bild aus Mediathek wählen'; btnBrowse.style.cssText = 'padding:4px 8px;cursor:pointer;'; btnBrowse.style.cssText = 'flex:0 0 auto;padding:4px 8px;cursor:pointer;'; (function(urlInp) { btnBrowse.addEventListener('click', function() { if (typeof MediaBrowser !== 'undefined') { Loading @@ -517,7 +524,7 @@ var SurveyManager = (function() { selExcl.className = 'sm-icon-excl'; selExcl.multiple = true; selExcl.title = 'Fragen ausblenden (Mehrfachauswahl)'; selExcl.style.cssText = 'min-height:36px;max-height:80px;font-size:.85em;'; selExcl.style.cssText = 'flex:1 1 150px;min-width:150px;min-height:36px;max-height:80px;font-size:.85em;'; var currentExcludes = (opt.excludes || '').split(',').map(function(s) { return s.trim(); }).filter(Boolean); (_current.questions || []).forEach(function(oq) { if (oq.id === q.id) return; Loading @@ -530,7 +537,7 @@ var SurveyManager = (function() { var btnRemove = document.createElement('button'); btnRemove.type = 'button'; btnRemove.textContent = '×'; btnRemove.style.cssText = 'padding:4px 8px;cursor:pointer;background:#c00;color:#fff;border:none;border-radius:3px;'; btnRemove.style.cssText = 'flex:0 0 auto;padding:4px 8px;cursor:pointer;background:#c00;color:#fff;border:none;border-radius:3px;'; btnRemove.addEventListener('click', function() { row.remove(); }); row.appendChild(inpVal); row.appendChild(inpLbl); row.appendChild(inpUrl); Loading