Version 3.3.4
This commit is contained in:
1 parent
78706903a2
commit
fb6b5baabc
2206 files changed
+409828
-382984
No files matched your search
@@ -1,7 +1,7 @@
|
||||
// CalendarDateSelect version 1.16.3 - a prototype based date picker
|
||||
// Questions, comments, bugs? - see the project page: http://code.google.com/p/calendardateselect
|
||||
if (typeof Prototype == 'undefined') alert("CalendarDateSelect ошибка: Класс-прототип не найден. Пожалуйста убедитесь, что ваше приложение подключает prototype.js (.g. <%= javascript_include_tag :defaults %>) *перед* подключен calendar_date_select.js (.g. <%= calendar_date_select_includes %>).");
|
||||
if (Prototype.Version < "1.6") alert("Требуется класс-прототип 1.6.0. Если используются ранние версии класса- прототипа, используйте calendar_date_select версии 1.8.3");
|
||||
if (typeof Prototype == 'undefined') alert("CalendarDateSelect Error: Prototype could not be found. Please make sure that your application's layout includes prototype.js (.g. <%= javascript_include_tag :defaults %>) *before* it includes calendar_date_select.js (.g. <%= calendar_date_select_includes %>).");
|
||||
if (Prototype.Version < "1.6") alert("Prototype 1.6.0 is required. If using earlier version of prototype, please use calendar_date_select version 1.8.3");
|
||||
|
||||
Element.addMethods({
|
||||
purgeChildren: function(element) { $A(element.childNodes).each(function(e){$(e).remove();}); },
|
||||
@@ -22,40 +22,32 @@ Element.buildAndAppend = function(type, options, style)
|
||||
nil = null;
|
||||
|
||||
Date.one_day = 24*60*60*1000;
|
||||
Date.weekdays = $w("П В С Ч П С В");
|
||||
Date.first_day_of_week = 1;
|
||||
Date.months = $w("Январь Февраль Март Апрель Май Июнь Июль Август Сентябрь Октябрь Ноябрь Декабрь" );
|
||||
Date.weekdays = $w("S M T W T F S");
|
||||
Date.first_day_of_week = 0;
|
||||
Date.months = $w("January February March April May June July August September October November December" );
|
||||
Date.padded2 = function(hour) { var padded2 = parseInt(hour, 10); if (hour < 10) padded2 = "0" + padded2; return padded2; }
|
||||
Date.prototype.getPaddedMinutes = function() { return Date.padded2(this.getMinutes()); }
|
||||
Date.prototype.getAMPMHour = function() { var hour = this.getHours(); return (hour == 0) ? 12 : (hour > 12 ? hour - 12 : hour ) }
|
||||
Date.prototype.getAMPM = function() { return (this.getHours() < 12) ? "AM" : "PM"; }
|
||||
Date.prototype.stripTime = function() { return new Date(this.getFullYear(), this.getMonth(), this.getDate());};
|
||||
Date.prototype.daysDistance = function(compare_date) { return Math.round((compare_date - this) / Date.one_day); };
|
||||
|
||||
/*Date.prototype.toFormattedString = function(include_time){
|
||||
Date.prototype.toFormattedString = function(include_time){
|
||||
var hour, str;
|
||||
str = Date.months[this.getMonth()] + " " + this.getDate() + ", " + this.getFullYear();
|
||||
|
||||
if (include_time) { hour = this.getHours(); str += " " + this.getAMPMHour() + ":" + this.getPaddedMinutes() + " " + this.getAMPM() }
|
||||
return str;
|
||||
}*/
|
||||
Date.prototype.toFormattedString = function(include_time)
|
||||
{
|
||||
str = Date.padded2(this.getDate()) + "." + Date.padded2(this.getMonth()+1) + "." + this.getFullYear();
|
||||
if (include_time) { str += " " + this.getHours() + ":" + this.getPaddedMinutes() }
|
||||
return str;
|
||||
}
|
||||
|
||||
Date.parseFormattedString = function(string) { var vstring = string.sub(/([0-9]{2})\.([0-9]{2})\.([0-9]{4})/, function(match) { return match[2] + " " + match[1] + "," + match[3]; }); return new Date(vstring); }
|
||||
Date.parseFormattedString = function(string) { return new Date(string);}
|
||||
Math.floor_to_interval = function(n, i) { return Math.floor(n/i) * i;}
|
||||
window.f_height = function() { return( [window.innerHeight ? window.innerHeight : null, document.documentElement ? document.documentElement.clientHeight : null, document.body ? document.body.clientHeight : null].select(function(x){return x>0}).first()||0); }
|
||||
window.f_scrollTop = function() { return ([window.pageYOffset ? window.pageYOffset : null, document.documentElement ? document.documentElement.scrollTop : null, document.body ? document.body.scrollTop : null].select(function(x){return x>0}).first()||0 ); }
|
||||
|
||||
_translations = {
|
||||
"OK": "OK",
|
||||
"Now": "Сейчас",
|
||||
"Today": "Сегодня",
|
||||
"Clear": "Очистить"
|
||||
"Now": "Now",
|
||||
"Today": "Today",
|
||||
"Clear": "Clear"
|
||||
}
|
||||
SelectBox = Class.create();
|
||||
SelectBox.prototype = {
|
||||
@@ -79,7 +71,7 @@ CalendarDateSelect = Class.create();
|
||||
CalendarDateSelect.prototype = {
|
||||
initialize: function(target_element, options) {
|
||||
this.target_element = $(target_element); // make sure it's an element, not a string
|
||||
if (!this.target_element) { alert("Выбранный элемент " + target_element + " не найден!"); return false;}
|
||||
if (!this.target_element) { alert("Target element " + target_element + " not found!"); return false;}
|
||||
if (this.target_element.tagName != "INPUT") this.target_element = this.target_element.down("INPUT")
|
||||
|
||||
this.target_element.calendar_date_select = this;
|
||||
@@ -217,7 +209,7 @@ CalendarDateSelect.prototype = {
|
||||
|
||||
var t = new Date();
|
||||
this.hour_select = new SelectBox(buttons_div,
|
||||
blank_time.concat($R(0,23).map(function(x) {t.setHours(x); return $A([t.getHours(),x])} )),
|
||||
blank_time.concat($R(0,23).map(function(x) {t.setHours(x); return $A([t.getAMPMHour()+ " " + t.getAMPM(),x])} )),
|
||||
{
|
||||
calendar_date_select: this,
|
||||
onchange: function() { this.calendar_date_select.updateSelectedDate( { hour: this.value });},
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
+10
-10
@@ -1,11 +1,11 @@
|
||||
Date.weekdays = $w('日 月 火 水 木 金 土');
|
||||
Date.months = $w('1月 2月 3月 4月 5月 6月 7月 8月 9月 10月 11月 12月');
|
||||
|
||||
Date.first_day_of_week = 0
|
||||
|
||||
_translations = {
|
||||
"OK": "OK",
|
||||
"Now": "現在",
|
||||
"Today": "今日",
|
||||
"Clear": "クリア"
|
||||
Date.weekdays = $w('日 月 火 水 木 金 土');
|
||||
Date.months = $w('1月 2月 3月 4月 5月 6月 7月 8月 9月 10月 11月 12月');
|
||||
|
||||
Date.first_day_of_week = 0
|
||||
|
||||
_translations = {
|
||||
"OK": "OK",
|
||||
"Now": "現在",
|
||||
"Today": "今日",
|
||||
"Clear": "クリア"
|
||||
}
|
||||
Reference in new issue
Block a user