Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (x.status.errno) {
//just display that there was an error for now
if (errback !== undefined) {
errback(x.status, x.payload);
}
$.L(x.status.msg);
return;
}
// console.log("cb w/ x=", x);
callback(x.payload);
};
var auth_str = Conf.userinfo.guest ? 'guest=1' : 'ckey=' + Conf.userinfo.ckey;
$.post(Conf.servers.rpc + '/pdf4/rpc?' + auth_str, { cid: Pers.connection_id, f: fctname, a: JSON.stringify(dict) }, cb, 'json');
};
Ok: function () {
var form = $('#file_update_form')[0];
var newauth = ('ckey' in Conf.userinfo) ? '&ckey=' + Conf.userinfo.ckey : '';
form.setAttribute('action', Conf.servers.upload + '/pdf3/upload/update?id_source=' + id + newauth);
form.submit();
$.I('Updating in progress...');
$(this).dialog('destroy');
},
},
content: function ($div) {
$div.filesView({ img_server: Conf.servers.img, admin: Pers.admin });
$div.filesView('set_model', Pers.store);
},
};
content: function ($div) {
$div.docView({ img_server: Conf.servers.img });
$div.docView('set_model', Pers.store);
/*
window.setTimeout(function(){
$div.docView("set_model",Pers.store );
}, 5000);
*/
},
};
content: function ($div) {
$div.docView({ img_server: Conf.servers.img });
$div.docView('set_model', Pers.store);
},
};
content: function ($div) {
$div.docView({ img_server: Conf.servers.img });
window.setTimeout(function () {
$div.docView('set_model', Pers.store);
}, 5000);
},
};
content: function ($div) {
$div.docView({ img_server: Conf.servers.img });
$div.docView('set_model', Pers.store);
},
};
$.concierge.keydown_block = false;
//register for some events:
$.concierge.addListeners(Pers, {
successful_login: function (evt) {
Auth.set_cookie('ckey', evt.value.ckey);
Auth.set_cookie('userinfo', evt.value.userinfo);
Conf.userinfo = JSON.parse(unescape(evt.value.userinfo));
$.I('Welcome ' + Conf.userinfo.firstname + " " + Conf.userinfo.lastname);
f_prepare_sidebar();
Pers.set_nav_user();
},
}, 'globalPersObject');
//tell who to make rpc requests to
Conf.servers.rpc = Pers.server_url;
$('body').append("<div class="nb_sidebar nb_inactive"></div>");
$('#login_to_nb').click(function () {
$.concierge.get_component('login_user_menu')();
});
//if user identified already, let's proceed:
if (Conf.userinfo) {
//optimization to get this visibile faster
//if ckey is invalid, sidebar will be erased
//and replaced by a login button
f_prepare_sidebar();
}
window.addEventListener('message', function (e) {