Skip to content
Snippets Groups Projects
Commit a5929474 authored by Élie Fidèle Rijaniaina's avatar Élie Fidèle Rijaniaina
Browse files

découplage script

parent 55371e70
No related branches found
No related tags found
No related merge requests found
(function (X, $) {
function xhr_get_action_by_link() {
return (new Promise(function (resolve, reject) {
var url = baseUrl + "/co2/action/cornerdev/method/url-exists",
post = {
url: X.location.href
};
ajaxPost(null, url, post, function (response) {
if (response.success)
resolve(response.content);
else
reject({
code: 41,
msg: response.content
});
}, function (arg0, arg1, arg2) {
reject({
code: 42,
msg: [arg0, arg1, arg2]
});
})
}));
}
function get_storage() {
var data = sessionStorage.getItem("cd-refresh");
var default_refresh = {
link: W.location.href,
refresh: 0
};
data = $.extend({}, default_refresh, JSON.parse(data));
if (data.link === W.location.href)
data.refresh++;
else
data = {
link: W.location.href,
refresh: 1
};
return (data);
}
function set_storage(data) {
var save = $.extend({}, get_storage(), data);
}
// start of instruction
})(window, jQuery);
\ No newline at end of file
......@@ -24,7 +24,8 @@ class ActionController extends CommunecterController {
return array(
'addaction' => \PixelHumain\PixelHumain\modules\citizenToolKit\controllers\action\AddActionAction::class,
'list' => \PixelHumain\PixelHumain\modules\citizenToolKit\controllers\action\ListAction::class,
"reorder" => \PixelHumain\PixelHumain\modules\citizenToolKit\controllers\action\ReorderAction::class
"reorder" => \PixelHumain\PixelHumain\modules\citizenToolKit\controllers\action\ReorderAction::class,
"cornerdev" => \PixelHumain\PixelHumain\modules\citizenToolKit\controllers\action\CornerdevAction::class,
);
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment