1.1.2 개발 버전을 trunk로 복사
git-svn-id: http://xe-core.googlecode.com/svn/trunk@5136 201d5d3c-b55e-5fd7-737f-ddc643e51545
|
|
@ -1,47 +1,32 @@
|
||||||
var url_regx = /((http|https|ftp|news|telnet|irc):\/\/(([0-9a-z\-._~!$&'\(\)*+,;=:]|(%[0-9a-f]{2}))*\@)?((\[(((([0-9a-f]{1,4}:){6}([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|(::([0-9a-f]{1,4}:){5}([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|(([0-9a-f]{1,4})?::([0-9a-f]{1,4}:){4}([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|((([0-9a-f]{1,4}:)?[0-9a-f]{1,4})?::([0-9a-f]{1,4}:){3}([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|((([0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::([0-9a-f]{1,4}:){2}([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|((([0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|((([0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|((([0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4})|((([0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::))|(v[0-9a-f]+.[0-9a-z\-._~!$&'\(\)*+,;=:]+))\])|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5]))|(([0-9a-z\-._~!$&'\(\)*+,;=]|(%[0-9a-f]{2}))+))(:[0-9]*)?(\/([0-9a-z\-._~!$&'\(\)*+,;=:@]|(%[0-9a-f]{2}))*)*(\?([0-9a-z\-._~!$&'\(\)*+,;=:@\/\?]|(%[0-9a-f]{2}))*)?(#([0-9a-z\-._~!$&'\(\)*+,;=:@\/\?]|(%[0-9a-f]{2}))*)?)/i;
|
|
||||||
function replaceHrefLink(target_obj)
|
|
||||||
{
|
|
||||||
var obj_list = new Array();
|
|
||||||
var obj = target_obj;
|
|
||||||
while(obj) {
|
|
||||||
obj_list[obj_list.length] = obj;
|
|
||||||
obj = obj.nextSibling;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(var i=0;i<obj_list.length;i++) {
|
|
||||||
var obj = obj_list[i];
|
|
||||||
var pObj = obj.parentNode;
|
|
||||||
if(!pObj) continue;
|
|
||||||
|
|
||||||
var pN = pObj.nodeName.toLowerCase();
|
jQuery(function($) {
|
||||||
if(pN == 'a' || pN == 'pre' || pN == 'xml' || pN == 'textarea' || pN == 'input')
|
var url_regx = /((http|https|ftp|news|telnet|irc):\/\/(([0-9a-z\-._~!$&'\(\)*+,;=:]|(%[0-9a-f]{2}))*\@)?((\[(((([0-9a-f]{1,4}:){6}([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|(::([0-9a-f]{1,4}:){5}([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|(([0-9a-f]{1,4})?::([0-9a-f]{1,4}:){4}([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|((([0-9a-f]{1,4}:)?[0-9a-f]{1,4})?::([0-9a-f]{1,4}:){3}([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|((([0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::([0-9a-f]{1,4}:){2}([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|((([0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|((([0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|((([0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4})|((([0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::))|(v[0-9a-f]+.[0-9a-z\-._~!$&'\(\)*+,;=:]+))\])|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5]))|(([0-9a-z\-._~!$&'\(\)*+,;=]|(%[0-9a-f]{2}))+))(:[0-9]*)?(\/([0-9a-z\-._~!$&'\(\)*+,;=:@]|(%[0-9a-f]{2}))*)*(\?([0-9a-z\-._~!$&'\(\)*+,;=:@\/\?]|(%[0-9a-f]{2}))*)?(#([0-9a-z\-._~!$&'\(\)*+,;=:@\/\?]|(%[0-9a-f]{2}))*)?)/i;
|
||||||
continue;
|
|
||||||
|
function replaceHrefLink(target_obj) {
|
||||||
if(obj.nodeType == 3 && obj.data && url_regx.test(obj.data) ) {
|
var obj = target_obj;
|
||||||
var html = obj.nodeValue.split('<');
|
var obj_list = obj.childNodes;
|
||||||
for(var i=0;i<html.length;i++) {
|
|
||||||
var html2 = html[i].split('>');
|
for(var i=0; i < obj_list.length; ++i) {
|
||||||
for(var j=0;j<html2.length;j++)
|
var obj = obj_list[i];
|
||||||
html2[j] = html2[j].replace(url_regx,"<a href=\"$1\" onclick=\"window.open(this.href); return false;\">$1<\/a>");
|
var pObj = obj.parentNode;
|
||||||
html[i] = html2.join('>');
|
if(!pObj) continue;
|
||||||
|
|
||||||
|
var pN = pObj.nodeName.toLowerCase();
|
||||||
|
if($.inArray(pN, ['a', 'pre', 'xml', 'textarea', 'input']) != -1) continue;
|
||||||
|
|
||||||
|
if(obj.nodeType == 3 && obj.length >= 10) {
|
||||||
|
var html = obj.nodeValue.replace(url_regx, '<a href="$1" onclick="window.open(this.href); return false;">$1</a>');
|
||||||
|
$(obj).replaceWith(html);
|
||||||
|
delete(html);
|
||||||
|
|
||||||
|
} else if(obj.nodeType == 1 && obj.childNodes.length) {
|
||||||
|
if($.inArray(obj.nodeName.toLowerCase(), ['a', 'pre', 'xml', 'textarea', 'input']) != -1) continue;
|
||||||
|
replaceHrefLink(obj);
|
||||||
}
|
}
|
||||||
var output = html.join('<');
|
|
||||||
var dummy = xCreateElement('span');
|
|
||||||
xInnerHtml(dummy, output);
|
|
||||||
pObj.insertBefore(dummy, obj);
|
|
||||||
pObj.removeChild(obj);
|
|
||||||
}
|
}
|
||||||
else if(obj.nodeType == 1 && obj.firstChild)
|
|
||||||
replaceHrefLink(obj.firstChild);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function addUrlLink() {
|
$('.xe_content').each(function() {
|
||||||
var objs = xGetElementsByClassName('xe_content');
|
if(url_regx.test($(this).text())) replaceHrefLink(this);
|
||||||
if(objs.length<1) return;
|
});
|
||||||
for(var i=0;i<objs.length;i++) {
|
});
|
||||||
if(url_regx.test(xInnerHtml(objs[i]))) replaceHrefLink(objs[i].firstChild);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
xAddEventListener(window,'load', addUrlLink);
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<title xml:lang="ge">Auto-Link Addon</title>
|
<title xml:lang="ge">Auto-Link Addon</title>
|
||||||
<title xml:lang="zh-TW">自動連結</title>
|
<title xml:lang="zh-TW">自動連結</title>
|
||||||
<description xml:lang="ko">
|
<description xml:lang="ko">
|
||||||
게시글과 댓글의 내용중 http로 시작되는 일반 문자열에 자동으로 링크를 걸고 각 링크에 마우스 오버시 새창과 현재창 메뉴가 나타나도록 꾸미는 애드온입니다.
|
글과 댓글의 내용 중 URL 문자열에 링크를 걸어주는 애드온입니다.
|
||||||
</description>
|
</description>
|
||||||
<description xml:lang="jp">
|
<description xml:lang="jp">
|
||||||
書き込み本文とコメントの内容にhttpで始まる一般文字列にリンクを貼り付け、そのリンクにマウスオーバする際、別ウィンドウと同一ウィンドウに表示させるメニュが現れるアドオンです。
|
書き込み本文とコメントの内容にhttpで始まる一般文字列にリンクを貼り付け、そのリンクにマウスオーバする際、別ウィンドウと同一ウィンドウに表示させるメニュが現れるアドオンです。
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
Kommentare beginnen mit http naeyongjung Thema der gemeinsamen String automatisch Link zu hängen Sie mit der Maus über die einzelnen Links und saechang Stadt und auf dem Menü des Add-On Dekoration.
|
Kommentare beginnen mit http naeyongjung Thema der gemeinsamen String automatisch Link zu hängen Sie mit der Maus über die einzelnen Links und saechang Stadt und auf dem Menü des Add-On Dekoration.
|
||||||
</description>
|
</description>
|
||||||
<description xml:lang="zh-TW">
|
<description xml:lang="zh-TW">
|
||||||
主題及評論中以http開頭的字串,自動轉換成連結。當滑鼠移到連結上方時,會顯示(新視窗/本頁面)選擇框。
|
是種可將主題和評論內容中的URL網址字串自動轉換成連結的附加元件。
|
||||||
</description>
|
</description>
|
||||||
<version>0.1</version>
|
<version>0.1</version>
|
||||||
<date>2008-04-22</date>
|
<date>2008-04-22</date>
|
||||||
|
|
@ -45,4 +45,4 @@
|
||||||
<name xml:lang="ge">zero</name>
|
<name xml:lang="ge">zero</name>
|
||||||
<name xml:lang="zh-TW">zero</name>
|
<name xml:lang="zh-TW">zero</name>
|
||||||
</author>
|
</author>
|
||||||
</addon>
|
</addon>
|
||||||
|
|
@ -51,10 +51,10 @@
|
||||||
Только выбор опции использовать включает поведение RSD тега и api.
|
Только выбор опции использовать включает поведение RSD тега и api.
|
||||||
</description>
|
</description>
|
||||||
<description xml:lang="zh-TW">
|
<description xml:lang="zh-TW">
|
||||||
支援 metaWeblog的部落格 API插件。
|
支援MetaWeblog的部落格API附加元件。
|
||||||
設置成"啟用"時,會使每個模組都顯示 RSD圖示。
|
設置成"啟用"時,會使每個模組都顯示RSD圖示。
|
||||||
API地址是http://安裝位置/模組名稱/api。
|
API網址是 http://安裝位置/模組名稱/api。
|
||||||
將狀態設置成"啟用"時,才可使用 RSD標籤及 API。
|
將狀態設置成"啟用"時,才可使用RSD和API
|
||||||
</description>
|
</description>
|
||||||
<version>0.1</version>
|
<version>0.1</version>
|
||||||
<date>2007-02-28</date>
|
<date>2007-02-28</date>
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
Для сбора информации необходимо включить этот аддон.
|
Для сбора информации необходимо включить этот аддон.
|
||||||
</description>
|
</description>
|
||||||
<description xml:lang="zh-TW">
|
<description xml:lang="zh-TW">
|
||||||
使用 XE的網站訪問統計模組記錄網站訪問資料。
|
使用XE的網站訪問統計模組記錄網站訪問資料。
|
||||||
將狀態設置成"使用"時,才會紀錄網站訪問資料。
|
將狀態設置成"使用"時,才會紀錄網站訪問資料。
|
||||||
</description>
|
</description>
|
||||||
<version>0.1</version>
|
<version>0.1</version>
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,8 @@
|
||||||
<description xml:lang="ge">Bitte geben Sie Ihre SID-Wert ein, die Sie nach Registrierung auf der Website LemonPen.</description>
|
<description xml:lang="ge">Bitte geben Sie Ihre SID-Wert ein, die Sie nach Registrierung auf der Website LemonPen.</description>
|
||||||
<description xml:lang="es">Por favor, de entrada sid valor que había que hacer después de registrarse en el sitio web LemonPen.</description>
|
<description xml:lang="es">Por favor, de entrada sid valor que había que hacer después de registrarse en el sitio web LemonPen.</description>
|
||||||
<description xml:lang="ru">Введите замороженный ценности, которые вы получили после регистрации на сайте LemonPen.</description>
|
<description xml:lang="ru">Введите замороженный ценности, которые вы получили после регистрации на сайте LemonPen.</description>
|
||||||
<description xml:lang="jp">レモンペンのサイトで発行されたsidを入力してください。 (LemonPen:Openmaru社提供)</description>
|
<description xml:lang="jp">レモンペンのサイトから発行されたsidを入力して下さい。 (LemonPen:Openmaru社提供)</description>
|
||||||
<description xml:lang="zh-TW">請輸入註冊LemonPen網站時,所給予的sid值。</description>
|
<description xml:lang="zh-TW">請輸入在LemonPen網站註冊時,所給予的sid值。</description>
|
||||||
</var>
|
</var>
|
||||||
</extra_vars>
|
</extra_vars>
|
||||||
</addon>
|
</addon>
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
쪽지, 친구기능등을 사용하기 위해서는 이 애드온을 사용으로 해주시면 됩니다.
|
쪽지, 친구기능등을 사용하기 위해서는 이 애드온을 사용으로 해주시면 됩니다.
|
||||||
</description>
|
</description>
|
||||||
<description xml:lang="zh-TW">
|
<description xml:lang="zh-TW">
|
||||||
此插件可啟用短訊和新增好友功能。
|
讓會員擁有短訊和新增好友功能。
|
||||||
</description>
|
</description>
|
||||||
<version>0.1</version>
|
<version>0.1</version>
|
||||||
<date>2008-05-28</date>
|
<date>2008-05-28</date>
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
$lang->alert_new_message_arrived = '새로운 메세지가 도착하였습니다. 확인하시겠습니까?';
|
$lang->alert_new_message_arrived = '%d개의 새로운 메시지가 도착하였습니다. 확인하시겠습니까?';
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
$lang->alert_new_message_arrived = '您有新訊息。要確認嗎?';
|
$lang->alert_new_message_arrived = '您收到%d個新訊息。您想要檢視嗎?';
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -11,14 +11,14 @@
|
||||||
* - MemberModel::getMemberMenu 호출시 친구 등록 메뉴를 추가합니다.
|
* - MemberModel::getMemberMenu 호출시 친구 등록 메뉴를 추가합니다.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
// 비로그인 사용자면 중지
|
||||||
|
$logged_info = Context::get('logged_info');
|
||||||
|
if(!$logged_info) return;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 기능 수행 : 팝업 및 회원정보 보기에서 쪽지/친구 메뉴 추가. 시작할때 새쪽지가 왔는지 검사
|
* 기능 수행 : 팝업 및 회원정보 보기에서 쪽지/친구 메뉴 추가. 시작할때 새쪽지가 왔는지 검사
|
||||||
* 조건 : called_position = 'before_module_init', module = 'member'
|
|
||||||
**/
|
**/
|
||||||
if($called_position == 'before_module_init' && $this->module != 'member' && Context::get('is_logged') ) {
|
if($called_position == 'before_module_init' && $this->module != 'member') {
|
||||||
|
|
||||||
// 로그인된 사용자 정보를 구함
|
|
||||||
$logged_info = Context::get('logged_info');
|
|
||||||
|
|
||||||
// 커뮤니케이션 모듈의 언어파일을 읽음
|
// 커뮤니케이션 모듈의 언어파일을 읽음
|
||||||
Context::loadLang('./modules/communication/lang');
|
Context::loadLang('./modules/communication/lang');
|
||||||
|
|
@ -28,31 +28,26 @@
|
||||||
$oMemberController->addMemberMenu('dispCommunicationFriend', 'cmd_view_friend');
|
$oMemberController->addMemberMenu('dispCommunicationFriend', 'cmd_view_friend');
|
||||||
$oMemberController->addMemberMenu('dispCommunicationMessages', 'cmd_view_message_box');
|
$oMemberController->addMemberMenu('dispCommunicationMessages', 'cmd_view_message_box');
|
||||||
|
|
||||||
// 새로운 쪽지에 대한 플래그가 있으면 쪽지 보기 팝업 띄움
|
// 새로운 쪽지에 대한 플래그가 있으면 쪽지 보기 팝업 띄움
|
||||||
$flag_path = './files/member_extra_info/new_message_flags/'.getNumberingPath($logged_info->member_srl);
|
$flag_path = './files/member_extra_info/new_message_flags/'.getNumberingPath($logged_info->member_srl);
|
||||||
$flag_file = sprintf('%s%s', $flag_path, $logged_info->member_srl);
|
$flag_file = sprintf('%s%s', $flag_path, $logged_info->member_srl);
|
||||||
|
|
||||||
if(file_exists($flag_file)) {
|
if(file_exists($flag_file)) {
|
||||||
|
$new_message_count = FileHandler::readFile($flag_file);
|
||||||
FileHandler::removeFile($flag_file);
|
FileHandler::removeFile($flag_file);
|
||||||
Context::loadLang('./addons/member_communication/lang');
|
Context::loadLang('./addons/member_communication/lang');
|
||||||
|
|
||||||
$script = sprintf('<script type="text/javascript"> xAddEventListener(window,"load", function() {if(confirm("%s")) { popopen("%s"); }}); </script>', Context::getLang('alert_new_message_arrived'), Context::getRequestUri().'?module=communication&act=dispCommunicationNewMessage');
|
$script = sprintf('<script type="text/javascript"> jQuery(function() { if(confirm("%s")) { popopen("%s"); } }); </script>', sprintf(Context::getLang('alert_new_message_arrived'), $new_message_count), Context::getRequestUri().'?module=communication&act=dispCommunicationNewMessage');
|
||||||
|
|
||||||
Context::addHtmlHeader( $script );
|
Context::addHtmlHeader( $script );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 기능 수행 : 사용자 이름을 클릭시 요청되는 팝업메뉴의 메뉴에 쪽지 발송, 친구추가등의 링크 추가
|
* 기능 수행 : 사용자 이름을 클릭시 요청되는 팝업메뉴의 메뉴에 쪽지 발송, 친구추가등의 링크 추가
|
||||||
* 조건 : called_position == 'after_module_proc', module = 'member', act = 'getMemberMenu'
|
|
||||||
**/
|
**/
|
||||||
} elseif($called_position == 'before_module_proc' && $this->module == 'member' && $this->act == 'getMemberMenu') {
|
} elseif($called_position == 'before_module_proc' && $this->module == 'member' && $this->act == 'getMemberMenu') {
|
||||||
// 비로그인 사용자라면 패스
|
|
||||||
if(!Context::get('is_logged')) return;
|
|
||||||
|
|
||||||
$oMemberController = &getController('member');
|
$oMemberController = &getController('member');
|
||||||
|
|
||||||
// 로그인된 사용자 정보를 구함
|
|
||||||
$logged_info = Context::get('logged_info');
|
|
||||||
$member_srl = Context::get('target_srl');
|
$member_srl = Context::get('target_srl');
|
||||||
$mid = Context::get('cur_mid');
|
$mid = Context::get('cur_mid');
|
||||||
|
|
||||||
|
|
@ -71,19 +66,19 @@
|
||||||
// 아니라면 쪽지 발송, 친구 등록 추가
|
// 아니라면 쪽지 발송, 친구 등록 추가
|
||||||
} else {
|
} else {
|
||||||
// 대상 회원의 정보를 가져옴
|
// 대상 회원의 정보를 가져옴
|
||||||
$target_member_info = $this->getMemberInfoByMemberSrl($member_srl);
|
$target_member_info = $this->getMemberInfoByMemberSrl($member_srl);
|
||||||
if(!$target_member_info->member_srl) return;
|
if(!$target_member_info->member_srl) return;
|
||||||
|
|
||||||
// 로그인된 사용자 정보를 구함
|
// 로그인된 사용자 정보를 구함
|
||||||
$logged_info = Context::get('logged_info');
|
$logged_info = Context::get('logged_info');
|
||||||
|
|
||||||
// 쪽지 발송 메뉴를 만듬
|
// 쪽지 발송 메뉴를 만듬
|
||||||
if( $logged_info->is_admin == 'Y' || $target_member_info->allow_message =='Y' || ($target_member_info->allow_message == 'F' && $oCommunicationModel->isFriend($member_srl)))
|
if( $logged_info->is_admin == 'Y' || $target_member_info->allow_message =='Y' || ($target_member_info->allow_message == 'F' && $oCommunicationModel->isFriend($member_srl)))
|
||||||
$oMemberController->addMemberPopupMenu(getUrl('','module','communication','act','dispCommunicationSendMessage','receiver_srl',$member_srl), 'cmd_send_message', './modules/communication/tpl/images/icon_write_message.gif', 'popup');
|
$oMemberController->addMemberPopupMenu(getUrl('','module','communication','act','dispCommunicationSendMessage','receiver_srl',$member_srl), 'cmd_send_message', './modules/communication/tpl/images/icon_write_message.gif', 'popup');
|
||||||
|
|
||||||
// 친구 등록 메뉴를 만듬 (이미 등록된 친구가 아닐 경우)
|
// 친구 등록 메뉴를 만듬 (이미 등록된 친구가 아닐 경우)
|
||||||
if(!$oCommunicationModel->isAddedFriend($member_srl))
|
if(!$oCommunicationModel->isAddedFriend($member_srl))
|
||||||
$oMemberController->addMemberPopupMenu(getUrl('','module','communication','act','dispCommunicationAddFriend','target_srl',$member_srl), 'cmd_add_friend', './modules/communication/tpl/images/icon_add_friend.gif', 'popup');
|
$oMemberController->addMemberPopupMenu(getUrl('','module','communication','act','dispCommunicationAddFriend','target_srl',$member_srl), 'cmd_add_friend', './modules/communication/tpl/images/icon_add_friend.gif', 'popup');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
회원이 등록한 이미지이름, 이미지마크를 사용하기 위해서는 이 애드온을 활성화 시키세요.
|
회원이 등록한 이미지이름, 이미지마크를 사용하기 위해서는 이 애드온을 활성화 시키세요.
|
||||||
</description>
|
</description>
|
||||||
<description xml:lang="zh-TW">
|
<description xml:lang="zh-TW">
|
||||||
此插件將把用戶資料中的暱稱圖片、用戶圖示、簽名檔等資料顯示到頁面當中。
|
可將用戶資料中的暱稱圖片、用戶圖示、簽名檔等資料顯示到頁面當中。
|
||||||
</description>
|
</description>
|
||||||
<version>0.2</version>
|
<version>0.2</version>
|
||||||
<date>2007-02-28</date>
|
<date>2007-02-28</date>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<title xml:lang="jp">モバイルXEアドオン</title>
|
<title xml:lang="jp">モバイルXEアドオン</title>
|
||||||
<title xml:lang="zh-CN">手机XE插件</title>
|
<title xml:lang="zh-CN">手机XE插件</title>
|
||||||
<title xml:lang="en">Mobile XE</title>
|
<title xml:lang="en">Mobile XE</title>
|
||||||
<title xml:lang="zh-TW">行動版 XE</title>
|
<title xml:lang="zh-TW">行動 XE</title>
|
||||||
<description xml:lang="ko">
|
<description xml:lang="ko">
|
||||||
모바일에서 접속시 헤더 정보를 분석하여 메뉴 - 모듈의 관계를 이용하여 WAP 태그로 출력하는 애드온입니다.
|
모바일에서 접속시 헤더 정보를 분석하여 메뉴 - 모듈의 관계를 이용하여 WAP 태그로 출력하는 애드온입니다.
|
||||||
wml, hdml, mhtml를 지원하고 그 이외의 경우에는 동작하지 않습니다.
|
wml, hdml, mhtml를 지원하고 그 이외의 경우에는 동작하지 않습니다.
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
Only wml, hdml, mhtml formats are provided.
|
Only wml, hdml, mhtml formats are provided.
|
||||||
</description>
|
</description>
|
||||||
<description xml:lang="zh-TW">
|
<description xml:lang="zh-TW">
|
||||||
透過行動工具連結時,會將網頁轉換為WAP標籤顯示。
|
透過行動工具上網時,會將網頁轉換為WAP標籤顯示。
|
||||||
只限於 wml, hdml, mhtml格式。
|
只限於 wml, hdml, mhtml格式。
|
||||||
</description>
|
</description>
|
||||||
<version>0.1</version>
|
<version>0.1</version>
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
</description>
|
</description>
|
||||||
<description xml:lang="zh-TW">
|
<description xml:lang="zh-TW">
|
||||||
可將原本的域名當做OpenID來使用。
|
可將原本的域名當做OpenID來使用。
|
||||||
必須在設置中輸入openid provider相關值後再使用。
|
必須在設置中輸入openid provider相關資料後再使用。
|
||||||
</description>
|
</description>
|
||||||
<version>0.1</version>
|
<version>0.1</version>
|
||||||
<date>2007-02-28</date>
|
<date>2007-02-28</date>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
<addon version="0.2">
|
<addon version="0.2">
|
||||||
<title xml:lang="ko">플래닛 Bookmark 애드온</title>
|
<title xml:lang="ko">플래닛 Bookmark 애드온</title>
|
||||||
<title xml:lang="zh-CN">微博收藏插件</title>
|
<title xml:lang="zh-CN">微博收藏插件</title>
|
||||||
<title xml:lang="zh-TW">Planet 書籤</title>
|
<title xml:lang="zh-TW">微型部落格書籤</title>
|
||||||
|
<title xml:lang="jp">Planet Bookmark アドオン</title>
|
||||||
<description xml:lang="ko">
|
<description xml:lang="ko">
|
||||||
플래닛 Bookmark 애드온
|
플래닛 Bookmark 애드온
|
||||||
</description>
|
</description>
|
||||||
|
|
@ -10,13 +11,17 @@
|
||||||
XE微博收藏插件。
|
XE微博收藏插件。
|
||||||
</description>
|
</description>
|
||||||
<description xml:lang="zh-TW">
|
<description xml:lang="zh-TW">
|
||||||
Planet 書籤插件
|
微型部落格書籤功能
|
||||||
|
</description>
|
||||||
|
<description xml:lang="jp">
|
||||||
|
Planet Bookmark アドオン
|
||||||
</description>
|
</description>
|
||||||
<version>0.1</version>
|
<version>0.1</version>
|
||||||
<date>2008-10-31</date>
|
<date>2008-10-31</date>
|
||||||
|
|
||||||
<author email_address="zero@zeroboard.com" link="http://blog.nzeo.com">
|
<author email_address="zero@zeroboard.com" link="http://blog.nzeo.com">
|
||||||
<name xml:lang="ko">zero</name>
|
<name xml:lang="ko">zero</name>
|
||||||
|
<name xml:lang="jp">zero</name>
|
||||||
<name xml:lang="zh-CN">zero</name>
|
<name xml:lang="zh-CN">zero</name>
|
||||||
<name xml:lang="zh-TW">zero</name>
|
<name xml:lang="zh-TW">zero</name>
|
||||||
</author>
|
</author>
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ function planetShowBookmarkList(o){
|
||||||
}
|
}
|
||||||
|
|
||||||
function planetBookmarkReload(){
|
function planetBookmarkReload(){
|
||||||
$('commentList').innerHTML = '<div class="commentHeader"><h3 class="exTitle">Bookmark</h3><span class="button strong black todoWrite"><button type="button" onclick="showWritePostBookmark()">Bookmark</button></span></div>\n<div id="bookmarkList" class="commentBody todoManager"></div>\n<div id="todoList_page" class="pagination a1"></div>\n\n<span class="tl"></span><span class="tr"></span><span class="bl"></span><span class="br"></span>\n';
|
$('commentList').innerHTML = '<div class="commentHeader"><h3 class="exTitle">Bookmark</h3><span class="button strong black todoWrite"><button type="button" onclick="showWritePostBookmark()">Bookmark</button></span></div>\n<div id="bookmarkList" class="commentBody todoManager"></div>\n<div id="bookmarkList_page" class="pagination a1"></div>\n\n<span class="tl"></span><span class="tr"></span><span class="bl"></span><span class="br"></span>\n';
|
||||||
planetGetBookmark(0);
|
planetGetBookmark(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
<title xml:lang="ko">플래닛 TODO 애드온</title>
|
<title xml:lang="ko">플래닛 TODO 애드온</title>
|
||||||
<title xml:lang="en">Planet TODO</title>
|
<title xml:lang="en">Planet TODO</title>
|
||||||
<title xml:lang="zh-CN">微博TODO插件</title>
|
<title xml:lang="zh-CN">微博TODO插件</title>
|
||||||
<title xml:lang="zh-TW">Planet TODO 插件</title>
|
<title xml:lang="zh-TW">微型部落格 TODO 功能</title>
|
||||||
|
<title xml:lang="jp">Planet TODO アドオン</title>
|
||||||
<description xml:lang="ko">
|
<description xml:lang="ko">
|
||||||
플래닛 TODO 애드온
|
플래닛 TODO 애드온
|
||||||
</description>
|
</description>
|
||||||
|
|
@ -14,7 +15,10 @@
|
||||||
XE微博TODO插件。
|
XE微博TODO插件。
|
||||||
</description>
|
</description>
|
||||||
<description xml:lang="zh-TW">
|
<description xml:lang="zh-TW">
|
||||||
Planet TODO 插件
|
微型部落格 TODO 功能
|
||||||
|
</description>
|
||||||
|
<description xml:lang="jp">
|
||||||
|
Planet TODO アドオン
|
||||||
</description>
|
</description>
|
||||||
<version>0.1</version>
|
<version>0.1</version>
|
||||||
<date>2008-10-31</date>
|
<date>2008-10-31</date>
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
</description>
|
</description>
|
||||||
<description xml:lang="zh-TW">
|
<description xml:lang="zh-TW">
|
||||||
將rainbow.js新增到header,讓連結顯示成彩虹色。
|
將rainbow.js新增到header,讓連結顯示成彩虹色。
|
||||||
此插件的rainbow.js檔案版權屬於 <a href="http://www.dynamicdrive.com" target="_blank">Dynamicdrive.com</a>
|
rainbow.js檔案版權屬於 <a href="http://www.dynamicdrive.com" target="_blank">Dynamicdrive.com</a>
|
||||||
</description>
|
</description>
|
||||||
<version>0.1</version>
|
<version>0.1</version>
|
||||||
<date>2007-02-28</date>
|
<date>2007-02-28</date>
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
Body Bild eingefügt im Inneren des Körpers zu passen die Größe des Originals zeigen, wenn ich darauf klicke auf das Add-ons.
|
Body Bild eingefügt im Inneren des Körpers zu passen die Größe des Originals zeigen, wenn ich darauf klicke auf das Add-ons.
|
||||||
</description>
|
</description>
|
||||||
<description xml:lang="zh-TW">
|
<description xml:lang="zh-TW">
|
||||||
自動調整文章内的圖片大小,點擊會顯示原始大小的插件。
|
自動調整文章内的圖片大小,點擊圖片後會顯示原始大小。
|
||||||
</description>
|
</description>
|
||||||
<version>0.1</version>
|
<version>0.1</version>
|
||||||
<date>2008-04-22</date>
|
<date>2008-04-22</date>
|
||||||
|
|
@ -43,7 +43,6 @@
|
||||||
<name xml:lang="ge">zero</name>
|
<name xml:lang="ge">zero</name>
|
||||||
<name xml:lang="ru">zero</name>
|
<name xml:lang="ru">zero</name>
|
||||||
<name xml:lang="en">zero</name>
|
<name xml:lang="en">zero</name>
|
||||||
<name xml:lang="jp">zero</name>
|
|
||||||
<name xml:lang="zh-TW">zero</name>
|
<name xml:lang="zh-TW">zero</name>
|
||||||
</author>
|
</author>
|
||||||
</addon>
|
</addon>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<description xml:lang="jp">コメントお知らせアラートのアドオンです。</description>
|
<description xml:lang="jp">コメントお知らせアラートのアドオンです。</description>
|
||||||
<description xml:lang="zh-CN">联动评论通告模块的插件。</description>
|
<description xml:lang="zh-CN">联动评论通告模块的插件。</description>
|
||||||
<description xml:lang="en">This addon enables Comment Notifier module.</description>
|
<description xml:lang="en">This addon enables Comment Notifier module.</description>
|
||||||
<description xml:lang="zh-TW">此插件為評論通知模組。</description>
|
<description xml:lang="zh-TW">是種評論通知模組。</description>
|
||||||
<version>0.2</version>
|
<version>0.2</version>
|
||||||
<date>2008-06-02</date>
|
<date>2008-06-02</date>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,7 @@
|
||||||
else $this->allow_rewrite = false;
|
else $this->allow_rewrite = false;
|
||||||
|
|
||||||
// 기본 JS/CSS 등록
|
// 기본 JS/CSS 등록
|
||||||
|
$this->addJsFile("./common/js/jquery.js");
|
||||||
$this->addJsFile("./common/js/x.js");
|
$this->addJsFile("./common/js/x.js");
|
||||||
$this->addJsFile("./common/js/common.js");
|
$this->addJsFile("./common/js/common.js");
|
||||||
$this->addJsFile("./common/js/xml_handler.js");
|
$this->addJsFile("./common/js/xml_handler.js");
|
||||||
|
|
@ -202,11 +203,21 @@
|
||||||
else $db_info->use_optimizer = 'N';
|
else $db_info->use_optimizer = 'N';
|
||||||
if(!$db_info->qmail_compatibility || $db_info->qmail_compatibility != 'Y') $db_info->qmail_compatibility = 'N';
|
if(!$db_info->qmail_compatibility || $db_info->qmail_compatibility != 'Y') $db_info->qmail_compatibility = 'N';
|
||||||
else $db_info->qmail_compatibility = 'Y';
|
else $db_info->qmail_compatibility = 'Y';
|
||||||
|
if(!$db_info->use_ssl) $db_info->use_ssl = 'none';
|
||||||
|
|
||||||
$this->_setDBInfo($db_info);
|
$this->_setDBInfo($db_info);
|
||||||
|
|
||||||
$GLOBALS['_time_zone'] = $db_info->time_zone;
|
$GLOBALS['_time_zone'] = $db_info->time_zone;
|
||||||
$GLOBALS['_qmail_compatibility'] = $db_info->qmail_compatibility;
|
$GLOBALS['_qmail_compatibility'] = $db_info->qmail_compatibility;
|
||||||
|
$this->set('_use_ssl', $db_info->use_ssl);
|
||||||
|
if($db_info->http_port)
|
||||||
|
{
|
||||||
|
$this->set('_http_port', $db_info->http_port);
|
||||||
|
}
|
||||||
|
if($db_info->https_port)
|
||||||
|
{
|
||||||
|
$this->set('_https_port', $db_info->https_port);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -571,7 +582,7 @@
|
||||||
parse_str($GLOBALS['HTTP_RAW_POST_DATA'],$params);
|
parse_str($GLOBALS['HTTP_RAW_POST_DATA'],$params);
|
||||||
|
|
||||||
foreach($params as $key => $val) {
|
foreach($params as $key => $val) {
|
||||||
$val = $this->_filterRequestVar($key, $val);
|
$val = $this->_filterRequestVar($key, $val,0);
|
||||||
$this->_set($key, $val, true);
|
$this->_set($key, $val, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -590,7 +601,7 @@
|
||||||
unset($params->attrs);
|
unset($params->attrs);
|
||||||
if(!count($params)) return;
|
if(!count($params)) return;
|
||||||
foreach($params as $key => $obj) {
|
foreach($params as $key => $obj) {
|
||||||
$val = $this->_filterRequestVar($key, $obj->body);
|
$val = $this->_filterRequestVar($key, $obj->body,0);
|
||||||
$this->_set($key, $val, true);
|
$this->_set($key, $val, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -599,16 +610,16 @@
|
||||||
* @brief 변수명에 따라서 필터링 처리
|
* @brief 변수명에 따라서 필터링 처리
|
||||||
* _srl, page, cpage등의 변수는 integer로 형변환
|
* _srl, page, cpage등의 변수는 integer로 형변환
|
||||||
**/
|
**/
|
||||||
function _filterRequestVar($key, $val) {
|
function _filterRequestVar($key, $val, $do_stripslashes = 1) {
|
||||||
if( ($key == "page" || $key == "cpage" || substr($key,-3)=="srl")) return !preg_match('/^[0-9,]+$/',$val)?(int)$val:$val;
|
if( ($key == "page" || $key == "cpage" || substr($key,-3)=="srl")) return !preg_match('/^[0-9,]+$/',$val)?(int)$val:$val;
|
||||||
if(is_array($val) && count($val) ) {
|
if(is_array($val) && count($val) ) {
|
||||||
foreach($val as $k => $v) {
|
foreach($val as $k => $v) {
|
||||||
if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()) $v = stripslashes($v);
|
if($do_stripslashes && version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()) $v = stripslashes($v);
|
||||||
$v = trim($v);
|
$v = trim($v);
|
||||||
$val[$k] = $v;
|
$val[$k] = $v;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()) $val = stripslashes($val);
|
if($do_stripslashes && version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()) $val = stripslashes($val);
|
||||||
$val = trim($val);
|
$val = trim($val);
|
||||||
}
|
}
|
||||||
return $val;
|
return $val;
|
||||||
|
|
@ -772,6 +783,7 @@
|
||||||
**/
|
**/
|
||||||
function getRequestUri($ssl_mode = FOLLOW_REQUEST_SSL, $domain = null) {
|
function getRequestUri($ssl_mode = FOLLOW_REQUEST_SSL, $domain = null) {
|
||||||
static $url = array();
|
static $url = array();
|
||||||
|
if(Context::get('_use_ssl') == "always") $ssl_mode = ENFORCE_SSL;
|
||||||
|
|
||||||
if($domain) $domain_key = md5($domain);
|
if($domain) $domain_key = md5($domain);
|
||||||
else $domain_key = 'default';
|
else $domain_key = 'default';
|
||||||
|
|
@ -799,6 +811,19 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$url_info = parse_url('http://'.$target_url);
|
$url_info = parse_url('http://'.$target_url);
|
||||||
|
if($use_ssl)
|
||||||
|
{
|
||||||
|
if(Context::get("_https_port") && Context::get("_https_port") != 443) {
|
||||||
|
$url_info['port'] = Context::get("_https_port");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(Context::get("_http_port") && Context::get("_http_port") != 80) {
|
||||||
|
$url_info['port'] = Context::get("_http_port");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$url[$ssl_mode][$domain_key] = sprintf("%s://%s%s%s",$use_ssl?'https':$url_info['scheme'], $url_info['host'], $url_info['port']&&$url_info['port']!=80?':'.$url_info['port']:'',$url_info['path']);
|
$url[$ssl_mode][$domain_key] = sprintf("%s://%s%s%s",$use_ssl?'https':$url_info['scheme'], $url_info['host'], $url_info['port']&&$url_info['port']!=80?':'.$url_info['port']:'',$url_info['path']);
|
||||||
|
|
||||||
return $url[$ssl_mode][$domain_key];
|
return $url[$ssl_mode][$domain_key];
|
||||||
|
|
@ -1047,6 +1072,33 @@
|
||||||
return $oOptimizer->getOptimizedFiles($this->_getUniqueFileList($this->css_files), "css");
|
return $oOptimizer->getOptimizedFiles($this->_getUniqueFileList($this->css_files), "css");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief javascript plugin load
|
||||||
|
**/
|
||||||
|
function loadJavascriptPlugin($plugin_name) {
|
||||||
|
$oContext = &Context::getInstance();
|
||||||
|
return $oContext->_loadJavascriptPlugin($plugin_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
function _loadJavascriptPlugin($plugin_name) {
|
||||||
|
$plugin_path = './common/js/plugins/'.$plugin_name.'/';
|
||||||
|
if(!is_dir($plugin_path)) return;
|
||||||
|
|
||||||
|
$info_file = $plugin_path.'plugin.load';
|
||||||
|
if(!file_exists($info_file)) return;
|
||||||
|
|
||||||
|
$list = file($info_file);
|
||||||
|
for($i=0,$cnt=count($list);$i<$cnt;$i++) {
|
||||||
|
$filename = trim($list[$i]);
|
||||||
|
if(!$filename) continue;
|
||||||
|
if(substr($filename,0,2)=='./') $filename = substr($filename,2);
|
||||||
|
if(preg_match('/\.js$/i',$filename)) $this->_addJsFile($plugin_path.$filename, false, '');
|
||||||
|
elseif(preg_match('/\.css$/i',$filename)) $this->_addCSSFile($plugin_path.$filename, false, 'all','');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(is_dir($plugin_path.'lang')) $this->_loadLang($plugin_path.'lang');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief HtmlHeader 추가
|
* @brief HtmlHeader 추가
|
||||||
**/
|
**/
|
||||||
|
|
|
||||||
|
|
@ -586,7 +586,7 @@
|
||||||
|
|
||||||
if ($output->order) {
|
if ($output->order) {
|
||||||
foreach($output->order as $key => $val) {
|
foreach($output->order as $key => $val) {
|
||||||
$index_list[] = sprintf('%s %s', $val[0], $val[1]);
|
$index_list[] = sprintf('%s %s', $val[0]=='count'?'count(*)':$val[0], $val[1]);
|
||||||
}
|
}
|
||||||
if(count($index_list)) $query .= ' order by '.implode(',',$index_list);
|
if(count($index_list)) $query .= ' order by '.implode(',',$index_list);
|
||||||
$query = sprintf('%s for orderby_num() between %d and %d', $query, $start_count + 1, $list_count + $start_count);
|
$query = sprintf('%s for orderby_num() between %d and %d', $query, $start_count + 1, $list_count + $start_count);
|
||||||
|
|
@ -606,7 +606,7 @@
|
||||||
|
|
||||||
if($output->order) {
|
if($output->order) {
|
||||||
foreach($output->order as $key => $val) {
|
foreach($output->order as $key => $val) {
|
||||||
$index_list[] = sprintf('%s %s', $val[0], $val[1]);
|
$index_list[] = sprintf('%s %s', $val[0]=='count'?'count(*)':$val[0], $val[1]);
|
||||||
}
|
}
|
||||||
if(count($index_list)) $query .= ' order by '.implode(',',$index_list);
|
if(count($index_list)) $query .= ' order by '.implode(',',$index_list);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -450,7 +450,8 @@
|
||||||
$output = $this->_fetch($result);
|
$output = $this->_fetch($result);
|
||||||
//commit();
|
//commit();
|
||||||
@ibase_commit($this->fd);
|
@ibase_commit($this->fd);
|
||||||
|
if(!$output) return;
|
||||||
|
if(!is_array($output)) $output = array($output);
|
||||||
for($i=0;$i<count($output);$i++) {
|
for($i=0;$i<count($output);$i++) {
|
||||||
if(trim($output[$i]->KEY_NAME) == $index_name) return true;
|
if(trim($output[$i]->KEY_NAME) == $index_name) return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -278,6 +278,8 @@
|
||||||
$result = $this->_query($query);
|
$result = $this->_query($query);
|
||||||
if($this->isError()) return;
|
if($this->isError()) return;
|
||||||
$output = $this->_fetch($result);
|
$output = $this->_fetch($result);
|
||||||
|
if(!$output) return;
|
||||||
|
if(!is_array($output)) $output = array($output);
|
||||||
|
|
||||||
for($i=0;$i<count($output);$i++) {
|
for($i=0;$i<count($output);$i++) {
|
||||||
if($output[$i]->Key_name == $index_name) return true;
|
if($output[$i]->Key_name == $index_name) return true;
|
||||||
|
|
|
||||||
|
|
@ -287,6 +287,8 @@
|
||||||
$result = $this->_query($query);
|
$result = $this->_query($query);
|
||||||
if($this->isError()) return;
|
if($this->isError()) return;
|
||||||
$output = $this->_fetch($result);
|
$output = $this->_fetch($result);
|
||||||
|
if(!$output) return;
|
||||||
|
if(!is_array($output)) $output = array($output);
|
||||||
|
|
||||||
for($i=0;$i<count($output);$i++) {
|
for($i=0;$i<count($output);$i++) {
|
||||||
if($output[$i]->Key_name == $index_name) return true;
|
if($output[$i]->Key_name == $index_name) return true;
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,8 @@
|
||||||
**/
|
**/
|
||||||
function _toJSON(&$oModule) {
|
function _toJSON(&$oModule) {
|
||||||
$variables = $oModule->getVariables();
|
$variables = $oModule->getVariables();
|
||||||
|
$variables['error'] = $oModule->getError();
|
||||||
|
$variables['message'] = $oModule->getMessage();
|
||||||
//if(function_exists('json_encode')) return json_encode($variables);
|
//if(function_exists('json_encode')) return json_encode($variables);
|
||||||
//else return json_encode2($variables);
|
//else return json_encode2($variables);
|
||||||
$json = str_replace("\r\n",'\n',json_encode2($variables));
|
$json = str_replace("\r\n",'\n',json_encode2($variables));
|
||||||
|
|
|
||||||
|
|
@ -358,11 +358,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// view action이고 결과 출력이 XMLRPC일 경우 해당 모듈의 api method를 실행
|
// view action이고 결과 출력이 XMLRPC일 경우 해당 모듈의 api method를 실행
|
||||||
if((Context::getResponseMethod() == 'XMLRPC' || Context::getResponseMethod() == 'JSON') && $this->module_info->module_type == 'view') {
|
if($this->module_info->module_type == 'view'){
|
||||||
$oAPI = getAPI($this->module_info->module, 'api');
|
if(Context::getResponseMethod() == 'XMLRPC' || Context::getResponseMethod() == 'JSON') {
|
||||||
if(method_exists($oAPI, $this->act)) {
|
$oAPI = getAPI($this->module_info->module, 'api');
|
||||||
$oAPI->{$this->act}($this);
|
if(method_exists($oAPI, $this->act)) {
|
||||||
|
$oAPI->{$this->act}($this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}else if($this->module_info->module_type == 'controller'){
|
||||||
|
if(Context::getResponseMethod() == 'JSON'){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@
|
||||||
//$buff = preg_replace_callback('!<\!--#include\(([^\)]*?)\)-->!is', array($this, '_compileIncludeToCode'), $buff);
|
//$buff = preg_replace_callback('!<\!--#include\(([^\)]*?)\)-->!is', array($this, '_compileIncludeToCode'), $buff);
|
||||||
|
|
||||||
// 이미지 태그 img의 src의 값이 http:// 나 / 로 시작하지 않으면 root경로부터 시작하도록 변경
|
// 이미지 태그 img의 src의 값이 http:// 나 / 로 시작하지 않으면 root경로부터 시작하도록 변경
|
||||||
$buff = preg_replace_callback('/(img|input)([^>]*)src=[\'"]{1}(?!http)(.*?)[\'"]{1}/is', array($this, '_compileImgPath'), $buff);
|
$buff = preg_replace_callback('/<(img|input)([^>]*)src=[\'"]{1}(?!http)(.*?)[\'"]{1}/is', array($this, '_compileImgPath'), $buff);
|
||||||
|
|
||||||
// 변수를 변경
|
// 변수를 변경
|
||||||
$buff = preg_replace_callback('/\{[^@^ ]([^\{\}\n]+)\}/i', array($this, '_compileVarToContext'), $buff);
|
$buff = preg_replace_callback('/\{[^@^ ]([^\{\}\n]+)\}/i', array($this, '_compileVarToContext'), $buff);
|
||||||
|
|
@ -124,6 +124,10 @@
|
||||||
// unload css/ js <!--%unload("filename"[,optimized=true|false][,media="media"][,targetie="lt IE 6|IE 7|gte IE 8|..."])--> (media는 css에만 적용)
|
// unload css/ js <!--%unload("filename"[,optimized=true|false][,media="media"][,targetie="lt IE 6|IE 7|gte IE 8|..."])--> (media는 css에만 적용)
|
||||||
$buff = preg_replace_callback('!<\!--%unload\(\"([^\"]*?)\"(,optimized\=(true|false))?(,media\=\"([^\"]*)\")?(,targetie=\"([^\"]*)\")?\)-->!is', array($this, '_compileUnloadCode'), $buff);
|
$buff = preg_replace_callback('!<\!--%unload\(\"([^\"]*?)\"(,optimized\=(true|false))?(,media\=\"([^\"]*)\")?(,targetie=\"([^\"]*)\")?\)-->!is', array($this, '_compileUnloadCode'), $buff);
|
||||||
|
|
||||||
|
// javascript plugin import
|
||||||
|
$buff = preg_replace_callback('!<\!--%load_js_plugin\(\"([^\"]*?)\"\)-->!is', array($this, '_compileLoadJavascriptPlugin'), $buff);
|
||||||
|
|
||||||
|
|
||||||
// 파일에 쓰기 전에 직접 호출되는 것을 방지
|
// 파일에 쓰기 전에 직접 호출되는 것을 방지
|
||||||
$buff = sprintf('%s%s%s','<?php if(!defined("__ZBXE__")) exit();?>',"\n",$buff);
|
$buff = sprintf('%s%s%s','<?php if(!defined("__ZBXE__")) exit();?>',"\n",$buff);
|
||||||
|
|
||||||
|
|
@ -357,6 +361,16 @@
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief javascript 플러그인 import
|
||||||
|
* javascript 플러그인의 경우 optimized = false로 동작하도록 고정시킴
|
||||||
|
**/
|
||||||
|
function _compileLoadJavascriptPlugin($matches) {
|
||||||
|
$base_path = $this->tpl_path;
|
||||||
|
$plugin = trim($matches[1]);
|
||||||
|
return sprintf('<?php Context::loadJavascriptPlugin("%s"); ?>', $plugin);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief <!--%filename-->의 확장자를 봐서 css/ js 파일을 제거하도록 수정
|
* @brief <!--%filename-->의 확장자를 봐서 css/ js 파일을 제거하도록 수정
|
||||||
**/
|
**/
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,7 @@
|
||||||
$widget_padding_bottom = $args->widget_padding_bottom;
|
$widget_padding_bottom = $args->widget_padding_bottom;
|
||||||
$inner_style = sprintf("padding:%dpx %dpx %dpx %dpx !important; padding:none !important;", $widget_padding_top, $widget_padding_right, $widget_padding_bottom, $widget_padding_left);
|
$inner_style = sprintf("padding:%dpx %dpx %dpx %dpx !important; padding:none !important;", $widget_padding_top, $widget_padding_right, $widget_padding_bottom, $widget_padding_left);
|
||||||
|
|
||||||
|
$oDocumentModel = &getModel('document');
|
||||||
/**
|
/**
|
||||||
* 위젯 출력물을 구함
|
* 위젯 출력물을 구함
|
||||||
**/
|
**/
|
||||||
|
|
@ -129,7 +130,12 @@
|
||||||
switch($widget) {
|
switch($widget) {
|
||||||
// 내용 직접 추가일 경우
|
// 내용 직접 추가일 경우
|
||||||
case 'widgetContent' :
|
case 'widgetContent' :
|
||||||
$body = base64_decode($args->body);
|
if($args->document_srl) {
|
||||||
|
$oDocument = $oDocumentModel->getDocument($args->document_srl);
|
||||||
|
$body = $oDocument->getContent(false,false,false);
|
||||||
|
} else {
|
||||||
|
$body = base64_decode($args->body);
|
||||||
|
}
|
||||||
$output = sprintf('<div style="overflow:hidden;%s"><div style="%s">%s</div></div>', $style, $inner_style, $body);
|
$output = sprintf('<div style="overflow:hidden;%s"><div style="%s">%s</div></div>', $style, $inner_style, $body);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -149,15 +155,16 @@
|
||||||
switch($widget) {
|
switch($widget) {
|
||||||
// 내용 직접 추가일 경우
|
// 내용 직접 추가일 경우
|
||||||
case 'widgetContent' :
|
case 'widgetContent' :
|
||||||
$body = base64_decode($args->body);
|
if($args->document_srl) {
|
||||||
|
$oDocument = $oDocumentModel->getDocument($args->document_srl);
|
||||||
|
$body = $oDocument->getContent(false,false,false);
|
||||||
|
} else {
|
||||||
|
$body = base64_decode($args->body);
|
||||||
|
}
|
||||||
$oWidgetController = &getController('widget');
|
$oWidgetController = &getController('widget');
|
||||||
|
|
||||||
$output = sprintf(
|
$output = sprintf(
|
||||||
'<div class="widgetOutput" style="%s" widget_padding_left="%s" widget_padding_right="%s" widget_padding_top="%s" widget_padding_bottom="%s" widget="widgetContent">'.
|
'<div class="widgetOutput" style="%s" widget_padding_left="%s" widget_padding_right="%s" widget_padding_top="%s" widget_padding_bottom="%s" widget="widgetContent" document_srl="%d">'.
|
||||||
'<div class="widgetSetup"></div>'.
|
|
||||||
'<div class="widgetCopy"></div>'.
|
|
||||||
'<div class="widgetSize"></div>'.
|
|
||||||
'<div class="widgetRemove"></div>'.
|
|
||||||
'<div class="widgetResize"></div>'.
|
'<div class="widgetResize"></div>'.
|
||||||
'<div class="widgetResizeLeft"></div>'.
|
'<div class="widgetResizeLeft"></div>'.
|
||||||
'<div class="widgetBorder">'.
|
'<div class="widgetBorder">'.
|
||||||
|
|
@ -169,6 +176,7 @@
|
||||||
'</div>',
|
'</div>',
|
||||||
$style,
|
$style,
|
||||||
$args->widget_padding_left, $args->widget_padding_right, $args->widget_padding_top, $args->widget_padding_bottom,
|
$args->widget_padding_left, $args->widget_padding_right, $args->widget_padding_top, $args->widget_padding_bottom,
|
||||||
|
$args->document_srl,
|
||||||
$inner_style,
|
$inner_style,
|
||||||
$body,
|
$body,
|
||||||
base64_encode($body)
|
base64_encode($body)
|
||||||
|
|
@ -179,9 +187,6 @@
|
||||||
case 'widgetBox' :
|
case 'widgetBox' :
|
||||||
$output = sprintf(
|
$output = sprintf(
|
||||||
'<div class="widgetOutput" widget="widgetBox" style="%s;" widget_padding_top="%s" widget_padding_right="%s" widget_padding_bottom="%s" widget_padding_left="%s">'.
|
'<div class="widgetOutput" widget="widgetBox" style="%s;" widget_padding_top="%s" widget_padding_right="%s" widget_padding_bottom="%s" widget_padding_left="%s">'.
|
||||||
'<div class="widgetBoxCopy"></div>'.
|
|
||||||
'<div class="widgetBoxSize"></div>'.
|
|
||||||
'<div class="widgetBoxRemove"></div>'.
|
|
||||||
'<div class="widgetBoxResize"></div>'.
|
'<div class="widgetBoxResize"></div>'.
|
||||||
'<div class="widgetBoxResizeLeft"></div>'.
|
'<div class="widgetBoxResizeLeft"></div>'.
|
||||||
'<div class="widgetBoxBorder">'.
|
'<div class="widgetBoxBorder">'.
|
||||||
|
|
@ -203,10 +208,6 @@
|
||||||
|
|
||||||
$output = sprintf(
|
$output = sprintf(
|
||||||
'<div class="widgetOutput" style="%s" widget_padding_top="%s" widget_padding_right="%s" widget_padding_bottom="%s" widget_padding_left="%s" widget="%s" %s >'.
|
'<div class="widgetOutput" style="%s" widget_padding_top="%s" widget_padding_right="%s" widget_padding_bottom="%s" widget_padding_left="%s" widget="%s" %s >'.
|
||||||
'<div class="widgetSetup"></div>'.
|
|
||||||
'<div class="widgetCopy"></div>'.
|
|
||||||
'<div class="widgetSize"></div>'.
|
|
||||||
'<div class="widgetRemove"></div>'.
|
|
||||||
'<div class="widgetResize"></div>'.
|
'<div class="widgetResize"></div>'.
|
||||||
'<div class="widgetResizeLeft"></div>'.
|
'<div class="widgetResizeLeft"></div>'.
|
||||||
'<div class="widgetBorder">'.
|
'<div class="widgetBorder">'.
|
||||||
|
|
|
||||||
|
|
@ -1,251 +0,0 @@
|
||||||
/* The main calendar widget. DIV containing a table. */
|
|
||||||
|
|
||||||
.calendar {
|
|
||||||
position: relative;
|
|
||||||
display: none;
|
|
||||||
border: 1px solid;
|
|
||||||
border-color: #fff #000 #000 #fff;
|
|
||||||
font-size: 11px;
|
|
||||||
cursor: default;
|
|
||||||
background: Window;
|
|
||||||
color: WindowText;
|
|
||||||
font-family: tahoma,verdana,sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar table {
|
|
||||||
border: 1px solid;
|
|
||||||
border-color: #fff #000 #000 #fff;
|
|
||||||
font-size: 11px;
|
|
||||||
cursor: default;
|
|
||||||
background: Window;
|
|
||||||
color: WindowText;
|
|
||||||
font-family: tahoma,verdana,sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Header part -- contains navigation buttons and day names. */
|
|
||||||
|
|
||||||
.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
|
|
||||||
text-align: center;
|
|
||||||
padding: 1px;
|
|
||||||
border: 1px solid;
|
|
||||||
border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
|
|
||||||
background: ButtonFace;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar .nav {
|
|
||||||
background: ButtonFace url(menuarrow.gif) no-repeat 100% 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar thead .title { /* This holds the current "month, year" */
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 1px;
|
|
||||||
border: 1px solid #000;
|
|
||||||
background: ActiveCaption;
|
|
||||||
color: CaptionText;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar thead .headrow { /* Row <TR> containing navigation buttons */
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar thead .daynames { /* Row <TR> containing the day names */
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar thead .name { /* Cells <TD> containing the day names */
|
|
||||||
border-bottom: 1px solid ButtonShadow;
|
|
||||||
padding: 2px;
|
|
||||||
text-align: center;
|
|
||||||
background: ButtonFace;
|
|
||||||
color: ButtonText;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar thead .weekend { /* How a weekend day name shows in header */
|
|
||||||
color: #f00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar thead .hilite { /* How do the buttons in header appear when hover */
|
|
||||||
border: 2px solid;
|
|
||||||
padding: 0px;
|
|
||||||
border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar thead .active { /* Active (pressed) buttons in header */
|
|
||||||
border-width: 1px;
|
|
||||||
padding: 2px 0px 0px 2px;
|
|
||||||
border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The body part -- contains all the days in month. */
|
|
||||||
|
|
||||||
.calendar tbody .day { /* Cells <TD> containing month days dates */
|
|
||||||
width: 2em;
|
|
||||||
text-align: right;
|
|
||||||
padding: 2px 4px 2px 2px;
|
|
||||||
}
|
|
||||||
.calendar tbody .day.othermonth {
|
|
||||||
font-size: 80%;
|
|
||||||
color: #aaa;
|
|
||||||
}
|
|
||||||
.calendar tbody .day.othermonth.oweekend {
|
|
||||||
color: #faa;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar table .wn {
|
|
||||||
padding: 2px 3px 2px 2px;
|
|
||||||
border-right: 1px solid ButtonShadow;
|
|
||||||
background: ButtonFace;
|
|
||||||
color: ButtonText;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar tbody .rowhilite td {
|
|
||||||
background: Highlight;
|
|
||||||
color: HighlightText;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar tbody td.hilite { /* Hovered cells <TD> */
|
|
||||||
padding: 1px 3px 1px 1px;
|
|
||||||
border-top: 1px solid #fff;
|
|
||||||
border-right: 1px solid #000;
|
|
||||||
border-bottom: 1px solid #000;
|
|
||||||
border-left: 1px solid #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar tbody td.active { /* Active (pressed) cells <TD> */
|
|
||||||
padding: 2px 2px 0px 2px;
|
|
||||||
border: 1px solid;
|
|
||||||
border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar tbody td.selected { /* Cell showing selected date */
|
|
||||||
font-weight: bold;
|
|
||||||
border: 1px solid;
|
|
||||||
border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
|
|
||||||
padding: 2px 2px 0px 2px;
|
|
||||||
background: ButtonFace;
|
|
||||||
color: ButtonText;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar tbody td.weekend { /* Cells showing weekend days */
|
|
||||||
color: #f00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar tbody td.today { /* Cell showing today date */
|
|
||||||
font-weight: bold;
|
|
||||||
color: #00f;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar tbody td.disabled { color: GrayText; }
|
|
||||||
|
|
||||||
.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The footer part -- status bar and "Close" button */
|
|
||||||
|
|
||||||
.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
|
|
||||||
background: ButtonFace;
|
|
||||||
padding: 1px;
|
|
||||||
border: 1px solid;
|
|
||||||
border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
|
|
||||||
color: ButtonText;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar tfoot .hilite { /* Hover style for buttons in footer */
|
|
||||||
border-top: 1px solid #fff;
|
|
||||||
border-right: 1px solid #000;
|
|
||||||
border-bottom: 1px solid #000;
|
|
||||||
border-left: 1px solid #fff;
|
|
||||||
padding: 1px;
|
|
||||||
background: #e4e0d8;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
|
|
||||||
padding: 2px 0px 0px 2px;
|
|
||||||
border-top: 1px solid #000;
|
|
||||||
border-right: 1px solid #fff;
|
|
||||||
border-bottom: 1px solid #fff;
|
|
||||||
border-left: 1px solid #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Combo boxes (menus that display months/years for direct selection) */
|
|
||||||
|
|
||||||
.calendar .combo {
|
|
||||||
position: absolute;
|
|
||||||
display: none;
|
|
||||||
width: 4em;
|
|
||||||
top: 0px;
|
|
||||||
left: 0px;
|
|
||||||
cursor: default;
|
|
||||||
border: 1px solid;
|
|
||||||
border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
|
|
||||||
background: Menu;
|
|
||||||
color: MenuText;
|
|
||||||
font-size: 90%;
|
|
||||||
padding: 1px;
|
|
||||||
z-index: 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar .combo .label,
|
|
||||||
.calendar .combo .label-IEfix {
|
|
||||||
text-align: center;
|
|
||||||
padding: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar .combo .label-IEfix {
|
|
||||||
width: 4em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar .combo .active {
|
|
||||||
padding: 0px;
|
|
||||||
border: 1px solid #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar .combo .hilite {
|
|
||||||
background: Highlight;
|
|
||||||
color: HighlightText;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar td.time {
|
|
||||||
border-top: 1px solid ButtonShadow;
|
|
||||||
padding: 1px 0px;
|
|
||||||
text-align: center;
|
|
||||||
background-color: ButtonFace;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar td.time .hour,
|
|
||||||
.calendar td.time .minute,
|
|
||||||
.calendar td.time .ampm {
|
|
||||||
padding: 0px 3px 0px 4px;
|
|
||||||
border: 1px solid #889;
|
|
||||||
font-weight: bold;
|
|
||||||
background-color: Menu;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar td.time .ampm {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar td.time .colon {
|
|
||||||
padding: 0px 2px 0px 3px;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar td.time span.hilite {
|
|
||||||
border-color: #000;
|
|
||||||
background-color: Highlight;
|
|
||||||
color: HighlightText;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar td.time span.active {
|
|
||||||
border-color: #f00;
|
|
||||||
background-color: #000;
|
|
||||||
color: #0f0;
|
|
||||||
}
|
|
||||||
|
|
@ -1,127 +0,0 @@
|
||||||
// ** I18N
|
|
||||||
|
|
||||||
// DyCalendar EN language
|
|
||||||
// Author: Mihai Bazon, <mihai_bazon@yahoo.com>
|
|
||||||
// Encoding: any
|
|
||||||
// Distributed under the same terms as the calendar itself.
|
|
||||||
|
|
||||||
// For translators: please use UTF-8 if possible. We strongly believe that
|
|
||||||
// Unicode is the answer to a real internationalized world. Also please
|
|
||||||
// include your contact information in the header, as can be seen above.
|
|
||||||
|
|
||||||
// full day names
|
|
||||||
DyCalendar._DN = new Array
|
|
||||||
("Sunday",
|
|
||||||
"Monday",
|
|
||||||
"Tuesday",
|
|
||||||
"Wednesday",
|
|
||||||
"Thursday",
|
|
||||||
"Friday",
|
|
||||||
"Saturday",
|
|
||||||
"Sunday");
|
|
||||||
|
|
||||||
// Please note that the following array of short day names (and the same goes
|
|
||||||
// for short month names, _SMN) isn't absolutely necessary. We give it here
|
|
||||||
// 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:
|
|
||||||
//
|
|
||||||
// DyCalendar._SDN_len = N; // short day 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
|
|
||||||
// present, to be compatible with translation files that were written before
|
|
||||||
// this feature.
|
|
||||||
|
|
||||||
// short day names
|
|
||||||
DyCalendar._SDN = new Array
|
|
||||||
("Sun",
|
|
||||||
"Mon",
|
|
||||||
"Tue",
|
|
||||||
"Wed",
|
|
||||||
"Thu",
|
|
||||||
"Fri",
|
|
||||||
"Sat",
|
|
||||||
"Sun");
|
|
||||||
|
|
||||||
// First day of the week. "0" means display Sunday first, "1" means display
|
|
||||||
// Monday first, etc.
|
|
||||||
DyCalendar._FD = 0;
|
|
||||||
|
|
||||||
// full month names
|
|
||||||
DyCalendar._MN = new Array
|
|
||||||
("January",
|
|
||||||
"February",
|
|
||||||
"March",
|
|
||||||
"April",
|
|
||||||
"May",
|
|
||||||
"June",
|
|
||||||
"July",
|
|
||||||
"August",
|
|
||||||
"September",
|
|
||||||
"October",
|
|
||||||
"November",
|
|
||||||
"December");
|
|
||||||
|
|
||||||
// short month names
|
|
||||||
DyCalendar._SMN = new Array
|
|
||||||
("Jan",
|
|
||||||
"Feb",
|
|
||||||
"Mar",
|
|
||||||
"Apr",
|
|
||||||
"May",
|
|
||||||
"Jun",
|
|
||||||
"Jul",
|
|
||||||
"Aug",
|
|
||||||
"Sep",
|
|
||||||
"Oct",
|
|
||||||
"Nov",
|
|
||||||
"Dec");
|
|
||||||
|
|
||||||
// tooltips
|
|
||||||
DyCalendar._TT = {};
|
|
||||||
DyCalendar._TT["INFO"] = "About the calendar";
|
|
||||||
|
|
||||||
DyCalendar._TT["ABOUT"] =
|
|
||||||
"DHTML Date/Time Selector\n" +
|
|
||||||
"(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" +
|
|
||||||
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
|
|
||||||
"\n\n" +
|
|
||||||
"Date selection:\n" +
|
|
||||||
"- Use the \xab, \xbb buttons to select year\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.";
|
|
||||||
DyCalendar._TT["ABOUT_TIME"] = "\n\n" +
|
|
||||||
"Time selection:\n" +
|
|
||||||
"- Click on any of the time parts to increase it\n" +
|
|
||||||
"- or Shift-click to decrease it\n" +
|
|
||||||
"- or click and drag for faster selection.";
|
|
||||||
|
|
||||||
DyCalendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)";
|
|
||||||
DyCalendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)";
|
|
||||||
DyCalendar._TT["GO_TODAY"] = "Go Today";
|
|
||||||
DyCalendar._TT["NEXT_MONTH"] = "Next month (hold for menu)";
|
|
||||||
DyCalendar._TT["NEXT_YEAR"] = "Next year (hold for menu)";
|
|
||||||
DyCalendar._TT["SEL_DATE"] = "Select date";
|
|
||||||
DyCalendar._TT["DRAG_TO_MOVE"] = "Drag to move";
|
|
||||||
DyCalendar._TT["PART_TODAY"] = " (today)";
|
|
||||||
|
|
||||||
// the following is to inform that "%s" is to be the first day of week
|
|
||||||
// %s will be replaced with the day name.
|
|
||||||
DyCalendar._TT["DAY_FIRST"] = "Display %s first";
|
|
||||||
|
|
||||||
// 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
|
|
||||||
// means Monday, etc.
|
|
||||||
DyCalendar._TT["WEEKEND"] = "0,6";
|
|
||||||
|
|
||||||
DyCalendar._TT["CLOSE"] = "Close";
|
|
||||||
DyCalendar._TT["TODAY"] = "Today";
|
|
||||||
DyCalendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value";
|
|
||||||
|
|
||||||
// date formats
|
|
||||||
DyCalendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
|
|
||||||
DyCalendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
|
|
||||||
|
|
||||||
DyCalendar._TT["WK"] = "wk";
|
|
||||||
DyCalendar._TT["TIME"] = "Time:";
|
|
||||||
|
|
@ -1,130 +0,0 @@
|
||||||
// ** I18N
|
|
||||||
|
|
||||||
// DyCalendar ES language
|
|
||||||
// Author: Mihai Bazon, <mihai_bazon@yahoo.com>
|
|
||||||
// Translation: Bradly1, <bradly1@paran.com>
|
|
||||||
// Encoding: UTF-8
|
|
||||||
// lang : es
|
|
||||||
// Distributed under the same terms as the calendar itself.
|
|
||||||
|
|
||||||
// For translators: please use UTF-8 if possible. We strongly believe that
|
|
||||||
// Unicode is the answer to a real internationalized world. Also please
|
|
||||||
// include your contact information in the header, as can be seen above.
|
|
||||||
|
|
||||||
// full day names
|
|
||||||
|
|
||||||
DyCalendar._DN = new Array
|
|
||||||
("Domingo",
|
|
||||||
"Lunes",
|
|
||||||
"Martes",
|
|
||||||
"Miércoles",
|
|
||||||
"Jueves",
|
|
||||||
"Viernes",
|
|
||||||
"Sábado",
|
|
||||||
"Domingo");
|
|
||||||
|
|
||||||
// Please note that the following array of short day names (and the same goes
|
|
||||||
// for short month names, _SMN) isn't absolutely necessary. We give it here
|
|
||||||
// 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:
|
|
||||||
//
|
|
||||||
// DyCalendar._SDN_len = N; // short day 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
|
|
||||||
// present, to be compatible with translation files that were written before
|
|
||||||
// this feature.
|
|
||||||
|
|
||||||
// short day names
|
|
||||||
DyCalendar._SDN = new Array
|
|
||||||
("Domingo",
|
|
||||||
"Lunes",
|
|
||||||
"Martes",
|
|
||||||
"Miércoles",
|
|
||||||
"Jueves",
|
|
||||||
"Viernes",
|
|
||||||
"Sábado",
|
|
||||||
"Domingo");
|
|
||||||
|
|
||||||
// First day of the week. "0" means display Sunday first, "1" means display
|
|
||||||
// Monday first, etc.
|
|
||||||
DyCalendar._FD = 0;
|
|
||||||
|
|
||||||
// full month names
|
|
||||||
DyCalendar._MN = new Array
|
|
||||||
("Enero",
|
|
||||||
"Febrero",
|
|
||||||
"Marzo",
|
|
||||||
"Abril",
|
|
||||||
"Mayo",
|
|
||||||
"Junio",
|
|
||||||
"Julio",
|
|
||||||
"Agosto",
|
|
||||||
"Septiembre",
|
|
||||||
"Octubre",
|
|
||||||
"Noviembre",
|
|
||||||
"Diciembre");
|
|
||||||
|
|
||||||
// short month names
|
|
||||||
DyCalendar._SMN = new Array
|
|
||||||
("Enero",
|
|
||||||
"Febrero",
|
|
||||||
"Marzo",
|
|
||||||
"Abril",
|
|
||||||
"Mayo",
|
|
||||||
"Junio",
|
|
||||||
"Julio",
|
|
||||||
"Agosto",
|
|
||||||
"Septiembre",
|
|
||||||
"Octubre",
|
|
||||||
"Noviembre",
|
|
||||||
"Diciembre");
|
|
||||||
|
|
||||||
// tooltips
|
|
||||||
DyCalendar._TT = {};
|
|
||||||
DyCalendar._TT["INFO"] = "Sobre el calendario";
|
|
||||||
|
|
||||||
DyCalendar._TT["ABOUT"] =
|
|
||||||
"DHTML Date/Time Selector\n" +
|
|
||||||
"(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" +
|
|
||||||
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
|
|
||||||
"\n\n" +
|
|
||||||
"Date selection:\n" +
|
|
||||||
"- Use the \xab, \xbb buttons to select year\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.";
|
|
||||||
DyCalendar._TT["ABOUT_TIME"] = "\n\n" +
|
|
||||||
"Time selection:\n" +
|
|
||||||
"- Click on any of the time parts to increase it\n" +
|
|
||||||
"- or Shift-click to decrease it\n" +
|
|
||||||
"- or click and drag for faster selection.";
|
|
||||||
|
|
||||||
DyCalendar._TT["PREV_YEAR"] = "Prev. año (mantener para menu)";
|
|
||||||
DyCalendar._TT["PREV_MONTH"] = "Prev. mes (mantener para menu)";
|
|
||||||
DyCalendar._TT["GO_TODAY"] = "Ir Hoy";
|
|
||||||
DyCalendar._TT["NEXT_MONTH"] = "El mes próximo (mantener para menu)";
|
|
||||||
DyCalendar._TT["NEXT_YEAR"] = "El año que viene (mantener para menu)";
|
|
||||||
DyCalendar._TT["SEL_DATE"] = "Seleccionar fecha";
|
|
||||||
DyCalendar._TT["DRAG_TO_MOVE"] = "Arrastra para mover";
|
|
||||||
DyCalendar._TT["PART_TODAY"] = " (hoy)";
|
|
||||||
|
|
||||||
// the following is to inform that "%s" is to be the first day of week
|
|
||||||
// %s will be replaced with the day name.
|
|
||||||
DyCalendar._TT["DAY_FIRST"] = "Mostrar% s primero";
|
|
||||||
|
|
||||||
// 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
|
|
||||||
// means Monday, etc.
|
|
||||||
DyCalendar._TT["WEEKEND"] = "0,6";
|
|
||||||
|
|
||||||
DyCalendar._TT["CLOSE"] = "Cerrar";
|
|
||||||
DyCalendar._TT["TODAY"] = "Hoy";
|
|
||||||
DyCalendar._TT["TIME_PART"] = "(Shift-) Haga clic o arrastre para cambiar el valor";
|
|
||||||
|
|
||||||
// date formats
|
|
||||||
DyCalendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
|
|
||||||
DyCalendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
|
|
||||||
|
|
||||||
DyCalendar._TT["WK"] = "wk";
|
|
||||||
DyCalendar._TT["TIME"] = "Tiempo:";
|
|
||||||
|
|
@ -1,129 +0,0 @@
|
||||||
// ** I18N
|
|
||||||
|
|
||||||
// DyCalendar GE language
|
|
||||||
// Author: Mihai Bazon, <mihai_bazon@yahoo.com>
|
|
||||||
// Translation: bradly1, <bradly1@paran.com>
|
|
||||||
// Encoding: UTF-8
|
|
||||||
// lang : ge
|
|
||||||
// Distributed under the same terms as the calendar itself.
|
|
||||||
|
|
||||||
// For translators: please use UTF-8 if possible. We strongly believe that
|
|
||||||
// Unicode is the answer to a real internationalized world. Also please
|
|
||||||
// include your contact information in the header, as can be seen above.
|
|
||||||
|
|
||||||
// full day names
|
|
||||||
DyCalendar._DN = new Array
|
|
||||||
("Sonntag",
|
|
||||||
"Montag",
|
|
||||||
"Dienstag",
|
|
||||||
"Mittwoch",
|
|
||||||
"Donnerstag",
|
|
||||||
"Freitag",
|
|
||||||
"Samstag",
|
|
||||||
"Sonntag");
|
|
||||||
|
|
||||||
// Please note that the following array of short day names (and the same goes
|
|
||||||
// for short month names, _SMN) isn't absolutely necessary. We give it here
|
|
||||||
// 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:
|
|
||||||
//
|
|
||||||
// DyCalendar._SDN_len = N; // short day 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
|
|
||||||
// present, to be compatible with translation files that were written before
|
|
||||||
// this feature.
|
|
||||||
|
|
||||||
// short day names
|
|
||||||
DyCalendar._SDN = new Array
|
|
||||||
("Sonntag",
|
|
||||||
"Montag",
|
|
||||||
"Dienstag",
|
|
||||||
"Mittwoch",
|
|
||||||
"Donnerstag",
|
|
||||||
"Freitag",
|
|
||||||
"Samstag",
|
|
||||||
"Sonntag");
|
|
||||||
|
|
||||||
// First day of the week. "0" means display Sunday first, "1" means display
|
|
||||||
// Monday first, etc.
|
|
||||||
DyCalendar._FD = 0;
|
|
||||||
|
|
||||||
// full month names
|
|
||||||
DyCalendar._MN = new Array
|
|
||||||
("Januar",
|
|
||||||
"Februar",
|
|
||||||
"März",
|
|
||||||
"April",
|
|
||||||
"Mai",
|
|
||||||
"Juni",
|
|
||||||
"Juli",
|
|
||||||
"August",
|
|
||||||
"September",
|
|
||||||
"Oktober",
|
|
||||||
"November",
|
|
||||||
"Dezember");
|
|
||||||
|
|
||||||
// short month names
|
|
||||||
DyCalendar._SMN = new Array
|
|
||||||
("Januar",
|
|
||||||
"Februar",
|
|
||||||
"März",
|
|
||||||
"April",
|
|
||||||
"Mai",
|
|
||||||
"Juni",
|
|
||||||
"Juli",
|
|
||||||
"August",
|
|
||||||
"September",
|
|
||||||
"Oktober",
|
|
||||||
"November",
|
|
||||||
"Dezember");
|
|
||||||
|
|
||||||
// tooltips
|
|
||||||
DyCalendar._TT = {};
|
|
||||||
DyCalendar._TT["INFO"] = "Über den Kalender";
|
|
||||||
|
|
||||||
DyCalendar._TT["ABOUT"] =
|
|
||||||
"DHTML Date/Time Selector\n" +
|
|
||||||
"(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" +
|
|
||||||
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
|
|
||||||
"\n\n" +
|
|
||||||
"Date selection:\n" +
|
|
||||||
"- Use the \xab, \xbb buttons to select year\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.";
|
|
||||||
DyCalendar._TT["ABOUT_TIME"] = "\n\n" +
|
|
||||||
"Time selection:\n" +
|
|
||||||
"- Click on any of the time parts to increase it\n" +
|
|
||||||
"- or Shift-click to decrease it\n" +
|
|
||||||
"- or click and drag for faster selection.";
|
|
||||||
|
|
||||||
DyCalendar._TT["PREV_YEAR"] = "Prev. Jahr (halten für Menü)";
|
|
||||||
DyCalendar._TT["PREV_MONTH"] = "Prev. Monat (halten für Menü)";
|
|
||||||
DyCalendar._TT["GO_TODAY"] = "Gehe Heute";
|
|
||||||
DyCalendar._TT["NEXT_MONTH"] = "Nächsten Monat (halten für Menü)";
|
|
||||||
DyCalendar._TT["NEXT_YEAR"] = "Nächstes Jahr (halten für Menü)";
|
|
||||||
DyCalendar._TT["SEL_DATE"] = "Wählen Sie das Datum";
|
|
||||||
DyCalendar._TT["DRAG_TO_MOVE"] = "Per Drag & Drop verschieben";
|
|
||||||
DyCalendar._TT["PART_TODAY"] = " (heute)";
|
|
||||||
|
|
||||||
// the following is to inform that "%s" is to be the first day of week
|
|
||||||
// %s will be replaced with the day name.
|
|
||||||
DyCalendar._TT["DAY_FIRST"] = "Anzeige% s erste";
|
|
||||||
|
|
||||||
// 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
|
|
||||||
// means Monday, etc.
|
|
||||||
DyCalendar._TT["WEEKEND"] = "0,6";
|
|
||||||
|
|
||||||
DyCalendar._TT["CLOSE"] = "Schließen";
|
|
||||||
DyCalendar._TT["TODAY"] = "Heute";
|
|
||||||
DyCalendar._TT["TIME_PART"] = "(Shift-)Klicken Sie oder ziehen Sie ändern Wert";
|
|
||||||
|
|
||||||
// date formats
|
|
||||||
DyCalendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
|
|
||||||
DyCalendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
|
|
||||||
|
|
||||||
DyCalendar._TT["WK"] = "wk";
|
|
||||||
DyCalendar._TT["TIME"] = "Zeit:";
|
|
||||||
|
|
@ -1,124 +0,0 @@
|
||||||
// ** I18N
|
|
||||||
|
|
||||||
// DyCalendar JA language
|
|
||||||
// Author: Mihai Bazon, <mihai_bazon@yahoo.com>
|
|
||||||
// Translation: ミニミ
|
|
||||||
// Encoding: UTF-8
|
|
||||||
// lang : jp
|
|
||||||
// Distributed under the same terms as the calendar itself.
|
|
||||||
|
|
||||||
// For translators: please use UTF-8 if possible. We strongly believe that
|
|
||||||
// Unicode is the answer to a real internationalized world. Also please
|
|
||||||
// include your contact information in the header, as can be seen above.
|
|
||||||
|
|
||||||
// full day names
|
|
||||||
|
|
||||||
DyCalendar._DN = new Array
|
|
||||||
("日曜日",
|
|
||||||
"月曜日",
|
|
||||||
"火曜日",
|
|
||||||
"水曜日",
|
|
||||||
"木曜日",
|
|
||||||
"金曜日",
|
|
||||||
"土曜日",
|
|
||||||
"日曜日");
|
|
||||||
|
|
||||||
// Please note that the following array of short day names (and the same goes
|
|
||||||
// for short month names, _SMN) isn't absolutely necessary. We give it here
|
|
||||||
// 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:
|
|
||||||
//
|
|
||||||
// DyCalendar._SDN_len = N; // short day 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
|
|
||||||
// present, to be compatible with translation files that were written before
|
|
||||||
// this feature.
|
|
||||||
|
|
||||||
// short day names
|
|
||||||
DyCalendar._SDN = new Array
|
|
||||||
("日",
|
|
||||||
"月",
|
|
||||||
"火",
|
|
||||||
"水",
|
|
||||||
"木",
|
|
||||||
"金",
|
|
||||||
"土",
|
|
||||||
"日");
|
|
||||||
|
|
||||||
// full month names
|
|
||||||
DyCalendar._MN = new Array
|
|
||||||
("1月",
|
|
||||||
"2月",
|
|
||||||
"3月",
|
|
||||||
"4月",
|
|
||||||
"5月",
|
|
||||||
"6月",
|
|
||||||
"7月",
|
|
||||||
"8月",
|
|
||||||
"9月",
|
|
||||||
"10月",
|
|
||||||
"11月",
|
|
||||||
"12月");
|
|
||||||
|
|
||||||
// short month names
|
|
||||||
DyCalendar._SMN = new Array
|
|
||||||
("1",
|
|
||||||
"2",
|
|
||||||
"3",
|
|
||||||
"4",
|
|
||||||
"5",
|
|
||||||
"6",
|
|
||||||
"7",
|
|
||||||
"8",
|
|
||||||
"9",
|
|
||||||
"10",
|
|
||||||
"11",
|
|
||||||
"12");
|
|
||||||
|
|
||||||
// tooltips
|
|
||||||
DyCalendar._TT = {};
|
|
||||||
DyCalendar._TT["INFO"] = "カレンダーの紹介";
|
|
||||||
|
|
||||||
DyCalendar._TT["ABOUT"] =
|
|
||||||
"DHTML Date/Time Selector\n" +
|
|
||||||
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
|
|
||||||
"\n"+
|
|
||||||
"最新バージョンは http://www.dynarch.com/projects/calendar/ にご訪問して下さい。\n" +
|
|
||||||
"\n"+
|
|
||||||
"GNU LGPL ライセンスで配布されます。 \n"+
|
|
||||||
"より詳しいライセンスの内容は http://gnu.org/licenses/lgpl.html をお読みください。" +
|
|
||||||
"\n\n" +
|
|
||||||
"日付選択:\n" +
|
|
||||||
"- 年度の選択には \xab, \xbb ボタンを使います。\n" +
|
|
||||||
"- 月の選択には " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " ボタンを使って下さい。\n" +
|
|
||||||
"- ずっと押していると上の値をよら楽に選択できます。";
|
|
||||||
DyCalendar._TT["ABOUT_TIME"] = "\n\n" +
|
|
||||||
"時間の選択:\n" +
|
|
||||||
"- マウスをクリックすると時間が増加します。\n" +
|
|
||||||
"- Shiftキーと同時にクリックすると減ります。\n" +
|
|
||||||
"- 押している状態で、マウスを動かすとより早く値が変化します。\n";
|
|
||||||
|
|
||||||
DyCalendar._TT["PREV_YEAR"] = "前年 (長く押すとリスト)";
|
|
||||||
DyCalendar._TT["PREV_MONTH"] = "前月 (長く押すとリスト)";
|
|
||||||
DyCalendar._TT["GO_TODAY"] = "今日";
|
|
||||||
DyCalendar._TT["NEXT_MONTH"] = "翌月 (長く押すとリスト)";
|
|
||||||
DyCalendar._TT["NEXT_YEAR"] = "翌年 (長く押すとリスト)";
|
|
||||||
DyCalendar._TT["SEL_DATE"] = "日付選択";
|
|
||||||
DyCalendar._TT["DRAG_TO_MOVE"] = "ウィンドウの移動";
|
|
||||||
DyCalendar._TT["PART_TODAY"] = " (今日)";
|
|
||||||
|
|
||||||
DyCalendar._TT["DAY_FIRST"] = "%s を先頭に";
|
|
||||||
|
|
||||||
DyCalendar._TT["WEEKEND"] = "0,6";
|
|
||||||
|
|
||||||
DyCalendar._TT["CLOSE"] = "閉じる";
|
|
||||||
DyCalendar._TT["TODAY"] = "今日";
|
|
||||||
DyCalendar._TT["TIME_PART"] = "(Shift-)クリック、もしくはドラッグして下さい。";
|
|
||||||
|
|
||||||
// date formats
|
|
||||||
DyCalendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
|
|
||||||
DyCalendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]";
|
|
||||||
|
|
||||||
DyCalendar._TT["WK"] = "週";
|
|
||||||
DyCalendar._TT["TIME"] = "時:";
|
|
||||||
|
|
@ -1,124 +0,0 @@
|
||||||
// ** I18N
|
|
||||||
|
|
||||||
// DyCalendar KO language
|
|
||||||
// Author: Mihai Bazon, <mihai_bazon@yahoo.com>
|
|
||||||
// Translation: Yourim Yi <yyi@yourim.net>
|
|
||||||
// Encoding: UTF-8
|
|
||||||
// lang : ko
|
|
||||||
// Distributed under the same terms as the calendar itself.
|
|
||||||
|
|
||||||
// For translators: please use UTF-8 if possible. We strongly believe that
|
|
||||||
// Unicode is the answer to a real internationalized world. Also please
|
|
||||||
// include your contact information in the header, as can be seen above.
|
|
||||||
|
|
||||||
// full day names
|
|
||||||
|
|
||||||
DyCalendar._DN = new Array
|
|
||||||
("일요일",
|
|
||||||
"월요일",
|
|
||||||
"화요일",
|
|
||||||
"수요일",
|
|
||||||
"목요일",
|
|
||||||
"금요일",
|
|
||||||
"토요일",
|
|
||||||
"일요일");
|
|
||||||
|
|
||||||
// Please note that the following array of short day names (and the same goes
|
|
||||||
// for short month names, _SMN) isn't absolutely necessary. We give it here
|
|
||||||
// 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:
|
|
||||||
//
|
|
||||||
// DyCalendar._SDN_len = N; // short day 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
|
|
||||||
// present, to be compatible with translation files that were written before
|
|
||||||
// this feature.
|
|
||||||
|
|
||||||
// short day names
|
|
||||||
DyCalendar._SDN = new Array
|
|
||||||
("일",
|
|
||||||
"월",
|
|
||||||
"화",
|
|
||||||
"수",
|
|
||||||
"목",
|
|
||||||
"금",
|
|
||||||
"토",
|
|
||||||
"일");
|
|
||||||
|
|
||||||
// full month names
|
|
||||||
DyCalendar._MN = new Array
|
|
||||||
("1월",
|
|
||||||
"2월",
|
|
||||||
"3월",
|
|
||||||
"4월",
|
|
||||||
"5월",
|
|
||||||
"6월",
|
|
||||||
"7월",
|
|
||||||
"8월",
|
|
||||||
"9월",
|
|
||||||
"10월",
|
|
||||||
"11월",
|
|
||||||
"12월");
|
|
||||||
|
|
||||||
// short month names
|
|
||||||
DyCalendar._SMN = new Array
|
|
||||||
("1",
|
|
||||||
"2",
|
|
||||||
"3",
|
|
||||||
"4",
|
|
||||||
"5",
|
|
||||||
"6",
|
|
||||||
"7",
|
|
||||||
"8",
|
|
||||||
"9",
|
|
||||||
"10",
|
|
||||||
"11",
|
|
||||||
"12");
|
|
||||||
|
|
||||||
// tooltips
|
|
||||||
DyCalendar._TT = {};
|
|
||||||
DyCalendar._TT["INFO"] = "calendar 소개";
|
|
||||||
|
|
||||||
DyCalendar._TT["ABOUT"] =
|
|
||||||
"DHTML Date/Time Selector\n" +
|
|
||||||
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
|
|
||||||
"\n"+
|
|
||||||
"최신 버전을 받으시려면 http://www.dynarch.com/projects/calendar/ 에 방문하세요\n" +
|
|
||||||
"\n"+
|
|
||||||
"GNU LGPL 라이선스로 배포됩니다. \n"+
|
|
||||||
"라이선스에 대한 자세한 내용은 http://gnu.org/licenses/lgpl.html 을 읽으세요." +
|
|
||||||
"\n\n" +
|
|
||||||
"날짜 선택:\n" +
|
|
||||||
"- 연도를 선택하려면 \xab, \xbb 버튼을 사용합니다\n" +
|
|
||||||
"- 달을 선택하려면 " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " 버튼을 누르세요\n" +
|
|
||||||
"- 계속 누르고 있으면 위 값들을 빠르게 선택하실 수 있습니다.";
|
|
||||||
DyCalendar._TT["ABOUT_TIME"] = "\n\n" +
|
|
||||||
"시간 선택:\n" +
|
|
||||||
"- 마우스로 누르면 시간이 증가합니다\n" +
|
|
||||||
"- Shift 키와 함께 누르면 감소합니다\n" +
|
|
||||||
"- 누른 상태에서 마우스를 움직이면 좀 더 빠르게 값이 변합니다.\n";
|
|
||||||
|
|
||||||
DyCalendar._TT["PREV_YEAR"] = "지난 해 (길게 누르면 목록)";
|
|
||||||
DyCalendar._TT["PREV_MONTH"] = "지난 달 (길게 누르면 목록)";
|
|
||||||
DyCalendar._TT["GO_TODAY"] = "오늘 날짜로";
|
|
||||||
DyCalendar._TT["NEXT_MONTH"] = "다음 달 (길게 누르면 목록)";
|
|
||||||
DyCalendar._TT["NEXT_YEAR"] = "다음 해 (길게 누르면 목록)";
|
|
||||||
DyCalendar._TT["SEL_DATE"] = "날짜를 선택하세요";
|
|
||||||
DyCalendar._TT["DRAG_TO_MOVE"] = "마우스 드래그로 이동 하세요";
|
|
||||||
DyCalendar._TT["PART_TODAY"] = " (오늘)";
|
|
||||||
|
|
||||||
DyCalendar._TT["DAY_FIRST"] = "%s 먼저 표시";
|
|
||||||
|
|
||||||
DyCalendar._TT["WEEKEND"] = "0,6";
|
|
||||||
|
|
||||||
DyCalendar._TT["CLOSE"] = "닫기";
|
|
||||||
DyCalendar._TT["TODAY"] = "오늘";
|
|
||||||
DyCalendar._TT["TIME_PART"] = "(Shift-)클릭 또는 드래그 하세요";
|
|
||||||
|
|
||||||
// date formats
|
|
||||||
DyCalendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
|
|
||||||
DyCalendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]";
|
|
||||||
|
|
||||||
DyCalendar._TT["WK"] = "주";
|
|
||||||
DyCalendar._TT["TIME"] = "시:";
|
|
||||||
|
|
@ -1,129 +0,0 @@
|
||||||
// ** I18N
|
|
||||||
|
|
||||||
// DyCalendar RU language
|
|
||||||
// Author: Mihai Bazon, <mihai_bazon@yahoo.com>
|
|
||||||
// Translation: bradly1, <bradly1@paran.com>
|
|
||||||
// Encoding: UTF-8
|
|
||||||
// lang : RU
|
|
||||||
// Distributed under the same terms as the calendar itself.
|
|
||||||
|
|
||||||
// For translators: please use UTF-8 if possible. We strongly believe that
|
|
||||||
// Unicode is the answer to a real internationalized world. Also please
|
|
||||||
// include your contact information in the header, as can be seen above.
|
|
||||||
|
|
||||||
// full day names
|
|
||||||
DyCalendar._DN = new Array
|
|
||||||
("Воскресенье",
|
|
||||||
"Понедельник",
|
|
||||||
"Вторник",
|
|
||||||
"Среда",
|
|
||||||
"Четверг",
|
|
||||||
"Пятница",
|
|
||||||
"Суббота",
|
|
||||||
"Воскресенье");
|
|
||||||
|
|
||||||
// Please note that the following array of short day names (and the same goes
|
|
||||||
// for short month names, _SMN) isn't absolutely necessary. We give it here
|
|
||||||
// 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:
|
|
||||||
//
|
|
||||||
// DyCalendar._SDN_len = N; // short day 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
|
|
||||||
// present, to be compatible with translation files that were written before
|
|
||||||
// this feature.
|
|
||||||
|
|
||||||
// short day names
|
|
||||||
DyCalendar._SDN = new Array
|
|
||||||
("Sun",
|
|
||||||
"ПН",
|
|
||||||
"ВТ",
|
|
||||||
"Wed",
|
|
||||||
"Thu",
|
|
||||||
"Пят",
|
|
||||||
"СБ",
|
|
||||||
"Солнце");
|
|
||||||
|
|
||||||
// First day of the week. "0" means display Sunday first, "1" means display
|
|
||||||
// Monday first, etc.
|
|
||||||
DyCalendar._FD = 0;
|
|
||||||
|
|
||||||
// full month names
|
|
||||||
DyCalendar._MN = new Array
|
|
||||||
("Январь",
|
|
||||||
"Февраль",
|
|
||||||
"Марта",
|
|
||||||
"Апрель",
|
|
||||||
"Мая",
|
|
||||||
"Июнь",
|
|
||||||
"Июль",
|
|
||||||
"Август",
|
|
||||||
"Сентябрь",
|
|
||||||
"Октябрь",
|
|
||||||
"Ноябрь",
|
|
||||||
"Декабрь");
|
|
||||||
|
|
||||||
// short month names
|
|
||||||
DyCalendar._SMN = new Array
|
|
||||||
("Январь",
|
|
||||||
"Февраль",
|
|
||||||
"Марта",
|
|
||||||
"Апрель",
|
|
||||||
"Мая",
|
|
||||||
"Июнь",
|
|
||||||
"Июль",
|
|
||||||
"Август",
|
|
||||||
"Сентябрь",
|
|
||||||
"Октябрь",
|
|
||||||
"Ноябрь",
|
|
||||||
"Декабрь");
|
|
||||||
|
|
||||||
// tooltips
|
|
||||||
DyCalendar._TT = {};
|
|
||||||
DyCalendar._TT["INFO"] = "О календаре";
|
|
||||||
|
|
||||||
DyCalendar._TT["ABOUT"] =
|
|
||||||
"DHTML Date/Time Selector\n" +
|
|
||||||
"(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" +
|
|
||||||
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
|
|
||||||
"\n\n" +
|
|
||||||
"Date selection:\n" +
|
|
||||||
"- Use the \xab, \xbb buttons to select year\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.";
|
|
||||||
DyCalendar._TT["ABOUT_TIME"] = "\n\n" +
|
|
||||||
"Time selection:\n" +
|
|
||||||
"- Click on any of the time parts to increase it\n" +
|
|
||||||
"- or Shift-click to decrease it\n" +
|
|
||||||
"- or click and drag for faster selection.";
|
|
||||||
|
|
||||||
DyCalendar._TT [ "PREV_YEAR"] = "Пред. Год (удерживать для меню)";
|
|
||||||
DyCalendar._TT [ "PREV_MONTH"] = "Пред. Месяце (удерживать для меню)";
|
|
||||||
DyCalendar._TT [ "GO_TODAY"] = "Перейти Сегодня";
|
|
||||||
DyCalendar._TT [ "NEXT_MONTH"] = "В следующем месяце (удерживать для меню)";
|
|
||||||
DyCalendar._TT [ "NEXT_YEAR"] = "В следующем году (удерживать для меню)";
|
|
||||||
DyCalendar._TT [ "SEL_DATE"] = "Выберите дату";
|
|
||||||
DyCalendar._TT [ "DRAG_TO_MOVE"] = "Перетаскивайте двигаться";
|
|
||||||
DyCalendar._TT [ "PART_TODAY"] = "(сегодня)";
|
|
||||||
|
|
||||||
// the following is to inform that "%s" is to be the first day of week
|
|
||||||
// %s will be replaced with the day name.
|
|
||||||
DyCalendar._TT [ "DAY_FIRST"] = "display% с первой";
|
|
||||||
|
|
||||||
// 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
|
|
||||||
// means Monday, etc.
|
|
||||||
DyCalendar._TT [ "WEEKEND"] = "0,6";
|
|
||||||
|
|
||||||
DyCalendar._TT [ "CLOSE"] = "Закрыть";
|
|
||||||
DyCalendar._TT [ "Today"] = "Сегодня";
|
|
||||||
DyCalendar._TT [ "TIME_PART"] = "(Shift-) клик или перетащите для изменения стоимости";
|
|
||||||
|
|
||||||
// date formats
|
|
||||||
DyCalendar._TT [ "DEF_DATE_FORMAT"] = "% Y-% м-% г";
|
|
||||||
DyCalendar._TT [ "TT_DATE_FORMAT"] = "%,%% е б";
|
|
||||||
|
|
||||||
DyCalendar._TT [ "WK"] = "Нед";
|
|
||||||
DyCalendar._TT [ "TIME"] = "Время:";
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
||||||
/* Copyright Mihai Bazon, 2002, 2003 | http://dynarch.com/mishoo/
|
|
||||||
* ---------------------------------------------------------------------------
|
|
||||||
*
|
|
||||||
* The DHTML Calendar
|
|
||||||
*
|
|
||||||
* Details and latest version at:
|
|
||||||
* http://dynarch.com/mishoo/calendar.epl
|
|
||||||
*
|
|
||||||
* This script is distributed under the GNU Lesser General Public License.
|
|
||||||
* Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* This file defines helper functions for setting up the calendar. They are
|
|
||||||
* intended to help non-programmers get a working calendar on their site
|
|
||||||
* quickly. This script should not be seen as part of the calendar. It just
|
|
||||||
* shows you what one can do with the calendar, while in the same time
|
|
||||||
* providing a quick and simple method for setting it up. If you need
|
|
||||||
* exhaustive customization of the calendar creation process feel free to
|
|
||||||
* modify this code to suit your needs (this is recommended and much better
|
|
||||||
* than modifying calendar.js itself).
|
|
||||||
*/
|
|
||||||
|
|
||||||
// $Id: calendar-setup.js,v 1.25 2005/03/07 09:51:33 mishoo Exp $
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This function "patches" an input field (or other element) to use a calendar
|
|
||||||
* widget for date selection.
|
|
||||||
*
|
|
||||||
* The "params" is a single object that can have the following properties:
|
|
||||||
*
|
|
||||||
* prop. name | description
|
|
||||||
* -------------------------------------------------------------------------------------------------
|
|
||||||
* inputField | the ID of an input field to store the date
|
|
||||||
* displayArea | the ID of a DIV or other element to show the date
|
|
||||||
* button | ID of a button or other element that will trigger the calendar
|
|
||||||
* eventName | event that will trigger the calendar, without the "on" prefix (default: "click")
|
|
||||||
* ifFormat | date format that will be stored in the input field
|
|
||||||
* daFormat | the date format that will be used to display the date in displayArea
|
|
||||||
* singleClick | (true/false) wether the calendar is in single click mode or not (default: true)
|
|
||||||
* firstDay | numeric: 0 to 6. "0" means display Sunday first, "1" means display Monday first, etc.
|
|
||||||
* align | alignment (default: "Br"); if you don't know what's this see the calendar documentation
|
|
||||||
* range | array with 2 elements. Default: [1900, 2999] -- the range of years available
|
|
||||||
* weekNumbers | (true/false) if it's true (default) the calendar will display week numbers
|
|
||||||
* flat | null or element ID; if not null the calendar will be a flat calendar having the parent with the given ID
|
|
||||||
* flatCallback | function that receives a JS Date object and returns an URL to point the browser to (for flat calendar)
|
|
||||||
* disableFunc | function that receives a JS Date object and should return true if that date has to be disabled in the calendar
|
|
||||||
* onSelect | function that gets called when a date is selected. You don't _have_ to supply this (the default is generally okay)
|
|
||||||
* onClose | function that gets called when the calendar is closed. [default]
|
|
||||||
* onUpdate | function that gets called after the date is updated in the input field. Receives a reference to the calendar.
|
|
||||||
* date | the date that the calendar will be initially displayed to
|
|
||||||
* showsTime | default: false; if true the calendar will include a time selector
|
|
||||||
* timeFormat | the time format; can be "12" or "24", default is "12"
|
|
||||||
* electric | if true (default) then given fields/date areas are updated for each move; otherwise they're updated only on close
|
|
||||||
* step | configures the step of the years in drop-down boxes; default: 2
|
|
||||||
* position | configures the calendar absolute position; default: null
|
|
||||||
* cache | if "true" (but default: "false") it will reuse the same calendar object, where possible
|
|
||||||
* showOthers | if "true" (but default: "false") it will show days from other months too
|
|
||||||
*
|
|
||||||
* None of them is required, they all have default values. However, if you
|
|
||||||
* pass none of "inputField", "displayArea" or "button" you'll get a warning
|
|
||||||
* saying "nothing to setup".
|
|
||||||
*/
|
|
||||||
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};
|
|
||||||
|
|
@ -1,124 +0,0 @@
|
||||||
// ** I18N
|
|
||||||
|
|
||||||
// DyCalendar zh-CN language
|
|
||||||
// Author: Mihai Bazon, <mihai_bazon@yahoo.com>
|
|
||||||
// Translation: Yourim Yi <yyi@yourim.net>
|
|
||||||
// Encoding: UTF-8
|
|
||||||
// lang : ko
|
|
||||||
// Distributed under the same terms as the calendar itself.
|
|
||||||
|
|
||||||
// For translators: please use UTF-8 if possible. We strongly believe that
|
|
||||||
// Unicode is the answer to a real internationalized world. Also please
|
|
||||||
// include your contact information in the header, as can be seen above.
|
|
||||||
|
|
||||||
// full day names
|
|
||||||
|
|
||||||
DyCalendar._DN = new Array
|
|
||||||
("星期日",
|
|
||||||
"星期一",
|
|
||||||
"星期二",
|
|
||||||
"星期三",
|
|
||||||
"星期四",
|
|
||||||
"星期五",
|
|
||||||
"星期六",
|
|
||||||
"星期日");
|
|
||||||
|
|
||||||
// Please note that the following array of short day names (and the same goes
|
|
||||||
// for short month names, _SMN) isn't absolutely necessary. We give it here
|
|
||||||
// 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:
|
|
||||||
//
|
|
||||||
// DyCalendar._SDN_len = N; // short day 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
|
|
||||||
// present, to be compatible with translation files that were written before
|
|
||||||
// this feature.
|
|
||||||
|
|
||||||
// short day names
|
|
||||||
DyCalendar._SDN = new Array
|
|
||||||
("日",
|
|
||||||
"一",
|
|
||||||
"二",
|
|
||||||
"三",
|
|
||||||
"四",
|
|
||||||
"五",
|
|
||||||
"六",
|
|
||||||
"日");
|
|
||||||
|
|
||||||
// full month names
|
|
||||||
DyCalendar._MN = new Array
|
|
||||||
("1月",
|
|
||||||
"2月",
|
|
||||||
"3月",
|
|
||||||
"4月",
|
|
||||||
"5月",
|
|
||||||
"6月",
|
|
||||||
"7月",
|
|
||||||
"8月",
|
|
||||||
"9月",
|
|
||||||
"10月",
|
|
||||||
"11月",
|
|
||||||
"12月");
|
|
||||||
|
|
||||||
// short month names
|
|
||||||
DyCalendar._SMN = new Array
|
|
||||||
("1",
|
|
||||||
"2",
|
|
||||||
"3",
|
|
||||||
"4",
|
|
||||||
"5",
|
|
||||||
"6",
|
|
||||||
"7",
|
|
||||||
"8",
|
|
||||||
"9",
|
|
||||||
"10",
|
|
||||||
"11",
|
|
||||||
"12");
|
|
||||||
|
|
||||||
// tooltips
|
|
||||||
DyCalendar._TT = {};
|
|
||||||
DyCalendar._TT["INFO"] = "calendar 简介";
|
|
||||||
|
|
||||||
DyCalendar._TT["ABOUT"] =
|
|
||||||
"DHTML Date/Time Selector\n" +
|
|
||||||
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
|
|
||||||
"\n"+
|
|
||||||
"下载最新版本请访问 http://www.dynarch.com/projects/calendar/ \n" +
|
|
||||||
"\n"+
|
|
||||||
"遵循GNU LGPL许可协议。 \n"+
|
|
||||||
"具体许可内容请参考 http://gnu.org/licenses/lgpl.html " +
|
|
||||||
"\n\n" +
|
|
||||||
"日期选择:\n" +
|
|
||||||
"- 选择年份请使用 \xab, \xbb 按钮\n" +
|
|
||||||
"- 选择月份请使用 " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " 按钮\n" +
|
|
||||||
"- 按住按钮可快速的选择所需的年份或月份";
|
|
||||||
DyCalendar._TT["ABOUT_TIME"] = "\n\n" +
|
|
||||||
"时间选择:\n" +
|
|
||||||
"- 鼠标点击可增加时间\n" +
|
|
||||||
"- 配合Shift键,时间减少 \n" +
|
|
||||||
"- 鼠标按住状态下向右为增加向左为减少,这样时间调整会快一些。\n";
|
|
||||||
|
|
||||||
DyCalendar._TT["PREV_YEAR"] = "去年 (按住显示目录)";
|
|
||||||
DyCalendar._TT["PREV_MONTH"] = "上月 (按住显示目录)";
|
|
||||||
DyCalendar._TT["GO_TODAY"] = "设为今日";
|
|
||||||
DyCalendar._TT["NEXT_MONTH"] = "下月 (按住显示目录)";
|
|
||||||
DyCalendar._TT["NEXT_YEAR"] = "来年 (按住显示目录)";
|
|
||||||
DyCalendar._TT["SEL_DATE"] = "请选择日期";
|
|
||||||
DyCalendar._TT["DRAG_TO_MOVE"] = "可以用鼠标拖动";
|
|
||||||
DyCalendar._TT["PART_TODAY"] = " (今日)";
|
|
||||||
|
|
||||||
DyCalendar._TT["DAY_FIRST"] = "%s排到第一列";
|
|
||||||
|
|
||||||
DyCalendar._TT["WEEKEND"] = "0,6";
|
|
||||||
|
|
||||||
DyCalendar._TT["CLOSE"] = "关闭";
|
|
||||||
DyCalendar._TT["TODAY"] = "今日";
|
|
||||||
DyCalendar._TT["TIME_PART"] = "(Shift-)点击或拖动";
|
|
||||||
|
|
||||||
// date formats
|
|
||||||
DyCalendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
|
|
||||||
DyCalendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]";
|
|
||||||
|
|
||||||
DyCalendar._TT["WK"] = "周";
|
|
||||||
DyCalendar._TT["TIME"] = "时:";
|
|
||||||
|
|
@ -1,122 +0,0 @@
|
||||||
// ** I18N
|
|
||||||
|
|
||||||
// DyCalendar zh-TW language
|
|
||||||
// Author: Mihai Bazon, <mihai_bazon@yahoo.com>
|
|
||||||
// Encoding: UTF-8
|
|
||||||
// Distributed under the same terms as the calendar itself.
|
|
||||||
|
|
||||||
// For translators: please use UTF-8 if possible. We strongly believe that
|
|
||||||
// Unicode is the answer to a real internationalized world. Also please
|
|
||||||
// include your contact information in the header, as can be seen above.
|
|
||||||
|
|
||||||
// full day names
|
|
||||||
|
|
||||||
DyCalendar._DN = new Array
|
|
||||||
("星期日",
|
|
||||||
"星期一",
|
|
||||||
"星期二",
|
|
||||||
"星期三",
|
|
||||||
"星期四",
|
|
||||||
"星期五",
|
|
||||||
"星期六",
|
|
||||||
"星期日");
|
|
||||||
|
|
||||||
// Please note that the following array of short day names (and the same goes
|
|
||||||
// for short month names, _SMN) isn't absolutely necessary. We give it here
|
|
||||||
// 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:
|
|
||||||
//
|
|
||||||
// DyCalendar._SDN_len = N; // short day 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
|
|
||||||
// present, to be compatible with translation files that were written before
|
|
||||||
// this feature.
|
|
||||||
|
|
||||||
// short day names
|
|
||||||
DyCalendar._SDN = new Array
|
|
||||||
("日",
|
|
||||||
"一",
|
|
||||||
"二",
|
|
||||||
"三",
|
|
||||||
"四",
|
|
||||||
"五",
|
|
||||||
"六",
|
|
||||||
"日");
|
|
||||||
|
|
||||||
// full month names
|
|
||||||
DyCalendar._MN = new Array
|
|
||||||
("1月",
|
|
||||||
"2月",
|
|
||||||
"3月",
|
|
||||||
"4月",
|
|
||||||
"5月",
|
|
||||||
"6月",
|
|
||||||
"7月",
|
|
||||||
"8月",
|
|
||||||
"9月",
|
|
||||||
"10月",
|
|
||||||
"11月",
|
|
||||||
"12月");
|
|
||||||
|
|
||||||
// short month names
|
|
||||||
DyCalendar._SMN = new Array
|
|
||||||
("1",
|
|
||||||
"2",
|
|
||||||
"3",
|
|
||||||
"4",
|
|
||||||
"5",
|
|
||||||
"6",
|
|
||||||
"7",
|
|
||||||
"8",
|
|
||||||
"9",
|
|
||||||
"10",
|
|
||||||
"11",
|
|
||||||
"12");
|
|
||||||
|
|
||||||
// tooltips
|
|
||||||
DyCalendar._TT = {};
|
|
||||||
DyCalendar._TT["INFO"] = "日曆簡介";
|
|
||||||
|
|
||||||
DyCalendar._TT["ABOUT"] =
|
|
||||||
"DHTML Date/Time Selector\n" +
|
|
||||||
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
|
|
||||||
"\n"+
|
|
||||||
"請到 http://www.dynarch.com/projects/calendar/ 下載最新版本\n" +
|
|
||||||
"\n"+
|
|
||||||
"遵照 GNU LGPL版權。 \n"+
|
|
||||||
"實際的版權内容請參考考 http://gnu.org/licenses/lgpl.html " +
|
|
||||||
"\n\n" +
|
|
||||||
"選擇日期:\n" +
|
|
||||||
"- 選擇年份請使用 \xab, \xbb 按鈕\n" +
|
|
||||||
"- 選擇月份請使用 " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " 按鈕\n" +
|
|
||||||
"- 按住按鈕可快速的選擇所要的年份或月份";
|
|
||||||
DyCalendar._TT["ABOUT_TIME"] = "\n\n" +
|
|
||||||
"選擇時間:\n" +
|
|
||||||
"- 以滑鼠點擊可增加時間\n" +
|
|
||||||
"- 配合Shift按鍵,可減少時間 \n" +
|
|
||||||
"- 在按住滑鼠的狀態下,往右是增加、往左是減少,可快速調整時間。\n";
|
|
||||||
|
|
||||||
DyCalendar._TT["PREV_YEAR"] = "去年 (按住顯示目錄)";
|
|
||||||
DyCalendar._TT["PREV_MONTH"] = "上個月 (按住顯示目錄)";
|
|
||||||
DyCalendar._TT["GO_TODAY"] = "設為今天";
|
|
||||||
DyCalendar._TT["NEXT_MONTH"] = "下個月 (按住顯示目錄)";
|
|
||||||
DyCalendar._TT["NEXT_YEAR"] = "明年 (按住顯示目錄)";
|
|
||||||
DyCalendar._TT["SEL_DATE"] = "請選擇日期";
|
|
||||||
DyCalendar._TT["DRAG_TO_MOVE"] = "可用滑鼠拖曳";
|
|
||||||
DyCalendar._TT["PART_TODAY"] = " (今日)";
|
|
||||||
|
|
||||||
DyCalendar._TT["DAY_FIRST"] = "%s排到第一列";
|
|
||||||
|
|
||||||
DyCalendar._TT["WEEKEND"] = "0,6";
|
|
||||||
|
|
||||||
DyCalendar._TT["CLOSE"] = "關閉";
|
|
||||||
DyCalendar._TT["TODAY"] = "今日";
|
|
||||||
DyCalendar._TT["TIME_PART"] = "(Shift-)點擊或拖曳";
|
|
||||||
|
|
||||||
// date formats
|
|
||||||
DyCalendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
|
|
||||||
DyCalendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]";
|
|
||||||
|
|
||||||
DyCalendar._TT["WK"] = "周";
|
|
||||||
DyCalendar._TT["TIME"] = "時:";
|
|
||||||
204
common/js/calendar.min.js
vendored
|
|
@ -1,204 +0,0 @@
|
||||||
/* Copyright Mihai Bazon, 2002-2005 | www.bazon.net/mishoo
|
|
||||||
* -----------------------------------------------------------
|
|
||||||
*
|
|
||||||
* The DHTML Calendar, version 1.0 "It is happening again"
|
|
||||||
*
|
|
||||||
* Details and latest version at:
|
|
||||||
* www.dynarch.com/projects/calendar
|
|
||||||
*
|
|
||||||
* This script is developed by Dynarch.com. Visit us at www.dynarch.com.
|
|
||||||
*
|
|
||||||
* This script is distributed under the GNU Lesser General Public License.
|
|
||||||
* Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*/
|
|
||||||
|
|
||||||
// $Id: calendar.js,v 1.51 2005/03/07 16:44:31 mishoo Exp $
|
|
||||||
|
|
||||||
/** The Calendar object constructor. */
|
|
||||||
|
|
||||||
DyCalendar=function(firstDayOfWeek,dateStr,onSelected,onClose){this.activeDiv=null;this.currentDateEl=null;this.getDateStatus=null;this.getDateToolTip=null;this.getDateText=null;this.timeout=null;this.onSelected=onSelected||null;this.onClose=onClose||null;this.dragging=false;this.hidden=false;this.minYear=1970;this.maxYear=2050;this.dateFormat=DyCalendar._TT["DEF_DATE_FORMAT"];this.ttDateFormat=DyCalendar._TT["TT_DATE_FORMAT"];this.isPopup=true;this.weekNumbers=true;this.firstDayOfWeek=typeof firstDayOfWeek=="number"?firstDayOfWeek:DyCalendar._FD;this.showsOtherMonths=false;this.dateStr=dateStr;this.ar_days=null;this.showsTime=false;this.time24=true;this.yearStep=2;this.hiliteToday=true;this.multiple=null;this.table=null;this.element=null;this.tbody=null;this.firstdayname=null;this.monthsCombo=null;this.yearsCombo=null;this.hilitedMonth=null;this.activeMonth=null;this.hilitedYear=null;this.activeYear=null;this.dateClicked=false;if(typeof DyCalendar._SDN=="undefined"){if(typeof DyCalendar._SDN_len=="undefined")
|
|
||||||
DyCalendar._SDN_len=3;var ar=new Array();for(var i=8;i>0;){ar[--i]=DyCalendar._DN[i].substr(0,DyCalendar._SDN_len);}
|
|
||||||
DyCalendar._SDN=ar;if(typeof DyCalendar._SMN_len=="undefined")
|
|
||||||
DyCalendar._SMN_len=3;ar=new Array();for(var i=12;i>0;){ar[--i]=DyCalendar._MN[i].substr(0,DyCalendar._SMN_len);}
|
|
||||||
DyCalendar._SMN=ar;}};DyCalendar._C=null;DyCalendar.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));DyCalendar.is_ie5=(DyCalendar.is_ie&&/msie 5\.0/i.test(navigator.userAgent));DyCalendar.is_opera=/opera/i.test(navigator.userAgent);DyCalendar.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);DyCalendar.getAbsolutePos=function(el){var SL=0,ST=0;var is_div=/^div$/i.test(el.tagName);if(is_div&&el.scrollLeft)
|
|
||||||
SL=el.scrollLeft;if(is_div&&el.scrollTop)
|
|
||||||
ST=el.scrollTop;var r={x:el.offsetLeft-SL,y:el.offsetTop-ST};if(el.offsetParent){var tmp=this.getAbsolutePos(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;}
|
|
||||||
return r;};DyCalendar.isRelated=function(el,evt){var related=evt.relatedTarget;if(!related){var type=evt.type;if(type=="mouseover"){related=evt.fromElement;}else if(type=="mouseout"){related=evt.toElement;}}
|
|
||||||
while(related){if(related==el){return true;}
|
|
||||||
related=related.parentNode;}
|
|
||||||
return false;};DyCalendar.removeClass=function(el,className){if(!(el&&el.className)){return;}
|
|
||||||
var cls=el.className.split(" ");var ar=new Array();for(var i=cls.length;i>0;){if(cls[--i]!=className){ar[ar.length]=cls[i];}}
|
|
||||||
el.className=ar.join(" ");};DyCalendar.addClass=function(el,className){DyCalendar.removeClass(el,className);el.className+=" "+className;};DyCalendar.getElement=function(ev){var f=DyCalendar.is_ie?window.event.srcElement:ev.currentTarget;while(f.nodeType!=1||/^div$/i.test(f.tagName))
|
|
||||||
f=f.parentNode;return f;};DyCalendar.getTargetElement=function(ev){var f=DyCalendar.is_ie?window.event.srcElement:ev.target;while(f.nodeType!=1)
|
|
||||||
f=f.parentNode;return f;};DyCalendar.stopEvent=function(ev){ev||(ev=window.event);if(DyCalendar.is_ie){ev.cancelBubble=true;ev.returnValue=false;}else{ev.preventDefault();ev.stopPropagation();}
|
|
||||||
return false;};DyCalendar.addEvent=function(el,evname,func){if(el.attachEvent){el.attachEvent("on"+evname,func);}else if(el.addEventListener){el.addEventListener(evname,func,true);}else{el["on"+evname]=func;}};DyCalendar.removeEvent=function(el,evname,func){if(el.detachEvent){el.detachEvent("on"+evname,func);}else if(el.removeEventListener){el.removeEventListener(evname,func,true);}else{el["on"+evname]=null;}};DyCalendar.createElement=function(type,parent){var el=null;if(document.createElementNS){el=document.createElementNS("http://www.w3.org/1999/xhtml",type);}else{el=document.createElement(type);}
|
|
||||||
if(typeof parent!="undefined"){parent.appendChild(el);}
|
|
||||||
return el;};DyCalendar._add_evs=function(el){with(DyCalendar){addEvent(el,"mouseover",dayMouseOver);addEvent(el,"mousedown",dayMouseDown);addEvent(el,"mouseout",dayMouseOut);if(is_ie){addEvent(el,"dblclick",dayMouseDblClick);el.setAttribute("unselectable",true);}}};DyCalendar.findMonth=function(el){if(typeof el.month!="undefined"){return el;}else if(typeof el.parentNode.month!="undefined"){return el.parentNode;}
|
|
||||||
return null;};DyCalendar.findYear=function(el){if(typeof el.year!="undefined"){return el;}else if(typeof el.parentNode.year!="undefined"){return el.parentNode;}
|
|
||||||
return null;};DyCalendar.showMonthsCombo=function(){var cal=DyCalendar._C;if(!cal){return false;}
|
|
||||||
var cal=cal;var cd=cal.activeDiv;var mc=cal.monthsCombo;if(cal.hilitedMonth){DyCalendar.removeClass(cal.hilitedMonth,"hilite");}
|
|
||||||
if(cal.activeMonth){DyCalendar.removeClass(cal.activeMonth,"active");}
|
|
||||||
var mon=cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];DyCalendar.addClass(mon,"active");cal.activeMonth=mon;var s=mc.style;s.display="block";if(cd.navtype<0)
|
|
||||||
s.left=cd.offsetLeft+"px";else{var mcw=mc.offsetWidth;if(typeof mcw=="undefined")
|
|
||||||
mcw=50;s.left=(cd.offsetLeft+cd.offsetWidth-mcw)+"px";}
|
|
||||||
s.top=(cd.offsetTop+cd.offsetHeight)+"px";};DyCalendar.showYearsCombo=function(fwd){var cal=DyCalendar._C;if(!cal){return false;}
|
|
||||||
var cal=cal;var cd=cal.activeDiv;var yc=cal.yearsCombo;if(cal.hilitedYear){DyCalendar.removeClass(cal.hilitedYear,"hilite");}
|
|
||||||
if(cal.activeYear){DyCalendar.removeClass(cal.activeYear,"active");}
|
|
||||||
cal.activeYear=null;var Y=cal.date.getFullYear()+(fwd?1:-1);var yr=yc.firstChild;var show=false;for(var i=12;i>0;--i){if(Y>=cal.minYear&&Y<=cal.maxYear){yr.innerHTML=Y;yr.year=Y;yr.style.display="block";show=true;}else{yr.style.display="none";}
|
|
||||||
yr=yr.nextSibling;Y+=fwd?cal.yearStep:-cal.yearStep;}
|
|
||||||
if(show){var s=yc.style;s.display="block";if(cd.navtype<0)
|
|
||||||
s.left=cd.offsetLeft+"px";else{var ycw=yc.offsetWidth;if(typeof ycw=="undefined")
|
|
||||||
ycw=50;s.left=(cd.offsetLeft+cd.offsetWidth-ycw)+"px";}
|
|
||||||
s.top=(cd.offsetTop+cd.offsetHeight)+"px";}};DyCalendar.tableMouseUp=function(ev){var cal=DyCalendar._C;if(!cal){return false;}
|
|
||||||
if(cal.timeout){clearTimeout(cal.timeout);}
|
|
||||||
var el=cal.activeDiv;if(!el){return false;}
|
|
||||||
var target=DyCalendar.getTargetElement(ev);ev||(ev=window.event);DyCalendar.removeClass(el,"active");if(target==el||target.parentNode==el){DyCalendar.cellClick(el,ev);}
|
|
||||||
var mon=DyCalendar.findMonth(target);var date=null;if(mon){date=new Date(cal.date);if(mon.month!=date.getMonth()){date.setMonth(mon.month);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}else{var year=DyCalendar.findYear(target);if(year){date=new Date(cal.date);if(year.year!=date.getFullYear()){date.setFullYear(year.year);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}}
|
|
||||||
with(DyCalendar){removeEvent(document,"mouseup",tableMouseUp);removeEvent(document,"mouseover",tableMouseOver);removeEvent(document,"mousemove",tableMouseOver);cal._hideCombos();_C=null;return stopEvent(ev);}};DyCalendar.tableMouseOver=function(ev){var cal=DyCalendar._C;if(!cal){return;}
|
|
||||||
var el=cal.activeDiv;var target=DyCalendar.getTargetElement(ev);if(target==el||target.parentNode==el){DyCalendar.addClass(el,"hilite active");DyCalendar.addClass(el.parentNode,"rowhilite");}else{if(typeof el.navtype=="undefined"||(el.navtype!=50&&(el.navtype==0||Math.abs(el.navtype)>2)))
|
|
||||||
DyCalendar.removeClass(el,"active");DyCalendar.removeClass(el,"hilite");DyCalendar.removeClass(el.parentNode,"rowhilite");}
|
|
||||||
ev||(ev=window.event);if(el.navtype==50&&target!=el){var pos=DyCalendar.getAbsolutePos(el);var w=el.offsetWidth;var x=ev.clientX;var dx;var decrease=true;if(x>pos.x+w){dx=x-pos.x-w;decrease=false;}else
|
|
||||||
dx=pos.x-x;if(dx<0)dx=0;var range=el._range;var current=el._current;var count=Math.floor(dx/10)%range.length;for(var i=range.length;--i>=0;)
|
|
||||||
if(range[i]==current)
|
|
||||||
break;while(count-->0)
|
|
||||||
if(decrease){if(--i<0)
|
|
||||||
i=range.length-1;}else if(++i>=range.length)
|
|
||||||
i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();}
|
|
||||||
var mon=DyCalendar.findMonth(target);if(mon){if(mon.month!=cal.date.getMonth()){if(cal.hilitedMonth){DyCalendar.removeClass(cal.hilitedMonth,"hilite");}
|
|
||||||
DyCalendar.addClass(mon,"hilite");cal.hilitedMonth=mon;}else if(cal.hilitedMonth){DyCalendar.removeClass(cal.hilitedMonth,"hilite");}}else{if(cal.hilitedMonth){DyCalendar.removeClass(cal.hilitedMonth,"hilite");}
|
|
||||||
var year=DyCalendar.findYear(target);if(year){if(year.year!=cal.date.getFullYear()){if(cal.hilitedYear){DyCalendar.removeClass(cal.hilitedYear,"hilite");}
|
|
||||||
DyCalendar.addClass(year,"hilite");cal.hilitedYear=year;}else if(cal.hilitedYear){DyCalendar.removeClass(cal.hilitedYear,"hilite");}}else if(cal.hilitedYear){DyCalendar.removeClass(cal.hilitedYear,"hilite");}}
|
|
||||||
return DyCalendar.stopEvent(ev);};DyCalendar.tableMouseDown=function(ev){if(DyCalendar.getTargetElement(ev)==DyCalendar.getElement(ev)){return DyCalendar.stopEvent(ev);}};DyCalendar.calDragIt=function(ev){var cal=DyCalendar._C;if(!(cal&&cal.dragging)){return false;}
|
|
||||||
var posX;var posY;if(DyCalendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posX=ev.pageX;posY=ev.pageY;}
|
|
||||||
cal.hideShowCovered();var st=cal.element.style;st.left=(posX-cal.xOffs)+"px";st.top=(posY-cal.yOffs)+"px";return DyCalendar.stopEvent(ev);};DyCalendar.calDragEnd=function(ev){var cal=DyCalendar._C;if(!cal){return false;}
|
|
||||||
cal.dragging=false;with(DyCalendar){removeEvent(document,"mousemove",calDragIt);removeEvent(document,"mouseup",calDragEnd);tableMouseUp(ev);}
|
|
||||||
cal.hideShowCovered();};DyCalendar.dayMouseDown=function(ev){var el=DyCalendar.getElement(ev);if(el.disabled){return false;}
|
|
||||||
var cal=el.calendar;cal.activeDiv=el;DyCalendar._C=cal;if(el.navtype!=300)with(DyCalendar){if(el.navtype==50){el._current=el.innerHTML;addEvent(document,"mousemove",tableMouseOver);}else
|
|
||||||
addEvent(document,DyCalendar.is_ie5?"mousemove":"mouseover",tableMouseOver);addClass(el,"hilite active");addEvent(document,"mouseup",tableMouseUp);}else if(cal.isPopup){cal._dragStart(ev);}
|
|
||||||
if(el.navtype==-1||el.navtype==1){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout("DyCalendar.showMonthsCombo()",250);}else if(el.navtype==-2||el.navtype==2){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout((el.navtype>0)?"DyCalendar.showYearsCombo(true)":"DyCalendar.showYearsCombo(false)",250);}else{cal.timeout=null;}
|
|
||||||
return DyCalendar.stopEvent(ev);};DyCalendar.dayMouseDblClick=function(ev){DyCalendar.cellClick(DyCalendar.getElement(ev),ev||window.event);if(DyCalendar.is_ie){document.selection.empty();}};DyCalendar.dayMouseOver=function(ev){var el=DyCalendar.getElement(ev);if(DyCalendar.isRelated(el,ev)||DyCalendar._C||el.disabled){return false;}
|
|
||||||
if(el.ttip){if(el.ttip.substr(0,1)=="_"){el.ttip=el.caldate.print(el.calendar.ttDateFormat)+el.ttip.substr(1);}
|
|
||||||
el.calendar.tooltips.innerHTML=el.ttip;}
|
|
||||||
if(el.navtype!=300){DyCalendar.addClass(el,"hilite");if(el.caldate){DyCalendar.addClass(el.parentNode,"rowhilite");}}
|
|
||||||
return DyCalendar.stopEvent(ev);};DyCalendar.dayMouseOut=function(ev){with(DyCalendar){var el=getElement(ev);if(isRelated(el,ev)||_C||el.disabled)
|
|
||||||
return false;removeClass(el,"hilite");if(el.caldate)
|
|
||||||
removeClass(el.parentNode,"rowhilite");if(el.calendar)
|
|
||||||
el.calendar.tooltips.innerHTML=_TT["SEL_DATE"];return stopEvent(ev);}};DyCalendar.cellClick=function(el,ev){var cal=el.calendar;var closing=false;var newdate=false;var date=null;if(typeof el.navtype=="undefined"){if(cal.currentDateEl){DyCalendar.removeClass(cal.currentDateEl,"selected");DyCalendar.addClass(el,"selected");closing=(cal.currentDateEl==el);if(!closing){cal.currentDateEl=el;}}
|
|
||||||
cal.date.setDateOnly(el.caldate);date=cal.date;var other_month=!(cal.dateClicked=!el.otherMonth);if(!other_month&&!cal.currentDateEl)
|
|
||||||
cal._toggleMultipleDate(new Date(date));else
|
|
||||||
newdate=!el.disabled;if(other_month)
|
|
||||||
cal._init(cal.firstDayOfWeek,date);}else{if(el.navtype==200){DyCalendar.removeClass(el,"hilite");cal.callCloseHandler();return;}
|
|
||||||
date=new Date(cal.date);if(el.navtype==0)
|
|
||||||
date.setDateOnly(new Date());cal.dateClicked=false;var year=date.getFullYear();var mon=date.getMonth();function setMonth(m){var day=date.getDate();var max=date.getMonthDays(m);if(day>max){date.setDate(max);}
|
|
||||||
date.setMonth(m);};switch(el.navtype){case 400:DyCalendar.removeClass(el,"hilite");var text=DyCalendar._TT["ABOUT"];if(typeof text!="undefined"){text+=cal.showsTime?DyCalendar._TT["ABOUT_TIME"]:"";}else{text="Help and about box text is not translated into this language.\n"+"If you know this language and you feel generous please update\n"+"the corresponding file in \"lang\" subdir to match calendar-en.js\n"+"and send it back to <mihai_bazon@yahoo.com> to get it into the distribution ;-)\n\n"+"Thank you!\n"+"http://dynarch.com/mishoo/calendar.epl\n";}
|
|
||||||
alert(text);return;case-2:if(year>cal.minYear){date.setFullYear(year-1);}
|
|
||||||
break;case-1:if(mon>0){setMonth(mon-1);}else if(year-->cal.minYear){date.setFullYear(year);setMonth(11);}
|
|
||||||
break;case 1:if(mon<11){setMonth(mon+1);}else if(year<cal.maxYear){date.setFullYear(year+1);setMonth(0);}
|
|
||||||
break;case 2:if(year<cal.maxYear){date.setFullYear(year+1);}
|
|
||||||
break;case 100:cal.setFirstDayOfWeek(el.fdow);return;case 50:var range=el._range;var current=el.innerHTML;for(var i=range.length;--i>=0;)
|
|
||||||
if(range[i]==current)
|
|
||||||
break;if(ev&&ev.shiftKey){if(--i<0)
|
|
||||||
i=range.length-1;}else if(++i>=range.length)
|
|
||||||
i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();return;case 0:if((typeof cal.getDateStatus=="function")&&cal.getDateStatus(date,date.getFullYear(),date.getMonth(),date.getDate())){return false;}
|
|
||||||
break;}
|
|
||||||
if(!date.equalsTo(cal.date)){cal.setDate(date);newdate=true;}else if(el.navtype==0)
|
|
||||||
newdate=closing=true;}
|
|
||||||
if(newdate){ev&&cal.callHandler();}
|
|
||||||
if(closing){DyCalendar.removeClass(el,"hilite");ev&&cal.callCloseHandler();}};DyCalendar.prototype.create=function(_par){var parent=null;if(!_par){parent=document.getElementsByTagName("body")[0];this.isPopup=true;}else{parent=_par;this.isPopup=false;}
|
|
||||||
this.date=this.dateStr?new Date(this.dateStr):new Date();var table=DyCalendar.createElement("table");this.table=table;table.cellSpacing=0;table.cellPadding=0;table.calendar=this;DyCalendar.addEvent(table,"mousedown",DyCalendar.tableMouseDown);var div=DyCalendar.createElement("div");this.element=div;div.className="calendar";div.style.zIndex="9999";if(this.isPopup){div.style.position="absolute";div.style.display="none";}
|
|
||||||
div.appendChild(table);var thead=DyCalendar.createElement("thead",table);var cell=null;var row=null;var cal=this;var hh=function(text,cs,navtype){cell=DyCalendar.createElement("td",row);cell.colSpan=cs;cell.className="button";if(navtype!=0&&Math.abs(navtype)<=2)
|
|
||||||
cell.className+=" nav";DyCalendar._add_evs(cell);cell.calendar=cal;cell.navtype=navtype;cell.innerHTML="<div unselectable='on'>"+text+"</div>";return cell;};row=DyCalendar.createElement("tr",thead);var title_length=6;(this.isPopup)&&--title_length;(this.weekNumbers)&&++title_length;hh("?",1,400).ttip=DyCalendar._TT["INFO"];this.title=hh("",title_length,300);this.title.className="title";if(this.isPopup){this.title.ttip=DyCalendar._TT["DRAG_TO_MOVE"];this.title.style.cursor="move";hh("×",1,200).ttip=DyCalendar._TT["CLOSE"];}
|
|
||||||
row=DyCalendar.createElement("tr",thead);row.className="headrow";this._nav_py=hh("«",1,-2);this._nav_py.ttip=DyCalendar._TT["PREV_YEAR"];this._nav_pm=hh("‹",1,-1);this._nav_pm.ttip=DyCalendar._TT["PREV_MONTH"];this._nav_now=hh(DyCalendar._TT["TODAY"],this.weekNumbers?4:3,0);this._nav_now.ttip=DyCalendar._TT["GO_TODAY"];this._nav_nm=hh("›",1,1);this._nav_nm.ttip=DyCalendar._TT["NEXT_MONTH"];this._nav_ny=hh("»",1,2);this._nav_ny.ttip=DyCalendar._TT["NEXT_YEAR"];row=DyCalendar.createElement("tr",thead);row.className="daynames";if(this.weekNumbers){cell=DyCalendar.createElement("td",row);cell.className="name wn";cell.innerHTML=DyCalendar._TT["WK"];}
|
|
||||||
for(var i=7;i>0;--i){cell=DyCalendar.createElement("td",row);if(!i){cell.navtype=100;cell.calendar=this;DyCalendar._add_evs(cell);}}
|
|
||||||
this.firstdayname=(this.weekNumbers)?row.firstChild.nextSibling:row.firstChild;this._displayWeekdays();var tbody=DyCalendar.createElement("tbody",table);this.tbody=tbody;for(i=6;i>0;--i){row=DyCalendar.createElement("tr",tbody);if(this.weekNumbers){cell=DyCalendar.createElement("td",row);}
|
|
||||||
for(var j=7;j>0;--j){cell=DyCalendar.createElement("td",row);cell.calendar=this;DyCalendar._add_evs(cell);}}
|
|
||||||
if(this.showsTime){row=DyCalendar.createElement("tr",tbody);row.className="time";cell=DyCalendar.createElement("td",row);cell.className="time";cell.colSpan=2;cell.innerHTML=DyCalendar._TT["TIME"]||" ";cell=DyCalendar.createElement("td",row);cell.className="time";cell.colSpan=this.weekNumbers?4:3;(function(){function makeTimePart(className,init,range_start,range_end){var part=DyCalendar.createElement("span",cell);part.className=className;part.innerHTML=init;part.calendar=cal;part.ttip=DyCalendar._TT["TIME_PART"];part.navtype=50;part._range=[];if(typeof range_start!="number")
|
|
||||||
part._range=range_start;else{for(var i=range_start;i<=range_end;++i){var txt;if(i<10&&range_end>=10)txt='0'+i;else txt=''+i;part._range[part._range.length]=txt;}}
|
|
||||||
DyCalendar._add_evs(part);return part;};var hrs=cal.date.getHours();var mins=cal.date.getMinutes();var t12=!cal.time24;var pm=(hrs>12);if(t12&&pm)hrs-=12;var H=makeTimePart("hour",hrs,t12?1:0,t12?12:23);var span=DyCalendar.createElement("span",cell);span.innerHTML=":";span.className="colon";var M=makeTimePart("minute",mins,0,59);var AP=null;cell=DyCalendar.createElement("td",row);cell.className="time";cell.colSpan=2;if(t12)
|
|
||||||
AP=makeTimePart("ampm",pm?"pm":"am",["am","pm"]);else
|
|
||||||
cell.innerHTML=" ";cal.onSetTime=function(){var pm,hrs=this.date.getHours(),mins=this.date.getMinutes();if(t12){pm=(hrs>=12);if(pm)hrs-=12;if(hrs==0)hrs=12;AP.innerHTML=pm?"pm":"am";}
|
|
||||||
H.innerHTML=(hrs<10)?("0"+hrs):hrs;M.innerHTML=(mins<10)?("0"+mins):mins;};cal.onUpdateTime=function(){var date=this.date;var h=parseInt(H.innerHTML,10);if(t12){if(/pm/i.test(AP.innerHTML)&&h<12)
|
|
||||||
h+=12;else if(/am/i.test(AP.innerHTML)&&h==12)
|
|
||||||
h=0;}
|
|
||||||
var d=date.getDate();var m=date.getMonth();var y=date.getFullYear();date.setHours(h);date.setMinutes(parseInt(M.innerHTML,10));date.setFullYear(y);date.setMonth(m);date.setDate(d);this.dateClicked=false;this.callHandler();};})();}else{this.onSetTime=this.onUpdateTime=function(){};}
|
|
||||||
var tfoot=DyCalendar.createElement("tfoot",table);row=DyCalendar.createElement("tr",tfoot);row.className="footrow";cell=hh(DyCalendar._TT["SEL_DATE"],this.weekNumbers?8:7,300);cell.className="ttip";if(this.isPopup){cell.ttip=DyCalendar._TT["DRAG_TO_MOVE"];cell.style.cursor="move";}
|
|
||||||
this.tooltips=cell;div=DyCalendar.createElement("div",this.element);this.monthsCombo=div;div.className="combo";for(i=0;i<DyCalendar._MN.length;++i){var mn=DyCalendar.createElement("div");mn.className=DyCalendar.is_ie?"label-IEfix":"label";mn.month=i;mn.innerHTML=DyCalendar._SMN[i];div.appendChild(mn);}
|
|
||||||
div=DyCalendar.createElement("div",this.element);this.yearsCombo=div;div.className="combo";for(i=12;i>0;--i){var yr=DyCalendar.createElement("div");yr.className=DyCalendar.is_ie?"label-IEfix":"label";div.appendChild(yr);}
|
|
||||||
this._init(this.firstDayOfWeek,this.date);parent.appendChild(this.element);};DyCalendar._keyEvent=function(ev){var cal=window._dynarch_popupDyCalendar;if(!cal||cal.multiple)
|
|
||||||
return false;(DyCalendar.is_ie)&&(ev=window.event);var act=(DyCalendar.is_ie||ev.type=="keypress"),K=ev.keyCode;if(ev.ctrlKey){switch(K){case 37:act&&DyCalendar.cellClick(cal._nav_pm);break;case 38:act&&DyCalendar.cellClick(cal._nav_py);break;case 39:act&&DyCalendar.cellClick(cal._nav_nm);break;case 40:act&&DyCalendar.cellClick(cal._nav_ny);break;default:return false;}}else switch(K){case 32:DyCalendar.cellClick(cal._nav_now);break;case 27:act&&cal.callCloseHandler();break;case 37:case 38:case 39:case 40:if(act){var prev,x,y,ne,el,step;prev=K==37||K==38;step=(K==37||K==39)?1:7;function setVars(){el=cal.currentDateEl;var p=el.pos;x=p&15;y=p>>4;ne=cal.ar_days[y][x];};setVars();function prevMonth(){var date=new Date(cal.date);date.setDate(date.getDate()-step);cal.setDate(date);};function nextMonth(){var date=new Date(cal.date);date.setDate(date.getDate()+step);cal.setDate(date);};while(1){switch(K){case 37:if(--x>=0)
|
|
||||||
ne=cal.ar_days[y][x];else{x=6;K=38;continue;}
|
|
||||||
break;case 38:if(--y>=0)
|
|
||||||
ne=cal.ar_days[y][x];else{prevMonth();setVars();}
|
|
||||||
break;case 39:if(++x<7)
|
|
||||||
ne=cal.ar_days[y][x];else{x=0;K=40;continue;}
|
|
||||||
break;case 40:if(++y<cal.ar_days.length)
|
|
||||||
ne=cal.ar_days[y][x];else{nextMonth();setVars();}
|
|
||||||
break;}
|
|
||||||
break;}
|
|
||||||
if(ne){if(!ne.disabled)
|
|
||||||
DyCalendar.cellClick(ne);else if(prev)
|
|
||||||
prevMonth();else
|
|
||||||
nextMonth();}}
|
|
||||||
break;case 13:if(act)
|
|
||||||
DyCalendar.cellClick(cal.currentDateEl,ev);break;default:return false;}
|
|
||||||
return DyCalendar.stopEvent(ev);};DyCalendar.prototype._init=function(firstDayOfWeek,date){var today=new Date(),TY=today.getFullYear(),TM=today.getMonth(),TD=today.getDate();this.table.style.visibility="hidden";var year=date.getFullYear();if(year<this.minYear){year=this.minYear;date.setFullYear(year);}else if(year>this.maxYear){year=this.maxYear;date.setFullYear(year);}
|
|
||||||
this.firstDayOfWeek=firstDayOfWeek;this.date=new Date(date);var month=date.getMonth();var mday=date.getDate();var no_days=date.getMonthDays();date.setDate(1);var day1=(date.getDay()-this.firstDayOfWeek)%7;if(day1<0)
|
|
||||||
day1+=7;date.setDate(-day1);date.setDate(date.getDate()+1);var row=this.tbody.firstChild;var MN=DyCalendar._SMN[month];var ar_days=this.ar_days=new Array();var weekend=DyCalendar._TT["WEEKEND"];var dates=this.multiple?(this.datesCells={}):null;for(var i=0;i<6;++i,row=row.nextSibling){var cell=row.firstChild;if(this.weekNumbers){cell.className="day wn";cell.innerHTML=date.getWeekNumber();cell=cell.nextSibling;}
|
|
||||||
row.className="daysrow";var hasdays=false,iday,dpos=ar_days[i]=[];for(var j=0;j<7;++j,cell=cell.nextSibling,date.setDate(iday+1)){iday=date.getDate();var wday=date.getDay();cell.className="day";cell.pos=i<<4|j;dpos[j]=cell;var current_month=(date.getMonth()==month);if(!current_month){if(this.showsOtherMonths){cell.className+=" othermonth";cell.otherMonth=true;}else{cell.className="emptycell";cell.innerHTML=" ";cell.disabled=true;continue;}}else{cell.otherMonth=false;hasdays=true;}
|
|
||||||
cell.disabled=false;cell.innerHTML=this.getDateText?this.getDateText(date,iday):iday;if(dates)
|
|
||||||
dates[date.print("%Y%m%d")]=cell;if(this.getDateStatus){var status=this.getDateStatus(date,year,month,iday);if(this.getDateToolTip){var toolTip=this.getDateToolTip(date,year,month,iday);if(toolTip)
|
|
||||||
cell.title=toolTip;}
|
|
||||||
if(status===true){cell.className+=" disabled";cell.disabled=true;}else{if(/disabled/i.test(status))
|
|
||||||
cell.disabled=true;cell.className+=" "+status;}}
|
|
||||||
if(!cell.disabled){cell.caldate=new Date(date);cell.ttip="_";if(!this.multiple&¤t_month&&iday==mday&&this.hiliteToday){cell.className+=" selected";this.currentDateEl=cell;}
|
|
||||||
if(date.getFullYear()==TY&&date.getMonth()==TM&&iday==TD){cell.className+=" today";cell.ttip+=DyCalendar._TT["PART_TODAY"];}
|
|
||||||
if(weekend.indexOf(wday.toString())!=-1)
|
|
||||||
cell.className+=cell.otherMonth?" oweekend":" weekend";}}
|
|
||||||
if(!(hasdays||this.showsOtherMonths))
|
|
||||||
row.className="emptyrow";}
|
|
||||||
this.title.innerHTML=DyCalendar._MN[month]+", "+year;this.onSetTime();this.table.style.visibility="visible";this._initMultipleDates();};DyCalendar.prototype._initMultipleDates=function(){if(this.multiple){for(var i in this.multiple){var cell=this.datesCells[i];var d=this.multiple[i];if(!d)
|
|
||||||
continue;if(cell)
|
|
||||||
cell.className+=" selected";}}};DyCalendar.prototype._toggleMultipleDate=function(date){if(this.multiple){var ds=date.print("%Y%m%d");var cell=this.datesCells[ds];if(cell){var d=this.multiple[ds];if(!d){DyCalendar.addClass(cell,"selected");this.multiple[ds]=date;}else{DyCalendar.removeClass(cell,"selected");delete this.multiple[ds];}}}};DyCalendar.prototype.setDateToolTipHandler=function(unaryFunction){this.getDateToolTip=unaryFunction;};DyCalendar.prototype.setDate=function(date){if(!date.equalsTo(this.date)){this._init(this.firstDayOfWeek,date);}};DyCalendar.prototype.refresh=function(){this._init(this.firstDayOfWeek,this.date);};DyCalendar.prototype.setFirstDayOfWeek=function(firstDayOfWeek){this._init(firstDayOfWeek,this.date);this._displayWeekdays();};DyCalendar.prototype.setDateStatusHandler=DyCalendar.prototype.setDisabledHandler=function(unaryFunction){this.getDateStatus=unaryFunction;};DyCalendar.prototype.setRange=function(a,z){this.minYear=a;this.maxYear=z;};DyCalendar.prototype.callHandler=function(){if(this.onSelected){this.onSelected(this,this.date.print(this.dateFormat));}};DyCalendar.prototype.callCloseHandler=function(){if(this.onClose){this.onClose(this);}
|
|
||||||
this.hideShowCovered();};DyCalendar.prototype.destroy=function(){var el=this.element.parentNode;el.removeChild(this.element);DyCalendar._C=null;window._dynarch_popupDyCalendar=null;};DyCalendar.prototype.reparent=function(new_parent){var el=this.element;el.parentNode.removeChild(el);new_parent.appendChild(el);};DyCalendar._checkDyCalendar=function(ev){var calendar=window._dynarch_popupDyCalendar;if(!calendar){return false;}
|
|
||||||
var el=DyCalendar.is_ie?DyCalendar.getElement(ev):DyCalendar.getTargetElement(ev);for(;el!=null&&el!=calendar.element;el=el.parentNode);if(el==null){window._dynarch_popupDyCalendar.callCloseHandler();return DyCalendar.stopEvent(ev);}};DyCalendar.prototype.show=function(){var rows=this.table.getElementsByTagName("tr");for(var i=rows.length;i>0;){var row=rows[--i];DyCalendar.removeClass(row,"rowhilite");var cells=row.getElementsByTagName("td");for(var j=cells.length;j>0;){var cell=cells[--j];DyCalendar.removeClass(cell,"hilite");DyCalendar.removeClass(cell,"active");}}
|
|
||||||
this.element.style.display="block";this.hidden=false;if(this.isPopup){window._dynarch_popupDyCalendar=this;DyCalendar.addEvent(document,"keydown",DyCalendar._keyEvent);DyCalendar.addEvent(document,"keypress",DyCalendar._keyEvent);DyCalendar.addEvent(document,"mousedown",DyCalendar._checkDyCalendar);}
|
|
||||||
this.hideShowCovered();};DyCalendar.prototype.hide=function(){if(this.isPopup){DyCalendar.removeEvent(document,"keydown",DyCalendar._keyEvent);DyCalendar.removeEvent(document,"keypress",DyCalendar._keyEvent);DyCalendar.removeEvent(document,"mousedown",DyCalendar._checkDyCalendar);}
|
|
||||||
this.element.style.display="none";this.hidden=true;this.hideShowCovered();};DyCalendar.prototype.showAt=function(x,y){var s=this.element.style;s.left=x+"px";s.top=y+"px";this.show();};DyCalendar.prototype.showAtElement=function(el,opts){var self=this;var p=DyCalendar.getAbsolutePos(el);if(!opts||typeof opts!="string"){this.showAt(p.x,p.y+el.offsetHeight);return true;}
|
|
||||||
function fixPosition(box){if(box.x<0)
|
|
||||||
box.x=0;if(box.y<0)
|
|
||||||
box.y=0;var cp=document.createElement("div");var s=cp.style;s.position="absolute";s.right=s.bottom=s.width=s.height="0px";document.body.appendChild(cp);var br=DyCalendar.getAbsolutePos(cp);document.body.removeChild(cp);if(document.body.scrollLeft){br.x+=document.body.scrollLeft;}
|
|
||||||
br.x+=window.scrollX;if(document.body.scrollTop){br.y+=document.body.scrollTop;}
|
|
||||||
br.y+=window.scrollY;var tmp=box.x+box.width-br.x;if(tmp>0)box.x-=tmp;tmp=box.y+box.height-br.y;if(tmp>0)box.y-=tmp;};this.element.style.display="block";DyCalendar.continuation_for_the_fucking_khtml_browser=function(){var w=self.element.offsetWidth;var h=self.element.offsetHeight;self.element.style.display="none";var valign=opts.substr(0,1);var halign="l";if(opts.length>1){halign=opts.substr(1,1);}
|
|
||||||
switch(valign){case"T":p.y-=h;break;case"B":p.y+=el.offsetHeight;break;case"C":p.y+=(el.offsetHeight-h)/2;break;case"t":p.y+=el.offsetHeight-h;break;case"b":break;}
|
|
||||||
switch(halign){case"L":p.x-=w;break;case"R":p.x+=el.offsetWidth;break;case"C":p.x+=(el.offsetWidth-w)/2;break;case"l":p.x+=el.offsetWidth-w;break;case"r":break;}
|
|
||||||
p.width=w;p.height=h+40;self.monthsCombo.style.display="none";fixPosition(p);self.showAt(p.x,p.y);};if(DyCalendar.is_khtml)
|
|
||||||
setTimeout("DyCalendar.continuation_for_the_fucking_khtml_browser()",10);else
|
|
||||||
DyCalendar.continuation_for_the_fucking_khtml_browser();};DyCalendar.prototype.setDateFormat=function(str){this.dateFormat=str;};DyCalendar.prototype.setTtDateFormat=function(str){this.ttDateFormat=str;};DyCalendar.prototype.parseDate=function(str,fmt){if(!fmt)
|
|
||||||
fmt=this.dateFormat;this.setDate(Date.parseDate(str,fmt));};DyCalendar.prototype.hideShowCovered=function(){if(!DyCalendar.is_ie&&!DyCalendar.is_opera)
|
|
||||||
return;function getVisib(obj){var value=obj.style.visibility;if(!value){if(document.defaultView&&typeof(document.defaultView.getComputedStyle)=="function"){if(!DyCalendar.is_khtml)
|
|
||||||
value=document.defaultView.getComputedStyle(obj,"").getPropertyValue("visibility");else
|
|
||||||
value='';}else if(obj.currentStyle){value=obj.currentStyle.visibility;}else
|
|
||||||
value='';}
|
|
||||||
return value;};var tags=new Array("applet","iframe","select");var el=this.element;var p=DyCalendar.getAbsolutePos(el);var EX1=p.x;var EX2=el.offsetWidth+EX1;var EY1=p.y;var EY2=el.offsetHeight+EY1;for(var k=tags.length;k>0;){var ar=document.getElementsByTagName(tags[--k]);var cc=null;for(var i=ar.length;i>0;){cc=ar[--i];p=DyCalendar.getAbsolutePos(cc);var CX1=p.x;var CX2=cc.offsetWidth+CX1;var CY1=p.y;var CY2=cc.offsetHeight+CY1;if(this.hidden||(CX1>EX2)||(CX2<EX1)||(CY1>EY2)||(CY2<EY1)){if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}
|
|
||||||
cc.style.visibility=cc.__msh_save_visibility;}else{if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}
|
|
||||||
cc.style.visibility="hidden";}}}};DyCalendar.prototype._displayWeekdays=function(){var fdow=this.firstDayOfWeek;var cell=this.firstdayname;var weekend=DyCalendar._TT["WEEKEND"];for(var i=0;i<7;++i){cell.className="day name";var realday=(i+fdow)%7;if(i){cell.ttip=DyCalendar._TT["DAY_FIRST"].replace("%s",DyCalendar._DN[realday]);cell.navtype=100;cell.calendar=this;cell.fdow=realday;DyCalendar._add_evs(cell);}
|
|
||||||
if(weekend.indexOf(realday.toString())!=-1){DyCalendar.addClass(cell,"weekend");}
|
|
||||||
cell.innerHTML=DyCalendar._SDN[(i+fdow)%7];cell=cell.nextSibling;}};DyCalendar.prototype._hideCombos=function(){this.monthsCombo.style.display="none";this.yearsCombo.style.display="none";};DyCalendar.prototype._dragStart=function(ev){if(this.dragging){return;}
|
|
||||||
this.dragging=true;var posX;var posY;if(DyCalendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posY=ev.clientY+window.scrollY;posX=ev.clientX+window.scrollX;}
|
|
||||||
var st=this.element.style;this.xOffs=posX-parseInt(st.left);this.yOffs=posY-parseInt(st.top);with(DyCalendar){addEvent(document,"mousemove",calDragIt);addEvent(document,"mouseup",calDragEnd);}};Date._MD=new Array(31,28,31,30,31,30,31,31,30,31,30,31);Date.SECOND=1000;Date.MINUTE=60*Date.SECOND;Date.HOUR=60*Date.MINUTE;Date.DAY=24*Date.HOUR;Date.WEEK=7*Date.DAY;Date.parseDate=function(str,fmt){var today=new Date();var y=0;var m=-1;var d=0;var a=str.split(/\W+/);var b=fmt.match(/%./g);var i=0,j=0;var hr=0;var min=0;for(i=0;i<a.length;++i){if(!a[i])
|
|
||||||
continue;switch(b[i]){case"%d":case"%e":d=parseInt(a[i],10);break;case"%m":m=parseInt(a[i],10)-1;break;case"%Y":case"%y":y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);break;case"%b":case"%B":for(j=0;j<12;++j){if(DyCalendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){m=j;break;}}
|
|
||||||
break;case"%H":case"%I":case"%k":case"%l":hr=parseInt(a[i],10);break;case"%P":case"%p":if(/pm/i.test(a[i])&&hr<12)
|
|
||||||
hr+=12;else if(/am/i.test(a[i])&&hr>=12)
|
|
||||||
hr-=12;break;case"%M":min=parseInt(a[i],10);break;}}
|
|
||||||
if(isNaN(y))y=today.getFullYear();if(isNaN(m))m=today.getMonth();if(isNaN(d))d=today.getDate();if(isNaN(hr))hr=today.getHours();if(isNaN(min))min=today.getMinutes();if(y!=0&&m!=-1&&d!=0)
|
|
||||||
return new Date(y,m,d,hr,min,0);y=0;m=-1;d=0;for(i=0;i<a.length;++i){if(a[i].search(/[a-zA-Z]+/)!=-1){var t=-1;for(j=0;j<12;++j){if(DyCalendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){t=j;break;}}
|
|
||||||
if(t!=-1){if(m!=-1){d=m+1;}
|
|
||||||
m=t;}}else if(parseInt(a[i],10)<=12&&m==-1){m=a[i]-1;}else if(parseInt(a[i],10)>31&&y==0){y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);}else if(d==0){d=a[i];}}
|
|
||||||
if(y==0)
|
|
||||||
y=today.getFullYear();if(m!=-1&&d!=0)
|
|
||||||
return new Date(y,m,d,hr,min,0);return today;};Date.prototype.getMonthDays=function(month){var year=this.getFullYear();if(typeof month=="undefined"){month=this.getMonth();}
|
|
||||||
if(((0==(year%4))&&((0!=(year%100))||(0==(year%400))))&&month==1){return 29;}else{return Date._MD[month];}};Date.prototype.getDayOfYear=function(){var now=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var then=new Date(this.getFullYear(),0,0,0,0,0);var time=now-then;return Math.floor(time/Date.DAY);};Date.prototype.getWeekNumber=function(){var d=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var DoW=d.getDay();d.setDate(d.getDate()-(DoW+6)%7+3);var ms=d.valueOf();d.setMonth(0);d.setDate(4);return Math.round((ms-d.valueOf())/(7*864e5))+1;};Date.prototype.equalsTo=function(date){return((this.getFullYear()==date.getFullYear())&&(this.getMonth()==date.getMonth())&&(this.getDate()==date.getDate())&&(this.getHours()==date.getHours())&&(this.getMinutes()==date.getMinutes()));};Date.prototype.setDateOnly=function(date){var tmp=new Date(date);this.setDate(1);this.setFullYear(tmp.getFullYear());this.setMonth(tmp.getMonth());this.setDate(tmp.getDate());};Date.prototype.print=function(str){var m=this.getMonth();var d=this.getDate();var y=this.getFullYear();var wn=this.getWeekNumber();var w=this.getDay();var s={};var hr=this.getHours();var pm=(hr>=12);var ir=(pm)?(hr-12):hr;var dy=this.getDayOfYear();if(ir==0)
|
|
||||||
ir=12;var min=this.getMinutes();var sec=this.getSeconds();s["%a"]=DyCalendar._SDN[w];s["%A"]=DyCalendar._DN[w];s["%b"]=DyCalendar._SMN[m];s["%B"]=DyCalendar._MN[m];s["%C"]=1+Math.floor(y/100);s["%d"]=(d<10)?("0"+d):d;s["%e"]=d;s["%H"]=(hr<10)?("0"+hr):hr;s["%I"]=(ir<10)?("0"+ir):ir;s["%j"]=(dy<100)?((dy<10)?("00"+dy):("0"+dy)):dy;s["%k"]=hr;s["%l"]=ir;s["%m"]=(m<9)?("0"+(1+m)):(1+m);s["%M"]=(min<10)?("0"+min):min;s["%n"]="\n";s["%p"]=pm?"PM":"AM";s["%P"]=pm?"pm":"am";s["%s"]=Math.floor(this.getTime()/1000);s["%S"]=(sec<10)?("0"+sec):sec;s["%t"]="\t";s["%U"]=s["%W"]=s["%V"]=(wn<10)?("0"+wn):wn;s["%u"]=w+1;s["%w"]=w;s["%y"]=(''+y).substr(2,2);s["%Y"]=y;s["%%"]="%";var re=/%./g;if(!DyCalendar.is_ie5&&!DyCalendar.is_khtml)
|
|
||||||
return str.replace(re,function(par){return s[par]||par;});var a=str.match(re);for(var i=0;i<a.length;i++){var tmp=s[a[i]];if(tmp){re=new RegExp(a[i],'g');str=str.replace(re,tmp);}}
|
|
||||||
return str;};Date.prototype.__msh_oldSetFullYear=Date.prototype.setFullYear;Date.prototype.setFullYear=function(y){var d=new Date(this);d.__msh_oldSetFullYear(y);if(d.getMonth()!=this.getMonth())
|
|
||||||
this.setDate(28);this.__msh_oldSetFullYear(y);};window._dynarch_popupDyCalendar=null;
|
|
||||||
3549
common/js/jquery.js
vendored
Normal file
2
common/js/plugins/ui.datepicker/plugin.load
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
ui.datepicker.js
|
||||||
|
ui.datepicker.css
|
||||||
213
common/js/plugins/ui.datepicker/ui.datepicker.css
Normal file
|
|
@ -0,0 +1,213 @@
|
||||||
|
/* Main Style Sheet for jQuery UI date picker */
|
||||||
|
#ui-datepicker-div, .ui-datepicker-inline {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
background: #ddd;
|
||||||
|
width: 185px;
|
||||||
|
}
|
||||||
|
#ui-datepicker-div {
|
||||||
|
display: none;
|
||||||
|
border: 1px solid #777;
|
||||||
|
z-index: 100; /*must have*/
|
||||||
|
}
|
||||||
|
.ui-datepicker-inline {
|
||||||
|
float: left;
|
||||||
|
display: block;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
.ui-datepicker-rtl {
|
||||||
|
direction: rtl;
|
||||||
|
}
|
||||||
|
.ui-datepicker-dialog {
|
||||||
|
padding: 5px !important;
|
||||||
|
border: 4px ridge #ddd !important;
|
||||||
|
}
|
||||||
|
.ui-datepicker-disabled {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 100;
|
||||||
|
background-color: white;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
button.ui-datepicker-trigger {
|
||||||
|
width: 25px;
|
||||||
|
}
|
||||||
|
img.ui-datepicker-trigger {
|
||||||
|
margin: 2px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.ui-datepicker-prompt {
|
||||||
|
float: left;
|
||||||
|
padding: 2px;
|
||||||
|
background: #ddd;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
* html .ui-datepicker-prompt {
|
||||||
|
width: 185px;
|
||||||
|
}
|
||||||
|
.ui-datepicker-control, .ui-datepicker-links, .ui-datepicker-header, .ui-datepicker {
|
||||||
|
clear: both;
|
||||||
|
float: left;
|
||||||
|
width: 100%;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.ui-datepicker-control {
|
||||||
|
background: #400;
|
||||||
|
padding: 2px 0px;
|
||||||
|
}
|
||||||
|
.ui-datepicker-links {
|
||||||
|
background: #000;
|
||||||
|
padding: 2px 0px;
|
||||||
|
}
|
||||||
|
.ui-datepicker-control, .ui-datepicker-links {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
.ui-datepicker-links label { /* disabled links */
|
||||||
|
padding: 2px 5px;
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
.ui-datepicker-clear, .ui-datepicker-prev {
|
||||||
|
float: left;
|
||||||
|
width: 34%;
|
||||||
|
}
|
||||||
|
.ui-datepicker-rtl .ui-datepicker-clear, .ui-datepicker-rtl .ui-datepicker-prev {
|
||||||
|
float: right;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.ui-datepicker-current {
|
||||||
|
float: left;
|
||||||
|
width: 30%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.ui-datepicker-close, .ui-datepicker-next {
|
||||||
|
float: right;
|
||||||
|
width: 34%;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.ui-datepicker-rtl .ui-datepicker-close, .ui-datepicker-rtl .ui-datepicker-next {
|
||||||
|
float: left;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.ui-datepicker-header {
|
||||||
|
padding: 1px 0 3px;
|
||||||
|
background: #333;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
height: 1.3em;
|
||||||
|
}
|
||||||
|
.ui-datepicker-header select {
|
||||||
|
background: #333;
|
||||||
|
color: #fff;
|
||||||
|
border: 0px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.ui-datepicker {
|
||||||
|
background: #ccc;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 100%;
|
||||||
|
}
|
||||||
|
.ui-datepicker a {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.ui-datepicker-title-row {
|
||||||
|
background: #777;
|
||||||
|
}
|
||||||
|
.ui-datepicker-days-row {
|
||||||
|
background: #eee;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
.ui-datepicker-week-col {
|
||||||
|
background: #777;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.ui-datepicker-days-cell {
|
||||||
|
color: #000;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
.ui-datepicker-days-cell a{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.ui-datepicker-week-end-cell {
|
||||||
|
background: #ddd;
|
||||||
|
}
|
||||||
|
.ui-datepicker-title-row .ui-datepicker-week-end-cell {
|
||||||
|
background: #777;
|
||||||
|
}
|
||||||
|
.ui-datepicker-days-cell-over {
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #777;
|
||||||
|
}
|
||||||
|
.ui-datepicker-unselectable {
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
.ui-datepicker-today {
|
||||||
|
background: #fcc !important;
|
||||||
|
}
|
||||||
|
.ui-datepicker-current-day {
|
||||||
|
background: #999 !important;
|
||||||
|
}
|
||||||
|
.ui-datepicker-status {
|
||||||
|
background: #ddd;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 80%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ________ Datepicker Links _______
|
||||||
|
|
||||||
|
** Reset link properties and then override them with !important */
|
||||||
|
#ui-datepicker-div a, .ui-datepicker-inline a {
|
||||||
|
cursor: pointer;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
background: none;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
.ui-datepicker-inline .ui-datepicker-links a {
|
||||||
|
padding: 0 5px !important;
|
||||||
|
}
|
||||||
|
.ui-datepicker-control a, .ui-datepicker-links a {
|
||||||
|
padding: 2px 5px !important;
|
||||||
|
color: #eee !important;
|
||||||
|
}
|
||||||
|
.ui-datepicker-title-row a {
|
||||||
|
color: #eee !important;
|
||||||
|
}
|
||||||
|
.ui-datepicker-control a:hover {
|
||||||
|
background: #fdd !important;
|
||||||
|
color: #333 !important;
|
||||||
|
}
|
||||||
|
.ui-datepicker-links a:hover, .ui-datepicker-title-row a:hover {
|
||||||
|
background: #ddd !important;
|
||||||
|
color: #333 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ___________ MULTIPLE MONTHS _________*/
|
||||||
|
|
||||||
|
.ui-datepicker-multi .ui-datepicker {
|
||||||
|
border: 1px solid #777;
|
||||||
|
}
|
||||||
|
.ui-datepicker-one-month {
|
||||||
|
float: left;
|
||||||
|
width: 185px;
|
||||||
|
}
|
||||||
|
.ui-datepicker-new-row {
|
||||||
|
clear: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ___________ IE6 IFRAME FIX ________ */
|
||||||
|
|
||||||
|
.ui-datepicker-cover {
|
||||||
|
display: none; /*sorry for IE5*/
|
||||||
|
display/**/: block; /*sorry for IE5*/
|
||||||
|
position: absolute; /*must have*/
|
||||||
|
z-index: -1; /*must have*/
|
||||||
|
filter: mask(); /*must have*/
|
||||||
|
top: -4px; /*must have*/
|
||||||
|
left: -4px; /*must have*/
|
||||||
|
width: 200px; /*must have*/
|
||||||
|
height: 200px; /*must have*/
|
||||||
|
}
|
||||||
1806
common/js/plugins/ui.datepicker/ui.datepicker.js
Normal file
BIN
common/js/plugins/ui.tree/images/Thumbs.db
Normal file
BIN
common/js/plugins/ui.tree/images/arrow_refresh.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
common/js/plugins/ui.tree/images/collapsable-last.gif
Normal file
|
After Width: | Height: | Size: 655 B |
BIN
common/js/plugins/ui.tree/images/collapsable.gif
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
common/js/plugins/ui.tree/images/cross.png
Normal file
|
After Width: | Height: | Size: 655 B |
BIN
common/js/plugins/ui.tree/images/disk.png
Normal file
|
After Width: | Height: | Size: 620 B |
BIN
common/js/plugins/ui.tree/images/expandable-last.gif
Normal file
|
After Width: | Height: | Size: 670 B |
BIN
common/js/plugins/ui.tree/images/expandable.gif
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
common/js/plugins/ui.tree/images/folder_add.png
Normal file
|
After Width: | Height: | Size: 668 B |
BIN
common/js/plugins/ui.tree/images/folder_delete.png
Normal file
|
After Width: | Height: | Size: 666 B |
BIN
common/js/plugins/ui.tree/images/folder_edit.png
Normal file
|
After Width: | Height: | Size: 733 B |
BIN
common/js/plugins/ui.tree/images/iconAdd.gif
Normal file
|
After Width: | Height: | Size: 190 B |
BIN
common/js/plugins/ui.tree/images/iconDel.gif
Normal file
|
After Width: | Height: | Size: 116 B |
BIN
common/js/plugins/ui.tree/images/iconModify.gif
Normal file
|
After Width: | Height: | Size: 196 B |
BIN
common/js/plugins/ui.tree/images/leaf-last.gif
Normal file
|
After Width: | Height: | Size: 615 B |
BIN
common/js/plugins/ui.tree/images/leaf.gif
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
common/js/plugins/ui.tree/images/line_bg.gif
Normal file
|
After Width: | Height: | Size: 93 B |
BIN
common/js/plugins/ui.tree/images/line_bg_over.gif
Normal file
|
After Width: | Height: | Size: 251 B |
BIN
common/js/plugins/ui.tree/images/line_bg_over_last.gif
Normal file
|
After Width: | Height: | Size: 235 B |
BIN
common/js/plugins/ui.tree/images/minus.gif
Normal file
|
After Width: | Height: | Size: 267 B |
BIN
common/js/plugins/ui.tree/images/page_add.png
Normal file
|
After Width: | Height: | Size: 739 B |
BIN
common/js/plugins/ui.tree/images/page_delete.png
Normal file
|
After Width: | Height: | Size: 740 B |
BIN
common/js/plugins/ui.tree/images/page_edit.png
Normal file
|
After Width: | Height: | Size: 807 B |
BIN
common/js/plugins/ui.tree/images/plus.gif
Normal file
|
After Width: | Height: | Size: 167 B |
BIN
common/js/plugins/ui.tree/images/root.gif
Normal file
|
After Width: | Height: | Size: 1,004 B |
BIN
common/js/plugins/ui.tree/images/spacer.gif
Normal file
|
After Width: | Height: | Size: 43 B |
BIN
common/js/plugins/ui.tree/images/spinner.gif
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
common/js/plugins/ui.tree/images/tree_line.gif
Normal file
|
After Width: | Height: | Size: 197 B |
186
common/js/plugins/ui.tree/jquery.simple.tree.css
Normal file
|
|
@ -0,0 +1,186 @@
|
||||||
|
|
||||||
|
.simpleTree
|
||||||
|
{
|
||||||
|
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
/*
|
||||||
|
overflow:auto;
|
||||||
|
width: 250px;
|
||||||
|
height:350px;
|
||||||
|
overflow:auto;
|
||||||
|
border: 1px solid #444444;
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
.simpleTree li
|
||||||
|
{
|
||||||
|
white-space: nowrap;
|
||||||
|
list-style: none;
|
||||||
|
margin:0;
|
||||||
|
padding:0 0 0 34px;
|
||||||
|
line-height: 14px;
|
||||||
|
}
|
||||||
|
.simpleTree li span
|
||||||
|
{
|
||||||
|
display:inline;
|
||||||
|
clear: left;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.simpleTree li a img
|
||||||
|
{
|
||||||
|
padding:0 1px 0px 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.simpleTree ul
|
||||||
|
{
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
.simpleTree .root
|
||||||
|
{
|
||||||
|
margin-left:-16px;
|
||||||
|
background: url(./images/root.gif) no-repeat 16px 0 #ffffff;
|
||||||
|
}
|
||||||
|
.simpleTree .line
|
||||||
|
{
|
||||||
|
margin:0 0 0 -16px;
|
||||||
|
padding:0;
|
||||||
|
line-height: 3px;
|
||||||
|
height:3px;
|
||||||
|
font-size:3px;
|
||||||
|
background: url(./images/line_bg.gif) 0 0 no-repeat transparent;
|
||||||
|
}
|
||||||
|
.simpleTree .line-last
|
||||||
|
{
|
||||||
|
margin:0 0 0 -16px;
|
||||||
|
padding:0;
|
||||||
|
line-height: 3px;
|
||||||
|
height:3px;
|
||||||
|
font-size:3px;
|
||||||
|
background: url(./images/spacer.gif) 0 0 no-repeat transparent;
|
||||||
|
}
|
||||||
|
.simpleTree .line-over
|
||||||
|
{
|
||||||
|
margin:0 0 0 -16px;
|
||||||
|
padding:0;
|
||||||
|
line-height: 3px;
|
||||||
|
height:3px;
|
||||||
|
font-size:3px;
|
||||||
|
background: url(./images/line_bg_over.gif) 0 0 no-repeat transparent;
|
||||||
|
}
|
||||||
|
.simpleTree .line-over-last
|
||||||
|
{
|
||||||
|
margin:0 0 0 -16px;
|
||||||
|
padding:0;
|
||||||
|
line-height: 3px;
|
||||||
|
height:3px;
|
||||||
|
font-size:3px;
|
||||||
|
background: url(./images/line_bg_over_last.gif) 0 0 no-repeat transparent;
|
||||||
|
}
|
||||||
|
.simpleTree .folder-open
|
||||||
|
{
|
||||||
|
margin-left:-16px;
|
||||||
|
background: url(./images/collapsable.gif) 0 -2px no-repeat #fff;
|
||||||
|
}
|
||||||
|
.simpleTree .folder-open-last
|
||||||
|
{
|
||||||
|
margin-left:-16px;
|
||||||
|
background: url(./images/collapsable-last.gif) 0 -2px no-repeat #fff;
|
||||||
|
}
|
||||||
|
.simpleTree .folder-close
|
||||||
|
{
|
||||||
|
margin-left:-16px;
|
||||||
|
background: url(./images/expandable.gif) 0 -2px no-repeat #fff;
|
||||||
|
}
|
||||||
|
.simpleTree .folder-close-last
|
||||||
|
{
|
||||||
|
margin-left:-16px;
|
||||||
|
background: url(./images/expandable-last.gif) 0 -2px no-repeat #fff;
|
||||||
|
}
|
||||||
|
.simpleTree .doc
|
||||||
|
{
|
||||||
|
margin-left:-16px;
|
||||||
|
background: url(./images/leaf.gif) 0 -1px no-repeat #fff;
|
||||||
|
}
|
||||||
|
.simpleTree .doc-last
|
||||||
|
{
|
||||||
|
margin-left:-16px;
|
||||||
|
background: url(./images/leaf-last.gif) 0 -1px no-repeat #fff;
|
||||||
|
}
|
||||||
|
.simpleTree .ajax
|
||||||
|
{
|
||||||
|
background: url(./images/spinner.gif) no-repeat 0 0 #ffffff;
|
||||||
|
height: 16px;
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
.simpleTree .ajax li
|
||||||
|
{
|
||||||
|
display:none;
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
.simpleTree .trigger
|
||||||
|
{
|
||||||
|
display:inline;
|
||||||
|
margin-left:-32px;
|
||||||
|
width: 28px;
|
||||||
|
height: 11px;
|
||||||
|
cursor:pointer;
|
||||||
|
}
|
||||||
|
.simpleTree .text
|
||||||
|
{
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
.simpleTree .active
|
||||||
|
{
|
||||||
|
cursor: default;
|
||||||
|
background-color:#F7BE77;
|
||||||
|
padding:0px 2px;
|
||||||
|
border: 1px dashed #444;
|
||||||
|
}
|
||||||
|
#drag_container
|
||||||
|
{
|
||||||
|
background:#ffffff;
|
||||||
|
color:#000;
|
||||||
|
font: normal 11px arial, tahoma, helvetica, sans-serif;
|
||||||
|
border: 1px dashed #767676;
|
||||||
|
}
|
||||||
|
#drag_container ul
|
||||||
|
{
|
||||||
|
list-style: none;
|
||||||
|
padding:0;
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#drag_container li
|
||||||
|
{
|
||||||
|
list-style: none;
|
||||||
|
background-color:#ffffff;
|
||||||
|
line-height:18px;
|
||||||
|
white-space: nowrap;
|
||||||
|
padding:1px 1px 0px 16px;
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
|
#drag_container li span
|
||||||
|
{
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#drag_container li.doc, #drag_container li.doc-last
|
||||||
|
{
|
||||||
|
background: url(./images/leaf.gif) no-repeat -17px 0 #ffffff;
|
||||||
|
}
|
||||||
|
#drag_container .folder-close, #drag_container .folder-close-last
|
||||||
|
{
|
||||||
|
background: url(./images/expandable.gif) no-repeat -17px 0 #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#drag_container .folder-open, #drag_container .folder-open-last
|
||||||
|
{
|
||||||
|
background: url(./images/collapsable.gif) no-repeat -17px 0 #ffffff;
|
||||||
|
}
|
||||||
|
.contextMenu
|
||||||
|
{
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
468
common/js/plugins/ui.tree/jquery.simple.tree.js
Normal file
|
|
@ -0,0 +1,468 @@
|
||||||
|
/*
|
||||||
|
* jQuery SimpleTree Drag&Drop plugin
|
||||||
|
* Update on 22th May 2008
|
||||||
|
* Version 0.3
|
||||||
|
*
|
||||||
|
* Licensed under BSD <http://en.wikipedia.org/wiki/BSD_License>
|
||||||
|
* Copyright (c) 2008, Peter Panov <panov@elcat.kg>, IKEEN Group http://www.ikeen.com
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the Peter Panov, IKEEN Group nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY Peter Panov, IKEEN Group ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL Peter Panov, IKEEN Group BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
(function($){
|
||||||
|
$.fn.simpleTree = function(opt){
|
||||||
|
return this.each(function(){
|
||||||
|
var TREE = this;
|
||||||
|
var ROOT = $('.root',this);
|
||||||
|
var mousePressed = false;
|
||||||
|
var mouseMoved = false;
|
||||||
|
var dragMoveType = false;
|
||||||
|
var dragNode_destination = false;
|
||||||
|
var dragNode_source = false;
|
||||||
|
var dragDropTimer = false;
|
||||||
|
var ajaxCache = Array();
|
||||||
|
|
||||||
|
TREE.option = {
|
||||||
|
drag: true,
|
||||||
|
animate: false,
|
||||||
|
autoclose: false,
|
||||||
|
speed: 'fast',
|
||||||
|
afterAjax: false,
|
||||||
|
afterMove: false,
|
||||||
|
beforeMovedToLine: false,
|
||||||
|
beforeMovedToFolder: false,
|
||||||
|
afterClick: false,
|
||||||
|
afterDblClick: false,
|
||||||
|
// added by Erik Dohmen (2BinBusiness.nl) to make context menu cliks available
|
||||||
|
afterContextMenu: false,
|
||||||
|
docToFolderConvert:false
|
||||||
|
};
|
||||||
|
TREE.option = $.extend(TREE.option,opt);
|
||||||
|
$.extend(this, {getSelected: function(){
|
||||||
|
return $('span.active', this).parent();
|
||||||
|
}});
|
||||||
|
TREE.closeNearby = function(obj)
|
||||||
|
{
|
||||||
|
$(obj).siblings().filter('.folder-open, .folder-open-last').each(function(){
|
||||||
|
var childUl = $('>ul',this);
|
||||||
|
var className = this.className;
|
||||||
|
this.className = className.replace('open','close');
|
||||||
|
if(TREE.option.animate)
|
||||||
|
{
|
||||||
|
childUl.animate({height:"toggle"},TREE.option.speed);
|
||||||
|
}else{
|
||||||
|
childUl.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
TREE.nodeToggle = function(obj)
|
||||||
|
{
|
||||||
|
var childUl = $('>ul',obj);
|
||||||
|
if(childUl.is(':visible')){
|
||||||
|
obj.className = obj.className.replace('open','close');
|
||||||
|
|
||||||
|
if(TREE.option.animate)
|
||||||
|
{
|
||||||
|
childUl.animate({height:"toggle"},TREE.option.speed);
|
||||||
|
}else{
|
||||||
|
childUl.hide();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
obj.className = obj.className.replace('close','open');
|
||||||
|
if(TREE.option.animate)
|
||||||
|
{
|
||||||
|
childUl.animate({height:"toggle"},TREE.option.speed, function(){
|
||||||
|
if(TREE.option.autoclose)TREE.closeNearby(obj);
|
||||||
|
if(childUl.is('.ajax'))TREE.setAjaxNodes(childUl, obj.id);
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
childUl.show();
|
||||||
|
if(TREE.option.autoclose)TREE.closeNearby(obj);
|
||||||
|
if(childUl.is('.ajax'))TREE.setAjaxNodes(childUl, obj.id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
TREE.setAjaxNodes = function(node, parentId, callback)
|
||||||
|
{
|
||||||
|
if($.inArray(parentId,ajaxCache) == -1){
|
||||||
|
ajaxCache[ajaxCache.length]=parentId;
|
||||||
|
var url = $.trim($('>li', node).text());
|
||||||
|
if(url && url.indexOf('url:'))
|
||||||
|
{
|
||||||
|
url=$.trim(url.replace(/.*\{url:(.*)\}/i ,'$1'));
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
url: url,
|
||||||
|
contentType:'html',
|
||||||
|
cache:false,
|
||||||
|
success: function(responce){
|
||||||
|
node.removeAttr('class');
|
||||||
|
node.html(responce);
|
||||||
|
$.extend(node,{url:url});
|
||||||
|
TREE.setTreeNodes(node, true);
|
||||||
|
if(typeof TREE.option.afterAjax == 'function')
|
||||||
|
{
|
||||||
|
TREE.option.afterAjax(node);
|
||||||
|
}
|
||||||
|
if(typeof callback == 'function')
|
||||||
|
{
|
||||||
|
callback(node);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
TREE.setTreeNodes = function(obj, useParent){
|
||||||
|
obj = useParent? obj.parent():obj;
|
||||||
|
$('li>span', obj).addClass('text')
|
||||||
|
.bind('selectstart', function() {
|
||||||
|
return false;
|
||||||
|
}).click(function(){
|
||||||
|
$('.active',TREE).attr('class','text');
|
||||||
|
if(this.className=='text')
|
||||||
|
{
|
||||||
|
this.className='active';
|
||||||
|
}
|
||||||
|
if(typeof TREE.option.afterClick == 'function')
|
||||||
|
{
|
||||||
|
TREE.option.afterClick($(this).parent());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}).dblclick(function(){
|
||||||
|
mousePressed = false;
|
||||||
|
TREE.nodeToggle($(this).parent().get(0));
|
||||||
|
if(typeof TREE.option.afterDblClick == 'function')
|
||||||
|
{
|
||||||
|
TREE.option.afterDblClick($(this).parent());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
// added by Erik Dohmen (2BinBusiness.nl) to make context menu actions
|
||||||
|
// available
|
||||||
|
}).bind("contextmenu",function(){
|
||||||
|
$('.active',TREE).attr('class','text');
|
||||||
|
if(this.className=='text')
|
||||||
|
{
|
||||||
|
this.className='active';
|
||||||
|
}
|
||||||
|
if(typeof TREE.option.afterContextMenu == 'function')
|
||||||
|
{
|
||||||
|
TREE.option.afterContextMenu($(this).parent());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}).mousedown(function(event){
|
||||||
|
mousePressed = true;
|
||||||
|
cloneNode = $(this).parent().clone();
|
||||||
|
var LI = $(this).parent();
|
||||||
|
if(TREE.option.drag)
|
||||||
|
{
|
||||||
|
$('>ul', cloneNode).hide();
|
||||||
|
$('body').append('<div id="drag_container"><ul></ul></div>');
|
||||||
|
$('#drag_container').hide().css({opacity:'0.8'});
|
||||||
|
$('#drag_container >ul').append(cloneNode);
|
||||||
|
$("<img>").attr({id : "tree_plus",src : "./common/js/plugins/ui.tree/images/plus.gif"}).css({width: "7px",display: "block",position: "absolute",left : "5px",top: "5px", display:'none'}).appendTo("body");
|
||||||
|
$(document).bind("mousemove", {LI:LI}, TREE.dragStart).bind("mouseup",TREE.dragEnd);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}).mouseup(function(){
|
||||||
|
if(mousePressed && mouseMoved && dragNode_source)
|
||||||
|
{
|
||||||
|
TREE.moveNodeToFolder($(this).parent());
|
||||||
|
}
|
||||||
|
TREE.eventDestroy();
|
||||||
|
});
|
||||||
|
$('li', obj).each(function(i){
|
||||||
|
var className = this.className;
|
||||||
|
var open = false;
|
||||||
|
var cloneNode=false;
|
||||||
|
var LI = this;
|
||||||
|
var childNode = $('>ul',this);
|
||||||
|
if(childNode.size()>0){
|
||||||
|
var setClassName = 'folder-';
|
||||||
|
if(className && className.indexOf('open')>=0){
|
||||||
|
setClassName=setClassName+'open';
|
||||||
|
open=true;
|
||||||
|
}else{
|
||||||
|
setClassName=setClassName+'close';
|
||||||
|
}
|
||||||
|
this.className = setClassName + ($(this).is(':last-child')? '-last':'');
|
||||||
|
|
||||||
|
if(!open || className.indexOf('ajax')>=0)childNode.hide();
|
||||||
|
|
||||||
|
TREE.setTrigger(this);
|
||||||
|
}else{
|
||||||
|
var setClassName = 'doc';
|
||||||
|
this.className = setClassName + ($(this).is(':last-child')? '-last':'');
|
||||||
|
}
|
||||||
|
}).before('<li class="line"></li>')
|
||||||
|
.filter(':last-child').after('<li class="line-last"></li>');
|
||||||
|
TREE.setEventLine($('.line, .line-last', obj));
|
||||||
|
};
|
||||||
|
TREE.setTrigger = function(node){
|
||||||
|
$('>span',node).before('<img class="trigger" src="./common/js/plugins/ui.tree/images/spacer.gif" border=0>');
|
||||||
|
var trigger = $('>.trigger', node);
|
||||||
|
trigger.click(function(event){
|
||||||
|
TREE.nodeToggle(node);
|
||||||
|
});
|
||||||
|
if(!$.browser.msie)
|
||||||
|
{
|
||||||
|
trigger.css('float','left');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
TREE.dragStart = function(event){
|
||||||
|
var LI = $(event.data.LI);
|
||||||
|
if(mousePressed)
|
||||||
|
{
|
||||||
|
mouseMoved = true;
|
||||||
|
if(dragDropTimer) clearTimeout(dragDropTimer);
|
||||||
|
if($('#drag_container:not(:visible)')){
|
||||||
|
$('#drag_container').show();
|
||||||
|
LI.prev('.line').hide();
|
||||||
|
dragNode_source = LI;
|
||||||
|
}
|
||||||
|
$('#drag_container').css({position:'absolute', "left" : (event.pageX + 5), "top": (event.pageY + 15) });
|
||||||
|
if(LI.is(':visible'))LI.hide();
|
||||||
|
var temp_move = false;
|
||||||
|
if(event.target.tagName.toLowerCase()=='span' && $.inArray(event.target.className, Array('text','active','trigger'))!= -1)
|
||||||
|
{
|
||||||
|
var parent = event.target.parentNode;
|
||||||
|
var offs = $(parent).offset({scroll:false});
|
||||||
|
var screenScroll = {x : (offs.left - 3),y : event.pageY - offs.top};
|
||||||
|
var isrc = $("#tree_plus").attr('src');
|
||||||
|
var ajaxChildSize = $('>ul.ajax',parent).size();
|
||||||
|
var ajaxChild = $('>ul.ajax',parent);
|
||||||
|
screenScroll.x += 19;
|
||||||
|
screenScroll.y = event.pageY - screenScroll.y + 5;
|
||||||
|
|
||||||
|
if(parent.className.indexOf('folder-close')>=0 && ajaxChildSize==0)
|
||||||
|
{
|
||||||
|
if(isrc.indexOf('minus')!=-1)$("#tree_plus").attr('src','./common/js/plugins/ui.tree/images/plus.gif');
|
||||||
|
$("#tree_plus").css({"left": screenScroll.x, "top": screenScroll.y}).show();
|
||||||
|
dragDropTimer = setTimeout(function(){
|
||||||
|
parent.className = parent.className.replace('close','open');
|
||||||
|
$('>ul',parent).show();
|
||||||
|
}, 700);
|
||||||
|
}else if(parent.className.indexOf('folder')>=0 && ajaxChildSize==0){
|
||||||
|
if(isrc.indexOf('minus')!=-1)$("#tree_plus").attr('src','./common/js/plugins/ui.tree/images/plus.gif');
|
||||||
|
$("#tree_plus").css({"left": screenScroll.x, "top": screenScroll.y}).show();
|
||||||
|
}else if(parent.className.indexOf('folder-close')>=0 && ajaxChildSize>0)
|
||||||
|
{
|
||||||
|
mouseMoved = false;
|
||||||
|
$("#tree_plus").attr('src','./common/js/plugins/ui.tree/images/minus.gif');
|
||||||
|
$("#tree_plus").css({"left": screenScroll.x, "top": screenScroll.y}).show();
|
||||||
|
|
||||||
|
$('>ul',parent).show();
|
||||||
|
/*
|
||||||
|
Thanks for the idea of Erik Dohmen
|
||||||
|
*/
|
||||||
|
TREE.setAjaxNodes(ajaxChild,parent.id, function(){
|
||||||
|
parent.className = parent.className.replace('close','open');
|
||||||
|
mouseMoved = true;
|
||||||
|
$("#tree_plus").attr('src','./common/js/plugins/ui.tree/images/plus.gif');
|
||||||
|
$("#tree_plus").css({"left": screenScroll.x, "top": screenScroll.y}).show();
|
||||||
|
});
|
||||||
|
|
||||||
|
}else{
|
||||||
|
if(TREE.option.docToFolderConvert)
|
||||||
|
{
|
||||||
|
$("#tree_plus").css({"left": screenScroll.x, "top": screenScroll.y}).show();
|
||||||
|
}else{
|
||||||
|
$("#tree_plus").hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$("#tree_plus").hide();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
TREE.dragEnd = function(){
|
||||||
|
if(dragDropTimer) clearTimeout(dragDropTimer);
|
||||||
|
TREE.eventDestroy();
|
||||||
|
};
|
||||||
|
TREE.setEventLine = function(obj){
|
||||||
|
obj.mouseover(function(){
|
||||||
|
if(this.className.indexOf('over')<0 && mousePressed && mouseMoved)
|
||||||
|
{
|
||||||
|
this.className = this.className.replace('line','line-over');
|
||||||
|
}
|
||||||
|
}).mouseout(function(){
|
||||||
|
if(this.className.indexOf('over')>=0)
|
||||||
|
{
|
||||||
|
this.className = this.className.replace('-over','');
|
||||||
|
}
|
||||||
|
}).mouseup(function(){
|
||||||
|
if(mousePressed && dragNode_source && mouseMoved)
|
||||||
|
{
|
||||||
|
dragNode_destination = $(this).parents('li:first');
|
||||||
|
TREE.moveNodeToLine(this);
|
||||||
|
TREE.eventDestroy();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
TREE.checkNodeIsLast = function(node)
|
||||||
|
{
|
||||||
|
if(node.className.indexOf('last')>=0)
|
||||||
|
{
|
||||||
|
var prev_source = dragNode_source.prev().prev();
|
||||||
|
if(prev_source.size()>0)
|
||||||
|
{
|
||||||
|
prev_source[0].className+='-last';
|
||||||
|
}
|
||||||
|
node.className = node.className.replace('-last','');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
TREE.checkLineIsLast = function(line)
|
||||||
|
{
|
||||||
|
if(line.className.indexOf('last')>=0)
|
||||||
|
{
|
||||||
|
var prev = $(line).prev();
|
||||||
|
if(prev.size()>0)
|
||||||
|
{
|
||||||
|
prev[0].className = prev[0].className.replace('-last','');
|
||||||
|
}
|
||||||
|
dragNode_source[0].className+='-last';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
TREE.eventDestroy = function()
|
||||||
|
{
|
||||||
|
// added by Erik Dohmen (2BinBusiness.nl), the unbind mousemove TREE.dragStart action
|
||||||
|
// like this other mousemove actions binded through other actions ain't removed (use it myself
|
||||||
|
// to determine location for context menu)
|
||||||
|
$(document).unbind('mousemove',TREE.dragStart).unbind('mouseup').unbind('mousedown');
|
||||||
|
$('#drag_container, #tree_plus').remove();
|
||||||
|
if(dragNode_source)
|
||||||
|
{
|
||||||
|
$(dragNode_source).show().prev('.line').show();
|
||||||
|
}
|
||||||
|
dragNode_destination = dragNode_source = mousePressed = mouseMoved = false;
|
||||||
|
//ajaxCache = Array();
|
||||||
|
};
|
||||||
|
TREE.convertToFolder = function(node){
|
||||||
|
node[0].className = node[0].className.replace('doc','folder-open');
|
||||||
|
node.append('<ul><li class="line-last"></li></ul>');
|
||||||
|
TREE.setTrigger(node[0]);
|
||||||
|
TREE.setEventLine($('.line, .line-last', node));
|
||||||
|
};
|
||||||
|
TREE.convertToDoc = function(node){
|
||||||
|
$('>ul', node).remove();
|
||||||
|
$('img', node).remove();
|
||||||
|
node[0].className = node[0].className.replace(/folder-(open|close)/gi , 'doc');
|
||||||
|
};
|
||||||
|
TREE.moveNodeToFolder = function(node)
|
||||||
|
{
|
||||||
|
if(typeof(TREE.option.beforeMovedToFolder) == 'function')
|
||||||
|
{
|
||||||
|
var pos = $(dragNode_source).prevAll(':not(.line)').size();
|
||||||
|
if(!TREE.option.beforeMovedToFolder($(node).parents('li:first'), $(dragNode_source), pos)) return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!TREE.option.docToFolderConvert && node[0].className.indexOf('doc')!=-1)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}else if(TREE.option.docToFolderConvert && node[0].className.indexOf('doc')!=-1){
|
||||||
|
TREE.convertToFolder(node);
|
||||||
|
}
|
||||||
|
TREE.checkNodeIsLast(dragNode_source[0]);
|
||||||
|
var lastLine = $('>ul >.line-last', node);
|
||||||
|
if(lastLine.size()>0)
|
||||||
|
{
|
||||||
|
TREE.moveNodeToLine(lastLine[0]);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
TREE.moveNodeToLine = function(node){
|
||||||
|
|
||||||
|
if(typeof(TREE.option.beforeMovedToLine) == 'function')
|
||||||
|
{
|
||||||
|
var pos = $(dragNode_source).prevAll(':not(.line)').size();
|
||||||
|
if(!TREE.option.beforeMovedToLine($(node).parents('li:first'), $(dragNode_source), pos)) return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
TREE.checkNodeIsLast(dragNode_source[0]);
|
||||||
|
TREE.checkLineIsLast(node);
|
||||||
|
var parent = $(dragNode_source).parents('li:first');
|
||||||
|
var line = $(dragNode_source).prev('.line');
|
||||||
|
$(node).before(dragNode_source);
|
||||||
|
$(dragNode_source).before(line);
|
||||||
|
node.className = node.className.replace('-over','');
|
||||||
|
var nodeSize = $('>ul >li', parent).not('.line, .line-last').filter(':visible').size();
|
||||||
|
if(TREE.option.docToFolderConvert && nodeSize==0)
|
||||||
|
{
|
||||||
|
TREE.convertToDoc(parent);
|
||||||
|
}else if(nodeSize==0)
|
||||||
|
{
|
||||||
|
parent[0].className=parent[0].className.replace('open','close');
|
||||||
|
$('>ul',parent).hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
// added by Erik Dohmen (2BinBusiness.nl) select node
|
||||||
|
if($('span:first',dragNode_source).attr('class')=='text')
|
||||||
|
{
|
||||||
|
$('.active',TREE).attr('class','text');
|
||||||
|
$('span:first',dragNode_source).attr('class','active');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(typeof(TREE.option.afterMove) == 'function')
|
||||||
|
{
|
||||||
|
var pos = $(dragNode_source).prevAll(':not(.line)').size();
|
||||||
|
TREE.option.afterMove($(node).parents('li:first'), $(dragNode_source), pos);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
TREE.addNode = function(id, text, callback)
|
||||||
|
{
|
||||||
|
var temp_node = $('<li><ul><li id="'+id+'"><span>'+text+'</span></li></ul></li>');
|
||||||
|
TREE.setTreeNodes(temp_node);
|
||||||
|
dragNode_destination = TREE.getSelected();
|
||||||
|
dragNode_source = $('.doc-last',temp_node);
|
||||||
|
TREE.moveNodeToFolder(dragNode_destination);
|
||||||
|
temp_node.remove();
|
||||||
|
if(typeof(callback) == 'function')
|
||||||
|
{
|
||||||
|
callback(dragNode_destination, dragNode_source);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
TREE.delNode = function(callback)
|
||||||
|
{
|
||||||
|
dragNode_source = TREE.getSelected();
|
||||||
|
TREE.checkNodeIsLast(dragNode_source[0]);
|
||||||
|
dragNode_source.prev().remove();
|
||||||
|
dragNode_source.remove();
|
||||||
|
if(typeof(callback) == 'function')
|
||||||
|
{
|
||||||
|
callback(dragNode_destination);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
TREE.init = function(obj)
|
||||||
|
{
|
||||||
|
TREE.setTreeNodes(obj, false);
|
||||||
|
};
|
||||||
|
TREE.init(ROOT);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
})(jQuery);
|
||||||
2
common/js/plugins/ui.tree/plugin.load
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
jquery.simple.tree.css
|
||||||
|
jquery.simple.tree.js
|
||||||
|
|
@ -1,639 +0,0 @@
|
||||||
/**
|
|
||||||
* @file tree_menu.js
|
|
||||||
* @author zero (zero@nzeo.com)
|
|
||||||
* @brief xml파일을 읽어서 트리 메뉴를 그려줌
|
|
||||||
*
|
|
||||||
* 일단 이것 저것 꽁수가 좀 들어간 것이긴 한데 속도나 기타 면에서 쓸만함...\n
|
|
||||||
* 다만 XE에좀 특화되어 있어서....\n
|
|
||||||
* GPL License 를 따릅니당~~~\n
|
|
||||||
* 언제나 그렇듯 필요하신 분은 가져가서 쓰세요.\n
|
|
||||||
* 더 좋게 개량하시면 공유해주세요~\n
|
|
||||||
**/
|
|
||||||
|
|
||||||
// 트리메뉴에서 사용될 아이콘의 위치
|
|
||||||
var tree_menu_icon_path = "./common/tpl/images/";
|
|
||||||
|
|
||||||
// 아이콘을 미리 생성해 놓음
|
|
||||||
var tree_folder_icon = new Image();
|
|
||||||
tree_folder_icon.src = tree_menu_icon_path+"page.gif";
|
|
||||||
var tree_open_folder_icon = new Image();
|
|
||||||
tree_open_folder_icon.src = tree_menu_icon_path+"page.gif";
|
|
||||||
|
|
||||||
var tree_minus_icon = new Image();
|
|
||||||
tree_minus_icon.src = tree_menu_icon_path+"minus.gif";
|
|
||||||
var tree_minus_bottom_icon = new Image();
|
|
||||||
tree_minus_bottom_icon.src = tree_menu_icon_path+"minusbottom.gif";
|
|
||||||
var tree_plus_icon = new Image();
|
|
||||||
tree_plus_icon.src = tree_menu_icon_path+"plus.gif";
|
|
||||||
var tree_plus_bottom_icon = new Image();
|
|
||||||
tree_plus_bottom_icon.src = tree_menu_icon_path+"plusbottom.gif";
|
|
||||||
|
|
||||||
// 폴더를 모두 열고/닫기 위한 변수 설정
|
|
||||||
var tree_menu_folder_list = new Array();
|
|
||||||
|
|
||||||
// 노드의 정보를 가지고 있을 변수
|
|
||||||
var node_info_list = new Array();
|
|
||||||
|
|
||||||
// menu_id별로 요청된 클릭시 실행 될 callback_func
|
|
||||||
var node_callback_func = new Array();
|
|
||||||
|
|
||||||
// menu_id별로 요청된 드래그시 실행될 callback_func
|
|
||||||
var node_move_callback_func = new Array();
|
|
||||||
|
|
||||||
// 트리메뉴의 정보를 담고 있는 xml파일을 읽고 drawTreeMenu()를 호출하는 함수
|
|
||||||
function loadTreeMenu(url, menu_id, zone_id, title, index_url , callback_func, manual_select_node_srl, callback_move_func) {
|
|
||||||
// 일단 그릴 곳을 찾아서 사전 작업을 함 (그릴 곳이 없다면 아예 시도를 안함)
|
|
||||||
var zone = xGetElementById(zone_id);
|
|
||||||
if(typeof(zone)=="undefined") return;
|
|
||||||
|
|
||||||
// 관리가 아닌 사용일경우는 menu_id를 변경
|
|
||||||
if(typeof(callback_func)=='undefined') menu_id = 'display_'+menu_id;
|
|
||||||
|
|
||||||
// 노드 정보들을 담을 변수 세팅
|
|
||||||
node_info_list[menu_id] = new Array();
|
|
||||||
|
|
||||||
if(typeof(title)=='undefined') title = '';
|
|
||||||
|
|
||||||
// 사용자 정의 함수가 없다면 moveTreeMenu()라는 기본적인 동작을 하는 함수를 대입
|
|
||||||
if(typeof(callback_func)=='undefined') {
|
|
||||||
callback_func = moveTreeMenu;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(typeof(callback_move_func)=='undefined') {
|
|
||||||
callback_move_func = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 한 페이지에 다수의 menu_id가 있을 수 있으므로 menu_id별로 함수를 저장
|
|
||||||
node_callback_func[menu_id] = callback_func;
|
|
||||||
node_move_callback_func[menu_id] = callback_move_func;
|
|
||||||
|
|
||||||
// 직접 선택시키려는 메뉴 인자값이 없으면 초기화
|
|
||||||
if(typeof(manual_select_node_srl)=='undefined') manual_select_node_srl = '';
|
|
||||||
|
|
||||||
// xml_handler를 이용해서 직접 메뉴 xml파일(layout module에서 생성)을 읽음
|
|
||||||
if(!url) return;
|
|
||||||
|
|
||||||
var oXml = new xml_handler();
|
|
||||||
oXml.reset();
|
|
||||||
oXml.xml_path = url;
|
|
||||||
|
|
||||||
if(!index_url) index_url= "#";
|
|
||||||
|
|
||||||
// menu_id, zone_id는 계속 달고 다녀야함
|
|
||||||
var param = {"menu_id":menu_id, "zone_id":zone_id, "title":title, "index_url":index_url, "manual_select_node_srl":manual_select_node_srl}
|
|
||||||
|
|
||||||
// 요청후 drawTreeMenu()함수를 호출 (xml_handler.js에서 request method를 직접 이용)
|
|
||||||
oXml.request(drawTreeMenu, oXml, null, null, null, param);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 트리메뉴 XML정보를 이용해서 정해진 zone에 출력
|
|
||||||
var manual_select_node_srl = '';
|
|
||||||
function drawTreeMenu(oXml, callback_func, resopnse_tags, null_func, param) {
|
|
||||||
// 그리기 위한 object를 찾아 놓음
|
|
||||||
var menu_id = param.menu_id;
|
|
||||||
var zone_id = param.zone_id;
|
|
||||||
var title = param.title;
|
|
||||||
var index_url = param.index_url;
|
|
||||||
if(param.manual_select_node_srl) manual_select_node_srl = param.manual_select_node_srl;
|
|
||||||
var zone = xGetElementById(zone_id);
|
|
||||||
var html = "";
|
|
||||||
|
|
||||||
if(title) html = '<div style="cursor:pointer;padding-left:18px;margin-bottom:5px;background:url('+tree_menu_icon_path+'folder.gif) no-repeat left;" onclick="location.href=\''+index_url+'\';return false;" >'+title+'</div>';
|
|
||||||
|
|
||||||
var xmlDoc = oXml.getResponseXml();
|
|
||||||
if(!xmlDoc) {
|
|
||||||
xInnerHtml(zone, html);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
tree_menu_folder_list[menu_id] = new Array();
|
|
||||||
|
|
||||||
// node 태그에 해당하는 값들을 가져와서 html을 작성
|
|
||||||
var node_list = xmlDoc.getElementsByTagName("node");
|
|
||||||
if(node_list.length>0) {
|
|
||||||
var root = xmlDoc.getElementsByTagName("root")[0];
|
|
||||||
var output = drawNode(root, menu_id);
|
|
||||||
html += output.html;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 출력하려는 zone이 없다면 load후에 출력하도록 함
|
|
||||||
if(!zone) {
|
|
||||||
xAddEventListener(window, 'load', function() { drawTeeMenu(zone_id, menu_id, html); });
|
|
||||||
|
|
||||||
// 출력하려는 zone을 찾아졌다면 바로 출력
|
|
||||||
} else {
|
|
||||||
xInnerHtml(zone, html);
|
|
||||||
if(manual_select_node_srl) manualSelectNode(menu_id, manual_select_node_srl);
|
|
||||||
}
|
|
||||||
|
|
||||||
var waiting_obj = xGetElementById("waitingforserverresponse");
|
|
||||||
if(waiting_obj) waiting_obj.style.visibility = "hidden";
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 페이지 랜더링 중에 메뉴의 html이 완성되었을때 window.onload event 후에 그리기 재시도를 하게 될 함수
|
|
||||||
function drawTeeMenu(zone_id, menu_id, html) {
|
|
||||||
xInnerHtml(zone_id, html);
|
|
||||||
if(manual_select_node_srl) manualSelectNode(menu_id, manual_select_node_srl);
|
|
||||||
}
|
|
||||||
|
|
||||||
// root부터 시작해서 recursive하게 노드를 표혐
|
|
||||||
function drawNode(parent_node, menu_id) {
|
|
||||||
var output = {html:"", expand:"N"}
|
|
||||||
|
|
||||||
for (var i=0; i< parent_node.childNodes.length; i++) {
|
|
||||||
var html = "";
|
|
||||||
|
|
||||||
// nodeName이 node가 아니면 패스~
|
|
||||||
var node = parent_node.childNodes.item(i);
|
|
||||||
if(node.nodeName!="node") continue;
|
|
||||||
|
|
||||||
// node의 기본 변수들 체크
|
|
||||||
var node_srl = node.getAttribute("node_srl");
|
|
||||||
var text = node.getAttribute("text");
|
|
||||||
var url = node.getAttribute("url");
|
|
||||||
var expand = node.getAttribute("expand");
|
|
||||||
|
|
||||||
if(!text) continue;
|
|
||||||
|
|
||||||
// 자식 노드가 있는지 확인
|
|
||||||
var hasChild = false;
|
|
||||||
if(node.hasChildNodes()) hasChild = true;
|
|
||||||
|
|
||||||
// nextSibling가 있는지 확인
|
|
||||||
var hasNextSibling = false;
|
|
||||||
if(i==parent_node.childNodes.length-1) hasNextSibling = true;
|
|
||||||
|
|
||||||
// 후에 사용하기 위해 node_info_list에 node_srl을 값으로 하여 node object 추가
|
|
||||||
node_info_list[menu_id][node_srl] = node;
|
|
||||||
|
|
||||||
// zone_id 값을 세팅
|
|
||||||
var zone_id = "menu_"+menu_id+"_"+node_srl;
|
|
||||||
tree_menu_folder_list[menu_id][tree_menu_folder_list[menu_id].length] = zone_id;
|
|
||||||
|
|
||||||
// url을 확인하여 현재의 url과 동일하다고 판단되면 manual_select_node_srl 에 값을 추가 (관리자페이지일 경우는 무시함)
|
|
||||||
if(node_callback_func[menu_id] == moveTreeMenu && url && current_url.getQuery('mid') == url) manual_select_node_srl = node_srl;
|
|
||||||
|
|
||||||
// manual_select_node_srl이 node_srl과 같으면 펼침으로 처리
|
|
||||||
if(manual_select_node_srl == node_srl) expand = "Y";
|
|
||||||
|
|
||||||
// 아이콘 설정
|
|
||||||
var line_icon = null;
|
|
||||||
var folder_icon = null;
|
|
||||||
|
|
||||||
// 자식 노드가 있을 경우 자식 노드의 html을 구해옴
|
|
||||||
var child_output = null;
|
|
||||||
var child_html = "";
|
|
||||||
if(hasChild) {
|
|
||||||
// 자식 노드의 zone id를 세팅
|
|
||||||
var child_zone_id = zone_id+"_child";
|
|
||||||
tree_menu_folder_list[menu_id][tree_menu_folder_list[menu_id].length] = child_zone_id;
|
|
||||||
|
|
||||||
// html을 받아옴
|
|
||||||
child_output = drawNode(node, menu_id);
|
|
||||||
var chtml = child_output.html;
|
|
||||||
var cexpand = child_output.expand;
|
|
||||||
if(cexpand == "Y") expand = "Y";
|
|
||||||
|
|
||||||
// 무조건 펼침이 아닐 경우
|
|
||||||
if(expand!="Y") {
|
|
||||||
if(!hasNextSibling) child_html += '<div id="'+child_zone_id+'"style="display:none;padding-left:16px;background:url('+tree_menu_icon_path+'line.gif) repeat-y left;">'+chtml+'</div>';
|
|
||||||
else child_html += '<div id="'+child_zone_id+'" style="display:none;padding-left:16px;">'+chtml+'</div>';
|
|
||||||
// 무조건 펼침일 경우
|
|
||||||
} else {
|
|
||||||
if(!hasNextSibling) child_html += '<div id="'+child_zone_id+'"style="display:block;padding-left:16px;background:url('+tree_menu_icon_path+'line.gif) repeat-y left;">'+chtml+'</div>';
|
|
||||||
else child_html += '<div id="'+child_zone_id+'" style="display:block;padding-left:16px;">'+chtml+'</div>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 자식 노드가 있는지 확인하여 있으면 아이콘을 바꿈
|
|
||||||
if(hasChild) {
|
|
||||||
// 무조건 펼침이 아닐 경우
|
|
||||||
if(expand != "Y") {
|
|
||||||
if(!hasNextSibling) {
|
|
||||||
line_icon = "plus";
|
|
||||||
folder_icon = "page";
|
|
||||||
} else {
|
|
||||||
line_icon = "plusbottom";
|
|
||||||
folder_icon = "page";
|
|
||||||
}
|
|
||||||
// 무조건 펼침일 경우
|
|
||||||
} else {
|
|
||||||
if(!hasNextSibling) {
|
|
||||||
line_icon = "minus";
|
|
||||||
folder_icon = "page";
|
|
||||||
} else {
|
|
||||||
line_icon = "minusbottom";
|
|
||||||
folder_icon = "page";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 자식 노드가 없을 경우
|
|
||||||
} else {
|
|
||||||
if(hasNextSibling) {
|
|
||||||
line_icon = "joinbottom";
|
|
||||||
folder_icon = "page";
|
|
||||||
} else {
|
|
||||||
line_icon = "join";
|
|
||||||
folder_icon = "page";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// html 작성
|
|
||||||
html += '<div id="'+zone_id+'" style="margin:0px;font-size:9pt;white-space:nowrap;overflow:hidden;">';
|
|
||||||
|
|
||||||
if(hasChild) html+= '<span style="cursor:pointer;" onclick="toggleFolder(\''+zone_id+'\');return false;">';
|
|
||||||
else html+= '<span>';
|
|
||||||
|
|
||||||
html += '<img id="'+zone_id+'_line_icon" src="'+tree_menu_icon_path+line_icon+'.gif" alt="line" align="top" /><img id="'+zone_id+'_folder_icon" src="'+tree_menu_icon_path+folder_icon+'.gif" alt="folder" align="top" /></span>';
|
|
||||||
|
|
||||||
var chk_enable = xGetElementById(menu_id+"_enable_move");
|
|
||||||
if(chk_enable) {
|
|
||||||
html += '<span><span id="'+zone_id+'_node" style="cursor:move;padding:1px 2px 1px 2px;margin-top:1px;cursor:pointer;" onmousedown="doNodeFunc(this, \''+menu_id+'\','+node_srl+',\''+zone_id+'\');">';
|
|
||||||
} else {
|
|
||||||
html += '<span><span id="'+zone_id+'_node" style="cursor:move;padding:1px 2px 1px 2px;margin-top:1px;cursor:pointer;" onclick="selectNode(\''+menu_id+'\','+node_srl+',\''+zone_id+'\')" ondblclick="toggleFolder(\''+zone_id+'\')">';
|
|
||||||
}
|
|
||||||
|
|
||||||
html += text+'</span></span>';
|
|
||||||
|
|
||||||
html += child_html;
|
|
||||||
|
|
||||||
html += '</div>';
|
|
||||||
|
|
||||||
output.html += html;
|
|
||||||
|
|
||||||
if(expand=="Y") output.expand = "Y";
|
|
||||||
}
|
|
||||||
return output;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 관리자 모드일 경우 *_enable_move 의 값에 따라 메뉴 이동을 시키거나 정보를 보여주도록 변경
|
|
||||||
function doNodeFunc(obj, menu_id, node_srl, zone_id) {
|
|
||||||
var chk_enable = xGetElementById(menu_id+"_enable_move");
|
|
||||||
if(!chk_enable || chk_enable.checked!=true || !obj) {
|
|
||||||
selectNode(menu_id,node_srl,zone_id);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
deSelectNode();
|
|
||||||
tree_drag_enable(obj,tree_drag_start,tree_drag,tree_drag_end);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 수동으로 메뉴를 선택하도록 함
|
|
||||||
function manualSelectNode(menu_id, node_srl) {
|
|
||||||
var zone_id = "menu_"+menu_id+"_"+node_srl;
|
|
||||||
selectNode(menu_id,node_srl,zone_id,false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 노드의 폴더 아이콘 클릭시
|
|
||||||
function toggleFolder(zone_id) {
|
|
||||||
// 아이콘을 클릭한 대상을 찾아봄
|
|
||||||
var child_zone = xGetElementById(zone_id+"_child");
|
|
||||||
if(!child_zone) return;
|
|
||||||
|
|
||||||
// 대상의 아이콘들 찾음
|
|
||||||
var line_icon = xGetElementById(zone_id+'_line_icon');
|
|
||||||
var folder_icon = xGetElementById(zone_id+'_folder_icon');
|
|
||||||
|
|
||||||
var height = 0;
|
|
||||||
|
|
||||||
// 대상의 자식 노드들이 숨겨져 있다면 열고 아니면 닫기
|
|
||||||
if(child_zone.style.display == "block") {
|
|
||||||
height = xHeight(child_zone)*-1;
|
|
||||||
child_zone.style.display = "none";
|
|
||||||
if(line_icon.src.indexOf('bottom')>0) line_icon.src = tree_plus_bottom_icon.src;
|
|
||||||
else line_icon.src = tree_plus_icon.src;
|
|
||||||
folder_icon.src = tree_folder_icon.src;
|
|
||||||
} else {
|
|
||||||
if(line_icon.src.indexOf('bottom')>0) line_icon.src = tree_minus_bottom_icon.src;
|
|
||||||
else line_icon.src = tree_minus_icon.src;
|
|
||||||
folder_icon.src = tree_open_folder_icon.src;
|
|
||||||
child_zone.style.display = "block";
|
|
||||||
height = xHeight(child_zone);
|
|
||||||
}
|
|
||||||
if(typeof(fixAdminLayoutFooter)=='function') fixAdminLayoutFooter( height );
|
|
||||||
}
|
|
||||||
|
|
||||||
// 노드의 글자 선택시
|
|
||||||
var prev_selected_node = null;
|
|
||||||
function selectNode(menu_id, node_srl, zone_id, move_url) {
|
|
||||||
// 선택된 노드를 찾아봄
|
|
||||||
var node_zone = xGetElementById(zone_id+'_node');
|
|
||||||
if(!node_zone) return;
|
|
||||||
|
|
||||||
// 이전에 선택된 노드가 있었다면 원래데로 돌림
|
|
||||||
if(prev_selected_node) {
|
|
||||||
var prev_zone = xGetElementById(prev_selected_node.id);
|
|
||||||
if(prev_zone) {
|
|
||||||
prev_zone.style.backgroundColor = "#ffffff";
|
|
||||||
prev_zone.style.fontWeight = "normal";
|
|
||||||
prev_zone.style.color = "#000000";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 선택된 노드의 글자를 변경
|
|
||||||
prev_selected_node = node_zone;
|
|
||||||
node_zone.style.backgroundColor = "#0e078f";
|
|
||||||
node_zone.style.fontWeight = "bold";
|
|
||||||
node_zone.style.color = "#FFFFFF";
|
|
||||||
|
|
||||||
// 함수 실행
|
|
||||||
if(typeof(move_url)=="undefined"||move_url==true) {
|
|
||||||
var func = node_callback_func[menu_id];
|
|
||||||
func(menu_id, node_info_list[menu_id][node_srl]);
|
|
||||||
//toggleFolder(zone_id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 선택된 노드의 표시를 없앰
|
|
||||||
function deSelectNode() {
|
|
||||||
// 이전에 선택된 노드가 있었다면 원래데로 돌림
|
|
||||||
if(!prev_selected_node) return;
|
|
||||||
prev_selected_node.style.backgroundColor = "#ffffff";
|
|
||||||
prev_selected_node.style.fontWeight = "normal";
|
|
||||||
prev_selected_node.style.color = "#000000";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 모두 닫기
|
|
||||||
function closeAllTreeMenu(menu_id) {
|
|
||||||
for(var i in tree_menu_folder_list[menu_id]) {
|
|
||||||
var zone_id = tree_menu_folder_list[menu_id][i];
|
|
||||||
var zone = xGetElementById(zone_id);
|
|
||||||
if(!zone) continue;
|
|
||||||
var child_zone = xGetElementById(zone_id+"_child");
|
|
||||||
if(!child_zone) continue;
|
|
||||||
|
|
||||||
child_zone.style.display = "block";
|
|
||||||
toggleFolder(zone_id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 모두 열기
|
|
||||||
function openAllTreeMenu(menu_id) {
|
|
||||||
for(var i in tree_menu_folder_list[menu_id]) {
|
|
||||||
var zone_id = tree_menu_folder_list[menu_id][i];
|
|
||||||
var zone = xGetElementById(zone_id);
|
|
||||||
if(!zone) continue;
|
|
||||||
var child_zone = xGetElementById(zone_id+"_child");
|
|
||||||
if(!child_zone) continue;
|
|
||||||
|
|
||||||
child_zone.style.display = "none";
|
|
||||||
toggleFolder(zone_id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 메뉴 클릭시 기본으로 동작할 함수 (사용자 임의 함수로 대체될 수 있음)
|
|
||||||
function moveTreeMenu(menu_id, node) {
|
|
||||||
// url과 open_window값을 구함
|
|
||||||
var node_srl = node.getAttribute("node_srl");
|
|
||||||
var url = node.getAttribute("url");
|
|
||||||
var open_window = node.getAttribute("open_window");
|
|
||||||
var hasChild = false;
|
|
||||||
if(node.hasChildNodes()) hasChild = true;
|
|
||||||
|
|
||||||
// url이 없고 child가 있으면 해당 폴더 토글한다
|
|
||||||
if(!url && hasChild) {
|
|
||||||
var zone_id = "menu_"+menu_id+"_"+node_srl;
|
|
||||||
toggleFolder(zone_id);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// url이 있으면 url을 분석한다 (Xe 특화된 부분. url이 http나 ftp등으로 시작하면 그냥 해당 url 열기)
|
|
||||||
if(url) {
|
|
||||||
// http, ftp등의 연결이 아닌 경우 XE용으로 처리
|
|
||||||
if(url.indexOf('://')==-1) url = "./?"+url;
|
|
||||||
|
|
||||||
// open_window에 따라서 처리
|
|
||||||
if(open_window != "Y") location.href=url;
|
|
||||||
else {
|
|
||||||
var win = window.open(url);
|
|
||||||
win.focus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 메뉴 드래그 중이라는 상황을 간직할 변수
|
|
||||||
var tree_drag_manager = {obj:null, isDrag:false}
|
|
||||||
var tree_tmp_object = new Array();
|
|
||||||
var tree_disappear = 0;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 메뉴 드래깅을 위한 함수들
|
|
||||||
**/
|
|
||||||
// 드래깅시 보여줄 임시 object를 생성하는 함수
|
|
||||||
function tree_create_tmp_object(obj) {
|
|
||||||
var tmp_obj = tree_tmp_object[obj.id];
|
|
||||||
if(tmp_obj) return tmp_obj;
|
|
||||||
|
|
||||||
tmp_obj = xCreateElement('DIV');
|
|
||||||
tmp_obj.id = obj.id + '_tmp';
|
|
||||||
tmp_obj.style.display = 'none';
|
|
||||||
tmp_obj.style.position = 'absolute';
|
|
||||||
tmp_obj.style.backgroundColor = obj.style.backgroundColor;
|
|
||||||
tmp_obj.style.fontSize = obj.style.fontSize;
|
|
||||||
tmp_obj.style.fontFamlily = obj.style.fontFamlily;
|
|
||||||
tmp_obj.style.color = "#5277ff";
|
|
||||||
tmp_obj.style.opacity = 1;
|
|
||||||
tmp_obj.style.filter = 'alpha(opacity=100)';
|
|
||||||
|
|
||||||
document.body.appendChild(tmp_obj);
|
|
||||||
tree_tmp_object[obj.id] = tmp_obj;
|
|
||||||
return tmp_obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 기생성된 임시 object를 찾아서 return, 없으면 만들어서 return
|
|
||||||
function tree_get_tmp_object(obj) {
|
|
||||||
var tmp_obj = tree_tmp_object[obj.id];
|
|
||||||
if(!tmp_obj) tmp_obj = tree_create_tmp_object(obj);
|
|
||||||
return tmp_obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 메뉴에 마우스 클릭이 일어난 시점에 드래그를 위한 제일 첫 동작 (해당 object에 각종 함수나 상태변수 설정)
|
|
||||||
function tree_drag_enable(child_obj, funcDragStart, funcDrag, funcDragEnd) {
|
|
||||||
// 클릭이 일어난 메뉴의 상위 object를 찾음
|
|
||||||
var obj = child_obj.parentNode.parentNode;
|
|
||||||
|
|
||||||
// 상위 object에 드래그 가능하다는 상태와 각 드래그 관련 함수를 설정
|
|
||||||
obj.draggable = true;
|
|
||||||
obj.drag_start = funcDragStart;
|
|
||||||
obj.drag = funcDrag;
|
|
||||||
obj.drag_end = funcDragEnd;
|
|
||||||
obj.target_id = null;
|
|
||||||
|
|
||||||
// 드래그 가능하지 않다면 드래그 가능하도록 상태 지정하고 mousemove이벤트 등록
|
|
||||||
if (!tree_drag_manager.isDrag) {
|
|
||||||
tree_drag_manager.isDrag = true;
|
|
||||||
xAddEventListener(document, 'mousemove', tree_drag_mouse_move, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// mousedown이벤트 값을 지정
|
|
||||||
xAddEventListener(obj, 'mousedown', tree_mouse_down, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 드래그를 시작할때 호출되는 함수 (이동되는 형태를 보여주기 위한 작업을 함)
|
|
||||||
function tree_drag_start(tobj, px, py) {
|
|
||||||
var obj = tree_get_tmp_object(tobj);
|
|
||||||
|
|
||||||
xInnerHtml(obj, xInnerHtml(tobj));
|
|
||||||
|
|
||||||
tobj.source_color = tobj.style.color;
|
|
||||||
tobj.style.color = "#BBBBBB";
|
|
||||||
|
|
||||||
xLeft(obj, xPageX(tobj));
|
|
||||||
xTop(obj, xPageY(tobj));
|
|
||||||
xWidth(obj, xWidth(tobj));
|
|
||||||
xHeight(obj, xHeight(tobj));
|
|
||||||
|
|
||||||
xDisplay(obj, 'block');
|
|
||||||
}
|
|
||||||
|
|
||||||
// 드래그 시작후 마우스를 이동할때 발생되는 이벤트에 의해 실행되는 함수
|
|
||||||
function tree_drag(tobj, dx, dy) {
|
|
||||||
var obj = tree_get_tmp_object(tobj);
|
|
||||||
xLeft(obj, parseInt(xPageX(obj),10) + parseInt(dx,10));
|
|
||||||
xTop(obj, parseInt(xPageY(obj),10) + parseInt(dy,10));
|
|
||||||
|
|
||||||
var menu_id = tobj.id.replace(/menu_/,'');
|
|
||||||
menu_id = menu_id.replace(/_([0-9]+)$/,'');
|
|
||||||
if(!menu_id) return;
|
|
||||||
|
|
||||||
for(var node_srl in node_info_list[menu_id]) {
|
|
||||||
var zone_id = "menu_"+menu_id+"_"+node_srl;
|
|
||||||
var target_obj = xGetElementById(zone_id);
|
|
||||||
|
|
||||||
var hh = parseInt(xHeight(target_obj),10);
|
|
||||||
var h = parseInt(parseInt(xHeight(target_obj),10)/2,10);
|
|
||||||
|
|
||||||
var l = xPageX(target_obj);
|
|
||||||
var t = xPageY(target_obj);
|
|
||||||
var ll = parseInt(l,10) + parseInt(xWidth(target_obj),10);
|
|
||||||
var tt = parseInt(t,10) + hh;
|
|
||||||
|
|
||||||
if( tobj != target_obj && tobj.xDPX >= l && tobj.xDPX <= ll) {
|
|
||||||
if(tobj.xDPY >= t && tobj.xDPY < tt-h) {
|
|
||||||
try {
|
|
||||||
target_obj.parentNode.insertBefore(tobj, target_obj);
|
|
||||||
tobj.target_id = target_obj.id;
|
|
||||||
} catch(e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 드래그 종료 (이동되는 object가 이동할 곳에 서서히 이동되는 것처럼 보이는 효과)
|
|
||||||
function tree_drag_end(tobj, px, py) {
|
|
||||||
var obj = tree_get_tmp_object(tobj);
|
|
||||||
tree_disappear = tree_disapear_object(obj, tobj);
|
|
||||||
tree_drag_disable(tobj.id);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 스르르 사라지게 함;;
|
|
||||||
function tree_disapear_object(obj, tobj) {
|
|
||||||
var it = 150;
|
|
||||||
var ib = 15;
|
|
||||||
|
|
||||||
var x = parseInt(xPageX(obj),10);
|
|
||||||
var y = parseInt(xPageY(obj),10);
|
|
||||||
var ldt = (x - parseInt(xPageX(tobj),10)) / ib;
|
|
||||||
var tdt = (y - parseInt(xPageY(tobj),10)) / ib;
|
|
||||||
|
|
||||||
return setInterval(function() {
|
|
||||||
if(ib < 1) {
|
|
||||||
clearInterval(tree_disappear);
|
|
||||||
xInnerHtml(tobj,xInnerHtml(obj));
|
|
||||||
xInnerHtml(obj,'');
|
|
||||||
xDisplay(obj, 'none');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
ib -= 5;
|
|
||||||
x-=ldt;
|
|
||||||
y-=tdt;
|
|
||||||
xLeft(obj, x);
|
|
||||||
xTop(obj, y);
|
|
||||||
}, it/ib);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 마우스다운 이벤트 발생시 호출됨
|
|
||||||
function tree_mouse_down(e) {
|
|
||||||
var evt = new xEvent(e);
|
|
||||||
var obj = evt.target;
|
|
||||||
|
|
||||||
while(obj && !obj.draggable) {
|
|
||||||
obj = xParent(obj, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(obj) {
|
|
||||||
xPreventDefault(e);
|
|
||||||
obj.xDPX = evt.pageX;
|
|
||||||
obj.xDPY = evt.pageY;
|
|
||||||
tree_drag_manager.obj = obj;
|
|
||||||
xAddEventListener(document, 'mouseup', tree_mouse_up, false);
|
|
||||||
if (obj.drag_start) obj.drag_start(obj, evt.pageX, evt.pageY);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 마우스 버튼을 놓았을때 동작될 함수 (각종 이벤트 해제 및 변수 설정 초기화)
|
|
||||||
function tree_mouse_up(e) {
|
|
||||||
if (tree_drag_manager.obj) {
|
|
||||||
xPreventDefault(e);
|
|
||||||
xRemoveEventListener(document, 'mouseup', tree_mouse_up, false);
|
|
||||||
|
|
||||||
if (tree_drag_manager.obj.drag_end) {
|
|
||||||
var evt = new xEvent(e);
|
|
||||||
tree_drag_manager.obj.drag_end(tree_drag_manager.obj, evt.pageX, evt.pageY);
|
|
||||||
}
|
|
||||||
|
|
||||||
tree_drag_manager.obj = null;
|
|
||||||
tree_drag_manager.isDrag = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 드래그할때의 object이동등을 담당
|
|
||||||
function tree_drag_mouse_move(e) {
|
|
||||||
var evt = new xEvent(e);
|
|
||||||
|
|
||||||
if (tree_drag_manager.obj) {
|
|
||||||
xPreventDefault(e);
|
|
||||||
|
|
||||||
var obj = tree_drag_manager.obj;
|
|
||||||
var dx = evt.pageX - obj.xDPX;
|
|
||||||
var dy = evt.pageY - obj.xDPY;
|
|
||||||
|
|
||||||
obj.xDPX = evt.pageX;
|
|
||||||
obj.xDPY = evt.pageY;
|
|
||||||
|
|
||||||
if (obj.drag) {
|
|
||||||
obj.drag(obj, dx, dy);
|
|
||||||
} else {
|
|
||||||
xMoveTo(obj, xLeft(obj) + dx, xTop(obj) + dy);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 해당 object 에 더 이상 drag가 되지 않도록 설정
|
|
||||||
function tree_drag_disable(id) {
|
|
||||||
if (!tree_drag_manager) return;
|
|
||||||
var obj = xGetElementById(id);
|
|
||||||
obj.draggable = false;
|
|
||||||
obj.drag_start = null;
|
|
||||||
obj.drag = null;
|
|
||||||
obj.drag_end = null;
|
|
||||||
obj.style.color = obj.source_color;
|
|
||||||
|
|
||||||
xRemoveEventListener(obj, 'mousedown', tree_mouse_down, false);
|
|
||||||
|
|
||||||
if(obj.id && obj.target_id && obj.id!=obj.target_id) {
|
|
||||||
var menu_id = obj.id.replace(/menu_/,'');
|
|
||||||
menu_id = menu_id.replace(/_([0-9]+)$/,'');
|
|
||||||
if(menu_id) {
|
|
||||||
var callback_move_func = node_move_callback_func[menu_id];
|
|
||||||
if(callback_move_func) callback_move_func(menu_id, obj.id, obj.target_id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
obj.target_id = null;
|
|
||||||
}
|
|
||||||
459
common/js/unittest/JSSpec/COPYING
Normal file
|
|
@ -0,0 +1,459 @@
|
||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
Version 2.1, February 1999
|
||||||
|
|
||||||
|
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
[This is the first released version of the Lesser GPL. It also counts
|
||||||
|
as the successor of the GNU Library Public License, version 2, hence
|
||||||
|
the version number 2.1.]
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
Licenses are intended to guarantee your freedom to share and change
|
||||||
|
free software--to make sure the software is free for all its users.
|
||||||
|
|
||||||
|
This license, the Lesser General Public License, applies to some
|
||||||
|
specially designated software packages--typically libraries--of the
|
||||||
|
Free Software Foundation and other authors who decide to use it. You
|
||||||
|
can use it too, but we suggest you first think carefully about whether
|
||||||
|
this license or the ordinary General Public License is the better
|
||||||
|
strategy to use in any particular case, based on the explanations below.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom of use,
|
||||||
|
not price. Our General Public Licenses are designed to make sure that
|
||||||
|
you have the freedom to distribute copies of free software (and charge
|
||||||
|
for this service if you wish); that you receive source code or can get
|
||||||
|
it if you want it; that you can change the software and use pieces of
|
||||||
|
it in new free programs; and that you are informed that you can do
|
||||||
|
these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
distributors to deny you these rights or to ask you to surrender these
|
||||||
|
rights. These restrictions translate to certain responsibilities for
|
||||||
|
you if you distribute copies of the library or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of the library, whether gratis
|
||||||
|
or for a fee, you must give the recipients all the rights that we gave
|
||||||
|
you. You must make sure that they, too, receive or can get the source
|
||||||
|
code. If you link other code with the library, you must provide
|
||||||
|
complete object files to the recipients, so that they can relink them
|
||||||
|
with the library after making changes to the library and recompiling
|
||||||
|
it. And you must show them these terms so they know their rights.
|
||||||
|
|
||||||
|
We protect your rights with a two-step method: (1) we copyright the
|
||||||
|
library, and (2) we offer you this license, which gives you legal
|
||||||
|
permission to copy, distribute and/or modify the library.
|
||||||
|
|
||||||
|
To protect each distributor, we want to make it very clear that
|
||||||
|
there is no warranty for the free library. Also, if the library is
|
||||||
|
modified by someone else and passed on, the recipients should know
|
||||||
|
that what they have is not the original version, so that the original
|
||||||
|
author's reputation will not be affected by problems that might be
|
||||||
|
introduced by others.
|
||||||
|
|
||||||
|
Finally, software patents pose a constant threat to the existence of
|
||||||
|
any free program. We wish to make sure that a company cannot
|
||||||
|
effectively restrict the users of a free program by obtaining a
|
||||||
|
restrictive license from a patent holder. Therefore, we insist that
|
||||||
|
any patent license obtained for a version of the library must be
|
||||||
|
consistent with the full freedom of use specified in this license.
|
||||||
|
|
||||||
|
Most GNU software, including some libraries, is covered by the
|
||||||
|
ordinary GNU General Public License. This license, the GNU Lesser
|
||||||
|
General Public License, applies to certain designated libraries, and
|
||||||
|
is quite different from the ordinary General Public License. We use
|
||||||
|
this license for certain libraries in order to permit linking those
|
||||||
|
libraries into non-free programs.
|
||||||
|
|
||||||
|
When a program is linked with a library, whether statically or using
|
||||||
|
a shared library, the combination of the two is legally speaking a
|
||||||
|
combined work, a derivative of the original library. The ordinary
|
||||||
|
General Public License therefore permits such linking only if the
|
||||||
|
entire combination fits its criteria of freedom. The Lesser General
|
||||||
|
Public License permits more lax criteria for linking other code with
|
||||||
|
the library.
|
||||||
|
|
||||||
|
We call this license the "Lesser" General Public License because it
|
||||||
|
does Less to protect the user's freedom than the ordinary General
|
||||||
|
Public License. It also provides other free software developers Less
|
||||||
|
of an advantage over competing non-free programs. These disadvantages
|
||||||
|
are the reason we use the ordinary General Public License for many
|
||||||
|
libraries. However, the Lesser license provides advantages in certain
|
||||||
|
special circumstances.
|
||||||
|
|
||||||
|
For example, on rare occasions, there may be a special need to
|
||||||
|
encourage the widest possible use of a certain library, so that it becomes
|
||||||
|
a de-facto standard. To achieve this, non-free programs must be
|
||||||
|
allowed to use the library. A more frequent case is that a free
|
||||||
|
library does the same job as widely used non-free libraries. In this
|
||||||
|
case, there is little to gain by limiting the free library to free
|
||||||
|
software only, so we use the Lesser General Public License.
|
||||||
|
|
||||||
|
In other cases, permission to use a particular library in non-free
|
||||||
|
programs enables a greater number of people to use a large body of
|
||||||
|
free software. For example, permission to use the GNU C Library in
|
||||||
|
non-free programs enables many more people to use the whole GNU
|
||||||
|
operating system, as well as its variant, the GNU/Linux operating
|
||||||
|
system.
|
||||||
|
|
||||||
|
Although the Lesser General Public License is Less protective of the
|
||||||
|
users' freedom, it does ensure that the user of a program that is
|
||||||
|
linked with the Library has the freedom and the wherewithal to run
|
||||||
|
that program using a modified version of the Library.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow. Pay close attention to the difference between a
|
||||||
|
"work based on the library" and a "work that uses the library". The
|
||||||
|
former contains code derived from the library, whereas the latter must
|
||||||
|
be combined with the library in order to run.
|
||||||
|
|
||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License Agreement applies to any software library or other
|
||||||
|
program which contains a notice placed by the copyright holder or
|
||||||
|
other authorized party saying it may be distributed under the terms of
|
||||||
|
this Lesser General Public License (also called "this License").
|
||||||
|
Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
A "library" means a collection of software functions and/or data
|
||||||
|
prepared so as to be conveniently linked with application programs
|
||||||
|
(which use some of those functions and data) to form executables.
|
||||||
|
|
||||||
|
The "Library", below, refers to any such software library or work
|
||||||
|
which has been distributed under these terms. A "work based on the
|
||||||
|
Library" means either the Library or any derivative work under
|
||||||
|
copyright law: that is to say, a work containing the Library or a
|
||||||
|
portion of it, either verbatim or with modifications and/or translated
|
||||||
|
straightforwardly into another language. (Hereinafter, translation is
|
||||||
|
included without limitation in the term "modification".)
|
||||||
|
|
||||||
|
"Source code" for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For a library, complete source code means
|
||||||
|
all the source code for all modules it contains, plus any associated
|
||||||
|
interface definition files, plus the scripts used to control compilation
|
||||||
|
and installation of the library.
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running a program using the Library is not restricted, and output from
|
||||||
|
such a program is covered only if its contents constitute a work based
|
||||||
|
on the Library (independent of the use of the Library in a tool for
|
||||||
|
writing it). Whether that is true depends on what the Library does
|
||||||
|
and what the program that uses the Library does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Library's
|
||||||
|
complete source code as you receive it, in any medium, provided that
|
||||||
|
you conspicuously and appropriately publish on each copy an
|
||||||
|
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||||
|
all the notices that refer to this License and to the absence of any
|
||||||
|
warranty; and distribute a copy of this License along with the
|
||||||
|
Library.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy,
|
||||||
|
and you may at your option offer warranty protection in exchange for a
|
||||||
|
fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Library or any portion
|
||||||
|
of it, thus forming a work based on the Library, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The modified work must itself be a software library.
|
||||||
|
|
||||||
|
b) You must cause the files modified to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
c) You must cause the whole of the work to be licensed at no
|
||||||
|
charge to all third parties under the terms of this License.
|
||||||
|
|
||||||
|
d) If a facility in the modified Library refers to a function or a
|
||||||
|
table of data to be supplied by an application program that uses
|
||||||
|
the facility, other than as an argument passed when the facility
|
||||||
|
is invoked, then you must make a good faith effort to ensure that,
|
||||||
|
in the event an application does not supply such function or
|
||||||
|
table, the facility still operates, and performs whatever part of
|
||||||
|
its purpose remains meaningful.
|
||||||
|
|
||||||
|
(For example, a function in a library to compute square roots has
|
||||||
|
a purpose that is entirely well-defined independent of the
|
||||||
|
application. Therefore, Subsection 2d requires that any
|
||||||
|
application-supplied function or table used by this function must
|
||||||
|
be optional: if the application does not supply it, the square
|
||||||
|
root function must still compute square roots.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Library,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Library, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote
|
||||||
|
it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Library.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Library
|
||||||
|
with the Library (or with a work based on the Library) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||||
|
License instead of this License to a given copy of the Library. To do
|
||||||
|
this, you must alter all the notices that refer to this License, so
|
||||||
|
that they refer to the ordinary GNU General Public License, version 2,
|
||||||
|
instead of to this License. (If a newer version than version 2 of the
|
||||||
|
ordinary GNU General Public License has appeared, then you can specify
|
||||||
|
that version instead if you wish.) Do not make any other change in
|
||||||
|
these notices.
|
||||||
|
|
||||||
|
Once this change is made in a given copy, it is irreversible for
|
||||||
|
that copy, so the ordinary GNU General Public License applies to all
|
||||||
|
subsequent copies and derivative works made from that copy.
|
||||||
|
|
||||||
|
This option is useful when you wish to copy part of the code of
|
||||||
|
the Library into a program that is not a library.
|
||||||
|
|
||||||
|
4. You may copy and distribute the Library (or a portion or
|
||||||
|
derivative of it, under Section 2) in object code or executable form
|
||||||
|
under the terms of Sections 1 and 2 above provided that you accompany
|
||||||
|
it with the complete corresponding machine-readable source code, which
|
||||||
|
must be distributed under the terms of Sections 1 and 2 above on a
|
||||||
|
medium customarily used for software interchange.
|
||||||
|
|
||||||
|
If distribution of object code is made by offering access to copy
|
||||||
|
from a designated place, then offering equivalent access to copy the
|
||||||
|
source code from the same place satisfies the requirement to
|
||||||
|
distribute the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
5. A program that contains no derivative of any portion of the
|
||||||
|
Library, but is designed to work with the Library by being compiled or
|
||||||
|
linked with it, is called a "work that uses the Library". Such a
|
||||||
|
work, in isolation, is not a derivative work of the Library, and
|
||||||
|
therefore falls outside the scope of this License.
|
||||||
|
|
||||||
|
However, linking a "work that uses the Library" with the Library
|
||||||
|
creates an executable that is a derivative of the Library (because it
|
||||||
|
contains portions of the Library), rather than a "work that uses the
|
||||||
|
library". The executable is therefore covered by this License.
|
||||||
|
Section 6 states terms for distribution of such executables.
|
||||||
|
|
||||||
|
When a "work that uses the Library" uses material from a header file
|
||||||
|
that is part of the Library, the object code for the work may be a
|
||||||
|
derivative work of the Library even though the source code is not.
|
||||||
|
Whether this is true is especially significant if the work can be
|
||||||
|
linked without the Library, or if the work is itself a library. The
|
||||||
|
threshold for this to be true is not precisely defined by law.
|
||||||
|
|
||||||
|
If such an object file uses only numerical parameters, data
|
||||||
|
structure layouts and accessors, and small macros and small inline
|
||||||
|
functions (ten lines or less in length), then the use of the object
|
||||||
|
file is unrestricted, regardless of whether it is legally a derivative
|
||||||
|
work. (Executables containing this object code plus portions of the
|
||||||
|
Library will still fall under Section 6.)
|
||||||
|
|
||||||
|
Otherwise, if the work is a derivative of the Library, you may
|
||||||
|
distribute the object code for the work under the terms of Section 6.
|
||||||
|
Any executables containing that work also fall under Section 6,
|
||||||
|
whether or not they are linked directly with the Library itself.
|
||||||
|
|
||||||
|
6. As an exception to the Sections above, you may also combine or
|
||||||
|
link a "work that uses the Library" with the Library to produce a
|
||||||
|
work containing portions of the Library, and distribute that work
|
||||||
|
under terms of your choice, provided that the terms permit
|
||||||
|
modification of the work for the customer's own use and reverse
|
||||||
|
engineering for debugging such modifications.
|
||||||
|
|
||||||
|
You must give prominent notice with each copy of the work that the
|
||||||
|
Library is used in it and that the Library and its use are covered by
|
||||||
|
this License. You must supply a copy of this License. If the work
|
||||||
|
during execution displays copyright notices, you must include the
|
||||||
|
copyright notice for the Library among them, as well as a reference
|
||||||
|
directing the user to the copy of this License. Also, you must do one
|
||||||
|
of these things:
|
||||||
|
|
||||||
|
a) Accompany the work with the complete corresponding
|
||||||
|
machine-readable source code for the Library including whatever
|
||||||
|
changes were used in the work (which must be distributed under
|
||||||
|
Sections 1 and 2 above); and, if the work is an executable linked
|
||||||
|
with the Library, with the complete machine-readable "work that
|
||||||
|
uses the Library", as object code and/or source code, so that the
|
||||||
|
user can modify the Library and then relink to produce a modified
|
||||||
|
executable containing the modified Library. (It is understood
|
||||||
|
that the user who changes the contents of definitions files in the
|
||||||
|
Library will not necessarily be able to recompile the application
|
||||||
|
to use the modified definitions.)
|
||||||
|
|
||||||
|
b) Use a suitable shared library mechanism for linking with the
|
||||||
|
Library. A suitable mechanism is one that (1) uses at run time a
|
||||||
|
copy of the library already present on the user's computer system,
|
||||||
|
rather than copying library functions into the executable, and (2)
|
||||||
|
will operate properly with a modified version of the library, if
|
||||||
|
the user installs one, as long as the modified version is
|
||||||
|
interface-compatible with the version that the work was made with.
|
||||||
|
|
||||||
|
c) Accompany the work with a written offer, valid for at
|
||||||
|
least three years, to give the same user the materials
|
||||||
|
specified in Subsection 6a, above, for a charge no more
|
||||||
|
than the cost of performing this distribution.
|
||||||
|
|
||||||
|
d) If distribution of the work is made by offering access to copy
|
||||||
|
from a designated place, offer equivalent access to copy the above
|
||||||
|
specified materials from the same place.
|
||||||
|
|
||||||
|
e) Verify that the user has already received a copy of these
|
||||||
|
materials or that you have already sent this user a copy.
|
||||||
|
|
||||||
|
For an executable, the required form of the "work that uses the
|
||||||
|
Library" must include any data and utility programs needed for
|
||||||
|
reproducing the executable from it. However, as a special exception,
|
||||||
|
the materials to be distributed need not include anything that is
|
||||||
|
normally distributed (in either source or binary form) with the major
|
||||||
|
components (compiler, kernel, and so on) of the operating system on
|
||||||
|
which the executable runs, unless that component itself accompanies
|
||||||
|
the executable.
|
||||||
|
|
||||||
|
It may happen that this requirement contradicts the license
|
||||||
|
restrictions of other proprietary libraries that do not normally
|
||||||
|
accompany the operating system. Such a contradiction means you cannot
|
||||||
|
use both them and the Library together in an executable that you
|
||||||
|
distribute.
|
||||||
|
|
||||||
|
7. You may place library facilities that are a work based on the
|
||||||
|
Library side-by-side in a single library together with other library
|
||||||
|
facilities not covered by this License, and distribute such a combined
|
||||||
|
library, provided that the separate distribution of the work based on
|
||||||
|
the Library and of the other library facilities is otherwise
|
||||||
|
permitted, and provided that you do these two things:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work
|
||||||
|
based on the Library, uncombined with any other library
|
||||||
|
facilities. This must be distributed under the terms of the
|
||||||
|
Sections above.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library of the fact
|
||||||
|
that part of it is a work based on the Library, and explaining
|
||||||
|
where to find the accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
8. You may not copy, modify, sublicense, link with, or distribute
|
||||||
|
the Library except as expressly provided under this License. Any
|
||||||
|
attempt otherwise to copy, modify, sublicense, link with, or
|
||||||
|
distribute the Library is void, and will automatically terminate your
|
||||||
|
rights under this License. However, parties who have received copies,
|
||||||
|
or rights, from you under this License will not have their licenses
|
||||||
|
terminated so long as such parties remain in full compliance.
|
||||||
|
|
||||||
|
9. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Library or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Library (or any work based on the
|
||||||
|
Library), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Library or works based on it.
|
||||||
|
|
||||||
|
10. Each time you redistribute the Library (or any work based on the
|
||||||
|
Library), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute, link with or modify the Library
|
||||||
|
subject to these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties with
|
||||||
|
this License.
|
||||||
|
|
||||||
|
11. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Library at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Library by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Library.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under any
|
||||||
|
particular circumstance, the balance of the section is intended to apply,
|
||||||
|
and the section as a whole is intended to apply in other circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
12. If the distribution and/or use of the Library is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Library under this License may add
|
||||||
|
an explicit geographical distribution limitation excluding those countries,
|
||||||
|
so that distribution is permitted only in or among countries not thus
|
||||||
|
excluded. In such case, this License incorporates the limitation as if
|
||||||
|
written in the body of this License.
|
||||||
|
|
||||||
|
13. The Free Software Foundation may publish revised and/or new
|
||||||
|
versions of the Lesser General Public License from time to time.
|
||||||
|
Such new versions will be similar in spirit to the present version,
|
||||||
|
but may differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Library
|
||||||
|
specifies a version number of this License which applies to it and
|
||||||
|
"any later version", you have the option of following the terms and
|
||||||
|
conditions either of that version or of any later version published by
|
||||||
|
the Free Software Foundation. If the Library does not specify a
|
||||||
|
license version number, you may choose any version ever published by
|
||||||
|
the Free Software Foundation.
|
||||||
|
|
||||||
|
14. If you wish to incorporate parts of the Library into other free
|
||||||
|
programs whose distribution conditions are incompatible with these,
|
||||||
|
write to the author to ask for permission. For software which is
|
||||||
|
copyrighted by the Free Software Foundation, write to the Free
|
||||||
|
Software Foundation; we sometimes make exceptions for this. Our
|
||||||
|
decision will be guided by the two goals of preserving the free status
|
||||||
|
of all derivatives of our free software and of promoting the sharing
|
||||||
|
and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||||
|
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||||
|
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||||
|
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||||
|
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||||
|
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||||
|
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||||
|
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||||
|
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||||
|
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||||
|
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||||
|
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||||
|
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||||
|
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||||
|
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||||
|
DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
1548
common/js/unittest/JSSpec/JSSpec.js
Normal file
210
common/js/unittest/JSSpec/demo.html
Normal file
|
|
@ -0,0 +1,210 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
|
||||||
|
<title>JSSpec results</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/JSSpec.css" />
|
||||||
|
<script type="text/javascript" src="diff_match_patch.js"></script>
|
||||||
|
<script type="text/javascript" src="JSSpec.js"></script>
|
||||||
|
<script type="text/javascript">// <![CDATA[
|
||||||
|
describe('Foo (base)', {
|
||||||
|
'before': function() {
|
||||||
|
target = {sayFoo: function() {return "foo";}};
|
||||||
|
},
|
||||||
|
'should say "foo"': function() {
|
||||||
|
value_of(target.sayFoo()).should_be("foo");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('Boo (derived)', {
|
||||||
|
'before': function() {
|
||||||
|
target = {
|
||||||
|
sayFoo: function() {return "foo";},
|
||||||
|
sayBar: function() {return "bar";}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
'should also say "bar"': function() {
|
||||||
|
value_of(target.sayBar()).should_be("bar");
|
||||||
|
}
|
||||||
|
}, 'Foo (base)')
|
||||||
|
|
||||||
|
describe('Plus operator (just for example)', {
|
||||||
|
'should concatenate two strings': function() {
|
||||||
|
value_of("Hello " + "World").should_be("Hello World");
|
||||||
|
},
|
||||||
|
'should add two numbers': function() {
|
||||||
|
value_of(1 + 2).should_be(3);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('"Should match"s', {
|
||||||
|
'Should match': function() {
|
||||||
|
value_of("Hello").should_match(/ell/);
|
||||||
|
},
|
||||||
|
'Should match 1': function() {
|
||||||
|
value_of("Hello").should_match(/x/);
|
||||||
|
},
|
||||||
|
'Should match 2': function() {
|
||||||
|
value_of([1,2,3]).should_match(/x/);
|
||||||
|
},
|
||||||
|
'Should not match 1': function() {
|
||||||
|
value_of("Hello").should_not_match(/ell/);
|
||||||
|
},
|
||||||
|
'Should not match 2': function() {
|
||||||
|
value_of([1,2,3]).should_not_match(/x/);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
describe('"Should include"s', {
|
||||||
|
'Should include': function() {
|
||||||
|
value_of([1,2,3]).should_include(4);
|
||||||
|
},
|
||||||
|
'Should not include': function() {
|
||||||
|
value_of([1,2,3]).should_not_include(2);
|
||||||
|
},
|
||||||
|
'Should include / Non-array object': function() {
|
||||||
|
value_of(new Date()).should_include(4);
|
||||||
|
},
|
||||||
|
'Should not include / Non-array object': function() {
|
||||||
|
value_of(new Date()).should_not_include('getMonth');
|
||||||
|
},
|
||||||
|
'Should include 2': function() {
|
||||||
|
value_of({a:1, b:2}).should_not_include('a');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('"Should have"s', {
|
||||||
|
'String length': function() {
|
||||||
|
value_of("Hello").should_have(4, "characters");
|
||||||
|
},
|
||||||
|
'Array length': function() {
|
||||||
|
value_of([1,2,3]).should_have(4, "items");
|
||||||
|
},
|
||||||
|
'Object\'s item length': function() {
|
||||||
|
value_of({name:'Alan Kang', email:'jania902@gmail.com', accounts:['A', 'B']}).should_have(3, "accounts");
|
||||||
|
},
|
||||||
|
'No match': function() {
|
||||||
|
value_of("This is a string").should_have(5, "players");
|
||||||
|
},
|
||||||
|
'Exactly': function() {
|
||||||
|
value_of([1,2,3]).should_have_exactly(2, "items");
|
||||||
|
},
|
||||||
|
'At least': function() {
|
||||||
|
value_of([1,2,3]).should_have_at_least(4, "items");
|
||||||
|
},
|
||||||
|
'At most': function() {
|
||||||
|
value_of([1,2,3]).should_have_at_most(2, "items");
|
||||||
|
},
|
||||||
|
'Member': function() {
|
||||||
|
value_of({x: 0}).should_have_member('x'); // true
|
||||||
|
value_of({x: 0}).should_have_member('y'); // false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
describe('"Should be empty"s', {
|
||||||
|
'String': function() {
|
||||||
|
value_of("Hello").should_be_empty();
|
||||||
|
},
|
||||||
|
'Array': function() {
|
||||||
|
value_of([1,2,3]).should_be_empty();
|
||||||
|
},
|
||||||
|
'Object\'s item': function() {
|
||||||
|
value_of({name:'Alan Kang', email:'jania902@gmail.com', accounts:['A', 'B']}).should_have(0, "accounts");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('Failure messages', {
|
||||||
|
'Should be (String)': function() {
|
||||||
|
value_of("Hello World").should_be("Good-bye world");
|
||||||
|
},
|
||||||
|
'Should have (Object\s item)': function() {
|
||||||
|
value_of({name:'Alan Kang', email:'jania902@gmail.com', accounts:['A', 'B']}).should_have(3, "accounts");
|
||||||
|
},
|
||||||
|
'Should have at least': function() {
|
||||||
|
value_of([1,2,3]).should_have_at_least(4, "items");
|
||||||
|
},
|
||||||
|
'Should include': function() {
|
||||||
|
value_of([1,2,3]).should_include(4);
|
||||||
|
},
|
||||||
|
'Should match': function() {
|
||||||
|
value_of("Hello").should_match(/bye/);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('"Should be"s', {
|
||||||
|
'String mismatch': function() {
|
||||||
|
value_of("Hello world").should_be("Good-bye world");
|
||||||
|
},
|
||||||
|
'Array item mismatch': function() {
|
||||||
|
value_of(['ab','cd','ef']).should_be(['ab','bd','ef']);
|
||||||
|
},
|
||||||
|
'Array length mismatch': function() {
|
||||||
|
value_of(['a',2,'4',5]).should_be([1,2,[4,5,6],6,7]);
|
||||||
|
},
|
||||||
|
'Undefined value': function() {
|
||||||
|
value_of("Test").should_be(undefined);
|
||||||
|
},
|
||||||
|
'Null value': function() {
|
||||||
|
value_of(null).should_be("Test");
|
||||||
|
},
|
||||||
|
'Boolean value 1': function() {
|
||||||
|
value_of(true).should_be(false);
|
||||||
|
},
|
||||||
|
'Boolean value 2': function() {
|
||||||
|
value_of(false).should_be_true();
|
||||||
|
},
|
||||||
|
'Boolean value 3': function() {
|
||||||
|
value_of(true).should_be_false();
|
||||||
|
},
|
||||||
|
'Number mismatch': function() {
|
||||||
|
value_of(1+2).should_be(4);
|
||||||
|
},
|
||||||
|
'Date mismatch': function() {
|
||||||
|
value_of(new Date(1979, 3, 27)).should_be(new Date(1976, 7, 23));
|
||||||
|
},
|
||||||
|
'Object mismatch 1': function() {
|
||||||
|
var actual = {a:1, b:2};
|
||||||
|
var expected = {a:1, b:2, d:3};
|
||||||
|
|
||||||
|
value_of(actual).should_be(expected);
|
||||||
|
},
|
||||||
|
'Object mismatch 2': function() {
|
||||||
|
var actual = {a:1, b:2, c:3, d:4};
|
||||||
|
var expected = {a:1, b:2, c:3};
|
||||||
|
|
||||||
|
value_of(actual).should_be(expected);
|
||||||
|
},
|
||||||
|
'Object mismatch 3': function() {
|
||||||
|
var actual = {a:1, b:4, c:3};
|
||||||
|
var expected = {a:1, b:2, c:3};
|
||||||
|
|
||||||
|
value_of(actual).should_be(expected);
|
||||||
|
},
|
||||||
|
'null should be null': function() {
|
||||||
|
value_of(null).should_be(null);
|
||||||
|
},
|
||||||
|
'null should not be undefined': function() {
|
||||||
|
value_of(null).should_be(undefined);
|
||||||
|
},
|
||||||
|
'null should not be null': function() {
|
||||||
|
value_of(null).should_not_be(null);
|
||||||
|
},
|
||||||
|
'empty array 1': function() {
|
||||||
|
value_of([]).should_be_empty();
|
||||||
|
value_of([1]).should_be_empty();
|
||||||
|
},
|
||||||
|
'empty array 2': function() {
|
||||||
|
value_of([1]).should_not_be_empty();
|
||||||
|
value_of([]).should_not_be_empty();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('Equality operator', {
|
||||||
|
'should work for different Date instances which have same value': function() {
|
||||||
|
var date1 = new Date(1979, 03, 27);
|
||||||
|
var date2 = new Date(1979, 03, 27);
|
||||||
|
value_of(date1).should_be(date2);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// ]]></script>
|
||||||
|
</head>
|
||||||
|
<body><div style="display:none;"><p>A</p><p>B</p></div></body>
|
||||||
|
</html>
|
||||||
1
common/js/unittest/JSSpec/diff_match_patch.js
Normal file
224
common/js/unittest/css/JSSpec.css
Normal file
|
|
@ -0,0 +1,224 @@
|
||||||
|
@CHARSET "UTF-8";
|
||||||
|
|
||||||
|
/* --------------------
|
||||||
|
* @Layout
|
||||||
|
*/
|
||||||
|
|
||||||
|
html {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
body, #jsspec_container {
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
#title {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 0px;
|
||||||
|
left: 0px;
|
||||||
|
width: 100%;
|
||||||
|
height: 40px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#list {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 40px;
|
||||||
|
left: 0px;
|
||||||
|
bottom: 0px;
|
||||||
|
overflow: auto;
|
||||||
|
width: 250px;
|
||||||
|
_height:expression(document.body.clientHeight-40);
|
||||||
|
}
|
||||||
|
|
||||||
|
#log {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 40px;
|
||||||
|
left: 250px;
|
||||||
|
right: 0px;
|
||||||
|
bottom: 0px;
|
||||||
|
overflow: auto;
|
||||||
|
_height:expression(document.body.clientHeight-40);
|
||||||
|
_width:expression(document.body.clientWidth-250);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* --------------------
|
||||||
|
* @Decorations and colors
|
||||||
|
*/
|
||||||
|
* {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
font-family: "Lucida Grande", Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* hiding subtitles */
|
||||||
|
h2 {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* title section */
|
||||||
|
div#title {
|
||||||
|
padding: 0em 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#title h1 {
|
||||||
|
font-size: 1.5em;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#title ul li {
|
||||||
|
float: left;
|
||||||
|
padding: 0.5em 0em 0.5em 0.75em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#title p {
|
||||||
|
float:right;
|
||||||
|
margin-right:1em;
|
||||||
|
font-size: 0.75em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* spec container */
|
||||||
|
ul.specs {
|
||||||
|
margin: 0.5em;
|
||||||
|
}
|
||||||
|
ul.specs li {
|
||||||
|
margin-bottom: 0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* spec title */
|
||||||
|
ul.specs li h3 {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 0.75em;
|
||||||
|
padding: 0.2em 1em;
|
||||||
|
cursor: pointer;
|
||||||
|
_cursor: hand;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* example container */
|
||||||
|
ul.examples li {
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 0px 0px 1px 5px;
|
||||||
|
margin: 0.2em 0em 0.2em 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* example title */
|
||||||
|
ul.examples li h4 {
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 0.75em;
|
||||||
|
margin-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre.examples-code {
|
||||||
|
margin: 0.5em 2em;
|
||||||
|
padding: 0.5em;
|
||||||
|
background: white;
|
||||||
|
border: solid 1px #CCC;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* example explaination */
|
||||||
|
ul.examples li div {
|
||||||
|
padding: 1em 2em;
|
||||||
|
font-size: 0.75em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* styles for ongoing, success, failure, error */
|
||||||
|
div.success, div.success a {
|
||||||
|
color: #FFFFFF;
|
||||||
|
background-color: #65C400;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.specs li.success h3, ul.specs li.success h3 a {
|
||||||
|
color: #FFFFFF;
|
||||||
|
background-color: #65C400;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.examples li.success, ul.examples li.success a {
|
||||||
|
color: #3D7700;
|
||||||
|
background-color: #DBFFB4;
|
||||||
|
border-color: #65C400;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.exception, div.exception a {
|
||||||
|
color: #FFFFFF;
|
||||||
|
background-color: #C20000;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.specs li.exception h3, ul.specs li.exception h3 a {
|
||||||
|
color: #FFFFFF;
|
||||||
|
background-color: #C20000;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.examples li.exception, ul.examples li.exception a {
|
||||||
|
color: #C20000;
|
||||||
|
background-color: #FFFBD3;
|
||||||
|
border-color: #C20000;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.ongoing, div.ongoing a {
|
||||||
|
color: #000000;
|
||||||
|
background-color: #FFFF80;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.specs li.ongoing h3, ul.specs li.ongoing h3 a {
|
||||||
|
color: #000000;
|
||||||
|
background-color: #FFFF80;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.examples li.ongoing, ul.examples li.ongoing a {
|
||||||
|
color: #000000;
|
||||||
|
background-color: #FFFF80;
|
||||||
|
border-color: #DDDD00;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* --------------------
|
||||||
|
* values
|
||||||
|
*/
|
||||||
|
.number_value, .string_value, .regexp_value, .boolean_value, .dom_value {
|
||||||
|
font-family: monospace;
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
.object_value, .array_value {
|
||||||
|
line-height: 2em;
|
||||||
|
padding: 0.1em 0.2em;
|
||||||
|
margin: 0.1em 0;
|
||||||
|
}
|
||||||
|
.date_value {
|
||||||
|
font-family: monospace;
|
||||||
|
color: olive;
|
||||||
|
}
|
||||||
|
.undefined_value, .null_value {
|
||||||
|
font-style: italic;
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
.dom_attr_name {
|
||||||
|
}
|
||||||
|
.dom_attr_value {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
.dom_path {
|
||||||
|
font-size: 0.75em;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
strong {
|
||||||
|
font-weight: normal;
|
||||||
|
background-color: #FFC6C6;
|
||||||
|
}
|
||||||
74
common/js/unittest/unittest_common.html
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
|
||||||
|
<title>JSSpec results</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/JSSpec.css" />
|
||||||
|
<script type="text/javascript" src="JSSpec/JSSpec.js"></script>
|
||||||
|
<script type="text/javascript" src="JSSpec/diff_match_patch.js"></script>
|
||||||
|
<script type="text/javascript" src="../jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="../common.js"></script>
|
||||||
|
<script type="text/javascript">// <![CDATA[
|
||||||
|
describe('SetQuery', {
|
||||||
|
'should satisfy basic uri condition' : function() {
|
||||||
|
target = "http://www.zeroboard.com/";
|
||||||
|
value_of(target.setQuery("q","r")).should_be("http://www.zeroboard.com/?q=r");
|
||||||
|
},
|
||||||
|
'should work when ssl is on' : function() {
|
||||||
|
target = "http://www.zeroboard.com/";
|
||||||
|
ssl_actions = new Array("dispLogin");
|
||||||
|
value_of(target.setQuery("act","dispLogin")).should_be("https://www.zeroboard.com/?act=dispLogin");
|
||||||
|
},
|
||||||
|
'should work when ssl is on and https_port is set (not 443)' : function() {
|
||||||
|
target = "http://www.zeroboard.com/";
|
||||||
|
https_port = 445;
|
||||||
|
ssl_actions = new Array("dispLogin");
|
||||||
|
value_of(target.setQuery("act","dispLogin")).should_be("https://www.zeroboard.com:445/?act=dispLogin");
|
||||||
|
},
|
||||||
|
'should work when ssl is on and https_port is set as 443' : function() {
|
||||||
|
target = "http://www.zeroboard.com/";
|
||||||
|
https_port = 443;
|
||||||
|
ssl_actions = new Array("dispLogin");
|
||||||
|
value_of(target.setQuery("act","dispLogin")).should_be("https://www.zeroboard.com/?act=dispLogin");
|
||||||
|
},
|
||||||
|
'should replace https to http if act is not a member of ssl_actions': function() {
|
||||||
|
targets = "https://www.zeroboard.com/";
|
||||||
|
ssl_actions = new Array("dispLogin");
|
||||||
|
value_of(targets.setQuery("act","dispLogin2")).should_be("http://www.zeroboard.com/?act=dispLogin2");
|
||||||
|
},
|
||||||
|
'should remove https port' : function() {
|
||||||
|
targetsp = "https://www.zeroboard.com:443/?q=r";
|
||||||
|
value_of(targetsp.setQuery("act","dispLogin2")).should_be("http://www.zeroboard.com/?q=r&act=dispLogin2");
|
||||||
|
},
|
||||||
|
'should remove https port and add http port if http port is defined' : function() {
|
||||||
|
targetsp = "https://www.zeroboard.com:443/?q=r";
|
||||||
|
http_port = 8000;
|
||||||
|
value_of(targetsp.setQuery("act","dispLogin2")).should_be("http://www.zeroboard.com:8000/?q=r&act=dispLogin2");
|
||||||
|
},
|
||||||
|
'should only remove https port and if http port is defined as 80' : function() {
|
||||||
|
targetsp = "https://www.zeroboard.com:443/?q=r";
|
||||||
|
http_port = 80;
|
||||||
|
value_of(targetsp.setQuery("act","dispLogin2")).should_be("http://www.zeroboard.com/?q=r&act=dispLogin2");
|
||||||
|
},
|
||||||
|
'should work if enforce_ssl is set' : function() {
|
||||||
|
target = "http://www.zeroboard.com/";
|
||||||
|
enforce_ssl = true;
|
||||||
|
value_of(target.setQuery("act","dispLogin")).should_be("https://www.zeroboard.com/?act=dispLogin");
|
||||||
|
},
|
||||||
|
'should work if enforce_ssl is set with 443 port' : function() {
|
||||||
|
target = "http://www.zeroboard.com/";
|
||||||
|
enforce_ssl = true;
|
||||||
|
https_port = 443;
|
||||||
|
value_of(target.setQuery("act","dispLogin")).should_be("https://www.zeroboard.com/?act=dispLogin");
|
||||||
|
},
|
||||||
|
'should work if enforce_ssl is set with none-443 port' : function() {
|
||||||
|
target = "http://www.zeroboard.com/";
|
||||||
|
enforce_ssl = true;
|
||||||
|
https_port = 445;
|
||||||
|
value_of(target.setQuery("act","dispLogin")).should_be("https://www.zeroboard.com:445/?act=dispLogin");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// ]]></script>
|
||||||
|
</head>
|
||||||
|
<body><div style="display:none;"><p>A</p><p>B</p></div></body>
|
||||||
|
</html>
|
||||||
|
|
@ -386,3 +386,59 @@ function xml2json(xml, tab, ignoreAttrib) {
|
||||||
var json = X.toJson(X.toObj(X.removeWhite(xml)), xml.nodeName, "");
|
var json = X.toJson(X.toObj(X.removeWhite(xml)), xml.nodeName, "");
|
||||||
return "{" + (tab ? json.replace(/\t/g, tab) : json.replace(/\t|\n/g, "")) + "}";
|
return "{" + (tab ? json.replace(/\t/g, tab) : json.replace(/\t|\n/g, "")) + "}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief exec_json (exec_xml와 같은 용도)
|
||||||
|
**/
|
||||||
|
(function($){
|
||||||
|
$.exec_json = function(action,data,func){
|
||||||
|
if(typeof(data) == 'undefined') data = {};
|
||||||
|
action = action.split(".");
|
||||||
|
if(action.length == 2){
|
||||||
|
|
||||||
|
if(show_waiting_message) {
|
||||||
|
$("#waitingforserverresponse").html(waiting_message).css('top',$(document).scrollTop()+20).css('left',$(document).scrollLeft()+20).css('visibility','visible');
|
||||||
|
}
|
||||||
|
|
||||||
|
$.extend(data,{module:action[0],act:action[1]});
|
||||||
|
$.ajax({
|
||||||
|
type:"POST"
|
||||||
|
,dataType:"json"
|
||||||
|
,url:request_uri
|
||||||
|
,contentType:"application/json"
|
||||||
|
,data:$.param(data)
|
||||||
|
,success : function(data){
|
||||||
|
$("#waitingforserverresponse").css('visibility','hidden');
|
||||||
|
if(data.error > 0) alert(data.message);
|
||||||
|
if($.isFunction(func)) func(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$.fn.exec_html = function(action,data,type){
|
||||||
|
if(typeof(data) == 'undefined') data = {};
|
||||||
|
if(!$.inArray(type, ['html','append','prepend'])) type = 'html';
|
||||||
|
|
||||||
|
var self = $(this);
|
||||||
|
action = action.split(".");
|
||||||
|
if(action.length == 2){
|
||||||
|
if(show_waiting_message) {
|
||||||
|
$("#waitingforserverresponse").html(waiting_message).css('top',$(document).scrollTop()+20).css('left',$(document).scrollLeft()+20).css('visibility','visible');
|
||||||
|
}
|
||||||
|
|
||||||
|
$.extend(data,{module:action[0],act:action[1]});
|
||||||
|
$.ajax({
|
||||||
|
type:"POST"
|
||||||
|
,dataType:"html"
|
||||||
|
,url:request_uri
|
||||||
|
,data:$.param(data)
|
||||||
|
,success : function(html){
|
||||||
|
$("#waitingforserverresponse").css('visibility','hidden');
|
||||||
|
self[type](html);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
})(jQuery);
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@
|
||||||
$lang->disable = 'Disable';
|
$lang->disable = 'Disable';
|
||||||
|
|
||||||
// Essential Words
|
// Essential Words
|
||||||
|
$lang->menu = 'Menu';
|
||||||
$lang->no = 'No.';
|
$lang->no = 'No.';
|
||||||
$lang->notice = 'Notice';
|
$lang->notice = 'Notice';
|
||||||
$lang->secret = 'Secret';
|
$lang->secret = 'Secret';
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,7 @@
|
||||||
$lang->disable = 'Desactivar'; //Desactivado
|
$lang->disable = 'Desactivar'; //Desactivado
|
||||||
|
|
||||||
// Palabras Esenciales
|
// Palabras Esenciales
|
||||||
|
$lang->menu = 'Menu';
|
||||||
$lang->no = 'Nº';
|
$lang->no = 'Nº';
|
||||||
$lang->notice = 'Aviso'; //boletín, noticia
|
$lang->notice = 'Aviso'; //boletín, noticia
|
||||||
$lang->secret = 'Secreto';
|
$lang->secret = 'Secreto';
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@
|
||||||
$lang->disable = 'Invalide';
|
$lang->disable = 'Invalide';
|
||||||
|
|
||||||
// Mots essentiels
|
// Mots essentiels
|
||||||
|
$lang->menu = 'Menu';
|
||||||
$lang->no = 'No';
|
$lang->no = 'No';
|
||||||
$lang->notice = 'Notice';
|
$lang->notice = 'Notice';
|
||||||
$lang->secret = 'Secret';
|
$lang->secret = 'Secret';
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@
|
||||||
$lang->deaktivieren = 'Deaktivieren';
|
$lang->deaktivieren = 'Deaktivieren';
|
||||||
|
|
||||||
// Essential Words
|
// Essential Words
|
||||||
|
$lang->menu = 'Menu';
|
||||||
$lang->no = 'Nein';
|
$lang->no = 'Nein';
|
||||||
$lang->notice = 'Hinweis';
|
$lang->notice = 'Hinweis';
|
||||||
$lang->secret = 'Geheim';
|
$lang->secret = 'Geheim';
|
||||||
|
|
|
||||||
|
|
@ -69,13 +69,14 @@
|
||||||
$lang->disable = '不可';
|
$lang->disable = '不可';
|
||||||
|
|
||||||
// 基本用語
|
// 基本用語
|
||||||
|
$lang->menu = 'Menu';
|
||||||
$lang->no = '番号';
|
$lang->no = '番号';
|
||||||
$lang->notice = 'お知らせ';
|
$lang->notice = 'お知らせ';
|
||||||
$lang->secret = '非公開';
|
$lang->secret = '非公開';
|
||||||
$lang->category = $lang->category_srl = 'カテゴリ';
|
$lang->category = $lang->category_srl = 'カテゴリ';
|
||||||
$lang->none_category = 'カテゴリ無し';
|
$lang->none_category = 'カテゴリ無し';
|
||||||
$lang->document_srl = '書き込み番号';
|
$lang->document_srl = '書き込み番号';
|
||||||
$lang->user_id = 'ユーザID';
|
$lang->user_id = 'ユーザーID';
|
||||||
$lang->author = '作成者';
|
$lang->author = '作成者';
|
||||||
$lang->password = 'パスワード';
|
$lang->password = 'パスワード';
|
||||||
$lang->password1 = 'パスワード';
|
$lang->password1 = 'パスワード';
|
||||||
|
|
@ -263,26 +264,25 @@
|
||||||
$lang->is_required = '必須項目';
|
$lang->is_required = '必須項目';
|
||||||
|
|
||||||
// ftp 관련
|
// ftp 관련
|
||||||
$lang->ftp_form_title = 'FTP情報の入力';
|
$lang->ftp_form_title = 'サーバーのFTP情報の入力';
|
||||||
$lang->ftp = 'FTP';
|
$lang->ftp = 'FTP';
|
||||||
$lang->ftp_port = 'FTP port';
|
$lang->ftp_port = 'FTP port';
|
||||||
$lang->cmd_check_ftp_connect = 'FTP接続確認';
|
$lang->cmd_check_ftp_connect = 'FTP接続をテストする';
|
||||||
$lang->about_ftp_info = "
|
$lang->about_ftp_info = "
|
||||||
FTP情報は次の場合、利用されます。<br/>
|
FTP情報は次の場合、利用されます。<br/>
|
||||||
1. PHPの safe_mode=Onになった際、FTP情報を用いてゼロボードXEが正常に動きます。<br/>
|
1. PHPのsafe_mode=Onになった際、FTP情報を用いてXEが正常に動きます。<br/>
|
||||||
2. 自動アップデート等で、FTP情報が使われます。<br/>
|
2. FTP経由でXEの自動アップデート等に使われます。<br/>
|
||||||
FTP情報は files/config/ftp.config.php の中に保存されます。<br/>
|
FTP情報は files/config/ftp.config.php の中に保存されます。<br/>
|
||||||
また、ゼロボードXEのインストールの後、管理者画面からFTP情報の変更・削除が可能です。 <br />
|
また、XEのインストールの後、管理者画面からFTP情報の変更・削除が可能です。(省略可能) <br />
|
||||||
";
|
";
|
||||||
|
|
||||||
$lang->msg_safe_mode_ftp_needed = "PHPのsafe_modeがOnの場合、FTP情報を登録することで、ゼロボードXEのインストール及び利用が可能になります。";
|
$lang->msg_safe_mode_ftp_needed = "PHPのsafe_modeがOnの場合、FTP情報を登録することで、XEのインストール及び利用が可能になります。";
|
||||||
$lang->msg_ftp_not_connected = "localhostへのFTP接続エラーが発生しました。FTPポート(port)番号をはじめ、FTPサービスが可能であるかをご確認下さい。";
|
$lang->msg_ftp_not_connected = "localhostへのFTP接続エラーが発生しました。FTPポート(port)番号をはじめ、FTPサービスが可能であるかをご確認下さい。";
|
||||||
$lang->msg_ftp_invalid_auth_info = "ログインが失敗しました。 FTP情報を再度ご確認下さい。";
|
$lang->msg_ftp_invalid_auth_info = "ログインが失敗しました。 FTP情報を再度ご確認下さい。";
|
||||||
$lang->msg_ftp_mkdir_fail = "FTPを用いたディレクトリ生成に失敗しました。FTPサーバーの設定を再度ご確認ください。";
|
$lang->msg_ftp_mkdir_fail = "FTPを用いたディレクトリ生成に失敗しました。FTPサーバーの設定を再度ご確認ください。";
|
||||||
$lang->msg_ftp_chmod_fail = "FTPを用いたディレクトリパーミッション(permission)変更に失敗しました。FTPサーバーの設定を再度ご確認ください。";
|
$lang->msg_ftp_chmod_fail = "FTPを用いたディレクトリパーミッション(permission)変更に失敗しました。FTPサーバーの設定を再度ご確認ください。";
|
||||||
$lang->msg_ftp_connect_success = "FTP接続に成功しました。";
|
$lang->msg_ftp_connect_success = "FTP接続に成功しました。";
|
||||||
|
|
||||||
|
|
||||||
// xml filterで用いられているjavascript用のアラートメッセージ
|
// xml filterで用いられているjavascript用のアラートメッセージ
|
||||||
$lang->filter->isnull = '%sを入力して下さい。';
|
$lang->filter->isnull = '%sを入力して下さい。';
|
||||||
$lang->filter->outofrange = '%sの文字の長さを合わせて下さい。';
|
$lang->filter->outofrange = '%sの文字の長さを合わせて下さい。';
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@
|
||||||
$lang->disable = '불가능';
|
$lang->disable = '불가능';
|
||||||
|
|
||||||
// 기본 단어
|
// 기본 단어
|
||||||
|
$lang->menu = '메뉴';
|
||||||
$lang->no = '번호';
|
$lang->no = '번호';
|
||||||
$lang->notice = '공지';
|
$lang->notice = '공지';
|
||||||
$lang->secret = '비밀';
|
$lang->secret = '비밀';
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@
|
||||||
$lang->disable = 'Выключено';
|
$lang->disable = 'Выключено';
|
||||||
|
|
||||||
// Существенные слова
|
// Существенные слова
|
||||||
|
$lang->menu = 'Menu';
|
||||||
$lang->no = 'No.';
|
$lang->no = 'No.';
|
||||||
$lang->notice = 'Уведомление';
|
$lang->notice = 'Уведомление';
|
||||||
$lang->secret = 'Секрет';
|
$lang->secret = 'Секрет';
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@
|
||||||
$lang->disable = '禁用';
|
$lang->disable = '禁用';
|
||||||
|
|
||||||
// 基本词语
|
// 基本词语
|
||||||
|
$lang->menu = '菜单';
|
||||||
$lang->no = '编号';
|
$lang->no = '编号';
|
||||||
$lang->notice = '公告';
|
$lang->notice = '公告';
|
||||||
$lang->secret = '密帖';
|
$lang->secret = '密帖';
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@
|
||||||
$lang->disable = '禁用';
|
$lang->disable = '禁用';
|
||||||
|
|
||||||
// 基本詞語
|
// 基本詞語
|
||||||
|
$lang->menu = 'Menu';
|
||||||
$lang->no = '編號';
|
$lang->no = '編號';
|
||||||
$lang->notice = '公告';
|
$lang->notice = '公告';
|
||||||
$lang->secret = '秘密';
|
$lang->secret = '秘密';
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,9 @@
|
||||||
var current_mid = "{$mid}";
|
var current_mid = "{$mid}";
|
||||||
var waiting_message = "{$lang->msg_call_server}";
|
var waiting_message = "{$lang->msg_call_server}";
|
||||||
var ssl_actions = new Array(<!--@if(count($ssl_actions))-->"{implode('","',$ssl_actions)}"<!--@end-->);
|
var ssl_actions = new Array(<!--@if(count($ssl_actions))-->"{implode('","',$ssl_actions)}"<!--@end-->);
|
||||||
|
<!--@if(Context::get("_http_port"))-->var http_port = {Context::get("_http_port")};<!--@end-->
|
||||||
|
<!--@if(Context::get("_https_port"))-->var https_port = {Context::get("_https_port")};<!--@end-->
|
||||||
|
<!--@if(Context::get("_use_ssl") && Context::get("_use_ssl") == "always")-->var enforce_ssl = true;<!--@end-->
|
||||||
//]]></script>
|
//]]></script>
|
||||||
|
|
||||||
{Context::getHtmlHeader()}
|
{Context::getHtmlHeader()}
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 69 B |
|
Before Width: | Height: | Size: 66 B |
|
Before Width: | Height: | Size: 66 B |
|
Before Width: | Height: | Size: 86 B |
|
Before Width: | Height: | Size: 85 B |
|
Before Width: | Height: | Size: 582 B |
|
Before Width: | Height: | Size: 89 B |