mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +09:00
날짜 입력용 Calendar을 DyCalendar으로 이름 변경
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4185 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
281a720a87
commit
e185636161
11 changed files with 70 additions and 1998 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
// ** I18N
|
// ** I18N
|
||||||
|
|
||||||
// Calendar EN language
|
// DyCalendar EN language
|
||||||
// Author: Mihai Bazon, <mihai_bazon@yahoo.com>
|
// Author: Mihai Bazon, <mihai_bazon@yahoo.com>
|
||||||
// Encoding: any
|
// Encoding: any
|
||||||
// Distributed under the same terms as the calendar itself.
|
// Distributed under the same terms as the calendar itself.
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
// include your contact information in the header, as can be seen above.
|
// include your contact information in the header, as can be seen above.
|
||||||
|
|
||||||
// full day names
|
// full day names
|
||||||
Calendar._DN = new Array
|
DyCalendar._DN = new Array
|
||||||
("Sunday",
|
("Sunday",
|
||||||
"Monday",
|
"Monday",
|
||||||
"Tuesday",
|
"Tuesday",
|
||||||
|
|
@ -25,15 +25,15 @@ Calendar._DN = new Array
|
||||||
// for exemplification on how one can customize the short day names, but if
|
// for exemplification on how one can customize the short day names, but if
|
||||||
// they are simply the first N letters of the full name you can simply say:
|
// they are simply the first N letters of the full name you can simply say:
|
||||||
//
|
//
|
||||||
// Calendar._SDN_len = N; // short day name length
|
// DyCalendar._SDN_len = N; // short day name length
|
||||||
// Calendar._SMN_len = N; // short month name length
|
// DyCalendar._SMN_len = N; // short month name length
|
||||||
//
|
//
|
||||||
// If N = 3 then this is not needed either since we assume a value of 3 if not
|
// If N = 3 then this is not needed either since we assume a value of 3 if not
|
||||||
// present, to be compatible with translation files that were written before
|
// present, to be compatible with translation files that were written before
|
||||||
// this feature.
|
// this feature.
|
||||||
|
|
||||||
// short day names
|
// short day names
|
||||||
Calendar._SDN = new Array
|
DyCalendar._SDN = new Array
|
||||||
("Sun",
|
("Sun",
|
||||||
"Mon",
|
"Mon",
|
||||||
"Tue",
|
"Tue",
|
||||||
|
|
@ -45,10 +45,10 @@ Calendar._SDN = new Array
|
||||||
|
|
||||||
// First day of the week. "0" means display Sunday first, "1" means display
|
// First day of the week. "0" means display Sunday first, "1" means display
|
||||||
// Monday first, etc.
|
// Monday first, etc.
|
||||||
Calendar._FD = 0;
|
DyCalendar._FD = 0;
|
||||||
|
|
||||||
// full month names
|
// full month names
|
||||||
Calendar._MN = new Array
|
DyCalendar._MN = new Array
|
||||||
("January",
|
("January",
|
||||||
"February",
|
"February",
|
||||||
"March",
|
"March",
|
||||||
|
|
@ -63,7 +63,7 @@ Calendar._MN = new Array
|
||||||
"December");
|
"December");
|
||||||
|
|
||||||
// short month names
|
// short month names
|
||||||
Calendar._SMN = new Array
|
DyCalendar._SMN = new Array
|
||||||
("Jan",
|
("Jan",
|
||||||
"Feb",
|
"Feb",
|
||||||
"Mar",
|
"Mar",
|
||||||
|
|
@ -78,10 +78,10 @@ Calendar._SMN = new Array
|
||||||
"Dec");
|
"Dec");
|
||||||
|
|
||||||
// tooltips
|
// tooltips
|
||||||
Calendar._TT = {};
|
DyCalendar._TT = {};
|
||||||
Calendar._TT["INFO"] = "About the calendar";
|
DyCalendar._TT["INFO"] = "About the calendar";
|
||||||
|
|
||||||
Calendar._TT["ABOUT"] =
|
DyCalendar._TT["ABOUT"] =
|
||||||
"DHTML Date/Time Selector\n" +
|
"DHTML Date/Time Selector\n" +
|
||||||
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
|
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
|
||||||
"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
|
"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
|
||||||
|
|
@ -91,37 +91,37 @@ Calendar._TT["ABOUT"] =
|
||||||
"- Use the \xab, \xbb buttons to select year\n" +
|
"- Use the \xab, \xbb buttons to select year\n" +
|
||||||
"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
|
"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
|
||||||
"- Hold mouse button on any of the above buttons for faster selection.";
|
"- Hold mouse button on any of the above buttons for faster selection.";
|
||||||
Calendar._TT["ABOUT_TIME"] = "\n\n" +
|
DyCalendar._TT["ABOUT_TIME"] = "\n\n" +
|
||||||
"Time selection:\n" +
|
"Time selection:\n" +
|
||||||
"- Click on any of the time parts to increase it\n" +
|
"- Click on any of the time parts to increase it\n" +
|
||||||
"- or Shift-click to decrease it\n" +
|
"- or Shift-click to decrease it\n" +
|
||||||
"- or click and drag for faster selection.";
|
"- or click and drag for faster selection.";
|
||||||
|
|
||||||
Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)";
|
DyCalendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)";
|
||||||
Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)";
|
DyCalendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)";
|
||||||
Calendar._TT["GO_TODAY"] = "Go Today";
|
DyCalendar._TT["GO_TODAY"] = "Go Today";
|
||||||
Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)";
|
DyCalendar._TT["NEXT_MONTH"] = "Next month (hold for menu)";
|
||||||
Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)";
|
DyCalendar._TT["NEXT_YEAR"] = "Next year (hold for menu)";
|
||||||
Calendar._TT["SEL_DATE"] = "Select date";
|
DyCalendar._TT["SEL_DATE"] = "Select date";
|
||||||
Calendar._TT["DRAG_TO_MOVE"] = "Drag to move";
|
DyCalendar._TT["DRAG_TO_MOVE"] = "Drag to move";
|
||||||
Calendar._TT["PART_TODAY"] = " (today)";
|
DyCalendar._TT["PART_TODAY"] = " (today)";
|
||||||
|
|
||||||
// the following is to inform that "%s" is to be the first day of week
|
// the following is to inform that "%s" is to be the first day of week
|
||||||
// %s will be replaced with the day name.
|
// %s will be replaced with the day name.
|
||||||
Calendar._TT["DAY_FIRST"] = "Display %s first";
|
DyCalendar._TT["DAY_FIRST"] = "Display %s first";
|
||||||
|
|
||||||
// This may be locale-dependent. It specifies the week-end days, as an array
|
// This may be locale-dependent. It specifies the week-end days, as an array
|
||||||
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
|
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
|
||||||
// means Monday, etc.
|
// means Monday, etc.
|
||||||
Calendar._TT["WEEKEND"] = "0,6";
|
DyCalendar._TT["WEEKEND"] = "0,6";
|
||||||
|
|
||||||
Calendar._TT["CLOSE"] = "Close";
|
DyCalendar._TT["CLOSE"] = "Close";
|
||||||
Calendar._TT["TODAY"] = "Today";
|
DyCalendar._TT["TODAY"] = "Today";
|
||||||
Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value";
|
DyCalendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value";
|
||||||
|
|
||||||
// date formats
|
// date formats
|
||||||
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
|
DyCalendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
|
||||||
Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
|
DyCalendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
|
||||||
|
|
||||||
Calendar._TT["WK"] = "wk";
|
DyCalendar._TT["WK"] = "wk";
|
||||||
Calendar._TT["TIME"] = "Time:";
|
DyCalendar._TT["TIME"] = "Time:";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// ** I18N
|
// ** I18N
|
||||||
|
|
||||||
// Calendar KO language
|
// DyCalendar KO language
|
||||||
// Author: Mihai Bazon, <mihai_bazon@yahoo.com>
|
// Author: Mihai Bazon, <mihai_bazon@yahoo.com>
|
||||||
// Translation: Yourim Yi <yyi@yourim.net>
|
// Translation: Yourim Yi <yyi@yourim.net>
|
||||||
// Encoding: UTF-8
|
// Encoding: UTF-8
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
// full day names
|
// full day names
|
||||||
|
|
||||||
Calendar._DN = new Array
|
DyCalendar._DN = new Array
|
||||||
("일요일",
|
("일요일",
|
||||||
"월요일",
|
"월요일",
|
||||||
"화요일",
|
"화요일",
|
||||||
|
|
@ -28,15 +28,15 @@ Calendar._DN = new Array
|
||||||
// for exemplification on how one can customize the short day names, but if
|
// for exemplification on how one can customize the short day names, but if
|
||||||
// they are simply the first N letters of the full name you can simply say:
|
// they are simply the first N letters of the full name you can simply say:
|
||||||
//
|
//
|
||||||
// Calendar._SDN_len = N; // short day name length
|
// DyCalendar._SDN_len = N; // short day name length
|
||||||
// Calendar._SMN_len = N; // short month name length
|
// DyCalendar._SMN_len = N; // short month name length
|
||||||
//
|
//
|
||||||
// If N = 3 then this is not needed either since we assume a value of 3 if not
|
// If N = 3 then this is not needed either since we assume a value of 3 if not
|
||||||
// present, to be compatible with translation files that were written before
|
// present, to be compatible with translation files that were written before
|
||||||
// this feature.
|
// this feature.
|
||||||
|
|
||||||
// short day names
|
// short day names
|
||||||
Calendar._SDN = new Array
|
DyCalendar._SDN = new Array
|
||||||
("일",
|
("일",
|
||||||
"월",
|
"월",
|
||||||
"화",
|
"화",
|
||||||
|
|
@ -47,7 +47,7 @@ Calendar._SDN = new Array
|
||||||
"일");
|
"일");
|
||||||
|
|
||||||
// full month names
|
// full month names
|
||||||
Calendar._MN = new Array
|
DyCalendar._MN = new Array
|
||||||
("1월",
|
("1월",
|
||||||
"2월",
|
"2월",
|
||||||
"3월",
|
"3월",
|
||||||
|
|
@ -62,7 +62,7 @@ Calendar._MN = new Array
|
||||||
"12월");
|
"12월");
|
||||||
|
|
||||||
// short month names
|
// short month names
|
||||||
Calendar._SMN = new Array
|
DyCalendar._SMN = new Array
|
||||||
("1",
|
("1",
|
||||||
"2",
|
"2",
|
||||||
"3",
|
"3",
|
||||||
|
|
@ -77,10 +77,10 @@ Calendar._SMN = new Array
|
||||||
"12");
|
"12");
|
||||||
|
|
||||||
// tooltips
|
// tooltips
|
||||||
Calendar._TT = {};
|
DyCalendar._TT = {};
|
||||||
Calendar._TT["INFO"] = "calendar 소개";
|
DyCalendar._TT["INFO"] = "calendar 소개";
|
||||||
|
|
||||||
Calendar._TT["ABOUT"] =
|
DyCalendar._TT["ABOUT"] =
|
||||||
"DHTML Date/Time Selector\n" +
|
"DHTML Date/Time Selector\n" +
|
||||||
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
|
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
|
||||||
"\n"+
|
"\n"+
|
||||||
|
|
@ -93,32 +93,32 @@ Calendar._TT["ABOUT"] =
|
||||||
"- 연도를 선택하려면 \xab, \xbb 버튼을 사용합니다\n" +
|
"- 연도를 선택하려면 \xab, \xbb 버튼을 사용합니다\n" +
|
||||||
"- 달을 선택하려면 " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " 버튼을 누르세요\n" +
|
"- 달을 선택하려면 " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " 버튼을 누르세요\n" +
|
||||||
"- 계속 누르고 있으면 위 값들을 빠르게 선택하실 수 있습니다.";
|
"- 계속 누르고 있으면 위 값들을 빠르게 선택하실 수 있습니다.";
|
||||||
Calendar._TT["ABOUT_TIME"] = "\n\n" +
|
DyCalendar._TT["ABOUT_TIME"] = "\n\n" +
|
||||||
"시간 선택:\n" +
|
"시간 선택:\n" +
|
||||||
"- 마우스로 누르면 시간이 증가합니다\n" +
|
"- 마우스로 누르면 시간이 증가합니다\n" +
|
||||||
"- Shift 키와 함께 누르면 감소합니다\n" +
|
"- Shift 키와 함께 누르면 감소합니다\n" +
|
||||||
"- 누른 상태에서 마우스를 움직이면 좀 더 빠르게 값이 변합니다.\n";
|
"- 누른 상태에서 마우스를 움직이면 좀 더 빠르게 값이 변합니다.\n";
|
||||||
|
|
||||||
Calendar._TT["PREV_YEAR"] = "지난 해 (길게 누르면 목록)";
|
DyCalendar._TT["PREV_YEAR"] = "지난 해 (길게 누르면 목록)";
|
||||||
Calendar._TT["PREV_MONTH"] = "지난 달 (길게 누르면 목록)";
|
DyCalendar._TT["PREV_MONTH"] = "지난 달 (길게 누르면 목록)";
|
||||||
Calendar._TT["GO_TODAY"] = "오늘 날짜로";
|
DyCalendar._TT["GO_TODAY"] = "오늘 날짜로";
|
||||||
Calendar._TT["NEXT_MONTH"] = "다음 달 (길게 누르면 목록)";
|
DyCalendar._TT["NEXT_MONTH"] = "다음 달 (길게 누르면 목록)";
|
||||||
Calendar._TT["NEXT_YEAR"] = "다음 해 (길게 누르면 목록)";
|
DyCalendar._TT["NEXT_YEAR"] = "다음 해 (길게 누르면 목록)";
|
||||||
Calendar._TT["SEL_DATE"] = "날짜를 선택하세요";
|
DyCalendar._TT["SEL_DATE"] = "날짜를 선택하세요";
|
||||||
Calendar._TT["DRAG_TO_MOVE"] = "마우스 드래그로 이동 하세요";
|
DyCalendar._TT["DRAG_TO_MOVE"] = "마우스 드래그로 이동 하세요";
|
||||||
Calendar._TT["PART_TODAY"] = " (오늘)";
|
DyCalendar._TT["PART_TODAY"] = " (오늘)";
|
||||||
|
|
||||||
Calendar._TT["DAY_FIRST"] = "%s 먼저 표시";
|
DyCalendar._TT["DAY_FIRST"] = "%s 먼저 표시";
|
||||||
|
|
||||||
Calendar._TT["WEEKEND"] = "0,6";
|
DyCalendar._TT["WEEKEND"] = "0,6";
|
||||||
|
|
||||||
Calendar._TT["CLOSE"] = "닫기";
|
DyCalendar._TT["CLOSE"] = "닫기";
|
||||||
Calendar._TT["TODAY"] = "오늘";
|
DyCalendar._TT["TODAY"] = "오늘";
|
||||||
Calendar._TT["TIME_PART"] = "(Shift-)클릭 또는 드래그 하세요";
|
DyCalendar._TT["TIME_PART"] = "(Shift-)클릭 또는 드래그 하세요";
|
||||||
|
|
||||||
// date formats
|
// date formats
|
||||||
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
|
DyCalendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
|
||||||
Calendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]";
|
DyCalendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]";
|
||||||
|
|
||||||
Calendar._TT["WK"] = "주";
|
DyCalendar._TT["WK"] = "주";
|
||||||
Calendar._TT["TIME"] = "시:";
|
DyCalendar._TT["TIME"] = "시:";
|
||||||
|
|
|
||||||
|
|
@ -59,144 +59,4 @@
|
||||||
* pass none of "inputField", "displayArea" or "button" you'll get a warning
|
* pass none of "inputField", "displayArea" or "button" you'll get a warning
|
||||||
* saying "nothing to setup".
|
* saying "nothing to setup".
|
||||||
*/
|
*/
|
||||||
Calendar.setup = function (params) {
|
DyCalendar.setup=function(params){function param_default(pname,def){if(typeof params[pname]=="undefined"){params[pname]=def}};param_default("inputField",null);param_default("displayArea",null);param_default("button",null);param_default("eventName","click");param_default("ifFormat","%Y/%m/%d");param_default("daFormat","%Y/%m/%d");param_default("singleClick",true);param_default("disableFunc",null);param_default("dateStatusFunc",params["disableFunc"]);param_default("dateText",null);param_default("firstDay",null);param_default("align","Br");param_default("range",[1900,2999]);param_default("weekNumbers",true);param_default("flat",null);param_default("flatCallback",null);param_default("onSelect",null);param_default("onClose",null);param_default("onUpdate",null);param_default("date",null);param_default("showsTime",false);param_default("timeFormat","24");param_default("electric",true);param_default("step",2);param_default("position",null);param_default("cache",false);param_default("showOthers",false);param_default("multiple",null);var tmp=["inputField","displayArea","button"];for(var i in tmp){if(typeof params[tmp[i]]=="string"){params[tmp[i]]=document.getElementById(params[tmp[i]])}}if(!(params.flat||params.multiple||params.inputField||params.displayArea||params.button)){alert("DyCalendar.setup:\n Nothing to setup (no fields found). Please check your code");return false}function onSelect(cal){var p=cal.params;var update=(cal.dateClicked||p.electric);if(update&&p.inputField){p.inputField.value=cal.date.print(p.ifFormat);if(typeof p.inputField.onchange=="function")p.inputField.onchange()}if(update&&p.displayArea)p.displayArea.innerHTML=cal.date.print(p.daFormat);if(update&&typeof p.onUpdate=="function")p.onUpdate(cal);if(update&&p.flat){if(typeof p.flatCallback=="function")p.flatCallback(cal)}if(update&&p.singleClick&&cal.dateClicked)cal.callCloseHandler()};if(params.flat!=null){if(typeof params.flat=="string")params.flat=document.getElementById(params.flat);if(!params.flat){alert("DyCalendar.setup:\n Flat specified but can't find parent.");return false}var cal=new DyCalendar(params.firstDay,params.date,params.onSelect||onSelect);cal.showsOtherMonths=params.showOthers;cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.params=params;cal.weekNumbers=params.weekNumbers;cal.setRange(params.range[0],params.range[1]);cal.setDateStatusHandler(params.dateStatusFunc);cal.getDateText=params.dateText;if(params.ifFormat){cal.setDateFormat(params.ifFormat)}if(params.inputField&&typeof params.inputField.value=="string"){cal.parseDate(params.inputField.value)}cal.create(params.flat);cal.show();return false}var triggerEl=params.button||params.displayArea||params.inputField;triggerEl["on"+params.eventName]=function(){var dateEl=null;if(params.displayArea)dateEl=params.displayArea;else dateEl=params.inputField;var dateFmt=params.inputField?params.ifFormat:params.daFormat;var mustCreate=false;var cal=window.calendar;if(dateEl)params.date=Date.parseDate(dateEl.value||dateEl.innerHTML,dateFmt);if(!(cal&¶ms.cache)){window.calendar=cal=new DyCalendar(params.firstDay,params.date,params.onSelect||onSelect,params.onClose||function(cal){cal.hide()});cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.weekNumbers=params.weekNumbers;mustCreate=true}else{if(params.date)cal.setDate(params.date);cal.hide()}if(params.multiple){cal.multiple={};for(var i=params.multiple.length;--i>=0;){var d=params.multiple[i];var ds=d.print("%Y%m%d");cal.multiple[ds]=d}}cal.showsOtherMonths=params.showOthers;cal.yearStep=params.step;cal.setRange(params.range[0],params.range[1]);cal.params=params;cal.setDateStatusHandler(params.dateStatusFunc);cal.getDateText=params.dateText;cal.setDateFormat(dateFmt);if(mustCreate)cal.create();cal.refresh();if(!params.position)cal.showAtElement(params.button||params.displayArea||params.inputField,params.align);else cal.showAt(params.position[0],params.position[1]);return false};return cal};
|
||||||
function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } };
|
|
||||||
|
|
||||||
param_default("inputField", null);
|
|
||||||
param_default("displayArea", null);
|
|
||||||
param_default("button", null);
|
|
||||||
param_default("eventName", "click");
|
|
||||||
param_default("ifFormat", "%Y/%m/%d");
|
|
||||||
param_default("daFormat", "%Y/%m/%d");
|
|
||||||
param_default("singleClick", true);
|
|
||||||
param_default("disableFunc", null);
|
|
||||||
param_default("dateStatusFunc", params["disableFunc"]); // takes precedence if both are defined
|
|
||||||
param_default("dateText", null);
|
|
||||||
param_default("firstDay", null);
|
|
||||||
param_default("align", "Br");
|
|
||||||
param_default("range", [1900, 2999]);
|
|
||||||
param_default("weekNumbers", true);
|
|
||||||
param_default("flat", null);
|
|
||||||
param_default("flatCallback", null);
|
|
||||||
param_default("onSelect", null);
|
|
||||||
param_default("onClose", null);
|
|
||||||
param_default("onUpdate", null);
|
|
||||||
param_default("date", null);
|
|
||||||
param_default("showsTime", false);
|
|
||||||
param_default("timeFormat", "24");
|
|
||||||
param_default("electric", true);
|
|
||||||
param_default("step", 2);
|
|
||||||
param_default("position", null);
|
|
||||||
param_default("cache", false);
|
|
||||||
param_default("showOthers", false);
|
|
||||||
param_default("multiple", null);
|
|
||||||
|
|
||||||
var tmp = ["inputField", "displayArea", "button"];
|
|
||||||
for (var i in tmp) {
|
|
||||||
if (typeof params[tmp[i]] == "string") {
|
|
||||||
params[tmp[i]] = document.getElementById(params[tmp[i]]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!(params.flat || params.multiple || params.inputField || params.displayArea || params.button)) {
|
|
||||||
alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function onSelect(cal) {
|
|
||||||
var p = cal.params;
|
|
||||||
var update = (cal.dateClicked || p.electric);
|
|
||||||
if (update && p.inputField) {
|
|
||||||
p.inputField.value = cal.date.print(p.ifFormat);
|
|
||||||
if (typeof p.inputField.onchange == "function")
|
|
||||||
p.inputField.onchange();
|
|
||||||
}
|
|
||||||
if (update && p.displayArea)
|
|
||||||
p.displayArea.innerHTML = cal.date.print(p.daFormat);
|
|
||||||
if (update && typeof p.onUpdate == "function")
|
|
||||||
p.onUpdate(cal);
|
|
||||||
if (update && p.flat) {
|
|
||||||
if (typeof p.flatCallback == "function")
|
|
||||||
p.flatCallback(cal);
|
|
||||||
}
|
|
||||||
if (update && p.singleClick && cal.dateClicked)
|
|
||||||
cal.callCloseHandler();
|
|
||||||
};
|
|
||||||
|
|
||||||
if (params.flat != null) {
|
|
||||||
if (typeof params.flat == "string")
|
|
||||||
params.flat = document.getElementById(params.flat);
|
|
||||||
if (!params.flat) {
|
|
||||||
alert("Calendar.setup:\n Flat specified but can't find parent.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect);
|
|
||||||
cal.showsOtherMonths = params.showOthers;
|
|
||||||
cal.showsTime = params.showsTime;
|
|
||||||
cal.time24 = (params.timeFormat == "24");
|
|
||||||
cal.params = params;
|
|
||||||
cal.weekNumbers = params.weekNumbers;
|
|
||||||
cal.setRange(params.range[0], params.range[1]);
|
|
||||||
cal.setDateStatusHandler(params.dateStatusFunc);
|
|
||||||
cal.getDateText = params.dateText;
|
|
||||||
if (params.ifFormat) {
|
|
||||||
cal.setDateFormat(params.ifFormat);
|
|
||||||
}
|
|
||||||
if (params.inputField && typeof params.inputField.value == "string") {
|
|
||||||
cal.parseDate(params.inputField.value);
|
|
||||||
}
|
|
||||||
cal.create(params.flat);
|
|
||||||
cal.show();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
var triggerEl = params.button || params.displayArea || params.inputField;
|
|
||||||
triggerEl["on" + params.eventName] = function() {
|
|
||||||
var dateEl = null;
|
|
||||||
if(params.displayArea) dateEl = params.displayArea;
|
|
||||||
else dateEl = params.inputField;
|
|
||||||
var dateFmt = params.inputField ? params.ifFormat : params.daFormat;
|
|
||||||
var mustCreate = false;
|
|
||||||
var cal = window.calendar;
|
|
||||||
if (dateEl)
|
|
||||||
params.date = Date.parseDate(dateEl.value || dateEl.innerHTML, dateFmt);
|
|
||||||
if (!(cal && params.cache)) {
|
|
||||||
window.calendar = cal = new Calendar(params.firstDay,
|
|
||||||
params.date,
|
|
||||||
params.onSelect || onSelect,
|
|
||||||
params.onClose || function(cal) { cal.hide(); });
|
|
||||||
cal.showsTime = params.showsTime;
|
|
||||||
cal.time24 = (params.timeFormat == "24");
|
|
||||||
cal.weekNumbers = params.weekNumbers;
|
|
||||||
mustCreate = true;
|
|
||||||
} else {
|
|
||||||
if (params.date)
|
|
||||||
cal.setDate(params.date);
|
|
||||||
cal.hide();
|
|
||||||
}
|
|
||||||
if (params.multiple) {
|
|
||||||
cal.multiple = {};
|
|
||||||
for (var i = params.multiple.length; --i >= 0;) {
|
|
||||||
var d = params.multiple[i];
|
|
||||||
var ds = d.print("%Y%m%d");
|
|
||||||
cal.multiple[ds] = d;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cal.showsOtherMonths = params.showOthers;
|
|
||||||
cal.yearStep = params.step;
|
|
||||||
cal.setRange(params.range[0], params.range[1]);
|
|
||||||
cal.params = params;
|
|
||||||
cal.setDateStatusHandler(params.dateStatusFunc);
|
|
||||||
cal.getDateText = params.dateText;
|
|
||||||
cal.setDateFormat(dateFmt);
|
|
||||||
if (mustCreate)
|
|
||||||
cal.create();
|
|
||||||
cal.refresh();
|
|
||||||
if (!params.position)
|
|
||||||
cal.showAtElement(params.button || params.displayArea || params.inputField, params.align);
|
|
||||||
else
|
|
||||||
cal.showAt(params.position[0], params.position[1]);
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
return cal;
|
|
||||||
};
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -69,7 +69,7 @@
|
||||||
<div class="display_date" id="str_{$val->column_name}">{zdate($val->value,"Y-m-d")}</div>
|
<div class="display_date" id="str_{$val->column_name}">{zdate($val->value,"Y-m-d")}</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
Calendar.setup( { firstDay : 0, inputField : "date_{$val->column_name}", ifFormat : "%Y%m%d", displayArea : "str_{$val->column_name}", daFormat : "%Y-%m-%d"});
|
DyCalendar.setup( { firstDay : 0, inputField : "date_{$val->column_name}", ifFormat : "%Y%m%d", displayArea : "str_{$val->column_name}", daFormat : "%Y-%m-%d"});
|
||||||
</script>
|
</script>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@
|
||||||
<div class="display_date" id="str_{$val->column_name}">{zdate($val->value,"Y-m-d")}</div>
|
<div class="display_date" id="str_{$val->column_name}">{zdate($val->value,"Y-m-d")}</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
Calendar.setup( { firstDay : 0, inputField : "date_{$val->column_name}", ifFormat : "%Y%m%d", displayArea : "str_{$val->column_name}", daFormat : "%Y-%m-%d"});
|
DyCalendar.setup( { firstDay : 0, inputField : "date_{$val->column_name}", ifFormat : "%Y%m%d", displayArea : "str_{$val->column_name}", daFormat : "%Y-%m-%d"});
|
||||||
</script>
|
</script>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
<span id="str_selected_date">{zdate($selected_date, "Y-m-d")}</span> <span class="vr">|</span>
|
<span id="str_selected_date">{zdate($selected_date, "Y-m-d")}</span> <span class="vr">|</span>
|
||||||
<img src="./images/buttonCalendar.gif" alt="calendar" width="16" height="13" id="trigger_calendar" />
|
<img src="./images/buttonCalendar.gif" alt="calendar" width="16" height="13" id="trigger_calendar" />
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
Calendar.setup( { firstDay : 0, inputField : "selected_date", ifFormat : "%Y%m%d", displayArea : "str_selected_date", daFormat : "%Y-%m-%d" , button : "trigger_calendar", onClose: moveDate } );
|
DyCalendar.setup( { firstDay : 0, inputField : "selected_date", ifFormat : "%Y%m%d", displayArea : "str_selected_date", daFormat : "%Y-%m-%d" , button : "trigger_calendar", onClose: moveDate } );
|
||||||
</script>
|
</script>
|
||||||
</th>
|
</th>
|
||||||
<td>Visitor : <strong>{number_format($selected_day_counter->unique_visitor)}</strong> / Pageview : <strong>{number_format($selected_day_counter->pageview)}</strong></td>
|
<td>Visitor : <strong>{number_format($selected_day_counter->unique_visitor)}</strong> / Pageview : <strong>{number_format($selected_day_counter->pageview)}</strong></td>
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
<td>
|
<td>
|
||||||
<div class="display_date" id="display_date">{date("Y-m-d",time()+60*60*24*30)}</div>
|
<div class="display_date" id="display_date">{date("Y-m-d",time()+60*60*24*30)}</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
Calendar.setup( { firstDay : 0, inputField : "stop_date", ifFormat : "%Y%m%d", displayArea : "display_date", daFormat : "%Y-%m-%d"});
|
DyCalendar.setup( { firstDay : 0, inputField : "stop_date", ifFormat : "%Y%m%d", displayArea : "display_date", daFormat : "%Y-%m-%d"});
|
||||||
</script>
|
</script>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@
|
||||||
<p>{$lang->about_birthday}</p>
|
<p>{$lang->about_birthday}</p>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
Calendar.setup( { firstDay : 0, inputField : "date_birthday", ifFormat : "%Y%m%d", displayArea : "str_birthday", daFormat : "%Y-%m-%d" } );
|
DyCalendar.setup( { firstDay : 0, inputField : "date_birthday", ifFormat : "%Y%m%d", displayArea : "str_birthday", daFormat : "%Y-%m-%d" } );
|
||||||
</script>
|
</script>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -232,7 +232,7 @@
|
||||||
<div class="display_date" id="str_{$val->column_name}">{zdate($val->value,"Y-m-d")}</div>
|
<div class="display_date" id="str_{$val->column_name}">{zdate($val->value,"Y-m-d")}</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
Calendar.setup( { firstDay : 0, inputField : "date_{$val->column_name}", ifFormat : "%Y%m%d", displayArea : "str_{$val->column_name}", daFormat : "%Y-%m-%d"});
|
DyCalendar.setup( { firstDay : 0, inputField : "date_{$val->column_name}", ifFormat : "%Y%m%d", displayArea : "str_{$val->column_name}", daFormat : "%Y-%m-%d"});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
Calendar.setup( { firstDay : 0, inputField : "date_birthday", ifFormat : "%Y%m%d", displayArea : "str_birthday", daFormat : "%Y-%m-%d"});
|
DyCalendar.setup( { firstDay : 0, inputField : "date_birthday", ifFormat : "%Y%m%d", displayArea : "str_birthday", daFormat : "%Y-%m-%d"});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!--@if($extend_form_list)-->
|
<!--@if($extend_form_list)-->
|
||||||
|
|
@ -193,7 +193,7 @@
|
||||||
<div class="display_date" id="str_{$val->column_name}">{zdate($val->value,"Y-m-d")}</div>
|
<div class="display_date" id="str_{$val->column_name}">{zdate($val->value,"Y-m-d")}</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
Calendar.setup( { firstDay : 0, inputField : "date_{$val->column_name}", ifFormat : "%Y%m%d", displayArea : "str_{$val->column_name}", daFormat : "%Y-%m-%d"});
|
DyCalendar.setup( { firstDay : 0, inputField : "date_{$val->column_name}", ifFormat : "%Y%m%d", displayArea : "str_{$val->column_name}", daFormat : "%Y-%m-%d"});
|
||||||
</script>
|
</script>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@
|
||||||
<p>{$lang->about_birthday}</p>
|
<p>{$lang->about_birthday}</p>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
Calendar.setup( { firstDay : 0, inputField : "date_birthday", ifFormat : "%Y%m%d", displayArea : "str_birthday", daFormat : "%Y-%m-%d" } );
|
DyCalendar.setup( { firstDay : 0, inputField : "date_birthday", ifFormat : "%Y%m%d", displayArea : "str_birthday", daFormat : "%Y-%m-%d" } );
|
||||||
</script>
|
</script>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -124,7 +124,7 @@
|
||||||
<input type="hidden" name="limit_date" id="date_limit_date" value="{$member_info->limit_date}" />
|
<input type="hidden" name="limit_date" id="date_limit_date" value="{$member_info->limit_date}" />
|
||||||
<div id="str_limit_date" class="display_date" >{zdate($member_info->limit_date,"Y-m-d")}</div>
|
<div id="str_limit_date" class="display_date" >{zdate($member_info->limit_date,"Y-m-d")}</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
Calendar.setup( { firstDay : 0, inputField : "date_limit_date", ifFormat : "%Y%m%d", displayArea : "str_limit_date", daFormat : "%Y-%m-%d" } );
|
DyCalendar.setup( { firstDay : 0, inputField : "date_limit_date", ifFormat : "%Y%m%d", displayArea : "str_limit_date", daFormat : "%Y-%m-%d" } );
|
||||||
</script>
|
</script>
|
||||||
<p class="clear">{$lang->about_limit_date}</p>
|
<p class="clear">{$lang->about_limit_date}</p>
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -243,7 +243,7 @@
|
||||||
<div class="display_date" id="str_{$val->column_name}">{zdate($val->value,"Y-m-d")}</div>
|
<div class="display_date" id="str_{$val->column_name}">{zdate($val->value,"Y-m-d")}</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
Calendar.setup( { firstDay : 0, inputField : "date_{$val->column_name}", ifFormat : "%Y%m%d", displayArea : "str_{$val->column_name}", daFormat : "%Y-%m-%d"});
|
DyCalendar.setup( { firstDay : 0, inputField : "date_{$val->column_name}", ifFormat : "%Y%m%d", displayArea : "str_{$val->column_name}", daFormat : "%Y-%m-%d"});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue