Commit e50ef2d7 authored by Sven Franck's avatar Sven Franck

updated JSON gadget API

parent 11e1631f
...@@ -3,6 +3,56 @@ ...@@ -3,6 +3,56 @@
"portal_type_title": "computer", "portal_type_title": "computer",
"portal_type_fields": "computer_fieldlist", "portal_type_fields": "computer_fieldlist",
"initial_query": {"include_docs": true, "limit":[]}, "initial_query": {"include_docs": true, "limit":[]},
"form": true,
"id": "computer_overview",
"property_dict": {
"initial_query_url_identifier": "computer_reference",
"dynamic_children": [1],
"requires_authentication": true,
"depends_on": "login_state",
"wrap_gadget": 2,
"layout": {
"header": [
[
{"custom": true, "text": "Status", "text_i18n": "global_dict.common_dict.status", "show": true, "priority": 6},
{"column": "computer_title", "show": true, "priority": 5},
{"column": "computer_reference", "show": true, "priority": 5},
{"column": "computer_translated_validation_state_title", "show": "true", "priority": 3}
]
],
"body": [
{"custom": true, "show": true, "priority": 6, "status": true},
{"column": "computer_title", "show": true, "priority": 5},
{"column": "computer_reference", "show": true, "priority": 5},
{"column": "computer_translated_validation_state_title", "show": "true", "priority": 3}],
"footer": []
},
"feature_dict": {
"linkable": true,
"link_identifier": null,
"editable": null
}
},
"children": [{
"generate": "widget",
"type": "controlbar",
"property_dict": {"slot": 1},
"children": [{"type": "input", "direct": {"id":"search_computer_list", "className": "translate"}, "attributes": {"data-action":"search", "data-enhanced":"true", "data-i18n": "[placeholder]page_dict.servers.search","placeholder":"Search created servers", "data-icon":"search", "data-action-btn":"true", "data-type":"search", "type":"search"}, "logic":{"clear":"true", "action":"search"}}]
},{
"generate": "widget",
"type": "table",
"class_list": "table-stroke ui-responsive",
"property_dict": {
"filter": "true",
"input": "#search_computer_list",
"mode": "columntoggle",
"toggle_popup": false,
"wrap": "both",
"top_grid": 1,
"bottom_grid": 1
},
"children": []
}],
"placeholder_dict": { "placeholder_dict": {
"no_items": { "no_items": {
"text":"No items found.", "text":"No items found.",
...@@ -65,54 +115,6 @@ ...@@ -65,54 +115,6 @@
} }
] ]
} }
},
"form": true,
"id": "computer_overview",
"property_dict": {
"initial_query_url_identifier": "computer_reference",
"dynamic_children": [1],
"wrap_gadget": 2,
"layout": {
"header": [
[
{"column": "computer_status", "show": true, "priority": 5},
{"column": "computer_title", "show": true, "priority": 5},
{"column": "computer_reference", "show": true, "priority": 5},
{"column": "computer_translated_validation_state_title", "show": "true", "priority": 3}
]
],
"body": [
{"column": "computer_status", "show": true, "priority": 5},
{"column": "computer_title", "show": true, "priority": 5},
{"column": "computer_reference", "show": true, "priority": 5},
{"column": "computer_translated_validation_state_title", "show": "true", "priority": 3}],
"footer": []
},
"feature_dict": {
"linkable": true,
"link_identifier": null,
"editable": null
} }
},
"children": [{
"generate": "widget",
"type": "controlbar",
"property_dict": {"slot": 1},
"children": [{"type": "input", "direct": {"id":"search_computer_list", "className": "translate"}, "attributes": {"data-action":"search", "data-enhanced":"true", "data-i18n": "[placeholder]page_dict.servers.search","placeholder":"Search created servers", "data-icon":"search", "data-action-btn":"true", "data-type":"search", "type":"search"}, "logic":{"clear":"true", "action":"search"}}]
},{
"generate": "widget",
"type": "table",
"class_list": "table-stroke ui-responsive",
"property_dict": {
"filter": "true",
"input": "#search_computer_list",
"mode": "columntoggle",
"toggle_popup": false,
"wrap": "both",
"top_grid": 1,
"bottom_grid": 1
},
"children": []
}]
} }
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
"id": "computer_sample", "id": "computer_sample",
"property_dict": { "property_dict": {
"dynamic_children": [0], "dynamic_children": [0],
"requires_authentication": true "requires_authentication": true,
"depends_on": "login_state"
}, },
"children": [{ "children": [{
"generate": "widget", "generate": "widget",
......
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
"id": "user_sample", "id": "user_sample",
"property_dict": { "property_dict": {
"dynamic_children": [0], "dynamic_children": [0],
"requires_authentication": true "requires_authentication": true,
"depends_on": "login_state",
"allow_new": true
}, },
"children": [{ "children": [{
"generate": "widget", "generate": "widget",
...@@ -17,7 +19,6 @@ ...@@ -17,7 +19,6 @@
"editable": true, "editable": true,
"secure": "default", "secure": "default",
"secret_hash": "foo", "secret_hash": "foo",
"update": "login_state",
"public_key": "6Ldpb-oSAAAAAGwriKpk4ol1n4yjN_as6M4xv0zA" "public_key": "6Ldpb-oSAAAAAGwriKpk4ol1n4yjN_as6M4xv0zA"
}, },
"children": [{ "children": [{
......
...@@ -2,14 +2,12 @@ ...@@ -2,14 +2,12 @@
"portal_type_source": "Software Product", "portal_type_source": "Software Product",
"portal_type_title": "subscription", "portal_type_title": "subscription",
"portal_type_fields": "subscription_fieldlist", "portal_type_fields": "subscription_fieldlist",
"initial_query": {"include_docs": true, "limit":[0,16]}, "initial_query": {"include_docs": true, "limit":[0,8]},
"form": true, "form": true,
"id": "subscription_overview", "id": "subscription_overview",
"property_dict": { "property_dict": {
"link": true, "link": true,
"link_identifier": "id", "link_identifier": "id",
"check": true,
"action": "check",
"dynamic_children": [1] "dynamic_children": [1]
}, },
"children": [{ "children": [{
...@@ -39,28 +37,6 @@ ...@@ -39,28 +37,6 @@
"type": "controlbar", "type": "controlbar",
"class_list": "responsive", "class_list": "responsive",
"children": [{ "children": [{
"generate": "widget",
"type": "controlgroup",
"class_list": "",
"property_dict": {
"direction": "horizontal"
},
"children": [{
"type": "select",
"direct": {"id": "sort_subscription_list", "className": "action"},
"attributes": {
"data-icon":"sort",
"data-action": "sort"
},
"logic": {
"options": [
{"value": "", "text": "Sort by", "text_i18n": "global_dict.pagination_dict.sort", "selected": true, "disabeld": true},
{"value": "title", "text": "Title", "text_i18n":"portal_type_dict.subscription_dict.field_list.title.title"},
{"value": "price", "text": "Price", "text_i18n":"portal_type_dict.subscription_dict.field_list.price.title"}
]
}
}]
},{
"generate": "widget", "generate": "widget",
"type": "controlgroup", "type": "controlgroup",
"class_list": "pagination", "class_list": "pagination",
...@@ -74,13 +50,6 @@ ...@@ -74,13 +50,6 @@
{"type": "a", "direct":{"className":"action", "href":""}, "attributes":{"data-i18n":"global_dict.pagination_dict.next", "data-action":"next", "data-icon":"forward", "data-iconpos":"notext"}, "logic": {"text":"Step Forward"}}, {"type": "a", "direct":{"className":"action", "href":""}, "attributes":{"data-i18n":"global_dict.pagination_dict.next", "data-action":"next", "data-icon":"forward", "data-iconpos":"notext"}, "logic": {"text":"Step Forward"}},
{"type": "a", "direct":{"className":"action", "href":""}, "attributes":{"data-i18n":"global_dict.pagination_dict.last", "data-action":"last", "data-icon":"step-forward", "data-iconpos":"notext"}, "logic": {"text": "Last"}} {"type": "a", "direct":{"className":"action", "href":""}, "attributes":{"data-i18n":"global_dict.pagination_dict.last", "data-action":"last", "data-icon":"step-forward", "data-iconpos":"notext"}, "logic": {"text": "Last"}}
] ]
}, {
"generate":"widget",
"type":"controlgroup",
"property_dict": {"direction":"horizontal"},
"children":[
{"type": "input", "direct": {"value": "Submit", "className": "action translate"}, "attributes": {"type": "submit", "data-action":"remove", "data-i18n":"[value]global_dict.common_dict.delete", "data-theme": "slapos-black", "data-enhanced": "true"}}
]
}] }]
}] }]
} }
......
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