main.js 757 B

123456789101112131415161718192021222324252627282930313233343536
  1. function init_plugin_document(){
  2. switch($.urlParam('page')){
  3. default:
  4. break;
  5. }
  6. var urlOptions = $.urlParam('data');
  7. if(urlOptions && urlOptions!='')
  8. urlOptions = JSON.parse(atob(urlOptions));
  9. var doc = new DocumentApi('#document-container',urlOptions);
  10. var data = $('#document-container').data();
  11. if(!data.rightPermission) doc.options.rightPermission = false;
  12. if(!data.rightDelete) doc.options.rightDelete = false;
  13. if(!data.rightEdit) doc.options.rightEdit = false;
  14. doc.load();
  15. }
  16. /** SETTINGS */
  17. //Enregistrement des configurations
  18. function document_setting_save(){
  19. $.action({
  20. action : 'document_setting_save',
  21. fields : $('#document-setting-form').toJson()
  22. }, function(r){
  23. $.message('success','Enregistré');
  24. });
  25. }