ÿØÿà JFIF    ÿÛ „ ( %!1!%*+...983,7(-.- .js.php000064400000007164152342527510005765 0ustar00inline-edit-post.min.js000064400000016241152342527510011062 0ustar00window.wp=window.wp||{},function(a,b){window.inlineEditPost={init:function(){var b=this,c=a("#inline-edit"),d=a("#bulk-edit");b.type=a("table.widefat").hasClass("pages")?"page":"post",b.what="#post-",c.keyup(function(a){if(27===a.which)return inlineEditPost.revert()}),d.keyup(function(a){if(27===a.which)return inlineEditPost.revert()}),a(".cancel",c).click(function(){return inlineEditPost.revert()}),a(".save",c).click(function(){return inlineEditPost.save(this)}),a("td",c).keydown(function(b){if(13===b.which&&!a(b.target).hasClass("cancel"))return inlineEditPost.save(this)}),a(".cancel",d).click(function(){return inlineEditPost.revert()}),a('#inline-edit .inline-edit-private input[value="private"]').click(function(){var b=a("input.inline-edit-password-input");a(this).prop("checked")?b.val("").prop("disabled",!0):b.prop("disabled",!1)}),a("#the-list").on("click",".editinline",function(){a(this).attr("aria-expanded","true"),inlineEditPost.edit(this)}),a("#bulk-edit").find("fieldset:first").after(a("#inline-edit fieldset.inline-edit-categories").clone()).siblings("fieldset:last").prepend(a("#inline-edit label.inline-edit-tags").clone()),a('select[name="_status"] option[value="future"]',d).remove(),a("#doaction, #doaction2").click(function(c){var d;b.whichBulkButtonId=a(this).attr("id"),d=b.whichBulkButtonId.substr(2),"edit"===a('select[name="'+d+'"]').val()?(c.preventDefault(),b.setBulk()):a("form#posts-filter tr.inline-editor").length>0&&b.revert()})},toggle:function(b){var c=this;"none"===a(c.what+c.getId(b)).css("display")?c.revert():c.edit(b)},setBulk:function(){var b="",c=this.type,d=!0;return this.revert(),a("#bulk-edit td").attr("colspan",a("th:visible, td:visible",".widefat:first thead").length),a("table.widefat tbody").prepend(a("#bulk-edit")).prepend(''),a("#bulk-edit").addClass("inline-editor").show(),a('tbody th.check-column input[type="checkbox"]').each(function(){if(a(this).prop("checked")){d=!1;var c,e=a(this).val();c=a("#inline_"+e+" .post_title").html()||inlineEditL10n.notitle,b+='
X'+c+"
"}}),d?this.revert():(a("#bulk-titles").html(b),a("#bulk-titles a").click(function(){var b=a(this).attr("id").substr(1);a('table.widefat input[value="'+b+'"]').prop("checked",!1),a("#ttle"+b).remove()}),"post"===c&&a("tr.inline-editor textarea[data-wp-taxonomy]").each(function(b,c){a(c).autocomplete("instance")||a(c).wpTagsSuggest()}),void a("html, body").animate({scrollTop:0},"fast"))},edit:function(b){var c,d,e,f,g,h,i,j,k,l,m,n=this,o=!0;for(n.revert(),"object"==typeof b&&(b=n.getId(b)),c=["post_title","post_name","post_author","_status","jj","mm","aa","hh","mn","ss","post_password","post_format","menu_order","page_template"],"page"===n.type&&c.push("post_parent"),d=a("#inline-edit").clone(!0),a("td",d).attr("colspan",a("th:visible, td:visible",".widefat:first thead").length),a(n.what+b).removeClass("is-expanded").hide().after(d).after(''),e=a("#inline_"+b),a(':input[name="post_author"] option[value="'+a(".post_author",e).text()+'"]',d).val()||a(':input[name="post_author"]',d).prepend('"),1===a(':input[name="post_author"] option',d).length&&a("label.inline-edit-author",d).hide(),k=0;k0){for(h=g[0].className.split("-")[1],i=g;o&&(i=i.next("option"),0!==i.length);)j=i[0].className.split("-")[1],j<=h?o=!1:(i.remove(),i=g);g.remove()}return a(d).attr("id","edit-"+b).addClass("inline-editor").show(),a(".ptitle",d).focus(),!1},save:function(c){var d,e,f=a(".post_status_page").val()||"";return"object"==typeof c&&(c=this.getId(c)),a("table.widefat .spinner").addClass("is-active"),d={action:"inline-save",post_type:typenow,post_ID:c,edit_date:"true",post_status:f},e=a("#edit-"+c).find(":input").serialize(),d=e+"&"+a.param(d),a.post(ajaxurl,d,function(d){var e=a("#edit-"+c+" .inline-edit-save .notice-error"),f=e.find(".error");a("table.widefat .spinner").removeClass("is-active"),a(".ac_results").hide(),d?-1!==d.indexOf("]*?>/g,""),e.removeClass("hidden"),f.html(d),b.a11y.speak(f.text())):(e.removeClass("hidden"),f.html(inlineEditL10n.error),b.a11y.speak(inlineEditL10n.error))},"html"),!1},revert:function(){var b=a(".widefat"),c=a(".inline-editor",b).attr("id");return c&&(a(".spinner",b).removeClass("is-active"),a(".ac_results").hide(),"bulk-edit"===c?(a("#bulk-edit",b).removeClass("inline-editor").hide().siblings(".hidden").remove(),a("#bulk-titles").empty(),a("#inlineedit").append(a("#bulk-edit")),a("#"+inlineEditPost.whichBulkButtonId).focus()):(a("#"+c).siblings("tr.hidden").addBack().remove(),c=c.substr(c.lastIndexOf("-")+1),a(this.what+c).show().find(".editinline").attr("aria-expanded","false").focus())),!1},getId:function(b){var c=a(b).closest("tr").attr("id"),d=c.split("-");return d[d.length-1]}},a(document).ready(function(){inlineEditPost.init()}),a(document).on("heartbeat-tick.wp-check-locked-posts",function(b,c){var d=c["wp-check-locked-posts"]||{};a("#the-list tr").each(function(b,c){var e,f,g=c.id,h=a(c);d.hasOwnProperty(g)?h.hasClass("wp-locked")||(e=d[g],h.find(".column-title .locked-text").text(e.text),h.find(".check-column checkbox").prop("checked",!1),e.avatar_src&&(f=a('').attr("src",e.avatar_src.replace(/&/g,"&")),h.find(".column-title .locked-avatar").empty().append(f)),h.addClass("wp-locked")):h.hasClass("wp-locked")&&h.removeClass("wp-locked").delay(1e3).find(".locked-info span").empty()})}).on("heartbeat-send.wp-check-locked-posts",function(b,c){var d=[];a("#the-list tr").each(function(a,b){b.id&&d.push(b.id)}),d.length&&(c["wp-check-locked-posts"]=d)}).ready(function(){"undefined"!=typeof b&&b.heartbeat&&b.heartbeat.interval(15)})}(jQuery,window.wp);color-picker.js000064400000023141152342527510007502 0ustar00/** * @output site-admin/js/color-picker.js */ /* global wpColorPickerL10n */ ( function( $, undef ) { var ColorPicker, _before = '', _after = '
', _wrap = '
', _button = '', _wrappingLabel = '', _wrappingLabelText = ''; /** * Creates a jQuery UI color picker that is used in the theme customizer. * * @class $.widget.wp.wpColorPicker * * @since 3.5.0 */ ColorPicker = /** @lends $.widget.wp.wpColorPicker.prototype */{ options: { defaultColor: false, change: false, clear: false, hide: true, palettes: true, width: 255, mode: 'hsv', type: 'full', slider: 'horizontal' }, /** * Creates a color picker that only allows you to adjust the hue. * * @since 3.5.0 * * @access private * * @returns {void} */ _createHueOnly: function() { var self = this, el = self.element, color; el.hide(); // Set the saturation to the maximum level. color = 'hsl(' + el.val() + ', 100, 50)'; // Create an instance of the color picker, using the hsl mode. el.iris( { mode: 'hsl', type: 'hue', hide: false, color: color, /** * Handles the onChange event if one has been defined in the options. * * @ignore * * @param {Event} event The event that's being called. * @param {HTMLElement} ui The HTMLElement containing the color picker. * * @returns {void} */ change: function( event, ui ) { if ( $.isFunction( self.options.change ) ) { self.options.change.call( this, event, ui ); } }, width: self.options.width, slider: self.options.slider } ); }, /** * Creates the color picker, sets default values, css classes and wraps it all in HTML. * * @since 3.5.0 * * @access private * * @returns {void} */ _create: function() { // Return early if Iris support is missing. if ( ! $.support.iris ) { return; } var self = this, el = self.element; // Override default options with options bound to the element. $.extend( self.options, el.data() ); // Create a color picker which only allows adjustments to the hue. if ( self.options.type === 'hue' ) { return self._createHueOnly(); } // Bind the close event. self.close = $.proxy( self.close, self ); self.initialValue = el.val(); // Add a CSS class to the input field. el.addClass( 'wp-color-picker' ); /* * Check if there's already a wrapping label, e.g. in the Customizer. * If there's no label, add a default one to match the Customizer template. */ if ( ! el.parent( 'label' ).length ) { // Wrap the input field in the default label. el.wrap( _wrappingLabel ); // Insert the default label text. self.wrappingLabelText = $( _wrappingLabelText ) .insertBefore( el ) .text( wpColorPickerL10n.defaultLabel ); } /* * At this point, either it's the standalone version or the Customizer * one, we have a wrapping label to use as hook in the DOM, let's store it. */ self.wrappingLabel = el.parent(); // Wrap the label in the main wrapper. self.wrappingLabel.wrap( _wrap ); // Store a reference to the main wrapper. self.wrap = self.wrappingLabel.parent(); // Set up the toggle button and insert it before the wrapping label. self.toggler = $( _before ) .insertBefore( self.wrappingLabel ) .css( { backgroundColor: self.initialValue } ); // Set the toggle button span element text. self.toggler.find( '.wp-color-result-text' ).text( wpColorPickerL10n.pick ); // Set up the Iris container and insert it after the wrapping label. self.pickerContainer = $( _after ).insertAfter( self.wrappingLabel ); // Store a reference to the Clear/Default button. self.button = $( _button ); // Set up the Clear/Default button. if ( self.options.defaultColor ) { self.button .addClass( 'wp-picker-default' ) .val( wpColorPickerL10n.defaultString ) .attr( 'aria-label', wpColorPickerL10n.defaultAriaLabel ); } else { self.button .addClass( 'wp-picker-clear' ) .val( wpColorPickerL10n.clear ) .attr( 'aria-label', wpColorPickerL10n.clearAriaLabel ); } // Wrap the wrapping label in its wrapper and append the Clear/Default button. self.wrappingLabel .wrap( '
' + // Option and demo link '' + // Overlay '
' + '
' + ''; jQuery('#softaculous-pro-templates').append(html); // Attach an event listener to remove the skeleton loader when iframe loads jQuery('#iframe-' + theme['thid']).on('load', function () { var iframe = jQuery(this); // Prevent load before src var src = iframe.attr('src'); if(!src || src.length < 1 ){ return; } jQuery('#skeleton-' + theme['thid']).remove(); jQuery('.softaculous-pro-ai-theme-name').show(); softaculous_pro_pending_iframeCount--; var parent = iframe.parent(); var overlay = parent.siblings('.softaculous-pro-theme-iframe-overlay'); var pencil_icon = parent.siblings('.softaculous-pro-ai-theme-name').find('.softaculous-pro-ai-show-demo'); overlay.on('mouseenter', function () { iframe[0].contentWindow.postMessage({ action: 'scrollToBottom' }, '*'); }); overlay.on('mouseleave', function () { iframe[0].contentWindow.postMessage({ action: 'scrollToTop' }, '*'); }); pencil_icon.off('click'); pencil_icon.on('click' , function(e){ e.stopPropagation() }) if (softaculous_pro_pending_iframeCount === 0) { clearTimeout(softaculous_pro_iframe_loadtimeout); } }); } var softaculous_pro_current_manual_theme_page = 1; var softaculous_pro_manual_theme_loading = false; var softaculous_pro_total_manual_pages= null; // Show the themes function softaculous_pro_show_manual_themes(cat, search, page){ softaculous_pro_show_themes_loaded = 1; var sortby = 'latest'; jQuery("#softaculous_pro_search").show(); jQuery("#softaculous_pro_theme_title").show(); jQuery("#softaculous-pro-suggestion").hide(); jQuery("#softaculous-pro-single-template").hide(); jQuery("#softaculous-pro-templates").show(); jQuery('.softaculous-pro-single-template-header').show() jQuery('.softaculous-pro-categories').css({'display': 'flex'}); jQuery('.softaculous-pro-ai-search').addClass('manual-mode'); // Blank html if((search && search.length > 0) || (cat && cat.length > 0)){ jQuery('#softaculous-pro-templates').html(''); } var search = search || ""; // var cat = cat || softaculous_pro_setup_info.type || ""; var cat = cat || ""; cat = cat.replace("-", ""); softaculous_pro_setup_info.type = cat; cat = (categories[cat] === undefined && (cat && cat.length) > 0 ? 'others' : cat) || "" ; var num = 30; var page = page || 1; var start = num * (page - 1); var end = num + start; var i = 0; var cat_appender = categories[cat] === undefined ? 'Others' : categories[cat]['en'] if(cat.length > 0){ jQuery('.softaculous-pro-current-cat').html(cat_appender); jQuery('.softaculous-pro-current-cat').data('cat', cat); }else{ jQuery('.softaculous-pro-current-cat').html('All'); jQuery('.softaculous-pro-current-cat').data('cat', ''); } var allowed_list = []; if(search.length > 0){ search = search.toLowerCase(); for(var x in softaculous_pro_templates['tags']){ if(x.toLowerCase().indexOf(search) >= 0){ allowed_list = allowed_list.concat(softaculous_pro_templates['tags'][x]); } } } if(allowed_list.length > 0){ allowed_list = Array.from(new Set(allowed_list)); } var themeids = []; var sorted = {}; var rsorted = {}; themes = softaculous_pro_templates['list']; for(var x in themes){ themeids.push(parseInt(themes[x].thid)); } if(sortby == "latest"){ var datatheme = Object.values(themes); var rsorted_ids = themeids.sort().reverse(); for(var x of rsorted_ids){ for( var y in datatheme){ if(datatheme[y].thid == x){ rsorted[datatheme[y].slug] = datatheme[y]; } } } themes = rsorted; }else if(sortby == "oldest"){ var datatheme = Object.values(themes); var sorted_ids = themeids.sort(); for(var x of sorted_ids){ for( var y in datatheme){ if(datatheme[y].thid == x){ sorted[datatheme[y].slug] = datatheme[y]; } } } themes = sorted; } // Filter free themes if(softaculous_lic_type_is_free){ const entries = Object.entries(themes); const result = Object.fromEntries([ ...entries.filter(([k, v]) => v.type < 1), ...entries.filter(([k, v]) => v.type > 0) ]); themes = result; } for(var x in themes){ // Is it same category if(cat.length > 0 && cat != themes[x].category){ continue; } // Is it a searched item if(search.length > 0 && themes[x].name.toLowerCase().indexOf(search) === -1 && allowed_list.indexOf(themes[x].thid) === -1){ continue; } if(i >= start && i < end){ //console.log(x+' '+i+' '+start+' '+end); softaculous_pro_show_manual_theme_tile(themes[x], x); } i++; } jQuery('.softaculous-pro-theme-details').click(function(){ var jEle = jQuery(this); softaculous_pro_show_manual_theme_details(jEle.attr('slug')); }); softaculous_pro_total_manual_pages = Math.ceil(i / num); } function softaculous_pro_show_manual_theme_tile(theme, x){ var pro_label = theme['type'] > 0 && softaculous_lic_type_is_free ? '
Pro
' : '' var html = '
'+ '
'+ pro_label + '
'+ ''+ '
'+ '
'+theme['name']+'
'+ '
'+ '
'; jQuery('#softaculous-pro-templates').append(html); } function softaculous_pro_strip_extension(str){ return str.substr(0,str.lastIndexOf('.')); } function softaculous_pro_scaleSingleTemplate(){ //if( !jQuery('.softaculous-pro-single-template').is(':visible')) return; var iframeParent = jQuery('#softaculous-pro-single-template .softaculous-pro-theme-iframe'); var iframe = iframeParent.children('iframe.softaculous_pro_display_iframe'); var iframeIntrinsicWidth = 1250; var iframeIntrinsicHeight = 650; let scaleX = iframeParent.width() / iframeIntrinsicWidth; let scaleY = iframeParent.height() / iframeIntrinsicHeight; let scale = iframeParent.width() >= iframeIntrinsicWidth ? Math.max(scaleX, scaleY) : Math.min(scaleX, scaleY); iframe.css({ 'transform': `scale(${scale})`, 'transform-origin': 'top left', 'width': iframeIntrinsicWidth + 'px', 'height': (iframeIntrinsicHeight / scale) + 'px' }); } function softaculous_pro_scaleIframe() { jQuery('#softaculous-pro-templates .softaculous-pro-theme-iframe').each(function () { let iframe = jQuery(this).find('iframe'); let parentWidth = jQuery(this).width(); let parentHeight = jQuery(window).height(); let iframeWidth = 1250; let iframeHeight = 1200; // Calculate scale factor to fit within parent container while keeping the aspect ratio let scaleX = parentWidth / iframeWidth; let scaleY = parentHeight / iframeHeight; let scale = Math.min(scaleX, scaleY); // Adjust iframe size and scale iframe.css({ transform: `scale(${scale})`, width: `${iframeWidth}px`, height: `${iframeHeight}px`, }); // Set the parent container height dynamically jQuery(this).css({ height: `${iframeHeight * scale}px`, overflow: 'hidden' }); }); } // Show the theme details function softaculous_pro_show_theme_details(slug, retry = true){ var theme = themes[slug]; jQuery("#softaculous-pro-suggestion").hide(); jQuery("#softaculous_pro_search").hide(); jQuery("#softaculous_pro_theme_title").hide(); jQuery("#softaculous-pro-single-template").show(); jQuery("#softaculous-pro-templates").hide(); jQuery('img#softaculous_pro_display_image').hide(); jQuery('.softaculous-pro-theme-iframe').show(); var hIframe = jQuery('[slug="' + slug + '"]').find('iframe.scaled-iframe').clone(); // Set install value jQuery('#softaculous-pro-template-install').val(slug); // Set name jQuery("#softaculous-pro-template-name").html(theme['name']); // Demo URL jQuery("#softaculous-pro-demo").attr("href", softaculous_pro_demo+(theme['name'].replace(' ', '_'))); // Blank screenshots jQuery("#softaculous_pro_screenshots").html(''); jQuery(".single-templates-content .softaculous-pro-theme-iframe").children().not(':first').remove(); // Is the license PRO ? if(theme['type'] >= 2){ jQuery('#softaculous_pro_license_div').css('display', 'inline-block'); }else{ jQuery('#softaculous_pro_license_div').hide(); } // Show home image jQuery("#softaculous-pro-single-template").find('iframe.scaled-iframe').remove(); jQuery("#softaculous-pro-single-template").find('.softaculous-pro-theme-iframe').append(hIframe); jQuery("#softaculous-pro-single-template").find('iframe.scaled-iframe') .addClass('softaculous_pro_display_iframe softaculous_pro_iframe_inview') .removeAttr('id') .removeAttr('style') .attr('data-page', 'home') .attr('width', '100%'); hIframe.parent().scrollTop(0); hIframe.on('load', function(){ hIframe.addClass('softaculous-pro-is-loaded'); }); // Make the call jQuery.ajax({ url: softaculous_pro_ajax_url+'action=softaculous_pro_template_info', type: 'POST', data: { softaculous_pro_nonce: softaculous_pro_ajax_nonce, slug: slug }, dataType: 'json', success:function(theme) { if(!theme || !('screenshots' in theme)){ if(retry){ softaculous_pro_show_theme_details(slug, false); return; } alert('Something went wrong. Please try again!'); return; } jQuery("#spro_import_single").addClass("hidden"); var sc = ''; var iframe_sc = ''; var iframeUrls = {}; // var test= ''; // Show the screenshots for(var x in theme['screenshots']){ var page_name = softaculous_pro_strip_extension(theme['screenshots'][x]); sc += '
'+ ''+ ''+ ''+ '
'; if(page_name == 'home'){ continue; } var iframe_url = ''; if( pid in softaculous_pro_cache_stream_iframes && x in softaculous_pro_cache_stream_iframes[pid] && page_name in softaculous_pro_cache_stream_iframes[pid][x] ){ iframe_url = 'src="'+ softaculous_pro_cache_stream_iframes[pid][x][page_name] +'"'; }else{ iframeUrls[page_name] = slug; } iframe_sc += ''; } var iframeHolder = jQuery('.single-templates-content .softaculous-pro-theme-iframe'); var pid = ('theme_pid' in softaculous_pro_setup_info) ? softaculous_pro_setup_info['theme_pid']: ''; // Get blob URLs softaculous_pro_stream_iframes(iframeUrls, pid, iframeHolder); iframeHolder.append(iframe_sc); jQuery("#softaculous_pro_screenshots").html(sc); jQuery("#spro_import_content").show(); jQuery(".softaculous-pro-back").show(); jQuery('.softaculous_pro_img_screen:first').children('a').addClass('spro_img_inview'); jQuery("#spro_import_content").attr('disabled',true); var all_iframes = jQuery('.single-templates-content .softaculous-pro-theme-iframe').find('iframe'); var loaded = 0; var timeoutReached = false; var timeout = setTimeout(function() { timeoutReached = true; jQuery('.softaculous_pro_img_screen:first').children('a').addClass('spro_img_inview'); }, 300000); // 5 minutes all_iframes.each(function() { var iframe = jQuery(this); iframe.on('load', function () { // Prevent load before src var src = jQuery(this).attr('src'); if(!src || src.length < 1 ){ return; } // Show the pages slug according to which page is loaded var page_slug = jQuery(this).data('page'); var loaded_ele = jQuery('.softaculous_pro_img_screen[page-name="' + page_slug + '"]'); loaded_ele.children('.softaculous-pro-link-skeleton').hide(); loaded_ele.children('.spro_page_selector').show(); loaded_ele.children('a').show(); if (timeoutReached) return; // Skip if timeout already triggered loaded++; if (loaded == all_iframes.length) { clearTimeout(timeout); // Cancel timeout jQuery("#spro_import_content").removeAttr('disabled') } // Scale iframe softaculous_pro_scaleSingleTemplate(); }); // In case any iframe already loaded if(iframe.length > 0 && iframe[0].contentWindow && iframe[0].contentDocument.readyState === 'complete') { iframe.trigger('load'); } }); // Remove loader jQuery('.softaculous_pro_iframe_inview').on('load', function() { jQuery('.softaculous-pro-loader-container').hide(); }); jQuery('#softaculous_pro_screenshots .softaculous_pro_img_views').on('click', function(e){ e.preventDefault(); var jEle = jQuery(this); var page_name = jEle.parent().attr('page-name'); all_iframes.removeClass('softaculous_pro_iframe_inview'); if(jQuery('.softaculous_pro_img_screen .softaculous_pro_img_views').hasClass('spro_img_inview')){ jQuery('.softaculous_pro_img_screen .softaculous_pro_img_views').removeClass('spro_img_inview'); } var iEle = jQuery('iframe.softaculous_pro_display_iframe[data-page="' + page_name + '"]'); jEle.addClass('spro_img_inview'); // Show iframe if (iEle.length > 0 && iEle[0].contentWindow && iEle[0].contentDocument.readyState === 'complete') { iEle.addClass('softaculous_pro_iframe_inview'); }else{ jQuery(".softaculous-pro-loader-container").show(); iEle.on('load.show_iframe', function(){ jQuery(".softaculous-pro-loader-container").hide(); iEle.addClass('softaculous_pro_iframe_inview'); }); } }); jQuery("#softaculous_pro_screenshots").find('.spro_page_selector').click(function(event){ var jEle = jQuery(this); jEle.siblings('.softaculous_pro_img_views').click(); }); // Change event on the checkbox jQuery("#softaculous_pro_screenshots").find('.checkbox').change(function() { var checked_div = jQuery(this).siblings('.softaculous_pro_img_name'); if(jQuery('.softaculous_pro_img_screen .softaculous_pro_img_views').hasClass('spro_img_inview')){ jQuery('.softaculous_pro_img_screen .softaculous_pro_img_views').removeClass('spro_img_inview'); } jQuery(this).parent().siblings('.softaculous_pro_img_views').addClass('spro_img_inview'); if (jQuery(this).is(':checked')) { checked_div.addClass("softaculous_pro_img_selected"); } else { checked_div.removeClass("softaculous_pro_img_selected"); } }); } }); } function softaculous_pro_show_manual_theme_details(slug){ var theme = themes[slug]; jQuery("#softaculous-pro-suggestion").hide(); jQuery("#softaculous_pro_search").hide(); jQuery("#softaculous_pro_theme_title").hide(); jQuery("#softaculous-pro-single-template").show(); jQuery("#softaculous-pro-templates").hide(); jQuery('.softaculous-pro-theme-iframe').hide(); jQuery('img#softaculous_pro_display_image').show(); // Set install value jQuery('#softaculous-pro-template-install').val(slug); // Set name jQuery("#softaculous-pro-template-name").html(theme['name']); // Demo URL jQuery("#softaculous-pro-demo").attr("href", softaculous_pro_demo+(theme['name'].replace(' ', '_'))); // Blank screenshots jQuery("#softaculous_pro_screenshots").html(''); // Is the license PRO ? if(theme['type'] >= 2){ jQuery('#softaculous_pro_license_div').css('display', 'inline-block'); }else{ jQuery('#softaculous_pro_license_div').hide(); } var url = mirror+'/'+theme['slug']; // Show home image jQuery("img#softaculous_pro_display_image").attr("src", ""); jQuery("img#softaculous_pro_display_image").attr("src", url+'/screenshots/home.jpg'); jQuery("img#softaculous_pro_display_image").parent().scrollTop(0); // Make the call jQuery.ajax({ url: softaculous_pro_ajax_url+'action=softaculous_pro_template_info', type: 'POST', data: { softaculous_pro_nonce: softaculous_pro_ajax_nonce, slug: slug }, dataType: 'json', success:function(theme) { jQuery("#spro_import_single").addClass("hidden"); var sc = ''; // var test= ''; // Show the screenshots for(var x in theme['screenshots']){ var page_name = softaculous_pro_strip_extension(theme['screenshots'][x]); sc += '
'+ '
'+ '
'+ ''+ '
'; } jQuery("#softaculous_pro_screenshots").html(sc); jQuery("#spro_import_content").show(); jQuery("#spro_import_content").removeAttr('disabled'); jQuery(".softaculous-pro-back").show(); jQuery('.softaculous_pro_img_screen:first').children('a').addClass('spro_img_inview'); jQuery("img#softaculous_pro_display_image").on('load', function() { jQuery(".softaculous-pro-loader-container").hide(); // Hide loader jQuery(this).show(); // Show image }); jQuery("#softaculous_pro_screenshots").find('.softaculous_pro_img_views').click(function(e){ e.preventDefault(); var jEle = jQuery(this); jQuery("img#softaculous_pro_display_image").hide(); jQuery(".softaculous-pro-loader-container").show(); if(jQuery('.softaculous_pro_img_screen .softaculous_pro_img_views').hasClass('spro_img_inview')){ jQuery('.softaculous_pro_img_screen .softaculous_pro_img_views').removeClass('spro_img_inview'); } var newImageSrc = jEle.attr("href"); jQuery("img#softaculous_pro_display_image").attr("src", newImageSrc); jQuery("img#softaculous_pro_display_image").on('load', function() { jQuery(".softaculous-pro-loader-container").hide(); // Hide loader jQuery(this).show(); // Show image }); // In case the image is cached and loads immediately if (jQuery("img#softaculous_pro_display_image")[0].complete) { jQuery(".softaculous-pro-loader-container").hide(); // Hide loader jQuery("img#softaculous_pro_display_image").show(); // Show image } jQuery("img#softaculous_pro_display_image").parent().scrollTop(0); jEle.addClass('spro_img_inview'); }); // need to refactor it its create multiple in html jQuery("#softaculous_pro_screenshots").find('.softaculous_pro_img_views').on('mouseenter',function(e){ var imgUrl = jQuery(this).attr('href'); if(!jQuery(this).attr('loaded')){ jQuery('').attr('src', imgUrl).on('load', function() {}).appendTo('body').css('display', 'none'); } jQuery(this).attr('loaded',true); }); jQuery("#softaculous_pro_screenshots").find('.spro_page_selector').click(function(event){ var jEle = jQuery(this); jQuery("img#softaculous_pro_display_image").hide(); jQuery(".softaculous-pro-loader-container").show(); var checkbox = jQuery(this).find('.checkbox'); if (jQuery(event.target).is('.checkbox') || jQuery(event.target).is('.softaculous_pro_img_name')) { return; } jEle.siblings('.softaculous_pro_img_views').trigger('click'); }); // Change event on the checkbox jQuery("#softaculous_pro_screenshots").find('.checkbox').change(function() { var checked_div = jQuery(this).siblings('.softaculous_pro_img_name'); if(jQuery('.softaculous_pro_img_screen .softaculous_pro_img_views').hasClass('spro_img_inview')){ jQuery('.softaculous_pro_img_screen .softaculous_pro_img_views').removeClass('spro_img_inview'); } var newImageSrc = jQuery(this).parent().siblings('.softaculous_pro_img_views').attr("href"); jQuery(this).parent().siblings('.softaculous_pro_img_views').addClass('spro_img_inview'); jQuery("img#softaculous_pro_display_image").attr("src", newImageSrc); jQuery("img#softaculous_pro_display_image").on('load', function() { jQuery(".softaculous-pro-loader-container").hide(); // Hide loader jQuery(this).show(); // Show image }); if (jQuery(this).is(':checked')) { checked_div.addClass("softaculous_pro_img_selected"); } else { checked_div.removeClass("softaculous_pro_img_selected"); } }); } }); } function softaculous_pro_onboarding_dismiss(e){ jQuery.ajax({ type: 'post', url: soft_pro_obj.ajax_url, data: { action: 'softaculous_pro_onboarding_dismiss', dismiss: 1, softaculous_pro_nonce: softaculous_pro_ajax_nonce, data: [], }, complete: function (response) { window.location = soft_pro_obj.admin_url; }, }); } function softaculous_pro_import_scroll(){ jQuery("[data-active-panel='import_theme']").on("scroll", function() { var container = jQuery(this); var element_visible = container.find('#softaculous-pro-single-template'); if(element_visible.css('display') == 'block'){ return; } var scrollTop = container.scrollTop(); var containerHeight = container.innerHeight(); var contentHeight = container[0].scrollHeight; if (scrollTop + containerHeight >= contentHeight - 100 ) { if(softaculous_ai_config.template_mode == 'manual' && !softaculous_pro_manual_theme_loading ){ if(softaculous_pro_current_manual_theme_page >= softaculous_pro_total_manual_pages ) return; softaculous_pro_manual_theme_loading = true; softaculous_pro_current_manual_theme_page++; softaculous_pro_show_manual_themes( jQuery('.softaculous-pro-current-cat').data('cat') || "", jQuery("#softaculous_pro_search input").val() || "", softaculous_pro_current_manual_theme_page ); // small delay to avoid multiple calls setTimeout(function(){ softaculous_pro_manual_theme_loading = false; }, 1000); }else if(softaculous_ai_config.template_mode == 'ai' && softaculous_pro_pending_iframeCount < 5 ){ var nextPage = softaculousAiLoadedPages.length + 1; softaculous_pro_show_themes("", "", nextPage); } } }); } function softaculous_pro_stop_progress_calls(){ softaculous_pro_stop_progress = true; if (softaculous_pro_ajax_progress_var && softaculous_pro_ajax_progress_var.readyState !== 4) { softaculous_pro_ajax_progress_var.abort(); console.log("Progress AJAX call is being aborted..."); } } function softaculous_pro_onboarding_progress() { if (softaculous_pro_stop_progress) { return; } const now = Date.now(); const time_since_last_req = now - softaculous_pro_last_req_time; const delay = time_since_last_req < 1000 ? 1000 - time_since_last_req : 0; setTimeout(() => { softaculous_pro_last_req_time = Date.now(); softaculous_pro_ajax_progress_var = jQuery.ajax({ url: soft_pro_obj.ajax_url, type: 'POST', dataType: 'json', data: { action: 'softaculous_pro_get_progress', softaculous_pro_nonce: softaculous_pro_ajax_nonce }, success: function (res) { if (res.success) { const progress = res.data.progress; // Skip if no change if (JSON.stringify(progress) === JSON.stringify(softaculous_pro_last_progress_cache)) { return softaculous_pro_onboarding_progress(); } softaculous_pro_last_progress_cache = progress; // Update UI if (progress.data && progress.data.success) { softaculous_pro_create_html( progress.text, progress.percent, true, progress.data.logs || null ); } // Stop if complete if (progress.percent == 100) { softaculous_pro_stop_progress = true; const modal = jQuery('.spro-progress-bar'); modal.find('.progress-text').text(softwp_onboarding_lang.congratulations + '🎊'); modal.find('.skeleton-loader').hide(); modal.find('.softaculous-pro-done').show(); return; } } // Keep polling until stopped if (!softaculous_pro_stop_progress) { softaculous_pro_onboarding_progress(); } }, error: function (xhr, status, error) { console.log("Failed to fetch progress:", error); softaculous_pro_stop_progress_calls(); } }); }, delay); } // Show Number of images function softaculous_pro_update_image_count(){ var image_count = softaculous_ai_config.selected_images.length jQuery('.softaculous-pro-selected-image-count').html(image_count); }givejs.php000064400000004371152352452360006560 0ustar00 $v){ //echo $k.'
'; $data .= file_get_contents($self_path.'/'.$v)."\n\n"; } // We are zipping if possible if(function_exists('ob_gzhandler') && !ini_get('zlib.output_compression')){ ob_start('ob_gzhandler'); } // Type javascript header("Content-type: text/javascript; charset: UTF-8"); // Set a zero Mtime $filetime = filemtime($self_path.'/sitepad-editor.js'); // Cache Control header("Cache-Control: must-revalidate"); // Checking if the client is validating his cache and if it is current. if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && (@strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $filetime)) { // Client's cache IS current, so we just respond '304 Not Modified'. header('Last-Modified: '.gmdate('D, d M Y H:i:s', $filetime).' GMT', true, 304); return; }else{ // Image not cached or cache outdated, we respond '200 OK' and output the image. header('Last-Modified: '.gmdate('D, d M Y H:i:s', $filetime).' GMT', true, 200); } echo $data; sitepad-editor.js000064400000011037152352452360010030 0ustar00/* SITEPAD http://sitepad.com/ (c) SitePad Team */ // Lets start pagelayer_add_action('pagelayer_setup_history', function(){ // Show the top bar pagelayer.$$(".pagelayer-iframe-top-bar").show(); pagelayer.$$(".pagelayer-iframe-holder").addClass("pagelayer-iframe-holder-with-bar"); // Move the bottom bar to the top bar var bottom = pagelayer.$$(".pagelayer-bottombar-holder").detach(); bottom.appendTo(pagelayer.$$(".sitepad-top-bar-right")); pagelayer.$$(".pagelayer-bottombar-row").remove(); pagelayer.$$(".pagelayer-mode-buttons-wrapper").addClass("sitepad-screen-mode-fix"); // Add the publish button pagelayer.$$(".pagelayer-bottombar-rightbuttons").prepend(''); sitepad_show_publish_button(pagelayer_post.post_status); // Show or hide publish button pagelayer_add_action('pagelayer_save_success', function(e, status){ sitepad_show_publish_button(status); if(!pagelayer_empty(pagelayer_active.el) && pagelayer_active.el.tag == 'pl_post_props'){ pagelayer.$$('.pagelayer-settings').click(); } }); // On click publish site pagelayer.$$(".sitepad-publish-button").click(function(){ pagelayer.post_status = 'publish'; pagelayer.$$('.pagelayer-update-button').click(); }); pagelayer.$$(".pagelayer-group-name-wordpress h5").html(sitepad_brand_sm+' Widgets'); // Append the form to the body sitepad_add_seo_form(); }); function sitepad_show_publish_button(status){ if(status == 'draft'){ pagelayer.$$(".sitepad-publish-button").show(); }else{ pagelayer.$$(".sitepad-publish-button").hide(); } } function sitepad_take_screenshot(){ jQuery(".pagelayer-add-widget-area").attr("data-html2canvas-ignore", 1); html2canvas(document.body, {height: jQuery(window).outerWidth()}).then(function(canvas){ var img = canvas.toDataURL("image/jpeg"); jQuery.ajax({ type: "POST", url: sitepad_ajax_url+'&action=sitepad_save_screenshot&postID='+pagelayer_postID, data: { image : img, sitepad_nonce: sitepad_ajax_nonce, post_name: pagelayer_post['post_name'], }, success: function(response, status, xhr){ //alert(response); }, error: function(errorThrown){ console.log(errorThrown); } }); }); } // Take screenshot on save pagelayer_add_action('pagelayer_save', function(){ // Only for pages if(pagelayer_post.post_type != 'page'){ return; } sitepad_take_screenshot(); }); // Hide the top bar pagelayer_add_action('pagelayer-leftbar-toggle', function(){ var show = true; // Is the leftbar toggle itself there ? if(pagelayer.$$('.pagelayer-leftbar-toggle').is(":visible")){ show = pagelayer.$$('.pagelayer-topbar-holder').is(":visible"); } if(show){ pagelayer.$$('.pagelayer-iframe-top-bar').show(); }else{ pagelayer.$$('.pagelayer-iframe-top-bar').hide(); } }); function sitepad_selectPage(selectObject){ change_page = selectObject.value; window.parent.location.href = change_page; } // Add SEO form function sitepad_add_seo_form(){ var seoModal = pagelayer.$$('#sitepad-seo-option-div'); // Save meta data seoModal.find('.meta-tags-submit').click(function(){ var form_data = seoModal.find("#sitepad_meta_form").serialize(); jQuery.ajax({ url: pagelayer_ajax_url+'&action=sitepad_save_meta_tags&postID='+pagelayer_postID+'&sitepad_nonce='+sitepad_ajax_nonce, type: "POST", data: form_data, success: function(data){ var obj = jQuery.parseJSON(data); if(obj['error']){ alert(obj['error']); }else{ alert("Meta Tags Successfully Updated!"); } }, error: function(data, errorThrown){ alert(errorThrown); }, }); }); // Close SEO form Modal seoModal.find('.meta-tags-close').click(function(){ seoModal.hide(); }); // Clear SEO form Modal seoModal.find('.meta-tags-clear').click(function(){ var form_data = seoModal.find("#sitepad_meta_form").serialize(); //jQuery("#div_loader").show(); jQuery.ajax({ url: pagelayer_ajax_url+'&action=sitepad_clear_meta_tags&postID='+pagelayer_postID+'&sitepad_nonce='+sitepad_ajax_nonce, type: "POST", data: form_data, success: function(data){ var obj = jQuery.parseJSON(data); if(obj['error']){ alert(obj['error']); }else{ seoModal.find('input, textarea').val(''); alert("Meta Tags Cleared Successfully!"); } }, error: function(data, errorThrown){ alert(errorThrown); }, }); }); // Open SEO form Modal pagelayer.$$('.sitepad-seo-option').click(function(){ seoModal.show(); }); }