html/preset_sel/index.html, js/ui.js : The main app. div is now created rather than statically constructed.
Fixed bug where the values of numbers without min/max ranges were not updated correctly. Fixed bug where elements with 'order' attribute were not ordered correctly when created. Signed-off-by: kevin <kevin@larke.org>
This commit is contained in:
parent
f3aecb1177
commit
13bc47389b
@ -19,8 +19,6 @@
|
||||
<p id="connectTitleId">Disconnected</p>
|
||||
</div>
|
||||
|
||||
<div id="0" class="uiAppDiv">
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -329,8 +329,8 @@ function ui_create_ele( parent_ele, ele_type, d, dfltClassName )
|
||||
|
||||
parent_ele.appendChild(ele);
|
||||
|
||||
|
||||
|
||||
if( d.hasOwnProperty('order') )
|
||||
ui_set_order_key(ele,d.order)
|
||||
|
||||
}
|
||||
return ele
|
||||
@ -683,7 +683,10 @@ function _ui_set_number_range( ele, d )
|
||||
|
||||
function ui_set_number_value( ele, value )
|
||||
{
|
||||
if( ele.minValue <= value && value <= ele.maxValue )
|
||||
var min_ok_fl = (!ele.hasOwnProperty('minValue')) || (value >= ele.minValue)
|
||||
var max_ok_fl = (!ele.hasOwnProperty('maxValue')) || (value <= ele.maxValue)
|
||||
|
||||
if( min_ok_fl && max_ok_fl )
|
||||
{
|
||||
ele.value = value;
|
||||
if( ele.decpl == 0 )
|
||||
@ -1252,7 +1255,9 @@ function ws_form_url(urlSuffix)
|
||||
|
||||
function main()
|
||||
{
|
||||
rootEle = dom_id_to_ele(_rootId);
|
||||
d = { "className":"uiAppDiv", "uuId":_rootId }
|
||||
rootEle = ui_create_div( document.body, d )
|
||||
//rootEle = dom_id_to_ele(_rootId);
|
||||
rootEle.uuId = 0;
|
||||
rootEle.id = _nextEleId;
|
||||
_nextEleId += 1;
|
||||
|
Loading…
Reference in New Issue
Block a user