return $('<div />')
.addClass('form-control-static')
.attr('id', this.id(sid))
- .html(this.ucivalue(sid));
+ .html(this.ucivalue(sid) || this.label('placeholder'));
},
formvalue: function(sid)
$('<li />')
.append($('<label />')
.addClass(itype + ' inline text-muted')
- .append($('<input />')
+ .append(this.validator(sid, $('<input />')
.attr('name', itype + id)
.attr('type', itype)
.attr('value', '')
- .prop('checked', $.isEmptyObject(check)))
+ .prop('checked', $.isEmptyObject(check)), true))
.append(L.tr('unspecified')))
.appendTo(ul);
}
return true;
},
+ sort: function(section1, section2)
+ {
+ return 0;
+ },
+
sections: function(cb)
{
var s1 = L.uci.sections(this.map.uci_package);
if (this.filter(s1[i]))
s2.push(s1[i]);
+ s2.sort(this.sort);
+
if (typeof(cb) == 'function')
for (var i = 0; i < s2.length; i++)
cb.call(this, s2[i]);
if (this.options.addremove !== false || this.options.sortable)
{
row.append($('<td />')
+ .css('width', '1%')
.addClass('text-right')
.append($('<div />')
.addClass('btn-group')