Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-conte.../plugins/custom-t.../admin/builder/assets/js
File: builder.js
[2000] Fix | Delete
//Header Text Class
[2001] Fix | Delete
getTextHeaderClass : function(){
[2002] Fix | Delete
var self = this,
[2003] Fix | Delete
customizerSettings = self.customizerFeedData.settings,
[2004] Fix | Delete
headerData = self.customizerFeedData.headerData,
[2005] Fix | Delete
headerClass = 'ctf_header_text ',
[2006] Fix | Delete
shouldShowBio = self.checkNotEmpty( self.getHeaderBio() ) ? self.valueIsEnabled( customizerSettings['showbio'] ) : false,
[2007] Fix | Delete
shouldShowInfo = shouldShowBio || self.valueIsEnabled( customizerSettings['showfollowers'] );
[2008] Fix | Delete
headerClass += !shouldShowBio ? 'ctf_no_bio ' : '',
[2009] Fix | Delete
headerClass += !shouldShowInfo ? 'ctf_no_info' : '';
[2010] Fix | Delete
[2011] Fix | Delete
return headerClass;
[2012] Fix | Delete
},
[2013] Fix | Delete
[2014] Fix | Delete
//Get Story Delays
[2015] Fix | Delete
getStoryDelays : function(){
[2016] Fix | Delete
var self = this,
[2017] Fix | Delete
customizerSettings = self.customizerFeedData.settings;
[2018] Fix | Delete
return self.checkNotEmpty( customizerSettings['storiestime'] ) ? Math.max( 500, parseInt( customizerSettings['storiestime']) ) : 5000;
[2019] Fix | Delete
},
[2020] Fix | Delete
[2021] Fix | Delete
//Get Story Data
[2022] Fix | Delete
getStoryData : function(){
[2023] Fix | Delete
var self = this,
[2024] Fix | Delete
customizerSettings = self.customizerFeedData.settings,
[2025] Fix | Delete
headerData = self.customizerFeedData.headerData;
[2026] Fix | Delete
if( self.hasOwnNestedProperty(headerData, 'stories') && headerData.stories.length > 0 && self.valueIsEnabled( customizerSettings['stories'] ) ){
[2027] Fix | Delete
return headerData['stories'];
[2028] Fix | Delete
}
[2029] Fix | Delete
return false;
[2030] Fix | Delete
},
[2031] Fix | Delete
[2032] Fix | Delete
[2033] Fix | Delete
//Image Chooser
[2034] Fix | Delete
imageChooser : function( settingID ){
[2035] Fix | Delete
var self = this;
[2036] Fix | Delete
var uploader = wp.media({
[2037] Fix | Delete
frame : 'post',
[2038] Fix | Delete
title : 'Media Uploader',
[2039] Fix | Delete
button:{text : 'Choose Media'},
[2040] Fix | Delete
library: {type: 'image'},
[2041] Fix | Delete
multiple: false
[2042] Fix | Delete
}).on('close',function() {
[2043] Fix | Delete
var selection = uploader.state().get('selection');
[2044] Fix | Delete
if(selection.length != 0){
[2045] Fix | Delete
attachment = selection.first().toJSON();
[2046] Fix | Delete
self.customizerFeedData.settings[settingID] = attachment.url;
[2047] Fix | Delete
}
[2048] Fix | Delete
}).open();
[2049] Fix | Delete
},
[2050] Fix | Delete
[2051] Fix | Delete
//Change Switcher Settings
[2052] Fix | Delete
changeSwitcherSettingValue : function(settingID, onValue, offValue, ajaxAction = false) {
[2053] Fix | Delete
var self = this;
[2054] Fix | Delete
self.customizerFeedData.settings[settingID] = self.customizerFeedData.settings[settingID] == onValue ? offValue : onValue;
[2055] Fix | Delete
if(ajaxAction !== false){
[2056] Fix | Delete
self.customizerControlAjaxAction(ajaxAction);
[2057] Fix | Delete
}
[2058] Fix | Delete
self.regenerateLayout(settingID);
[2059] Fix | Delete
},
[2060] Fix | Delete
[2061] Fix | Delete
//Checkbox List
[2062] Fix | Delete
changeCheckboxListValue : function(settingID, value, ajaxAction = false){
[2063] Fix | Delete
var self = this,
[2064] Fix | Delete
settingValue = self.customizerFeedData.settings[settingID].split(',');
[2065] Fix | Delete
if(!Array.isArray(settingValue)){
[2066] Fix | Delete
settingValue = [settingValue];
[2067] Fix | Delete
}
[2068] Fix | Delete
if(settingValue.includes(value)){
[2069] Fix | Delete
settingValue.splice(settingValue.indexOf(value),1);
[2070] Fix | Delete
}else{
[2071] Fix | Delete
settingValue.push(value);
[2072] Fix | Delete
}
[2073] Fix | Delete
self.customizerFeedData.settings[settingID] = settingValue.join(',');
[2074] Fix | Delete
},
[2075] Fix | Delete
[2076] Fix | Delete
[2077] Fix | Delete
//Section Checkbox
[2078] Fix | Delete
changeCheckboxSectionValue : function(settingID, value, ajaxAction = false, checkBoxAction = false){
[2079] Fix | Delete
var self = this;
[2080] Fix | Delete
if(checkBoxAction !== false){
[2081] Fix | Delete
self.customizerFeedData.settings[settingID] = self.customizerFeedData.settings[settingID] == checkBoxAction.options.enabled ? checkBoxAction.options.disabled : checkBoxAction.options.enabled;
[2082] Fix | Delete
}else{
[2083] Fix | Delete
var settingValue = self.customizerFeedData.settings[settingID];
[2084] Fix | Delete
if(!Array.isArray(settingValue) && settingID == 'type'){
[2085] Fix | Delete
settingValue = [settingValue];
[2086] Fix | Delete
}
[2087] Fix | Delete
if(settingValue.includes(value)){
[2088] Fix | Delete
settingValue.splice(settingValue.indexOf(value),1);
[2089] Fix | Delete
}else{
[2090] Fix | Delete
settingValue.push(value);
[2091] Fix | Delete
}
[2092] Fix | Delete
if(settingID == 'type'){
[2093] Fix | Delete
self.processFeedTypesSources( settingValue );
[2094] Fix | Delete
}
[2095] Fix | Delete
//settingValue = (settingValue.length == 1 && settingID == 'type') ? settingValue[0] : settingValue;
[2096] Fix | Delete
self.customizerFeedData.settings[settingID] = settingValue;
[2097] Fix | Delete
}
[2098] Fix | Delete
[2099] Fix | Delete
if(ajaxAction !== false){
[2100] Fix | Delete
self.customizerControlAjaxAction(ajaxAction);
[2101] Fix | Delete
}
[2102] Fix | Delete
event.stopPropagation()
[2103] Fix | Delete
[2104] Fix | Delete
},
[2105] Fix | Delete
checkboxSectionValueExists : function(settingID, value){
[2106] Fix | Delete
var self = this;
[2107] Fix | Delete
var settingValue = self.customizerFeedData.settings[settingID];
[2108] Fix | Delete
return settingValue.includes(value) ? true : false;
[2109] Fix | Delete
},
[2110] Fix | Delete
[2111] Fix | Delete
/**
[2112] Fix | Delete
* Check Control Condition
[2113] Fix | Delete
*
[2114] Fix | Delete
* @since 2.0
[2115] Fix | Delete
*/
[2116] Fix | Delete
checkControlCondition : function(conditionsArray = [], checkExtensionActive = false, checkExtensionActiveDimmed = false){
[2117] Fix | Delete
var self = this,
[2118] Fix | Delete
isConditionTrue = 0;
[2119] Fix | Delete
Object.keys(conditionsArray).map(function(condition, index){
[2120] Fix | Delete
if(conditionsArray[condition].indexOf(self.customizerFeedData.settings[condition]) !== -1)
[2121] Fix | Delete
isConditionTrue += 1
[2122] Fix | Delete
});
[2123] Fix | Delete
var extensionCondition = checkExtensionActive != undefined && checkExtensionActive != false ? self.checkExtensionActive(checkExtensionActive) : true,
[2124] Fix | Delete
extensionCondition = checkExtensionActiveDimmed != undefined && checkExtensionActiveDimmed != false && !self.checkExtensionActive(checkExtensionActiveDimmed) ? false : extensionCondition;
[2125] Fix | Delete
[2126] Fix | Delete
return (isConditionTrue == Object.keys(conditionsArray).length) ? ( extensionCondition ) : false;
[2127] Fix | Delete
},
[2128] Fix | Delete
[2129] Fix | Delete
/**
[2130] Fix | Delete
* Check Color Override Condition
[2131] Fix | Delete
*
[2132] Fix | Delete
* @since 2.0
[2133] Fix | Delete
*/
[2134] Fix | Delete
checkControlOverrideColor : function(overrideConditionsArray = []){
[2135] Fix | Delete
var self = this,
[2136] Fix | Delete
isConditionTrue = 0;
[2137] Fix | Delete
overrideConditionsArray.map(function(condition, index){
[2138] Fix | Delete
if(self.checkNotEmpty(self.customizerFeedData.settings[condition]) && self.customizerFeedData.settings[condition].replace(/ /gi,'') != '#'){
[2139] Fix | Delete
isConditionTrue += 1
[2140] Fix | Delete
}
[2141] Fix | Delete
});
[2142] Fix | Delete
return (isConditionTrue >= 1) ? true : false;
[2143] Fix | Delete
},
[2144] Fix | Delete
[2145] Fix | Delete
/**
[2146] Fix | Delete
* Show Control
[2147] Fix | Delete
*
[2148] Fix | Delete
* @since 2.0
[2149] Fix | Delete
*/
[2150] Fix | Delete
isControlShown : function( control ){
[2151] Fix | Delete
var self = this;
[2152] Fix | Delete
if( control.checkViewDisabled != undefined ){
[2153] Fix | Delete
return !self.viewsActive[control.checkViewDisabled];
[2154] Fix | Delete
}
[2155] Fix | Delete
if( control.checkView != undefined ){
[2156] Fix | Delete
return !self.viewsActive[control.checkView];
[2157] Fix | Delete
}
[2158] Fix | Delete
[2159] Fix | Delete
if(control.checkExtension != undefined && control.checkExtension != false && !self.checkExtensionActive(control.checkExtension)){
[2160] Fix | Delete
return self.checkExtensionActive(control.checkExtension);
[2161] Fix | Delete
}
[2162] Fix | Delete
[2163] Fix | Delete
if(control.conditionDimmed != undefined && self.checkControlCondition(control.conditionDimmed) )
[2164] Fix | Delete
return self.checkControlCondition(control.conditionDimmed);
[2165] Fix | Delete
if(control.overrideColorCondition != undefined){
[2166] Fix | Delete
return self.checkControlOverrideColor( control.overrideColorCondition );
[2167] Fix | Delete
}
[2168] Fix | Delete
[2169] Fix | Delete
return ( control.conditionHide != undefined && control.condition != undefined || control.checkExtension != undefined )
[2170] Fix | Delete
? self.checkControlCondition(control.condition, control.checkExtension)
[2171] Fix | Delete
: true;
[2172] Fix | Delete
},
[2173] Fix | Delete
[2174] Fix | Delete
checkExtensionActive : function(extension){
[2175] Fix | Delete
var self = this;
[2176] Fix | Delete
return self.activeExtensions[extension];
[2177] Fix | Delete
},
[2178] Fix | Delete
[2179] Fix | Delete
expandSourceInfo : function(sourceId){
[2180] Fix | Delete
var self = this;
[2181] Fix | Delete
self.customizerScreens.sourceExpanded = (self.customizerScreens.sourceExpanded === sourceId) ? null : sourceId;
[2182] Fix | Delete
window.event.stopPropagation()
[2183] Fix | Delete
},
[2184] Fix | Delete
[2185] Fix | Delete
resetColor: function(controlId){
[2186] Fix | Delete
this.customizerFeedData.settings[controlId] = '';
[2187] Fix | Delete
},
[2188] Fix | Delete
[2189] Fix | Delete
//Source Active Customizer
[2190] Fix | Delete
isSourceActiveCustomizer : function(source){
[2191] Fix | Delete
var self = this;
[2192] Fix | Delete
return (
[2193] Fix | Delete
Array.isArray(self.customizerFeedData.settings.sources.map) ||
[2194] Fix | Delete
self.customizerFeedData.settings.sources instanceof Object
[2195] Fix | Delete
) &&
[2196] Fix | Delete
self.customizerScreens.sourcesChoosed.map(s => s.account_id).includes(source.account_id);
[2197] Fix | Delete
//self.customizerFeedData.settings.sources.map(s => s.account_id).includes(source.account_id);
[2198] Fix | Delete
},
[2199] Fix | Delete
//Choose Source From Customizer
[2200] Fix | Delete
selectSourceCustomizer : function(source, isRemove = false){
[2201] Fix | Delete
var self = this,
[2202] Fix | Delete
isMultifeed = (self.activeExtensions['multifeed'] !== undefined && self.activeExtensions['multifeed'] == true),
[2203] Fix | Delete
sourcesListMap = Array.isArray(self.customizerFeedData.settings.sources) || self.customizerFeedData.settings.sources instanceof Object ? self.customizerFeedData.settings.sources.map(s => s.account_id) : [];
[2204] Fix | Delete
if(isMultifeed){
[2205] Fix | Delete
if(self.customizerScreens.sourcesChoosed.map(s => s.account_id).includes(source.account_id)){
[2206] Fix | Delete
var indexToRemove = self.customizerScreens.sourcesChoosed.findIndex(src => src.account_id === source.account_id);
[2207] Fix | Delete
self.customizerScreens.sourcesChoosed.splice(indexToRemove, 1);
[2208] Fix | Delete
if(isRemove){
[2209] Fix | Delete
self.customizerFeedData.settings.sources.splice(indexToRemove, 1);
[2210] Fix | Delete
}
[2211] Fix | Delete
}else{
[2212] Fix | Delete
self.customizerScreens.sourcesChoosed.push(source);
[2213] Fix | Delete
}
[2214] Fix | Delete
}else{
[2215] Fix | Delete
self.customizerScreens.sourcesChoosed = (sourcesListMap.includes(source)) ? [] : [source];
[2216] Fix | Delete
}
[2217] Fix | Delete
ctfBuilder.$forceUpdate();
[2218] Fix | Delete
},
[2219] Fix | Delete
closeSourceCustomizer : function(){
[2220] Fix | Delete
var self = this;
[2221] Fix | Delete
self.viewsActive['sourcePopup'] = false;
[2222] Fix | Delete
//self.customizerFeedData.settings.sources = self.customizerScreens.sourcesChoosed;
[2223] Fix | Delete
ctfBuilder.$forceUpdate();
[2224] Fix | Delete
},
[2225] Fix | Delete
customizerFeedTypePrint : function(){
[2226] Fix | Delete
var self = this,
[2227] Fix | Delete
combinedTypes = self.feedTypes.concat(self.advancedFeedTypes);
[2228] Fix | Delete
result = combinedTypes.filter(function(tp){
[2229] Fix | Delete
return tp.type === self.customizerFeedData.settings.feedtype
[2230] Fix | Delete
});
[2231] Fix | Delete
self.customizerScreens.printedType = result.length > 0 ? result[0] : [];
[2232] Fix | Delete
return result.length > 0 ? true : false;
[2233] Fix | Delete
},
[2234] Fix | Delete
choosedFeedTypeCustomizer : function(feedType){
[2235] Fix | Delete
var self = this, result = false;
[2236] Fix | Delete
if(
[2237] Fix | Delete
(self.viewsActive.feedTypeElement === null && self.customizerFeedData.settings.feedtype === feedType) ||
[2238] Fix | Delete
(self.viewsActive.feedTypeElement !== null && self.viewsActive.feedTypeElement == feedType)
[2239] Fix | Delete
){
[2240] Fix | Delete
result = true;
[2241] Fix | Delete
}
[2242] Fix | Delete
return result;
[2243] Fix | Delete
},
[2244] Fix | Delete
choosedFeedTemplateCustomizer : function(feedtemplate){
[2245] Fix | Delete
var self = this, result = false;
[2246] Fix | Delete
if(
[2247] Fix | Delete
(self.viewsActive.feedTemplateElement === null && self.customizerFeedData.settings.feedtemplate === feedtemplate) ||
[2248] Fix | Delete
(self.viewsActive.feedTemplateElement !== null && self.viewsActive.feedTemplateElement == feedtemplate)
[2249] Fix | Delete
){
[2250] Fix | Delete
result = true;
[2251] Fix | Delete
}
[2252] Fix | Delete
return result;
[2253] Fix | Delete
},
[2254] Fix | Delete
updateFeedTypeCustomizer : function(){
[2255] Fix | Delete
var self = this;
[2256] Fix | Delete
if (self.viewsActive.feedTypeElement === 'socialwall') {
[2257] Fix | Delete
window.location.href = ctf_builder.pluginsInfo.social_wall.settingsPage;
[2258] Fix | Delete
return;
[2259] Fix | Delete
}
[2260] Fix | Delete
self.setType( self.viewsActive.feedTypeElement );
[2261] Fix | Delete
[2262] Fix | Delete
self.customizerFeedData.settings.feedtype = self.viewsActive.feedTypeElement;
[2263] Fix | Delete
self.viewsActive.feedTypeElement = null;
[2264] Fix | Delete
self.viewsActive.feedtypesPopup = false;
[2265] Fix | Delete
self.customizerControlAjaxAction('feedFlyPreview');
[2266] Fix | Delete
ctfBuilder.$forceUpdate();
[2267] Fix | Delete
},
[2268] Fix | Delete
updateInputWidth : function(){
[2269] Fix | Delete
this.customizerScreens.inputNameWidth = ((document.getElementById("ctf-csz-hd-input").value.length + 6) * 8) + 'px';
[2270] Fix | Delete
},
[2271] Fix | Delete
[2272] Fix | Delete
updateFeedTemplateCustomizer : function(){
[2273] Fix | Delete
var self = this;
[2274] Fix | Delete
self.customizerFeedData.settings.feedtemplate = self.viewsActive.feedTemplateElement != null ? self.viewsActive.feedTemplateElement : self.customizerFeedData.settings.feedtemplate;
[2275] Fix | Delete
self.viewsActive.feedTemplateElement = null;
[2276] Fix | Delete
self.viewsActive.feedtemplatesPopup = false;
[2277] Fix | Delete
self.customizerControlAjaxAction('feedTemplateFlyPreview');
[2278] Fix | Delete
ctfBuilder.$forceUpdate();
[2279] Fix | Delete
},
[2280] Fix | Delete
[2281] Fix | Delete
customizerFeedTemplatePrint : function(){
[2282] Fix | Delete
var self = this;
[2283] Fix | Delete
result = self.feedTemplates.filter(function(tp){
[2284] Fix | Delete
return tp.type === self.customizerFeedData.settings.feedtemplate
[2285] Fix | Delete
});
[2286] Fix | Delete
self.customizerScreens.printedTemplate = result.length > 0 ? result[0] : [];
[2287] Fix | Delete
return result.length > 0 ? true : false;
[2288] Fix | Delete
},
[2289] Fix | Delete
[2290] Fix | Delete
[2291] Fix | Delete
feedPreviewMaker : function(){
[2292] Fix | Delete
var self = this;
[2293] Fix | Delete
return self.template;
[2294] Fix | Delete
//return self.template == null ? null : "<div>" + self.template + "</div>";
[2295] Fix | Delete
},
[2296] Fix | Delete
[2297] Fix | Delete
customizerStyleMaker : function(){
[2298] Fix | Delete
var self = this;
[2299] Fix | Delete
if(self.customizerSidebarBuilder){
[2300] Fix | Delete
self.feedStyle = '';
[2301] Fix | Delete
Object.values(self.customizerSidebarBuilder).map( function(tab) {
[2302] Fix | Delete
self.customizerSectionStyle(tab.sections);
[2303] Fix | Delete
});
[2304] Fix | Delete
return '<style type="text/css">' + self.feedStyle + '</style>';
[2305] Fix | Delete
}
[2306] Fix | Delete
return false;
[2307] Fix | Delete
},
[2308] Fix | Delete
[2309] Fix | Delete
customizerSectionStyle : function(sections){
[2310] Fix | Delete
var self = this;
[2311] Fix | Delete
Object.values(sections).map(function(section){
[2312] Fix | Delete
if(section.controls){
[2313] Fix | Delete
Object.values(section.controls).map(function(control){
[2314] Fix | Delete
self.returnControlStyle(control);
[2315] Fix | Delete
});
[2316] Fix | Delete
}
[2317] Fix | Delete
if(section.nested_sections){
[2318] Fix | Delete
self.customizerSectionStyle(section.nested_sections);
[2319] Fix | Delete
Object.values(section.nested_sections).map(function(nestedSections){
[2320] Fix | Delete
Object.values(nestedSections.controls).map(function(nestedControl){
[2321] Fix | Delete
if(nestedControl.section){
[2322] Fix | Delete
self.customizerSectionStyle(nestedControl);
[2323] Fix | Delete
}
[2324] Fix | Delete
});
[2325] Fix | Delete
});
[2326] Fix | Delete
}
[2327] Fix | Delete
});
[2328] Fix | Delete
},
[2329] Fix | Delete
returnControlStyle : function( control ){
[2330] Fix | Delete
var self = this;
[2331] Fix | Delete
if(control.style){
[2332] Fix | Delete
Object.entries(control.style).map( function(css) {
[2333] Fix | Delete
var condition = control.condition != undefined || control.checkExtension != undefined ? self.checkControlCondition(control.condition, control.checkExtension) : true;
[2334] Fix | Delete
if( condition ){
[2335] Fix | Delete
self.feedStyle +=
[2336] Fix | Delete
css[0] + '{' +
[2337] Fix | Delete
css[1].replace("{{value}}", self.customizerFeedData.settings[control.id]) +
[2338] Fix | Delete
'}';
[2339] Fix | Delete
}
[2340] Fix | Delete
});
[2341] Fix | Delete
}
[2342] Fix | Delete
},
[2343] Fix | Delete
[2344] Fix | Delete
[2345] Fix | Delete
[2346] Fix | Delete
[2347] Fix | Delete
/**
[2348] Fix | Delete
* Customizer Control Ajax
[2349] Fix | Delete
* Some of the customizer controls need to perform Ajax
[2350] Fix | Delete
* Calls in order to update the preview
[2351] Fix | Delete
*
[2352] Fix | Delete
* @since 2.0
[2353] Fix | Delete
*/
[2354] Fix | Delete
customizerControlAjaxAction : function( actionType, settingID = false ){
[2355] Fix | Delete
var self = this;
[2356] Fix | Delete
switch (actionType) {
[2357] Fix | Delete
case 'feedFlyPreview':
[2358] Fix | Delete
self.loadingBar = true;
[2359] Fix | Delete
self.templateRender = false;
[2360] Fix | Delete
var previewFeedData = {
[2361] Fix | Delete
action : 'ctf_feed_saver_manager_fly_preview',
[2362] Fix | Delete
feedID : self.customizerFeedData.feed_info.id,
[2363] Fix | Delete
previewSettings : self.customizerFeedData.settings,
[2364] Fix | Delete
feedName : self.customizerFeedData.feed_info.feed_name,
[2365] Fix | Delete
};
[2366] Fix | Delete
self.ajaxPost(previewFeedData, function(_ref){
[2367] Fix | Delete
var data = _ref.data;
[2368] Fix | Delete
if( data !== false ){
[2369] Fix | Delete
self.updatedTimeStamp = new Date().getTime();
[2370] Fix | Delete
self.template = String("<div>"+data.feed_html+"</div>");
[2371] Fix | Delete
self.processNotification("previewUpdated");
[2372] Fix | Delete
}else{
[2373] Fix | Delete
self.processNotification("unkownError");
[2374] Fix | Delete
}
[2375] Fix | Delete
jQuery('body').find('.ctf-more').unbind('click')
[2376] Fix | Delete
});
[2377] Fix | Delete
break;
[2378] Fix | Delete
case 'feedTemplateFlyPreview':
[2379] Fix | Delete
self.loadingBar = true;
[2380] Fix | Delete
self.templateRender = false;
[2381] Fix | Delete
var previewFeedData = {
[2382] Fix | Delete
action : 'ctf_feed_saver_manager_fly_preview',
[2383] Fix | Delete
feedID : self.customizerFeedData.feed_info.id,
[2384] Fix | Delete
previewSettings : self.customizerFeedData.settings,
[2385] Fix | Delete
feedName : self.customizerFeedData.feed_info.feed_name,
[2386] Fix | Delete
isFeedTemplatesPopup : true,
[2387] Fix | Delete
};
[2388] Fix | Delete
self.ajaxPost(previewFeedData, function(_ref){
[2389] Fix | Delete
var data = _ref.data;
[2390] Fix | Delete
if( data !== false ){
[2391] Fix | Delete
self.customizerFeedData.settings = data.customizerDataSettings;
[2392] Fix | Delete
self.updatedTimeStamp = new Date().getTime();
[2393] Fix | Delete
self.template = String("<div>"+data.feed_html+"</div>");
[2394] Fix | Delete
self.processNotification("previewUpdated");
[2395] Fix | Delete
setTimeout(function(){
[2396] Fix | Delete
self.setShortcodeGlobalSettings(true)
[2397] Fix | Delete
}, 500)
[2398] Fix | Delete
}else{
[2399] Fix | Delete
self.processNotification("unkownError");
[2400] Fix | Delete
}
[2401] Fix | Delete
});
[2402] Fix | Delete
break;
[2403] Fix | Delete
case 'feedPreviewRender':
[2404] Fix | Delete
setTimeout(function(){
[2405] Fix | Delete
}, 150);
[2406] Fix | Delete
break;
[2407] Fix | Delete
}
[2408] Fix | Delete
},
[2409] Fix | Delete
[2410] Fix | Delete
[2411] Fix | Delete
/**
[2412] Fix | Delete
* Ajax Action : Save Feed Settings
[2413] Fix | Delete
*
[2414] Fix | Delete
* @since 2.0
[2415] Fix | Delete
*/
[2416] Fix | Delete
saveFeedSettings : function(){
[2417] Fix | Delete
var self = this,
[2418] Fix | Delete
sources = [],
[2419] Fix | Delete
updateFeedData = {
[2420] Fix | Delete
action : 'ctf_feed_saver_manager_builder_update',
[2421] Fix | Delete
update_feed : 'true',
[2422] Fix | Delete
feed_id : self.customizerFeedData.feed_info.id,
[2423] Fix | Delete
feed_name : self.customizerFeedData.feed_info.feed_name,
[2424] Fix | Delete
settings : self.customizerFeedData.settings,
[2425] Fix | Delete
selectedFeed : self.selectedFeed,
[2426] Fix | Delete
selectedFeedModel : self.selectedFeedModel,
[2427] Fix | Delete
type : self.getFeedTypeSaver(),
[2428] Fix | Delete
[2429] Fix | Delete
};
[2430] Fix | Delete
self.loadingBar = true;
[2431] Fix | Delete
self.ajaxPost(updateFeedData, function(_ref){
[2432] Fix | Delete
var data = _ref.data;
[2433] Fix | Delete
if(data && data.success === true){
[2434] Fix | Delete
self.processNotification('feedSaved');
[2435] Fix | Delete
self.customizerFeedDataInitial = self.customizerFeedData;
[2436] Fix | Delete
}else{
[2437] Fix | Delete
self.processNotification('feedSavedError');
[2438] Fix | Delete
}
[2439] Fix | Delete
});
[2440] Fix | Delete
ctfBuilder.$forceUpdate();
[2441] Fix | Delete
},
[2442] Fix | Delete
[2443] Fix | Delete
/**
[2444] Fix | Delete
* Ajax Action : Clear Single Feed Cache
[2445] Fix | Delete
* Update Feed Preview Too
[2446] Fix | Delete
* @since 2.0
[2447] Fix | Delete
*/
[2448] Fix | Delete
clearSingleFeedCache : function(){
[2449] Fix | Delete
var self = this,
[2450] Fix | Delete
sources = [],
[2451] Fix | Delete
clearFeedData = {
[2452] Fix | Delete
action : 'ctf_feed_saver_manager_clear_single_feed_cache',
[2453] Fix | Delete
feedID : self.customizerFeedData.feed_info.id,
[2454] Fix | Delete
previewSettings : self.customizerFeedData.settings,
[2455] Fix | Delete
};
[2456] Fix | Delete
self.loadingBar = true;
[2457] Fix | Delete
self.ajaxPost(clearFeedData, function(_ref){
[2458] Fix | Delete
var data = _ref.data;
[2459] Fix | Delete
if( data !== false ){
[2460] Fix | Delete
[2461] Fix | Delete
self.processNotification('cacheCleared');
[2462] Fix | Delete
}else{
[2463] Fix | Delete
self.processNotification("unkownError");
[2464] Fix | Delete
}
[2465] Fix | Delete
})
[2466] Fix | Delete
ctfBuilder.$forceUpdate();
[2467] Fix | Delete
},
[2468] Fix | Delete
[2469] Fix | Delete
/**
[2470] Fix | Delete
* Clear & Reset Color Override
[2471] Fix | Delete
*
[2472] Fix | Delete
* @since 2.0
[2473] Fix | Delete
*/
[2474] Fix | Delete
resetColorOverride : function(settingID){
[2475] Fix | Delete
this.customizerFeedData.settings[settingID] = '';
[2476] Fix | Delete
},
[2477] Fix | Delete
[2478] Fix | Delete
/**
[2479] Fix | Delete
* Remove Source Form List Multifeed
[2480] Fix | Delete
*
[2481] Fix | Delete
* @since 2.0
[2482] Fix | Delete
*/
[2483] Fix | Delete
removeSourceCustomizer : function(type, args = []){
[2484] Fix | Delete
var self = this;
[2485] Fix | Delete
Object.assign(self.customizerScreens.sourcesChoosed,self.customizerFeedData.settings.sources);
[2486] Fix | Delete
self.selectSourceCustomizer(args, true);
[2487] Fix | Delete
ctfBuilder.$forceUpdate();
[2488] Fix | Delete
window.event.stopPropagation();
[2489] Fix | Delete
},
[2490] Fix | Delete
[2491] Fix | Delete
/**
[2492] Fix | Delete
* Custom Flied CLick
[2493] Fix | Delete
* Action
[2494] Fix | Delete
* @since 2.0
[2495] Fix | Delete
*/
[2496] Fix | Delete
fieldCustomClickAction : function( clickAction ){
[2497] Fix | Delete
var self = this;
[2498] Fix | Delete
switch (clickAction) {
[2499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function