Commit dca54136 authored by Sven Franck's avatar Sven Franck

added layout_level to gadget state so it's available on updates

parent 2dc6df34
......@@ -230,7 +230,7 @@
}
}
} else {
util.loader("", "global_dict.status_dict.failed", "ban-circle");
util.loader("", "status_dict.failed", "ban-circle");
}
// since we are jquerying, close (all) popups
......@@ -238,7 +238,7 @@
$(".ui-popup").popup("close");
})
.then(function () {
util.loader("", "global_dict.status_dict.saving");
util.loader("", "status_dict.saving");
// register the user
return app.register(obj.id)
......@@ -254,7 +254,7 @@
if (gadget.getAttribute("data-depend") === "login_state") {
util.loader("", "global_dict.status_dict.updating");
util.loader("", "status_dict.updating");
// update gadget
app.setContent(
......@@ -266,7 +266,8 @@
},
{
"fragment_list": gadget.state.fragment_list,
"mode": gadget.state.view
"mode": gadget.state.view,
"layout_level": gadget.state.layout_level
},
undefined,
true
......@@ -4098,7 +4099,7 @@
storage.remove = function (config) {
var store, items, i, kill;
util.loader("", "global_dict.status_dict.removing");
util.loader("", "status_dict.removing");
store = storage.items;
kill = config.state.query.last || config.state.query._id;
......@@ -4194,7 +4195,7 @@
delete obj.identifier;
}
util.loader("", "global_dict.status_dict.saving");
util.loader("", "status_dict.saving");
// TODO: a post should always include all required fields
// TODO: find a way to set default fields, like timestamp etc
......@@ -4214,7 +4215,7 @@
app.setLoginStatus(answer.response, config.portal_type_source);
break;
}
util.loader("", "global_dict.status_dict.saved", "check");
util.loader("", "status_dict.saved", "check");
return pass_id;
}
})
......@@ -4314,7 +4315,7 @@
// update gadget
app.setContent(
{"generate": "gadget", "id": config.id, "href": config.id},
{"fragment_list": config.state.fragment_list},
{"fragment_list": config.state.fragment_list, "layout_level": config.state.layout_level},
false
)
.then(function (reply) {
......@@ -4470,7 +4471,7 @@
app.timer = window.setTimeout(function () {
app.setContent(
{"generate": "gadget", "id": config.id, "href": config.id},
{"fragment_list": config.state.fragment_list},
{"fragment_list": config.state.fragment_list, "layout_level": config.state.layout_level},
false
)
.then(function (reply) {
......@@ -4624,7 +4625,7 @@
// update gadget
app.setContent(
{"generate": "gadget", "id": config.id, "href": config.id},
{"fragment_list": config.state.fragment_list},
{"fragment_list": config.state.fragment_list, "layout_level": config.state.layout_level},
false
)
.then(function (reply) {
......@@ -5263,7 +5264,7 @@
{"data-enhanced": "true"},
{
"text": home ? "Home" : title,
"data-i18n": home ? "page_dict.home.title" : (translation_failed
"data-i18n": home ? "global_dict.home" : (translation_failed
? null : "page_dict." + title.split("?")[0] + ".title")
}
);
......@@ -5521,7 +5522,6 @@
var pass = reply.pass, reference, last;
if (pass.skip === undefined) {
// create or update state object
if (pass.create === false) {
......@@ -5539,6 +5539,7 @@
"type": pass.type,
"method": pass.constructor,
"fragment_list": pass.fragment_list,
"layout_level": pass.layout_level,
"id": pass.id,
"view": pass.mode
};
......@@ -5622,7 +5623,7 @@
if (store && items.length > 0) {
// show some status
util.loader("", "global_dict.status_dict.storing");
util.loader("", "status_dict.storing");
// as store will also be called directly and may require field
// definitions for validating what is being stored, we may fetch
......@@ -6121,7 +6122,7 @@
// TODO: not bulletproof i18n handling... we expect i18n to be defined
if (typeof data.toPage === "object") {
if ($.mobile.firstPage[0].id === data.toPage[0].id) {
app.setPageTitle("page_dict.home.title");
app.setPageTitle("global_dict.home");
}
}
......@@ -6795,7 +6796,7 @@
/* ERROR HANDLER */
/* ====================================================================== */
/**
* Capture errors, log to console and trigger bugticker
* Capture errors to do .... something
* @method error
* @param {object} err Error object
*/
......@@ -6811,16 +6812,6 @@
/* ====================================================================== */
/* ENTRY POINT */
/* ====================================================================== */
/**
* There are 5 "modules" in this app
* factory => generates UI content
* storage => storage handler
* app => application manager
* map => map storage data to factory
* util => helper functions
* flux => hapless attempt at security
**/
app.contentLoaded(window, function () {
// Don't wipe if opened in a popup (like in oAuth redirect_uri)
......
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