Commit eb354604 authored by Sven Franck's avatar Sven Franck

moved listbox caption generation to inside gadget generator

parent 4379be2d
......@@ -15,7 +15,12 @@
"link": true,
"link_identifier": "_id",
"editable": null,
"sortable": true
"sortable": true,
"caption": {
"slot": 1,
"text": "Created Servers",
"text_i18n": "portal_type_dict.computer_dict.text_dict.created_servers"
}
},
"scheme": [
{
......@@ -56,11 +61,6 @@
"data-icon": "edit"
},
"logic": {"text":"Add server"}
}, {
"generate": "widget",
"type": "controlbar",
"property_dict": {"slot": 1},
"children": [{"type": "p", "direct": {"className": "ui-table-caption translate"},"attributes": {"data-i18n":"portal_type_dict.computer_dict.text_dict.created_servers"},"logic": {"text":"Created Servers"}}]
}, {
"generate": "widget",
"type": "controlbar",
......
......@@ -16,7 +16,12 @@
"wrap_gadget": 2,
"sortable": true,
"mergeable": true,
"action_menu": true
"action_menu": true,
"caption": {
"slot": 1,
"text": "Invoice Overview",
"text_i18n": "portal_type_dict.invoice_dict.text_dict.overview"
}
},
"scheme": [
{
......@@ -40,13 +45,7 @@
]
}
],
"children": [
{
"generate": "widget",
"type": "controlbar",
"property_dict": {"slot": 1},
"children": [{"type": "p", "direct": {"className": "ui-table-caption translate"},"attributes": {"data-i18n":"portal_type_dict.invoice_dict.text_dict.overview"},"logic": {"text":"Invoice Overview"}}]
}, {
"children": [{
"generate": "widget",
"type": "controlbar",
"property_dict": {"slot": 2},
......
......@@ -12,12 +12,17 @@
"message_i18n":"portal_type_dict.network_dict.text_dict.nodata"
},
"initial_query_url_identifier": "group",
"dynamic_children": [0],
"dynamic_children": [1],
"requires_authentication": true,
"depends_on": "login_state",
"wrap_gadget": 2,
"link": true,
"link_identifier": "id"
"link_identifier": "id",
"caption": {
"slot": 1,
"text": "Associated Servers",
"text_i18n": "portal_type_dict.network_dict.text_dict.associated_servers"
}
},
"scheme": [
{
......
......@@ -16,7 +16,12 @@
"depends_on": "login_state",
"wrap_gadget": 2,
"link": true,
"link_identifier": "_id"
"link_identifier": "_id",
"caption": {
"slot": 1,
"text": "Created Networks",
"text_i18n": "portal_type_dict.network_dict.text_dict.created_networks"
}
},
"scheme": [
{
......@@ -41,11 +46,6 @@
"data-icon": "edit"
},
"logic": {"text":"Add network"}
}, {
"generate": "widget",
"type": "controlbar",
"property_dict": {"slot": 1},
"children": [{"type": "p", "direct": {"className": "ui-table-caption translate"},"attributes": {"data-i18n":"portal_type_dict.network_dict.text_dict.created_networks"},"logic": {"text":"Created Networks"}}]
}, {
"generate": "widget",
"type": "controlbar",
......
......@@ -11,7 +11,12 @@
"dynamic_children": [2],
"wrap_gadget": 2,
"link": true,
"link_identifier": "_id"
"link_identifier": "_id",
"caption": {
"slot": 1,
"text": "Available Releases",
"text_i18n": "portal_type_dict.release_dict.text_dict.available_releases"
}
},
"scheme": [
{
......
......@@ -8,7 +8,12 @@
"property_dict": {
"initial_query_url_identifier": "_id",
"dynamic_children": [1],
"wrap_gadget": 2
"wrap_gadget": 2,
"caption": {
"slot": 1,
"text": "Connection parameters",
"text_i18n": "portal_type_dict.service_dict.text_dict.connection_param"
}
},
"scheme": [
{
......@@ -29,11 +34,6 @@
}
],
"children": [{
"generate": "widget",
"type": "controlbar",
"property_dict": {"slot": 1},
"children": [{"type": "p", "direct": {"className": "ui-table-caption translate"},"attributes": {"data-i18n":"portal_type_dict.service_dict.text_dict.connection_param"},"logic": {"text":"Connection parameters"}}]
}, {
"generate": "widget",
"type": "table",
"class_list": "table-stroke ui-responsive",
......
......@@ -11,7 +11,12 @@
"dynamic_children": [4],
"wrap_gadget": 2,
"link": true,
"link_identifier": "_id"
"link_identifier": "_id",
"caption": {
"slot": 1,
"text": "Installed Services",
"text_i18n": "portal_type_dict.service_dict.text_dict.installed_services"
}
},
"scheme": [
{
......@@ -41,11 +46,6 @@
"data-icon": "edit"
},
"logic": {"text":"Install new service"}
},{
"generate": "widget",
"type": "controlbar",
"property_dict": {"slot": 1},
"children": [{"type": "p", "direct": {"className": "ui-table-caption translate"},"attributes": {"data-i18n":"portal_type_dict.service_dict.text_dict.installed_services"},"logic": {"text":"Installed Services"}}]
}, {
"generate": "widget",
"type": "controlbar",
......
......@@ -9,7 +9,12 @@
"initial_query_url_identifier": "_id",
"dynamic_children": [1],
"wrap_gadget": 2,
"submit_to": "#services"
"submit_to": "#services",
"caption": {
"slot": 1,
"text": "Installations",
"text_i18n": "portal_type_dict.service_dict.text_dict.installations"
}
},
"scheme": [
{
......@@ -32,11 +37,6 @@
}
],
"children": [{
"generate": "widget",
"type": "controlbar",
"property_dict": {"slot": 1},
"children": [{"type": "p", "direct": {"className": "ui-table-caption translate"},"attributes": {"data-i18n":"portal_type_dict.service_dict.text_dict.installations"},"logic": {"text":"Installations"}}]
}, {
"generate": "widget",
"type": "table",
"class_list": "table-stroke ui-responsive",
......
......@@ -23,7 +23,12 @@
"dynamic_children": [0],
"wrap_gadget": 2,
"linkable": true,
"link_identifier": "id"
"link_identifier": "id",
"caption": {
"slot": 1,
"text": "Installed Services",
"text_i18n":"portal_type_dict.software_dict.text_dict.no_software"
}
},
"scheme":[
{
......
......@@ -1406,6 +1406,21 @@
}
}
// add caption
if (spec.property_dict.caption) {
spec.children.push({
"generate":"widget",
"type": "controlbar",
"property_dict": {"slot": spec.property_dict.caption.slot || 1},
"children": [{
"type": "p",
"direct": {"className": "ui-table-caption translate"},
"attributes": {"data-i18n": spec.property_dict.caption.text_i18n || null},
"logic": {"text": spec.property_dict.caption.text}
}]
})
}
// loop over dynamic data and generate table
for (i = 0; i < spec.children.length; i += 1) {
element = spec.children[i];
......
......@@ -96,7 +96,8 @@
"delete": "Delete",
"submit": "Submit",
"cancel": "Cancel",
"nodata": "No servers associated with this network."
"nodata": "No servers associated with this network.",
"associated_servers": "Associated Servers"
},
"field_dict": {
"title": {
......@@ -229,7 +230,8 @@
"ssl_off": "Revoke SSL",
"delete": "Delete",
"server_instance": "Server Instance",
"instance_configuration": "Instance Configuration"
"instance_configuration": "Instance Configuration",
"installed_services": "Installed Services"
},
"field_dict": {
"network": {
......@@ -763,7 +765,8 @@
"16": "16",
"32": "32",
"64": "64",
"128": "128"
"128": "128",
"no_software": "No services installed"
},
"field_dict": {
"id": {
......@@ -817,7 +820,8 @@
"16": "16",
"32": "32",
"64": "64",
"search": "Search available releases"
"search": "Search available releases",
"available_releases": "Available Releases"
},
"field_dict": {
"title": {
......
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