Commit 0389ad40 authored by Sven Franck's avatar Sven Franck

fixed icon for input button/reset/submit

parent e8e30d40
...@@ -978,9 +978,7 @@ ...@@ -978,9 +978,7 @@
"clear": clear || undefined "clear": clear || undefined
}; };
} else { } else {
util.error({ util.error({"error": "mapFormField: Missing field definition"});
"error": "mapFormField: No field definition defined"
});
} }
return config; return config;
...@@ -3484,7 +3482,7 @@ ...@@ -3484,7 +3482,7 @@
label_inside, label_target, element_target, action, clear, label_inside, label_target, element_target, action, clear,
theme, icon_string, input_type, need_text_node, container_class_list, theme, icon_string, input_type, need_text_node, container_class_list,
label_class_list, index, disabled, active, text, addLabel, readonly, label_class_list, index, disabled, active, text, addLabel, readonly,
mask_set, mask, star, hidden_field; mask_set, mask, star, hidden_field, icon;
if (config.type === "span") { if (config.type === "span") {
return factory.element( return factory.element(
...@@ -3614,6 +3612,7 @@ ...@@ -3614,6 +3612,7 @@
// label position and class // label position and class
input_type = config.attributes.type; input_type = config.attributes.type;
icon = config.attributes["data-icon"];
if (input_type) { if (input_type) {
switch (input_type) { switch (input_type) {
...@@ -3633,10 +3632,13 @@ ...@@ -3633,10 +3632,13 @@
icon_string + " ui-checkbox-" + active + index + disabled + readonly; icon_string + " ui-checkbox-" + active + index + disabled + readonly;
config.attributes["data-cacheval"] = false; config.attributes["data-cacheval"] = false;
break; break;
case "button":
case "submit": case "submit":
case "reset": case "reset":
case "button": if (icon) {
container_class_list = "ui-btn ui-input-btn"; icon_string = factory.generateIconClassString(config, icon);
}
container_class_list = "ui-btn ui-input-btn " + icon_string;
need_text_node = true; need_text_node = true;
break; break;
// covers all JQM text input types and excludes select/textarea... // covers all JQM text input types and excludes select/textarea...
......
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