= $this->project_title ?>
+getIdentity(); if(null == $identity || (null != $identity && !$this->isSupporter($identity->member_id))) { ?> -
Please consider to become a supporter to help the site grow.
+ Please consider to become a supporter to help the site grow. isSupporter($identity->member_id))) { ?> -Thank you for your support!
- -- url.'">Please click here'; - echo ''; - - } else { - ?> - -
'); }; image.onerror = function () { alert('Invalid file type: ' + file.type); }; }; }, initProductPicture: function () { if ($('#image_small').length == 0) { return; } if ($('#image_small').attr('value').length == 0) { return; } var imageTarget = $('#image_small').data('target'); $(imageTarget).attr('src', 'https://cn.opendesktop.org/cache/200x200-2/img/' + $('#image_small').attr('value')); $(imageTarget).show(); $('button#add-product-picture').text('CHANGE LOGO'); }, initTitlePicture: function () { if ($('#image_big').length == 0) { return; } if ($('#image_big').attr('value').length == 0) { return; } var imageTarget = $('#image_big').data('target'); $(imageTarget).attr('src', 'https://cn.opendesktop.org/cache/200x200-2/img/' + $('#image_big').attr('value')); $(imageTarget).show(); $('button#add-title-picture').text('CHANGE BANNER'); }, initProfilePicture: function () { if ($('#profile_image_url').length == 0) { return; } if ($('#profile_image_url').attr('value').length == 0) { return; } var imageTarget = $('#profile_image_url').data('target'); $(imageTarget).attr('src', $('#profile_image_url').attr('value')); $('#profile-picture').attr('src', $('#profile_image_url').attr('value')); $(imageTarget).show(); $('button#add-profile-picture').text('CHANGE PICTURE'); }, initProfilePictureBackground: function () { if ($('#profile_image_url_bg').length == 0) { return; } if ($('#profile_image_url_bg').attr('value').length == 0) { return; } var imageTarget = $('#profile_image_url_bg').data('target'); $(imageTarget).attr('src', $('#profile_image_url_bg').attr('value')); $('#profile-picture-background-preview').attr('src', $('#profile_image_url_bg').attr('value')); $(imageTarget).show(); $('button#add-profile-picture-background').text('CHANGE PICTURE'); } }; var MenuHover = (function () { return { setup: function () { $('body').on('click', 'a#login-dropdown', function (event) { event.stopPropagation(); $('.header-login-container').toggleClass('active'); }).on('click', '.header-login-container', function (event) { event.stopPropagation(); }).on('click', 'a.menu-trigger', function (event) { event.stopPropagation(); var html_menu_element = '.' + $(this).attr('rel'); $(html_menu_element).toggleClass('active'); }).on('mouseup', function (event) { var container = $('ul.profile-menu'); var trigger = $('li.profile-menu-container a.menu-trigger'); if (trigger.is(event.target)) { return; } if (!container.is(event.target) // if the target of the click isn't the container... && container.has(event.target).length === 0) // ... nor a descendant of the container { container.removeClass('active'); } }).on('mouseup', function (event) { container = $('div.header-login-container'); trigger = $('a#login-dropdown'); if (trigger.is(event.target)) { return; } if (!container.is(event.target) // if the target of the click isn't the container... && container.has(event.target).length === 0) // ... nor a descendant of the container { container.removeClass('active'); } }).click(function () { $('.header-login-container.active').removeClass('active'); $('.profile-menu.active').removeClass('active'); }); } }; })(); var ButtonCode = (function () { return { setup: function () { $('#button-code-heading').click(function () { if ($(this).hasClass('button-code-active')) { $(this).removeClass('button-code-active'); $(this).parent().find('.button-code').slideUp('fast'); $(this).parent().find('.button-code').css('border-bottom', 'none'); $(this).find('.icon-expand-code').css('background-image', 'url(img/icon-expand.png)'); } else { $(this).addClass('button-code-active'); $(this).parent().find('.button-code').css('border-bottom', '1px solid #bdc3c7'); $(this).parent().find('.button-code').slideDown('fast'); $(this).find('.icon-expand-code').css('background-image', 'url(img/icon-contract.png)'); } }) }, setupClipboardCopy: function (containerId) { $(containerId).on('mouseover', function () { $(this).off('mouseover'); $(this).find('[data-clipboard-target]').each(function () { var clipboardTarget = $($(this).attr('data-clipboard-target')); $(this).zclip({ path: '/theme/flatui/js/lib/ZeroClipboard.swf', copy: $.trim($(clipboardTarget).text()) }); }); }); } }; })(); var ProductPage = (function () { return { setup: function () { $(".dropdown-toggle").dropdown(); $('.scroll-pane').jScrollPane({ mouseWheelSpeed: 30, animateScroll: true }); $('.love-it').on('click', function () { this_img_src = $(this).find('img').attr('src'); if (!$(this).hasClass('no-login') && this_img_src != '/theme/flatui/img/icon-like-color.png') { $(this).prev('.share-it').trigger('click'); } }); $('.payment-options').find('.options').find('span.option').on('click', function () { var this_number = $(this).attr('title'); var number_input = $('.payment-options').find('input[type="number"]'); number_input.attr('value', this_number).val(this_number); number_input.focus(); $('.options').find('.selected').removeClass('selected'); $(this).addClass('selected'); }); }, setupPlingButton: function () { $('#pling-amount').on('focus', function () { $('#pling-amount').popover('destroy'); }); $('#pling-start').on('click', function (event) { validateElement = $('#pling-amount'); validateValue = validateElement.val(); if (validateValue == '' || (isNaN(parseFloat(validateValue)) || !isFinite(validateValue))) { event.preventDefault(); $('#pling-amount').popover({ placement: 'bottom', html: 'true', content: '
Find out why you may have encountered this error.'); } } if (toggle) { $(toggle).modal('show'); } }); return false; }); } } })(); var Opendownloadfile= (function () { return { setup: function () { $('body').on('click', 'a.opendownloadfile', function (event) { event.preventDefault(); var file_id = $(this).attr("data-file_id"); var file_type = $(this).attr('data-file_type'); var file_name = $(this).attr('data-file_name'); var file_size = $(this).attr('data-file_size'); var project_id = $(this).attr('data-project_id'); var link_type = $(this).attr('data-link_type'); $.fancybox({ 'hideOnContentClick': true, 'autoScale': true, 'scrolling' : 'no', 'cyclic': 'true', 'transitionIn': 'elastic', 'transitionOut': 'elastic', 'type': 'iframe', - 'width':'300', - 'height':'200', + 'width':'600', + 'height':'auto', 'iframe': {'scrolling': 'no'}, 'autoSize':false, 'id': 'opendownloadfilepopup', helpers: { overlay: { locked: false } }, href:'/dl?file_id='+file_id+'&file_type='+file_type+'&file_name='+file_name+'&file_size='+file_size+'&project_id='+project_id+'&link_type='+link_type }); return false; }); } } })(); var PartialsButton = (function () { return { setup: function () { $('body').on('click', 'Button.partialbutton', function (event) { event.preventDefault(); var url = $(this).attr("data-href"); var target = $(this).attr("data-target"); var toggle = $(this).data('toggle'); var pageFragment = $(this).attr("data-fragment"); var spin = $(''); $(target).append(spin); $(target).load(url + ' ' + pageFragment, function (response, status, xhr) { if (status == "error") { if (xhr.status == 401) { if (response) { var data = jQuery.parseJSON(response); var redirect = data.login_url; if (redirect) { window.location = redirect; } else { window.location = "/login"; } } } else { $(target).empty().html('Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.
Find out why you may have encountered this error.'); } } if (toggle) { $(toggle).modal('show'); } }); return false; }); } } })(); var PartialsButtonHeartDetail = (function () { return { setup: function () { $('body').on('click', '.partialbuttonfollowproject', function (event) { event.preventDefault(); var url = $(this).attr("data-href"); var target = $(this).attr("data-target"); var auth = $(this).attr("data-auth"); var toggle = $(this).data('toggle'); var pageFragment = $(this).attr("data-fragment"); if (!auth) { $('#like-product-modal').modal('show'); return; } // product owner not allow to heart copy from voting.... var loginuser = $('#like-product-modal').find('#loginuser').val(); var productcreator = $('#like-product-modal').find('#productcreator').val(); if (loginuser == productcreator) { // ignore $('#like-product-modal').find('#votelabel').text('Project owner not allowed'); $('#like-product-modal').find('.modal-body').empty(); $('#like-product-modal').modal('show'); return; } var spin = $(''); $(target).prepend(spin); $.ajax({ url: url, cache: false }) .done(function( response ) { $(target).find('.spinning').remove(); if(response.status =='error'){ $(target).html( response.msg ); }else{ if(response.action=='delete'){ //$(target).find('.likelabel').html(response.cnt +' Likes'); $(target).find('.plingtext').html(response.cnt); $(target).find('.plingtext').addClass('heartnumberpurple'); $(target).find('.plingheart').removeClass('heartproject').addClass('heartgrey'); $(target).find('.plingheart').removeClass('fa-heart').addClass('fa-heart-o'); }else{ //$(target).find('.likelabel').html(response.cnt +' Likes'); $(target).find('.plingtext').html(response.cnt); //$(target).find('.plingtext').html(response.cnt+' Fans'); $(target).find('.plingtext').removeClass('heartnumberpurple'); $(target).find('.plingheart').removeClass('heartgrey').addClass('heartproject'); $(target).find('.plingheart').removeClass('fa-heart-o').addClass('fa-heart'); } } }); return false; }); } } })(); var PartialsButtonPlingProject = (function () { return { setup: function () { $('#plingbtn').hover(function(){ $(this).attr('src','/images/system/pling-btn-hover.png'); }, function(){ $(this).attr('src',$(this).attr('data-src')); }); $('body').on('click', '.partialbuttonplingproject', function (event) { event.preventDefault(); var url = $(this).attr("data-href"); var target = $(this).attr("data-target"); var auth = $(this).attr("data-auth"); var issupporter = $(this).attr("data-issupporter"); var toggle = $(this).data('toggle'); var pageFragment = $(this).attr("data-fragment"); if (!auth) { $('#like-product-modal').modal('show'); return; } // product owner not allow to heart copy from voting.... var loginuser = $('#like-product-modal').find('#loginuser').val(); var productcreator = $('#like-product-modal').find('#productcreator').val(); if (loginuser == productcreator) { // ignore $('#like-product-modal').find('#votelabel').text('Project owner not allowed'); $('#like-product-modal').find('.modal-body').empty(); $('#like-product-modal').modal('show'); return; } if (!issupporter) { // ignore $('#like-product-modal').find('#votelabel').html('
Find out why you may have encountered this error."); return false; }, success: function (results) { $(target).empty().html(results); $(target).find(trigger).trigger('click'); return false; } }); return false; }); } } })(); var PartialJson = (function () { return { setup: function () { $('body').on("submit", 'form.partialjson', function (event) { event.preventDefault(); event.stopImmediatePropagation(); var target = $(this).attr("data-target"); var trigger = $(this).attr("data-trigger"); jQuery.ajax({ data: $(this).serialize(), url: this.action, type: this.method, dataType: "json", error: function () { $(target).empty().html("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.
Find out why you may have encountered this error."); }, success: function (data, textStatus) { if (data.redirect) { // data.redirect contains the string URL to redirect to window.location = data.redirect; return; } if (target) { // data.message contains the HTML for the replacement form $(target).empty().html(data.message); } if (trigger) { $(target).find(trigger).trigger('click'); } } }); return false; }); } } })(); var PartialJsonFraud = (function () { return { setup: function () { $('body').on("submit", 'form.partialjsonfraud', function (event) { event.preventDefault(); event.stopImmediatePropagation(); var target = $(this).attr("data-target"); var trigger = $(this).attr("data-trigger"); var text = $('form.partialjsonfraud').find('#report-text').val(); if(text.length<5) { $('form.partialjsonfraud').find('p.warning').remove(); $('form.partialjsonfraud').find('#report-text').parent().append('
at least 5 chars
'); return false; } jQuery.ajax({ data: $(this).serialize(), url: this.action, type: this.method, dataType: "json", error: function () { $(target).empty().html("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.Find out why you may have encountered this error."); }, success: function (data, textStatus) { if (data.redirect) { // data.redirect contains the string URL to redirect to window.location = data.redirect; return; } if (target) { // data.message contains the HTML for the replacement form $(target).empty().html(data.message); } if (trigger) { $(target).find(trigger).trigger('click'); } } }); return false; }); } } })(); var PartialPayPal = (function () { return { setup: function () { this.initPayPalForm(); this.initPayPalFee(); }, initPayPalForm: function () { $('body').on("submit", 'form.partialpaypal', function (event) { event.preventDefault(); event.stopImmediatePropagation(); var target = $(this).attr("data-target"); var trigger = $(this).attr("data-trigger"); jQuery.ajax({ data: $(this).serialize(), url: this.action, type: this.method, error: function (jqXHR, textStatus, errorThrown) { $('#modal-dialog').modal('hide'); var msgBox = $(''); msgBox.html($(jqXHR.responseText).filter('.page-container').children()); msgBox.append(' '); setTimeout(function () { msgBox.modal('show'); }, 900); }, success: function (results) { $(target).empty().html(results); $(target).find(trigger).trigger('click'); $('#modal-dialog').modal('hide'); } }); return false; }); }, initPayPalFee: function () { $('body').on("change", '#amount_plings', function (event) { PartialPayPal.changeFee(); }); }, changeFee: function () { var e = document.getElementById('amount_plings'); var value = parseFloat(e.value); var pling_fee = this.round((value) * 0.05, 2); var pling_sum = (pling_fee) + (value); var paypal_fee = (pling_sum + 0.3) * 0.03 + 0.3; paypal_fee = this.round(paypal_fee, 2); var sum = value + pling_fee + paypal_fee; document.getElementById('pling_fee').value = this.round(pling_fee, 2).toFixed(2); document.getElementById('paypal_fee').value = this.round(paypal_fee, 2).toFixed(2); document.getElementById('sum').value = this.round(sum, 2); }, round: function (x, n) { var a = Math.pow(10, n); return (Math.round(x * a) / a); } } })(); var PartialCommentReviewForm = (function () { return { setup: function () { this.initForm(); }, initForm: function () { $('body').on("submit", 'form.product-add-comment-review', function (event) { event.preventDefault(); event.stopImmediatePropagation(); var c = $.trim($('#commenttext').val()); var v = $('#voteup').val(); if(v==2) { // votedown if(c.length<5) { if($('#review-product-modal').find('#votelabel').find('.warning').length==0) { $('#review-product-modal').find('#votelabel').append(" Please give a comment, thanks!"); } return; } } if(c.length<1) { if($('#review-product-modal').find('#votelabel').find('.warning').length==0) { $('#review-product-modal').find('#votelabel').append(" Please give a comment, thanks!"); } return; } $(this).find(':submit').attr("disabled", "disabled"); $(this).find(':submit').css("white-space", "normal"); var spin = $(''); $(this).find(':submit').append(spin); jQuery.ajax({ data: $(this).serialize(), url: this.action, type: this.method, error: function (jqXHR, textStatus, errorThrown) { $('#review-product-modal').modal('hide'); var msgBox = $('#generic-dialog'); msgBox.modal('hide'); msgBox.find('.modal-header-text').empty().append('Please try later.'); msgBox.find('.modal-body').empty().append("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.
Find out why you may have encountered this error."); setTimeout(function () { msgBox.modal('show'); }, 900); }, success: function (results) { $('#review-product-modal').modal('hide'); location.reload(); } }); return false; }); } } })(); var PartialFormsAjax = (function () { return { setup: function () { var form = $('form.partialajax'); var target = form.attr("data-target"); var trigger = form.attr("data-trigger"); $(form).find(':submit').on('click', function (e) { e.preventDefault(); $(form).find(':submit').attr("disabled", "disabled"); $(form).find(':submit').css("white-space", "normal"); var spin = $(''); $(form).find(':submit').append(spin); $(form).submit(); }); form.ajaxForm({ error: function () { $(target).empty().html("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.
Find out why you may have encountered this error."); }, success: function (results) { $(target).empty().html(results); $(target).find(trigger).trigger('click'); } }); } } })(); var AjaxFormWithProgress = (function () { return { setup: function (idForm) { var form = $(idForm); var target = form.attr("data-target"); var trigger = form.attr("data-trigger"); var bar = form.find('.progress-bar'); var percent = form.find('.progress-percent'); $(form).find(':submit').on('click', function (e) { e.preventDefault(); $(form).find(':submit').attr("disabled", "disabled"); $(form).find(':submit').css("white-space", "normal"); var spin = $(''); $(form).find(':submit').append(spin); $(form).submit(); }); form.ajaxForm({ beforeSend: function() { var percentVal = '0%'; bar.parent().removeClass('hidden'); bar.width(percentVal); percent.html(percentVal); }, uploadProgress: function(event, position, total, percentComplete) { var percentVal = percentComplete + '%'; bar.width(percentVal); percent.html(percentVal); }, error: function () { $(target).empty().html("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.
Find out why you may have encountered this error."); }, success: function (results) { var percentVal = '100%'; bar.width(percentVal); percent.html(percentVal); $(target).empty().html(results); $(target).find(trigger).trigger('click'); } }); } } })(); var PartialFormsAjaxMemberBg = (function () { return { setup: function () { var form = $('form.partialajaxbg'); var target = form.attr("data-target"); var trigger = form.attr("data-trigger"); $(form).find(':submit').on('click', function (e) { e.preventDefault(); $(form).find(':submit').attr("disabled", "disabled"); $(form).find(':submit').css("white-space", "normal"); var spin = $(''); $(form).find(':submit').append(spin); $(form).submit(); }); form.ajaxForm({ error: function () { $(target).empty().html("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.
Find out why you may have encountered this error."); }, success: function (results) { $(target).empty().html(results); $(target).find(trigger).trigger('click'); } }); } } })(); var AjaxForm = (function () { return { setup: function (idElement, idTargetElement) { var target = $(idTargetElement); $('body').on("submit", 'form.product-add-comment', function (event) { event.preventDefault(); event.stopImmediatePropagation(); $(this).find('button').attr("disabled", "disabled"); $(this).find('.glyphicon.glyphicon-send').removeClass('glyphicon-send').addClass('glyphicon-refresh spinning'); jQuery.ajax({ data: $(this).serialize(), url: this.action, type: this.method, dataType: "json", error: function (jqXHR, textStatus, errorThrown) { var results = JSON && JSON.parse(jqXHR.responseText) || $.parseJSON(jqXHR.responseText); var msgBox = $('#generic-dialog'); msgBox.modal('hide'); msgBox.find('.modal-header-text').empty().append(results.title); msgBox.find('.modal-body').empty().append(results.message); setTimeout(function () { msgBox.modal('show'); }, 900); }, success: function (results) { if (results.status == 'ok') { $(target).empty().html(results.data); } if (results.status == 'error') { if (results.message != '') { alert(results.message); } else { alert('Service is temporarily unavailable.'); } } } }); return false; }); } } })(); var WidgetModalAjax = (function () { return { setup: function () { $('.my-product-item').find('a.widget-button').on('click', function () { var this_rel = $(this).attr('rel'); var this_product_id = this_rel.split('product')[1]; var target = $('.modal-body#widget-code-' + this_rel); $.ajax({ url: '/widget/config/' + this_product_id, type: 'html', success: function (results) { target.prepend(results); angular.bootstrap(target, ['widgetApp']); } }); }); } } })(); var LoginContainer = (function () { return { update: function () { if (!Date.now) { Date.now = function () { return new Date().getTime(); } } var timestamp = Date.now() / 1000 | 0; var target = '#login_container'; var url = '/authorization/htmllogin?' + timestamp; $(target).load(url, function (response, status, xhr) { // nothing to do }); } } })(); var RssNews = (function () { return { setup: function () { var json_url = "https://blog.opendesktop.org/?json=1&callback=?"; $.getJSON(json_url, function (res) { var crss = ''; $.each(res.posts, function (i, item) { if (i >= 3) { return false; } var m = moment(item.date); crss += '
More info:
www.linuxuprising.com/2018/04/easily-run-and-integrate-appimage-files.html
'); $('body').on("click", "#btn-ghns-excluded", function(){ var txt = $('#ghns-excluded-text').val(); if(txt.length<5) { alert('min 5 chars'); return false; } var project_id = $(this).attr('data-projectid'); var status = $(this).attr('data-status'); var target = "/backend/project/doghnsexclude"; $.ajax({ url: target, method:'POST', data:{'project_id':project_id,'ghns_excluded':status,'msg':txt}, success: function (results) { var msgBox = $('#generic-dialog'); if (status == 0) { msgBox.find('.modal-body').empty().append('Project is successfully included into GHNS'); $('#ghns_excluded-this-checkbox').prop("checked", false); } else { msgBox.find('.modal-body').empty().append('Project is successfully excluded into GHNS'); $('#ghns_excluded-this-checkbox').prop("checked", true); } setTimeout(function () { msgBox.modal('hide'); }, 1000); }, error: function () { alert('Service is temporarily unavailable.'); } }); }); return false; }); } } })(); var AboutMeMyProjectsPaging = (function () { return { setup: function () { $(window).scroll(function() { var end = $("footer").offset().top; var viewEnd = $(window).scrollTop() + $(window).height(); var distance = end - viewEnd; if (distance < 300){ // } // if($(window).scrollTop() == $(document).height() - $(window).height()) { if(!$('button#btnshowmoreproducts').length) return; let indicator = ''; let nextpage = $('button#btnshowmoreproducts').attr('data-page'); $('button#btnshowmoreproducts').remove(); $url = window.location.href; target = '#my-products-list'; let container = $('
').append(indicator).load($url,{projectpage:nextpage},function (response, status, xhr) { if (status == "error") { if (xhr.status == 401) { if (response) { var data = jQuery.parseJSON(response); var redirect = data.login_url; if (redirect) { window.location = redirect; } else { window.location = "/login"; } } } else { $(target).empty().html('Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.Find out why you may have encountered this error.'); } } }); $('#my-products-list').append(container); } }); } } })(); var AboutMeMyProjectsPagingButton = (function () { return { setup: function () { let indicator = ''; $('body').on('click', 'button#btnshowmoreproducts', function (event) { let nextpage = $(this).attr('data-page'); $(this).remove(); $url = window.location.href; target = '#my-products-list'; let container = $('').append(indicator).load($url,{projectpage:nextpage},function (response, status, xhr) { if (status == "error") { if (xhr.status == 401) { if (response) { var data = jQuery.parseJSON(response); var redirect = data.login_url; if (redirect) { window.location = redirect; } else { window.location = "/login"; } } } else { $(target).empty().html('Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.
Find out why you may have encountered this error.'); } } }); $('#my-products-list').append(container); }); } } })(); var ProductDetailCommentTooltip = (function () { return { setup: function () { TooltipUser.setup('tooltipuser','right'); } } })(); function generateTooltipster(elements,tooltipSide) { $(elements).each(function() { $(this).tooltipster( { side: tooltipSide, theme: ['tooltipster-light', 'tooltipster-light-customized'], contentCloning: true, contentAsHTML: true, interactive: true, functionBefore: function (instance, helper) { var origin = $(helper.origin); var userid = origin.attr('data-user'); if (origin.data('loaded') !== true) { $.get('/member/' + userid + '/tooltip/', function (data) { var d = data.data; var tmp = '
")},a.onerror=function(){alert("Invalid file type: "+t.type)}}},initProductPicture:function(){if(0!=$("#image_small").length&&0!=$("#image_small").attr("value").length){var t=$("#image_small").data("target");$(t).attr("src","https://cn.opendesktop.org/cache/200x200-2/img/"+$("#image_small").attr("value")),$(t).show(),$("button#add-product-picture").text("CHANGE LOGO")}},initTitlePicture:function(){if(0!=$("#image_big").length&&0!=$("#image_big").attr("value").length){var t=$("#image_big").data("target");$(t).attr("src","https://cn.opendesktop.org/cache/200x200-2/img/"+$("#image_big").attr("value")),$(t).show(),$("button#add-title-picture").text("CHANGE BANNER")}},initProfilePicture:function(){if(0!=$("#profile_image_url").length&&0!=$("#profile_image_url").attr("value").length){var t=$("#profile_image_url").data("target");$(t).attr("src",$("#profile_image_url").attr("value")),$("#profile-picture").attr("src",$("#profile_image_url").attr("value")),$(t).show(),$("button#add-profile-picture").text("CHANGE PICTURE")}},initProfilePictureBackground:function(){if(0!=$("#profile_image_url_bg").length&&0!=$("#profile_image_url_bg").attr("value").length){var t=$("#profile_image_url_bg").data("target");$(t).attr("src",$("#profile_image_url_bg").attr("value")),$("#profile-picture-background-preview").attr("src",$("#profile_image_url_bg").attr("value")),$(t).show(),$("button#add-profile-picture-background").text("CHANGE PICTURE")}}},MenuHover={setup:function(){$("body").on("click","a#login-dropdown",function(t){t.stopPropagation(),$(".header-login-container").toggleClass("active")}).on("click",".header-login-container",function(t){t.stopPropagation()}).on("click","a.menu-trigger",function(t){t.stopPropagation();var e="."+$(this).attr("rel");$(e).toggleClass("active")}).on("mouseup",function(t){var e=$("ul.profile-menu");$("li.profile-menu-container a.menu-trigger").is(t.target)||e.is(t.target)||0!==e.has(t.target).length||e.removeClass("active")}).on("mouseup",function(t){container=$("div.header-login-container"),trigger=$("a#login-dropdown"),trigger.is(t.target)||container.is(t.target)||0!==container.has(t.target).length||container.removeClass("active")}).click(function(){$(".header-login-container.active").removeClass("active"),$(".profile-menu.active").removeClass("active")})}},ButtonCode={setup:function(){$("#button-code-heading").click(function(){$(this).hasClass("button-code-active")?($(this).removeClass("button-code-active"),$(this).parent().find(".button-code").slideUp("fast"),$(this).parent().find(".button-code").css("border-bottom","none"),$(this).find(".icon-expand-code").css("background-image","url(img/icon-expand.png)")):($(this).addClass("button-code-active"),$(this).parent().find(".button-code").css("border-bottom","1px solid #bdc3c7"),$(this).parent().find(".button-code").slideDown("fast"),$(this).find(".icon-expand-code").css("background-image","url(img/icon-contract.png)"))})},setupClipboardCopy:function(t){$(t).on("mouseover",function(){$(this).off("mouseover"),$(this).find("[data-clipboard-target]").each(function(){var t=$($(this).attr("data-clipboard-target"));$(this).zclip({path:"/theme/flatui/js/lib/ZeroClipboard.swf",copy:$.trim($(t).text())})})})}},ProductPage={setup:function(){$(".dropdown-toggle").dropdown(),$(".scroll-pane").jScrollPane({mouseWheelSpeed:30,animateScroll:!0}),$(".love-it").on("click",function(){this_img_src=$(this).find("img").attr("src"),$(this).hasClass("no-login")||"/theme/flatui/img/icon-like-color.png"==this_img_src||$(this).prev(".share-it").trigger("click")}),$(".payment-options").find(".options").find("span.option").on("click",function(){var t=$(this).attr("title"),e=$(".payment-options").find('input[type="number"]');e.attr("value",t).val(t),e.focus(),$(".options").find(".selected").removeClass("selected"),$(this).addClass("selected")})},setupPlingButton:function(){$("#pling-amount").on("focus",function(){$("#pling-amount").popover("destroy")}),$("#pling-start").on("click",function(t){return validateElement=$("#pling-amount"),validateValue=validateElement.val(),""==validateValue||isNaN(parseFloat(validateValue))||!isFinite(validateValue)?(t.preventDefault(),$("#pling-amount").popover({placement:"bottom",html:"true",content:'
Find out why you may have encountered this error.");i&&$(i).modal("show")}),!1})}},Opendownloadfile={setup:function(){$("body").on("click","a.opendownloadfile",function(t){t.preventDefault();var e=$(this).attr("data-file_id"),a=$(this).attr("data-file_type"),i=$(this).attr("data-file_name"),n=$(this).attr("data-file_size"),o=$(this).attr("data-project_id"),r=$(this).attr("data-link_type");return $.fancybox({hideOnContentClick:!0,autoScale:!0,scrolling:"no",cyclic:"true",transitionIn:"elastic",transitionOut:"elastic",type:"iframe",width:"300",height:"200",iframe:{scrolling:"no"},autoSize:!1,id:"opendownloadfilepopup",helpers:{overlay:{locked:!1}},href:"/dl?file_id="+e+"&file_type="+a+"&file_name="+i+"&file_size="+n+"&project_id="+o+"&link_type="+r}),!1})}},PartialsButton={setup:function(){$("body").on("click","Button.partialbutton",function(t){t.preventDefault();var e=$(this).attr("data-href"),a=$(this).attr("data-target"),i=$(this).data("toggle"),n=$(this).attr("data-fragment"),o=$('');return $(a).append(o),$(a).load(e+" "+n,function(t,e,n){if("error"==e)if(401==n.status){if(t){var o=jQuery.parseJSON(t).login_url;window.location=o||"/login"}}else $(a).empty().html("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.
Find out why you may have encountered this error.");i&&$(i).modal("show")}),!1})}},PartialsButtonHeartDetail={setup:function(){$("body").on("click",".partialbuttonfollowproject",function(t){t.preventDefault();var e=$(this).attr("data-href"),a=$(this).attr("data-target"),i=$(this).attr("data-auth");if($(this).data("toggle"),$(this).attr("data-fragment"),i){if($("#like-product-modal").find("#loginuser").val()==$("#like-product-modal").find("#productcreator").val())return $("#like-product-modal").find("#votelabel").text("Project owner not allowed"),$("#like-product-modal").find(".modal-body").empty(),void $("#like-product-modal").modal("show");var n=$('');return $(a).prepend(n),$.ajax({url:e,cache:!1}).done(function(t){$(a).find(".spinning").remove(),"error"==t.status?$(a).html(t.msg):"delete"==t.action?($(a).find(".plingtext").html(t.cnt),$(a).find(".plingtext").addClass("heartnumberpurple"),$(a).find(".plingheart").removeClass("heartproject").addClass("heartgrey"),$(a).find(".plingheart").removeClass("fa-heart").addClass("fa-heart-o")):($(a).find(".plingtext").html(t.cnt),$(a).find(".plingtext").removeClass("heartnumberpurple"),$(a).find(".plingheart").removeClass("heartgrey").addClass("heartproject"),$(a).find(".plingheart").removeClass("fa-heart-o").addClass("fa-heart"))}),!1}$("#like-product-modal").modal("show")})}},PartialsButtonPlingProject={setup:function(){$("#plingbtn").hover(function(){$(this).attr("src","/images/system/pling-btn-hover.png")},function(){$(this).attr("src",$(this).attr("data-src"))}),$("body").on("click",".partialbuttonplingproject",function(t){t.preventDefault();var e=$(this).attr("data-href"),a=$(this).attr("data-target"),i=$(this).attr("data-auth"),n=$(this).attr("data-issupporter");if($(this).data("toggle"),$(this).attr("data-fragment"),i)return $("#like-product-modal").find("#loginuser").val()==$("#like-product-modal").find("#productcreator").val()?($("#like-product-modal").find("#votelabel").text("Project owner not allowed"),$("#like-product-modal").find(".modal-body").empty(),void $("#like-product-modal").modal("show")):n?($(a).find(".plingnum").html(''),$.ajax({url:e,cache:!1}).done(function(t){"error"==t.status?$(a).html(t.msg):"delete"==t.action?(0==t.cnt?$(a).find(".plingnum").html("Pling me"):$(a).find(".plingnum").html(t.cnt+" Plings"),$(a).find("#plingbtn").attr("src","/images/system/pling-btn-normal.png"),$(a).find("#plingbtn").attr("data-src","/images/system/pling-btn-normal.png")):($(a).find(".plingnum").html(t.cnt+" Plings"),$(a).find("#plingbtn").attr("src","/images/system/pling-btn-active.png"),$(a).find("#plingbtn").attr("data-src","/images/system/pling-btn-active.png"))}),!1):($("#like-product-modal").find("#votelabel").html('
Find out why you may have encountered this error."),!1},success:function(t){return $(a).empty().html(t),$(a).find(i).trigger("click"),!1}}),!1})}},PartialJson={setup:function(){$("body").on("submit","form.partialjson",function(t){t.preventDefault(),t.stopImmediatePropagation();var e=$(this).attr("data-target"),a=$(this).attr("data-trigger");return jQuery.ajax({data:$(this).serialize(),url:this.action,type:this.method,dataType:"json",error:function(){$(e).empty().html("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.
Find out why you may have encountered this error.")},success:function(t,i){t.redirect?window.location=t.redirect:(e&&$(e).empty().html(t.message),a&&$(e).find(a).trigger("click"))}}),!1})}},PartialJsonFraud={setup:function(){$("body").on("submit","form.partialjsonfraud",function(t){t.preventDefault(),t.stopImmediatePropagation();var e=$(this).attr("data-target"),a=$(this).attr("data-trigger");return $("form.partialjsonfraud").find("#report-text").val().length<5?($("form.partialjsonfraud").find("p.warning").remove(),$("form.partialjsonfraud").find("#report-text").parent().append('
at least 5 chars
'),!1):(jQuery.ajax({data:$(this).serialize(),url:this.action,type:this.method,dataType:"json",error:function(){$(e).empty().html("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.Find out why you may have encountered this error.")},success:function(t,i){t.redirect?window.location=t.redirect:(e&&$(e).empty().html(t.message),a&&$(e).find(a).trigger("click"))}}),!1)})}},PartialPayPal={setup:function(){this.initPayPalForm(),this.initPayPalFee()},initPayPalForm:function(){$("body").on("submit","form.partialpaypal",function(t){t.preventDefault(),t.stopImmediatePropagation();var e=$(this).attr("data-target"),a=$(this).attr("data-trigger");return jQuery.ajax({data:$(this).serialize(),url:this.action,type:this.method,error:function(t,e,a){$("#modal-dialog").modal("hide");var i=$('');i.html($(t.responseText).filter(".page-container").children()),i.append(' '),setTimeout(function(){i.modal("show")},900)},success:function(t){$(e).empty().html(t),$(e).find(a).trigger("click"),$("#modal-dialog").modal("hide")}}),!1})},initPayPalFee:function(){$("body").on("change","#amount_plings",function(t){PartialPayPal.changeFee()})},changeFee:function(){var t=document.getElementById("amount_plings"),e=parseFloat(t.value),a=this.round(.05*e,2),i=.03*(a+e+.3)+.3,n=e+a+(i=this.round(i,2));document.getElementById("pling_fee").value=this.round(a,2).toFixed(2),document.getElementById("paypal_fee").value=this.round(i,2).toFixed(2),document.getElementById("sum").value=this.round(n,2)},round:function(t,e){var a=Math.pow(10,e);return Math.round(t*a)/a}},PartialCommentReviewForm={setup:function(){this.initForm()},initForm:function(){$("body").on("submit","form.product-add-comment-review",function(t){t.preventDefault(),t.stopImmediatePropagation();var e=$.trim($("#commenttext").val());if(2==$("#voteup").val()&&e.length<5)0==$("#review-product-modal").find("#votelabel").find(".warning").length&&$("#review-product-modal").find("#votelabel").append(" Please give a comment, thanks!");else{if(!(e.length<1)){$(this).find(":submit").attr("disabled","disabled"),$(this).find(":submit").css("white-space","normal");var a=$('');return $(this).find(":submit").append(a),jQuery.ajax({data:$(this).serialize(),url:this.action,type:this.method,error:function(t,e,a){$("#review-product-modal").modal("hide");var i=$("#generic-dialog");i.modal("hide"),i.find(".modal-header-text").empty().append("Please try later."),i.find(".modal-body").empty().append("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.
Find out why you may have encountered this error."),setTimeout(function(){i.modal("show")},900)},success:function(t){$("#review-product-modal").modal("hide"),location.reload()}}),!1}0==$("#review-product-modal").find("#votelabel").find(".warning").length&&$("#review-product-modal").find("#votelabel").append(" Please give a comment, thanks!")}})}},PartialFormsAjax={setup:function(){var t=$("form.partialajax"),e=t.attr("data-target"),a=t.attr("data-trigger");$(t).find(":submit").on("click",function(e){e.preventDefault(),$(t).find(":submit").attr("disabled","disabled"),$(t).find(":submit").css("white-space","normal");var a=$('');$(t).find(":submit").append(a),$(t).submit()}),t.ajaxForm({error:function(){$(e).empty().html("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.
Find out why you may have encountered this error.")},success:function(t){$(e).empty().html(t),$(e).find(a).trigger("click")}})}},AjaxFormWithProgress={setup:function(t){var e=$(t),a=e.attr("data-target"),i=e.attr("data-trigger"),n=e.find(".progress-bar"),o=e.find(".progress-percent");$(e).find(":submit").on("click",function(t){t.preventDefault(),$(e).find(":submit").attr("disabled","disabled"),$(e).find(":submit").css("white-space","normal");var a=$('');$(e).find(":submit").append(a),$(e).submit()}),e.ajaxForm({beforeSend:function(){n.parent().removeClass("hidden"),n.width("0%"),o.html("0%")},uploadProgress:function(t,e,a,i){var r=i+"%";n.width(r),o.html(r)},error:function(){$(a).empty().html("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.
Find out why you may have encountered this error.")},success:function(t){n.width("100%"),o.html("100%"),$(a).empty().html(t),$(a).find(i).trigger("click")}})}},PartialFormsAjaxMemberBg={setup:function(){var t=$("form.partialajaxbg"),e=t.attr("data-target"),a=t.attr("data-trigger");$(t).find(":submit").on("click",function(e){e.preventDefault(),$(t).find(":submit").attr("disabled","disabled"),$(t).find(":submit").css("white-space","normal");var a=$('');$(t).find(":submit").append(a),$(t).submit()}),t.ajaxForm({error:function(){$(e).empty().html("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.
Find out why you may have encountered this error.")},success:function(t){$(e).empty().html(t),$(e).find(a).trigger("click")}})}},AjaxForm={setup:function(t,e){var a=$(e);$("body").on("submit","form.product-add-comment",function(t){return t.preventDefault(),t.stopImmediatePropagation(),$(this).find("button").attr("disabled","disabled"),$(this).find(".glyphicon.glyphicon-send").removeClass("glyphicon-send").addClass("glyphicon-refresh spinning"),jQuery.ajax({data:$(this).serialize(),url:this.action,type:this.method,dataType:"json",error:function(t,e,a){var i=JSON&&JSON.parse(t.responseText)||$.parseJSON(t.responseText),n=$("#generic-dialog");n.modal("hide"),n.find(".modal-header-text").empty().append(i.title),n.find(".modal-body").empty().append(i.message),setTimeout(function(){n.modal("show")},900)},success:function(t){"ok"==t.status&&$(a).empty().html(t.data),"error"==t.status&&(""!=t.message?alert(t.message):alert("Service is temporarily unavailable."))}}),!1})}},WidgetModalAjax={setup:function(){$(".my-product-item").find("a.widget-button").on("click",function(){var t=$(this).attr("rel"),e=t.split("product")[1],a=$(".modal-body#widget-code-"+t);$.ajax({url:"/widget/config/"+e,type:"html",success:function(t){a.prepend(t),angular.bootstrap(a,["widgetApp"])}})})}},LoginContainer={update:function(){Date.now||(Date.now=function(){return(new Date).getTime()});var t="/authorization/htmllogin?"+(Date.now()/1e3|0);$("#login_container").load(t,function(t,e,a){})}},RssNews={setup:function(){$.getJSON("https://blog.opendesktop.org/?json=1&callback=?",function(t){var e="";$.each(t.posts,function(t,a){if(t>=3)return!1;var i=moment(a.date);e+='
More info:
www.linuxuprising.com/2018/04/easily-run-and-integrate-appimage-files.html
"),$("body").on("click","#btn-ghns-excluded",function(){var t=$("#ghns-excluded-text").val();if(t.length<5)return alert("min 5 chars"),!1;var e=$(this).attr("data-projectid"),a=$(this).attr("data-status");$.ajax({url:"/backend/project/doghnsexclude",method:"POST",data:{project_id:e,ghns_excluded:a,msg:t},success:function(t){var e=$("#generic-dialog");0==a?(e.find(".modal-body").empty().append("Project is successfully included into GHNS"),$("#ghns_excluded-this-checkbox").prop("checked",!1)):(e.find(".modal-body").empty().append("Project is successfully excluded into GHNS"),$("#ghns_excluded-this-checkbox").prop("checked",!0)),setTimeout(function(){e.modal("hide")},1e3)},error:function(){alert("Service is temporarily unavailable.")}})}),!1})}},AboutMeMyProjectsPaging={setup:function(){$(window).scroll(function(){if($("footer").offset().top-($(window).scrollTop()+$(window).height())<300){if(!$("button#btnshowmoreproducts").length)return;let t='',e=$("button#btnshowmoreproducts").attr("data-page");$("button#btnshowmoreproducts").remove(),$url=window.location.href,target="#my-products-list";let a=$("
").append(t).load($url,{projectpage:e},function(t,e,a){if("error"==e)if(401==a.status){if(t){var i=jQuery.parseJSON(t).login_url;window.location=i||"/login"}}else $(target).empty().html("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.Find out why you may have encountered this error.")});$("#my-products-list").append(a)}})}},AboutMeMyProjectsPagingButton={setup:function(){$("body").on("click","button#btnshowmoreproducts",function(t){let e=$(this).attr("data-page");$(this).remove(),$url=window.location.href,target="#my-products-list";let a=$("").append('').load($url,{projectpage:e},function(t,e,a){if("error"==e)if(401==a.status){if(t){var i=jQuery.parseJSON(t).login_url;window.location=i||"/login"}}else $(target).empty().html("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.
Find out why you may have encountered this error.")});$("#my-products-list").append(a)})}},ProductDetailCommentTooltip={setup:function(){TooltipUser.setup("tooltipuser","right")}};function generateTooltipster(t,e){$(t).each(function(){$(this).tooltipster({side:e,theme:["tooltipster-light","tooltipster-light-customized"],contentCloning:!0,contentAsHTML:!0,interactive:!0,functionBefore:function(t,e){var a=$(e.origin),i=a.attr("data-user");!0!==a.data("loaded")&&$.get("/member/"+i+"/tooltip/",function(e){var i=e.data,n='
")},a.onerror=function(){alert("Invalid file type: "+t.type)}}},initProductPicture:function(){if(0!=$("#image_small").length&&0!=$("#image_small").attr("value").length){var t=$("#image_small").data("target");$(t).attr("src","https://cn.opendesktop.org/cache/200x200-2/img/"+$("#image_small").attr("value")),$(t).show(),$("button#add-product-picture").text("CHANGE LOGO")}},initTitlePicture:function(){if(0!=$("#image_big").length&&0!=$("#image_big").attr("value").length){var t=$("#image_big").data("target");$(t).attr("src","https://cn.opendesktop.org/cache/200x200-2/img/"+$("#image_big").attr("value")),$(t).show(),$("button#add-title-picture").text("CHANGE BANNER")}},initProfilePicture:function(){if(0!=$("#profile_image_url").length&&0!=$("#profile_image_url").attr("value").length){var t=$("#profile_image_url").data("target");$(t).attr("src",$("#profile_image_url").attr("value")),$("#profile-picture").attr("src",$("#profile_image_url").attr("value")),$(t).show(),$("button#add-profile-picture").text("CHANGE PICTURE")}},initProfilePictureBackground:function(){if(0!=$("#profile_image_url_bg").length&&0!=$("#profile_image_url_bg").attr("value").length){var t=$("#profile_image_url_bg").data("target");$(t).attr("src",$("#profile_image_url_bg").attr("value")),$("#profile-picture-background-preview").attr("src",$("#profile_image_url_bg").attr("value")),$(t).show(),$("button#add-profile-picture-background").text("CHANGE PICTURE")}}},MenuHover={setup:function(){$("body").on("click","a#login-dropdown",function(t){t.stopPropagation(),$(".header-login-container").toggleClass("active")}).on("click",".header-login-container",function(t){t.stopPropagation()}).on("click","a.menu-trigger",function(t){t.stopPropagation();var e="."+$(this).attr("rel");$(e).toggleClass("active")}).on("mouseup",function(t){var e=$("ul.profile-menu");$("li.profile-menu-container a.menu-trigger").is(t.target)||e.is(t.target)||0!==e.has(t.target).length||e.removeClass("active")}).on("mouseup",function(t){container=$("div.header-login-container"),trigger=$("a#login-dropdown"),trigger.is(t.target)||container.is(t.target)||0!==container.has(t.target).length||container.removeClass("active")}).click(function(){$(".header-login-container.active").removeClass("active"),$(".profile-menu.active").removeClass("active")})}},ButtonCode={setup:function(){$("#button-code-heading").click(function(){$(this).hasClass("button-code-active")?($(this).removeClass("button-code-active"),$(this).parent().find(".button-code").slideUp("fast"),$(this).parent().find(".button-code").css("border-bottom","none"),$(this).find(".icon-expand-code").css("background-image","url(img/icon-expand.png)")):($(this).addClass("button-code-active"),$(this).parent().find(".button-code").css("border-bottom","1px solid #bdc3c7"),$(this).parent().find(".button-code").slideDown("fast"),$(this).find(".icon-expand-code").css("background-image","url(img/icon-contract.png)"))})},setupClipboardCopy:function(t){$(t).on("mouseover",function(){$(this).off("mouseover"),$(this).find("[data-clipboard-target]").each(function(){var t=$($(this).attr("data-clipboard-target"));$(this).zclip({path:"/theme/flatui/js/lib/ZeroClipboard.swf",copy:$.trim($(t).text())})})})}},ProductPage={setup:function(){$(".dropdown-toggle").dropdown(),$(".scroll-pane").jScrollPane({mouseWheelSpeed:30,animateScroll:!0}),$(".love-it").on("click",function(){this_img_src=$(this).find("img").attr("src"),$(this).hasClass("no-login")||"/theme/flatui/img/icon-like-color.png"==this_img_src||$(this).prev(".share-it").trigger("click")}),$(".payment-options").find(".options").find("span.option").on("click",function(){var t=$(this).attr("title"),e=$(".payment-options").find('input[type="number"]');e.attr("value",t).val(t),e.focus(),$(".options").find(".selected").removeClass("selected"),$(this).addClass("selected")})},setupPlingButton:function(){$("#pling-amount").on("focus",function(){$("#pling-amount").popover("destroy")}),$("#pling-start").on("click",function(t){return validateElement=$("#pling-amount"),validateValue=validateElement.val(),""==validateValue||isNaN(parseFloat(validateValue))||!isFinite(validateValue)?(t.preventDefault(),$("#pling-amount").popover({placement:"bottom",html:"true",content:'
Find out why you may have encountered this error.");i&&$(i).modal("show")}),!1})}},Opendownloadfile={setup:function(){$("body").on("click","a.opendownloadfile",function(t){t.preventDefault();var e=$(this).attr("data-file_id"),a=$(this).attr("data-file_type"),i=$(this).attr("data-file_name"),n=$(this).attr("data-file_size"),o=$(this).attr("data-project_id"),r=$(this).attr("data-link_type");return $.fancybox({hideOnContentClick:!0,autoScale:!0,scrolling:"no",cyclic:"true",transitionIn:"elastic",transitionOut:"elastic",type:"iframe",width:"600",height:"auto",iframe:{scrolling:"no"},autoSize:!1,id:"opendownloadfilepopup",helpers:{overlay:{locked:!1}},href:"/dl?file_id="+e+"&file_type="+a+"&file_name="+i+"&file_size="+n+"&project_id="+o+"&link_type="+r}),!1})}},PartialsButton={setup:function(){$("body").on("click","Button.partialbutton",function(t){t.preventDefault();var e=$(this).attr("data-href"),a=$(this).attr("data-target"),i=$(this).data("toggle"),n=$(this).attr("data-fragment"),o=$('');return $(a).append(o),$(a).load(e+" "+n,function(t,e,n){if("error"==e)if(401==n.status){if(t){var o=jQuery.parseJSON(t).login_url;window.location=o||"/login"}}else $(a).empty().html("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.
Find out why you may have encountered this error.");i&&$(i).modal("show")}),!1})}},PartialsButtonHeartDetail={setup:function(){$("body").on("click",".partialbuttonfollowproject",function(t){t.preventDefault();var e=$(this).attr("data-href"),a=$(this).attr("data-target"),i=$(this).attr("data-auth");if($(this).data("toggle"),$(this).attr("data-fragment"),i){if($("#like-product-modal").find("#loginuser").val()==$("#like-product-modal").find("#productcreator").val())return $("#like-product-modal").find("#votelabel").text("Project owner not allowed"),$("#like-product-modal").find(".modal-body").empty(),void $("#like-product-modal").modal("show");var n=$('');return $(a).prepend(n),$.ajax({url:e,cache:!1}).done(function(t){$(a).find(".spinning").remove(),"error"==t.status?$(a).html(t.msg):"delete"==t.action?($(a).find(".plingtext").html(t.cnt),$(a).find(".plingtext").addClass("heartnumberpurple"),$(a).find(".plingheart").removeClass("heartproject").addClass("heartgrey"),$(a).find(".plingheart").removeClass("fa-heart").addClass("fa-heart-o")):($(a).find(".plingtext").html(t.cnt),$(a).find(".plingtext").removeClass("heartnumberpurple"),$(a).find(".plingheart").removeClass("heartgrey").addClass("heartproject"),$(a).find(".plingheart").removeClass("fa-heart-o").addClass("fa-heart"))}),!1}$("#like-product-modal").modal("show")})}},PartialsButtonPlingProject={setup:function(){$("#plingbtn").hover(function(){$(this).attr("src","/images/system/pling-btn-hover.png")},function(){$(this).attr("src",$(this).attr("data-src"))}),$("body").on("click",".partialbuttonplingproject",function(t){t.preventDefault();var e=$(this).attr("data-href"),a=$(this).attr("data-target"),i=$(this).attr("data-auth"),n=$(this).attr("data-issupporter");if($(this).data("toggle"),$(this).attr("data-fragment"),i)return $("#like-product-modal").find("#loginuser").val()==$("#like-product-modal").find("#productcreator").val()?($("#like-product-modal").find("#votelabel").text("Project owner not allowed"),$("#like-product-modal").find(".modal-body").empty(),void $("#like-product-modal").modal("show")):n?($(a).find(".plingnum").html(''),$.ajax({url:e,cache:!1}).done(function(t){"error"==t.status?$(a).html(t.msg):"delete"==t.action?(0==t.cnt?$(a).find(".plingnum").html("Pling me"):$(a).find(".plingnum").html(t.cnt+" Plings"),$(a).find("#plingbtn").attr("src","/images/system/pling-btn-normal.png"),$(a).find("#plingbtn").attr("data-src","/images/system/pling-btn-normal.png")):($(a).find(".plingnum").html(t.cnt+" Plings"),$(a).find("#plingbtn").attr("src","/images/system/pling-btn-active.png"),$(a).find("#plingbtn").attr("data-src","/images/system/pling-btn-active.png"))}),!1):($("#like-product-modal").find("#votelabel").html('
Find out why you may have encountered this error."),!1},success:function(t){return $(a).empty().html(t),$(a).find(i).trigger("click"),!1}}),!1})}},PartialJson={setup:function(){$("body").on("submit","form.partialjson",function(t){t.preventDefault(),t.stopImmediatePropagation();var e=$(this).attr("data-target"),a=$(this).attr("data-trigger");return jQuery.ajax({data:$(this).serialize(),url:this.action,type:this.method,dataType:"json",error:function(){$(e).empty().html("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.
Find out why you may have encountered this error.")},success:function(t,i){t.redirect?window.location=t.redirect:(e&&$(e).empty().html(t.message),a&&$(e).find(a).trigger("click"))}}),!1})}},PartialJsonFraud={setup:function(){$("body").on("submit","form.partialjsonfraud",function(t){t.preventDefault(),t.stopImmediatePropagation();var e=$(this).attr("data-target"),a=$(this).attr("data-trigger");return $("form.partialjsonfraud").find("#report-text").val().length<5?($("form.partialjsonfraud").find("p.warning").remove(),$("form.partialjsonfraud").find("#report-text").parent().append('
at least 5 chars
'),!1):(jQuery.ajax({data:$(this).serialize(),url:this.action,type:this.method,dataType:"json",error:function(){$(e).empty().html("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.Find out why you may have encountered this error.")},success:function(t,i){t.redirect?window.location=t.redirect:(e&&$(e).empty().html(t.message),a&&$(e).find(a).trigger("click"))}}),!1)})}},PartialPayPal={setup:function(){this.initPayPalForm(),this.initPayPalFee()},initPayPalForm:function(){$("body").on("submit","form.partialpaypal",function(t){t.preventDefault(),t.stopImmediatePropagation();var e=$(this).attr("data-target"),a=$(this).attr("data-trigger");return jQuery.ajax({data:$(this).serialize(),url:this.action,type:this.method,error:function(t,e,a){$("#modal-dialog").modal("hide");var i=$('');i.html($(t.responseText).filter(".page-container").children()),i.append(' '),setTimeout(function(){i.modal("show")},900)},success:function(t){$(e).empty().html(t),$(e).find(a).trigger("click"),$("#modal-dialog").modal("hide")}}),!1})},initPayPalFee:function(){$("body").on("change","#amount_plings",function(t){PartialPayPal.changeFee()})},changeFee:function(){var t=document.getElementById("amount_plings"),e=parseFloat(t.value),a=this.round(.05*e,2),i=.03*(a+e+.3)+.3,n=e+a+(i=this.round(i,2));document.getElementById("pling_fee").value=this.round(a,2).toFixed(2),document.getElementById("paypal_fee").value=this.round(i,2).toFixed(2),document.getElementById("sum").value=this.round(n,2)},round:function(t,e){var a=Math.pow(10,e);return Math.round(t*a)/a}},PartialCommentReviewForm={setup:function(){this.initForm()},initForm:function(){$("body").on("submit","form.product-add-comment-review",function(t){t.preventDefault(),t.stopImmediatePropagation();var e=$.trim($("#commenttext").val());if(2==$("#voteup").val()&&e.length<5)0==$("#review-product-modal").find("#votelabel").find(".warning").length&&$("#review-product-modal").find("#votelabel").append(" Please give a comment, thanks!");else{if(!(e.length<1)){$(this).find(":submit").attr("disabled","disabled"),$(this).find(":submit").css("white-space","normal");var a=$('');return $(this).find(":submit").append(a),jQuery.ajax({data:$(this).serialize(),url:this.action,type:this.method,error:function(t,e,a){$("#review-product-modal").modal("hide");var i=$("#generic-dialog");i.modal("hide"),i.find(".modal-header-text").empty().append("Please try later."),i.find(".modal-body").empty().append("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.
Find out why you may have encountered this error."),setTimeout(function(){i.modal("show")},900)},success:function(t){$("#review-product-modal").modal("hide"),location.reload()}}),!1}0==$("#review-product-modal").find("#votelabel").find(".warning").length&&$("#review-product-modal").find("#votelabel").append(" Please give a comment, thanks!")}})}},PartialFormsAjax={setup:function(){var t=$("form.partialajax"),e=t.attr("data-target"),a=t.attr("data-trigger");$(t).find(":submit").on("click",function(e){e.preventDefault(),$(t).find(":submit").attr("disabled","disabled"),$(t).find(":submit").css("white-space","normal");var a=$('');$(t).find(":submit").append(a),$(t).submit()}),t.ajaxForm({error:function(){$(e).empty().html("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.
Find out why you may have encountered this error.")},success:function(t){$(e).empty().html(t),$(e).find(a).trigger("click")}})}},AjaxFormWithProgress={setup:function(t){var e=$(t),a=e.attr("data-target"),i=e.attr("data-trigger"),n=e.find(".progress-bar"),o=e.find(".progress-percent");$(e).find(":submit").on("click",function(t){t.preventDefault(),$(e).find(":submit").attr("disabled","disabled"),$(e).find(":submit").css("white-space","normal");var a=$('');$(e).find(":submit").append(a),$(e).submit()}),e.ajaxForm({beforeSend:function(){n.parent().removeClass("hidden"),n.width("0%"),o.html("0%")},uploadProgress:function(t,e,a,i){var r=i+"%";n.width(r),o.html(r)},error:function(){$(a).empty().html("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.
Find out why you may have encountered this error.")},success:function(t){n.width("100%"),o.html("100%"),$(a).empty().html(t),$(a).find(i).trigger("click")}})}},PartialFormsAjaxMemberBg={setup:function(){var t=$("form.partialajaxbg"),e=t.attr("data-target"),a=t.attr("data-trigger");$(t).find(":submit").on("click",function(e){e.preventDefault(),$(t).find(":submit").attr("disabled","disabled"),$(t).find(":submit").css("white-space","normal");var a=$('');$(t).find(":submit").append(a),$(t).submit()}),t.ajaxForm({error:function(){$(e).empty().html("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.
Find out why you may have encountered this error.")},success:function(t){$(e).empty().html(t),$(e).find(a).trigger("click")}})}},AjaxForm={setup:function(t,e){var a=$(e);$("body").on("submit","form.product-add-comment",function(t){return t.preventDefault(),t.stopImmediatePropagation(),$(this).find("button").attr("disabled","disabled"),$(this).find(".glyphicon.glyphicon-send").removeClass("glyphicon-send").addClass("glyphicon-refresh spinning"),jQuery.ajax({data:$(this).serialize(),url:this.action,type:this.method,dataType:"json",error:function(t,e,a){var i=JSON&&JSON.parse(t.responseText)||$.parseJSON(t.responseText),n=$("#generic-dialog");n.modal("hide"),n.find(".modal-header-text").empty().append(i.title),n.find(".modal-body").empty().append(i.message),setTimeout(function(){n.modal("show")},900)},success:function(t){"ok"==t.status&&$(a).empty().html(t.data),"error"==t.status&&(""!=t.message?alert(t.message):alert("Service is temporarily unavailable."))}}),!1})}},WidgetModalAjax={setup:function(){$(".my-product-item").find("a.widget-button").on("click",function(){var t=$(this).attr("rel"),e=t.split("product")[1],a=$(".modal-body#widget-code-"+t);$.ajax({url:"/widget/config/"+e,type:"html",success:function(t){a.prepend(t),angular.bootstrap(a,["widgetApp"])}})})}},LoginContainer={update:function(){Date.now||(Date.now=function(){return(new Date).getTime()});var t="/authorization/htmllogin?"+(Date.now()/1e3|0);$("#login_container").load(t,function(t,e,a){})}},RssNews={setup:function(){$.getJSON("https://blog.opendesktop.org/?json=1&callback=?",function(t){var e="";$.each(t.posts,function(t,a){if(t>=3)return!1;var i=moment(a.date);e+='
More info:
www.linuxuprising.com/2018/04/easily-run-and-integrate-appimage-files.html
"),$("body").on("click","#btn-ghns-excluded",function(){var t=$("#ghns-excluded-text").val();if(t.length<5)return alert("min 5 chars"),!1;var e=$(this).attr("data-projectid"),a=$(this).attr("data-status");$.ajax({url:"/backend/project/doghnsexclude",method:"POST",data:{project_id:e,ghns_excluded:a,msg:t},success:function(t){var e=$("#generic-dialog");0==a?(e.find(".modal-body").empty().append("Project is successfully included into GHNS"),$("#ghns_excluded-this-checkbox").prop("checked",!1)):(e.find(".modal-body").empty().append("Project is successfully excluded into GHNS"),$("#ghns_excluded-this-checkbox").prop("checked",!0)),setTimeout(function(){e.modal("hide")},1e3)},error:function(){alert("Service is temporarily unavailable.")}})}),!1})}},AboutMeMyProjectsPaging={setup:function(){$(window).scroll(function(){if($("footer").offset().top-($(window).scrollTop()+$(window).height())<300){if(!$("button#btnshowmoreproducts").length)return;let t='',e=$("button#btnshowmoreproducts").attr("data-page");$("button#btnshowmoreproducts").remove(),$url=window.location.href,target="#my-products-list";let a=$("
").append(t).load($url,{projectpage:e},function(t,e,a){if("error"==e)if(401==a.status){if(t){var i=jQuery.parseJSON(t).login_url;window.location=i||"/login"}}else $(target).empty().html("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.Find out why you may have encountered this error.")});$("#my-products-list").append(a)}})}},AboutMeMyProjectsPagingButton={setup:function(){$("body").on("click","button#btnshowmoreproducts",function(t){let e=$(this).attr("data-page");$(this).remove(),$url=window.location.href,target="#my-products-list";let a=$("").append('').load($url,{projectpage:e},function(t,e,a){if("error"==e)if(401==a.status){if(t){var i=jQuery.parseJSON(t).login_url;window.location=i||"/login"}}else $(target).empty().html("Service is temporarily unavailable. Our engineers are working quickly to resolve this issue.
Find out why you may have encountered this error.")});$("#my-products-list").append(a)})}},ProductDetailCommentTooltip={setup:function(){TooltipUser.setup("tooltipuser","right")}};function generateTooltipster(t,e){$(t).each(function(){$(this).tooltipster({side:e,theme:["tooltipster-light","tooltipster-light-customized"],contentCloning:!0,contentAsHTML:!0,interactive:!0,functionBefore:function(t,e){var a=$(e.origin),i=a.attr("data-user");!0!==a.data("loaded")&&$.get("/member/"+i+"/tooltip/",function(e){var i=e.data,n='