Commit 49724873 authored by Sven Franck's avatar Sven Franck

app: replaced unused with required actions ...

parent 3362afae
......@@ -2966,6 +2966,55 @@
// content.set..., no need for dynamic content and pointer
map.actions = {
/**
* POST an object
* @method new
* @param {object} obj Action Object
**/
"new": function (obj) {
storage.write(obj)
.then(function (response) {
app.util.loader("", "status_dict.saved", "check");
app.navigate(obj, response);
})
.fail(function (error) {
switch (error.status) {
case 408: app.util.loader("", "status_dict.timeout", "clock-o"); break;
case 400: app.util.loader("", "validation_dict.general", "ban"); break;
default: app.util.loader("", "status_dict.error", "ban"); break;
}
});
},
/**
* GET an object
* @method get
* @param {object} obj Action Object
**/
"get": function (obj) {
storage.fetch(obj);
},
/**
* PUT an object
* @method update
* @param {object} obj Action Object
**/
"update": function (obj) {
storage.write(obj)
.then(function (response) {
app.util.loader("", "status_dict.saved", "check");
app.navigate(obj, response);
})
.fail(function (error) {
switch (error.status) {
case 408: app.util.loader("", "status_dict.timeout", "clock-o"); break;
case 400: app.util.loader("", "validation_dict.general", "ban"); break;
default: app.util.loader("", "status_dict.error", "ban"); break;
}
});
},
/**
* Look up single value from dict
* @method translateLookup
......@@ -3115,42 +3164,6 @@
}
},
/**
* Show jumps popup
* @method jump
* @param {object} obj Action Object
**/
"browse": function (obj) {
factory.util.setDynamicPointer(obj, "browse");
},
/**
* Show task popup
* @method tasks
* @param {object} obj Action Object
**/
"tasks": function (obj) {
factory.util.setDynamicPointer(obj, "tasks");
},
/**
* Show application popup
* @method login
* @param {object} obj Action Object
**/
"login": function (obj) {
factory.util.setDynamicPointer(obj, "login");
},
/**
* Show export popup
* @method export
* @param {object} obj Action Object
**/
"export": function (obj) {
factory.util.setDynamicPointer(obj, "export");
},
/**
* Generic pagination method changing number of records displayed
* @method limit
......
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