'); $('.carousel-indicators > li').first().addClass('active'); b = true; } if(!b){ activeCarouselFirstImg(); } */ /*if (data.pagination !== 'undefined' && data.pagination.next) { getPploadFiles(data.pagination.next); }*/ }, error: function (jqXHR, textStatus, errorThrown) { activeCarouselFirstImg(); } }); } function generateOcsUrl(url, type, filename) { if (!url || !type) { return ''; } if (!filename) { filename = url.split('/').pop().split('?').shift(); } return 'ocs://install' + '?url=' + encodeURIComponent(url) + '&type=' + encodeURIComponent(type) + '&filename=' + encodeURIComponent(filename); } function updateOcsCompatible(fileId, isCompatible) { var $url = "/p/1185760/updatepploadfile"; if(fileId != 'undefined' && fileId != null) { $.ajax({ url: $url, type: 'POST', data: { file_id: fileId, ocs_compatible: (isCompatible==true?1:0) }, dataType: 'json', success: function (data, textStatus, jqXHR) { if (data.status == 'ok') { $("#files-panel").find('table[data-ppload-files] tbody').html(''); $('#dropdown_downloads').html(''); $("#files-panel").find('table[data-ppload-files] tfoot').html(''); getPploadFiles(); } }, error: function (jqXHR, textStatus, errorThrown) { alert("Error: " + textStatus + ", " + errorThrown); } }); } } function shortFilename(filename) { var returnString = filename; if(filename.length > 25) { var name = filename.substring(0,22); var fileExt = filename.split('.').pop(); if(fileExt.length>3) { name = name.substring(0,(25-fileExt.length)); } returnString = name + '...' + fileExt; } return returnString; } function roundFileSizeInMB(bytes) { // min size 0.01MB if(bytes>0) { var size = (bytes / 1048576).toFixed(2); if(size == '0.00') { return Number('0.01'); }else { return Number(size); } } } fnToggleInactiveFiles = function(){ $('.inactiverows').toggle(); }; function humanFileSize(bytes,isExternLink) { if(isExternLink) return '----'; if(bytes>0) { var size = ''; size = (bytes / 1048576).toFixed(2); if(size == '0.00') { return '0.01 MB'; }else { return size+' MB'; } } else { return '0.00 MB'; } } function humanFileSize_(bytes) { if(bytes>0) { var size = ''; size = (bytes / 1048576).toFixed(2); /* if (bytes >= 1073741824) { size = (bytes / 1073741824).toFixed(2) + 'GB'; } else if (bytes >= 1048576) { size = (bytes / 1048576).toFixed(2) + 'MB'; } else if (bytes >= 1024) { size = (bytes / 1024).toFixed(2) + 'KB'; } else { size = bytes + 'bytes'; }*/ if(size == '0.00') { return '0.01 MB'; }else { return size+' MB'; } } else { return '0.00 MB'; } } //$('a[href="#files-panel"][data-toggle="tab"]').on('click', function () { if (!hasFilesPanelOpened) { getPploadFiles(); hasFilesPanelOpened = true; } //}); }); $(function() { $('#modal-installation-instructions').on('show.bs.modal', function (e) { $.ajax({ url: '/p/1185760/loadinstallinstruction', success: function (results) { var text = results.data; $('#modal-installation-instructions').find('.modal-body').html(text); } }); }); });