Commit 1cdd1784 authored by Sven Franck's avatar Sven Franck

app: cleanup, corrections

parent c9f69fe6
......@@ -96,7 +96,6 @@
element.appendChild(factory.element({
"type": "img",
"direct": {"src": pic.href},
"attributes": {},
"logic": {
"data-i18n": pic.alt_i18n ? ("[alt]" + pic.alt_i18n) : null,
"alt": pic.alt || ""
......@@ -179,7 +178,7 @@
theme, icon_string, input_type, need_text_node, container_class_list,
label_class_list, index, disabled, active, text, addLabel, readonly,
mask_set, mask, star, hidden_field, icon, no_validate, has_opts,
push_label;
push_label, no_text;
// exit early with a span tag
// TODO: make this with label et al
......@@ -204,10 +203,12 @@
" ui-hidden-accessible" : "")
},
"attributes": {
"for": config.direct.id || util.uuid(),
"data-i18n": config.logic.label_i18n || ""
"for": config.direct.id || util.uuid()
},
"logic": {"text": config.logic.label || ""}
"logic": {
"text": config.logic.label || "",
"data-i18n": config.logic.label_i18n || null
}
});
};
......@@ -320,12 +321,14 @@
// messages. But can't be determined here if this element is in
// a group
no_validate = true;
no_text = spec.attributes["data-iconpos"];
container_class_list = "ui-" + spec.attributes.type;
label_inside = true;
push_label = (has_opts && has_opts.length > 0);
label_class_list = "ui-btn ui-corner-all ui-btn-inherit" +
" ui-icon-radio-off" /* + active */ + " ui-radio-" +
active + index + disabled + readonly;
active + index + disabled + readonly +
(no_text ? " ui-btn-icon-" + no_text : "");
spec.attributes["data-cacheval"] = true;
delete spec.logic.options;
break;
......@@ -334,9 +337,11 @@
icon_string = factory.util.classes(spec, "checkbox");
container_class_list = "ui-" + spec.attributes.type;
label_inside = true;
no_text = spec.attributes["data-iconpos"];
push_label = (has_opts && has_opts.length > 0);
label_class_list = "ui-btn ui-corner-all ui-btn-inherit " +
icon_string + " ui-checkbox-" + active + index + disabled + readonly;
icon_string + " ui-checkbox-" + active + index + disabled +
readonly + (no_text ? " ui-btn-icon-" + no_text : "");
spec.attributes["data-cacheval"] = false;
delete spec.logic.options;
break;
......@@ -603,6 +608,7 @@
/* ********************************************************************** */
/* JQM Collapsible-Set */
/* ********************************************************************** */
// TODO: BROKEN!
/**
* Generate a collapsible set
* Full spec (property_dict) example (with defaults):
......@@ -1285,7 +1291,7 @@
}
container = document.createDocumentFragment();
slot = spec.slot || undefined;
slot = spec.slot;
switch (spec.wrap) {
case "fragment":
......@@ -3549,6 +3555,7 @@
// TODO: action_menu input + form?
// TODO: merge with list mapping
// TODO: how to handle translations of record texts?
// TODO: merge link building with listItem (allow custom core)
map.tableItem = function (item, wrapper, i) {
var j, k, l, segment, map_section, section, row, cell, fragment,
base, quirk_dict, record, record_id, core, crop, re;
......@@ -6508,6 +6515,7 @@
quirk_dict.length = kids.length;
is_id = (quirk_dict.data || {})._id || quirk_dict.item_identifier;
// TODO: MAKE OPTIONAL UTIL-ajax-for-each... ask Tristan
for (i = 0; i < kids.length; i += 1) {
kid = kids[i];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment