diff --git a/public/js/app-actions.js b/public/js/app-actions.js index 331a80d83..2948d9ac1 100644 --- a/public/js/app-actions.js +++ b/public/js/app-actions.js @@ -568,7 +568,6 @@ sysPass.Actions = function (log) { const opts = sysPassApp.requests.getRequestOpts(); opts.url = sysPassApp.util.getUrl(ajaxUrl.entrypoint, {r: $obj.data("route")}); - opts.method = "get"; opts.data = $obj.serialize(); sysPassApp.requests.getActionCall(opts, function (json) { @@ -1860,6 +1859,9 @@ sysPass.Actions = function (log) { } } }); + }, + refresh: function ($obj) { + $('#' + $obj.data("action-form")).submit(); } }; diff --git a/public/js/app-actions.min.js b/public/js/app-actions.min.js index dd279443b..7cffea1b2 100644 --- a/public/js/app-actions.min.js +++ b/public/js/app-actions.min.js @@ -13,8 +13,8 @@ f({r:a.data.nextAction},"account"))})},menu:function(a){a.hide();a.parent().chil var b=sysPassApp.requests.getRequestOpts();b.url=e.entrypoint;b.data={r:a.data("action-route")+"/"+a.data("history-id")+"/"+a.data("item-id"),sk:sysPassApp.sk.get()};sysPassApp.requests.getActionCall(b,function(a){sysPassApp.msg.out(a);void 0!==a.data.itemId&&void 0!==a.data.nextAction&&f({r:[a.data.nextAction,a.data.itemId]},"account")})},listFiles:function(a){c.info("account:getfiles");var b=sysPassApp.requests.getRequestOpts();b.method="get";b.type="html";b.url=sysPassApp.util.getUrl(e.entrypoint, {r:[a.data("action-route"),a.data("item-id")],del:a.data("delete"),sk:sysPassApp.sk.get()});sysPassApp.requests.getActionCall(b,function(d){a.html(d)})},search:function(a){c.info("account:search");var b=$("#frmSearch");b.find("input[name='sk']").val(sysPassApp.sk.get());b.find("input[name='skey']").val();b.find("input[name='sorder']").val();void 0!==a&&b.find("input[name='start']").val(0);a=sysPassApp.requests.getRequestOpts();a.method="get";a.url=sysPassApp.util.getUrl(e.entrypoint,{r:b.data("action-route")}); a.data=b.serialize();sysPassApp.requests.getActionCall(a,function(a){10===a.status&&sysPassApp.msg.out(a);$("#res-content").empty().html(a.data.html)})},save:function(a){c.info("account:save");var b=sysPassApp.requests.getRequestOpts();b.url=e.entrypoint+"?r="+a.data("action-route")+"/"+a.data("item-id");b.data=a.serialize();$("select.select-box-tags[data-hash][data-updated=true]").each(function(a,c){b.data+="&"+c.getAttribute("id")+"_update=1"});sysPassApp.requests.getActionCall(b,function(a){sysPassApp.msg.out(a); -void 0!==a.data.itemId&&void 0!==a.data.nextAction&&f({r:[a.data.nextAction,a.data.itemId]},"account")})}},w={logout:function(){sysPassApp.util.redirect("index.php?r=login/logout")},login:function(a){c.info("main:login");var b=sysPassApp.requests.getRequestOpts();b.url=sysPassApp.util.getUrl(e.entrypoint,{r:a.data("route")});b.method="get";b.data=a.serialize();sysPassApp.requests.getActionCall(b,function(b){var d=$(".extra-hidden");switch(b.status){case 0:sysPassApp.util.redirect(b.data.url);break; -case 2:sysPassApp.msg.out(b);a.find("input[type='text'],input[type='password']").val("");0";mdlDialog().show({text:b,negative:{title:sysPassApp.config.LANG[44],onClick:function(a){a.preventDefault();sysPassApp.msg.error(sysPassApp.config.LANG[44])}}, positive:{title:sysPassApp.config.LANG[43],onClick:function(b){b=a.find("input[name='taskId']").val();var d=sysPassApp.requests.getRequestOpts();b&&(d.useFullLoading=!0,r.run(b));d.url=sysPassApp.util.getUrl(e.entrypoint,{r:a.data("action-route")});d.method="get";d.data=a.serialize();sysPassApp.requests.getActionCall(d,function(b){sysPassApp.msg.out(b);0!==b.status?a.find(":input[name=key]").val(""):(r.end(),setTimeout(function(){sysPassApp.util.redirect("index.php")},5E3))})}}})},getUpdates:function(){c.info("main:getUpdates"); var a=sysPassApp.requests.getRequestOpts();a.method="get";a.url=sysPassApp.util.getUrl(e.entrypoint,{r:"status/checkRelease",isAjax:1});a.timeout=1E4;a.useLoading=!1;var b=$("#updates");sysPassApp.requests.getActionCall(a,function(a){0===a.status?0'+a.data.title+'\n
cloud_download
\n \n '+ @@ -56,4 +56,4 @@ function(c){d(c.data);b.setValue(a.data("selected-id"),!0);sysPassApp.triggers.u var b=$(a.data("src")),d=sysPassApp.requests.getRequestOpts();d.url=e.entrypoint+"?r="+a.data("action-route");d.data=b.serialize()+"&sk="+sysPassApp.sk.get();sysPassApp.requests.getActionCall(d,function(a){sysPassApp.msg.out(a);0===a.status&&void 0!==a.data.template&&void 0!==a.data.items&&h(a.data.template,{open:function(){var b=$("#ldap-results").find(".list-wrap").empty();a.data.items.forEach(function(a){b.append(sysPassApp.theme.html.getList(a.items,a.icon))})}})})},"import":function(a){c.info("ldap:import"); var b='

'+sysPassApp.config.LANG[57]+"

";mdlDialog().show({text:b,negative:{title:sysPassApp.config.LANG[44],onClick:function(a){a.preventDefault();sysPassApp.msg.error(sysPassApp.config.LANG[44])}},positive:{title:sysPassApp.config.LANG[43],onClick:function(b){b=$(a.data("src"));var c=sysPassApp.requests.getRequestOpts();c.url=e.entrypoint+"?r="+a.data("action-route");c.data=b.serialize()+"&sk="+sysPassApp.sk.get();sysPassApp.requests.getActionCall(c,function(a){sysPassApp.msg.out(a)})}}})}}, track:{unlock:function(a){c.info("track:unlock");var b=sysPassApp.requests.getRequestOpts();b.method="get";b.url=sysPassApp.util.getUrl(e.entrypoint,{r:[a.data("action-route"),a.data("item-id")],sk:sysPassApp.sk.get(),isAjax:1});sysPassApp.requests.getActionCall(b,function(b){sysPassApp.msg.out(b);g.refresh(a)})},clear:function(a){c.info("track:clear");var b='

'+sysPassApp.config.LANG[71]+"

";mdlDialog().show({text:b,negative:{title:sysPassApp.config.LANG[44], -onClick:function(a){a.preventDefault();sysPassApp.msg.error(sysPassApp.config.LANG[44])}},positive:{title:sysPassApp.config.LANG[43],onClick:function(b){b.preventDefault();g.save(a)}}})}}}}; +onClick:function(a){a.preventDefault();sysPassApp.msg.error(sysPassApp.config.LANG[44])}},positive:{title:sysPassApp.config.LANG[43],onClick:function(b){b.preventDefault();g.save(a)}}})},refresh:function(a){$("#"+a.data("action-form")).submit()}}}};