# HG changeset patch # User Nicholas Jillings # Date 1458650148 0 # Node ID db2a2a4a773e2396486d40757091520b9de268ea # Parent 46fe764580fbce0be229701afd284c1d23f3cbb6 Fix Bug #1562 diff -r 46fe764580fb -r db2a2a4a773e core.css --- a/core.css Tue Mar 22 12:09:08 2016 +0000 +++ b/core.css Tue Mar 22 12:35:48 2016 +0000 @@ -79,6 +79,19 @@ background-color: #fff; } +div.popup-option-checbox { + /* Popup window checkbox */ + padding: 5px; + width: fit-content; + width: -moz-fit-content; + width: -webkit-fit-content; +} + +div.popup-option-checbox input{ + /* Popup window checkbox */ + margin-right: 15px; +} + button#popup-proceed { bottom: 10px; right: 10px; diff -r 46fe764580fb -r db2a2a4a773e core.js --- a/core.js Tue Mar 22 12:09:08 2016 +0000 +++ b/core.js Tue Mar 22 12:35:48 2016 +0000 @@ -601,7 +601,7 @@ span.textContent = option.text; var hold = document.createElement('div'); hold.setAttribute('name','option'); - hold.style.padding = '4px'; + hold.className = "popup-option-checbox"; hold.appendChild(input); hold.appendChild(span); this.popupResponse.appendChild(hold); @@ -610,14 +610,13 @@ input.checked = "true"; } } - var w = $(span).width(); + var w = $(hold).width(); if (w > max_w) max_w = w; index++; } - max_w += 12; this.popupResponse.style.textAlign=""; - var leftP = ((max_w/500)/2)*100; + var leftP = 50-(((max_w/$('#popupContent').width())/2)*100); this.popupResponse.style.left=leftP+"%"; } else if (node.specification.type == 'radio') { if (node.response == undefined) { @@ -634,20 +633,19 @@ span.textContent = option.text; var hold = document.createElement('div'); hold.setAttribute('name','option'); - hold.style.padding = '4px'; + hold.className = "popup-option-checbox"; hold.appendChild(input); hold.appendChild(span); this.popupResponse.appendChild(hold); if (input.id == node.response.name) { input.checked = "true"; } - var w = $(span).width(); + var w = $(hold).width(); if (w > max_w) max_w = w; } - max_w += 12; this.popupResponse.style.textAlign=""; - var leftP = ((max_w/500)/2)*100; + var leftP = 50-(((max_w/$('#popupContent').width())/2)*100); this.popupResponse.style.left=leftP+"%"; } else if (node.specification.type == 'number') { var input = document.createElement('input');