META-INF.resources.xxl-job-admin.static.plugins.cronGen.cronGen_en.js Maven / Gradle / Ivy
The newest version!
(function ($) {
// var resultsName = "";
var inputElement;
var displayElement;
$.fn.extend({
cronGen: function (options) {
if (options == null) {
options = {};
}
options = $.extend({}, $.fn.cronGen.defaultOptions, options);
//create top menu
var cronContainer = $("", { id: "CronContainer", style: "display:none;width:300px;height:300px;" });
var mainDiv = $("", { id: "CronGenMainDiv", style: "width:410px;height:420px;" });
var topMenu = $("
", { "class": "nav nav-tabs", id: "CronGenTabs" });
$('', { 'class': 'active' }).html($('秒')).appendTo(topMenu);
$('').html($('Minute')).appendTo(topMenu);
$('').html($('Hour')).appendTo(topMenu);
$('').html($('Day')).appendTo(topMenu);
$('').html($('Month')).appendTo(topMenu);
$('').html($('Week')).appendTo(topMenu);
$('').html($('Year')).appendTo(topMenu);
$(topMenu).appendTo(mainDiv);
//create what's inside the tabs
var container = $("", { "class": "container-fluid", "style": "margin-top: 30px;margin-left: -14px;" });
var row = $("", { "class": "row-fluid" });
var span12 = $("", { "class": "span12" });
var tabContent = $("", { "class": "tab-content", "style": "border:0px; margin-top:-20px;" });
//creating the secondsTab
var secondsTab = $("", { "class": "tab-pane active", id: "Secondly" });
var seconds1 = $("",{"class":"line"});
$("",{type : "radio", value : "1", name : "second"}).appendTo(seconds1);
$(seconds1).append("Per second, allowed wildcard[, - * /]");
$(seconds1).appendTo(secondsTab);
var seconds2 = $("",{"class":"line"});
$("",{type : "radio", value : "2", name : "second"}).appendTo(seconds2);
$(seconds2).append("Cycle, from");
$("",{type : "text", id : "secondStart_0", value : "1", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(seconds2);
$(seconds2).append("-");
$("",{type : "text", id : "secondEnd_0", value : "2", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(seconds2);
$(seconds2).append("second");
$(seconds2).appendTo(secondsTab);
var seconds3 = $("",{"class":"line"});
$("",{type : "radio", value : "3", name : "second"}).appendTo(seconds3);
$(seconds3).append("from");
$("",{type : "text", id : "secondStart_1", value : "0", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(seconds3);
$(seconds3).append("seconds start, per");
$("",{type : "text", id : "secondEnd_1", value : "1", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(seconds3);
$(seconds3).append("second execute once");
$(seconds3).appendTo(secondsTab);
var seconds4 = $("",{"class":"line"});
$("",{type : "radio", value : "4", name : "second", id: "sencond_appoint"}).appendTo(seconds4);
$(seconds4).append("specify");
$(seconds4).appendTo(secondsTab);
$(secondsTab).append('00010203040506070809');
$(secondsTab).append('10111213141516171819');
$(secondsTab).append('20212223242526272829');
$(secondsTab).append('30313233343536373839');
$(secondsTab).append('40414243444546474849');
$(secondsTab).append('50515253545556575859');
$("",{type : "hidden", id : "secondHidden"}).appendTo(secondsTab);
$(secondsTab).appendTo(tabContent);
//creating the minutesTab
var minutesTab = $("", { "class": "tab-pane", id: "Minutes" });
var minutes1 = $("",{"class":"line"});
$("",{type : "radio", value : "1", name : "min"}).appendTo(minutes1);
$(minutes1).append("Per minute, allowed wildcard[, - * /]");
$(minutes1).appendTo(minutesTab);
var minutes2 = $("",{"class":"line"});
$("",{type : "radio", value : "2", name : "min"}).appendTo(minutes2);
$(minutes2).append("Cycle, from");
$("",{type : "text", id : "minStart_0", value : "1", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(minutes2);
$(minutes2).append("-");
$("",{type : "text", id : "minEnd_0", value : "2", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(minutes2);
$(minutes2).append("minute");
$(minutes2).appendTo(minutesTab);
var minutes3 = $("",{"class":"line"});
$("",{type : "radio", value : "3", name : "min"}).appendTo(minutes3);
$(minutes3).append("from");
$("",{type : "text", id : "minStart_1", value : "0", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(minutes3);
$(minutes3).append("seconds start, per");
$("",{type : "text", id : "minEnd_1", value : "1", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(minutes3);
$(minutes3).append("second execute once");
$(minutes3).appendTo(minutesTab);
var minutes4 = $("",{"class":"line"});
$("",{type : "radio", value : "4", name : "min", id: "min_appoint"}).appendTo(minutes4);
$(minutes4).append("specify");
$(minutes4).appendTo(minutesTab);
$(minutesTab).append('00010203040506070809');
$(minutesTab).append('10111213141516171819');
$(minutesTab).append('20212223242526272829');
$(minutesTab).append('30313233343536373839');
$(minutesTab).append('40414243444546474849');
$(minutesTab).append('50515253545556575859');
$("",{type : "hidden", id : "minHidden"}).appendTo(minutesTab);
$(minutesTab).appendTo(tabContent);
//creating the hourlyTab
var hourlyTab = $("", { "class": "tab-pane", id: "Hourly" });
var hourly1 = $("",{"class":"line"});
$("",{type : "radio", value : "1", name : "hour"}).appendTo(hourly1);
$(hourly1).append("Per hour, allowed wildcard[, - * /]");
$(hourly1).appendTo(hourlyTab);
var hourly2 = $("",{"class":"line"});
$("",{type : "radio", value : "2", name : "hour"}).appendTo(hourly2);
$(hourly2).append("Cycle, from");
$("",{type : "text", id : "hourStart_0", value : "1", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(hourly2);
$(hourly2).append("-");
$("",{type : "text", id : "hourEnd_0", value : "2", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(hourly2);
$(hourly2).append("hour");
$(hourly2).appendTo(hourlyTab);
var hourly3 = $("",{"class":"line"});
$("",{type : "radio", value : "3", name : "hour"}).appendTo(hourly3);
$(hourly3).append("from");
$("",{type : "text", id : "hourStart_1", value : "0", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(hourly3);
$(hourly3).append("hour start, per");
$("",{type : "text", id : "hourEnd_1", value : "1", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(hourly3);
$(hourly3).append("hour execute once");
$(hourly3).appendTo(hourlyTab);
var hourly4 = $("",{"class":"line"});
$("",{type : "radio", value : "4", name : "hour", id: "hour_appoint"}).appendTo(hourly4);
$(hourly4).append("specify");
$(hourly4).appendTo(hourlyTab);
$(hourlyTab).append('000102030405');
$(hourlyTab).append('060708091011');
$(hourlyTab).append('121314151617');
$(hourlyTab).append('181920212223');
$("",{type : "hidden", id : "hourHidden"}).appendTo(hourlyTab);
$(hourlyTab).appendTo(tabContent);
//creating the dailyTab
var dailyTab = $("", { "class": "tab-pane", id: "Daily" });
var daily1 = $("",{"class":"line"});
$("",{type : "radio", value : "1", name : "day"}).appendTo(daily1);
$(daily1).append("Per day, allowed wildcard[, - * / L W]");
$(daily1).appendTo(dailyTab);
var daily5 = $("",{"class":"line"});
$("",{type : "radio", value : "2", name : "day"}).appendTo(daily5);
$(daily5).append("not specify");
$(daily5).appendTo(dailyTab);
var daily2 = $("",{"class":"line"});
$("",{type : "radio", value : "3", name : "day"}).appendTo(daily2);
$(daily2).append("Cycle, from");
$("",{type : "text", id : "dayStart_0", value : "1", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(daily2);
$(daily2).append("-");
$("",{type : "text", id : "dayEnd_0", value : "2", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(daily2);
$(daily2).append("day");
$(daily2).appendTo(dailyTab);
var daily3 = $("",{"class":"line"});
$("",{type : "radio", value : "4", name : "day"}).appendTo(daily3);
$(daily3).append("from");
$("",{type : "text", id : "dayStart_1", value : "1", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(daily3);
$(daily3).append("day start, per");
$("",{type : "text", id : "dayEnd_1", value : "1", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(daily3);
$(daily3).append("day execute once");
$(daily3).appendTo(dailyTab);
var daily6 = $("",{"class":"line"});
$("",{type : "radio", value : "5", name : "day"}).appendTo(daily6);
$(daily6).append("The most recent working day on the 1");
$("",{type : "text", id : "dayStart_2", value : "1", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(daily6);
$(daily6).append(" of each month");
$(daily6).appendTo(dailyTab);
var daily7 = $("",{"class":"line"});
$("",{type : "radio", value : "6", name : "day"}).appendTo(daily7);
$(daily7).append("The last day of the month");
$(daily7).appendTo(dailyTab);
var daily4 = $("",{"class":"line"});
$("",{type : "radio", value : "7", name : "day", id: "day_appoint"}).appendTo(daily4);
$(daily4).append("specify");
$(daily4).appendTo(dailyTab);
$(dailyTab).append('01020304050607080910');
$(dailyTab).append('11121314151617181920');
$(dailyTab).append('21222324252627282930');
$(dailyTab).append('31');
$("",{type : "hidden", id : "dayHidden"}).appendTo(dailyTab);
$(dailyTab).appendTo(tabContent);
//creating the monthlyTab
var monthlyTab = $("", { "class": "tab-pane", id: "Monthly" });
var monthly1 = $("",{"class":"line"});
$("",{type : "radio", value : "1", name : "month"}).appendTo(monthly1);
$(monthly1).append("Per month, allowed wildcard[, - * /]");
$(monthly1).appendTo(monthlyTab);
var monthly2 = $("",{"class":"line"});
$("",{type : "radio", value : "2", name : "month"}).appendTo(monthly2);
$(monthly2).append("not specify");
$(monthly2).appendTo(monthlyTab);
var monthly3 = $("",{"class":"line"});
$("",{type : "radio", value : "3", name : "month"}).appendTo(monthly3);
$(monthly3).append("Cycle, from");
$("",{type : "text", id : "monthStart_0", value : "1", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(monthly3);
$(monthly3).append("-");
$("",{type : "text", id : "monthEnd_0", value : "2", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(monthly3);
$(monthly3).append("month");
$(monthly3).appendTo(monthlyTab);
var monthly4 = $("",{"class":"line"});
$("",{type : "radio", value : "4", name : "month"}).appendTo(monthly4);
$(monthly4).append("Starting from ");
$("",{type : "text", id : "monthStart_1", value : "1", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(monthly4);
$(monthly4).append("day, once every");
$("",{type : "text", id : "monthEnd_1", value : "1", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(monthly4);
$(monthly4).append("month");
$(monthly4).appendTo(monthlyTab);
var monthly5 = $("",{"class":"line"});
$("",{type : "radio", value : "5", name : "month", id: "month_appoint"}).appendTo(monthly5);
$(monthly5).append("specify");
$(monthly5).appendTo(monthlyTab);
$(monthlyTab).append('010203040506');
$(monthlyTab).append('070809101112');
$("",{type : "hidden", id : "monthHidden"}).appendTo(monthlyTab);
$(monthlyTab).appendTo(tabContent);
//creating the weeklyTab
var weeklyTab = $("", { "class": "tab-pane", id: "Weekly" });
var weekly1 = $("",{"class":"line"});
$("",{type : "radio", value : "1", name : "week"}).appendTo(weekly1);
$(weekly1).append("Per week, allowed wildcard[, - * / L #]");
$(weekly1).appendTo(weeklyTab);
var weekly2 = $("",{"class":"line"});
$("",{type : "radio", value : "2", name : "week"}).appendTo(weekly2);
$(weekly2).append("not specify");
$(weekly2).appendTo(weeklyTab);
var weekly3 = $("",{"class":"line"});
$("",{type : "radio", value : "3", name : "week"}).appendTo(weekly3);
$(weekly3).append("Cycle, from week");
$("",{type : "text", id : "weekStart_0", value : "1", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(weekly3);
$(weekly3).append("-");
$("",{type : "text", id : "weekEnd_0", value : "2", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(weekly3);
$(weekly3).appendTo(weeklyTab);
var weekly4 = $("",{"class":"line"});
$("",{type : "radio", value : "4", name : "week"}).appendTo(weekly4);
$(weekly4).append("The");
$("",{type : "text", id : "weekStart_1", value : "1", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(weekly4);
$(weekly4).append("th week, and day ");
$("",{type : "text", id : "weekEnd_1", value : "1", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(weekly4);
$(weekly4).appendTo(weeklyTab);
var weekly5 = $("",{"class":"line"});
$("",{type : "radio", value : "5", name : "week"}).appendTo(weekly5);
$(weekly5).append("Last week of the month");
$("",{type : "text", id : "weekStart_2", value : "1", style:"width:35px; height:20px; text-align: center; margin: 0 3px;"}).appendTo(weekly5);
$(weekly5).appendTo(weeklyTab);
var weekly6 = $("",{"class":"line"});
$("",{type : "radio", value : "6", name : "week", id: "week_appoint"}).appendTo(weekly6);
$(weekly6).append("specify");
$(weekly6).appendTo(weeklyTab);
$(weeklyTab).append('1234567');
$("",{type : "hidden", id : "weekHidden"}).appendTo(weeklyTab);
$(weeklyTab).appendTo(tabContent);
//creating the yearlyTab
var yearlyTab = $("", { "class": "tab-pane", id: "Yearly" });
var yearly1 = $("",{"class":"line"});
$("",{type : "radio", value : "1", name : "year"}).appendTo(yearly1);
$(yearly1).append("not specify allowed wildcard[, - * /] not required");
$(yearly1).appendTo(yearlyTab);
var yearly3 = $("",{"class":"line"});
$("",{type : "radio", value : "2", name : "year"}).appendTo(yearly3);
$(yearly3).append("Per year");
$(yearly3).appendTo(yearlyTab);
var yearly2 = $("",{"class":"line"});
$("",{type : "radio", value : "3", name : "year"}).appendTo(yearly2);
$(yearly2).append("Cycle, from ");
$("",{type : "text", id : "yearStart_0", value : "2016", style:"width:45px; height:20px;"}).appendTo(yearly2);
$(yearly2).append("-");
$("",{type : "text", id : "yearEnd_0", value : "2017", style:"width:45px; height:20px;"}).appendTo(yearly2);
$(yearly2).append("year");
$(yearly2).appendTo(yearlyTab);
$("",{type : "hidden", id : "yearHidden"}).appendTo(yearlyTab);
$(yearlyTab).appendTo(tabContent);
$(tabContent).appendTo(span12);
//creating the button and results input
// resultsName = $(this).prop("id");
// $(this).prop("name", resultsName);
var runTime = '