Merge permissions cache and inherited permissions #110
@ -22245,6 +22245,44 @@ function AboutViewModel(urls) {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This model is used by admin/settings.blade.php.
|
||||
* @constructor
|
||||
*/
|
||||
function SettingsViewModel(urls, lang) {
|
||||
this.el = '#settings-app';
|
||||
|
||||
this.data = {
|
||||
is_rebuilding_permissions_cache: false
|
||||
};
|
||||
|
||||
this.methods = {
|
||||
rebuildPermissionsCache: function (e) {
|
||||
var self = this;
|
||||
|
||||
$.ajax(
|
||||
urls.rebuild_permissions_cache,
|
||||
{
|
||||
complete: function() {
|
||||
self.is_rebuilding_permissions_cache = false;
|
||||
},
|
||||
dataType: 'json',
|
||||
error: function (xhr, textStatus, errorThrown) {
|
||||
alert(lang.permissions_cache_rebuild_failed);
|
||||
},
|
||||
method: 'POST',
|
||||
success: function (data) {
|
||||
alert(lang.permissions_cache_rebuild_succeeded);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
/**
|
||||
* This model is used by admin/analyse_album.blade.php, to analyse all images.
|
||||
* @constructor
|
||||
|
Loading…
Reference in New Issue
Block a user