Skip to content
This repository was archived by the owner on Mar 14, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/assets/groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@
"List Views": [
"List", "OrderedList", "ListItem", "ListDivider", "ListButton"
],
"Output": ["ProgressBar"]
"Output": ["ProgressBar"],
"Image": ["Image"]
}
],

"Widget Sets": [
{
"Simple HTML": [ "Text" ],
"Simple HTML": [ "Text", "Image" ],
"jQuery Mobile": [
"#0._hidden_node.jqm_toolbars",
"#0.Functional Groups.0.Buttons",
Expand Down
45 changes: 45 additions & 0 deletions src/js/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,51 @@ var BWidgetRegistry = {
template: '<a data-role="button">%TEXT%</a>'
},

/**
* Represents a image
*/
Image: {
parent: "Base",
paletteImageName: "tizen_image.svg",
template: '<img/>',
properties: {
src: {
type: "string",
defaultValue: "src/css/images/widgets/tizen_image.svg",
htmlAttribute: "src",
forceAttribute: true
},
alt: {
type: "string",
defaultValue: "",
htmlAttribute: "alt"
},
width: {
type: "string",
defaultValue: "",
htmlAttribute: "width"
},
height: {
type: "string",
defaultValue: "",
htmlAttribute: "height"
},
align: {
type: "string",
options:[ "left", "center", "right" ],
defaultValue: "left",
htmlAttribute: {
name: "style",
value: {
"left": "display:block;margin:auto auto auto 0px",
"center": "display:block;margin: 0 auto",
"right": "display:block;margin: auto 0px auto auto"
}
}
},
},
},

/**
* Represents an HTML form object. Includes an "action" property with the
* submission URL and a "method" string property that should be "get" or
Expand Down