mirror of
https://github.com/myvesta/vesta
synced 2025-07-14 17:13:23 -07:00
Session handling
This commit is contained in:
parent
e1011048bd
commit
b1ea8b2726
10 changed files with 243 additions and 91 deletions
|
@ -1,3 +1,26 @@
|
|||
App.Actions.authorize = function()
|
||||
{
|
||||
if ($('#authorize-form').length > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
App.View.popup('login');
|
||||
}
|
||||
|
||||
App.Actions.do_authorise = function()
|
||||
{
|
||||
$('#authorize-error').text('');
|
||||
App.Ajax.request('MAIN.signin', {'login':$('#authorize-login').val(), 'password':$('#authorize-login'.val())}, function(reply)
|
||||
{
|
||||
if (reply.result) {
|
||||
location.href = '';
|
||||
}
|
||||
else {
|
||||
$('#authorize-error').text(reply.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
App.Actions.delete_entry = function(evt)
|
||||
{
|
||||
var confirmed = confirm(App.i18n.getMessage('confirm'));
|
||||
|
@ -351,3 +374,14 @@ App.Actions.view_template_info = function(evt)
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
App.Actions.toggle_stats_block = function(evt)
|
||||
{
|
||||
var elm = $(evt.target);
|
||||
if (!!elm.attr('checked')) {
|
||||
elm.parents('.stats-settings').find('.stats-block').removeClass('hidden');
|
||||
}
|
||||
else {
|
||||
elm.parents('.stats-settings').find('.stats-block').addClass('hidden');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue