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/assets/js
File: settings.js
[500] Fix | Delete
// if the api license status has changed from old stored license status
[501] Fix | Delete
// then reload the page to show proper error message and notices
[502] Fix | Delete
// or hide error messages and notices
[503] Fix | Delete
if ( data.data.licenseChanged == true ) {
[504] Fix | Delete
location.reload();
[505] Fix | Delete
}
[506] Fix | Delete
[507] Fix | Delete
setTimeout(function() {
[508] Fix | Delete
this.pressedBtnName = null;
[509] Fix | Delete
this.recheckLicenseStatus = null;
[510] Fix | Delete
}.bind(this), 3000);
[511] Fix | Delete
}
[512] Fix | Delete
return;
[513] Fix | Delete
});
[514] Fix | Delete
},
[515] Fix | Delete
recheckLicenseIcon: function() {
[516] Fix | Delete
if ( this.recheckLicenseStatus == null ) {
[517] Fix | Delete
return this.generalTab.licenseBox.recheckLicense;
[518] Fix | Delete
} else if ( this.recheckLicenseStatus == 'loading' ) {
[519] Fix | Delete
return this.loaderSVG;
[520] Fix | Delete
} else if ( this.recheckLicenseStatus == 'success' ) {
[521] Fix | Delete
return '<i class="fa fa-check-circle"></i> ' + this.generalTab.licenseBox.licenseValid;
[522] Fix | Delete
} else if ( this.recheckLicenseStatus == 'error' ) {
[523] Fix | Delete
return '<i class="fa fa-times-circle"></i> ' + this.generalTab.licenseBox.licenseExpired;
[524] Fix | Delete
}
[525] Fix | Delete
},
[526] Fix | Delete
recheckBtnText: function( btnName ) {
[527] Fix | Delete
if ( this.recheckLicenseStatus == null || this.pressedBtnName != btnName ) {
[528] Fix | Delete
return this.generalTab.licenseBox.recheckLicense;
[529] Fix | Delete
} else if ( this.recheckLicenseStatus == 'loading' && this.pressedBtnName == btnName ) {
[530] Fix | Delete
return this.loaderSVG;
[531] Fix | Delete
} else if ( this.recheckLicenseStatus == 'success' ) {
[532] Fix | Delete
return '<i class="fa fa-check-circle"></i> ' + this.generalTab.licenseBox.licenseValid;
[533] Fix | Delete
} else if ( this.recheckLicenseStatus == 'error' ) {
[534] Fix | Delete
return '<i class="fa fa-times-circle"></i> ' + this.generalTab.licenseBox.licenseExpired;
[535] Fix | Delete
}
[536] Fix | Delete
},
[537] Fix | Delete
testConnectionIcon: function() {
[538] Fix | Delete
if ( this.testConnectionStatus == 'loading' ) {
[539] Fix | Delete
return this.loaderSVG;
[540] Fix | Delete
} else if ( this.testConnectionStatus == 'success' ) {
[541] Fix | Delete
return '<i class="fa fa-check-circle"></i> ' + this.generalTab.licenseBox.connectionSuccessful;
[542] Fix | Delete
} else if ( this.testConnectionStatus == 'error' ) {
[543] Fix | Delete
return `<i class="fa fa-times-circle"></i> ${this.generalTab.licenseBox.connectionFailed} <a href="#">${this.generalTab.licenseBox.viewError}</a>`;
[544] Fix | Delete
}
[545] Fix | Delete
},
[546] Fix | Delete
importFile: function() {
[547] Fix | Delete
document.getElementById("import_file").click();
[548] Fix | Delete
},
[549] Fix | Delete
uploadFile: function( event ) {
[550] Fix | Delete
this.uploadStatus = 'loading';
[551] Fix | Delete
let file = this.$refs.file.files[0];
[552] Fix | Delete
let data = new FormData();
[553] Fix | Delete
data.append( 'action', 'ctf_import_settings_json' );
[554] Fix | Delete
data.append( 'file', file );
[555] Fix | Delete
data.append( 'nonce', this.nonce );
[556] Fix | Delete
fetch(this.ajaxHandler, {
[557] Fix | Delete
method: "POST",
[558] Fix | Delete
credentials: 'same-origin',
[559] Fix | Delete
body: data
[560] Fix | Delete
})
[561] Fix | Delete
.then(response => response.json())
[562] Fix | Delete
.then(data => {
[563] Fix | Delete
this.uploadStatus = null;
[564] Fix | Delete
this.$refs.file.files[0] = null;
[565] Fix | Delete
if ( data.success == false ) {
[566] Fix | Delete
this.notificationElement = {
[567] Fix | Delete
type : 'error',
[568] Fix | Delete
text : this.genericText.failedToImportFeed,
[569] Fix | Delete
shown : "shown"
[570] Fix | Delete
};
[571] Fix | Delete
}
[572] Fix | Delete
if ( data.success == true ) {
[573] Fix | Delete
this.feeds = data.data.feeds;
[574] Fix | Delete
this.notificationElement = {
[575] Fix | Delete
type : 'success',
[576] Fix | Delete
text : this.genericText.feedImported,
[577] Fix | Delete
shown : "shown"
[578] Fix | Delete
};
[579] Fix | Delete
}
[580] Fix | Delete
setTimeout(function(){
[581] Fix | Delete
this.notificationElement.shown = "hidden";
[582] Fix | Delete
}.bind(this), 3000);
[583] Fix | Delete
});
[584] Fix | Delete
},
[585] Fix | Delete
exportFeedSettings: function() {
[586] Fix | Delete
// return if no feed is selected
[587] Fix | Delete
if ( this.exportFeed === 'none' ) {
[588] Fix | Delete
return;
[589] Fix | Delete
}
[590] Fix | Delete
[591] Fix | Delete
let url = this.ajaxHandler + '?action=ctf_export_settings_json&feed_id=' + this.exportFeed;
[592] Fix | Delete
window.location = url;
[593] Fix | Delete
},
[594] Fix | Delete
saveSettings: function() {
[595] Fix | Delete
this.btnStatus = 'loading';
[596] Fix | Delete
this.pressedBtnName = 'saveChanges';
[597] Fix | Delete
let data = new FormData();
[598] Fix | Delete
data.append( 'action', 'ctf_save_settings' );
[599] Fix | Delete
data.append( 'model', JSON.stringify( this.model ) );
[600] Fix | Delete
data.append( 'ctf_license_key', this.licenseKey );
[601] Fix | Delete
data.append( 'extensions_license_key', JSON.stringify( this.extensionsLicenseKey ) );
[602] Fix | Delete
data.append( 'nonce', this.nonce );
[603] Fix | Delete
fetch(this.ajaxHandler, {
[604] Fix | Delete
method: "POST",
[605] Fix | Delete
credentials: 'same-origin',
[606] Fix | Delete
body: data
[607] Fix | Delete
})
[608] Fix | Delete
.then(response => response.json())
[609] Fix | Delete
.then(data => {
[610] Fix | Delete
if ( data.success == false ) {
[611] Fix | Delete
this.btnStatus = 'error';
[612] Fix | Delete
return;
[613] Fix | Delete
}
[614] Fix | Delete
[615] Fix | Delete
this.cronNextCheck = data.data.cronNextCheck;
[616] Fix | Delete
this.btnStatus = 'success';
[617] Fix | Delete
setTimeout(function() {
[618] Fix | Delete
this.btnStatus = null;
[619] Fix | Delete
this.pressedBtnName = null;
[620] Fix | Delete
}.bind(this), 3000);
[621] Fix | Delete
});
[622] Fix | Delete
},
[623] Fix | Delete
clearCache: function() {
[624] Fix | Delete
this.clearCacheStatus = 'loading';
[625] Fix | Delete
let data = new FormData();
[626] Fix | Delete
data.append( 'action', 'ctf_clear_cache_settings' );
[627] Fix | Delete
data.append( 'model', JSON.stringify( this.model ) );
[628] Fix | Delete
data.append( 'nonce', this.nonce );
[629] Fix | Delete
fetch(this.ajaxHandler, {
[630] Fix | Delete
method: "POST",
[631] Fix | Delete
credentials: 'same-origin',
[632] Fix | Delete
body: data
[633] Fix | Delete
})
[634] Fix | Delete
.then(response => response.json())
[635] Fix | Delete
.then(data => {
[636] Fix | Delete
if ( data.success == false ) {
[637] Fix | Delete
this.clearCacheStatus = 'error';
[638] Fix | Delete
return;
[639] Fix | Delete
}
[640] Fix | Delete
this.cronNextCheck = data.data.cronNextCheck;
[641] Fix | Delete
this.clearCacheStatus = 'success';
[642] Fix | Delete
setTimeout(function() {
[643] Fix | Delete
this.clearCacheStatus = null;
[644] Fix | Delete
}.bind(this), 3000);
[645] Fix | Delete
});
[646] Fix | Delete
},
[647] Fix | Delete
showTooltip: function( tooltipName ) {
[648] Fix | Delete
this.tooltipName = tooltipName;
[649] Fix | Delete
},
[650] Fix | Delete
hideTooltip: function() {
[651] Fix | Delete
this.tooltipName = null;
[652] Fix | Delete
},
[653] Fix | Delete
gdprOptions: function() {
[654] Fix | Delete
this.gdprInfoTooltip = null;
[655] Fix | Delete
},
[656] Fix | Delete
gdprLimited: function() {
[657] Fix | Delete
this.gdprInfoTooltip = this.gdprInfoTooltip == null ? true : null;
[658] Fix | Delete
},
[659] Fix | Delete
clearImageResizeCache: function() {
[660] Fix | Delete
this.optimizeCacheStatus = 'loading';
[661] Fix | Delete
let data = new FormData();
[662] Fix | Delete
data.append( 'action', 'ctf_clear_image_resize_cache' );
[663] Fix | Delete
data.append( 'nonce', this.nonce );
[664] Fix | Delete
fetch(this.ajaxHandler, {
[665] Fix | Delete
method: "POST",
[666] Fix | Delete
credentials: 'same-origin',
[667] Fix | Delete
body: data
[668] Fix | Delete
})
[669] Fix | Delete
.then(response => response.json())
[670] Fix | Delete
.then(data => {
[671] Fix | Delete
if ( data.success == false ) {
[672] Fix | Delete
this.optimizeCacheStatus = 'error';
[673] Fix | Delete
return;
[674] Fix | Delete
}
[675] Fix | Delete
this.optimizeCacheStatus = 'success';
[676] Fix | Delete
setTimeout(function() {
[677] Fix | Delete
this.optimizeCacheStatus = null;
[678] Fix | Delete
}.bind(this), 3000);
[679] Fix | Delete
});
[680] Fix | Delete
},
[681] Fix | Delete
clearPersistentCache: function() {
[682] Fix | Delete
this.persistentCacheStatus = 'loading';
[683] Fix | Delete
let data = new FormData();
[684] Fix | Delete
data.append( 'action', 'ctf_clear_persistent_cache' );
[685] Fix | Delete
data.append( 'nonce', this.nonce );
[686] Fix | Delete
fetch(this.ajaxHandler, {
[687] Fix | Delete
method: "POST",
[688] Fix | Delete
credentials: 'same-origin',
[689] Fix | Delete
body: data
[690] Fix | Delete
})
[691] Fix | Delete
.then(response => response.json())
[692] Fix | Delete
.then(data => {
[693] Fix | Delete
if ( data.success == false ) {
[694] Fix | Delete
this.persistentCacheStatus = 'error';
[695] Fix | Delete
return;
[696] Fix | Delete
}
[697] Fix | Delete
this.persistentCacheStatus = 'success';
[698] Fix | Delete
setTimeout(function() {
[699] Fix | Delete
this.persistentCacheStatus = null;
[700] Fix | Delete
}.bind(this), 3000);
[701] Fix | Delete
});
[702] Fix | Delete
},
[703] Fix | Delete
clearTwittercardCache: function() {
[704] Fix | Delete
this.twittercardCacheStatus = 'loading';
[705] Fix | Delete
let data = new FormData();
[706] Fix | Delete
data.append( 'action', 'ctf_clear_twittercard_cache' );
[707] Fix | Delete
data.append( 'nonce', this.nonce );
[708] Fix | Delete
fetch(this.ajaxHandler, {
[709] Fix | Delete
method: "POST",
[710] Fix | Delete
credentials: 'same-origin',
[711] Fix | Delete
body: data
[712] Fix | Delete
})
[713] Fix | Delete
.then(response => response.json())
[714] Fix | Delete
.then(data => {
[715] Fix | Delete
if ( data.success == false ) {
[716] Fix | Delete
this.twittercardCacheStatus = 'error';
[717] Fix | Delete
return;
[718] Fix | Delete
}
[719] Fix | Delete
this.twittercardCacheStatus = 'success';
[720] Fix | Delete
setTimeout(function() {
[721] Fix | Delete
this.twittercardCacheStatus = null;
[722] Fix | Delete
}.bind(this), 3000);
[723] Fix | Delete
});
[724] Fix | Delete
},
[725] Fix | Delete
dpaReset: function() {
[726] Fix | Delete
this.dpaResetStatus = 'loading';
[727] Fix | Delete
let data = new FormData();
[728] Fix | Delete
data.append( 'action', 'ctf_dpa_reset' );
[729] Fix | Delete
data.append( 'nonce', this.nonce );
[730] Fix | Delete
fetch(this.ajaxHandler, {
[731] Fix | Delete
method: "POST",
[732] Fix | Delete
credentials: 'same-origin',
[733] Fix | Delete
body: data
[734] Fix | Delete
})
[735] Fix | Delete
.then(response => response.json())
[736] Fix | Delete
.then(data => {
[737] Fix | Delete
if ( data.success == false ) {
[738] Fix | Delete
this.dpaResetStatus = 'error';
[739] Fix | Delete
return;
[740] Fix | Delete
}
[741] Fix | Delete
this.dpaResetStatus = 'success';
[742] Fix | Delete
setTimeout(function() {
[743] Fix | Delete
this.dpaResetStatus = null;
[744] Fix | Delete
}.bind(this), 3000);
[745] Fix | Delete
});
[746] Fix | Delete
},
[747] Fix | Delete
saveChangesIcon: function() {
[748] Fix | Delete
if ( this.btnStatus == 'loading' ) {
[749] Fix | Delete
return this.loaderSVG;
[750] Fix | Delete
} else if ( this.btnStatus == 'success' ) {
[751] Fix | Delete
return this.checkmarkSVG;
[752] Fix | Delete
} else if ( this.btnStatus == 'error' ) {
[753] Fix | Delete
return `<i class="fa fa-times-circle"></i>`;
[754] Fix | Delete
}
[755] Fix | Delete
},
[756] Fix | Delete
importBtnIcon: function() {
[757] Fix | Delete
if ( this.uploadStatus === null ) {
[758] Fix | Delete
return this.uploadSVG;
[759] Fix | Delete
}
[760] Fix | Delete
if ( this.uploadStatus == 'loading' ) {
[761] Fix | Delete
return this.loaderSVG;
[762] Fix | Delete
} else if ( this.uploadStatus == 'success' ) {
[763] Fix | Delete
return this.checkmarkSVG;
[764] Fix | Delete
} else if ( this.uploadStatus == 'error' ) {
[765] Fix | Delete
return `<i class="fa fa-times-circle"></i>`;
[766] Fix | Delete
}
[767] Fix | Delete
},
[768] Fix | Delete
clearCacheIcon: function() {
[769] Fix | Delete
if ( this.clearCacheStatus === null ) {
[770] Fix | Delete
return this.reloadSVG;
[771] Fix | Delete
}
[772] Fix | Delete
if ( this.clearCacheStatus == 'loading' ) {
[773] Fix | Delete
return this.loaderSVG;
[774] Fix | Delete
} else if ( this.clearCacheStatus == 'success' ) {
[775] Fix | Delete
return this.checkmarkSVG;
[776] Fix | Delete
} else if ( this.clearCacheStatus == 'error' ) {
[777] Fix | Delete
return `<i class="fa fa-times-circle"></i>`;
[778] Fix | Delete
}
[779] Fix | Delete
},
[780] Fix | Delete
clearImageResizeCacheIcon: function() {
[781] Fix | Delete
if ( this.optimizeCacheStatus === null ) {
[782] Fix | Delete
return;
[783] Fix | Delete
}
[784] Fix | Delete
if ( this.optimizeCacheStatus == 'loading' ) {
[785] Fix | Delete
return this.loaderSVG;
[786] Fix | Delete
} else if ( this.optimizeCacheStatus == 'success' ) {
[787] Fix | Delete
return this.checkmarkSVG;
[788] Fix | Delete
} else if ( this.optimizeCacheStatus == 'error' ) {
[789] Fix | Delete
return `<i class="fa fa-times-circle"></i>`;
[790] Fix | Delete
}
[791] Fix | Delete
},
[792] Fix | Delete
clearPersistentCacheIcon: function() {
[793] Fix | Delete
if ( this.persistentCacheStatus === null ) {
[794] Fix | Delete
return;
[795] Fix | Delete
}
[796] Fix | Delete
if ( this.persistentCacheStatus == 'loading' ) {
[797] Fix | Delete
return this.loaderSVG;
[798] Fix | Delete
} else if ( this.persistentCacheStatus == 'success' ) {
[799] Fix | Delete
return this.checkmarkSVG;
[800] Fix | Delete
} else if ( this.persistentCacheStatus == 'error' ) {
[801] Fix | Delete
return `<i class="fa fa-times-circle"></i>`;
[802] Fix | Delete
}
[803] Fix | Delete
},
[804] Fix | Delete
clearTwittercardCacheIcon: function() {
[805] Fix | Delete
if ( this.twittercardCacheStatus === null ) {
[806] Fix | Delete
return;
[807] Fix | Delete
}
[808] Fix | Delete
if ( this.twittercardCacheStatus == 'loading' ) {
[809] Fix | Delete
return this.loaderSVG;
[810] Fix | Delete
} else if ( this.twittercardCacheStatus == 'success' ) {
[811] Fix | Delete
return this.checkmarkSVG;
[812] Fix | Delete
} else if ( this.twittercardCacheStatus == 'error' ) {
[813] Fix | Delete
return `<i class="fa fa-times-circle"></i>`;
[814] Fix | Delete
}
[815] Fix | Delete
},
[816] Fix | Delete
[817] Fix | Delete
dpaResetStatusIcon: function() {
[818] Fix | Delete
if ( this.dpaResetStatus === null ) {
[819] Fix | Delete
return;
[820] Fix | Delete
}
[821] Fix | Delete
if ( this.dpaResetStatus == 'loading' ) {
[822] Fix | Delete
return this.loaderSVG;
[823] Fix | Delete
} else if ( this.dpaResetStatus == 'success' ) {
[824] Fix | Delete
return this.checkmarkSVG;
[825] Fix | Delete
} else if ( this.dpaResetStatus == 'error' ) {
[826] Fix | Delete
return `<i class="fa fa-times-circle"></i>`;
[827] Fix | Delete
}
[828] Fix | Delete
},
[829] Fix | Delete
[830] Fix | Delete
/**
[831] Fix | Delete
* Toggle Sticky Widget view
[832] Fix | Delete
*
[833] Fix | Delete
* @since 2.0
[834] Fix | Delete
*/
[835] Fix | Delete
toggleStickyWidget: function() {
[836] Fix | Delete
this.stickyWidget = !this.stickyWidget;
[837] Fix | Delete
},
[838] Fix | Delete
[839] Fix | Delete
printUsedInText: function( usedInNumber ){
[840] Fix | Delete
if(usedInNumber == 0){
[841] Fix | Delete
return this.genericText.sourceNotUsedYet;
[842] Fix | Delete
}
[843] Fix | Delete
return this.genericText.usedIn + ' ' + usedInNumber + ' ' +(usedInNumber == 1 ? this.genericText.feed : this.genericText.feeds);
[844] Fix | Delete
},
[845] Fix | Delete
[846] Fix | Delete
/**
[847] Fix | Delete
* Delete Source Ajax
[848] Fix | Delete
*
[849] Fix | Delete
* @since 2.0
[850] Fix | Delete
*/
[851] Fix | Delete
deleteSource : function(sourceToDelete){
[852] Fix | Delete
var self = this;
[853] Fix | Delete
let data = new FormData();
[854] Fix | Delete
data.append( 'action', 'ctf_feed_saver_manager_delete_source' );
[855] Fix | Delete
data.append( 'source_id', sourceToDelete.id);
[856] Fix | Delete
data.append( 'nonce', this.nonce );
[857] Fix | Delete
fetch(self.ajaxHandler, {
[858] Fix | Delete
method: "POST",
[859] Fix | Delete
credentials: 'same-origin',
[860] Fix | Delete
body: data
[861] Fix | Delete
})
[862] Fix | Delete
.then(response => response.json())
[863] Fix | Delete
.then(data => {
[864] Fix | Delete
if (sourceToDelete.just_added) {
[865] Fix | Delete
window.location.href = window.location.href.replace('ctf_access_token','ctf_null');
[866] Fix | Delete
}
[867] Fix | Delete
self.sourcesList = data;
[868] Fix | Delete
});
[869] Fix | Delete
},
[870] Fix | Delete
[871] Fix | Delete
/**
[872] Fix | Delete
* Check if Value is Empty
[873] Fix | Delete
*
[874] Fix | Delete
* @since 2.0
[875] Fix | Delete
*
[876] Fix | Delete
* @return boolean
[877] Fix | Delete
*/
[878] Fix | Delete
checkNotEmpty : function(value){
[879] Fix | Delete
return value != null && value.replace(/ /gi,'') != '';
[880] Fix | Delete
},
[881] Fix | Delete
[882] Fix | Delete
/**
[883] Fix | Delete
* Activate View
[884] Fix | Delete
*
[885] Fix | Delete
* @since 2.0
[886] Fix | Delete
*/
[887] Fix | Delete
activateView : function(viewName, sourcePopupType = 'creation', ajaxAction = false){
[888] Fix | Delete
var self = this;
[889] Fix | Delete
self.viewsActive[viewName] = (self.viewsActive[viewName] == false ) ? true : false;
[890] Fix | Delete
if(viewName == 'sourcePopup' && sourcePopupType == 'creationRedirect'){
[891] Fix | Delete
setTimeout(function(){
[892] Fix | Delete
self.$refs.addSourceRef.processIFConnect()
[893] Fix | Delete
},3500);
[894] Fix | Delete
}
[895] Fix | Delete
[896] Fix | Delete
},
[897] Fix | Delete
[898] Fix | Delete
/**
[899] Fix | Delete
* Switch & Change Feed Screens
[900] Fix | Delete
*
[901] Fix | Delete
* @since 2.0
[902] Fix | Delete
*/
[903] Fix | Delete
switchScreen: function(screenType, screenName){
[904] Fix | Delete
this.viewsActive[screenType] = screenName;
[905] Fix | Delete
},
[906] Fix | Delete
[907] Fix | Delete
/**
[908] Fix | Delete
* Parse JSON
[909] Fix | Delete
*
[910] Fix | Delete
* @since 2.0
[911] Fix | Delete
*
[912] Fix | Delete
* @return jsonObject / Boolean
[913] Fix | Delete
*/
[914] Fix | Delete
jsonParse : function(jsonString){
[915] Fix | Delete
try {
[916] Fix | Delete
return JSON.parse(jsonString);
[917] Fix | Delete
} catch(e) {
[918] Fix | Delete
return false;
[919] Fix | Delete
}
[920] Fix | Delete
},
[921] Fix | Delete
[922] Fix | Delete
[923] Fix | Delete
/**
[924] Fix | Delete
* Ajax Post Action
[925] Fix | Delete
*
[926] Fix | Delete
* @since 2.0
[927] Fix | Delete
*/
[928] Fix | Delete
ajaxPost : function(data, callback){
[929] Fix | Delete
var self = this;
[930] Fix | Delete
self.$http.post(self.ajaxHandler,data).then(callback);
[931] Fix | Delete
},
[932] Fix | Delete
[933] Fix | Delete
/**
[934] Fix | Delete
* Check if Object has Nested Property
[935] Fix | Delete
*
[936] Fix | Delete
* @since 2.0
[937] Fix | Delete
*
[938] Fix | Delete
* @return boolean
[939] Fix | Delete
*/
[940] Fix | Delete
hasOwnNestedProperty : function(obj,propertyPath) {
[941] Fix | Delete
if (!propertyPath){return false;}var properties = propertyPath.split('.');
[942] Fix | Delete
for (var i = 0; i < properties.length; i++) {
[943] Fix | Delete
var prop = properties[i];
[944] Fix | Delete
if (!obj || !obj.hasOwnProperty(prop)) {
[945] Fix | Delete
return false;
[946] Fix | Delete
} else {
[947] Fix | Delete
obj = obj[prop];
[948] Fix | Delete
}
[949] Fix | Delete
}
[950] Fix | Delete
return true;
[951] Fix | Delete
},
[952] Fix | Delete
[953] Fix | Delete
/**
[954] Fix | Delete
* Show Tooltip on Hover
[955] Fix | Delete
*
[956] Fix | Delete
* @since 2.0
[957] Fix | Delete
*/
[958] Fix | Delete
toggleElementTooltip : function(tooltipText, type, align = 'center'){
[959] Fix | Delete
var self = this,
[960] Fix | Delete
target = window.event.currentTarget,
[961] Fix | Delete
tooltip = (target != undefined && target != null) ? document.querySelector('.sb-control-elem-tltp-content') : null;
[962] Fix | Delete
if(tooltip != null && type == 'show'){
[963] Fix | Delete
self.tooltip.text = tooltipText;
[964] Fix | Delete
var position = target.getBoundingClientRect(),
[965] Fix | Delete
left = position.left + 10,
[966] Fix | Delete
top = position.top - 10;
[967] Fix | Delete
tooltip.style.left = left + 'px';
[968] Fix | Delete
tooltip.style.top = top + 'px';
[969] Fix | Delete
tooltip.style.textAlign = align;
[970] Fix | Delete
self.tooltip.hover = true;
[971] Fix | Delete
}
[972] Fix | Delete
if(type == 'hide'){
[973] Fix | Delete
self.tooltip.hover = false;
[974] Fix | Delete
}
[975] Fix | Delete
},
[976] Fix | Delete
[977] Fix | Delete
/**
[978] Fix | Delete
* Hover Tooltip
[979] Fix | Delete
*
[980] Fix | Delete
* @since 2.0
[981] Fix | Delete
*/
[982] Fix | Delete
hoverTooltip : function(type){
[983] Fix | Delete
this.tooltip.hover = type;
[984] Fix | Delete
},
[985] Fix | Delete
[986] Fix | Delete
/**
[987] Fix | Delete
* Open Dialog Box
[988] Fix | Delete
*
[989] Fix | Delete
* @since 2.0
[990] Fix | Delete
*/
[991] Fix | Delete
openDialogBox : function(type, args = []){
[992] Fix | Delete
var self = this,
[993] Fix | Delete
heading = self.dialogBoxPopupScreen[type].heading,
[994] Fix | Delete
description = self.dialogBoxPopupScreen[type].description,
[995] Fix | Delete
customButtons = self.dialogBoxPopupScreen[type].customButtons;
[996] Fix | Delete
[997] Fix | Delete
[998] Fix | Delete
switch (type) {
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function