1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- //CHARGEMENT DE LA PAGE
- function init_plugin_git(){
- switch($.urlParam('page')){
- default:
- break;
- }
- git_git_repository_search();
- }
- function hackpoint_resource_git_save(){
- if($('.hackpoint').hasClass('readonly')) return;
- var data = {};
- data.action = 'hackpoint_resource_git_save';
- data.id = $('#sketch-editor').attr('data-id');
- data.repository = $('#repository-form').attr("data-repository");
- data.url = $('#url').val();
- data.synchronise = $('#synchronise').prop('checked');
- $('.sketch-preloader').show();
- $.action(data,function(r){
- $('#repository-form').attr("data-repository",r.repository);
- setTimeout(function(){
- $('.sketch-preloader').fadeOut(200);
- },300);
- hackpoint_resource_git_explore();
- });
- }
- function hackpoint_resource_git_init(){
- hackpoint_resource_git_explore();
- }
- function hackpoint_resource_git_explore(){
- var data = {};
- data.action = 'hackpoint_resource_git_explore';
- data.id = $('#sketch-editor').attr('data-id');
- $('#git-browser').html('<div style="width:100%;padding:15px;text-align:center"><i class="fas fa-circle-notch fa-spin"></i> Mise à jour du dépôt, veuillez patienter...</div>');
- $.action(data,function(r){
- setTimeout(function(){
- $('.sketch-preloader').fadeOut(200);
- },300);
- $('#git-browser').html('<div id="file-browser"></div>');
- var documentApi = new DocumentApi('#file-browser',{
- root : r.root
- });
- documentApi.hidePanel('detail');
- documentApi.rightEdit = false;
- documentApi.rightDelete = false;
- documentApi.rightPermission = false;
- documentApi.load();
- init_components();
- });
- }
|