Commit 046ad22c authored by Sven Franck's avatar Sven Franck

data/app: added manual panel close to dynamic panel contents

parent d48ce911
......@@ -27,6 +27,13 @@
"home": "#home"
}
},
{
"type": "status_dict",
"property_dict": {
"loader": true,
"loader_theme": "slapos-black"
}
},
{
"generate": "widget",
"type": "controlbar",
......@@ -55,7 +62,7 @@
"direction": "horizontal"
},
"children": [
{"type":"a", "direct": {"href": "#global-user", "className":"responsive action translate"}, "attributes": {"data-rel":"panel", "data-action":"set_login", "data-icon":"heart", "data-i18n":"global_dict.login"}, "logic": {"text":"Login"}},
{"type":"a", "direct": {"href": "#global-user", "className":"responsive translate action"}, "attributes": {"data-rel":"panel", "data-action":"set_login", "data-icon":"heart", "data-i18n":"global_dict.login"}, "logic": {"text":"Login"}},
{"type":"a", "direct": {"href": "#basket", "className": "responsive translate"}, "attributes": {"data-i18n": "global_dict.basket", "data-icon": "shopping-cart"}, "logic": {"text": "Basket"}}
]
}, {
......@@ -83,7 +90,7 @@
"direction": "horizontal"
},
"children":[
{"type":"a", "direct": {"href": "#global-search", "className":"action translate"}, "attributes": {"data-iconpos":"notext", "data-rel":"panel", "data-action":"set_search", "data-icon":"search-plus", "data-i18n":"global_dict.detail_search"}, "logic": {"text":"Search+"}}
{"type":"a", "direct": {"href": "#global-search", "className":"action translate"}, "attributes": {"data-iconpos":"notext", "data-rel":"panel", "data-action":"set_search", "data-href": "ui_panel_detail_search", "data-icon":"search-plus", "data-i18n":"global_dict.detail_search"}, "logic": {"text":"Search+"}}
]
}, {
"generate": "widget",
......@@ -94,7 +101,7 @@
"children":[
{"type":"a", "direct": {"href": "#global-search", "className":"action translate"}, "attributes": {"data-rel": "panel", "data-iconpos":"notext", "data-action":"set_filter", "data-icon":"filter", "data-i18n":"global_dict.filter"}, "logic": {"text":"Filter"}},
{"type":"a", "direct": {"href": "#global-search", "className":"action translate"}, "attributes": {"data-rel": "panel", "data-iconpos":"notext", "data-action":"set_sorting", "data-icon":"sort", "data-i18n":"global_dict.sort"}, "logic": {"text":"Sort"}},
{"type":"a", "direct": {"href": "#global-user", "className":"action translate"}, "attributes": {"data-rel":"panel", "data-iconpos":"notext", "data-action":"set_alert", "data-icon":"bell", "data-i18n":"global_dict.save"}, "logic": {"text":"Save"}}
{"type":"a", "direct": {"href": "#global-search", "className":"action translate"}, "attributes": {"data-rel":"panel", "data-iconpos":"notext", "data-action":"set_sales", "data-icon":"bell", "data-i18n":"global_dict.save"}, "logic": {"text":"Save"}}
]
}
]
......@@ -133,7 +140,7 @@
"type": "a",
"direct": {
"href": "#",
"className": "panel-close ui-icon-remove ui-btn ui-btn-icon-notext ui-shadow ui-corner-all"
"className": "ui-panel-close ui-icon-remove ui-btn ui-btn-icon-notext ui-shadow ui-corner-all"
},
"attributes": {
"data-enhanced": true,
......
......@@ -1391,12 +1391,10 @@
"type": "a",
"direct": {
"href": "#",
"className": "panel-close ui-icon-remove ui-btn " +
"className": "ui-panel-close ui-icon-remove ui-btn " +
"ui-btn-icon-notext ui-shadow ui-corner-all"
},
"attributes": {
"data-enhanced": true,
"data-i18n": null,
"data-rel": "close"
},
"logic": {"text": "Close"}
......@@ -5310,6 +5308,13 @@
return false;
})
// panel close (since default does not work on dynamic content
// TODO: integrate this into action if there is no other way!
.on("click", "div.ui-panel a.ui-panel-close", function (e) {
$(this).closest("div.ui-panel").panel("close");
})
// global actions
.on("click change keyup input", ".action", function (e) {
var val, last, element, type;
......
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