D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ltfsolutionsco
/
www
/
wp-content
/
plugins
/
wp-fastest-cache
/
js
/
Filename :
schedule.js
back
Copy
var WpfcSchedule = { id: "#wpfc-server-time", serverTime : "", //milliseconds dropdowns: "#wpFastestCacheTimeOutHour, #wpFastestCacheTimeOutMinute, #wpFastestCacheTimeOut", init: function(){ if(jQuery("form[id='wpfc-schedule-panel']").length){ this.setServerTime(); this.clock(); this.setDropdownEvent(); this.setDeleteCronEvent(); jQuery("#wpfc-schedule-panel input[type='submit']").bind("click", this, this.submitButtonEvent); } }, setDeleteCronEvent: function(){ jQuery("#deleteCron").click(function(){ jQuery("#wpFastestCacheTimeOut").val(""); jQuery("form#wpfc-schedule-panel").submit(); }); }, setDropdownEvent: function(){ jQuery(this.dropdowns).change(function(e){ var e = jQuery(e.currentTarget); if(e.attr("value")){ e.css("background-color", ""); } /* if(e.attr("id") == "wpFastestCacheTimeOut"){ if(e.val() == "hourly"){ jQuery("#wpFastestCacheTimeOutHour, #wpFastestCacheTimeOutMinute").prop('disabled', true); }else{ jQuery("#wpFastestCacheTimeOutHour, #wpFastestCacheTimeOutMinute").prop('disabled', false); } }*/ }); }, setServerTime: function(){ this.serverTime = new Date(jQuery(this.id).text()).getTime(); }, clock: function(){ var self = this; var newDate; setInterval(function(){ newDate = new Date(self.serverTime); jQuery(self.id).text(newDate.getFullYear() + "-" + (newDate.getMonth() + 1) + "-" + newDate.getDate() + " " + newDate.getHours() + ":" + newDate.getMinutes() + ":" + newDate.getSeconds()); self.serverTime = self.serverTime + 1000; }, 1000); }, submitButtonEvent: function(self){ var error_count = 0; jQuery(self.data.dropdowns).each(function(i, e){ if(jQuery(e).attr("value")){ jQuery(e).css("background-color", ""); }else{ error_count++; jQuery(e).css("background-color", "red"); } }); return error_count > 0 ? false : true; } }; WpfcSchedule.init();
Name
Size
Last Modified
Owner
Permissions
Actions
cdn
Dir
February 03 2024 2:10:15
ltfsolutionsco
0755
button.js
2.142
KB
February 03 2024 2:10:15
ltfsolutionsco
0644
column.js
1.378
KB
February 03 2024 2:10:15
ltfsolutionsco
0644
db.js
3.643
KB
February 03 2024 2:10:15
ltfsolutionsco
0644
dialog.js
1.091
KB
February 03 2024 2:10:15
ltfsolutionsco
0644
dialog_new.js
6.668
KB
February 03 2024 2:10:15
ltfsolutionsco
0644
index.html
0.018
KB
February 03 2024 2:10:15
ltfsolutionsco
0644
language.js
1.632
KB
February 03 2024 2:10:15
ltfsolutionsco
0644
schedule.js
1.885
KB
February 03 2024 2:10:15
ltfsolutionsco
0644
toolbar.js
3.432
KB
February 03 2024 2:10:15
ltfsolutionsco
0644
2017 © D7net | D704T team