Commit ee2ee481 authored by Gabriel Monnerat's avatar Gabriel Monnerat

- revert r42710, because the wrong file was deleted.

- remove not used files correctly

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42712 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bec1a8bf
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts95872687.26</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>datepicker_lang_US.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string>var i18n = $.extend({}, i18n || {}, {\r\n
datepicker: {\r\n
dateformat: {\r\n
"fulldayvalue": "M/d/yyyy",\r\n
"separator": "/",\r\n
"year_index": 2,\r\n
"month_index": 0,\r\n
"day_index": 1,\r\n
"sun": "Sun",\r\n
"mon": "Mon",\r\n
"tue": "Tue",\r\n
"wed": "Wed",\r\n
"thu": "Thu",\r\n
"fri": "Fri",\r\n
"sat": "Sat",\r\n
"jan": "Jan",\r\n
"feb": "Feb",\r\n
"mar": "Mar",\r\n
"apr": "Apr",\r\n
"may": "May",\r\n
"jun": "Jun",\r\n
"jul": "Jul",\r\n
"aug": "Aug",\r\n
"sep": "Sep",\r\n
"oct": "Oct",\r\n
"nov": "Nov",\r\n
"dec": "Dec",\r\n
"postfix": ""\r\n
},\r\n
ok: " Ok ",\r\n
cancel: "Cancel",\r\n
today: "Today",\r\n
prev_month_title: "prev month",\r\n
next_month_title: "next month"\r\n
}\r\n
});\n
\n
</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>964</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>datepicker_lang_US.js</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts95975364.59</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>jquery.datepicker.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
; (function($) {\n
if (!dateFormat || typeof (dateFormat) != "function") {\n
var dateFormat = function(format) {\n
var o = {\n
"M+": this.getMonth() + 1,\n
"d+": this.getDate(),\n
"h+": this.getHours(),\n
"H+": this.getHours(),\n
"m+": this.getMinutes(),\n
"s+": this.getSeconds(),\n
"q+": Math.floor((this.getMonth() + 3) / 3),\n
"w": "0123456".indexOf(this.getDay()),\n
"S": this.getMilliseconds()\n
};\n
if (/(y+)/.test(format)) {\n
format = format.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));\n
}\n
for (var k in o) {\n
if (new RegExp("(" + k + ")").test(format))\n
format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));\n
}\n
return format;\n
};\n
}\n
if (!DateAdd || typeof (DateDiff) != "function") {\n
var DateAdd = function(interval, number, idate) {\n
number = parseInt(number);\n
var date;\n
if (typeof (idate) == "string") {\n
date = idate.split(/\\D/);\n
eval("var date = new Date(" + date.join(",") + ")");\n
}\n
if (typeof (idate) == "object") {\n
date = new Date(idate.toString());\n
}\n
switch (interval) {\n
case "y": date.setFullYear(date.getFullYear() + number); break;\n
case "m": date.setMonth(date.getMonth() + number); break;\n
case "d": date.setDate(date.getDate() + number); break;\n
case "w": date.setDate(date.getDate() + 7 * number); break;\n
case "h": date.setHours(date.getHours() + number); break;\n
case "n": date.setMinutes(date.getMinutes() + number); break;\n
case "s": date.setSeconds(date.getSeconds() + number); break;\n
case "l": date.setMilliseconds(date.getMilliseconds() + number); break;\n
}\n
return date;\n
}\n
}\n
if (!DateDiff || typeof (DateDiff) != "function") {\n
var DateDiff = function(interval, d1, d2) {\n
switch (interval) {\n
case "d": //date\n
case "w":\n
d1 = new Date(d1.getFullYear(), d1.getMonth(), d1.getDate());\n
d2 = new Date(d2.getFullYear(), d2.getMonth(), d2.getDate());\n
break; //w\n
case "h":\n
d1 = new Date(d1.getFullYear(), d1.getMonth(), d1.getDate(), d1.getHours());\n
d2 = new Date(d2.getFullYear(), d2.getMonth(), d2.getDate(), d2.getHours());\n
break; //h\n
case "n":\n
d1 = new Date(d1.getFullYear(), d1.getMonth(), d1.getDate(), d1.getHours(), d1.getMinutes());\n
d2 = new Date(d2.getFullYear(), d2.getMonth(), d2.getDate(), d2.getHours(), d2.getMinutes());\n
break;\n
case "s":\n
d1 = new Date(d1.getFullYear(), d1.getMonth(), d1.getDate(), d1.getHours(), d1.getMinutes(), d1.getSeconds());\n
d2 = new Date(d2.getFullYear(), d2.getMonth(), d2.getDate(), d2.getHours(), d2.getMinutes(), d2.getSeconds());\n
break;\n
}\n
var t1 = d1.getTime(), t2 = d2.getTime();\n
var diff = NaN;\n
switch (interval) {\n
case "y": diff = d2.getFullYear() - d1.getFullYear(); break; //y\n
case "m": diff = (d2.getFullYear() - d1.getFullYear()) * 12 + d2.getMonth() - d1.getMonth(); break; //m\n
case "d": diff = Math.floor(t2 / 86400000) - Math.floor(t1 / 86400000); break;\n
case "w": diff = Math.floor((t2 + 345600000) / (604800000)) - Math.floor((t1 + 345600000) / (604800000)); break; //w\n
case "h": diff = Math.floor(t2 / 3600000) - Math.floor(t1 / 3600000); break; //h\n
case "n": diff = Math.floor(t2 / 60000) - Math.floor(t1 / 60000); break; //\n
case "s": diff = Math.floor(t2 / 1000) - Math.floor(t1 / 1000); break; //s\n
case "l": diff = t2 - t1; break;\n
}\n
return diff;\n
\n
}\n
}\n
var userAgent = window.navigator.userAgent.toLowerCase();\n
$.browser.msie8 = $.browser.msie && /msie 8\\.0/i.test(userAgent);\n
$.browser.msie7 = $.browser.msie && /msie 7\\.0/i.test(userAgent);\n
$.browser.msie6 = !$.browser.msie8 && !$.browser.msie7 && $.browser.msie && /msie 6\\.0/i.test(userAgent);\n
if ($.fn.noSelect == undefined) {\n
$.fn.noSelect = function(p) { //no select plugin by me :-)\n
if (p == null)\n
prevent = true;\n
else\n
prevent = p;\n
if (prevent) {\n
return this.each(function() {\n
if ($.browser.msie || $.browser.safari) $(this).bind(\'selectstart\', function() { return false; });\n
else if ($.browser.mozilla) {\n
$(this).css(\'MozUserSelect\', \'none\');\n
$(\'body\').trigger(\'focus\');\n
}\n
else if ($.browser.opera) $(this).bind(\'mousedown\', function() { return false; });\n
else $(this).attr(\'unselectable\', \'on\');\n
});\n
\n
} else {\n
return this.each(function() {\n
if ($.browser.msie || $.browser.safari) $(this).unbind(\'selectstart\');\n
else if ($.browser.mozilla) $(this).css(\'MozUserSelect\', \'inherit\');\n
else if ($.browser.opera) $(this).unbind(\'mousedown\');\n
else $(this).removeAttr(\'unselectable\', \'on\');\n
});\n
\n
}\n
}; //end noSelect\n
};\n
$.fn.datepicker = function(o) {\n
var def = {\n
weekStart: 0,\n
weekName: [i18n.datepicker.dateformat.sun, i18n.datepicker.dateformat.mon, i18n.datepicker.dateformat.tue, i18n.datepicker.dateformat.wed, i18n.datepicker.dateformat.thu, i18n.datepicker.dateformat.fri, i18n.datepicker.dateformat.sat], //week language support\n
monthName: [i18n.datepicker.dateformat.jan, i18n.datepicker.dateformat.feb, i18n.datepicker.dateformat.mar, i18n.datepicker.dateformat.apr, i18n.datepicker.dateformat.may, i18n.datepicker.dateformat.jun, i18n.datepicker.dateformat.jul, i18n.datepicker.dateformat.aug, i18n.datepicker.dateformat.sep, i18n.datepicker.dateformat.oct, i18n.datepicker.dateformat.nov, i18n.datepicker.dateformat.dec],\n
monthp: i18n.datepicker.dateformat.postfix,\n
Year: new Date().getFullYear(), //default year\n
Month: new Date().getMonth() + 1, //default month\n
Day: new Date().getDate(), //default date\n
today: new Date(),\n
btnOk: i18n.datepicker.ok,\n
btnCancel: i18n.datepicker.cancel,\n
btnToday: i18n.datepicker.today,\n
inputDate: null,\n
onReturn: false,\n
version: "1.1",\n
applyrule: false, //function(){};return rule={startdate,endate};\n
showtarget: null,\n
picker: ""\n
};\n
$.extend(def, o);\n
var cp = $("#BBIT_DP_CONTAINER");\n
if (cp.length == 0) {\n
var cpHA = [];\n
cpHA.push("<div id=\'BBIT_DP_CONTAINER\' class=\'bbit-dp\' style=\'width:175px;z-index:999;\'>");\n
if ($.browser.msie6) {\n
cpHA.push(\'<iframe style="position:absolute;z-index:-1;width:100%;height:205px;top:0;left:0;scrolling:no;" frameborder="0" src="about:blank"></iframe>\');\n
}\n
cpHA.push("<table class=\'dp-maintable\' cellspacing=\'0\' cellpadding=\'0\' style=\'width:175px;\'><tbody><tr><td>");\n
//caption bar goes here\n
cpHA.push("<table class=\'bbit-dp-top\' cellspacing=\'0\'><tr><td class=\'bbit-dp-top-left\'> <a id=\'BBIT_DP_LEFTBTN\' href=\'javascript:void(0);\' title=\'", i18n.datepicker.prev_month_title, "\'>&nbsp;</a></td><td class=\'bbit-dp-top-center\' align=\'center\'><em><button id=\'BBIT_DP_YMBTN\'></button></em></td><td class=\'bbit-dp-top-right\'><a id=\'BBIT_DP_RIGHTBTN\' href=\'javascript:void(0);\' title=\'", i18n.datepicker.next_month_title, "\'>&nbsp;</a></td></tr></table>");\n
cpHA.push("</td></tr>");\n
cpHA.push("<tr><td>");\n
//week \n
cpHA.push("<table id=\'BBIT_DP_INNER\' class=\'bbit-dp-inner\' cellspacing=\'0\'><thead><tr>");\n
//calculat for week\n
for (var i = def.weekStart, j = 0; j < 7; j++) {\n
cpHA.push("<th><span>", def.weekName[i], "</span></th>");\n
if (i == 6) { i = 0; } else { i++; }\n
}\n
cpHA.push("</tr></thead>");\n
//to generat tBody, everything need to rebuilt\n
cpHA.push("<tbody></tbody></table>");\n
//end tbody\n
cpHA.push("</td></tr>");\n
cpHA.push("<tr><td class=\'bbit-dp-bottom\' align=\'center\'><button id=\'BBIT-DP-TODAY\'>", def.btnToday, "</button></td></tr>");\n
cpHA.push("</tbody></table>");\n
//for drop down to select year & month\n
cpHA.push("<div id=\'BBIT-DP-MP\' class=\'bbit-dp-mp\' style=\'z-index:auto;\'><table id=\'BBIT-DP-T\' style=\'width: 175px; height: 193px\' border=\'0\' cellspacing=\'0\'><tbody>");\n
cpHA.push("<tr>");\n
//tow buttons for Jan & Jul\n
cpHA.push("<td class=\'bbit-dp-mp-month\' xmonth=\'0\'><a href=\'javascript:void(0);\'>", def.monthName[0], "</a></td><td class=\'bbit-dp-mp-month bbit-dp-mp-sep\' xmonth=\'6\'><a href=\'javascript:void(0);\'>", def.monthName[6], "</a></td><td class=\'bbit-dp-mp-ybtn\' align=\'middle\'><a id=\'BBIT-DP-MP-PREV\' class=\'bbit-dp-mp-prev\'></a></td><td class=\'bbit-dp-mp-ybtn\' align=\'middle\'><a id=\'BBIT-DP-MP-NEXT\' class=\'bbit-dp-mp-next\'></a></td>");\n
cpHA.push("</tr>");\n
cpHA.push("<tr>");\n
cpHA.push("<td class=\'bbit-dp-mp-month\' xmonth=\'1\'><a href=\'javascript:void(0);\'>", def.monthName[1], "</a></td><td class=\'bbit-dp-mp-month bbit-dp-mp-sep\' xmonth=\'7\'><a href=\'javascript:void(0);\'>", def.monthName[7], "</a></td><td class=\'bbit-dp-mp-year\'><a href=\'javascript:void(0);\'></a></td><td class=\'bbit-dp-mp-year\'><a href=\'javascript:void(0);\'></a></td>");\n
cpHA.push("</tr>");\n
cpHA.push("<tr>");\n
cpHA.push("<td class=\'bbit-dp-mp-month\' xmonth=\'2\'><a href=\'javascript:void(0);\'>", def.monthName[2], "</a></td><td class=\'bbit-dp-mp-month bbit-dp-mp-sep\' xmonth=\'8\'><a href=\'javascript:void(0);\'>", def.monthName[8], "</a></td><td class=\'bbit-dp-mp-year\'><a href=\'javascript:void(0);\'></a></td><td class=\'bbit-dp-mp-year\'><a href=\'javascript:void(0);\'></a></td>");\n
cpHA.push("</tr>");\n
cpHA.push("<tr>");\n
cpHA.push("<td class=\'bbit-dp-mp-month\' xmonth=\'3\'><a href=\'javascript:void(0);\'>", def.monthName[3], "</a></td><td class=\'bbit-dp-mp-month bbit-dp-mp-sep\' xmonth=\'9\'><a href=\'javascript:void(0);\'>", def.monthName[9], "</a></td><td class=\'bbit-dp-mp-year\'><a href=\'javascript:void(0);\'></a></td><td class=\'bbit-dp-mp-year\'><a href=\'javascript:void(0);\'></a></td>");\n
cpHA.push("</tr>");\n
\n
cpHA.push("<tr>");\n
cpHA.push("<td class=\'bbit-dp-mp-month\' xmonth=\'4\'><a href=\'javascript:void(0);\'>", def.monthName[4], "</a></td><td class=\'bbit-dp-mp-month bbit-dp-mp-sep\' xmonth=\'10\'><a href=\'javascript:void(0);\'>", def.monthName[10], "</a></td><td class=\'bbit-dp-mp-year\'><a href=\'javascript:void(0);\'></a></td><td class=\'bbit-dp-mp-year\'><a href=\'javascript:void(0);\'></a></td>");\n
cpHA.push("</tr>");\n
\n
cpHA.push("<tr>");\n
cpHA.push("<td class=\'bbit-dp-mp-month\' xmonth=\'5\'><a href=\'javascript:void(0);\'>", def.monthName[5], "</a></td><td class=\'bbit-dp-mp-month bbit-dp-mp-sep\' xmonth=\'11\'><a href=\'javascript:void(0);\'>", def.monthName[11], "</a></td><td class=\'bbit-dp-mp-year\'><a href=\'javascript:void(0);\'></a></td><td class=\'bbit-dp-mp-year\'><a href=\'javascript:void(0);\'></a></td>");\n
cpHA.push("</tr>");\n
cpHA.push("<tr class=\'bbit-dp-mp-btns\'>");\n
cpHA.push("<td colspan=\'4\'><button id=\'BBIT-DP-MP-OKBTN\' class=\'bbit-dp-mp-ok\'>", def.btnOk, "</button><button id=\'BBIT-DP-MP-CANCELBTN\' class=\'bbit-dp-mp-cancel\'>", def.btnCancel, "</button></td>");\n
cpHA.push("</tr>");\n
\n
cpHA.push("</tbody></table>");\n
cpHA.push("</div>");\n
cpHA.push("</div>");\n
\n
var s = cpHA.join("");\n
$(document.body).append(s);\n
cp = $("#BBIT_DP_CONTAINER");\n
\n
initevents();\n
}\n
function initevents() {\n
//1 today btn;\n
$("#BBIT-DP-TODAY").click(returntoday);\n
cp.click(returnfalse);\n
$("#BBIT_DP_INNER tbody").click(tbhandler);\n
$("#BBIT_DP_LEFTBTN").click(prevm);\n
$("#BBIT_DP_RIGHTBTN").click(nextm);\n
$("#BBIT_DP_YMBTN").click(showym);\n
$("#BBIT-DP-MP").click(mpclick).dblclick(mpdblclick);\n
\n
$("#BBIT-DP-MP-PREV").click(mpprevy);\n
$("#BBIT-DP-MP-NEXT").click(mpnexty);\n
$("#BBIT-DP-MP-OKBTN").click(mpok);\n
$("#BBIT-DP-MP-CANCELBTN").click(mpcancel);\n
}\n
function mpcancel() {\n
$("#BBIT-DP-MP").animate({ top: -193 }, { duration: 200, complete: function() { $("#BBIT-DP-MP").hide(); } });\n
return false;\n
}\n
function mpok() {\n
def.Year = def.cy;\n
def.Month = def.cm + 1;\n
def.Day = 1;\n
$("#BBIT-DP-MP").animate({ top: -193 }, { duration: 200, complete: function() { $("#BBIT-DP-MP").hide(); } });\n
writecb();\n
return false;\n
}\n
function mpprevy() {\n
var y = def.ty - 10\n
def.ty = y;\n
rryear(y);\n
return false;\n
}\n
function mpnexty() {\n
var y = def.ty + 10\n
def.ty = y;\n
rryear(y);\n
return false;\n
}\n
function rryear(y) {\n
var s = y - 4;\n
var ar = [];\n
for (var i = 0; i < 5; i++) {\n
ar.push(s + i);\n
ar.push(s + i + 5);\n
}\n
$("#BBIT-DP-MP td.bbit-dp-mp-year").each(function(i) {\n
if (def.Year == ar[i]) {\n
$(this).addClass("bbit-dp-mp-sel");\n
}\n
else {\n
$(this).removeClass("bbit-dp-mp-sel");\n
}\n
$(this).html("<a href=\'javascript:void(0);\'>" + ar[i] + "</a>").attr("xyear", ar[i]);\n
});\n
}\n
function mpdblclick(e) {\n
var et = e.target || e.srcElement;\n
var td = getTd(et);\n
if (td == null) {\n
return false;\n
}\n
if ($(td).hasClass("bbit-dp-mp-month") || $(td).hasClass("bbit-dp-mp-year")) {\n
mpok(e);\n
}\n
return false;\n
}\n
function mpclick(e) {\n
var panel = $(this);\n
var et = e.target || e.srcElement;\n
var td = getTd(et);\n
if (td == null) {\n
return false;\n
}\n
if ($(td).hasClass("bbit-dp-mp-month")) {\n
if (!$(td).hasClass("bbit-dp-mp-sel")) {\n
var ctd = panel.find("td.bbit-dp-mp-month.bbit-dp-mp-sel");\n
if (ctd.length > 0) {\n
ctd.removeClass("bbit-dp-mp-sel");\n
}\n
$(td).addClass("bbit-dp-mp-sel")\n
def.cm = parseInt($(td).attr("xmonth"));\n
}\n
}\n
if ($(td).hasClass("bbit-dp-mp-year")) {\n
if (!$(td).hasClass("bbit-dp-mp-sel")) {\n
var ctd = panel.find("td.bbit-dp-mp-year.bbit-dp-mp-sel");\n
if (ctd.length > 0) {\n
ctd.removeClass("bbit-dp-mp-sel");\n
}\n
$(td).addClass("bbit-dp-mp-sel")\n
def.cy = parseInt($(td).attr("xyear"));\n
}\n
}\n
return false;\n
}\n
function showym() {\n
var mp = $("#BBIT-DP-MP");\n
var y = def.Year;\n
def.cy = def.ty = y;\n
var m = def.Month - 1;\n
def.cm = m;\n
var ms = $("#BBIT-DP-MP td.bbit-dp-mp-month");\n
for (var i = ms.length - 1; i >= 0; i--) {\n
var ch = $(ms[i]).attr("xmonth");\n
if (ch == m) {\n
$(ms[i]).addClass("bbit-dp-mp-sel");\n
}\n
else {\n
$(ms[i]).removeClass("bbit-dp-mp-sel");\n
}\n
}\n
rryear(y);\n
mp.css("top", -193).show().animate({ top: 0 }, { duration: 200 });\n
}\n
function getTd(elm) {\n
if (elm.tagName.toUpperCase() == "TD") {\n
return elm;\n
}\n
else if (elm.tagName.toUpperCase() == "BODY") {\n
return null;\n
}\n
else {\n
var p = $(elm).parent();\n
if (p.length > 0) {\n
if (p[0].tagName.toUpperCase() != "TD") {\n
return getTd(p[0]);\n
}\n
else {\n
return p[0];\n
}\n
}\n
}\n
return null;\n
}\n
function tbhandler(e) {\n
var et = e.target || e.srcElement;\n
var td = getTd(et);\n
if (td == null) {\n
return false;\n
}\n
var $td = $(td);\n
if (!$(td).hasClass("bbit-dp-disabled")) {\n
var s = $td.attr("xdate"); \n
cp.data("indata",stringtodate(s));\n
returndate();\n
}\n
return false;\n
}\n
function returnfalse() {\n
return false;\n
}\n
\n
function stringtodate(datestr) {\n
try\n
{\n
var arrs = datestr.split(i18n.datepicker.dateformat.separator);\n
var year = parseInt(arrs[i18n.datepicker.dateformat.year_index]);\n
var month = parseInt(arrs[i18n.datepicker.dateformat.month_index]) - 1;\n
var day = parseInt(arrs[i18n.datepicker.dateformat.day_index]);\n
return new Date(year, month, day);\n
}\n
catch(e)\n
{\n
return null;\n
}\n
}\n
function prevm() {\n
if (def.Month == 1) {\n
def.Year--;\n
def.Month = 12;\n
}\n
else {\n
def.Month--\n
}\n
writecb();\n
return false;\n
}\n
function nextm() {\n
if (def.Month == 12) {\n
def.Year++;\n
def.Month = 1;\n
}\n
else {\n
def.Month++\n
}\n
writecb();\n
return false;\n
}\n
function returntoday() {\n
cp.data("indata", new Date());\n
returndate();\n
}\n
function returndate() {\n
var ct = cp.data("ctarget");\n
var ck = cp.data("cpk");\n
var re = cp.data("onReturn");\n
var ndate = cp.data("indata")\n
var ads = cp.data("ads");\n
var ade = cp.data("ade");\n
var dis = false;\n
if (ads && ndate < ads) {\n
dis = true;\n
}\n
if (ade && ndate > ade) {\n
dis = true;\n
}\n
if (dis) {\n
return;\n
}\n
if (re && jQuery.isFunction(re)) {\n
re.call(ct[0], cp.data("indata"));\n
}\n
else {\n
ct.val(dateFormat.call(cp.data("indata"), i18n.datepicker.dateformat.fulldayvalue));\n
}\n
ck.attr("isshow", "0");\n
cp.removeData("ctarget").removeData("cpk").removeData("indata").removeData("onReturn")\n
.removeData("ads").removeData("ade");\n
cp.css("visibility", "hidden");\n
ct = ck = null;\n
}\n
function writecb() {\n
var tb = $("#BBIT_DP_INNER tbody");\n
$("#BBIT_DP_YMBTN").html(def.monthName[def.Month - 1] + def.monthp + " " + def.Year);\n
var firstdate = new Date(def.Year, def.Month - 1, 1);\n
\n
var diffday = def.weekStart - firstdate.getDay();\n
var showmonth = def.Month - 1;\n
if (diffday > 0) {\n
diffday -= 7;\n
}\n
var startdate = DateAdd("d", diffday, firstdate);\n
var enddate = DateAdd("d", 42, startdate);\n
var ads = cp.data("ads");\n
var ade = cp.data("ade");\n
var bhm = [];\n
var tds = dateFormat.call(def.today, i18n.datepicker.dateformat.fulldayvalue);\n
var indata = cp.data("indata");\n
var ins = indata != null ? dateFormat.call(indata, i18n.datepicker.dateformat.fulldayvalue) : "";\n
for (var i = 1; i <= 42; i++) {\n
if (i % 7 == 1) {\n
bhm.push("<tr>");\n
}\n
var ndate = DateAdd("d", i - 1, startdate);\n
var tdc = [];\n
var dis = false;\n
if (ads && ndate < ads) {\n
dis = true;\n
}\n
if (ade && ndate > ade) {\n
dis = true;\n
}\n
if (ndate.getMonth() < showmonth) {\n
tdc.push("bbit-dp-prevday");\n
}\n
else if (ndate.getMonth() > showmonth) {\n
tdc.push("bbit-dp-nextday");\n
}\n
\n
if (dis) {\n
tdc.push("bbit-dp-disabled");\n
}\n
else {\n
tdc.push("bbit-dp-active");\n
}\n
\n
var s = dateFormat.call(ndate, i18n.datepicker.dateformat.fulldayvalue);\n
if (s == tds) {\n
tdc.push("bbit-dp-today");\n
}\n
if (s == ins) {\n
tdc.push("bbit-dp-selected");\n
}\n
\n
bhm.push("<td class=\'", tdc.join(" "), "\' title=\'", dateFormat.call(ndate, i18n.datepicker.dateformat.fulldayvalue), "\' xdate=\'", dateFormat.call(ndate, i18n.datepicker.dateformat.fulldayvalue), "\'><a href=\'javascript:void(0);\'><em><span>", ndate.getDate(), "</span></em></a></td>");\n
if (i % 7 == 0) {\n
bhm.push("</tr>");\n
}\n
}\n
tb.html(bhm.join(""));\n
}\n
\n
return $(this).each(function() {\n
var obj = $(this).addClass("bbit-dp-input");\n
var picker = $(def.picker);\n
def.showtarget == null && obj.after(picker);\n
picker.click(function(e) {\n
var isshow = $(this).attr("isshow");\n
//hide it initially\n
var me = $(this);\n
\n
if (cp.css("visibility") == "visible") {\n
cp.css(" visibility", "hidden");\n
}\n
if (isshow == "1") {\n
me.attr("isshow", "0");\n
cp.removeData("ctarget").removeData("cpk").removeData("indata").removeData("onReturn");\n
return false;\n
}\n
var v = obj.val();\n
if (v != "") {\n
v = stringtodate(v);\n
}\n
if (v == null || v == "") {\n
def.Year = new Date().getFullYear();\n
def.Month = new Date().getMonth() + 1;\n
def.Day = new Date().getDate();\n
def.inputDate = null\n
}\n
else {\n
def.Year = v.getFullYear();\n
def.Month =v.getMonth() + 1;\n
def.Day = v.getDate();\n
def.inputDate = v;\n
}\n
cp.data("ctarget", obj).data("cpk", me).data("indata", def.inputDate).data("onReturn", def.onReturn);\n
if (def.applyrule && $.isFunction(def.applyrule)) {\n
var rule = def.applyrule.call(obj, obj[0].id);\n
if (rule) {\n
if (rule.startdate) {\n
cp.data("ads", rule.startdate);\n
}\n
else {\n
cp.removeData("ads");\n
}\n
if (rule.enddate) {\n
cp.data("ade", rule.enddate);\n
}\n
else {\n
cp.removeData("ade");\n
}\n
}\n
}\n
else {\n
cp.removeData("ads").removeData("ade")\n
}\n
writecb();\n
\n
\n
$("#BBIT-DP-T").height(cp.height());\n
var t = def.showtarget || obj;\n
var pos = t.offset();\n
var height = t.outerHeight();\n
var newpos = { left: pos.left, top: pos.top + height };\n
var w = cp.width();\n
var h = cp.height();\n
var bw = document.documentElement.clientWidth;\n
var bh = document.documentElement.clientHeight;\n
if ((newpos.left + w) >= bw) {\n
newpos.left = bw - w - 2;\n
}\n
if ((newpos.top + h) >= bh) {\n
newpos.top = pos.top - h - 2;\n
}\n
if (newpos.left < 0) {\n
newpos.left = 10;\n
}\n
if (newpos.top < 0) {\n
newpos.top = 10;\n
}\n
$("#BBIT-DP-MP").hide();\n
newpos.visibility = "visible";\n
cp.css(newpos);\n
$(this).attr("isshow", "1");\n
\n
$(document).one("click", function(e) {\n
me.attr("isshow", "0");\n
cp.removeData("ctarget").removeData("cpk").removeData("indata");\n
cp.css("visibility", "hidden");\n
});\n
\n
return false;\n
});\n
});\n
};\n
})(jQuery);
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>26427</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>jquery.datepicker.js</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
8 9
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment