Commit 11e1631f authored by Sven Franck's avatar Sven Franck

console.log all JIO calls

parent 0247423b
......@@ -1317,9 +1317,9 @@
placeholder = spec.placeholder_dict || {};
// no auth
console.log("so what is answer")
console.log(answer)
console.log(answer === null)
// console.log("so what is answer")
// console.log(answer)
// console.log(answer === null)
if (answer === null) {
target = factory.util.wrapInForm(spec);
......@@ -3768,14 +3768,8 @@
"pass": {"type": config.gadget.state.type, "reply": true}
})
.then(function(answer) {
console.log("soo....")
console.log(answer)
// TODO: This is not the correct place to run all status updates!
if (answer.response.result === "success") {
console.log("swithing")
console.log(config)
console.log(config.gadget)
console.log("mh")
switch (config.gadget.getAttribute("data-set")) {
case "login_state":
app.setLoginStatus(answer.response, config.portal_type_source);
......@@ -4267,8 +4261,7 @@
"issued": stamp,
"expires": auth ? auth.expires_in : 3600
}
console.log("so...")
console.log(flux)
// need to update the .... button
// TODO: make a login gadget, store dependend buttons in state
links = util.getHeader().getElementsByTagName("A");
......@@ -4704,8 +4697,6 @@
config.deeplink = true;
config.layout_identifier = clean_hash.split("::")[0];
}
console.log("parsed link")
console.log(config)
return config;
};
......@@ -4853,6 +4844,7 @@
return factory[content_dict.type](content_dict, spec, create)
case "gadget":
console.log("setContent: 'Rendering' a gadget. If no portal type is defined, nothing is loaded");
// no portal_type, no dynamic data
if (content_dict.portal_type_source === undefined &&
content_dict.href === undefined) {
......@@ -5193,7 +5185,8 @@
method = "put";
obj._id = obj.identifier;
}
console.log("storing an item, METHOD = "+(method || "post") + " STORAGE = items");
console.log(obj)
promises[i] = store[method || "post"](obj)
.then(function(answer) {
return answer;
......@@ -5342,7 +5335,6 @@
if (pass.auth) {
return app.checkLoginStatus(true, pass)
.then(function(new_pass) {
return {
"pass": new_pass
}
......@@ -5369,7 +5361,8 @@
// need to make a promise to not break the chain
return RSVP.resolve({"pass": parcel.pass});
}
console.log("app.fetchConfiguration > GETATTACHMENT, STORAGE = " + parcel.storage);
console.log({"_id": parcel.file, "_attachment": parcel.attachment});
store = storage[parcel.storage];
return store.getAttachment({
......@@ -5414,6 +5407,8 @@
*/
// NOTE: until we have real data we load fake data on application init!
app.fetchData = function (parcel) {
console.log("app.fetchData > trying items, ALLDOCS, STORAGE = " +parcel.storage)
console.log(parcel.query)
return storage[parcel.storage].allDocs(parcel.query)
.then(function (response) {
return {
......@@ -5465,10 +5460,19 @@
util.error({"error": "getFromDisk: no storage defined"});
return RSVP.all([]);
}
console.log("getFromDisk: Store sample data, METHOD = put, STORAGE = " + app.default_dict.storage_dict.settings)
console.log({"_id": (property_dict.file || app.default_dict.storage_dict.settings)});
return storage_location.put({
"_id": (property_dict.file || app.default_dict.storage_dict.settings)
})
.then(function () {
console.log("getFromDisk: Store sample data as attachment, METHOD: putAttachment, Storage = "+app.default_dict.storage_dict.settings)
console.log({
"_id": (property_dict.file || app.default_dict.storage_dict.settings),
"_attachment": (property_dict.attachment || app.default_dict.storage_dict.configuration),
"_data": JSON.stringify(response),
"_mimetype": "application/json"
});
return storage_location.putAttachment({
"_id": (property_dict.file || app.default_dict.storage_dict.settings),
"_attachment": (property_dict.attachment || app.default_dict.storage_dict.configuration),
......@@ -5574,8 +5578,7 @@
} else {
destination = config.layout_identifier;
}
console.log("RUNNING WITH")
console.log(destination)
return app.fetchConfiguration({
"storage": app.default_dict.storage_dict.settings,
"file": "pages",
......
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