diff --git a/.htaccess b/.htaccess index 4faa4a59b..a65bb32ed 100644 --- a/.htaccess +++ b/.htaccess @@ -1,82 +1,64 @@ RewriteEngine On -# image... -RewriteRule ^(.+)/files/attach/images/(.*) ./files/attach/images/$2 [L] -RewriteRule ^(.+)/files/attach/menu_button/(.*) ./files/attach/menu_button/$2 [L] -RewriteRule ^(.+)/files/member_extra_info/(.*) ./files/member_extra_info/$2 [L] -RewriteRule ^(.+)/files/cache/(.*) ./files/cache/$2 [L] -RewriteRule ^(.+)/modules/(.*) ./modules/$2 [L] -RewriteRule ^(.+)/common/css/(.*) ./common/css/$2 [L] -RewriteRule ^(.+)/common/js/(.*) ./common/js/$2 [L] -RewriteRule ^(.+)/common/tpl/(.*) ./common/tpl/$2 [L] -RewriteRule ^(.+)/widgets/(.*) ./widgets/$2 [L] -RewriteRule ^(.+)/layouts/(.*) ./layouts/$2 [L] -RewriteRule ^(.+)/addons/(.*) ./addons/$2 [L] +# static files +RewriteRule ^([a-zA-Z0-9_]+)/files/(.*) ./files/$2 [L] +RewriteRule ^([a-zA-Z0-9_]+)/modules/(.*) ./modules/$2 [L] +RewriteRule ^([a-zA-Z0-9_]+)/common/(.*) ./common/$2 [L] +RewriteRule ^([a-zA-Z0-9_]+)/widgets/(.*) ./widgets/$2 [L] +RewriteRule ^([a-zA-Z0-9_]+)/widgetstyle/(.*) ./widgetstyle/$2 [L] +RewriteRule ^([a-zA-Z0-9_]+)/layouts/(.*) ./layouts/$2 [L] +RewriteRule ^([a-zA-Z0-9_]+)/addons/(.*) ./addons/$2 [L] +RewriteRule ^([a-zA-Z0-9_]+)/entry/files/(.*) ./files/$2 [L] +RewriteRule ^([a-zA-Z0-9_]+)/entry/modules/(.*) ./modules/$2 [L] +RewriteRule ^([a-zA-Z0-9_]+)/entry/common/(.*) ./common/$2 [L] +RewriteRule ^([a-zA-Z0-9_]+)/entry/widgets/(.*) ./widgets/$2 [L] +RewriteRule ^([a-zA-Z0-9_]+)/entry/widgetstyle/(.*) ./widgetstyle/$2 [L] +RewriteRule ^([a-zA-Z0-9_]+)/entry/layouts/(.*) ./layouts/$2 [L] +RewriteRule ^([a-zA-Z0-9_]+)/entry/addons/(.*) ./addons/$2 [L] +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/files/(.*) ./files/$2 [L] +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/modules/(.*) ./modules/$2 [L] +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/common/(.*) ./common/$2 [L] +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/widgets/(.*) ./widgets/$2 [L] +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/widgetstyle/(.*) ./widgetstyle/$2 [L] +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/layouts/(.*) ./layouts/$2 [L] +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/addons/(.*) ./addons/$2 [L] +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/files/(.*) ./files/$3 [L] +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/modules/(.*) ./modules/$3 [L] +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/common/(.*) ./common/$3 [L] +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/widgets/(.*) ./widgets/$3 [L] +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/widgetstyle/(.*) ./widgetstyle/$3 [L] +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/layouts/(.*) ./layouts/$3 [L] +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/addons/(.*) ./addons/$3 [L] -# page -RewriteRule ^([a-zA-Z0-9_]+)/([[:digit:]]+)page$ ./index.php?mid=$1&page=$2 [L] - -# total rss -RewriteRule ^rss/([[:digit:]]+){0,14}/([[:digit:]]+){0,14}/([[:digit:]]+)$ ./index.php?module=rss&act=rss&start_date=$1&end_date=$2&page=$3 [L] -RewriteRule ^rss/([[:digit:]]+)$ ./index.php?module=rss&act=rss&page=$1 [L] +# rss , blogAPI RewriteRule ^rss$ ./index.php?module=rss&act=rss [L] -RewriteRule ^atom/([[:digit:]]+){0,14}/([[:digit:]]+){0,14}/([[:digit:]]+)$ ./index.php?module=rss&act=atom&start_date=$1&end_date=$2&page=$3 [L] -RewriteRule ^atom/([[:digit:]]+)$ ./index.php?module=rss&act=atom&page=$1 [L] RewriteRule ^atom$ ./index.php?module=rss&act=atom [L] +RewriteRule ^([a-zA-Z0-9_]+)/rss$ ./index.php?mid=$1&act=rss [L] +RewriteRule ^([a-zA-Z0-9_]+)/atom$ ./index.php?mid=$1&act=atom [L] +RewriteRule ^([a-zA-Z0-9_]+)/api$ ./index.php?mid=$1&act=api [L] +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/rss$ ./index.php?vid=$1&mid=$2&act=rss [L] +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/atom$ ./index.php?vid=$1&mid=$2&act=atom [L] +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/api$ ./index.php?vid=$1&mid=$2&act=api [L] # administrator page RewriteRule ^admin/?$ ./index.php?module=admin [L] -# mid + act -RewriteRule ^([a-zA-Z0-9_]+)/api$ ./index.php?mid=$1&act=api [L] - # document permanent link RewriteRule ^([[:digit:]]+)$ ./index.php?document_srl=$1 [L] +# vid + document permanent link +RewriteRule ^([a-zA-Z0-9_]+)/([[:digit:]]+)$ ./index.php?vid=$1&document_srl=$2 [L] -# document + act link -RewriteRule ^([[:digit:]]+)/([a-zA-Z0-9_]+)$ ./index.php?document_srl=$1&act=$2 [L] - -# document + key + act link -RewriteRule ^([[:digit:]]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)$ ./index.php?document_srl=$1&act=$3&key=$2 [L] +# mid link +RewriteRule ^([a-zA-Z0-9_]+)(/){0,1}$ ./index.php?mid=$1 [L] +# vid + mid link +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)(/){0,1}$ ./index.php?vid=$1&mid=$2 [L] # mid + document link RewriteRule ^([a-zA-Z0-9_]+)/([[:digit:]]+)$ ./index.php?mid=$1&document_srl=$2 [L] - -# mid + act link -RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)$ ./index.php?mid=$1&act=$2 [L] - -# mid + page link -RewriteRule ^([a-zA-Z0-9_]+)/page/([[:digit:]]+)$ ./index.php?mid=$1&page=$2 [L] +# vid + mid + document link +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([[:digit:]]+)$ ./index.php?vid=$1&mid=$2&document_srl=$3 [L] # mid + entry title RewriteRule ^([a-zA-Z0-9_]+)/entry/(.+)$ ./index.php?mid=$1&entry=$2 [L] - -# mid + category link -RewriteRule ^([a-zA-Z0-9_]+)/category/([[:digit:]]+)$ ./index.php?mid=$1&category=$2 [L] - -# mid + act + document_Srl -RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z])([a-zA-Z0-9_]+)/([[:digit:]]+)$ ./index.php?mid=$1&document_srl=$4&act=$2$3 [L] - -# mid + document_Srl + page -RewriteRule ^([a-zA-Z0-9_]+)/([[:digit:]]+)/page/([[:digit:]]+)$ ./index.php?mid=$1&document_srl=$2&page=$3 [L] - -# mid + category + page -RewriteRule ^([a-zA-Z0-9_]+)/category/([[:digit:]]+)/page/([[:digit:]]+)$ ./index.php?mid=$1&category=$2&page=$3 [L] - -# mid + search target regdate (year+month) -RewriteRule ^([a-zA-Z0-9_]+)/([[:digit:]]+)/([[:digit:]]+)$ ./index.php?mid=$1&search_target=regdate&search_keyword=$2$3 [L] - -# mid + search target regdate (year+month+day) -RewriteRule ^([a-zA-Z0-9_]+)/([[:digit:]]+)/([[:digit:]]+)/([[:digit:]]+)$ ./index.php?mid=$1&search_target=regdate&search_keyword=$2$3$4 [L] - -# mid + search target tag -RewriteRule ^([a-zA-Z0-9_]+)/tag/(.*)$ ./index.php?mid=$1&search_target=tag&search_keyword=$2 [L] - -# mid + search target writer -RewriteRule ^([a-zA-Z0-9_]+)/writer/(.*)$ ./index.php?mid=$1&search_target=nick_name&search_keyword=$2 [L] - -# mid + document_Srl + page + act -RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([[:digit:]]+)/page/([[:digit:]]+)$ ./index.php?mid=$1&document_srl=$3&page=$4&act=$2 [L] - -# module link -RewriteRule ^([a-zA-Z0-9_]+)(/){0,1}$ ./index.php?mid=$1 [L] +# vid + mid + entry title +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/(.+)$ ./index.php?vid=$1&mid=$2&entry=$3 [L] diff --git a/addons/captcha/conf/info.xml b/addons/captcha/conf/info.xml index 86ac1a3b1..2afdc0797 100644 --- a/addons/captcha/conf/info.xml +++ b/addons/captcha/conf/info.xml @@ -1,12 +1,17 @@ Captcha 애드온 + 验证码插件 Captchaアドオン Captcha元件 프로그램 글 등록기를 막기 위해 게시판/ issueTracker에서 글/ 댓글을 입력하려 할 때 이미지를 보여주고 글에 해당하는 이미지를 선택하게 하는 애드온입니다. 로그인하지 않은 경우에만 해당됩니다. + + 为了解决互联网垃圾而开发的验证码机制。 + 非登录用户发布话题或评论时将会弹出验证图片选择框,选择正确的图片才可以正常发布(适用于版面/issueTracker)。 + ボット(bot)がプログラムによるスパム行為を防ぐために、掲示板/issueTrackerで書き込み・コメントを入力する際、ランダムな文字や数字の列を画面に表示し、表示されたものと同じ情報を入力して、データを登録させるアドオンです。 ログインしてない時だけ、動作します。 @@ -20,6 +25,7 @@ zero + zero zero zero @@ -27,36 +33,44 @@ Captcha 표시 대상 + 应用对象 Captchaを表示する対象 Captcha顯示的目標 글/댓글 등록시 captcha가 동작할 대상을 정할 수 있습니다. 관리자는 무조건 제외됩니다 + 可以指定验证码应用对象(管理员除外)。 管理者以外、書き込み・コメントを入力する際captchaを見せる対象を設定します。 管理者以外、書き込み・コメントを入力する際captchaを見せる対象を設定します。 로그인하지 않은 사용자 + 非登录用户 ログインしてないユーザー 無法登入的用戶 모든 사용자 + 所有用户 すべてのユーザー 所有用戶 동작 방식 + 验证方式 動作方式 行為模式 "1번만 동작"을 선택하시면 1번만 동작후 상태를 저장해서 다음부터 물어보지 않고 그렇지 않으면 매번 물어보게 됩니다 + "一次"就是每个IP只出现一次验证。 "1回だけ表示"を選択すると、1回だけ動作した後、その情報を保存して次回からはCaptchaを見せないようにし、もう一つのオプションは毎回Captchaを表示します。 選擇"單次",在發生第一次行為後,該行為會儲存,下次不會再顯示;選擇"每次"則會一直顯示。 1번만 동작 + 一次 1回だけ表示 單次 매번 동작 + 每次 毎回表示 每次 diff --git a/addons/captcha/lang/zh-CN.lang.php b/addons/captcha/lang/zh-CN.lang.php new file mode 100644 index 000000000..01b475e15 --- /dev/null +++ b/addons/captcha/lang/zh-CN.lang.php @@ -0,0 +1,21 @@ +about_captcha = "请选择与显示名称相一致的图片。"; + $lang->target_captcha = array( + "airplane" => "飞机", + "apple" => "苹果", + "book" => "书", + "camera" => "摄像机", + "dog" => "狗", + "earth" => "地球", + "flag" => "旗帜", + "mobile" => "手机", + "note" => "音符", + "skeleton" => "骷髅", + ); +?> diff --git a/addons/keyword_link/conf/info.xml b/addons/keyword_link/conf/info.xml index 9820dfcfe..6ad33d4cc 100644 --- a/addons/keyword_link/conf/info.xml +++ b/addons/keyword_link/conf/info.xml @@ -18,7 +18,7 @@ 此插件将自动给主题正文及评论中的关键字添加相应的预设链接。 多个关键字可以用逗号(,)来区分输入。 - 多个关键字的优先级以输入顺序准。 + 多个关键字的优先级以输入顺序为准。 將文章與評論中和關鍵字相對應的文字自動作連結。 @@ -27,7 +27,7 @@ 本文とコメントの内容中、登録されたキーワードにリンクを貼りつける機能を行います。 - キーワードは半角コンマ(,)区切りで複数登録が出来ます。 + キーワードは半角コンマ(,)区切りで複数登録が出来ます。 先に登録されるキーワードが優先度が高いです。 0.1 @@ -45,7 +45,7 @@ cssquery - cssquery + cssquery cssquery cssquery cssquery @@ -53,7 +53,7 @@ xe_board 게시판 스킨이면 공백으로 두면 됩니다. jQuery cssquery的部份可以置換。 如果是使用xe_board討論板面板,請留白。 - 替换部分的jQuery cssquery。 + 替换部分的jQuery cssquery。 如果正使用的是官方默认皮肤(xe_board),此处留空即可。 置き換える部分のjQuery cssqueryです。 xe_board掲示板スキンの場合、空白にして下さい。 @@ -63,13 +63,13 @@ 링크 방법 - 链接方式 + 链接方式 連結方式 リンクの貼りつけ方 The way to make a link 키워드가 여러개 있을때 "첫번째 키워드"에만 링크를 걸 것인지 "모든 키워드"에 걸 것인지 선택합니다. - 有多个预设关键字时,在此可以指定链接方式。 + 有多个预设关键字时,在此可以指定链接方式。 키워드가 여러개 있을때 "첫번째 키워드"에만 링크를 걸 것인지 "모든 키워드"에 걸 것인지 선택합니다. @@ -78,14 +78,14 @@ For the multiple keywords, choose if make a link to the first keyword, or all the keywords 첫번째 키워드 - 首个关键字 + 首个关键字 第一關鍵字 最初のキーワード First keyword 모든 키워드 - 所有关键字 + 所有关键字 所有關鍵字 全てのキーワード All keywords @@ -94,70 +94,70 @@ 키워드 - 关键字 + 关键字 關鍵字 キーワード Keyword 링크 - 链接 + 链接 連結 リンク Link 키워드 - 关键字 + 关键字 關鍵字 キーワード Keyword 링크 - 链接 + 链接 連結 リンク Link 키워드 - 关键字 + 关键字 關鍵字 キーワード Keyword 링크 - 链接 + 链接 連結 リンク Link 키워드 - 关键字 + 关键字 關鍵字 キーワード Keyword 링크 - 链接 + 链接 連結 リンク Link 키워드 - 关键字 + 关键字 關鍵字 キーワード Keyword 링크 - 链接 + 链接 連結 リンク Link diff --git a/addons/member_communication/lang/jp.lang.php b/addons/member_communication/lang/jp.lang.php index 3a5dfc9c6..6bbc554ef 100644 --- a/addons/member_communication/lang/jp.lang.php +++ b/addons/member_communication/lang/jp.lang.php @@ -1,3 +1,3 @@ alert_new_message_arrived = '新しいメッセージが届きました。確認しますか。'; + $lang->alert_new_message_arrived = '%d個の新しいメッセージが届きました。確認しますか。'; ?> diff --git a/addons/member_extra_info/conf/info.xml b/addons/member_extra_info/conf/info.xml index 63af756ba..4df1f36ec 100644 --- a/addons/member_extra_info/conf/info.xml +++ b/addons/member_extra_info/conf/info.xml @@ -12,7 +12,7 @@ 회원이 등록한 이미지이름, 이미지마크를 사용하기 위해서는 이 애드온을 활성화 시키세요. - 会員が登録したイメージを使ったお名前、イメージマークを使うためにはこのアドオンを活性化して下さい。 + 会員が登録したイメージニックネーム、イメージマークとして使うために、このアドオンを活性化して下さい。 此插件将把用户信息中的昵称图片,用户图标,签名等信息显示到页面当中。 diff --git a/addons/mobile/conf/info.xml b/addons/mobile/conf/info.xml index b7912d793..404b4dc9c 100644 --- a/addons/mobile/conf/info.xml +++ b/addons/mobile/conf/info.xml @@ -10,7 +10,7 @@ wml, hdml, mhtml를 지원하고 그 이외의 경우에는 동작하지 않습니다. - モバイル端末機からアクセス時、ヘッダ情報を分析してメニュー - モジュールの関係を利用してWAPタグに変換して表示するアドオンです。 + モバイル端末機からアクセス時、ヘッダ情報を分析してメニュー - モジュールの関係を利用してWAPタグに変換表示するアドオンです。 wml, hdml, mhtmlをサポートし、その以外は働きません。 @@ -50,7 +50,7 @@ ある特定のモバイル機器ではutf-8文字コードの認識が出来ない場合があります。 - 文字コードを設定すると、該当文字コードに自動変換して正常に表示できるようになります。 + 文字コードを設定すると、該当文字コードに自動変換して正常に表示出来るようになります。 デフォルトはeuc-krです。 diff --git a/addons/openid_delegation_id/conf/info.xml b/addons/openid_delegation_id/conf/info.xml index a3b3349f2..57aa3cc86 100644 --- a/addons/openid_delegation_id/conf/info.xml +++ b/addons/openid_delegation_id/conf/info.xml @@ -29,8 +29,8 @@ Debe utilizar luego de ingresar los valores relacionado con openid provider a través de la configuracion. - 保有するドメインをオープンIDとして活用することができます。 - 必ず設定で、OpenIDのプロバイダー関連情報を入力してから使用してください。 + 保有しているオリジナルドメインをオープンIDとして活用することが出来ます。 + 必ず設定で、OpenIDのプロバイダー関連情報を入力してから使用して下さい。 Этот аддон позволяет Вам использовать Вашу доменное имя как OpenID. @@ -69,7 +69,7 @@ Please input your openid.server value. Bitte geben Sie Ihre openid.server Wert. Ingrese el valor del openid.server. - openid.server の値を入力してください。 + openid.server の値を入力して下さい。 Пожалуйста, введите Ваше значение openid сервера. 請輸入 openid.server 值。 @@ -87,7 +87,7 @@ Please input your openid.delegate value. Bitte geben Sie Ihre openid.delegate Wert. Ingresar el valor del openid.delegate - openid.delegate の値を入力してください。 + openid.delegate の値を入力して下さい。 Пожалуйста, введите Ваше значение openid делегата. 請輸入 openid.delegate 值。 @@ -105,7 +105,7 @@ Please input your X-XRDS-Location value. Bitte geben Sie Ihre X-XRDS-Standort Wert. Ingresar el valor de X-XRDS-Location - X-XRDS-Location の値を入力してください。 + X-XRDS-Location の値を入力して下さい。 Пожалуйста, введите Ваше значение X-XRDS-Локации. 請輸入 X-XRDS-Location 值。 diff --git a/addons/planet_bookmark/planet_bookmark.addon.php b/addons/planet_bookmark/planet_bookmark.addon.php index ee6237afc..b1bfbd7cf 100644 --- a/addons/planet_bookmark/planet_bookmark.addon.php +++ b/addons/planet_bookmark/planet_bookmark.addon.php @@ -2,23 +2,16 @@ if(!defined("__ZBXE__")) exit(); /** - * @file planet_bookmark.addon.php - * @author zero (zero@zeroboard.com) + * @file planet_todo.addon.php + * @author SOL군 (sol@ngleader.com) * @brief **/ - if($called_position == 'after_module_proc' && Context::getResponseMethod()!="XMLRPC" && Context::getResponseMethod()!="JSON") { - $config = Context::get('config'); - if($config && $config->mid == 'planet'){ - $oPlanet = Context::get('planet'); - if(!is_object($oPlanet)) return; - if($oPlanet->isMyPlanet()){ - $oPlanetModel = &getModel('planet'); - $countBookmark = $oPlanetModel->getTagSearchResultCount($oPlanet->getModuleSrl(),'bookmark'); - - Context::addHtmlHeader(""); - Context::addJsFile('./addons/planet_bookmark/planet_bookmark.js'); - } - } + $planet = Context::get('planet'); + if(!$planet || !$planet->isMyPlanet()) return; + $oPlanetModel = &getModel('planet'); + $countBookmark = $oPlanetModel->getTagSearchResultCount($planet->getModuleSrl(),'bookmark'); + Context::addHtmlHeader(""); + Context::addJsFile('./addons/planet_bookmark/planet_bookmark.js'); } ?> diff --git a/addons/planet_bookmark/planet_todo.addon.php b/addons/planet_bookmark/planet_todo.addon.php deleted file mode 100644 index 07e4ae6a9..000000000 --- a/addons/planet_bookmark/planet_todo.addon.php +++ /dev/null @@ -1,28 +0,0 @@ -mid == 'planet'){ - $oPlanet = Context::get('planet'); - if($oPlanet->isMyPlanet()){ - $oPlanetModel = &getModel('planet'); - $countTodo = $oPlanetModel->getTagSearchResultCount($oPlanet->getModuleSrl(),'todo'); - $countDone = $oPlanetModel->getTagSearchResultCount($oPlanet->getModuleSrl(),'done'); - - Context::addHtmlHeader(""); - Context::addJsFile('./addons/planet_todo/planet_todo.js'); - } - } - } -?> diff --git a/addons/planet_todo/planet_todo.addon.php b/addons/planet_todo/planet_todo.addon.php index 247dafe37..5fa102f6a 100644 --- a/addons/planet_todo/planet_todo.addon.php +++ b/addons/planet_todo/planet_todo.addon.php @@ -7,19 +7,14 @@ * @brief **/ if($called_position == 'after_module_proc' && Context::getResponseMethod()!="XMLRPC" && Context::getResponseMethod()!="JSON") { - $config = Context::get('config'); + $planet = Context::get('planet'); + if(!$planet || !$planet->isMyPlanet()) return; - if($config && $config->mid == 'planet'){ - $oPlanet = Context::get('planet'); - if(!is_object($oPlanet)) return; - if($oPlanet->isMyPlanet()){ - $oPlanetModel = &getModel('planet'); - $countTodo = $oPlanetModel->getTagSearchResultCount($oPlanet->getModuleSrl(),'todo'); - $countDone = $oPlanetModel->getTagSearchResultCount($oPlanet->getModuleSrl(),'done'); + $oPlanetModel = &getModel('planet'); + $countTodo = $oPlanetModel->getTagSearchResultCount($planet->getModuleSrl(),'todo'); + $countDone = $oPlanetModel->getTagSearchResultCount($planet->getModuleSrl(),'done'); - Context::addHtmlHeader(""); - Context::addJsFile('./addons/planet_todo/planet_todo.js'); - } - } + Context::addHtmlHeader(""); + Context::addJsFile('./addons/planet_todo/planet_todo.js'); } ?> diff --git a/addons/planet_todo/planet_todo.js b/addons/planet_todo/planet_todo.js index e1cc37216..ac5b7ba67 100644 --- a/addons/planet_todo/planet_todo.js +++ b/addons/planet_todo/planet_todo.js @@ -5,9 +5,6 @@ function planetTab(){ } xAddEventListener(window,'load',planetTab); - - - function planetTabOff(){ $Element('planetex_Tab').leave(); } @@ -22,8 +19,8 @@ function planet_showTodoList(o){ function planet_reload_todo(){ $('commentList').innerHTML = '

TODO

\n
\n\n

DONE

\n
\n\n\n'; - planet_getTodo(); - planet_getDone(); + planet_getTodo(1); + planet_getDone(1); } function planet_getTodo(page){ diff --git a/addons/point_level_icon/conf/info.xml b/addons/point_level_icon/conf/info.xml index baf1859ec..34567bd2d 100644 --- a/addons/point_level_icon/conf/info.xml +++ b/addons/point_level_icon/conf/info.xml @@ -17,8 +17,8 @@ 级别图标可以在模块 > 积分系统中进行选择。
- ポイントシステムを使用している場合、ユーザ名の前にレベルアイコンを表示させます。 - レベルアイコンは、「モジュール>ポイントシステム」で選択できます。 + ポイントシステムを使用する場合、ユーザ名の前にレベルアイコンの表示が出来ます。 + レベルアイコンは、「モジュール>ポイントシステム」で選択出来ます。 This addon displays level icon in front of the user name when you are using the point system. diff --git a/addons/rainbow_link/conf/info.xml b/addons/rainbow_link/conf/info.xml index acf4ecdf5..01c984779 100644 --- a/addons/rainbow_link/conf/info.xml +++ b/addons/rainbow_link/conf/info.xml @@ -29,7 +29,7 @@ <a href="http://www.dynamicdrive.com" target="_blank">Dynamicdrive.com</a> tiene derecho de autor sobre rainbow.js - 「rainbow.js」をヘッダーに追加し、リンクされている文字列の色を虹色で表示します。この機能拡張の「 rainbow.js」は「<a href="http://www.dynamicdrive.com" target="_blank">Dynamicdrive.com</a>」に著作権があります。 + 「rainbow.js」をヘッダーに追加し、リンクが張られている文字列の色を虹色で表示します。この機能拡張の「 rainbow.js」は「<a href="http://www.dynamicdrive.com" target="_blank">Dynamicdrive.com</a>」に著作権があります。 Этот аддон добавляет файл с именем "rainbow.js" в заголовки HTML, и тогда связанный текс приобретает эффект смены цвета, подобно радуге или хамелеону. diff --git a/addons/resize_image/conf/info.xml b/addons/resize_image/conf/info.xml index 2b66623f1..acdca8094 100644 --- a/addons/resize_image/conf/info.xml +++ b/addons/resize_image/conf/info.xml @@ -12,7 +12,7 @@ 본문내에 삽입된 이미지의 크기를 본문크기에 맞게 하고 클릭시 원본을 보여주는 애드온입니다. - 本文内に挿入されたイメージのサイズを本文サイズに合わせてリーサイズし、クリックした時、オリジナルイメージを表示させます。 + 本文内に挿入されたイメージのサイズを本文の幅サイズに合わせてリーサイズし、クリックした時、オリジナルイメージを表示するアドオンです。 自动调整主题内容区内的图片大小,点击将显示原始大小的插件。 diff --git a/addons/wiki_link/wikilink.js b/addons/wiki_link/wikilink.js index 2406ef34f..d962a287c 100644 --- a/addons/wiki_link/wikilink.js +++ b/addons/wiki_link/wikilink.js @@ -30,6 +30,7 @@ function setText() { function addShortCutForWiki() { var iframe_obj = editorGetIFrame(1); + jQuery(iframe_obj.contentWindow.document).bind('keydown', "CTRL+SHIFT+SPACE", function(evt) { openWikiLinkDialog(); }); if(jQuery.os.Mac) { jQuery(iframe_obj.contentWindow.document).bind('keydown', "ALT+SPACE", function(evt) { openWikiLinkDialog(); }); @@ -38,7 +39,7 @@ function addShortCutForWiki() { jQuery(iframe_obj.contentWindow.document).bind('keydown', "CTRL+SPACE", function(evt) { openWikiLinkDialog(); }); } - jQuery(document).bind('keydown',"CTRL+ALT+SPACE", function(evt) {} ); + jQuery(document).bind('keydown',"CTRL+SHIFT+SPACE", function(evt) {} ); } xAddEventListener(window, 'load', addShortCutForWiki); diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 62f2df7ca..bf343451b 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -67,15 +67,51 @@ $this->context->lang = &$GLOBALS['lang']; $this->context->_COOKIE = $_COOKIE; - // 사용자의 쿠키 설정된 언어 타입 추출 - if($_COOKIE['lang_type']) $this->lang_type = $_COOKIE['lang_type']; + // Request Method 설정 + $this->_setRequestMethod(); + + // Request Argument 설정 + $this->_setXmlRpcArgument(); + $this->_setJSONRequestArgument(); + $this->_setRequestArgument(); + $this->_setUploadedArgument(); // 기본적인 DB정보 세팅 $this->_loadDBInfo(); + // 설치가 되어 있다면 가상 사이트 정보를 구함 + if(Context::isInstalled()) { + // site_module_info를 구함 + $oModuleModel = &getModel('module'); + $site_module_info = $oModuleModel->getDefaultMid(); + Context::set('site_module_info', $site_module_info); + + if($site_module_info->site_srl && isSiteID($site_module_info->vid)) Context::set('vid', $site_module_info->vid); + } + // 언어 파일 불러오기 $lang_supported = $this->loadLangSelected(); + // 사용자의 쿠키 설정된 언어 타입 추출 + if($_COOKIE['lang_type']) $this->lang_type = $_COOKIE['lang_type']; + + // 사용자 설정 언어 타입이 없으면 기본 언어타입으로 지정 + if(!$this->lang_type) { + // 가상 사이트라면 가상사이트의 언어타입으로 지정 + if($site_module_info && $site_module_info->default_language) $this->lang_type = $site_module_info->default_language; + else $this->lang_type = $this->db_info->lang_type; + } + + // 관리자 설정 언어값에 등록된 것이 아니라면 기본 언어로 변경 + if(!in_array($this->lang_type, array_keys($lang_supported))) $this->lang_type = $this->db_info->lang_type; + if(!$this->lang_type) $this->lang_type = "en"; + + Context::set('lang_supported', $lang_supported); + $this->setLangType($this->lang_type); + + // module의 언어파일 강제 로드 (언어 type에 맞춰서) + $this->loadLang(_XE_PATH_.'modules/module/lang'); + // 세션 핸들러 지정 $oSessionModel = &getModel('session'); $oSessionController = &getController('session'); @@ -89,37 +125,6 @@ ); session_start(); - // Request Method 설정 - $this->_setRequestMethod(); - - // Request Argument 설정 - $this->_setXmlRpcArgument(); - $this->_setJSONRequestArgument(); - $this->_setRequestArgument(); - $this->_setUploadedArgument(); - - // 설치가 되어 있다면 가상 사이트 정보를 구함 - if(Context::isInstalled()) { - // site_module_info를 구함 - $oModuleModel = &getModel('module'); - $site_module_info = $oModuleModel->getDefaultMid(); - Context::set('site_module_info', $site_module_info); - } - - // 사용자 설정 언어 타입이 없으면 기본 언어타입으로 지정 - if(!$this->lang_type) { - // 가상 사이트라면 가상사이트의 언어타입으로 지정 - if($site_module_info && $site_module_info->default_language) $this->db_info->lang_type = $site_module_info->default_language; - - // 언어 타입 지정 - $this->lang_type = $this->db_info->lang_type; - } - // 지정된 언어가 지원 언어에 속하지 않거나 없으면 영문으로 지정 - if(!in_array($this->lang_type, array_keys($lang_supported))) $this->lang_type = $this->db_info->lang_type; - if(!$this->lang_type) $this->lang_type = "en"; - - Context::set('lang_supported', $lang_supported); - $this->setLangType($this->lang_type); // 인증 관련 정보를 Context와 세션에 설정 if(Context::isInstalled()) { @@ -460,6 +465,7 @@ **/ function _loadLang($path) { global $lang; + if(!$this->lang_type) return; if(substr($path,-1)!='/') $path .= '/'; $filename = sprintf('%s%s.lang.php', $path, $this->lang_type); if(!file_exists($filename)) $filename = sprintf('%s%s.lang.php', $path, 'ko'); @@ -467,7 +473,7 @@ if(!is_array($this->loaded_lang_files)) $this->loaded_lang_files = array(); if(in_array($filename, $this->loaded_lang_files)) return; $this->loaded_lang_files[] = $filename; - include($filename); + if(file_exists($filename)) @include($filename); } /** @@ -762,18 +768,31 @@ **/ function _getUrl($num_args=0, $args_list=array(), $domain = null) { static $site_module_info = null; + if($domain) $is_site = true; + else $is_site = false; + if(is_null($site_module_info)) { $site_module_info = Context::get('site_module_info'); } + // SiteID 요청시 전처리 + if($domain && isSiteID($domain)) { + $vid = $domain; + $domain = ''; + } + + // SiteID가 요청되지 않았다면 현재 site_module_info에서 SiteID 판별 + if(!$vid && $site_module_info->domain && isSiteID($site_module_info->domain)) { + $vid = $site_module_info->domain; + } + if(!$domain) { - if($site_module_info->domain) $domain = $site_module_info->domain; + if($site_module_info->domain && !isSiteID($site_module_info->domain)) $domain = $site_module_info->domain; else { if($this->db_info->default_url) $domain = $this->db_info->default_url; else if(!$domain) $domain = Context::getRequestUri(); } } - $domain = preg_replace('/^(http|https):\/\//i','', trim($domain)); if(substr($domain,-1) != '/') $domain .= '/'; @@ -796,6 +815,7 @@ } $get_vars[$key] = $val; } + unset($get_vars['vid']); /* member module중의 쪽지함/친구 관리 기능이 communication 모듈로 이전하여 하위 호환성을 위한 act값 변경 */ if($get_vars['act'] == 'dispMemberFriend') $get_vars['act'] = 'dispCommunicationFriend'; @@ -808,9 +828,17 @@ else $path = $this->getRequestUri(RELEASE_SSL, $domain); $var_count = count($get_vars); - if(!$var_count) return $path; + if(!$var_count) { + if(!$is_site) return $path; + if($vid) { + if($this->allow_rewrite) $path .= $vid; + else $path .= '?vid='.$vid; + } + return $path; + } // rewrite모듈을 사용할때 getUrl()을 이용한 url 생성 + // 2009. 4. 8 mid, document_srl, site id, entry 를 제외하고는 rewrite rule 사용하지 않도록 변경 if($this->allow_rewrite) { if(count($get_vars)) foreach($get_vars as $key => $value) if(!isset($value) || $value === '') unset($get_vars[$key]); @@ -818,46 +846,23 @@ asort($var_keys); $target = implode('.',$var_keys); + if($vid) $rpath = $path.$vid .'/'; + else $rpath = $path; + switch($target) { case 'mid' : - return $path.$get_vars['mid']; + return $rpath.$get_vars['mid']; case 'document_srl' : - return $path.$get_vars['document_srl']; - case 'act.mid' : - return sprintf('%s%s/%s',$path,$get_vars['mid'],$get_vars['act']); + return $rpath.$get_vars['document_srl']; case 'document_srl.mid' : - return sprintf('%s%s/%s',$path,$get_vars['mid'],$get_vars['document_srl']); - case 'act.document_srl' : - return sprintf('%s%s/%s',$path,$get_vars['document_srl'],$get_vars['act']); - case 'mid.page' : - return sprintf('%s%s/page/%s',$path,$get_vars['mid'],$get_vars['page']); - case 'category.mid' : - return sprintf('%s%s/category/%s',$path,$get_vars['mid'],$get_vars['category']); - case 'act.document_srl.key' : - return sprintf('%s%s/%s/%s',$path,$get_vars['document_srl'],$get_vars['key'],$get_vars['act']); - case 'document_srl.mid.page' : - return sprintf('%s%s/%s/page/%s',$path,$get_vars['mid'],$get_vars['document_srl'],$get_vars['page']); - case 'category.mid.page' : - return sprintf('%s%s/category/%s/page/%s',$path,$get_vars['mid'],$get_vars['category'],$get_vars['page']); - case 'mid.search_keyword.search_target' : - switch($get_vars['search_target']) { - case 'tag' : - return sprintf('%s%s/tag/%s',$path,$get_vars['mid'],str_replace(' ','+',$get_vars['search_keyword'])); - case 'nick_name' : - return sprintf('%s%s/writer/%s',$path,$get_vars['mid'],str_replace(' ','+',$get_vars['search_keyword'])); - case 'regdate' : - if(strlen($get_vars['search_keyword'])==8) return sprintf('%s%s/%04d/%02d/%02d',$path,$get_vars['mid'],substr($get_vars['search_keyword'],0,4),substr($get_vars['search_keyword'],4,2),substr($get_vars['search_keyword'],6,2)); - elseif(strlen($get_vars['search_keyword'])==6) return sprintf('%s%s/%04d/%02d',$path,$get_vars['mid'],substr($get_vars['search_keyword'],0,4),substr($get_vars['search_keyword'],4,2)); - } - break; - case 'act.document_srl.mid' : - return sprintf('%s%s/%s/%s',$path,$get_vars['mid'], $get_vars['act'],$get_vars['document_srl']); + return sprintf('%s%s/%s',$rpath,$get_vars['mid'],$get_vars['document_srl']); case 'entry.mid' : - return sprintf('%s%s/entry/%s',$path,$get_vars['mid'],$get_vars['entry']); + return sprintf('%s%s/entry/%s',$rpath,$get_vars['mid'],$get_vars['entry']); } } // rewrite 모듈을 사용하지 않고 인자의 값이 2개 이상이거나 rewrite모듈을 위한 인자로 적당하지 않을 경우 + if($vid) $url = 'vid='.$vid; foreach($get_vars as $key => $val) { if(!isset($val)) continue; if(is_array($val) && count($val)) { @@ -868,7 +873,6 @@ $url .= ($url?'&':'').$key.'='.urlencode($val); } } - return $path.'?'.htmlspecialchars($url); } @@ -876,6 +880,9 @@ * @brief 요청이 들어온 URL에서 argument를 제거하여 return **/ function getRequestUri($ssl_mode = FOLLOW_REQUEST_SSL, $domain = null) { + // HTTP Request가 아니면 패스 + if(!isset($_SERVER['SERVER_PROTOCOL'])) return ; + static $url = array(); if(Context::get('_use_ssl') == "always") $ssl_mode = ENFORCE_SSL; @@ -905,14 +912,11 @@ } $url_info = parse_url('http://'.$target_url); - if($use_ssl) - { + if($use_ssl) { if(Context::get("_https_port") && Context::get("_https_port") != 443) { $url_info['port'] = Context::get("_https_port"); } - } - else - { + } else { if(Context::get("_http_port") && Context::get("_http_port") != 80) { $url_info['port'] = Context::get("_http_port"); } @@ -1361,10 +1365,8 @@ // body 내의 를 header로 이동 $content = preg_replace_callback('!!is', array($this,'moveStyleToHeader'), $content); - // 코드 변환 - $content = preg_replace('/<(img|br)([^>\/]*)(\/>|>)/i','<$1$2 />', $content); - // templateHandler의 이미지 경로로 인하여 생기는 절대경로 이미지등의 경로 중복 처리 + //$content = preg_replace('/<(img|input)([^>]*)src=(["|\']?)http:\/\/([^ ]+)http:\/\//is','<$1$2src=$3http://', $content); $content = preg_replace('/src=(["|\']?)http:\/\/([^ ]+)http:\/\//is','src=$1http://', $content); return $content; diff --git a/classes/db/DB.class.php b/classes/db/DB.class.php index 20d34ea8e..a4045e3e9 100644 --- a/classes/db/DB.class.php +++ b/classes/db/DB.class.php @@ -160,7 +160,7 @@ if(__DEBUG_DB_OUTPUT__ == 1) { $debug_file = _XE_PATH_."files/_debug_db_query.php"; - $buff = sprintf("%s\n",print_r($str,true)); + $buff = sprintf("%s\n",print_r($log,true)); if($display_line) $buff = "\n\n"; diff --git a/classes/db/DBCubrid.class.php b/classes/db/DBCubrid.class.php index 2cd93bfbb..ccf7fd7fe 100644 --- a/classes/db/DBCubrid.class.php +++ b/classes/db/DBCubrid.class.php @@ -37,6 +37,7 @@ 'text' => 'character varying(1073741823)', 'bigtext' => 'character varying(1073741823)', 'date' => 'character varying(14)', + 'float' => 'float', ); /** diff --git a/classes/db/DBFirebird.class.php b/classes/db/DBFirebird.class.php index ee59b71cb..0de2caac7 100644 --- a/classes/db/DBFirebird.class.php +++ b/classes/db/DBFirebird.class.php @@ -33,6 +33,7 @@ 'text' => 'BLOB SUB_TYPE TEXT SEGMENT SIZE 20', 'bigtext' => 'BLOB SUB_TYPE TEXT SEGMENT SIZE 20', 'date' => 'VARCHAR(14)', + 'float' => 'FLOAT', ); /** @@ -175,20 +176,17 @@ $as = $this->addDoubleQuotes($as); } - // 함수 사용시 + // 함수 사용시 + $tmpFunc1 = null; + $tmpFunc2 = null; if(($no1 = strpos($string,'('))!==false && ($no2 = strpos($string, ')'))!==false) { - $tmpString1 = substr($string, 0, $no1+1); - $tmpString2 = substr($string, $no1+1, $no2-$no1-1); - $tmpString3 = substr($string, $no2, strlen($string)-$no2+1); - - $tmpString2 = trim($tmpString2); - - if($tmpString2 != "*") $tmpString2 = $this->addDoubleQuotes($tmpString2); - - $string = $tmpString1.$tmpString2.$tmpString3; + $tmpFunc1 = substr($string, 0, $no1+1); + $tmpFunc2 = substr($string, $no2, strlen($string)-$no2+1); + $string = trim(substr($string, $no1+1, $no2-$no1-1)); } - // 테이블.필드 - else if(($no1 = strpos($string,'.'))!==false) { + + // 테이블.필드 + if(($no1 = strpos($string,'.'))!==false) { $tmpString1 = substr($string, 0, $no1); // table $tmpString2 = substr($string, $no1+1, strlen($string)-$no1+1); // field @@ -199,12 +197,14 @@ if($tmpString2 != "*") $tmpString2 = $this->addDoubleQuotes($tmpString2); $string = $tmpString1.".".$tmpString2; - } else { $string = $this->addDoubleQuotes($string); } + if($tmpFunc1 != null) $string = $tmpFunc1.$string; + if($tmpFunc2 != null) $string = $string.$tmpFunc2; + if($as !== false) $string = $string." as ".$as; return $string; } @@ -731,7 +731,10 @@ $pos = strpos($value, '+'); if($pos == 0) $pos = strpos($value, '-'); if($pos == 0) $pos = strpos($value, '*'); - if($pos == 0) $pos = strpos($value, '/'); + if($pos == 0) { + $pos = strpos($value, '/'); + if(substr_count($value, ".") > 1) $pos = 0; // value에 url주소가 들어가는경우 + } if($pos != 0) { $substr = substr($value, 0, $pos); @@ -794,7 +797,7 @@ foreach($left_tables as $key => $val) { $condition = $this->getLeftCondition($output->left_conditions[$key],$output->column_type,$output->tables); if($condition){ - $left_join[] = $val . ' "'.$this->prefix.$output->_tables[$key].'" as '.$key . ' on (' . $condition . ')'; + $left_join[] = $val . ' "'.$this->prefix.$output->_tables[$key].'" as "'.$key.'" on (' . $condition . ')'; } } diff --git a/classes/db/DBMysql.class.php b/classes/db/DBMysql.class.php index c2fcc1e7e..0269257ad 100644 --- a/classes/db/DBMysql.class.php +++ b/classes/db/DBMysql.class.php @@ -33,6 +33,7 @@ 'text' => 'text', 'bigtext' => 'longtext', 'date' => 'varchar(14)', + 'float' => 'float', ); /** diff --git a/classes/db/DBMysql_innodb.class.php b/classes/db/DBMysql_innodb.class.php index 9aa6097de..7abf4f409 100644 --- a/classes/db/DBMysql_innodb.class.php +++ b/classes/db/DBMysql_innodb.class.php @@ -33,6 +33,7 @@ 'text' => 'text', 'bigtext' => 'longtext', 'date' => 'varchar(14)', + 'float' => 'float', ); /** diff --git a/classes/db/DBPostgresql.class.php b/classes/db/DBPostgresql.class.php index 81089800b..129c1259c 100644 --- a/classes/db/DBPostgresql.class.php +++ b/classes/db/DBPostgresql.class.php @@ -30,9 +30,16 @@ class DBPostgresql extends DB * column_type은 schema/query xml에서 공통 선언된 type을 이용하기 때문에 * 각 DBMS에 맞게 replace 해주어야 한다 **/ - var $column_type = array('bignumber' => 'bigint', 'number' => 'integer', - 'varchar' => 'varchar', 'char' => 'char', 'text' => 'text', 'bigtext' => 'text', - 'date' => 'varchar(14)', ); + var $column_type = array( + 'bignumber' => 'bigint', + 'number' => 'integer', + 'varchar' => 'varchar', + 'char' => 'char', + 'text' => 'text', + 'bigtext' => 'text', + 'date' => 'varchar(14)', + 'float' => 'real', + ); /** * @brief constructor diff --git a/classes/db/DBSqlite2.class.php b/classes/db/DBSqlite2.class.php index 0a352a34c..5faf0246e 100644 --- a/classes/db/DBSqlite2.class.php +++ b/classes/db/DBSqlite2.class.php @@ -30,6 +30,7 @@ 'text' => 'TEXT', 'bigtext' => 'TEXT', 'date' => 'VARCHAR(14)', + 'float' => 'FLOAT', ); /** diff --git a/classes/db/DBSqlite3_pdo.class.php b/classes/db/DBSqlite3_pdo.class.php index 90ba376ff..81fa0bad6 100644 --- a/classes/db/DBSqlite3_pdo.class.php +++ b/classes/db/DBSqlite3_pdo.class.php @@ -36,6 +36,7 @@ 'text' => 'TEXT', 'bigtext' => 'TEXT', 'date' => 'VARCHAR(14)', + 'float' => 'REAL', ); /** diff --git a/classes/extravar/Extravar.class.php b/classes/extravar/Extravar.class.php index b29f40b17..a0fe201cd 100644 --- a/classes/extravar/Extravar.class.php +++ b/classes/extravar/Extravar.class.php @@ -4,19 +4,17 @@ * @author zero (zero@nzeo.com) * @brief 게시글, 회원등에서 사용하는 확장변수를 핸들링하는 클래스 * - * php4대비 class static 변수가 안됨으로 $GLOBALS['XE_EXTRAVARS']를 이용해서 같은 효과 냄 **/ class ExtraVar { var $module_srl = null; + var $keys = null; /** * @brief constructor **/ function &getInstance($module_srl) { - static $oInstance = array(); - if(!$oInstance[$module_srl]) $oInstance[$module_srl] = new ExtraVar($module_srl); - return $oInstance[$module_srl]; + return new ExtraVar($module_srl); } /** @@ -26,29 +24,16 @@ $this->module_srl = $module_srl; } - /** - * @brief 불필요한 등록을 피하기 위해서 특정 module_srl에 확장변수가 등록되었는지 확인 - **/ - function isSettedExtraVars() { - return isset($GLOBALS['XE_EXTRAVARS'][$this->module_srl]); - } - /** * @brief 확장변수 키를 등록 - * php4를 대비해 class static 멤버변수 대신 $GLOBAL 변수 사용 * @param module_srl, idx, name, type, default, desc, is_required, search, value **/ function setExtraVarKeys($extra_keys) { - if(!$this->isSettedExtraVars()) { - if(!$extra_keys || !count($extra_keys)) $GLOBALS['XE_EXTRAVARS'][$this->module_srl] = array(); - else { - if(!is_array($GLOBALS['XE_EXTRAVARS'][$this->module_srl])) $GLOBALS['XE_EXTRAVARS'][$this->module_srl] = array(); - foreach($extra_keys as $key => $val) { - $obj = null; - $obj = new ExtraItem($val->module_srl, $val->idx, $val->name, $val->type, $val->default, $val->desc, $val->is_required, $val->search, $val->value); - $GLOBALS['XE_EXTRAVARS'][$this->module_srl][$val->idx] = $obj; - } - } + if(!is_array($extra_keys) || !count($extra_keys)) return; + foreach($extra_keys as $key => $val) { + $obj = null; + $obj = new ExtraItem($val->module_srl, $val->idx, $val->name, $val->type, $val->default, $val->desc, $val->is_required, $val->search, $val->value, $val->eid); + $this->keys[$val->idx] = $obj; } } @@ -56,8 +41,7 @@ * @brief 확장변수 객체 배열 return **/ function getExtraVars() { - if(!$this->isSettedExtraVars()) return array(); - return $GLOBALS['XE_EXTRAVARS'][$this->module_srl]; + return $this->keys; } } @@ -76,11 +60,12 @@ var $is_required = 'N'; var $search = 'N'; var $value = null; + var $eid = ''; /** * @brief constructor **/ - function ExtraItem($module_srl, $idx, $name, $type = 'text', $default = null, $desc = '', $is_required = 'N', $search = 'N', $value = null) { + function ExtraItem($module_srl, $idx, $name, $type = 'text', $default = null, $desc = '', $is_required = 'N', $search = 'N', $value = null, $eid = '') { if(!$idx) return; $this->module_srl = $module_srl; $this->idx = $idx; @@ -91,6 +76,7 @@ $this->is_required = $is_required; $this->search = $search; $this->value = $value; + $this->eid = $eid; } /** @@ -108,7 +94,7 @@ if(!isset($value)) return; switch($type) { case 'homepage' : - if(!preg_match('/^([a-z]+):\/\//i',$value)) $value = 'http://'.$value; + if($value && !preg_match('/^([a-z]+):\/\//i',$value)) $value = 'http://'.$value; return htmlspecialchars($value); break; case 'tel' : diff --git a/classes/file/FileHandler.class.php b/classes/file/FileHandler.class.php index 830da21aa..148e0d951 100644 --- a/classes/file/FileHandler.class.php +++ b/classes/file/FileHandler.class.php @@ -266,51 +266,60 @@ return sprintf("%0.2fMB",$size / (1024*1024)); } + /** + * @brief 원격파일을 다운받아 return + **/ + function getRemoteResource($url, $body = null, $timeout = 3, $method = 'GET', $content_type = null, $headers = array()) { + set_include_path(_XE_PATH_."libs/PEAR"); + require_once('PEAR.php'); + require_once('HTTP/Request.php'); + + if(__PROXY_SERVER__!==null) { + $oRequest = new HTTP_Request(__PROXY_SERVER__); + $oRequest->setMethod('POST'); + $oRequest->_timeout = $timeout; + $oRequest->addPostData('arg', serialize(array('Destination'=>$url, 'method'=>$method, 'body'=>$body, 'content_type'=>$content_type, "headers"=>$headers))); + } else { + $oRequest = new HTTP_Request($url); + if(!$content_type) $oRequest->addHeader('Content-Type', 'text/html'); + else $oRequest->addHeader('Content-Type', $content_type); + if(count($headers)) { + foreach($headers as $key => $val) { + $oRequest->addHeader($key, $val); + } + } + $oRequest->setMethod($method); + if($body) $oRequest->setBody($body); + + $oRequest->_timeout = $timeout; + } + + $oResponse = $oRequest->sendRequest(); + if(PEAR::isError($oResponse)) return; + + $code = $oRequest->getResponseCode(); + $header = $oRequest->getResponseHeader(); + $body = $oRequest->getResponseBody(); + + if($code == 301) { + $url = $header['location']; + if($url) return FileHandler::getRemoteResource($url, $body, $timeout, $method, $content_type, $headers); + else return; + } + + if($code != 200) return; + + return $body; + } + /** * @brief 원격파일을 다운받아서 특정 위치에 저장 **/ - function getRemoteFile($url, $target_filename) { + function getRemoteFile($url, $target_filename, $body = null, $timeout = 3, $method = 'GET', $content_type = null, $headers = array()) { + $body = FileHandler::getRemoteResource($url, $body, $timeout, $method, $content_type, $headers); + if(!$body) return; $target_filename = FileHandler::getRealPath($target_filename); - - $url_info = parse_url($url); - - if(!$url_info['port']) $url_info['port'] = 80; - if(!$url_info['path']) $url_info['path'] = '/'; - - $fp = @fsockopen($url_info['host'], $url_info['port']); - if(!$fp) return; - - // 한글 파일이 있으면 한글파일 부분만 urlencode하여 처리 (iconv 필수) - /* - $path = $url_info['path']; - if(preg_match('/[\xEA-\xED][\x80-\xFF]{2}/', $path)&&function_exists('iconv')) { - $path_list = explode('/',$path); - $cnt = count($path_list); - $filename = $path_list[$cnt-1]; - $filename = urlencode(iconv("UTF-8","EUC-KR",$filename)); - $path_list[$cnt-1] = $filename; - $path = implode('/',$path_list); - $url_info['path'] = $path; - } - */ - - $header = sprintf("GET %s%s HTTP/1.0\r\nHost: %s\r\nAccept-Charset: utf-8;q=0.7,*;q=0.7\r\nReferer: %s://%s\r\nRequestUrl: %s\r\nConnection: Close\r\n\r\n", $url_info['path'], $url_info['query']?'?'.$url_info['query']:'', $url_info['host'], $url_info['scheme'], $url_info['host'], Context::getRequestUri()); - - @fwrite($fp, $header); - - $ft = @fopen($target_filename, 'w'); - if(!$ft) return; - - $begin = false; - while(!feof($fp)) { - $str = fgets($fp, 1024); - if($begin) @fwrite($ft, $str); - if(!trim($str)) $begin = true; - } - @fclose($ft); - @fclose($fp); - @chmod($target_filename, 0644); - + FileHandler::writeFile($target_filename, $body); return true; } diff --git a/classes/widget/WidgetHandler.class.php b/classes/widget/WidgetHandler.class.php index a0ac28a3b..199e71ea1 100644 --- a/classes/widget/WidgetHandler.class.php +++ b/classes/widget/WidgetHandler.class.php @@ -93,7 +93,7 @@ $object_vars = get_object_vars($args); if(count($object_vars)) { foreach($object_vars as $key => $val) { - if(in_array($key, array('body','class','style','widget_sequence','widget','widget_padding_left','widget_padding_top','widget_padding_bottom','widget_padding_right','widgetstyle','document_srl'))) continue; + if(in_array($key, array('widgetbox_content','body','class','style','widget_sequence','widget','widget_padding_left','widget_padding_top','widget_padding_bottom','widget_padding_right','widgetstyle','document_srl'))) continue; $args->{$key} = utf8RawUrlDecode($val); } } @@ -102,12 +102,16 @@ /** * 위젯이 widgetContent/ widgetBox가 아니라면 내용을 구함 **/ + $widget_content = ''; if($widget != 'widgetContent' && $widget != 'widgetBox') { if(!is_dir(sprintf('./widgets/%s/',$widget))) return; // 위젯의 내용을 담을 변수 $widget_content = WidgetHandler::getCache($widget, $args); } + if($widget == 'widgetBox'){ + $widgetbox_content = $args->widgetbox_content; + } /** * 관리자가 지정한 위젯의 style을 구함 @@ -155,12 +159,14 @@ // 위젯 박스일 경우 case 'widgetBox' : $widget_content_header = sprintf('
', $args->id, $style, $inner_style); + $widget_content_body = $widgetbox_content; + break; // 일반 위젯일 경우 default : $widget_content_header = sprintf('
',$args->id,$style); - $widget_content_body = sprintf('
%s
', $inner_style,$widget_content); + $widget_content_body = sprintf('
%s
', $inner_style,$widget_content); $widget_content_footer = '
'; break; } @@ -212,12 +218,23 @@ // 위젯 박스일 경우 case 'widgetBox' : + // args 정리 + $attribute = array(); + if($args) { + foreach($args as $key => $val) { + if(in_array($key, array('class','style','widget_padding_top','widget_padding_right','widget_padding_bottom','widget_padding_left','widget','widgetstyle','document_srl'))) continue; + if(strpos($val,'|@|')>0) $val = str_replace('|@|',',',$val); + $attribute[] = sprintf('%s="%s"', $key, str_replace('"','\"',$val)); + } + } + $widget_content_header = sprintf( - '
'. + '
'. '
'. '
'. - '
',$args->widgetstyle,$style, $widget_padding_top, $widget_padding_right, $widget_padding_bottom, $widget_padding_left,$inner_style); + '
',$args->widgetstyle,$style, $widget_padding_top, $widget_padding_right, $widget_padding_bottom, $widget_padding_left,implode(' ',$attribute),$inner_style); + $widget_content_body = $widgetbox_content; break; @@ -228,6 +245,7 @@ if($args) { foreach($args as $key => $val) { if(in_array($key, array('class','style','widget_padding_top','widget_padding_right','widget_padding_bottom','widget_padding_left','widget'))) continue; + if(strlen($val)==0) continue; if(strpos($val,'|@|')>0) $val = str_replace('|@|',',',$val); $attribute[] = sprintf('%s="%s"', $key, str_replace('"','\"',$val)); } @@ -251,7 +269,7 @@ // 위젯 스타일을 컴파일 한다. if($args->widgetstyle){ - $widget_content_body = WidgetHandler::complieWidgetStyle($args->widgetstyle, $widget_content_body, $args); + $widget_content_body = WidgetHandler::complieWidgetStyle($args->widgetstyle,$widget, $widget_content_body, $args, $include_info); } $output = $widget_content_header . $widget_content_body . $widget_content_footer; @@ -293,7 +311,7 @@ } - function complieWidgetStyle($widgetStyle,$widget_content_body, $args){ + function complieWidgetStyle($widgetStyle,$widget,$widget_content_body, $args, $include_info){ if(!$widgetStyle) return $widget_content_body; $oWidgetModel = &getModel('widget'); @@ -309,7 +327,12 @@ } } Context::set('widgetstyle_extar_var', $widgetstyle_extar_var); - Context::set('widget_content', $widget_content_body); + + if($include_info && $widget=='widgetBox'){ + Context::set('widget_content', '
'.$widget_content_body.'
'); + }else{ + Context::set('widget_content', $widget_content_body); + } // 컴파일 $widgetstyle_path = $oWidgetModel->getWidgetStylePath($widgetStyle); diff --git a/common/css/button.css b/common/css/button.css index 25336fc1c..2f0872ce1 100644 --- a/common/css/button.css +++ b/common/css/button.css @@ -32,7 +32,7 @@ span.button { padding:0; background-position:left top;} span.button, x:-moz-any-link{ font:0/23px Sans-serif; padding:11px 0;} /* Firefox 2 Fix */ span.button, x:-moz-any-link, x:default{ padding:0;} /* Firefox 2 Fix */ span.button button, -span.button input { height:23px; left:2px; *top:-1px; _top:0; padding:0 10px 0 8px; *padding:0 5px 0 3px; line-height:24px; background-position:right top; cursor:pointer;} +span.button input { height:23px; left:2px; /**top:-1px;*/ _top:0; padding:0 10px 0 8px; *padding:0 5px 0 3px; line-height:24px; background-position:right top; cursor:pointer;} /* Large Size */ span.button.large { background-position:left -30px;} span.button.large, x:-moz-any-link{ font:0/29px Sans-serif; padding:14px 0;} /* Firefox 2 Fix */ diff --git a/common/js/plugins/code_highlighter/css/SyntaxHighlighter.css b/common/js/plugins/code_highlighter/css/SyntaxHighlighter.css new file mode 100644 index 000000000..753510002 --- /dev/null +++ b/common/js/plugins/code_highlighter/css/SyntaxHighlighter.css @@ -0,0 +1,310 @@ +.dp-highlighter +{ + font-family: "Consolas", "Courier New", "Courier", "mono", "serif"; + font-size: 12px; + background-color: #E7E5DC; + width: 99%; + overflow: auto; + padding-top: 1px; /* adds a little border on top when controls are hidden */ +} + +/* clear styles */ +.dp-highlighter ol, +.dp-highlighter ol li, +.dp-highlighter ol li span +{ + margin: 0; + padding: 0; + border: none; +} + +.dp-highlighter a, +.dp-highlighter a:hover +{ + background: none; + border: none; + padding: 0; + margin: 0; +} + +.dp-highlighter .bar +{ + padding-left: 45px; +} + +.dp-highlighter.collapsed .bar, +.dp-highlighter.nogutter .bar +{ + padding-left: 0px; +} + +.dp-highlighter ol +{ + list-style: decimal; /* for ie */ + background-color: #fff; + margin: 0px 0px 1px 45px !important; /* 1px bottom margin seems to fix occasional Firefox scrolling */ + padding: 0px; + color: #5C5C5C; +} + +.dp-highlighter.nogutter ol, +.dp-highlighter.nogutter ol li +{ + list-style: none !important; + margin-left: 0px !important; +} + +.dp-highlighter ol li, +.dp-highlighter .columns div +{ + list-style: decimal; /* better look for others, override cascade from OL */ + list-style-position: outside !important; + background-color: #F8F8F8; + color: #5C5C5C; + padding: 0 3px 0 10px !important; + margin: 0 !important; + line-height: 14px; +} + +.dp-highlighter.nogutter ol li, +.dp-highlighter.nogutter .columns div +{ + border: 0; +} + +.dp-highlighter .columns +{ + background-color: #F8F8F8; + color: gray; + overflow: hidden; + width: 100%; +} + +.dp-highlighter .columns div +{ + padding-bottom: 5px; +} + +.dp-highlighter ol li.alt +{ + background-color: #FFF; + color: inherit; +} + +.dp-highlighter ol li span +{ + color: black; + background-color: inherit; +} + +/* Adjust some properties when collapsed */ + +.dp-highlighter.collapsed ol +{ + margin: 0px; +} + +.dp-highlighter.collapsed ol li +{ + display: none; +} + +/* Additional modifications when in print-view */ + +.dp-highlighter.printing +{ + border: none; +} + +.dp-highlighter.printing .tools +{ + display: none !important; +} + +.dp-highlighter.printing li +{ + display: list-item !important; +} + +/* Styles for the tools */ + +.dp-highlighter .tools +{ + padding: 3px 8px 3px 10px; + font: 9px Verdana, Geneva, Arial, Helvetica, sans-serif; + color: silver; + background-color: #f8f8f8; + padding-bottom: 10px; +} + +.dp-highlighter.nogutter .tools +{ + border-left: 0; +} + +.dp-highlighter.collapsed .tools +{ + border-bottom: 0; +} + +.dp-highlighter .tools a +{ + font-size: 9px; + color: #a0a0a0; + background-color: inherit; + text-decoration: none; + margin-right: 10px; +} + +.dp-highlighter .tools a:hover +{ + color: red; + background-color: inherit; + text-decoration: underline; +} + +/* About dialog styles */ + +.dp-about { background-color: #fff; color: #333; margin: 0px; padding: 0px; } +.dp-about table { width: 100%; height: 100%; font-size: 11px; font-family: Tahoma, Verdana, Arial, sans-serif !important; } +.dp-about td { padding: 10px; vertical-align: top; } +.dp-about .copy { border-bottom: 1px solid #ACA899; height: 95%; } +.dp-about .title { color: red; background-color: inherit; font-weight: bold; } +.dp-about .para { margin: 0 0 4px 0; } +.dp-about .footer { background-color: #ECEADB; color: #333; border-top: 1px solid #fff; text-align: right; } +.dp-about .close { font-size: 11px; font-family: Tahoma, Verdana, Arial, sans-serif !important; background-color: #ECEADB; color: #333; width: 60px; height: 22px; } + +/* Language specific styles */ + +.dp-highlighter .comment, +.dp-highlighter .comments { color: #008200; background-color: inherit; } +.dp-highlighter .string { color: #FF00FF; background-color: inherit; } +.dp-highlighter .keyword { color: #0000FF; background-color: inherit; } +.dp-highlighter .preprocessor { color: gray; background-color: inherit; } +.dp-highlighter .func { color: #FF0000; } +.dp-highlighter .vars { color: #008080; } + + +/* Language specific styles */ + +.dp-c {} +.dp-c .comment { color: green; } +.dp-c .string { color: blue; } +.dp-c .preprocessor { color: gray; } +.dp-c .keyword { color: blue; } +.dp-c .vars { color: #d00; } + +.dp-vb {} +.dp-vb .comment { color: green; } +.dp-vb .string { color: blue; } +.dp-vb .preprocessor { color: gray; } +.dp-vb .keyword { color: blue; } + +.dp-sql {} +.dp-sql .comment { color: green; } +.dp-sql .string { color: red; } +.dp-sql .keyword { color: blue; } +.dp-sql .func { color: #ff1493; } +.dp-sql .op { color: #808080; } + +.dp-xml {} +.dp-xml .cdata { color: #ff1493; } +.dp-xml .comments { color: green; } +.dp-xml .tag { margin: 0; padding: 0; background: none; font-weight: bold; color: blue; } +.dp-xml .tag-name { color: black; font-weight: bold; } +.dp-xml .attribute { color: red; } +.dp-xml .attribute-value { color: blue; } + +.dp-delphi {} +.dp-delphi .comment { color: #008200; font-style: italic; } +.dp-delphi .string { color: blue; } +.dp-delphi .number { color: blue; } +.dp-delphi .directive { color: #008284; } +.dp-delphi .keyword { font-weight: bold; color: navy; } +.dp-delphi .vars { color: #000; } + +.dp-py {} +.dp-py .comment { color: green; } +.dp-py .string { color: red; } +.dp-py .docstring { color: green; } +.dp-py .keyword { color: blue; font-weight: bold;} +.dp-py .builtins { color: #ff1493; } +.dp-py .magicmethods { color: #808080; } +.dp-py .exceptions { color: brown; } +.dp-py .types { color: brown; font-style: italic; } +.dp-py .commonlibs { color: #8A2BE2; font-style: italic; } + +.dp-rb {} +.dp-rb .comment { color: #c00; } +.dp-rb .string { color: #f0c; } +.dp-rb .symbol { color: #02b902; } +.dp-rb .keyword { color: #069; } +.dp-rb .variable { color: #6cf; } + +.dp-css {} +.dp-css .comment { color: green; } +.dp-css .string { color: red; } +.dp-css .value { color: red; } +.dp-css .keyword { color: blue; } +.dp-css .colors { color: darkred; } +.dp-css .vars { color: #d00; } + +.dp-j {} +.dp-j .comment { color: rgb(63,127,95); } +.dp-j .string { color: rgb(42,0,255); } +.dp-j .keyword { color: rgb(127,0,85); font-weight: bold } +.dp-j .annotation { color: #646464; } +.dp-j .number { color: #C00000; } + +.dp-cpp {} +.dp-cpp .comment { color: #e00; } +.dp-cpp .string { color: red; } +.dp-cpp .preprocessor { color: #CD00CD; font-weight: bold; } +.dp-cpp .keyword { color: #5697D9; font-weight: bold; } +.dp-cpp .datatypes { color: #2E8B57; font-weight: bold; } + +.dp-php { color: #800000; } +.dp-php .comment { color: #008000; } +.dp-php .keyword { color: #4B00FB; } +.dp-php .string { color: #FB00FB; } +.dp-php .func { color: #FF0000; } +.dp-php .vars { color: #008080; } +.dp-php .zbxe_funcs { color: #FF6820; } +.dp-php .zbxe_class { color: #FF6820; font-weight: bold; } + + +.dp-abap { color: #800000; } +.dp-abap .comment { color: #008000; } +.dp-abap .keyword { color: #4B00FB; } +.dp-abap .string { color: #FB00FB; } +.dp-abap .datatypes { color: #2E8B57; font-weight: bold; } + + +pre[name='code'] { + max-height: 300px; + font-size: 1.1em; + border: #666666 dotted 1px; + border-left: #22AAEE solid 5px; + padding: 5px; + overflow: auto; +} + + +.ch_infobox { + padding: 5px 0; + width: 99%; + background-color: #F8F8F8; + border-top: 1px solid #E7E5DC; +} + +.ch_infobox .file_path { + font-size: 0.9em; + font-weight: bold; + margin-left: 10px; +} + +.ch_infobox .description { + color: #AAA; + font-size: 0.9em; + margin-left: 10px; +} \ No newline at end of file diff --git a/common/js/plugins/code_highlighter/css/help.png b/common/js/plugins/code_highlighter/css/help.png new file mode 100644 index 000000000..5c870176d Binary files /dev/null and b/common/js/plugins/code_highlighter/css/help.png differ diff --git a/common/js/plugins/code_highlighter/css/magnifier.png b/common/js/plugins/code_highlighter/css/magnifier.png new file mode 100644 index 000000000..cf3d97f75 Binary files /dev/null and b/common/js/plugins/code_highlighter/css/magnifier.png differ diff --git a/common/js/plugins/code_highlighter/css/page_white_code.png b/common/js/plugins/code_highlighter/css/page_white_code.png new file mode 100644 index 000000000..0c76bd129 Binary files /dev/null and b/common/js/plugins/code_highlighter/css/page_white_code.png differ diff --git a/common/js/plugins/code_highlighter/css/page_white_copy.png b/common/js/plugins/code_highlighter/css/page_white_copy.png new file mode 100644 index 000000000..a9f31a278 Binary files /dev/null and b/common/js/plugins/code_highlighter/css/page_white_copy.png differ diff --git a/common/js/plugins/code_highlighter/css/printer.png b/common/js/plugins/code_highlighter/css/printer.png new file mode 100644 index 000000000..a350d1871 Binary files /dev/null and b/common/js/plugins/code_highlighter/css/printer.png differ diff --git a/common/js/plugins/code_highlighter/css/shCore.css b/common/js/plugins/code_highlighter/css/shCore.css new file mode 100644 index 000000000..74156dd24 --- /dev/null +++ b/common/js/plugins/code_highlighter/css/shCore.css @@ -0,0 +1,344 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +.syntaxhighlighter, +.syntaxhighlighter div, +.syntaxhighlighter code, +.syntaxhighlighter span, +.syntaxhighlighter .bold, +.syntaxhighlighter .italic, +.syntaxhighlighter .line, +.syntaxhighlighter .line .number, +.syntaxhighlighter .line .content, +.syntaxhighlighter .line .content .block, +.syntaxhighlighter .line .content .spaces, +.syntaxhighlighter .bar, +.syntaxhighlighter .ruler, +.syntaxhighlighter .toolbar, +.syntaxhighlighter .toolbar a, +.syntaxhighlighter .toolbar a:hover +{ + margin: 0; + padding: 0; + border: 0; + outline: 0; + background: none; + text-align: left; + float: none; + vertical-align: baseline; + position: static; + left: auto; + top: auto; + right: auto; + bottom: auto; + height: auto; + width: auto; + line-height: normal; + font-family: "Consolas", "Monaco", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; + font-weight: normal; + font-style: normal; + font-size: 100%; +} + +.syntaxhighlighter +{ + width: 100%; + margin: 1em 0 1em 0; + padding: 1px; /* adds a little border on top and bottom */ + position: relative; +} + +.syntaxhighlighter .bold { + font-weight: bold; +} + +.syntaxhighlighter .italic { + font-style: italic; +} + +.syntaxhighlighter .line .number +{ + float: left; + width: 3em; + padding-right: .3em; + text-align: right; + display: block; +} + +/* Disable numbers when no gutter option is set */ +.syntaxhighlighter.nogutter .line .number +{ + display: none; +} + +.syntaxhighlighter .line .content +{ + margin-left: 3.3em; + padding-left: .5em; + display: block; +} + +.syntaxhighlighter .line .content .block +{ + display: block; + padding-left: 1.5em; + text-indent: -1.5em; +} + +.syntaxhighlighter .line .content .spaces +{ + display: none; +} + +/* Disable border and margin on the lines when no gutter option is set */ +.syntaxhighlighter.nogutter .line .content +{ + margin-left: 0; + border-left: none; +} + +.syntaxhighlighter .bar +{ +} + +.syntaxhighlighter.collapsed .bar +{ + +} + +.syntaxhighlighter.nogutter .ruler +{ + margin-left: 0; + padding-left: 0; +} + +.syntaxhighlighter .ruler +{ + padding: 0 0 .5em .5em; + margin-left: 3.3em; + overflow: hidden; +} + +/* Adjust some properties when collapsed */ + +.syntaxhighlighter.collapsed .lines, +.syntaxhighlighter.collapsed .ruler +{ + display: none; +} + +/* Styles for the toolbar */ + +.syntaxhighlighter .toolbar +{ + position: absolute; + right: 0px; + top: 0px; + font-size: 1px; + padding: 8px 8px 8px 0; /* in px because images don't scale with ems */ +} + +.syntaxhighlighter.collapsed .toolbar +{ + font-size: 80%; + padding: .2em 0 .5em .5em; + position: static; +} + +.syntaxhighlighter .toolbar a.item, +.syntaxhighlighter .toolbar .item +{ + display: block; + float: left; + margin-left: 8px; + background-repeat: no-repeat; + overflow: hidden; + text-indent: -5000px; +} + +.syntaxhighlighter.collapsed .toolbar .item +{ + display: none; +} + +.syntaxhighlighter.collapsed .toolbar .item.expandSource +{ + background-image: url(magnifier.png); + display: inline; + text-indent: 0; + width: auto; + float: none; + height: 16px; + padding-left: 20px; +} + +.syntaxhighlighter .toolbar .item.viewSource +{ + background-image: url(page_white_code.png); +} + +.syntaxhighlighter .toolbar .item.printSource +{ + background-image: url(printer.png); +} + +.syntaxhighlighter .toolbar .item.copyToClipboard +{ + text-indent: 0; + background: none; + overflow: visible; +} + +.syntaxhighlighter .toolbar .item.about +{ + background-image: url(help.png); +} + +/** + * Print view. + * Colors are based on the default theme without background. + */ + +.syntaxhighlighter.printing, +.syntaxhighlighter.printing .line.alt1 .content, +.syntaxhighlighter.printing .line.alt2 .content, +.syntaxhighlighter.printing .line.highlighted .number, +.syntaxhighlighter.printing .line.highlighted.alt1 .content, +.syntaxhighlighter.printing .line.highlighted.alt2 .content, +.syntaxhighlighter.printing .line .content .block +{ + background: none; +} + +/* Gutter line numbers */ +.syntaxhighlighter.printing .line .number +{ + color: #bbb; +} + +/* Add border to the lines */ +.syntaxhighlighter.printing .line .content +{ + color: #000; +} + +/* Toolbar when visible */ +.syntaxhighlighter.printing .toolbar, +.syntaxhighlighter.printing .ruler +{ + display: none; +} + +.syntaxhighlighter.printing a +{ + text-decoration: none; +} + +.syntaxhighlighter.printing .plain, +.syntaxhighlighter.printing .plain a +{ + color: #000; +} + +.syntaxhighlighter.printing .comments, +.syntaxhighlighter.printing .comments a +{ + color: #008200; +} + +.syntaxhighlighter.printing .string, +.syntaxhighlighter.printing .string a +{ + color: blue; +} + +.syntaxhighlighter.printing .keyword +{ + color: #069; + font-weight: bold; +} + +.syntaxhighlighter.printing .preprocessor +{ + color: gray; +} + +.syntaxhighlighter.printing .variable +{ + color: #a70; +} + +.syntaxhighlighter.printing .value +{ + color: #090; +} + +.syntaxhighlighter.printing .functions +{ + color: #ff1493; +} + +.syntaxhighlighter.printing .constants +{ + color: #0066CC; +} + +.syntaxhighlighter.printing .script +{ + font-weight: bold; +} + +.syntaxhighlighter.printing .color1, +.syntaxhighlighter.printing .color1 a +{ + color: #808080; +} + +.syntaxhighlighter.printing .color2, +.syntaxhighlighter.printing .color2 a +{ + color: #ff1493; +} + +.syntaxhighlighter.printing .color3, +.syntaxhighlighter.printing .color3 a +{ + color: red; +} + +.ch_infobox { + padding: 5px 0; + width: 99%; + background-color: #F8F8F8; + border-top: 1px solid #E7E5DC; +} + +.ch_infobox .file_path { + font-size: 0.9em; + font-weight: bold; + margin-left: 10px; +} + +.ch_infobox .description { + color: #AAA; + font-size: 0.9em; + margin-left: 10px; +} \ No newline at end of file diff --git a/common/js/plugins/code_highlighter/css/shThemeDefault.css b/common/js/plugins/code_highlighter/css/shThemeDefault.css new file mode 100644 index 000000000..2068d2c85 --- /dev/null +++ b/common/js/plugins/code_highlighter/css/shThemeDefault.css @@ -0,0 +1,183 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +/************************************ + * Default Syntax Highlighter theme. + * + * Interface elements. + ************************************/ + +.syntaxhighlighter +{ + background-color: #E7E5DC; +} + +/* Highlighed line number */ +.syntaxhighlighter .line.highlighted .number +{ + background-color: #6CE26C; + color: black; +} + +/* Highlighed line */ +.syntaxhighlighter .line.highlighted.alt1 .content, +.syntaxhighlighter .line.highlighted.alt2 .content +{ + background-color: #6CE26C; +} + +/* Gutter line numbers */ +.syntaxhighlighter .line .number +{ + color: #5C5C5C; +} + +/* Add border to the lines */ +.syntaxhighlighter .line .content +{ + border-left: 3px solid #6CE26C; + color: #000; +} + +.syntaxhighlighter.printing .line .content +{ + border: 0; +} + +/* First line */ +.syntaxhighlighter .line.alt1 .content +{ + background-color: #fff; +} + +/* Second line */ +.syntaxhighlighter .line.alt2 .content +{ + background-color: #F8F8F8; +} + +.syntaxhighlighter .line .content .block +{ + background: url(wrapping.png) 0 1.1em no-repeat; +} + +.syntaxhighlighter .ruler +{ + color: silver; + background-color: #F8F8F8; + border-left: 3px solid #6CE26C; +} + +.syntaxhighlighter.nogutter .ruler +{ + border: 0; +} + +.syntaxhighlighter .toolbar +{ + background-color: #F8F8F8; + border: #E7E5DC solid 1px; +} + +.syntaxhighlighter .toolbar a +{ + color: #a0a0a0; +} + +.syntaxhighlighter .toolbar a:hover +{ + color: red; +} + +/************************************ + * Actual syntax highlighter colors. + ************************************/ +.syntaxhighlighter .plain, +.syntaxhighlighter .plain a +{ + color: #000; +} + +.syntaxhighlighter .comments, +.syntaxhighlighter .comments a +{ + color: #008200; +} + +.syntaxhighlighter .string, +.syntaxhighlighter .string a +{ + color: blue; +} + +.syntaxhighlighter .keyword +{ + color: #069; + font-weight: bold; +} + +.syntaxhighlighter .preprocessor +{ + color: gray; +} + +.syntaxhighlighter .variable +{ + color: #a70; +} + +.syntaxhighlighter .value +{ + color: #090; +} + +.syntaxhighlighter .functions +{ + color: #ff1493; +} + +.syntaxhighlighter .constants +{ + color: #0066CC; +} + +.syntaxhighlighter .script +{ + background-color: yellow !important; +} + +.syntaxhighlighter .color1, +.syntaxhighlighter .color1 a +{ + color: #808080; +} + +.syntaxhighlighter .color2, +.syntaxhighlighter .color2 a +{ + color: #ff1493; +} + +.syntaxhighlighter .color3, +.syntaxhighlighter .color3 a +{ + color: red; +} diff --git a/common/js/plugins/code_highlighter/css/shThemeDjango.css b/common/js/plugins/code_highlighter/css/shThemeDjango.css new file mode 100644 index 000000000..def5797e7 --- /dev/null +++ b/common/js/plugins/code_highlighter/css/shThemeDjango.css @@ -0,0 +1,184 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +/** + * Django SyntaxHighlighter theme + */ + +/************************************ + * Interface elements. + ************************************/ + +.syntaxhighlighter +{ + background-color: #0B2F20; +} + +/* Highlighed line number */ +.syntaxhighlighter .line.highlighted .number +{ + background-color: #336442; + color: #fff; +} + +/* Highlighed line */ +.syntaxhighlighter .line.highlighted .content +{ + background-color: #336442 !important; +} + +/* Gutter line numbers */ +.syntaxhighlighter .line .number +{ + color: #497958; +} + +/* Add border to the lines */ +.syntaxhighlighter .line .content +{ + border-left: 3px solid #41A83E; + color: #B9BDB6; +} + +.syntaxhighlighter.printing .line .content +{ + border: 0; +} + +/* First line */ +.syntaxhighlighter .line.alt1 .content +{ +} + +/* Second line */ +.syntaxhighlighter .line.alt2 .content +{ + background-color: #0a2b1d; +} + +.syntaxhighlighter .line .content .block +{ + background: url(wrapping.png) 0 1.1em no-repeat; +} + +.syntaxhighlighter .ruler +{ + color: #C4B14A; + background-color: #245032; + border-left: 3px solid #41A83E; +} + +.syntaxhighlighter.nogutter .ruler +{ + border: 0; +} + +.syntaxhighlighter .toolbar +{ + background-color: #245032; + border: #0B2F20 solid 1px; +} + +.syntaxhighlighter .toolbar a +{ + color: #C4B14A; +} + +.syntaxhighlighter .toolbar a:hover +{ + color: #FFE862; +} + +/************************************ + * Actual syntax highlighter colors. + ************************************/ +.syntaxhighlighter .plain, +.syntaxhighlighter .plain a +{ + color: #F8F8F8; +} + +.syntaxhighlighter .comments, +.syntaxhighlighter .comments a +{ + color: #336442; + font-style: italic; +} + +.syntaxhighlighter .string, +.syntaxhighlighter .string a +{ + color: #9DF39F; +} + +.syntaxhighlighter .keyword +{ + color: #96DD3B; + font-weight: bold !important; +} + +.syntaxhighlighter .preprocessor +{ + color: #91BB9E; +} + +.syntaxhighlighter .variable +{ + color: #FFAA3E; +} + +.syntaxhighlighter .value +{ + color: #F7E741; +} + +.syntaxhighlighter .functions +{ + color: #FFAA3E; +} + +.syntaxhighlighter .constants +{ + color: #E0E8FF; +} + +.syntaxhighlighter .script +{ + background-color: #497958 !important; +} + +.syntaxhighlighter .color1, +.syntaxhighlighter .color1 a +{ + color: #EB939A; +} + +.syntaxhighlighter .color2, +.syntaxhighlighter .color2 a +{ + color: #91BB9E; +} + +.syntaxhighlighter .color3, +.syntaxhighlighter .color3 a +{ + color: #EDEF7D; +} diff --git a/common/js/plugins/code_highlighter/css/shThemeEmacs.css b/common/js/plugins/code_highlighter/css/shThemeEmacs.css new file mode 100644 index 000000000..91a5c7697 --- /dev/null +++ b/common/js/plugins/code_highlighter/css/shThemeEmacs.css @@ -0,0 +1,183 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +/** + * Emacs SyntaxHighlighter theme based on theme by Joshua Emmons + * http://www.skia.net/ + */ + +/************************************ + * Interface elements. + ************************************/ + +.syntaxhighlighter +{ + background-color: #000000; +} + +/* Highlighed line number */ +.syntaxhighlighter .line.highlighted .number +{ + background-color: #435A5F; + color: #fff; +} + +/* Highlighed line */ +.syntaxhighlighter .line.highlighted .content +{ + background-color: #435A5F !important; +} + +/* Gutter line numbers */ +.syntaxhighlighter .line .number +{ + color: #D3D3D3; +} + +/* Add border to the lines */ +.syntaxhighlighter .line .content +{ + border-left: 3px solid #990000; + color: #B9BDB6; +} + +.syntaxhighlighter.printing .line .content +{ + border: 0; +} + +/* First line */ +.syntaxhighlighter .line.alt1 .content +{ +} + +/* Second line */ +.syntaxhighlighter .line.alt2 .content +{ + background-color: #0f0f0f; +} + +.syntaxhighlighter .line .content .block +{ + background: url(wrapping.png) 0 1.1em no-repeat; +} + +.syntaxhighlighter .ruler +{ + color: silver; + background-color: #000000; + border-left: 3px solid #990000; +} + +.syntaxhighlighter.nogutter .ruler +{ + border: 0; +} + +.syntaxhighlighter .toolbar +{ + background-color: #000000; + border: #000000 solid 1px; +} + +.syntaxhighlighter .toolbar a +{ + color: #646763; +} + +.syntaxhighlighter .toolbar a:hover +{ + color: #9CCFF4; +} + +/************************************ + * Actual syntax highlighter colors. + ************************************/ +.syntaxhighlighter .plain, +.syntaxhighlighter .plain a +{ + color: #D3D3D3; +} + +.syntaxhighlighter .comments, +.syntaxhighlighter .comments a +{ + color: #FF7D27; +} + +.syntaxhighlighter .string, +.syntaxhighlighter .string a +{ + color: #FF9E7B; +} + +.syntaxhighlighter .keyword +{ + color: #00FFFF; +} + +.syntaxhighlighter .preprocessor +{ + color: #AEC4DE; +} + +.syntaxhighlighter .variable +{ + color: #FFAA3E; +} + +.syntaxhighlighter .value +{ + color: #090; +} + +.syntaxhighlighter .functions +{ + color: #81CEF9; +} + +.syntaxhighlighter .constants +{ + color: #FF9E7B; +} + +.syntaxhighlighter .script +{ + background-color: #990000 !important; +} + +.syntaxhighlighter .color1, +.syntaxhighlighter .color1 a +{ + color: #EBDB8D; +} + +.syntaxhighlighter .color2, +.syntaxhighlighter .color2 a +{ + color: #FF7D27; +} + +.syntaxhighlighter .color3, +.syntaxhighlighter .color3 a +{ + color: #AEC4DE; +} diff --git a/common/js/plugins/code_highlighter/css/shThemeFadeToGrey.css b/common/js/plugins/code_highlighter/css/shThemeFadeToGrey.css new file mode 100644 index 000000000..8f7160967 --- /dev/null +++ b/common/js/plugins/code_highlighter/css/shThemeFadeToGrey.css @@ -0,0 +1,184 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +/** + * Fade to Grey SyntaxHighlighter theme based on theme by Brasten Sager + * http://www.ibrasten.com/ + */ + +/************************************ + * Interface elements. + ************************************/ + +.syntaxhighlighter +{ + background-color: #121212; +} + +/* Highlighed line number */ +.syntaxhighlighter .line.highlighted .number +{ + background-color: #3A3A00; + color: #fff; +} + +/* Highlighed line */ +.syntaxhighlighter .line.highlighted .content +{ + background-color: #3A3A00 !important; +} + +/* Gutter line numbers */ +.syntaxhighlighter .line .number +{ + color: #C3C3C3; +} + +/* Add border to the lines */ +.syntaxhighlighter .line .content +{ + border-left: 3px solid #3185B9; + color: #B9BDB6; +} + +.syntaxhighlighter.printing .line .content +{ + border: 0; +} + +/* First line */ +.syntaxhighlighter .line.alt1 .content +{ +} + +/* Second line */ +.syntaxhighlighter .line.alt2 .content +{ + background-color: #000000; +} + +.syntaxhighlighter .line .content .block +{ + background: url(wrapping.png) 0 1.1em no-repeat; +} + +.syntaxhighlighter .ruler +{ + color: silver; + border-left: 3px solid #3185B9; +} + +.syntaxhighlighter.nogutter .ruler +{ + border: 0; +} + +.syntaxhighlighter .toolbar +{ + background-color: #000000; + border: #000000 solid 1px; +} + +.syntaxhighlighter .toolbar a +{ + color: #808080; +} + +.syntaxhighlighter .toolbar a:hover +{ + color: #96DAFF; +} + +/************************************ + * Actual syntax highlighter colors. + ************************************/ +.syntaxhighlighter .plain, +.syntaxhighlighter .plain a +{ + color: #FFFFFF; +} + +.syntaxhighlighter .comments, +.syntaxhighlighter .comments a +{ + color: #696854; +} + +.syntaxhighlighter .string, +.syntaxhighlighter .string a +{ + color: #E3E658; +} + +.syntaxhighlighter .keyword +{ + color: #D01D33; +} + +.syntaxhighlighter .preprocessor +{ + color: #435A5F; +} + +.syntaxhighlighter .variable +{ + color: #898989; +} + +.syntaxhighlighter .value +{ + color: #090; +} + +.syntaxhighlighter .functions +{ + color: #AAAAAA; + font-weight: bold !important; +} + +.syntaxhighlighter .constants +{ + color: #96DAFF; +} + +.syntaxhighlighter .script +{ + background-color: #C3C3C3 !important; + color: #000; +} + +.syntaxhighlighter .color1, +.syntaxhighlighter .color1 a +{ + color: #FFC074; +} + +.syntaxhighlighter .color2, +.syntaxhighlighter .color2 a +{ + color: #4A8CDB; +} + +.syntaxhighlighter .color3, +.syntaxhighlighter .color3 a +{ + color: #96DAFF; +} diff --git a/common/js/plugins/code_highlighter/css/shThemeMidnight.css b/common/js/plugins/code_highlighter/css/shThemeMidnight.css new file mode 100644 index 000000000..8171ca3e8 --- /dev/null +++ b/common/js/plugins/code_highlighter/css/shThemeMidnight.css @@ -0,0 +1,183 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +/** + * Midnight SyntaxHighlighter theme based on theme by J.D. Myers + * http://webdesign.lsnjd.com/ + */ + +/************************************ + * Interface elements. + ************************************/ + +.syntaxhighlighter +{ + background-color: #0F192A; +} + +/* Highlighed line number */ +.syntaxhighlighter .line.highlighted .number +{ + background-color: #253E5A; + color: #fff; +} + +/* Highlighed line */ +.syntaxhighlighter .line.highlighted .content +{ + background-color: #253E5A !important; +} + +/* Gutter line numbers */ +.syntaxhighlighter .line .number +{ + color: #38566F; +} + +/* Add border to the lines */ +.syntaxhighlighter .line .content +{ + border-left: 3px solid #435A5F; + color: #B9BDB6; +} + +.syntaxhighlighter.printing .line .content +{ + border: 0; +} + +/* First line */ +.syntaxhighlighter .line.alt1 .content +{ + background-color: #0F192A; +} + +/* Second line */ +.syntaxhighlighter .line.alt2 .content +{ + background-color: #0F192A; +} + +.syntaxhighlighter .line .content .block +{ + background: url(wrapping.png) 0 1.1em no-repeat; +} + +.syntaxhighlighter .ruler +{ + color: #38566F; + background-color: #0F192A; + border-left: 3px solid #435A5F; +} + +.syntaxhighlighter.nogutter .ruler +{ + border: 0; +} + +.syntaxhighlighter .toolbar +{ + background-color: #0F192A; +} + +.syntaxhighlighter .toolbar a +{ + color: #38566F; +} + +.syntaxhighlighter .toolbar a:hover +{ + color: #8AA6C1; +} + +/************************************ + * Actual syntax highlighter colors. + ************************************/ +.syntaxhighlighter .plain, +.syntaxhighlighter .plain a +{ + color: #D1EDFF; +} + +.syntaxhighlighter .comments, +.syntaxhighlighter .comments a +{ + color: #428BDD; +} + +.syntaxhighlighter .string, +.syntaxhighlighter .string a +{ + color: #1DC116; +} + +.syntaxhighlighter .keyword +{ + color: #B43D3D; +} + +.syntaxhighlighter .preprocessor +{ + color: #8AA6C1; +} + +.syntaxhighlighter .variable +{ + color: #FFAA3E; +} + +.syntaxhighlighter .value +{ + color: #F7E741; +} + +.syntaxhighlighter .functions +{ + color: #FFAA3E; +} + +.syntaxhighlighter .constants +{ + color: #E0E8FF; +} + +.syntaxhighlighter .script +{ + background-color: #404040 !important; +} + +.syntaxhighlighter .color1, +.syntaxhighlighter .color1 a +{ + color: #F8BB00; +} + +.syntaxhighlighter .color2, +.syntaxhighlighter .color2 a +{ + color: #FFFFFF; +} + +.syntaxhighlighter .color3, +.syntaxhighlighter .color3 a +{ + color: #FFAA3E; +} diff --git a/common/js/plugins/code_highlighter/css/shThemeRDark.css b/common/js/plugins/code_highlighter/css/shThemeRDark.css new file mode 100644 index 000000000..a390c2a68 --- /dev/null +++ b/common/js/plugins/code_highlighter/css/shThemeRDark.css @@ -0,0 +1,183 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +/** + * RDark SyntaxHighlighter theme based on theme by Radu Dineiu + * http://www.vim.org/scripts/script.php?script_id=1732 + */ + +/************************************ + * Interface elements. + ************************************/ + +.syntaxhighlighter +{ + background-color: #1B2426; +} + +/* Highlighed line number */ +.syntaxhighlighter .line.highlighted .number +{ + background-color: #435A5F; + color: #fff; +} + +/* Highlighed line */ +.syntaxhighlighter .line.highlighted .content +{ + background-color: #435A5F !important; +} + +/* Gutter line numbers */ +.syntaxhighlighter .line .number +{ + color: #B9BDB6; +} + +/* Add border to the lines */ +.syntaxhighlighter .line .content +{ + border-left: 3px solid #435A5F; + color: #B9BDB6; +} + +.syntaxhighlighter.printing .line .content +{ + border: 0; +} + +/* First line */ +.syntaxhighlighter .line.alt1 .content +{ + background-color: #1B2426; +} + +/* Second line */ +.syntaxhighlighter .line.alt2 .content +{ + background-color: #1B2426; +} + +.syntaxhighlighter .line .content .block +{ + background: url(wrapping.png) 0 1.1em no-repeat; +} + +.syntaxhighlighter .ruler +{ + color: silver; + background-color: #1B2426; + border-left: 3px solid #435A5F; +} + +.syntaxhighlighter.nogutter .ruler +{ + border: 0; +} + +.syntaxhighlighter .toolbar +{ + background-color: #1B2426; +} + +.syntaxhighlighter .toolbar a +{ + color: #646763; +} + +.syntaxhighlighter .toolbar a:hover +{ + color: #E0E8FF; +} + +/************************************ + * Actual syntax highlighter colors. + ************************************/ +.syntaxhighlighter .plain, +.syntaxhighlighter .plain a +{ + color: #B9BDB6; +} + +.syntaxhighlighter .comments, +.syntaxhighlighter .comments a +{ + color: #878A85; +} + +.syntaxhighlighter .string, +.syntaxhighlighter .string a +{ + color: #5CE638; +} + +.syntaxhighlighter .keyword +{ + color: #5BA1CF; +} + +.syntaxhighlighter .preprocessor +{ + color: #435A5F; +} + +.syntaxhighlighter .variable +{ + color: #FFAA3E; +} + +.syntaxhighlighter .value +{ + color: #090; +} + +.syntaxhighlighter .functions +{ + color: #FFAA3E; +} + +.syntaxhighlighter .constants +{ + color: #E0E8FF; +} + +.syntaxhighlighter .script +{ + background-color: #435A5F !important; +} + +.syntaxhighlighter .color1, +.syntaxhighlighter .color1 a +{ + color: #E0E8FF; +} + +.syntaxhighlighter .color2, +.syntaxhighlighter .color2 a +{ + color: #FFFFFF; +} + +.syntaxhighlighter .color3, +.syntaxhighlighter .color3 a +{ + color: #FFAA3E; +} diff --git a/common/js/plugins/code_highlighter/css/wrapping.png b/common/js/plugins/code_highlighter/css/wrapping.png new file mode 100644 index 000000000..6972c5e59 Binary files /dev/null and b/common/js/plugins/code_highlighter/css/wrapping.png differ diff --git a/common/js/plugins/code_highlighter/plugin.load b/common/js/plugins/code_highlighter/plugin.load new file mode 100644 index 000000000..b49fb75b6 --- /dev/null +++ b/common/js/plugins/code_highlighter/plugin.load @@ -0,0 +1,3 @@ +script/shCore.js +css/shCore.css +css/shThemeDefault.css diff --git a/common/js/plugins/code_highlighter/script/clipboard.swf b/common/js/plugins/code_highlighter/script/clipboard.swf new file mode 100644 index 000000000..1b4d90a0f Binary files /dev/null and b/common/js/plugins/code_highlighter/script/clipboard.swf differ diff --git a/common/js/plugins/code_highlighter/script/shBrushAbap.js b/common/js/plugins/code_highlighter/script/shBrushAbap.js new file mode 100644 index 000000000..eef3f0d73 --- /dev/null +++ b/common/js/plugins/code_highlighter/script/shBrushAbap.js @@ -0,0 +1,26 @@ +dp.sh.Brushes.Abap = function() +{ + var datatypes = + 'ACCP CHAR CLNT CUKY CURR DATS DEC FLTP INT1 INT2 INT4 LANG LCHR LRAW NUMC PREC QUAN RAW RAWSTRING SSTRING STRING TIMS UNIT'; + + var keywords = + 'IF RETURN WHILE CASE DEFAULT DO ELSE FOR ENDIF ELSEIF EQ NOT AND DATA TYPES SELETION-SCREEN PARAMETERS ' + + 'FIELD-SYMBOLS EXTERN INLINE REPORT WRITE APPEND SELECT ENDSELECT CALL METHOD CALL FUNCTION LOOP ENDLOOP ' + + 'RAISE READ TABLE CONCATENATE SPLIT SHIFT CONDENSE DESCRIBE CLEAR ENDFUNCTION ASSIGN CREATE DATA TRANSLATE ' + + 'CONTINUE START-OF-SELECTION AT SELECTION-SCREEN MODIFY CALL SCREEN CREATE OBJECT PERFORM FORM ENDFORM ' + + 'REUSE_ALV_BLOCK_LIST_INIT ZBCIALV INCLUDE TYPE REF TO TYPE BEGIN\SOF END\SOF LIKE INTO FROM WHERE ORDER BY ' + + 'WITH KEY INTO STRING SEPARATED BY EXPORTING IMPORTING TO UPPER CASE TO EXCEPTIONS TABLES USING CHANGING'; + + this.regexList = [ + { regex: new RegExp('^\\*.*$', 'gm'), css: 'comment' }, // one line comments + { regex: new RegExp('\\".*$', 'gm'), css: 'comment' }, // one line comments + { regex: dp.sh.RegexLib.SingleQuotedString, css: 'string' }, // strings + { regex: new RegExp(this.GetKeywords(datatypes), 'gm'), css: 'datatypes' }, + { regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' } + ]; + + this.CssClass = 'dp-abap'; +} + +dp.sh.Brushes.Abap.prototype = new dp.sh.Highlighter(); +dp.sh.Brushes.Abap.Aliases = ['abap', 'Abap']; \ No newline at end of file diff --git a/common/js/plugins/code_highlighter/script/shBrushBash.js b/common/js/plugins/code_highlighter/script/shBrushBash.js new file mode 100644 index 000000000..8bc123815 --- /dev/null +++ b/common/js/plugins/code_highlighter/script/shBrushBash.js @@ -0,0 +1,51 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +SyntaxHighlighter.brushes.Bash = function() +{ + var keywords = 'if fi then elif else for do done until while break continue case function return in eq ne gt lt ge le'; + var commands = 'alias apropos awk bash bc bg builtin bzip2 cal cat cd cfdisk chgrp chmod chown chroot' + + 'cksum clear cmp comm command cp cron crontab csplit cut date dc dd ddrescue declare df ' + + 'diff diff3 dig dir dircolors dirname dirs du echo egrep eject enable env ethtool eval ' + + 'exec exit expand export expr false fdformat fdisk fg fgrep file find fmt fold format ' + + 'free fsck ftp gawk getopts grep groups gzip hash head history hostname id ifconfig ' + + 'import install join kill less let ln local locate logname logout look lpc lpr lprint ' + + 'lprintd lprintq lprm ls lsof make man mkdir mkfifo mkisofs mknod more mount mtools ' + + 'mv netstat nice nl nohup nslookup open op passwd paste pathchk ping popd pr printcap ' + + 'printenv printf ps pushd pwd quota quotacheck quotactl ram rcp read readonly renice ' + + 'remsync rm rmdir rsync screen scp sdiff sed select seq set sftp shift shopt shutdown ' + + 'sleep sort source split ssh strace su sudo sum symlink sync tail tar tee test time ' + + 'times touch top traceroute trap tr true tsort tty type ulimit umask umount unalias ' + + 'uname unexpand uniq units unset unshar useradd usermod users uuencode uudecode v vdir ' + + 'vi watch wc whereis which who whoami Wget xargs yes' + ; + + this.regexList = [ + { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments + { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings + { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords + { regex: new RegExp(this.getKeywords(commands), 'gm'), css: 'functions' } // commands + ]; +} + +SyntaxHighlighter.brushes.Bash.prototype = new SyntaxHighlighter.Highlighter(); +SyntaxHighlighter.brushes.Bash.aliases = ['bash', 'shell']; + diff --git a/common/js/plugins/code_highlighter/script/shBrushCSharp.js b/common/js/plugins/code_highlighter/script/shBrushCSharp.js new file mode 100644 index 000000000..f90422d8c --- /dev/null +++ b/common/js/plugins/code_highlighter/script/shBrushCSharp.js @@ -0,0 +1,56 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +SyntaxHighlighter.brushes.CSharp = function() +{ + var keywords = 'abstract as base bool break byte case catch char checked class const ' + + 'continue decimal default delegate do double else enum event explicit ' + + 'extern false finally fixed float for foreach get goto if implicit in int ' + + 'interface internal is lock long namespace new null object operator out ' + + 'override params private protected public readonly ref return sbyte sealed set ' + + 'short sizeof stackalloc static string struct switch this throw true try ' + + 'typeof uint ulong unchecked unsafe ushort using virtual void while'; + + function fixComments(match, regexInfo) + { + var css = (match[0].indexOf("///") == 0) + ? 'color1' + : 'comments' + ; + + return [new SyntaxHighlighter.Match(match[0], match.index, css)]; + } + + this.regexList = [ + { regex: SyntaxHighlighter.regexLib.singleLineCComments, func : fixComments }, // one line comments + { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments + { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings + { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings + { regex: /^\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion + { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // c# keyword + ]; + + this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags); +}; + +SyntaxHighlighter.brushes.CSharp.prototype = new SyntaxHighlighter.Highlighter(); +SyntaxHighlighter.brushes.CSharp.aliases = ['c#', 'c-sharp', 'csharp']; + diff --git a/common/js/plugins/code_highlighter/script/shBrushCpp.js b/common/js/plugins/code_highlighter/script/shBrushCpp.js new file mode 100644 index 000000000..f6b4be666 --- /dev/null +++ b/common/js/plugins/code_highlighter/script/shBrushCpp.js @@ -0,0 +1,91 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +SyntaxHighlighter.brushes.Cpp = function() +{ + // Copyright 2006 Shin, YoungJin + + var datatypes = 'ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR ' + + 'DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH ' + + 'HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP ' + + 'HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY ' + + 'HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT ' + + 'HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE ' + + 'LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF ' + + 'LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR ' + + 'LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR ' + + 'PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT ' + + 'PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 ' + + 'POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR ' + + 'PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 ' + + 'PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT ' + + 'SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ' + + 'ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM ' + + 'char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t ' + + 'clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS ' + + 'FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t ' + + '__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t ' + + 'jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler ' + + 'sig_atomic_t size_t _stat __stat64 _stati64 terminate_function ' + + 'time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf ' + + 'va_list wchar_t wctrans_t wctype_t wint_t signed'; + + var keywords = 'break case catch class const __finally __exception __try ' + + 'const_cast continue private public protected __declspec ' + + 'default delete deprecated dllexport dllimport do dynamic_cast ' + + 'else enum explicit extern if for friend goto inline ' + + 'mutable naked namespace new noinline noreturn nothrow ' + + 'register reinterpret_cast return selectany ' + + 'sizeof static static_cast struct switch template this ' + + 'thread throw true false try typedef typeid typename union ' + + 'using uuid virtual void volatile whcar_t while'; + + var functions = 'assert isalnum isalpha iscntrl isdigit isgraph islower isprint' + + 'ispunct isspace isupper isxdigit tolower toupper errno localeconv ' + + 'setlocale acos asin atan atan2 ceil cos cosh exp fabs floor fmod ' + + 'frexp ldexp log log10 modf pow sin sinh sqrt tan tanh jmp_buf ' + + 'longjmp setjmp raise signal sig_atomic_t va_arg va_end va_start ' + + 'clearerr fclose feof ferror fflush fgetc fgetpos fgets fopen ' + + 'fprintf fputc fputs fread freopen fscanf fseek fsetpos ftell ' + + 'fwrite getc getchar gets perror printf putc putchar puts remove ' + + 'rename rewind scanf setbuf setvbuf sprintf sscanf tmpfile tmpnam ' + + 'ungetc vfprintf vprintf vsprintf abort abs atexit atof atoi atol ' + + 'bsearch calloc div exit free getenv labs ldiv malloc mblen mbstowcs ' + + 'mbtowc qsort rand realloc srand strtod strtol strtoul system ' + + 'wcstombs wctomb memchr memcmp memcpy memmove memset strcat strchr ' + + 'strcmp strcoll strcpy strcspn strerror strlen strncat strncmp ' + + 'strncpy strpbrk strrchr strspn strstr strtok strxfrm asctime ' + + 'clock ctime difftime gmtime localtime mktime strftime time'; + + this.regexList = [ + { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments + { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments + { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings + { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings + { regex: /^ *#.*/gm, css: 'preprocessor' }, + { regex: new RegExp(this.getKeywords(datatypes), 'gm'), css: 'color1 bold' }, + { regex: new RegExp(this.getKeywords(functions), 'gm'), css: 'functions bold' }, + { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword bold' } + ]; +}; + +SyntaxHighlighter.brushes.Cpp.prototype = new SyntaxHighlighter.Highlighter(); +SyntaxHighlighter.brushes.Cpp.aliases = ['cpp', 'c']; diff --git a/common/js/plugins/code_highlighter/script/shBrushCss.js b/common/js/plugins/code_highlighter/script/shBrushCss.js new file mode 100644 index 000000000..f0925cc1c --- /dev/null +++ b/common/js/plugins/code_highlighter/script/shBrushCss.js @@ -0,0 +1,85 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +SyntaxHighlighter.brushes.CSS = function() +{ + function getKeywordsCSS(str) + { + return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b'; + }; + + function getValuesCSS(str) + { + return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b'; + }; + + var keywords = 'ascent azimuth background-attachment background-color background-image background-position ' + + 'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top ' + + 'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color ' + + 'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width ' + + 'border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color ' + + 'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display ' + + 'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font ' + + 'height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top ' + + 'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans ' + + 'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page ' + + 'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position ' + + 'quotes right richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress ' + + 'table-layout text-align top text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em ' + + 'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index'; + + var values = 'above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+ + 'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+ + 'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double '+ + 'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+ + 'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+ + 'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+ + 'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+ + 'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+ + 'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+ + 'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+ + 'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize '+ + 'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+ + 'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+ + 'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow'; + + var fonts = '[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif [cC]ourier mono sans serif'; + + this.regexList = [ + { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments + { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings + { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings + { regex: /\#[a-fA-F0-9]{3,6}/g, css: 'value' }, // html colors + { regex: /(-?\d+)(\.\d+)?(px|em|pt|\:|\%|)/g, css: 'value' }, // sizes + { regex: /!important/g, css: 'color3' }, // !important + { regex: new RegExp(getKeywordsCSS(keywords), 'gm'), css: 'keyword' }, // keywords + { regex: new RegExp(getValuesCSS(values), 'g'), css: 'value' }, // values + { regex: new RegExp(this.getKeywords(fonts), 'g'), css: 'color1' } // fonts + ]; + + this.forHtmlScript({ + left: /(<|<)\s*style.*?(>|>)/gi, + right: /(<|<)\/\s*style\s*(>|>)/gi + }); +}; + +SyntaxHighlighter.brushes.CSS.prototype = new SyntaxHighlighter.Highlighter(); +SyntaxHighlighter.brushes.CSS.aliases = ['css']; diff --git a/common/js/plugins/code_highlighter/script/shBrushDelphi.js b/common/js/plugins/code_highlighter/script/shBrushDelphi.js new file mode 100644 index 000000000..beb0a7dc2 --- /dev/null +++ b/common/js/plugins/code_highlighter/script/shBrushDelphi.js @@ -0,0 +1,49 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +SyntaxHighlighter.brushes.Delphi = function() +{ + var keywords = 'abs addr and ansichar ansistring array as asm begin boolean byte cardinal ' + + 'case char class comp const constructor currency destructor div do double ' + + 'downto else end except exports extended false file finalization finally ' + + 'for function goto if implementation in inherited int64 initialization ' + + 'integer interface is label library longint longword mod nil not object ' + + 'of on or packed pansichar pansistring pchar pcurrency pdatetime pextended ' + + 'pint64 pointer private procedure program property pshortstring pstring ' + + 'pvariant pwidechar pwidestring protected public published raise real real48 ' + + 'record repeat set shl shortint shortstring shr single smallint string then ' + + 'threadvar to true try type unit until uses val var varirnt while widechar ' + + 'widestring with word write writeln xor'; + + this.regexList = [ + { regex: /\(\*[\s\S]*?\*\)/gm, css: 'comments' }, // multiline comments (* *) + { regex: /{(?!\$)[\s\S]*?}/gm, css: 'comments' }, // multiline comments { } + { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line + { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings + { regex: /\{\$[a-zA-Z]+ .+\}/g, css: 'color1' }, // compiler Directives and Region tags + { regex: /\b[\d\.]+\b/g, css: 'value' }, // numbers 12345 + { regex: /\$[a-zA-Z0-9]+\b/g, css: 'value' }, // numbers $F5D3 + { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keyword + ]; +}; + +SyntaxHighlighter.brushes.Delphi.prototype = new SyntaxHighlighter.Highlighter(); +SyntaxHighlighter.brushes.Delphi.aliases = ['delphi', 'pascal']; diff --git a/common/js/plugins/code_highlighter/script/shBrushDiff.js b/common/js/plugins/code_highlighter/script/shBrushDiff.js new file mode 100644 index 000000000..fbdde3fb5 --- /dev/null +++ b/common/js/plugins/code_highlighter/script/shBrushDiff.js @@ -0,0 +1,35 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +SyntaxHighlighter.brushes.Diff = function() +{ + this.regexList = [ + { regex: /^\+\+\+.*$/gm, css: 'color2' }, + { regex: /^\-\-\-.*$/gm, css: 'color2' }, + { regex: /^\s.*$/gm, css: 'color1' }, + { regex: /^@@.*@@$/gm, css: 'variable' }, + { regex: /^\+[^\+]{1}.*$/gm, css: 'string' }, + { regex: /^\-[^\-]{1}.*$/gm, css: 'comments' } + ]; +}; + +SyntaxHighlighter.brushes.Diff.prototype = new SyntaxHighlighter.Highlighter(); +SyntaxHighlighter.brushes.Diff.aliases = ['diff', 'patch']; diff --git a/common/js/plugins/code_highlighter/script/shBrushGroovy.js b/common/js/plugins/code_highlighter/script/shBrushGroovy.js new file mode 100644 index 000000000..7f94ff2e2 --- /dev/null +++ b/common/js/plugins/code_highlighter/script/shBrushGroovy.js @@ -0,0 +1,61 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +SyntaxHighlighter.brushes.Groovy = function() +{ + // Contributed by Andres Almiray + // http://jroller.com/aalmiray/entry/nice_source_code_syntax_highlighter + + var keywords = 'as assert break case catch class continue def default do else extends finally ' + + 'if in implements import instanceof interface new package property return switch ' + + 'throw throws try while public protected private static'; + var types = 'void boolean byte char short int long float double'; + var constants = 'null'; + var methods = 'allProperties count get size '+ + 'collect each eachProperty eachPropertyName eachWithIndex find findAll ' + + 'findIndexOf grep inject max min reverseEach sort ' + + 'asImmutable asSynchronized flatten intersect join pop reverse subMap toList ' + + 'padRight padLeft contains eachMatch toCharacter toLong toUrl tokenize ' + + 'eachFile eachFileRecurse eachB yte eachLine readBytes readLine getText ' + + 'splitEachLine withReader append encodeBase64 decodeBase64 filterLine ' + + 'transformChar transformLine withOutputStream withPrintWriter withStream ' + + 'withStreams withWriter withWriterAppend write writeLine '+ + 'dump inspect invokeMethod print println step times upto use waitForOrKill '+ + 'getText'; + + this.regexList = [ + { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments + { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments + { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings + { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings + { regex: /""".*"""/g, css: 'string' }, // GStrings + { regex: new RegExp('\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b', 'gi'), css: 'value' }, // numbers + { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // goovy keyword + { regex: new RegExp(this.getKeywords(types), 'gm'), css: 'color1' }, // goovy/java type + { regex: new RegExp(this.getKeywords(constants), 'gm'), css: 'constants' }, // constants + { regex: new RegExp(this.getKeywords(methods), 'gm'), css: 'functions' } // methods + ]; + + this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags); +} + +SyntaxHighlighter.brushes.Groovy.prototype = new SyntaxHighlighter.Highlighter(); +SyntaxHighlighter.brushes.Groovy.aliases = ['groovy']; diff --git a/common/js/plugins/code_highlighter/script/shBrushJScript.js b/common/js/plugins/code_highlighter/script/shBrushJScript.js new file mode 100644 index 000000000..40905a7f3 --- /dev/null +++ b/common/js/plugins/code_highlighter/script/shBrushJScript.js @@ -0,0 +1,43 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +SyntaxHighlighter.brushes.JScript = function() +{ + var keywords = 'abstract boolean break byte case catch char class const continue debugger ' + + 'default delete do double else enum export extends false final finally float ' + + 'for function goto if implements import in instanceof int interface long native ' + + 'new null package private protected public return short static super switch ' + + 'synchronized this throw throws transient true try typeof var void volatile while with'; + + this.regexList = [ + { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments + { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments + { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings + { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings + { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion + { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords + ]; + + this.forHtmlScript(SyntaxHighlighter.regexLib.scriptScriptTags); +}; + +SyntaxHighlighter.brushes.JScript.prototype = new SyntaxHighlighter.Highlighter(); +SyntaxHighlighter.brushes.JScript.aliases = ['js', 'jscript', 'javascript']; diff --git a/common/js/plugins/code_highlighter/script/shBrushJava.js b/common/js/plugins/code_highlighter/script/shBrushJava.js new file mode 100644 index 000000000..fb77c5264 --- /dev/null +++ b/common/js/plugins/code_highlighter/script/shBrushJava.js @@ -0,0 +1,47 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +SyntaxHighlighter.brushes.Java = function() +{ + var keywords = 'abstract assert boolean break byte case catch char class const ' + + 'continue default do double else enum extends ' + + 'false final finally float for goto if implements import ' + + 'instanceof int interface long native new null ' + + 'package private protected public return ' + + 'short static strictfp super switch synchronized this throw throws true ' + + 'transient try void volatile while'; + + this.regexList = [ + { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments + { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments + { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings + { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings + { regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, // numbers + { regex: /(?!\@interface\b)\@[\$\w]+\b/g, css: 'color1' }, // annotation @anno + { regex: /\@interface\b/g, css: 'color2' }, // @interface keyword + { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // java keyword + ]; + + this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags); +}; + +SyntaxHighlighter.brushes.Java.prototype = new SyntaxHighlighter.Highlighter(); +SyntaxHighlighter.brushes.Java.aliases = ['java']; diff --git a/common/js/plugins/code_highlighter/script/shBrushPhp.js b/common/js/plugins/code_highlighter/script/shBrushPhp.js new file mode 100644 index 000000000..91653c26e --- /dev/null +++ b/common/js/plugins/code_highlighter/script/shBrushPhp.js @@ -0,0 +1,83 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +SyntaxHighlighter.brushes.Php = function() +{ + var funcs = 'abs acos acosh addcslashes addslashes ' + + 'array_change_key_case array_chunk array_combine array_count_values array_diff '+ + 'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill '+ + 'array_filter array_flip array_intersect array_intersect_assoc array_intersect_key '+ + 'array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map '+ + 'array_merge array_merge_recursive array_multisort array_pad array_pop array_product '+ + 'array_push array_rand array_reduce array_reverse array_search array_shift '+ + 'array_slice array_splice array_sum array_udiff array_udiff_assoc '+ + 'array_udiff_uassoc array_uintersect array_uintersect_assoc '+ + 'array_uintersect_uassoc array_unique array_unshift array_values array_walk '+ + 'array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert '+ + 'basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress '+ + 'bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir '+ + 'checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists '+ + 'closedir closelog copy cos cosh count count_chars date decbin dechex decoct '+ + 'deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log '+ + 'error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded '+ + 'feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents '+ + 'fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype '+ + 'floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf '+ + 'fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname '+ + 'gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt '+ + 'getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext '+ + 'gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set '+ + 'interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double '+ + 'is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long '+ + 'is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault '+ + 'is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br '+ + 'parse_ini_file parse_str parse_url passthru pathinfo readlink realpath rewind rewinddir rmdir '+ + 'round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split '+ + 'str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes '+ + 'stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk '+ + 'strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime '+ + 'strtoupper strtr strval substr substr_compare'; + + var keywords = 'and or xor array as break case ' + + 'cfunction class const continue declare default die do else ' + + 'elseif empty enddeclare endfor endforeach endif endswitch endwhile ' + + 'extends for foreach function include include_once global if ' + + 'new old_function return static switch use require require_once ' + + 'var while abstract interface public implements extends private protected throw'; + + var constants = '__FILE__ __LINE__ __METHOD__ __FUNCTION__ __CLASS__'; + + this.regexList = [ + { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments + { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments + { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings + { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings + { regex: /\$\w+/g, css: 'variable' }, // variables + { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, // common functions + { regex: new RegExp(this.getKeywords(constants), 'gmi'), css: 'constants' }, // constants + { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keyword + ]; + + this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags); +}; + +SyntaxHighlighter.brushes.Php.prototype = new SyntaxHighlighter.Highlighter(); +SyntaxHighlighter.brushes.Php.aliases = ['php']; diff --git a/common/js/plugins/code_highlighter/script/shBrushPlain.js b/common/js/plugins/code_highlighter/script/shBrushPlain.js new file mode 100644 index 000000000..ce1e8b75e --- /dev/null +++ b/common/js/plugins/code_highlighter/script/shBrushPlain.js @@ -0,0 +1,27 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +SyntaxHighlighter.brushes.Plain = function() +{ +}; + +SyntaxHighlighter.brushes.Plain.prototype = new SyntaxHighlighter.Highlighter(); +SyntaxHighlighter.brushes.Plain.aliases = ['text', 'plain']; diff --git a/common/js/plugins/code_highlighter/script/shBrushPython.js b/common/js/plugins/code_highlighter/script/shBrushPython.js new file mode 100644 index 000000000..07bf8cd0a --- /dev/null +++ b/common/js/plugins/code_highlighter/script/shBrushPython.js @@ -0,0 +1,48 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +SyntaxHighlighter.brushes.Python = function() +{ + // Contributed by Gheorghe Milas + + var keywords = 'and assert break class continue def del elif else ' + + 'except exec finally for from global if import in is ' + + 'lambda not or pass print raise return try yield while'; + + var special = 'None True False self cls class_'; + + this.regexList = [ + { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, + { regex: /^\s*@\w+/gm, css: 'decorator' }, + { regex: /(['\"]{3})([^\1])*?\1/gm, css: 'comments' }, + { regex: /"(?!")(?:\.|\\\"|[^\""\n])*"/gm, css: 'string' }, + { regex: /'(?!')(?:\.|(\\\')|[^\''\n])*'/gm, css: 'string' }, + { regex: /\+|\-|\*|\/|\%|=|==/gm, css: 'keyword' }, + { regex: /\b\d+\.?\w*/g, css: 'value' }, + { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, + { regex: new RegExp(this.getKeywords(special), 'gm'), css: 'color1' } + ]; + + this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags); +}; + +SyntaxHighlighter.brushes.Python.prototype = new SyntaxHighlighter.Highlighter(); +SyntaxHighlighter.brushes.Python.aliases = ['py', 'python']; diff --git a/common/js/plugins/code_highlighter/script/shBrushRuby.js b/common/js/plugins/code_highlighter/script/shBrushRuby.js new file mode 100644 index 000000000..af978150f --- /dev/null +++ b/common/js/plugins/code_highlighter/script/shBrushRuby.js @@ -0,0 +1,49 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +SyntaxHighlighter.brushes.Ruby = function() +{ + // Contributed by Erik Peterson. + + var keywords = 'alias and BEGIN begin break case class def define_method defined do each else elsif ' + + 'END end ensure false for if in module new next nil not or raise redo rescue retry return ' + + 'self super then throw true undef unless until when while yield'; + + var builtins = 'Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload ' + + 'Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol ' + + 'ThreadGroup Thread Time TrueClass'; + + this.regexList = [ + { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments + { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings + { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings + { regex: /\b[A-Z0-9_]+\b/g, css: 'constants' }, // constants + { regex: /:[a-z][A-Za-z0-9_]*/g, css: 'color2' }, // symbols + { regex: /(\$|@@|@)\w+/g, css: 'variable bold' }, // $global, @instance, and @@class variables + { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords + { regex: new RegExp(this.getKeywords(builtins), 'gm'), css: 'color1' } // builtins + ]; + + this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags); +}; + +SyntaxHighlighter.brushes.Ruby.prototype = new SyntaxHighlighter.Highlighter(); +SyntaxHighlighter.brushes.Ruby.aliases = ['ruby', 'rails', 'ror']; diff --git a/common/js/plugins/code_highlighter/script/shBrushScala.js b/common/js/plugins/code_highlighter/script/shBrushScala.js new file mode 100644 index 000000000..6aa94fdec --- /dev/null +++ b/common/js/plugins/code_highlighter/script/shBrushScala.js @@ -0,0 +1,46 @@ +/** + * Code Syntax Highlighter. + * Version 1.5.2 + * Copyright (C) 2004-2008 Alex Gorbatchev + * http://www.dreamprojections.com/syntaxhighlighter/ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 3 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** Contributed by Yegor Jbanov and David Bernard. */ +dp.sh.Brushes.Scala = function() +{ + var keywords = 'val sealed case def true trait implicit forSome import match object null finally super ' + + 'override try lazy for var catch throw type extends class while with new final yield abstract ' + + 'else do if return protected private this package false'; + + var keyops = '[_:=><%#@]+'; + + this.regexList = [ + { regex: dp.sh.RegexLib.SingleLineCComments, css: 'comment' }, // one line comments + { regex: dp.sh.RegexLib.MultiLineCComments, css: 'comment' }, // multiline comments + { regex: new RegExp("(['\"]{3})([^\\1])*?\\1", 'gm'), css: 'string' }, // multi-line strings + { regex: new RegExp('"(?!")(?:\\.|\\\\\\"|[^\\""\\n\\r])*"', 'gm'), css: 'string' }, // double-quoted string + { regex: dp.sh.RegexLib.SingleQuotedString, css: 'string' }, // strings + { regex: new RegExp('\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b', 'gi'), css: 'number' }, // numbers + { regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' }, // keywords + { regex: new RegExp(keyops, 'gm'), css: 'keyword' } // scala keyword + ]; + + this.CssClass = 'dp-j'; + this.Style = '.dp-j .annotation { color: #646464; }' + + '.dp-j .number { color: #C00000; }'; +} + +dp.sh.Brushes.Scala.prototype = new dp.sh.Highlighter(); +dp.sh.Brushes.Scala.Aliases = ['scala']; diff --git a/common/js/plugins/code_highlighter/script/shBrushSql.js b/common/js/plugins/code_highlighter/script/shBrushSql.js new file mode 100644 index 000000000..566f8c0ea --- /dev/null +++ b/common/js/plugins/code_highlighter/script/shBrushSql.js @@ -0,0 +1,60 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +SyntaxHighlighter.brushes.Sql = function() +{ + var funcs = 'abs avg case cast coalesce convert count current_timestamp ' + + 'current_user day isnull left lower month nullif replace right ' + + 'session_user space substring sum system_user upper user year'; + + var keywords = 'absolute action add after alter as asc at authorization begin bigint ' + + 'binary bit by cascade char character check checkpoint close collate ' + + 'column commit committed connect connection constraint contains continue ' + + 'create cube current current_date current_time cursor database date ' + + 'deallocate dec decimal declare default delete desc distinct double drop ' + + 'dynamic else end end-exec escape except exec execute false fetch first ' + + 'float for force foreign forward free from full function global goto grant ' + + 'group grouping having hour ignore index inner insensitive insert instead ' + + 'int integer intersect into is isolation key last level load local max min ' + + 'minute modify move name national nchar next no numeric of off on only ' + + 'open option order out output partial password precision prepare primary ' + + 'prior privileges procedure public read real references relative repeatable ' + + 'restrict return returns revoke rollback rollup rows rule schema scroll ' + + 'second section select sequence serializable set size smallint static ' + + 'statistics table temp temporary then time timestamp to top transaction ' + + 'translation trigger true truncate uncommitted union unique update values ' + + 'varchar varying view when where with work'; + + var operators = 'all and any between cross in join like not null or outer some'; + + this.regexList = [ + { regex: /--(.*)$/gm, css: 'comments' }, // one line and multiline comments + { regex: SyntaxHighlighter.regexLib.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings + { regex: SyntaxHighlighter.regexLib.multiLineSingleQuotedString, css: 'string' }, // single quoted strings + { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'color2' }, // functions + { regex: new RegExp(this.getKeywords(operators), 'gmi'), css: 'color1' }, // operators and such + { regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword + ]; +}; + +SyntaxHighlighter.brushes.Sql.prototype = new SyntaxHighlighter.Highlighter(); +SyntaxHighlighter.brushes.Sql.aliases = ['sql']; + diff --git a/common/js/plugins/code_highlighter/script/shBrushVb.js b/common/js/plugins/code_highlighter/script/shBrushVb.js new file mode 100644 index 000000000..879305fea --- /dev/null +++ b/common/js/plugins/code_highlighter/script/shBrushVb.js @@ -0,0 +1,50 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +SyntaxHighlighter.brushes.Vb = function() +{ + var keywords = 'AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto ' + + 'Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate ' + + 'CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType ' + + 'Date Decimal Declare Default Delegate Dim DirectCast Do Double Each ' + + 'Else ElseIf End Enum Erase Error Event Exit False Finally For Friend ' + + 'Function Get GetType GoSub GoTo Handles If Implements Imports In ' + + 'Inherits Integer Interface Is Let Lib Like Long Loop Me Mod Module ' + + 'MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing ' + + 'NotInheritable NotOverridable Object On Option Optional Or OrElse ' + + 'Overloads Overridable Overrides ParamArray Preserve Private Property ' + + 'Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume ' + + 'Return Select Set Shadows Shared Short Single Static Step Stop String ' + + 'Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until ' + + 'Variant When While With WithEvents WriteOnly Xor'; + + this.regexList = [ + { regex: /'.*$/gm, css: 'comments' }, // one line comments + { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings + { regex: /^\s*#.*$/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion + { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // vb keyword + ]; + + this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags); +}; + +SyntaxHighlighter.brushes.Vb.prototype = new SyntaxHighlighter.Highlighter(); +SyntaxHighlighter.brushes.Vb.aliases = ['vb', 'vbnet']; diff --git a/common/js/plugins/code_highlighter/script/shBrushXml.js b/common/js/plugins/code_highlighter/script/shBrushXml.js new file mode 100644 index 000000000..e35ffd0f0 --- /dev/null +++ b/common/js/plugins/code_highlighter/script/shBrushXml.js @@ -0,0 +1,63 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +SyntaxHighlighter.brushes.Xml = function() +{ + function process(match, regexInfo) + { + var constructor = SyntaxHighlighter.Match, + code = match[0], + tag = new XRegExp('(<|<)[\\s\\/\\?]*(?[:\\w-\\.]+)', 'xg').exec(code), + result = [] + ; + + if (match.attributes != null) + { + var attributes, + regex = new XRegExp('(? [\\w:\\-\\.]+)' + + '\\s*=\\s*' + + '(? ".*?"|\'.*?\'|\\w+)', + 'xg'); + + while ((attributes = regex.exec(code)) != null) + { + result.push(new constructor(attributes.name, match.index + attributes.index, 'color1')); + result.push(new constructor(attributes.value, match.index + attributes.index + attributes[0].indexOf(attributes.value), 'string')); + } + } + + if (tag != null) + result.push( + new constructor(tag.name, match.index + tag[0].indexOf(tag.name), 'keyword') + ); + + return result; + } + + this.regexList = [ + { regex: new XRegExp('(\\<|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\\>|>)', 'gm'), css: 'color2' }, // + { regex: new XRegExp('(\\<|<)!--\\s*.*?\\s*--(\\>|>)', 'gm'), css: 'comments' }, // + { regex: new XRegExp('(<|<)[\\s\\/\\?]*(\\w+)(?.*?)[\\s\\/\\?]*(>|>)', 'sg'), func: process } + ]; +}; + +SyntaxHighlighter.brushes.Xml.prototype = new SyntaxHighlighter.Highlighter(); +SyntaxHighlighter.brushes.Xml.aliases = ['xml', 'xhtml', 'xslt', 'html', 'xhtml']; diff --git a/common/js/plugins/code_highlighter/script/shCore.js b/common/js/plugins/code_highlighter/script/shCore.js new file mode 100644 index 000000000..85f8c0b11 --- /dev/null +++ b/common/js/plugins/code_highlighter/script/shCore.js @@ -0,0 +1,22 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * @version + * 2.0.287 (February 06 2009) + * + * @author + * Alex Gorbatchev + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * Licensed under a GNU Lesser General Public License. + * http://creativecommons.org/licenses/LGPL/2.1/ + * + * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute + * the source code in accordance with LGPL 2.1 license, however if you want to use + * SyntaxHighlighter on your site or include it in your product, you must donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + */ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('f(!1h.2I){l 2I=h(){l p={61:{"1b-1d":"","7f-2R":1,"1W-1P":u,"1B":u,"85-6L":U,"1H-1P":4,"5p":M,"5z":U,"1u":U,"5E":M,"7R-6e":U,"6n":M},R:{59:u,4x:16,4P:16,8h:M,7I:"4p",1n:{4t:"98 1c",4o:"99 1c",67:"97 96 7C",6y:"93 I 94 2a 95 7C 9a",38:"38",6B:"?",1q:"2I\\n\\n",6t:"9b\'t 9h 7J C: ",6b:"9i 9g\'t 9f C 2c-2q 9c: ",77:"<2c 8K=\\"2j://8e.8f.8c/8L/8M\\"><84><8S 2j-8T=\\"8Z-90\\" 5u=\\"2g/2c; 8Y=8X-8\\" /><4O>8U 2I<2E 1g=\\"1W-6l:8V,\\"6g 8W 9j\\",6g,5Y;9k-4H:#9J;4H:#9K;1W-1P:9I;2g-6r:6p;\\">2I5T 2.0.9N (9O 9P 6C)2j://74.589s I 9p 9o.9l 9m-6C 9n 9t."},7F:M},1t:{5j:u,3w:u,3f:u,5F:{}},2T:{},7b:{9u:/\\/\\*[\\s\\S]*?\\*\\//4G,9A:/\\/\\/.*$/4G,9B:/#.*$/4G,9y:/"(?:\\.|(\\\\\\")|[^\\""\\n])*"/g,9v:/\'(?:\\.|(\\\\\\\')|[^\\\'\'\\n])*\'/g,9w:/"(?:\\.|(\\\\\\")|[^\\""])*"/g,9x:/\'(?:\\.|(\\\\\\\')|[^\\\'\'])*\'/g,3L:/\\w+:\\/\\/[\\w-.\\/?%&=]*/g,9U:{D:/(&1I;|<)\\?=?/g,19:/\\?(&2x;|>)/g},8r:{D:/(&1I;|<)%=?/g,19:/%(&2x;|>)/g},8s:{D:/(&1I;|<)\\s*2q.*?(&2x;|>)/4l,19:/(&1I;|<)\\/\\s*2q\\s*(&2x;|>)/4l}},1u:{18:h(3G){l 3E=J.1w("39"),4F=p.1u.7V;3E.Z="1u";C(l 2J 2a 4F){l 6J=4F[2J],4D=Q 6J(3G),1V=4D.18();3G.5o[2J]=4D;f(1V==u){1O}f(8I(1V)=="8H"){1V=p.1u.6T(1V,3G.1j,2J)}1V.Z+="8z "+2J;3E.1K(1V)}q 3E},6T:h(4M,6Y,4N){l a=J.1w("a"),4L=a.1g,4J=p.R,4K=4J.4x,4C=4J.4P;a.2e="#"+4N;a.4O=4M;a.4Q=6Y;a.6q=4N;a.1x=4M;f(5r(4K)==M){4L.1M=4K+"5q"}f(5r(4C)==M){4L.2i=4C+"5q"}a.8p=h(e){8k{p.1u.6W(c,e||1h.68,c.4Q,c.6q)}8l(e){p.B.1q(e.6M)}q M};q a},6W:h(7Z,89,81,86,7W){l 4B=p.1t.5F[81],4s;f(4B==u||(4s=4B.5o[86])==u){q u}q 4s.2f(7Z,89,7W)},7V:{4t:h(4r){c.18=h(){f(4r.T("5E")!=U){q}q p.R.1n.4t};c.2f=h(4q,8C,8w){l z=4r.z;4q.7x.4j(4q);z.Z=z.Z.E("5D","")}},4o:h(7N){c.18=h(){q p.R.1n.4o};c.2f=h(8o,8E,8x){l 3C=p.B.3y(7N.5B).E(/"+3C+"");2d.J.54()}},67:h(5c){l 3c,9G,5a=5c.1j;c.18=h(){l 2K=p.R;f(1h.70.a8=="b8:"||2K.59==u){q u}h 1y(4u){l 4A="";C(l 4v 2a 4u){4A+=""}q 4A};h 2k(4z){l 4w="";C(l 4y 2a 4z){4w+=" "+4y+"=\'"+4z[4y]+"\'"}q 4w};l 56={1M:2K.4x,2i:2K.4P,1j:5a+"b6",6w:"b4/x-6c-6o"},57={b5:"b9",ba:"bf",be:"4Q="+5a,bd:"M"},5b=2K.59,3a;f(/bc/i.1X(80.83)){3a="<5R"+2k({b3:"b2:aU-aT-aS-aQ-aR",aW:"2j://b0.aZ.58/aX/6c/bh/6o/bg.bm#5T=9,0,0,0"})+2k(56)+">"+1y(57)+1y({bD:5b})+""}F{3a=""}3c=J.1w("z");3c.1x=3a;q 3c};c.2f=h(bE,bF,5g){l 71=5g.by;6V(71){2H"5Q":l 5h=p.B.2z(p.B.3y(5c.5B).E(/&1I;/g,"<").E(/&2x;/g,">").E(/&bw;/g,"&"));f(1h.6P){1h.6P.bx("2g",5h)}F{q p.B.2z(5h)}2H"bl":p.B.1q(p.R.1n.6y);30;2H"bk":p.B.1q(5g.6M);30}}},bi:h(5f){c.18=h(){q p.R.1n.38};c.2f=h(bj,bo,9V){l 1U=J.1w("bv"),1J=u;f(p.1t.3f!=u){J.2E.4j(p.1t.3f)}p.1t.3f=1U;1U.1g.bu="bt:bq;1M:6H;2i:6H;D:-6G;4S:-6G;";J.2E.1K(1U);1J=1U.5d.J;6F(1J,1h.J);1J.35(""+5f.z.1x+"");1J.54();1U.5d.52();1U.5d.38();h 6F(6x,6E){l 2L=6E.7v("5e");C(l i=0;i<2L.v;i++){f(2L[i].6v.aP()=="6z"&&/ac\\.12$/.1X(2L[i].2e)){6x.35("<5e 6w=\\"2g/12\\" 6v=\\"6z\\" 2e=\\""+2L[i].2e+"\\">")}}}}},af:h(ag){c.18=h(){q p.R.1n.6B};c.2f=h(al,ak){l 2d=p.B.4R("","55",ah,ai,"75=0"),1J=2d.J;1J.35(p.R.1n.77);1J.54();2d.52()}}}},B:{5w:h(6Z){q 6Z+3I.a0(3I.9Y()*9W).2t()},5H:h(4V,4U){l 3g={},20;C(20 2a 4V){3g[20]=4V[20]}C(20 2a 4U){3g[20]=4U[20]}q 3g},5V:h(4T){6V(4T){2H"U":q U;2H"M":q M}q 4T},4R:h(3L,63,4W,4n,2G){l x=(79.1M-4W)/2,y=(79.2i-4n)/2;2G+=", D="+x+", 4S="+y+", 1M="+4W+", 2i="+4n;2G=2G.E(/^,/,"");l 51=1h.a2(3L,63,2G);51.52();q 51},7D:h(1L,23,1Z){f(1L.5X){1L["e"+23+1Z]=1Z;1L[23+1Z]=h(){1L["e"+23+1Z](1h.68)};1L.5X("a6"+23,1L[23+1Z])}F{1L.a3(23,1Z,M)}},1q:h(A){1q(p.R.1n.1q+A)},41:h(4Z,65){l 2y=p.1t.5j,3l=u;f(2y==u){2y={};C(l 4Y 2a p.2T){l 3k=p.2T[4Y].am;f(3k==u){1O}C(l i=0;i<3k.v;i++){2y[3k[i]]=4Y}}p.1t.5j=2y}3l=p.2T[2y[4Z]];f(3l==u&&65!=M){p.B.1q(p.R.1n.6t+4Z)}q 3l},4a:h(A,6m){l 2C=A.27("\\n");C(l i=0;i<2C.v;i++){2C[i]=6m(2C[i])}q 2C.5n("\\n")},7q:h(){l z=J.1w("z"),3m=J.1w("z"),6s=10,i=1;1S(i<=aE){f(i%6s===0){z.1x+=i;i+=(i+"").v}F{z.1x+="&aC;";i++}}3m.Z="5p 2R";3m.1K(z);q 3m},6D:h(A){q A.E(/^[ ]*[\\n]+|[\\n]*[ ]*$/g,"")},7H:h(A){l 3i,3V={},5i=Q O("^\\\\[(?<4f>(.*?))\\\\]$"),6k=Q O("(?<1d>[\\\\w-]+)"+"\\\\s*:\\\\s*"+"(?<1N>"+"[\\\\w-%#]+|"+"\\\\[.*?\\\\]|"+"\\".*?\\"|"+"\'.*?\'"+")\\\\s*;?","g");1S((3i=6k.N(A))!=u){l 2u=3i.1N.E(/^[\'"]|[\'"]$/g,"");f(2u!=u&&5i.1X(2u)){l m=5i.N(2u);2u=m.4f.v>0?m.4f.27(/\\s*,\\s*/):[]}3V[3i.1d]=2u}q 3V},6a:h(A,12){f(A==u||A.v==0||A=="\\n"){q A}A=A.E(/"+2s+""})}q A},7P:h(6f,7a){l 2D=6f.2t();1S(2D.v<7a){2D="0"+2D}q 2D},5G:h(){l 36=J.1w("z"),3h,37=0,4i=J.2E,1j=p.B.5w("5G"),2F="",4h="";36.1x=2F+"6u\\">"+2F+"28\\">"+2F+"2R\\">"+2F+"5u"+"\\"><1Q 1b=\\"7Q\\"><1Q 1j=\\""+1j+"\\">&1R;"+4h+4h+2M+2M+2M+2M;4i.1K(36);3h=J.aJ(1j);f(/aK/i.1X(80.83)){l 87=1h.aB(3h,u);37=7i(87.aA("1M"))}F{37=3h.as}4i.4j(36);q 37},72:h(7U,7T){l 1H="";C(l i=0;i<7T;i++){1H+=" "}q 7U.E(/\\t/g,1H)},6A:h(2N,4c){l ar=2N.27("\\n"),1H="\\t",47="";C(l i=0;i<50;i++){47+=" "}h 8j(3e,17,88){q 3e.22(0,17)+47.22(0,88)+3e.22(17+1,3e.v)};2N=p.B.4a(2N,h(24){f(24.1e(1H)==-1){q 24}l 17=0;1S((17=24.1e(1H))!=-1){l 8g=4c-17%4c;24=8j(24,17,8g)}q 24});q 2N},3y:h(A){q(p.R.8h==U)?A.E(/|&1I;br\\s*\\/?&2x;/4l,"\\n"):A},3O:h(A){q A.E(/\\s*$/g,"").E(/^\\s*/,"")},2z:h(A){l 29=p.B.3y(A).27("\\n"),az=Q 5A(),7X=/^\\s*/,25=ay;C(l i=0;i<29.v&&25>0;i++){l 43=29[i];f(p.B.3O(43).v==0){1O}l 44=7X.N(43);f(44==u){q A}25=3I.25(44[0].v,25)}f(25>0){C(l i=0;i<29.v;i++){29[i]=29[i].22(25)}}q 29.5n("\\n")},7K:h(2U,2V){f(2U.H<2V.H){q-1}F{f(2U.H>2V.H){q 1}F{f(2U.v<2V.v){q-1}F{f(2U.v>2V.v){q 1}}}}q 0},2Q:h(7l,2Y){h 7r(3X,7s){q[Q p.4m(3X[0],3X.H,7s.12)]};l av=0,4e=u,3M=[],7k=2Y.3R?2Y.3R:7r;1S((4e=2Y.3D.N(7l))!=u){3M=3M.2P(7k(4e,2Y))}q 3M},6d:h(7c){q 7c.E(p.7b.3L,h(m){q""+m+""})}},1B:h(7G,46){h 7u(4g){l 49=[];C(l i=0;i<4g.v;i++){49.K(4g[i])}q 49};l 3J=46?[46]:7u(J.7v(p.R.7I)),7M="1x",2l=u;f(3J.v===0){q}C(l i=0;i<3J.v;i++){l 2B=3J[i],2b=p.B.7H(2B.Z),2W;2b=p.B.5H(7G,2b);2W=2b["7J"];f(2W==u){1O}f(2b["2c-2q"]=="U"){2l=Q p.4X(2W)}F{l 48=p.B.41(2W);f(48){2l=Q 48()}F{1O}}2l.1B(2B[7M],2b);l 2h=2l.z;f(p.R.7F){2h=J.1w("an");2h.1N=2l.z.1x;2h.1g.1M="a4";2h.1g.2i="a7"}2B.7x.a1(2h,2B)}},9Z:h(7B){p.B.7D(1h,"ae",h(){p.1B(7B)})}};p.4m=h(45,6i,12){c.1N=45;c.H=6i;c.v=45.v;c.12=12};p.4m.Y.2t=h(){q c.1N};p.4X=h(3S){l 1C=p.B.41(3S),3Q=Q p.2T.aO(),bn=u;f(1C==u){q}1C=Q 1C();c.5O=3Q;f(1C.3z==u){p.B.1q(p.R.1n.6b+3S);q}3Q.5s.K({3D:1C.3z.I,3R:66});h 3F(42,5Z){C(l j=0;j<42.v;j++){42[j].H+=5Z}};h 66(13,bA){l 6X=13.I,1D=[],3Y=1C.5s,6Q=13.H+13.D.v,2S=1C.3z,1o;C(l i=0;i<3Y.v;i++){1o=p.B.2Q(6X,3Y[i]);3F(1o,6Q);1D=1D.2P(1o)}f(2S.D!=u&&13.D!=u){1o=p.B.2Q(13.D,2S.D);3F(1o,13.H);1D=1D.2P(1o)}f(2S.19!=u&&13.19!=u){1o=p.B.2Q(13.19,2S.19);3F(1o,13.H+13[0].aV(13.19));1D=1D.2P(1o)}q 1D}};p.4X.Y.1B=h(6O,6R){c.5O.1B(6O,6R);c.z=c.5O.z};p.6U=h(){};p.6U.Y={T:h(64,69){l 5M=c.1y[64];q p.B.5V(5M==u?69:5M)},18:h(7j){q J.1w(7j)},7h:h(5N){C(l i=0;i2O.H)&&(5N.H<2O.H+2O.v)){q U}}q M},7y:h(3A,7L){l 2v=[];f(3A!=u){C(l i=0;i<3A.v;i++){2v=2v.2P(p.B.2Q(7L,3A[i]))}}2v=2v.aF(p.B.7K);q 2v},7w:h(){C(l i=0;i"+""+8i+"."+"<1Q 1b=\\"5u\\">"+(1A!=u?""+1A.E(/\\s/g,"&1R;")+"":"")+"<1Q 1b=\\"7Q\\" 1g=\\"5v-D: "+2r+"5q;\\">"+1v+""+""+""}q 2X},7z:h(5k,5l){l 17=0,3o="",3j=p.B.6a;C(l i=0;i<5l.v;i++){l 1z=5l[i];f(1z===u||1z.v===0){1O}3o+=3j(5k.22(17,1z.H-17),"6j")+3j(1z.1N,1z.12);17=1z.H+1z.v}3o+=3j(5k.22(17),"6j");q 3o},1B:h(1a,62){l aG=p.R,3v=p.1t,z,3d;c.1y={};c.z=u;c.28=u;c.I=u;c.2n=u;c.5o={};c.1j=p.B.5w("a5");3v.5F[c.1j]=c;f(1a===u){1a=""}f(3v.3w===u){3v.3w=p.B.5G()}c.1y=p.B.5H(p.61,62||{});f(c.T("6n")==U){c.1y.1u=c.1y.5z=M}c.z=z=c.18("39");c.28=c.18("39");c.28.Z="28";z.Z="6u";z.1j=c.1j;f(c.T("5E")){z.Z+=" 5D"}f(c.T("5z")==M){z.Z+=" a9"}z.Z+=" "+c.T("1b-1d");z.1g.aj=c.T("1W-1P","");c.5B=1a;c.I=p.B.6D(1a).E(/\\r/g," ");3d=c.T("1H-1P");c.I=c.T("85-6L")==U?p.B.6A(c.I,3d):p.B.72(c.I,3d);c.I=p.B.2z(c.I);f(c.T("1u")){c.2n=c.18("39");c.2n.Z="2n";c.2n.1K(p.1u.18(c));z.1K(c.2n)}f(c.T("5p")){z.1K(p.B.7q())}z.1K(c.28);c.26=c.7y(c.5s,c.I);c.7w();1a=c.7z(c.I,c.26);1a=c.7A(p.B.3O(1a));f(c.T("7R-6e")){1a=p.B.6d(1a)}c.28.1x=1a},8t:h(A){A=A.E(/^\\s+|\\s+$/g,"").E(/\\s+/g,"\\\\b|\\\\b");q"\\\\b"+A+"\\\\b"},8q:h(2A){c.3z={D:{3D:2A.D,12:"2q"},19:{3D:2A.19,12:"2q"},I:Q O("(?"+2A.D.1c+")"+"(?.*?)"+"(?<19>"+2A.19.1c+")","8y")}}};q p}()}f(!5A.1e){5A.Y.1e=h(73,3H){3H=3I.8D(3H||0,0);C(l i=3H;i|[5U]{[^}]+})[\\S\\s]?|\\((?=\\?(?!#|<[\\w$]+>)))+|(\\()(?:\\?(?:(#)[^)]*\\)|<([$\\w]+)>))?|\\\\(?:k<([\\w$]+)>|[5U]{([^}]+)})|(\\[\\^?)|([\\S\\s])/g,9z:/(?:[^$]+|\\$(?![1-9$&`\']|{[$\\w]+}))+|\\$(?:([1-9]\\d*|[$&`\'])|{([$\\w]+)})/g,3b:/^(?:\\s+|#.*)+/,5I:/^(?:[?*+]|{\\d+(?:,\\d*)?})/,6S:/&&\\[\\^?/g,6K:/]/g},5W=h(5x,5P,60){C(l i=60||0;i<5x.v;i++){f(5x[i]===5P){q i}}q-1},7t=/()??/.N("")[1]!==33,3t={};O=h(1f,21){f(1f 4k W){f(21!==33){32 7n("4d\'t 4b 8B 82 8m 7p W 8G 8A")}q 1f.3B()}l 21=21||"",78=21.1e("s")>-1,76=21.1e("x")>-1,5m=M,3n=[],15=[],X=1E.X,G,34,3s,3P,3q;X.L=0;1S(G=2o.N.2p(X,1f)){f(G[2]){f(!1E.5I.1X(1f.14(X.L))){15.K("(?:)")}}F{f(G[1]){3n.K(G[3]||u);f(G[3]){5m=U}15.K("(")}F{f(G[4]){3P=5W(3n,G[4]);15.K(3P>-1?"\\\\"+(3P+1)+(5r(1f.5y(X.L))?"":"(?:)"):G[0])}F{f(G[5]){15.K(3t.7g?3t.7g.5Q(G[5],G[0].5y(1)==="P"):G[0])}F{f(G[6]){f(1f.5y(X.L)==="]"){15.K(G[6]==="["?"(?!)":"[\\\\S\\\\s]");X.L++}F{34=O.7Y("&&"+1f.14(G.H),1E.6S,1E.6K,"",{8a:"\\\\"})[0];15.K(G[6]+34+"]");X.L+=34.v+1}}F{f(G[7]){f(78&&G[7]==="."){15.K("[\\\\S\\\\s]")}F{f(76&&1E.3b.1X(G[7])){3s=2o.N.2p(1E.3b,1f.14(X.L-1))[0].v;f(!1E.5I.1X(1f.14(X.L-1+3s))){15.K("(?:)")}X.L+=3s-1}F{15.K(G[7])}}}F{15.K(G[0])}}}}}}}3q=W(15.5n(""),2o.E.2p(21,/[aD]+/g,""));3q.1r={1c:1f,2m:5m?3n:u};q 3q};O.aH=h(1d,o){3t[1d]=o};W.Y.N=h(A){l 1i=2o.N.2p(c,A),1d,i,5K;f(1i){f(7t&&1i.v>1){5K=Q W("^"+c.1c+"$(?!\\\\s)",c.5J());2o.E.2p(1i[0],5K,h(){C(i=1;i<7S.v-2;i++){f(7S[i]===33){1i[i]=33}}})}f(c.1r&&c.1r.2m){C(i=1;i<1i.v;i++){1d=c.1r.2m[i-1];f(1d){1i[1d]=1i[i]}}}f(c.3K&&c.L>(1i.H+1i[0].v)){c.L--}}q 1i}})()}W.Y.5J=h(){q(c.3K?"g":"")+(c.aq?"i":"")+(c.6h?"m":"")+(c.3b?"x":"")+(c.aI?"y":"")};W.Y.3B=h(7E){l 5L=Q O(c.1c,(7E||"")+c.5J());f(c.1r){5L.1r={1c:c.1r.1c,2m:c.1r.2m?c.1r.2m.14(0):u}}q 5L};W.Y.2p=h(bG,A){q c.N(A)};W.Y.bH=h(bp,6I){q c.N(6I[0])};O.3W=h(3Z,3T){l 40="/"+3Z+"/"+(3T||"");q O.3W[40]||(O.3W[40]=Q O(3Z,3T))};O.3u=h(A){q A.E(/[-[\\]{}()*+?.\\\\^$|,#\\s]/g,"\\\\$&")};O.7Y=h(A,D,V,1k,31){l 31=31||{},2Z=31.8a,11=31.9X,1k=1k||"",4I=1k.1e("g")>-1,5S=1k.1e("i")>-1,7m=1k.1e("m")>-1,4E=1k.1e("y")>-1,1k=1k.E(/y/g,""),D=D 4k W?(D.3K?D:D.3B("g")):Q O(D,"g"+1k),V=V 4k W?(V.3K?V:V.3B("g")):Q O(V,"g"+1k),1F=[],2w=0,1l=0,1m=0,1p=0,1T,1Y,1s,1G,3p,53;f(2Z){f(2Z.v>1){32 at("4d\'t 4b ad ax 7p 3u 8b")}f(7m){32 7n("4d\'t 4b 3u 8b 82 aL aM 6h aN")}3p=O.3u(2Z);53=Q W("^(?:"+3p+"[\\\\S\\\\s]|(?:(?!"+D.1c+"|"+V.1c+")[^"+3p+"])+)+",5S?"i":"")}1S(U){D.L=V.L=1m+(2Z?(53.N(A.14(1m))||[""])[0].v:0);1s=D.N(A);1G=V.N(A);f(1s&&1G){f(1s.H<=1G.H){1G=u}F{1s=u}}f(1s||1G){1l=(1s||1G).H;1m=(1s?D:V).L}F{f(!2w){30}}f(4E&&!2w&&1l>1p){30}f(1s){f(!2w++){1T=1l;1Y=1m}}F{f(1G&&2w){f(!--2w){f(11){f(11[0]&&1T>1p){1F.K([11[0],A.14(1p,1T),1p,1T])}f(11[1]){1F.K([11[1],A.14(1T,1Y),1T,1Y])}f(11[2]){1F.K([11[2],A.14(1Y,1l),1Y,1l])}f(11[3]){1F.K([11[3],A.14(1l,1m),1l,1m])}}F{1F.K(A.14(1Y,1l))}1p=1m;f(!4I){30}}}F{D.L=V.L=0;32 ab("aa aY bz b1 bb")}}f(1l===1m){1m++}}f(4I&&!4E&&11&&11[0]&&A.v>1p){1F.K([11[0],A.14(1p),1p,A.v])}D.L=V.L=0;q 1F};',62,726,'||||||||||||this|||if||function||||var||||sh|return||||null|length||||div|str|utils|for|left|replace|else|_109|index|code|document|push|lastIndex|false|exec|XRegExp||new|config||getParam|true|_121|RegExp|part|prototype|className||vN|css|_c3|slice|_107||pos|create|right|_ed|class|source|name|indexOf|_101|style|window|_111|id|_122|_12c|_12d|strings|_ca|_12e|alert|_x|_131|vars|toolbar|_e0|createElement|innerHTML|params|_ec|_e5|highlight|_bd|_c6|lib|_12a|_132|tab|lt|doc|appendChild|obj|width|value|continue|size|span|nbsp|while|_12f|_3c|_8|font|test|_130|_57|_4b|_102|substr|_56|_91|min|matches|split|lines|_97|in|_b4|html|wnd|href|execute|text|_b7|height|http|attributes|_b1|captureNames|bar|_f8|call|script|_e1|_75|toString|_6e|_d7|_12b|gt|_5b|unindent|_f4|_b3|_62|_7a|body|_80|_51|case|SyntaxHighlighter|_5|_28|_40|_81|_88|_d4|concat|getMatches|line|_c9|brushes|m1|m2|_b5|_da|_a1|_124|break|_123|throw|undefined|cc|write|_7b|_7d|print|DIV|_32|extended|_25|_f2|_8e|printFrame|_4a|_7c|_6a|_ea|_5e|_5c|_65|_106|_e9|_133|_10d|_76|len|_100|escape|_f0|spaceWidth|_dc|fixForBlogger|htmlScript|_d5|addFlags|_22|regex|_3|offsetMatches|_2|_f6|Math|_af|global|url|_a6|_db|trim|_10c|_be|func|_bc|_11c|_73|_6b|cache|_a2|_c7|_11b|key|findBrush|_c0|_9c|_9d|_b9|_ab|_8c|_b6|_ad|eachLine|supply|_89|can|_a5|values|_ac|_82|_7e|removeChild|instanceof|gi|Match|_50|viewSource|pre|_1a|_19|_18|expandSource|_29|_2b|_2d|toolbarItemWidth|_2e|_2c|_2a|_17|_10|_7|_129|_4|gm|color|_126|_e|_f|_d|_9|_b|title|toolbarItemHeight|highlighterId|popup|top|_4c|_49|_48|_4f|HtmlScript|_5d|_59||win|focus|esc|close|_blank|_2f|_30|com|clipboardSwf|_27|swf|_24|contentWindow|link|_38|_35|_37|_6c|discoveredBrushes|_e6|_e7|_105|join|toolbarCommands|ruler|px|isNaN|regexList|_e2|content|margin|guid|_fb|charAt|gutter|Array|originalCode|String|collapsed|collapse|highlighters|measureSpace|merge|quantifier|getNativeFlags|r2|_116|_d0|_d2|xmlBrush|_fc|get|object|_127|version|pP|toBoolean|_fa|attachEvent|serif|_c1|_fd|defaults|_ee|_4e|_ce|_5a|process|copyToClipboard|event|_cf|decorate|brushNotHtmlScript|shockwave|processUrls|links|_78|Times|multiline|_ba|plain|_6d|family|_61|light|flash|center|commandName|align|_66|noBrush|syntaxhighlighter|rel|type|_3e|copyToClipboardConfirmation|stylesheet|processSmartTabs|help|2009|trimFirstAndLastLines|_3f|copyStyles|500px|0px|args|_6|classRight|tabs|message|match|_cc|clipboardData|_c8|_cd|classLeft|createButton|Highlighter|switch|executeCommand|_c5|_a|_47|location|_36|processTabs|_f5|alexgorbatchev|scrollbars|_104|aboutDialog|_103|screen|_79|regexLib|_a8|DTD|xhtml1|first|unicode|isMatchNested|parseInt|_d1|_a7|_a0|_128|TypeError|_dd|one|createRuler|defaultAdd|_a3|_ff|toArray|getElementsByTagName|removeNestedMatches|parentNode|findMatches|processMatches|createDisplayLines|_b8|clipboard|addEvent|_115|debug|_aa|parseParams|tagName|brush|matchesSortCallback|_d6|_b0|_1e|_de|padNumber|block|auto|arguments|_85|_84|items|_16|_99|matchRecursive|_12|navigator|_14|when|userAgent|head|smart|_15|_83|_90|_13|escapeChar|character|org|_e4|www|w3|_93|bloggerMode|_e3|insertSpaces|try|catch|constructing|resizable|_1f|onclick|forHtmlScript|aspScriptTags|scriptScriptTags|getKeywords|menubar|400|_1c|_21|sgi|item|another|flags|_1b|max|_20|750|from|string|typeof|Helvetica|xmlns|1999|xhtml|dtd|transitional|Transitional|EN|TR|meta|equiv|About|Georgia|New|utf|charset|Content|Type|XHTML|W3C|The|is|your|to|copy|expand|view|now|Can|option|DOCTYPE|PUBLIC|configured|wasn|find|Brush|Roman|background|Copyright|2004|Alex|highlighter|syntax|decoration|none|JavaScript|Gorbatchev|multiLineCComments|singleQuotedString|multiLineDoubleQuotedString|multiLineSingleQuotedString|doubleQuotedString|replaceVar|singleLineCComments|singleLinePerlComments|0099FF|target|Geneva|Arial|_26|3em|1em|fff|000|sans|xx|287|February|06|4em|bottom|large|75em|phpScriptTags|_3b|1000000|valueNames|random|all|round|replaceChild|open|addEventListener|70em|highlighter_|on|30em|protocol|nogutter|subject|Error|shCore|more|load|about|_42|500|250|fontSize|_44|_43|aliases|textarea|spaces|number|ignoreCase|_8a|offsetWidth|SyntaxError|highlighted|_a4|alt|than|1000|_98|getPropertyValue|getComputedStyle|middot|sx|150|sort|_ef|addPlugin|sticky|getElementById|opera|using|the|flag|Xml|toLowerCase|96b8|444553540000|11cf|ae6d|d27cdb6e|lastIndexOf|codebase|pub|data|macromedia|download|unbalanced|clsid|classid|application|allowScriptAccess|_clipboard|param|file|always|wmode|delimiters|msie|menu|flashVars|transparent|swflash|cabs|printSource|_39|error|ok|cab|_bf|_3a|_119|absolute||printing|position|cssText|IFRAME|amp|setData|command|contains|_c4|embed|src|movie|_33|_34|_117|apply'.split('|'),0,{})) diff --git a/common/js/xml_handler.js b/common/js/xml_handler.js index c74fde0fe..9cc77cd99 100644 --- a/common/js/xml_handler.js +++ b/common/js/xml_handler.js @@ -6,6 +6,7 @@ // xml handler을 이용하는 user function var show_waiting_message = true; +var _isXmlRequested = false; function exec_xml(module, act, params, callback_func, response_tags, callback_func_arg, fo_obj) { var oXml = new xml_handler(); oXml.reset(); @@ -18,6 +19,7 @@ function exec_xml(module, act, params, callback_func, response_tags, callback_fu } oXml.addParam("module", module); oXml.addParam("act", act); + if(typeof(xeVid)!='undefined') oXml.addParam('vid', xeVid); if(typeof(response_tags)=="undefined" || response_tags.length<1) response_tags = new Array('error','message'); @@ -27,6 +29,8 @@ function exec_xml(module, act, params, callback_func, response_tags, callback_fu // 결과 처리 후 callback_func에 넘겨줌 function xml_response_filter(oXml, callback_func, response_tags, callback_func_arg, fo_obj) { var text = oXml.getResponseText(); + if(oXml.objXmlHttp.readyState!=4) return; + _isXmlRequested = false; if(text && !/^/i.test(text)) { var waiting_obj = xGetElementById("waitingforserverresponse"); if(waiting_obj) waiting_obj.style.visibility = "hidden"; @@ -92,6 +96,8 @@ function zGetXmlHttp() { } function xml_handlerRequest(callBackFunc, xmlObj, callBackFunc2, response_tags, callback_func_arg, fo_obj) { + if(_isXmlRequested) return; + _isXmlRequested = true; var rd = ""; rd += "\n" + "\n" @@ -123,13 +129,12 @@ function xml_handlerRequest(callBackFunc, xmlObj, callBackFunc2, response_tags, } this.objXmlHttp.onreadystatechange = function () {callBackFunc(xmlObj, callBackFunc2, response_tags, callback_func_arg, fo_obj)}; - // 모든 xml데이터는 POST방식으로 전송. try-cacht문으로 오류 발생시 대처 + // 모든 xml데이터는 POST방식으로 전송. try-catch문으로 오류 발생시 대처 try { - this.objXmlHttp.open("POST", this.xml_path, true); - } catch(e) { alert(e); + _isXmlRequested = false; return; } @@ -429,6 +434,7 @@ $.exec_json = function(action,data,func){ } $.extend(data,{module:action[0],act:action[1]}); + if(typeof(xeVid)!='undefined') $.extend(data,{vid:xeVid}); $.ajax({ type:"POST" ,dataType:"json" diff --git a/common/js/xml_js_filter.js b/common/js/xml_js_filter.js index a7920c56d..f501806e1 100644 --- a/common/js/xml_js_filter.js +++ b/common/js/xml_js_filter.js @@ -62,7 +62,7 @@ function XmlJsFilter(form_object, module, act, callback_user_func) { function XmlJsFilterSetFocus(target_name) { var obj = this.fo_obj[target_name]; if(typeof(obj)=='undefined' || !obj) return; - + var length = obj.length; try { if(typeof(length)!='undefined') { @@ -167,23 +167,23 @@ function XmlJsFilterExecuteFilter(filter, value) { return regx.test(value); break; case "homepage" : - var regx = /^(http|https|ftp|mms):\/\/[0-9a-z-]+(\.[_0-9a-z-\/\~]+)+(:[0-9]{2,4})*$/; + var regx = /^(http|https|ftp|mms):\/\/[0-9a-z-]+(\.[_0-9a-z-\/\~]+)+(:[0-9]{2,4})*$/; return regx.test(value); break; case "korean" : - var regx = /^[가-힣]*$/; + var regx = /^[가-힣]*$/; return regx.test(value); break; case "korean_number" : - var regx = /^[가-힣0-9]*$/; + var regx = /^[가-힣0-9]*$/; return regx.test(value); break; case "alpha" : - var regx = /^[a-zA-Z]*$/; + var regx = /^[a-zA-Z]*$/; return regx.test(value); break; case "alpha_number" : - var regx = /^[a-zA-Z][a-zA-Z0-9\_]*$/; + var regx = /^[a-zA-Z][a-zA-Z0-9\_]*$/; return regx.test(value); break; case "number" : @@ -256,7 +256,7 @@ function XmlJsFilterCheckFieldItem() { } } return true; -} +} function XmlJsFilterGetParameterParam() { if(!this.fo_obj) return new Array(); @@ -304,35 +304,41 @@ function XmlJsFilterProc(confirm_msg) { function procFilter(fo_obj, filter_func) { // form문 안에 위지윅 에디터가 세팅되어 있을 경우 에디터의 값과 지정된 content field를 sync var editor_sequence = fo_obj.getAttribute('editor_sequence'); - if(typeof(editor_sequence)!='undefined' && editor_sequence && typeof(editorRelKeys)!='undefined') { - var content = editorGetContent(editor_sequence); - var dummy = xCreateElement("div"); - xInnerHtml(dummy, content); + if(typeof(editor_sequence)!='undefined' && editor_sequence && typeof(editorRelKeys)!='undefined') { - // IE에서 컨텐츠 전체를 P태그로 감싸는 경우가 있어서 이 의미없는 P태그를 제거 - if(dummy.firstChild && dummy.firstChild.nodeName == 'P' && dummy.firstChild == dummy.lastChild) { - var content = xInnerHtml(dummy.firstChild); - xInnerHtml(dummy,content); - } + if(jQuery.isFunction(editorRelKeys[editor_sequence]['pasteHTML'])){ + var content = editorGetContent(editor_sequence); + editorRelKeys[editor_sequence]['content'].value = content; + }else{ + var content = editorGetContent(editor_sequence); + var dummy = xCreateElement("div"); + xInnerHtml(dummy, content); - // img/a 태그의 대상에 대해 경로 재설정 (IE브라우저에서 위지윅 에디터내의 경로를 절대 경로로 바꾸는 버그때문ㅇ) - var imgTags = xGetElementsByTagName('IMG', dummy); - for(var i=0;icmd_load = 'Load'; $lang->cmd_input = 'Input'; $lang->cmd_search = 'Search'; + $lang->cmd_find = 'Find'; + $lang->cmd_replace = 'Replace'; + $lang->cmd_confirm = 'Confirm'; $lang->cmd_cancel = 'Cancel'; $lang->cmd_back = 'Go Back'; $lang->cmd_vote = 'Recommend'; @@ -75,7 +78,7 @@ $lang->secret = 'Secret'; $lang->category = $lang->category_srl = 'Category'; $lang->none_category = 'None category'; - $lang->none_image = '이미지 없음'; + $lang->none_image = 'Image does not exist'; $lang->document_srl = 'Doc. No.'; $lang->user_id = 'User ID'; $lang->author = 'Developer'; @@ -121,6 +124,7 @@ $lang->file = 'file'; $lang->mid = 'Module Name'; + $lang->sid = 'Site Name'; $lang->layout = 'Layout'; $lang->widget = 'Widget'; $lang->module = 'Module'; @@ -267,8 +271,9 @@ $lang->default_value = 'Default Value'; $lang->is_active = 'Active'; $lang->is_required = 'Required Field'; + $lang->eid = 'Name of extra variable'; - // ftp 관련 + // ftp-related $lang->ftp_form_title = 'Input FTP account information'; $lang->ftp = 'FTP'; $lang->ftp_port = 'FTP port'; diff --git a/common/lang/es.lang.php b/common/lang/es.lang.php index 2acccf352..de2cfaaa8 100644 --- a/common/lang/es.lang.php +++ b/common/lang/es.lang.php @@ -24,6 +24,9 @@ $lang->cmd_load = 'Carga'; $lang->cmd_input = 'Ingresar'; $lang->cmd_search = 'Buscar'; + $lang->cmd_find = '찾기'; + $lang->cmd_replace = '바꾸기'; + $lang->cmd_confirm = '확인'; $lang->cmd_cancel = 'Cancelar'; $lang->cmd_back = 'Atrás'; $lang->cmd_vote = 'a Favor'; @@ -120,6 +123,7 @@ $lang->file = 'file'; $lang->mid = 'ID del Módulo'; + $lang->sid = 'Site Name'; $lang->layout = 'Composición'; $lang->widget = 'Widget'; $lang->module = 'Módulo'; @@ -273,6 +277,7 @@ $lang->default_value = 'Valor por defecto'; $lang->is_active = 'Activado'; $lang->is_required = 'Requerido'; + $lang->eid = '확장변수 이름'; // ftp 관련 $lang->ftp_form_title = 'Datos de conexión para FTP'; diff --git a/common/lang/fr.lang.php b/common/lang/fr.lang.php index 85ff4d13c..0c71d639b 100644 --- a/common/lang/fr.lang.php +++ b/common/lang/fr.lang.php @@ -24,6 +24,9 @@ $lang->cmd_load = 'Charger'; $lang->cmd_input = 'Entrer'; $lang->cmd_search = 'Rechercher'; + $lang->cmd_find = '찾기'; + $lang->cmd_replace = '바꾸기'; + $lang->cmd_confirm = '확인'; $lang->cmd_cancel = 'Annuler'; $lang->cmd_back = 'Retourner'; $lang->cmd_vote = 'Recommander'; @@ -121,6 +124,7 @@ $lang->file = 'file'; $lang->mid = 'Nom'; + $lang->sid = 'Site Name'; $lang->layout = 'Mise en Page'; $lang->widget = 'Gadget'; $lang->module = 'Module'; @@ -267,6 +271,7 @@ $lang->default_value = 'Valeur par défaut'; $lang->is_active = 'Actif'; $lang->is_required = 'Item essentielle'; + $lang->eid = '확장변수 이름'; // ftp 관련 $lang->ftp_form_title = 'FTP 정보 입력'; diff --git a/common/lang/ge.lang.php b/common/lang/ge.lang.php index 7ff3aca98..032e7998b 100644 --- a/common/lang/ge.lang.php +++ b/common/lang/ge.lang.php @@ -24,6 +24,9 @@ $lang->cmd_load = 'Laden'; $lang->cmd_input = 'Input'; $lang->cmd_search = 'Suche'; + $lang->cmd_find = '찾기'; + $lang->cmd_replace = '바꾸기'; + $lang->cmd_confirm = '확인'; $lang->cmd_cancel = 'Abbrechen'; $lang->cmd_back = 'Zurück'; $lang->cmd_vote = 'Weiterempfehlen'; @@ -121,6 +124,7 @@ $lang->file = 'file'; $lang->mid = 'Module Name'; + $lang->sid = 'Site Name'; $lang->layout = 'Layout'; $lang->widget = 'Widget'; $lang->module = 'Modul'; @@ -267,6 +271,7 @@ $lang->default_value = 'Standardwert'; $lang->is_active = 'Aktiv'; $lang->is_required = 'Pflichtfeld'; + $lang->eid = '확장변수 이름'; // ftp 관련 $lang->ftp_form_title = 'FTP 정보 입력'; diff --git a/common/lang/jp.lang.php b/common/lang/jp.lang.php index 68cbc08cd..573b0721e 100644 --- a/common/lang/jp.lang.php +++ b/common/lang/jp.lang.php @@ -24,6 +24,9 @@ $lang->cmd_load = '読み込む'; $lang->cmd_input = '入力'; $lang->cmd_search = '検索'; + $lang->cmd_find = '検索'; + $lang->cmd_replace = '置換'; + $lang->cmd_confirm = '確認'; $lang->cmd_cancel = '取り消し'; $lang->cmd_back = '戻る'; $lang->cmd_vote = '推薦'; @@ -121,6 +124,7 @@ $lang->file = 'ファイル'; $lang->mid = 'モジュール名'; + $lang->sid = 'Site Name'; $lang->layout = 'レイアウト'; $lang->widget = 'ウィジェット'; $lang->module = 'モジュール'; @@ -201,16 +205,16 @@ ); // 説明関連 - $lang->about_tag = 'タグを入力する時、「,」(半角コンマ)を使うと複数登録できます。'; - $lang->about_layout = 'レイアウトでモジュールの枠をデザインします。上段のレイアウトメニューで管理できます。'; + $lang->about_tag = 'タグを入力する時、「,」(半角コンマ)を使うと複数登録出来ます。'; + $lang->about_layout = 'レイアウトでモジュールの枠をデザインします。上段のレイアウトメニューで管理出来ます。'; // メッセージ関連 - $lang->msg_call_server = 'サーバへ問合わせ中です。しばらくお待ちください。'; + $lang->msg_call_server = 'サーバへ問合わせ中です。しばらくお待ち下さい。'; $lang->msg_db_not_setted = 'DBが設定されていません。'; - $lang->msg_dbconnect_failed = "データベースアクセスにエラーが発生しました。\nデータベースの情報をもう一度確認してください。"; + $lang->msg_dbconnect_failed = "データベースアクセスにエラーが発生しました。\nデータベースの情報をもう一度確認して下さい。"; $lang->msg_invalid_queryid = 'クエリIDの値が無効です。'; $lang->msg_not_permitted = '権限がありません。'; - $lang->msg_input_password = 'パスワードを入力してください。'; + $lang->msg_input_password = 'パスワードを入力して下さい。'; $lang->msg_invalid_document = '無効な書き込み番号です。'; $lang->msg_invalid_request = '無効なリクエストです。'; $lang->msg_invalid_password = 'パスワードが正しくありません。'; @@ -226,6 +230,7 @@ $lang->success_declared = '通報しました。'; $lang->success_updated = '修正しました。'; $lang->success_deleted = '削除しました。'; + $lang->success_restore = '復元しました。'; $lang->success_voted = '推薦しました。'; $lang->success_blamed = '非推薦しました。'; $lang->success_moved = '移動しました。'; @@ -237,15 +242,16 @@ $lang->fail_to_delete = '削除に失敗しました。'; $lang->fail_to_move = '移動に失敗しました。'; - $lang->failed_voted = '推薦できません。'; - $lang->failed_blamed = '非推薦できません。'; - $lang->failed_declared = '通報できません。'; - $lang->fail_to_delete_have_children = '返信の書き込みがあり、削除できません。'; + $lang->failed_voted = '推薦出来ません。'; + $lang->failed_blamed = '非推薦出来ません。'; + $lang->failed_declared = '通報出来ません。'; + $lang->fail_to_delete_have_children = '返信の書き込みがあり、削除出来ません。'; $lang->confirm_submit = '登録しますか?'; $lang->confirm_logout = 'ログアウトしますか?'; $lang->confirm_vote = '推薦しますか?'; $lang->confirm_delete = '削除しますか?'; + $lang->confirm_restore = '復元しますか?'; $lang->confirm_move = '移動しますか?'; $lang->confirm_reset = '初期化しますか?'; $lang->confirm_leave = '退会しますか?'; @@ -258,7 +264,7 @@ $lang->column_type_list['textarea'] = 'テキストエリア(textarea)'; $lang->column_type_list['checkbox'] = 'チェックボックス(checkbox)'; $lang->column_type_list['select'] = '選択(select)'; - $lang->column_type_list['radio'] = 'radio button (radio)'; + $lang->column_type_list['radio'] = 'ラジオボタン (radio)'; $lang->column_type_list['kr_zip'] = '韓国住所(zip)'; $lang->column_type_list['date'] = '日付(年月日)'; //$lang->column_type_list['jp_zip'] = '日本住所(zip)'; @@ -267,6 +273,7 @@ $lang->default_value = 'デフォルト値'; $lang->is_active = '活性化'; $lang->is_required = '必須項目'; + $lang->eid = '拡張変数名'; // ftp 관련 $lang->ftp_form_title = 'サーバーのFTP情報の入力'; @@ -284,8 +291,8 @@ $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_invalid_auth_info = "ログインが失敗しました。 FTP情報を再度ご確認下さい。"; - $lang->msg_ftp_mkdir_fail = "FTPを用いたディレクトリ生成に失敗しました。FTPサーバーの設定を再度ご確認ください。"; - $lang->msg_ftp_chmod_fail = "FTPを用いたディレクトリパーミッション(permission)変更に失敗しました。FTPサーバーの設定を再度ご確認ください。"; + $lang->msg_ftp_mkdir_fail = "FTPを用いたディレクトリ生成に失敗しました。FTPサーバーの設定を再度ご確認下さい。"; + $lang->msg_ftp_chmod_fail = "FTPを用いたディレクトリパーミッション(permission)変更に失敗しました。FTPサーバーの設定を再度ご確認下さい。"; $lang->msg_ftp_connect_success = "FTP接続に成功しました。"; // xml filterで用いられているjavascript用のアラートメッセージ @@ -293,7 +300,7 @@ $lang->filter->outofrange = '%sの文字の長さを合わせて下さい。'; $lang->filter->equalto = '%sが正しくありません。'; $lang->filter->invalid_email = '%sのパターンが正しくありません。 (例: zbxe@zeroboard.com)'; - $lang->filter->invalid_user_id = $lang->filter->invalid_userid = "%sの形式が正しくありません。\\n半角の英数と記号「_」を組み合わせて入力してください。頭字は半角英文字でなければなりません。"; + $lang->filter->invalid_user_id = $lang->filter->invalid_userid = "%sの形式が正しくありません。\\n半角の英数と記号「_」を組み合わせて入力して下さい。頭字は半角英文字でなければなりません。"; $lang->filter->invalid_homepage = '%sの形式が正しくありません。 (例: http://www.zeroboard.com)'; $lang->filter->invalid_korean = '%sの形式が正しくありません。ハングルのみ入力して下さい。'; $lang->filter->invalid_korean_number = '%sの形式が正しくありません。ハングルと半角数字で入力して下さい。'; diff --git a/common/lang/ko.lang.php b/common/lang/ko.lang.php index f8139fe59..b53e43e7f 100644 --- a/common/lang/ko.lang.php +++ b/common/lang/ko.lang.php @@ -24,6 +24,9 @@ $lang->cmd_load = '불러오기'; $lang->cmd_input = '입력'; $lang->cmd_search = '검색'; + $lang->cmd_find = '찾기'; + $lang->cmd_replace = '바꾸기'; + $lang->cmd_confirm = '확인'; $lang->cmd_cancel = '취소'; $lang->cmd_back = '돌아가기'; $lang->cmd_vote = '추천'; @@ -121,6 +124,7 @@ $lang->file = '파일'; $lang->mid = '모듈이름'; + $lang->sid = '가상 사이트 이름'; $lang->layout = '레이아웃'; $lang->widget = '위젯 '; $lang->module = '모듈'; @@ -226,6 +230,7 @@ $lang->success_declared = '신고되었습니다'; $lang->success_updated = '수정되었습니다'; $lang->success_deleted = '삭제되었습니다'; + $lang->success_restore = '복원되었습니다'; $lang->success_voted = '추천되었습니다'; $lang->success_blamed = '비추천되었습니다'; $lang->success_moved = '이동되었습니다'; @@ -246,6 +251,7 @@ $lang->confirm_logout = '로그아웃하시겠습니까?'; $lang->confirm_vote = '추천하시겠습니까?'; $lang->confirm_delete = '삭제하시겠습니까?'; + $lang->confirm_restore = '복원하시겠습니까?'; $lang->confirm_move = '이동하시겠습니까?'; $lang->confirm_reset = '초기화 하시겠습니까??'; $lang->confirm_leave = '탈퇴 하시겠습니까??'; @@ -267,6 +273,7 @@ $lang->default_value = '기본 값'; $lang->is_active = '활성'; $lang->is_required = '필수항목'; + $lang->eid = '확장변수 이름'; // ftp 관련 $lang->ftp_form_title = 'FTP 정보 입력'; diff --git a/common/lang/ru.lang.php b/common/lang/ru.lang.php index 75f971ded..269e12f0a 100644 --- a/common/lang/ru.lang.php +++ b/common/lang/ru.lang.php @@ -24,6 +24,9 @@ $lang->cmd_load = 'Загрузить'; $lang->cmd_input = 'Ввести'; $lang->cmd_search = 'Искать'; + $lang->cmd_find = '찾기'; + $lang->cmd_replace = '바꾸기'; + $lang->cmd_confirm = '확인'; $lang->cmd_cancel = 'Отменить'; $lang->cmd_back = 'Вернуться'; $lang->cmd_vote = 'Рекомендовать'; @@ -119,6 +122,7 @@ $lang->order_desc = 'спустится'; $lang->mid = 'Имя Модуля'; + $lang->sid = 'Site Name'; $lang->layout = 'Лейаут'; $lang->widget = 'Виджет'; $lang->module = 'Модуль'; @@ -286,6 +290,7 @@ $lang->is_active = 'Активно'; $lang->is_required = 'Требуемое поле'; + $lang->eid = '확장변수 이름'; // Alert-сообщения для Javascript используя XML filter $lang->filter->isnull = 'Пожалуйста, введите значение для %s'; diff --git a/common/lang/zh-CN.lang.php b/common/lang/zh-CN.lang.php index c7abcecc5..de533b306 100644 --- a/common/lang/zh-CN.lang.php +++ b/common/lang/zh-CN.lang.php @@ -24,6 +24,9 @@ $lang->cmd_load = '导入'; $lang->cmd_input = '输入'; $lang->cmd_search = '搜索'; + $lang->cmd_find = '찾기'; + $lang->cmd_replace = '바꾸기'; + $lang->cmd_confirm = '확인'; $lang->cmd_cancel = '取消'; $lang->cmd_back = '返回'; $lang->cmd_vote = '推荐'; @@ -121,6 +124,7 @@ $lang->file = '文件'; $lang->mid = '模块名称'; + $lang->sid = 'Site Name'; $lang->layout = '布局'; $lang->widget = '控件 '; $lang->module = '模块'; @@ -267,9 +271,10 @@ $lang->default_value = '缺省值'; $lang->is_active = '激活'; $lang->is_required = '必填'; + $lang->eid = '확장변수 이름'; // ftp 相关 - $lang->ftp_form_title = '输入FTP信息'; + $lang->ftp_form_title = '设置FTP信息'; $lang->ftp = 'FTP'; $lang->ftp_port = 'FTP port'; $lang->cmd_check_ftp_connect = '测试FTP连接'; diff --git a/common/lang/zh-TW.lang.php b/common/lang/zh-TW.lang.php index 8242c57b1..1e14b740d 100644 --- a/common/lang/zh-TW.lang.php +++ b/common/lang/zh-TW.lang.php @@ -24,6 +24,9 @@ $lang->cmd_load = '讀取'; $lang->cmd_input = '輸入'; $lang->cmd_search = '搜尋'; + $lang->cmd_find = '찾기'; + $lang->cmd_replace = '바꾸기'; + $lang->cmd_confirm = '확인'; $lang->cmd_cancel = '取消'; $lang->cmd_back = '返回'; $lang->cmd_vote = '推薦'; @@ -121,6 +124,7 @@ $lang->file = '檔案'; $lang->mid = '模組名稱'; + $lang->sid = 'Site Name'; $lang->layout = '版面'; $lang->widget = '控件 '; $lang->module = '模組'; @@ -205,9 +209,9 @@ $lang->about_layout = '版面設計是佈置網站的外觀模組,在上端版面選單中,可以進行管理'; // 訊息 - $lang->msg_call_server = '系統正在連結服務器,請稍後。'; + $lang->msg_call_server = '系統正在連接伺服器,請稍後。'; $lang->msg_db_not_setted = '還沒有設定資料庫'; - $lang->msg_dbconnect_failed = "連接資料庫時發生錯誤。\n請重新確認資料庫資訊。"; + $lang->msg_dbconnect_failed = '連接資料庫時發生錯誤。\n請重新確認資料庫資訊。'; $lang->msg_invalid_queryid = 'Query ID值指定錯誤'; $lang->msg_not_permitted = '沒有權限'; $lang->msg_input_password = '請輸入密碼'; @@ -226,6 +230,7 @@ $lang->success_declared = '檢舉成功!'; $lang->success_updated = '修改成功!'; $lang->success_deleted = '刪除成功!'; + $lang->success_restore = '成功還原!'; $lang->success_voted = '推薦成功!'; $lang->success_blamed = '反對成功!'; $lang->success_moved = '移動成功!'; @@ -267,6 +272,7 @@ $lang->default_value = '預設值'; $lang->is_active = '啟動'; $lang->is_required = '必填'; + $lang->eid = '延伸變數名稱'; // 關於FTP $lang->ftp_form_title = '輸入FTP資訊'; @@ -293,7 +299,7 @@ $lang->filter->outofrange = '請確認%s字數'; $lang->filter->equalto = '%s值有誤。'; $lang->filter->invalid_email = '%s格式有誤。(例:zbxe@zeroboard.com)'; - $lang->filter->invalid_user_id = $lang->filter->invalid_userid = "%s只能用英文,數字和 _,第一個字母必須是英文。"; + $lang->filter->invalid_user_id = $lang->filter->invalid_userid = "%s只能用英文,數字和 _,開頭必須是英文。"; $lang->filter->invalid_homepage = '%s格式有誤。(例: http://www.zeroboard.com)'; $lang->filter->invalid_korean = '%s只能輸入中文'; $lang->filter->invalid_korean_number = '%s只能輸入中文或數字'; diff --git a/common/tpl/common_layout.html b/common/tpl/common_layout.html index c71aca0b5..459102ae3 100644 --- a/common/tpl/common_layout.html +++ b/common/tpl/common_layout.html @@ -43,7 +43,7 @@ - + @@ -52,6 +52,7 @@ + +
+
+
+ +
+
+ + + +
+
{$upload_status}
+
+ +
+ + + \ No newline at end of file diff --git a/modules/editor/skins/xpresseditor/img/bg_qmark.gif b/modules/editor/skins/xpresseditor/img/bg_qmark.gif new file mode 100644 index 000000000..5a8a44625 Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/bg_qmark.gif differ diff --git a/modules/editor/skins/xpresseditor/img/bg_tool.gif b/modules/editor/skins/xpresseditor/img/bg_tool.gif new file mode 100644 index 000000000..219957ada Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/bg_tool.gif differ diff --git a/modules/editor/skins/xpresseditor/img/btn_confirm.gif b/modules/editor/skins/xpresseditor/img/btn_confirm.gif new file mode 100644 index 000000000..fd78c5fdd Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/btn_confirm.gif differ diff --git a/modules/editor/skins/xpresseditor/img/btn_expand.gif b/modules/editor/skins/xpresseditor/img/btn_expand.gif new file mode 100644 index 000000000..17f251cec Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/btn_expand.gif differ diff --git a/modules/editor/skins/xpresseditor/img/btn_extension.gif b/modules/editor/skins/xpresseditor/img/btn_extension.gif new file mode 100644 index 000000000..0083bc1b8 Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/btn_extension.gif differ diff --git a/modules/editor/skins/xpresseditor/img/btn_layer_cancel.gif b/modules/editor/skins/xpresseditor/img/btn_layer_cancel.gif new file mode 100644 index 000000000..789f82ae5 Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/btn_layer_cancel.gif differ diff --git a/modules/editor/skins/xpresseditor/img/btn_layer_cell_adjust.gif b/modules/editor/skins/xpresseditor/img/btn_layer_cell_adjust.gif new file mode 100644 index 000000000..3d7110db4 Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/btn_layer_cell_adjust.gif differ diff --git a/modules/editor/skins/xpresseditor/img/btn_layer_close.gif b/modules/editor/skins/xpresseditor/img/btn_layer_close.gif new file mode 100644 index 000000000..5bdbbc1ef Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/btn_layer_close.gif differ diff --git a/modules/editor/skins/xpresseditor/img/btn_layer_confirm.gif b/modules/editor/skins/xpresseditor/img/btn_layer_confirm.gif new file mode 100644 index 000000000..519fb734d Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/btn_layer_confirm.gif differ diff --git a/modules/editor/skins/xpresseditor/img/btn_layer_find_next.gif b/modules/editor/skins/xpresseditor/img/btn_layer_find_next.gif new file mode 100644 index 000000000..986902051 Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/btn_layer_find_next.gif differ diff --git a/modules/editor/skins/xpresseditor/img/btn_layer_find_next_strong.gif b/modules/editor/skins/xpresseditor/img/btn_layer_find_next_strong.gif new file mode 100644 index 000000000..f1f183ec1 Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/btn_layer_find_next_strong.gif differ diff --git a/modules/editor/skins/xpresseditor/img/btn_layer_replace.gif b/modules/editor/skins/xpresseditor/img/btn_layer_replace.gif new file mode 100644 index 000000000..10051f3df Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/btn_layer_replace.gif differ diff --git a/modules/editor/skins/xpresseditor/img/btn_layer_replace_all.gif b/modules/editor/skins/xpresseditor/img/btn_layer_replace_all.gif new file mode 100644 index 000000000..7264bb1ad Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/btn_layer_replace_all.gif differ diff --git a/modules/editor/skins/xpresseditor/img/btn_layer_tab.gif b/modules/editor/skins/xpresseditor/img/btn_layer_tab.gif new file mode 100644 index 000000000..52153bdd9 Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/btn_layer_tab.gif differ diff --git a/modules/editor/skins/xpresseditor/img/btn_qmark.gif b/modules/editor/skins/xpresseditor/img/btn_qmark.gif new file mode 100644 index 000000000..b1fef0a5b Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/btn_qmark.gif differ diff --git a/widgets/rss_reader/skins/sz_xe/images/ico_new01.gif b/modules/editor/skins/xpresseditor/img/btn_search.gif similarity index 59% rename from widgets/rss_reader/skins/sz_xe/images/ico_new01.gif rename to modules/editor/skins/xpresseditor/img/btn_search.gif index aa3ea6069..3f69bd4ec 100644 Binary files a/widgets/rss_reader/skins/sz_xe/images/ico_new01.gif and b/modules/editor/skins/xpresseditor/img/btn_search.gif differ diff --git a/modules/editor/skins/xpresseditor/img/btn_set.gif b/modules/editor/skins/xpresseditor/img/btn_set.gif new file mode 100644 index 000000000..c4cca3da5 Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/btn_set.gif differ diff --git a/modules/editor/skins/xpresseditor/img/btn_set_blank.gif b/modules/editor/skins/xpresseditor/img/btn_set_blank.gif new file mode 100644 index 000000000..5da1aab28 Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/btn_set_blank.gif differ diff --git a/modules/editor/skins/xpresseditor/img/bx_character.gif b/modules/editor/skins/xpresseditor/img/bx_character.gif new file mode 100644 index 000000000..eff0d8921 Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/bx_character.gif differ diff --git a/modules/editor/skins/xpresseditor/img/bx_find.gif b/modules/editor/skins/xpresseditor/img/bx_find.gif new file mode 100644 index 000000000..4dc6c8e95 Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/bx_find.gif differ diff --git a/modules/editor/skins/xpresseditor/img/bx_table.gif b/modules/editor/skins/xpresseditor/img/bx_table.gif new file mode 100644 index 000000000..820f5e1a8 Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/bx_table.gif differ diff --git a/modules/editor/skins/xpresseditor/img/bx_url.gif b/modules/editor/skins/xpresseditor/img/bx_url.gif new file mode 100644 index 000000000..8840fe3a7 Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/bx_url.gif differ diff --git a/modules/editor/skins/xpresseditor/img/vr_layer_character.gif b/modules/editor/skins/xpresseditor/img/vr_layer_character.gif new file mode 100644 index 000000000..e77bbe640 Binary files /dev/null and b/modules/editor/skins/xpresseditor/img/vr_layer_character.gif differ diff --git a/modules/editor/skins/xpresseditor/js/Xpress_Editor.js b/modules/editor/skins/xpresseditor/js/Xpress_Editor.js new file mode 100644 index 000000000..73d6a8c3c --- /dev/null +++ b/modules/editor/skins/xpresseditor/js/Xpress_Editor.js @@ -0,0 +1,249 @@ + +(function($){$.extend({Class:function(def){function c(){if(typeof this.$super!='undefined')this.$super.$this=this;if($.isFunction(this.$init))this.$init.apply(this,arguments);} +c.prototype=def;c.constructor=c;c.extend=Class_extend;return c;},$:function(id){if(typeof id=='string'){if(id.substring(0,1)=='<')return $(id).get(0);return $('#'+id).get(0);}else{return id;}},fnBind:function(fn,th){var args=$.makeArray(arguments);args.shift();args.shift();return function(){var a=args.concat($.makeArray(arguments));return fn.apply(th,a);};}});$.browser.nVersion=parseFloat($.browser.version);function Class_extend(superDef){var Super=superDef.prototype;this.prototype.$super={};function bind(fn){return function(){return fn.apply(this.$this,arguments);};} +for(var x in Super){if(!Super.propertyIsEnumerable(x))continue;if(typeof this.prototype[x]=='undefined')this.prototype[x]=Super[x];this.prototype.$super[x]=$.isFunction(Super[x])?bind(Super[x]):Super[x];} +return this;}})(jQuery);if(typeof window.xe=='undefined')window.xe={};xe.XpressCore=jQuery.Class({name:"XpressCore",$init:function(htOptions){htOptions=!htOptions?{}:jQuery.Class({}).extend({oDebugger:null}).extend(htOptions);if(htOptions.oDebugger){this.oDebugger=htOptions.oDebugger;this.oDebugger.oApp=this;} +this.commandQueue=[];this.oCommandMap={};this.oDisabledCommand={};this.aPlugins=[];this.appStatus=xe.APP_STATUS["NOT_READY"];this.registerPlugin(this);},exec:function(msg,args,oEvent){if(this.appStatus==xe.APP_STATUS["NOT_READY"]){this.commandQueue[this.commandQueue.length]={'msg':msg,'args':args,'event':oEvent};return true;} +this.exec=this._exec;this.exec(msg,args,oEvent);},delayedExec:function(msg,args,nDelay,oEvent){var fExec=jQuery.fnBind(this.exec,this,msg,args,oEvent);setTimeout(fExec,nDelay);},_exec:function(msg,args,oEvent){return(this._exec=this.oDebugger?this._execWithDebugger:this._execWithoutDebugger).call(this,msg,args,oEvent);},_execWithDebugger:function(msg,args,oEvent){this.oDebugger.log_MessageStart(msg,args);var bResult=this._doExec(msg,args,oEvent);this.oDebugger.log_MessageEnd(msg,args);return bResult;},_execWithoutDebugger:function(msg,args,oEvent){return this._doExec(msg,args,oEvent);},_doExec:function(msg,args,oEvent){var bContinue=false;if(!this.oDisabledCommand[msg]){var allArgs=[];if(args&&args.length){var iLen=args.length;for(var i=0;i=0&&xe.DOMFix.parentNode(aAllNodes[iChildIdx])==aAllNodes[iCurIdx]){iChildIdx=this._recurConstructClonedTree(aAllNodes,iChildIdx,aAllNodes[iCurIdx],oCurNodeCloneWithChildren,oClonedStartContainer,oClonedEndContainer);} +oClonedParentNode.insertBefore(oCurNodeCloneWithChildren,oClonedParentNode.firstChild);return iChildIdx;};aNodes[aNodes.length]=xe.DOMFix.parentNode(aNodes[aNodes.length-1]);_recurConstructClonedTree(aNodes,aNodes.length-1,aNodes[aNodes.length-1],oClonedParentNode);return{oStartContainer:oClonedStartContainer,oEndContainer:oClonedEndContainer};},cloneRange:function(){return this._copyRange(new xe.W3CDOMRange(this._document));},_copyRange:function(oClonedRange){oClonedRange.collapsed=this.collapsed;oClonedRange.commonAncestorContainer=this.commonAncestorContainer;oClonedRange.endContainer=this.endContainer;oClonedRange.endOffset=this.endOffset;oClonedRange.startContainer=this.startContainer;oClonedRange.startOffset=this.startOffset;oClonedRange._document=this._document;return oClonedRange;},collapse:function(toStart){if(toStart){this.endContainer=this.startContainer;this.endOffset=this.startOffset;}else{this.startContainer=this.endContainer;this.startOffset=this.endOffset;} +this._updateRangeInfo();},compareBoundaryPoints:function(how,sourceRange){switch(how){case xe.W3CDOMRange.START_TO_START:return this._compareEndPoint(this.startContainer,this.startOffset,sourceRange.startContainer,sourceRange.startOffset);case xe.W3CDOMRange.START_TO_END:return this._compareEndPoint(this.endContainer,this.endOffset,sourceRange.startContainer,sourceRange.startOffset);case xe.W3CDOMRange.END_TO_END:return this._compareEndPoint(this.endContainer,this.endOffset,sourceRange.endContainer,sourceRange.endOffset);case xe.W3CDOMRange.END_TO_START:return this._compareEndPoint(this.startContainer,this.startOffset,sourceRange.endContainer,sourceRange.endOffset);}},_findBody:function(oNode){if(!oNode)return null;while(oNode){if(oNode.tagName=="BODY")return oNode;oNode=xe.DOMFix.parentNode(oNode);} +return null;},_compareEndPoint:function(oContainerA,iOffsetA,oContainerB,iOffsetB){var iIdxA,iIdxB;if(!oContainerA||this._findBody(oContainerA)!=this._document.body){oContainerA=this._document.body;iOffsetA=0;} +if(!oContainerB||this._findBody(oContainerB)!=this._document.body){oContainerB=this._document.body;iOffsetB=0;} +var compareIdx=function(iIdxA,iIdxB){if(iIdxB==-1)iIdxB=iIdxA+1;if(iIdxAoNode.nodeValue.length)iOffset=oNode.nodeValue.length;}else{if(iOffset>xe.DOMFix.childNodes(oNode).length)iOffset=xe.DOMFix.childNodes(oNode).length;} +return iOffset;},setEnd:function(refNode,offset){offset=this._endsNodeValidation(refNode,offset);this.endContainer=refNode;this.endOffset=offset;if(!this.startContainer||this._compareEndPoint(this.startContainer,this.startOffset,this.endContainer,this.endOffset)!=-1)this.collapse(false);this._updateRangeInfo();},setEndAfter:function(refNode){if(!refNode)throw new Error("INVALID_NODE_TYPE_ERR in setEndAfter");if(refNode.tagName=="BODY"){this.setEnd(refNode,xe.DOMFix.childNodes(refNode).length);return;} +this.setEnd(xe.DOMFix.parentNode(refNode),this._getPosIdx(refNode)+1);},setEndBefore:function(refNode){if(!refNode)throw new Error("INVALID_NODE_TYPE_ERR in setEndBefore");if(refNode.tagName=="BODY"){this.setEnd(refNode,0);return;} +this.setEnd(xe.DOMFix.parentNode(refNode),this._getPosIdx(refNode));},setStart:function(refNode,offset){offset=this._endsNodeValidation(refNode,offset);this.startContainer=refNode;this.startOffset=offset;if(!this.endContainer||this._compareEndPoint(this.startContainer,this.startOffset,this.endContainer,this.endOffset)!=-1)this.collapse(true);this._updateRangeInfo();},setStartAfter:function(refNode){if(!refNode)throw new Error("INVALID_NODE_TYPE_ERR in setStartAfter");if(refNode.tagName=="BODY"){this.setStart(refNode,xe.DOMFix.childNodes(refNode).length);return;} +this.setStart(xe.DOMFix.parentNode(refNode),this._getPosIdx(refNode)+1);},setStartBefore:function(refNode){if(!refNode)throw new Error("INVALID_NODE_TYPE_ERR in setStartBefore");if(refNode.tagName=="BODY"){this.setStart(refNode,0);return;} +this.setStart(xe.DOMFix.parentNode(refNode),this._getPosIdx(refNode));},surroundContents:function(newParent){newParent.appendChild(this.extractContents());this.insertNode(newParent);this.selectNode(newParent);},toString:function(){var oTmpContainer=this._document.createElement("DIV");oTmpContainer.appendChild(this.cloneContents());return oTmpContainer.textContent||oTmpContainer.innerText||"";},_isBlankTextNode:function(oNode){if(oNode.nodeType==3&&oNode.nodeValue=="")return true;return false;},_getPosIdx:function(refNode){var idx=0;for(var node=refNode.previousSibling;node;node=node.previousSibling)idx++;return idx;},_updateRangeInfo:function(){if(!this.startContainer){this.init(this._document);return;} +this.collapsed=this._isCollapsed(this.startContainer,this.startOffset,this.endContainer,this.endOffset);this.commonAncestorContainer=this._getCommonAncestorContainer(this.startContainer,this.endContainer);},_isCollapsed:function(oStartContainer,iStartOffset,oEndContainer,iEndOffset){var bCollapsed=false;if(oStartContainer==oEndContainer&&iStartOffset==iEndOffset){bCollapsed=true;}else{var oActualStartNode=this._getActualStartNode(oStartContainer,iStartOffset);var oActualEndNode=this._getActualEndNode(oEndContainer,iEndOffset);oActualStartNode=this._getNextNode(this._getPrevNode(oActualStartNode));oActualEndNode=this._getPrevNode(this._getNextNode(oActualEndNode));if(oActualStartNode&&oActualEndNode&&oActualEndNode.tagName!="BODY"&&(this._getNextNode(oActualEndNode)==oActualStartNode||(oActualEndNode==oActualStartNode&&this._isBlankTextNode(oActualEndNode)))) +bCollapsed=true;} +return bCollapsed;},_splitTextEndNodesOfTheRange:function(){var oEndPoints=this._splitTextEndNodes({oStartContainer:this.startContainer,iStartOffset:this.startOffset,oEndContainer:this.endContainer,iEndOffset:this.endOffset});this.startContainer=oEndPoints.oStartContainer;this.startOffset=oEndPoints.iStartOffset;this.endContainer=oEndPoints.oEndContainer;this.endOffset=oEndPoints.iEndOffset;},_splitTextEndNodes:function(oEndPoints){oEndPoints=this._splitStartTextNode(oEndPoints);oEndPoints=this._splitEndTextNode(oEndPoints);return oEndPoints;},_splitStartTextNode:function(oEndPoints){var oStartContainer=oEndPoints.oStartContainer;var iStartOffset=oEndPoints.iStartOffset;var oEndContainer=oEndPoints.oEndContainer;var iEndOffset=oEndPoints.iEndOffset;if(!oStartContainer)return oEndPoints;if(oStartContainer.nodeType!=3)return oEndPoints;if(iStartOffset==0)return oEndPoints;if(oStartContainer.nodeValue.length<=iStartOffset)return oEndPoints;var oLastPart=oStartContainer.splitText(iStartOffset);if(oStartContainer==oEndContainer){iEndOffset-=iStartOffset;oEndContainer=oLastPart;} +oStartContainer=oLastPart;iStartOffset=0;return{oStartContainer:oStartContainer,iStartOffset:iStartOffset,oEndContainer:oEndContainer,iEndOffset:iEndOffset};},_splitEndTextNode:function(oEndPoints){var oStartContainer=oEndPoints.oStartContainer;var iStartOffset=oEndPoints.iStartOffset;var oEndContainer=oEndPoints.oEndContainer;var iEndOffset=oEndPoints.iEndOffset;if(!oEndContainer)return oEndPoints;if(oEndContainer.nodeType!=3)return oEndPoints;if(iEndOffset>=oEndContainer.nodeValue.length)return oEndPoints;if(iEndOffset==0)return oEndPoints;oEndContainer.splitText(iEndOffset);return{oStartContainer:oStartContainer,iStartOffset:iStartOffset,oEndContainer:oEndContainer,iEndOffset:iEndOffset};},_getNodesInRange:function(){if(this.collapsed)return[];var oStartNode=this._getActualStartNode(this.startContainer,this.startOffset);var oEndNode=this._getActualEndNode(this.endContainer,this.endOffset);return this._getNodesBetween(oStartNode,oEndNode);},_getActualStartNode:function(oStartContainer,iStartOffset){var oStartNode=oStartContainer;;if(oStartContainer.nodeType==3){if(iStartOffset>=oStartContainer.nodeValue.length){oStartNode=this._getNextNode(oStartContainer);if(oStartNode.tagName=="BODY")oStartNode=null;}else{oStartNode=oStartContainer;}}else{if(iStartOffset=this.startContainer.nodeValue.length)return this._getNextNode(this.startContainer);return this.startContainer;}else{if(this.startOffset>=xe.DOMFix.childNodes(this.startContainer).length)return this._getNextNode(this.startContainer);return xe.DOMFix.childNodes(this.startContainer)[this.startOffset];}},getEndNode:function(){if(this.collapsed)return this.getStartNode();if(this.endContainer.nodeType==3){if(this.endOffset==0)return this._getPrevNode(this.endContainer);return this.endContainer;}else{if(this.endOffset==0)return this._getPrevNode(this.endContainer);return xe.DOMFix.childNodes(this.endContainer)[this.endOffset-1];}},getNodeAroundRange:function(bBefore,bStrict){if(this.collapsed&&this.startContainer&&this.startContainer.nodeType==3)return this.startContainer;if(!this.collapsed||(this.startContainer&&this.startContainer.nodeType==3))return this.getStartNode();var oBeforeRange,oAfterRange,oResult;if(this.startOffset>=xe.DOMFix.childNodes(this.startContainer).length) +oAfterRange=this._getNextNode(this.startContainer);else +oAfterRange=xe.DOMFix.childNodes(this.startContainer)[this.startOffset];if(this.endOffset==0) +oBeforeRange=this._getPrevNode(this.endContainer);else +oBeforeRange=xe.DOMFix.childNodes(this.endContainer)[this.endOffset-1];if(bBefore){oResult=oBeforeRange;if(!oResult&&!bStrict)oResult=oAfterRange;}else{oResult=oAfterRange;if(!oResult&&!bStrict)oResult=oBeforeRange;} +return oResult;},_getXPath:function(elNode){var sXPath="";while(elNode&&elNode.nodeType==1){sXPath="/"+elNode.tagName+"["+this._getPosIdx4XPath(elNode)+"]"+sXPath;elNode=xe.DOMFix.parentNode(elNode);} +return sXPath;},_getPosIdx4XPath:function(refNode){var idx=0;for(var node=refNode.previousSibling;node;node=node.previousSibling) +if(node.tagName==refNode.tagName)idx++;return idx;},_evaluateXPath:function(sXPath,oDoc){sXPath=sXPath.substring(1,sXPath.length-1);var aXPath=sXPath.split(/\//);var elNode=oDoc.body;for(var i=2;i-1&&elContainer){var aChildNodes=xe.DOMFix.childNodes(elContainer);var elNode=null;var nIdx=nTextNodeIdx;var nOffsetLeft=nOffset;while((elNode=aChildNodes[nIdx])&&elNode.nodeType==3&&elNode.nodeValue.length=0)return true;if(bIncludePartlyIncluded){if(startToEnd==1)return false;if(endToStart==-1)return false;return true;} +return false;},isNodeInRange:function(oNode,bIncludePartlySelected,bContentOnly){var oTmpRange=new xe.XpressRange(this._window);if(bContentOnly&&oNode.firstChild){oTmpRange.setStartBefore(oNode.firstChild);oTmpRange.setEndAfter(oNode.lastChild);}else{oTmpRange.selectNode(oNode);} +return isRangeInRange(oTmpRange,bIncludePartlySelected);},pasteHTML:function(sHTML){if(sHTML==""){this.deleteContents();return;} +var oTmpDiv=this._document.createElement("DIV");oTmpDiv.innerHTML=sHTML;var oFirstNode=oTmpDiv.firstChild;var oLastNode=oTmpDiv.lastChild;var clone=this.cloneRange();var sBM=clone.placeStringBookmark();while(oTmpDiv.lastChild)this.insertNode(oTmpDiv.lastChild);this.setEndNodes(oFirstNode,oLastNode);clone.moveToBookmark(sBM);clone.deleteContents();clone.removeStringBookmark(sBM);},toString:function(){this.toString=xe.W3CDOMRange.prototype.toString;return this.toString();},toHTMLString:function(){var oTmpContainer=this._document.createElement("DIV");oTmpContainer.appendChild(this.cloneContents());return oTmpContainer.innerHTML;},findAncestorByTagName:function(sTagName){var oNode=this.commonAncestorContainer;while(oNode&&oNode.tagName!=sTagName)oNode=xe.DOMFix.parentNode(oNode);return oNode;},selectNodeContents:function(oNode){if(!oNode)return;var oFirstNode=oNode.firstChild?oNode.firstChild:oNode;var oLastNode=oNode.lastChild?oNode.lastChild:oNode;if(oFirstNode.nodeType==3) +this.setStart(oFirstNode,0);else +this.setStartBefore(oFirstNode);if(oLastNode.nodeType==3) +this.setEnd(oLastNode,oLastNode.nodeValue.length);else +this.setEndAfter(oLastNode);},styleRange:function(oStyle,oAttribute,sNewSpanMarker){var aStyleParents=this._getStyleParentNodes(sNewSpanMarker);if(aStyleParents.length<1)return;var sName,sValue;for(var i=0;i=0)){oSNode=this.getNodeAroundRange(false,true);oENode=this.getNodeAroundRange(false,true);oStart=this._getLineStartInfo(oSNode);oEnd=this._getLineEndInfo(oENode);} +return{oStart:oStart,oEnd:oEnd};}}).extend(xe.W3CDOMRange);xe.SimpleSelection=function(win){this.init=function(win){this._window=win||window;this._document=this._window.document;};this.init(win);if(jQuery.browser.msie) +xe.SimpleSelectionImpl_IE.apply(this);else +xe.SimpleSelectionImpl_FF.apply(this);this.selectRange=function(oRng){this.selectNone();this.addRange(oRng);};this.selectionLoaded=true;if(!this._oSelection)this.selectionLoaded=false;};xe.SimpleSelectionImpl_FF=function(){this._oSelection=this._window.getSelection();this.getRangeAt=function(iNum){iNum=iNum||0;try{var oFFRange=this._oSelection.getRangeAt(iNum);}catch(e){return new xe.W3CDOMRange(this._document);} +return this._FFRange2W3CRange(oFFRange);};this.addRange=function(oW3CRange){var oFFRange=this._W3CRange2FFRange(oW3CRange);this._oSelection.addRange(oFFRange);};this.selectNone=function(){this._oSelection.removeAllRanges();};this._FFRange2W3CRange=function(oFFRange){var oW3CRange=new xe.W3CDOMRange(this._document);oW3CRange.setStart(oFFRange.startContainer,oFFRange.startOffset);oW3CRange.setEnd(oFFRange.endContainer,oFFRange.endOffset);return oW3CRange;};this._W3CRange2FFRange=function(oW3CRange){var oFFRange=this._document.createRange();oFFRange.setStart(oW3CRange.startContainer,oW3CRange.startOffset);oFFRange.setEnd(oW3CRange.endContainer,oW3CRange.endOffset);return oFFRange;};};xe.SimpleSelectionImpl_IE=function(){this._oSelection=this._document.selection;this.getRangeAt=function(iNum){iNum=iNum||0;if(this._oSelection.type=="Control"){var oW3CRange=new xe.W3CDOMRange(this._document);var oSelectedNode=this._oSelection.createRange().item(iNum);if(!oSelectedNode||oSelectedNode.ownerDocument!=this._document)return oW3CRange;oW3CRange.selectNode(oSelectedNode);return oW3CRange;}else{var oSelectedNode=this._oSelection.createRangeCollection().item(iNum).parentElement();if(!oSelectedNode||oSelectedNode.ownerDocument!=this._document){var oW3CRange=new xe.W3CDOMRange(this._document);return oW3CRange;} +return this._IERange2W3CRange(this._oSelection.createRangeCollection().item(iNum));}};this.addRange=function(oW3CRange){var oIERange=this._W3CRange2IERange(oW3CRange);oIERange.select();};this.selectNone=function(){this._oSelection.empty();};this._W3CRange2IERange=function(oW3CRange){var oStartIERange=this._getIERangeAt(oW3CRange.startContainer,oW3CRange.startOffset);var oEndIERange=this._getIERangeAt(oW3CRange.endContainer,oW3CRange.endOffset);oStartIERange.setEndPoint("EndToEnd",oEndIERange);return oStartIERange;};this._getIERangeAt=function(oW3CContainer,iW3COffset){var oIERange=this._document.body.createTextRange();var oEndPointInfoForIERange=this._getSelectableNodeAndOffsetForIE(oW3CContainer,iW3COffset);var oSelectableNode=oEndPointInfoForIERange.oSelectableNodeForIE;var iIEOffset=oEndPointInfoForIERange.iOffsetForIE;oIERange.moveToElementText(oSelectableNode);oIERange.collapse(oEndPointInfoForIERange.bCollapseToStart);oIERange.moveStart("character",iIEOffset);return oIERange;};this._getSelectableNodeAndOffsetForIE=function(oW3CContainer,iW3COffset){var oIERange=this._document.body.createTextRange();var oNonTextNode=null;var aChildNodes=null;var iNumOfLeftNodesToCount=0;if(oW3CContainer.nodeType==3){oNonTextNode=xe.DOMFix.parentNode(oW3CContainer);aChildNodes=xe.DOMFix.childNodes(oNonTextNode);iNumOfLeftNodesToCount=aChildNodes.length;}else{oNonTextNode=oW3CContainer;aChildNodes=xe.DOMFix.childNodes(oNonTextNode);iNumOfLeftNodesToCount=iW3COffset;} +var oNodeTester=null;var iResultOffset=0;var bCollapseToStart=true;for(var i=0;i=0)break;oPrevNonTextNode=aChildNodes[i];} +var pointRangeIdx=i;if(pointRangeIdx!=0&&aChildNodes[pointRangeIdx-1].nodeType==3){var oRgTextStart=this._document.body.createTextRange();var oCurTextNode=null;if(oPrevNonTextNode){oRgTextStart.moveToElementText(oPrevNonTextNode);oRgTextStart.collapse(false);oCurTextNode=oPrevNonTextNode.nextSibling;}else{oRgTextStart.moveToElementText(oContainer);oRgTextStart.collapse(true);oCurTextNode=oContainer.firstChild;} +var oRgTextsUpToThePoint=oRgOrigPoint.duplicate();oRgTextsUpToThePoint.setEndPoint("StartToStart",oRgTextStart);var textCount=oRgTextsUpToThePoint.text.length +while(textCount>oCurTextNode.nodeValue.length&&oCurTextNode.nextSibling){textCount-=oCurTextNode.nodeValue.length;oCurTextNode=oCurTextNode.nextSibling;} +var oTmp=oCurTextNode.nodeValue;if(bStartPt&&oCurTextNode.nextSibling&&oCurTextNode.nextSibling.nodeType==3&&textCount==oCurTextNode.nodeValue.length){textCount-=oCurTextNode.nodeValue.length;oCurTextNode=oCurTextNode.nextSibling;} +oContainer=oCurTextNode;offset=textCount;}else{oContainer=oRgOrigPoint.parentElement();offset=pointRangeIdx;} +return{"oContainer":oContainer,"iOffset":offset};};} +xe.DOMFix=new(jQuery.Class({$init:function(){if(jQuery.browser.msie||jQuery.browser.opera){this.childNodes=this._childNodes_Fix;this.parentNode=this._parentNode_Fix;}else{this.childNodes=this._childNodes_Native;this.parentNode=this._parentNode_Native;}},_parentNode_Native:function(elNode){return elNode.parentNode;},_parentNode_Fix:function(elNode){if(!elNode)return elNode;while(elNode.previousSibling){elNode=elNode.previousSibling;} +return elNode.parentNode;},_childNodes_Native:function(elNode){return elNode.childNodes;},_childNodes_Fix:function(elNode){var aResult=null;var nCount=0;if(elNode){var aResult=[];elNode=elNode.firstChild;while(elNode){aResult[nCount++]=elNode;elNode=elNode.nextSibling;}} +return aResult;}}))();xe.FindReplace=jQuery.Class({sKeyword:"",window:null,document:null,bBrowserSupported:false,bEOC:false,$init:function(win){this.window=win;this.document=this.window.document;if(this.document.domain!=this.document.location.hostname){if(jQuery.browser.mozilla&&jQuery.browser.nVersion<3){this.bBrowserSupported=false;this.find=function(){return 3};return;}} +this.bBrowserSupported=true;},find:function(sKeyword,bCaseMatch,bBackwards,bWholeWord){var bSearchResult,bFreshSearch;this.window.focus();if(!sKeyword)return 2;this.bEOC=false;bSearchResult=this.findNext(sKeyword,bCaseMatch,bBackwards,bWholeWord);if(bSearchResult)return 0;this.bEOC=true;bSearchResult=this.findNew(sKeyword,bCaseMatch,bBackwards,bWholeWord);if(bSearchResult)return 0;return 1;},findNew:function(sKeyword,bCaseMatch,bBackwards,bWholeWord){this.findReset();return this.findNext(sKeyword,bCaseMatch,bBackwards,bWholeWord);},findNext:function(sKeyword,bCaseMatch,bBackwards,bWholeWord){var bSearchResult;bCaseMatch=bCaseMatch||false;bWholeWord=bWholeWord||false;bBackwards=bBackwards||false;if(this.window.find){var bWrapAround=false;return this.window.find(sKeyword,bCaseMatch,bBackwards,bWrapAround,bWholeWord);} +if(this.document.body.createTextRange){var iOption=0;if(bBackwards)iOption+=1;if(bWholeWord)iOption+=2;if(bCaseMatch)iOption+=4;this.window.focus();this._range=this.document.selection.createRangeCollection().item(0);this._range.collapse(false);bSearchResult=this._range.findText(sKeyword,1,iOption);this._range.select();return bSearchResult;} +return false;},findReset:function(){if(this.window.find){this.window.getSelection().removeAllRanges();return;} +if(this.document.body.createTextRange){this._range=this.document.body.createTextRange();this._range.collapse(true);this._range.select();}},replace:function(sOriginalWord,Replacement,bCaseMatch,bBackwards,bWholeWord){if(!sOriginalWord)return 4;var oSelection=new xe.XpressRange(this.window);oSelection.setFromSelection();bCaseMatch=bCaseMatch||false;var bMatch,selectedText=oSelection.toString();if(bCaseMatch) +bMatch=(selectedText==sOriginalWord);else +bMatch=(selectedText.toLowerCase()==sOriginalWord.toLowerCase());if(!bMatch) +return this.find(sOriginalWord,bCaseMatch,bBackwards,bWholeWord)+2;if(typeof Replacement=="function"){oSelection=Replacement(oSelection);}else{oSelection.pasteHTML(Replacement);} +oSelection.select();return this.find(sOriginalWord,bCaseMatch,bBackwards,bWholeWord);},replaceAll:function(sOriginalWord,Replacement,bCaseMatch,bWholeWord){if(!sOriginalWord)return-1;var bBackwards=false;var iReplaceResult;var iResult=0;var win=this.window;var oSelection=new xe.XpressRange(this.window);oSelection.setFromSelection();var sBookmark=oSelection.placeStringBookmark();this.bEOC=false;while(!this.bEOC){iReplaceResult=this.replace(sOriginalWord,Replacement,bCaseMatch,bBackwards,bWholeWord);if(iReplaceResult==0||iReplaceResult==1)iResult++;} +var startingPointReached=function(){var oCurSelection=new xe.XpressRange(win);oCurSelection.setFromSelection();oSelection.moveToBookmark(sBookmark);var pos=oSelection.compareBoundaryPoints(xe.W3CDOMRange.START_TO_END,oCurSelection);if(pos==1)return false;return true;} +iReplaceResult=0;this.bEOC=false;while(!startingPointReached()&&iReplaceResult==0&&!this.bEOC){iReplaceResult=this.replace(sOriginalWord,Replacement,bCaseMatch,bBackwards,bWholeWord);if(iReplaceResult==0||iReplaceResult==1)iResult++;} +oSelection.moveToBookmark(sBookmark);oSelection.select();oSelection.removeStringBookmark(sBookmark);return iResult;}});xe.DraggableLayer=jQuery.Class({$init:function(oLayer,oOptions){this.oOptions=jQuery.extend({bModal:"false",oHandle:oLayer,iMinX:-999999,iMinY:-999999,iMaxX:999999,iMaxY:999999},oOptions);this.oHandle=this.oOptions.oHandle;oLayer.style.display="block";oLayer.style.position="absolute";oLayer.style.zIndex="9999";this.aBasePosition=this.getBaseOffset(oLayer);oLayer.style.top=(this.toInt(jQuery(oLayer).offset().top)-this.aBasePosition.top)+"px";oLayer.style.left=(this.toInt(jQuery(oLayer).offset().left)-this.aBasePosition.left)+"px";this.$FnMouseDown=jQuery.fnBind(this._mousedown,this,oLayer);this.$FnMouseMove=jQuery.fnBind(this._mousemove,this,oLayer);this.$FnMouseUp=jQuery.fnBind(this._mouseup,this,oLayer);jQuery(this.oHandle).bind("mousedown",this.$FnMouseDown);},_mousedown:function(oLayer,oEvent){if(oEvent.target.tagName=="INPUT")return;this.MouseOffsetY=(oEvent.pageY-this.toInt(oLayer.style.top)-this.aBasePosition['top']);this.MouseOffsetX=(oEvent.pageX-this.toInt(oLayer.style.left)-this.aBasePosition['left']);jQuery(oLayer).bind("mousemove",this.$FnMouseMove);jQuery(oLayer).bind("mouseup",this.$FnMouseUp);},_mousemove:function(oLayer,oEvent){var iTop=(oEvent.pageY-this.MouseOffsetY-this.aBasePosition['top']);var iLeft=(oEvent.pageX-this.MouseOffsetX-this.aBasePosition['left']);if(iTopthis.oOptions.iMaxY)iTop=this.oOptions.iMaxY;if(iLeftthis.oOptions.iMaxX)iLeft=this.oOptions.iMaxX;oLayer.style.top=iTop+"px";oLayer.style.left=iLeft+"px";},_mouseup:function(oLayer,oEvent){jQuery(oLayer).unbind("mousemove",this.$FnMouseMove);jQuery(oLayer).unbind("mouseup",this.$FnMouseUp);},toInt:function(num){var result=parseInt(num);return result||0;},findNonStatic:function(oEl){if(!oEl)return null;if(oEl.tagName=="BODY")return oEl;if(jQuery(oEl).css("position").match(/absolute|relative/i))return oEl;return this.findNonStatic(oEl.offsetParent);},getBaseOffset:function(oEl){var oBase=this.findNonStatic(oEl.offsetParent);var tmp=jQuery(oBase).offset();return{top:tmp.top,left:tmp.left};}});xe.CorePlugin=jQuery.Class({name:"CorePlugin",$init:function(funcOnReady){this.funcOnReady=funcOnReady;},$AFTER_MSG_APP_READY:function(){this.oApp.exec("EXEC_ON_READY_FUNCTION",[]);},$ON_ADD_APP_PROPERTY:function(sPropertyName,oProperty){this.oApp[sPropertyName]=oProperty;},$ON_REGISTER_BROWSER_EVENT:function(obj,sEvent,sCMD,aParams,nDelay){this.oApp.registerBrowserEvent(obj,sEvent,sCMD,aParams,nDelay);},$ON_DISABLE_COMMAND:function(sCommand){this.oApp.disableCommand(sCommand,true);},$ON_ENABLE_COMMAND:function(sCommand){this.oApp.disableCommand(sCommand,false);},$ON_EXEC_ON_READY_FUNCTION:function(){if(typeof this.funcOnReady=="function")this.funcOnReady();}});xe.Utils=jQuery.Class({name:"Utils",$init:function(){if(jQuery.browser.msie&&jQuery.browser.nVersion==6){try{document.execCommand('BackgroundImageCache',false,true);}catch(e){}}},$ON_ATTACH_HOVER_EVENTS:function(aElms,sHoverClass){sHoverClass=sHoverClass||"hover";if(!aElms)return;jQuery(aElms).hover(function(){jQuery(this).addClass(sHoverClass)},function(){jQuery(this).removeClass(sHoverClass)});}});xe.XpressRangeManager=jQuery.Class({name:"XpressRangeManager",oWindow:null,$init:function(win){this.oWindow=win||window;},$BEFORE_MSG_APP_READY:function(){if(this.oWindow&&this.oWindow.tagName=="IFRAME") +this.oWindow=this.oWindow.contentWindow;this.oApp.exec("ADD_APP_PROPERTY",["getSelection",jQuery.fnBind(this.getSelection,this)]);this.oApp.exec("ADD_APP_PROPERTY",["getEmptySelection",jQuery.fnBind(this.getEmptySelection,this)]);},$ON_SET_EDITING_WINDOW:function(oWindow){this.oWindow=oWindow;},getEmptySelection:function(){var oXpressRange=new xe.XpressRange(this.oWindow);return oXpressRange;},getSelection:function(){this.oApp.exec("RESTORE_IE_SELECTION",[]);var oXpressRange=this.getEmptySelection();try{oXpressRange.setFromSelection();}catch(e){} +return oXpressRange;}});xe.Hotkey=jQuery.Class({name:"Hotkey",storage:{},keyhash:{},$init:function(){this.storage={};this.keyhash={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,meta:224,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,left:37,up:38,right:39,down:40,del:46,comma:188,period:190,slash:191,hyphen:109,equal:61};if(jQuery.browser.msie||jQuery.browser.safari){this.keyhash.hyphen=189;this.keyhash.equal=187;this.keyhash.meta=91;}},$ON_MSG_APP_READY:function(){jQuery(this.oApp.getWYSIWYGDocument()||document).keydown(jQuery.fnBind(this.keydown,this));},$ON_REGISTER_HOTKEY:function(sHotkey,sCMD,sArgs){if(!sArgs)sArgs=[];var func=jQuery.fnBind(this.oApp.exec,this.oApp,sCMD,sArgs);sHotkey=this.normalize(sHotkey);if(!sHotkey)return false;this.add(sHotkey,func);},add:function(sHotkey,func){if(typeof this.storage[sHotkey]=='undefined'){this.storage[sHotkey]=[func];}else{this.storage[sHotkey].push(func);}},keydown:function(event){var key=[],kh=this.keyhash;if(jQuery.inArray(event.keyCode,[kh.shift,kh.ctrl,kh.alt,kh.meta])>=0)return;if(event.shiftKey)key.push('shift');if(event.altKey)key.push('alt');if(event.ctrlKey)key.push('ctrl');if(event.metaKey)key.push('meta');if(!key.length)return;if(key.length==1&&event.metaKey)key=['ctrl','meta'];key.push(event.keyCode);key=key.join('+');if(!this.storage[key])return;jQuery.each(this.storage[key],function(){this();});return false;},normalize:function(sHotkey){var shift,ctrl,alt,meta,key,keys=(sHotkey||"").toLowerCase().split('+');shift=ctrl=alt=meta=key=false;jQuery.each(keys,function(){var s=""+this;switch(s){case'shift':shift=true;case'alt':alt=true;case'ctrl':ctrl=true;case'meta':meta=true;default:key=s;}});if(!key)return'';keys=[];if(shift)keys.push('shift');if(alt)keys.push('alt');if(ctrl)keys.push('ctrl');if(meta||(ctrl&&!shift&&!alt))keys.push('meta');keys.push(this.keyhash[key]||key.toUpperCase().charCodeAt(0));return keys.join('+');}});xe.DialogLayerManager=jQuery.Class({name:"DialogLayerManager",aMadeDraggable:null,aOpenedLayers:null,$init:function(){this.aMadeDraggable=[];this.aOpenedLayers=[];},$ON_SHOW_DIALOG_LAYER:function(oLayer,bModal){oLayer=jQuery.$(oLayer);bModal=jQuery.$(bModal)||false;if(!oLayer)return;if(jQuery.inArray(oLayer,this.aOpenedLayers))return;this.oApp.exec("POSITION_DIALOG_LAYER",[oLayer]);this.aOpenedLayers[this.aOpenedLayers.length]=oLayer;if(!jQuery.inArray(oLayer,this.aMadeDraggable)){new xe.DraggableLayer(oLayer,{bModal:bModal,iMinY:0});this.aMadeDraggable[this.aMadeDraggable.length]=oLayer;}else{oLayer.style.display="block";}},$ON_HIDE_LAST_DIALOG_LAYER:function(){this.oApp.exec("HIDE_DIALOG_LAYER",[this.aOpenedLayers[this.aOpenedLayers.length-1]]);},$ON_HIDE_ALL_DIALOG_LAYER:function(){for(var i=this.aOpenedLayers.length-1;i>=0;i--) +this.oApp.exec("HIDE_DIALOG_LAYER",[this.aOpenedLayers[i]]);},$ON_HIDE_DIALOG_LAYER:function(oLayer){oLayer=jQuery.$(oLayer);if(oLayer)oLayer.style.display="none";this.aOpenedLayers=jQuery.grep(this.aOpenedLayers,function(a){return a!=oLayer});},$ON_SET_DIALOG_LAYER_POSITION:function(oLayer,iTop,iLeft){oLayer.style.top=iTop;oLayer.style.left=iLeft;}});xe.ActiveLayerManager=jQuery.Class({name:"ActiveLayerManager",oCurrentLayer:null,$ON_TOGGLE_ACTIVE_LAYER:function(oLayer,sOnOpenCmd,aOnOpenParam,sOnCloseCmd,aOnCloseParam){if(oLayer==this.oCurrentLayer){this.oApp.exec("HIDE_ACTIVE_LAYER",[]);}else{this.oApp.exec("SHOW_ACTIVE_LAYER",[oLayer,sOnCloseCmd,aOnCloseParam]);if(sOnOpenCmd)this.oApp.exec(sOnOpenCmd,aOnOpenParam);}},$ON_SHOW_ACTIVE_LAYER:function(oLayer,sOnCloseCmd,aOnCloseParam){oLayer=jQuery.$(oLayer);this.sOnCloseCmd=sOnCloseCmd;this.aOnCloseParam=aOnCloseParam;var oPrevLayer=this.oCurrentLayer;if(oLayer==oPrevLayer)return;this.oApp.exec("HIDE_ACTIVE_LAYER",[]);oLayer.style.display="block";this.oCurrentLayer=oLayer;},$ON_HIDE_ACTIVE_LAYER:function(){var oLayer=this.oCurrentLayer;if(!oLayer)return;oLayer.style.display="none";this.oCurrentLayer=null;if(this.sOnCloseCmd) +this.oApp.exec(this.sOnCloseCmd,this.aOnCloseParam);},$ON_HIDE_CURRENT_ACTIVE_LAYER:function(){this.oApp.exec("HIDE_ACTIVE_LAYER",[]);},$ON_EVENT_EDITING_AREA_KEYDOWN:function(){this.oApp.exec("HIDE_ACTIVE_LAYER",[]);},$ON_EVENT_EDITING_AREA_MOUSEDOWN:function(){this.oApp.exec("HIDE_ACTIVE_LAYER",[]);}});xe.StringConverterManager=jQuery.Class({name:"StringConverterManager",oConverters:null,$init:function(){this.oConverters={};},$BEFORE_MSG_APP_READY:function(){this.oApp.exec("ADD_APP_PROPERTY",["applyConverter",jQuery.fnBind(this.applyConverter,this)]);this.oApp.exec("ADD_APP_PROPERTY",["addConverter",jQuery.fnBind(this.addConverter,this)]);},applyConverter:function(sRuleName,sContent){var aConverters=this.oConverters[sRuleName];if(!aConverters)return sContent;for(var i=0;i*:first-child",aAllLi[i]).get(0);}}},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.toolbarArea,"mouseover","EVENT_TOOLBAR_MOUSEOVER",[]);this.oApp.registerBrowserEvent(this.toolbarArea,"mouseout","EVENT_TOOLBAR_MOUSEOUT",[]);this.oApp.exec("ADD_APP_PROPERTY",["getToolbarButtonByUIName",jQuery.fnBind(this.getToolbarButtonByUIName,this)]);},$ON_EVENT_TOOLBAR_MOUSEOVER:function(weEvent){if(weEvent.target.tagName=="BUTTON")jQuery(weEvent.target).addClass("hover").parent("span").addClass("hover");},$ON_EVENT_TOOLBAR_MOUSEOUT:function(weEvent){if(weEvent.target.tagName=="BUTTON")jQuery(weEvent.target).removeClass("hover").parent("span").removeClass("hover");},$ON_TOGGLE_TOOLBAR_ACTIVE_LAYER:function(oLayer,oBtn,sOpenCmd,aOpenArgs,sCloseCmd,aCloseArgs){this.oApp.exec("TOGGLE_ACTIVE_LAYER",[oLayer,"MSG_TOOLBAR_LAYER_SHOWN",[oLayer,oBtn,sOpenCmd,aOpenArgs],sCloseCmd,aCloseArgs]);},$ON_MSG_TOOLBAR_LAYER_SHOWN:function(oLayer,oBtn,aOpenCmd,aOpenArgs){this.oApp.exec("POSITION_TOOLBAR_LAYER",[oLayer,oBtn]);if(aOpenCmd)this.oApp.exec(aOpenCmd,aOpenArgs);},$ON_SHOW_TOOLBAR_ACTIVE_LAYER:function(oLayer,sCmd,aArgs,oBtn){this.oApp.exec("SHOW_ACTIVE_LAYER",[oLayer,sCmd,aArgs]);this.oApp.exec("POSITION_TOOLBAR_LAYER",[oLayer,oBtn]);},$ON_ENABLE_UI:function(sUIName){var elUI=this.htUIList[sUIName];if(!elUI)return;jQuery(elUI).removeClass("off");elUI.disabled=false;var sCmd="";if(this.aUICmdMap[sUIName]){for(var i=0;inToolbarLeft)oLayer.style.left=(nToolbarLeft-nLayerLeft-5)+"px";},getToolbarButtonByUIName:function(sUIName){return this.htUIList[sUIName];}});xe.XE_EditingAreaManager=jQuery.Class({name:"XE_EditingAreaManager",oActivePlugin:null,oIRField:null,bIsDirty:false,$init:function(sInitialMode,oIRField,oDimension,fOnBeforeUnload,oAppContainer){this.sInitialMode=sInitialMode;this.oIRField=jQuery.$(oIRField);this._assignHTMLObjects(oAppContainer);this.fOnBeforeUnload=fOnBeforeUnload;this.oEditingMode={};this.elEditingAreaContainer.style.height=parseInt(oDimension.nHeight||this.elEditingAreaContainer.offsetHeight)+"px";this.nMinHeight=oDimension.nMinHeight||10;this.niMinWidth=oDimension.nMinWidth||10;},_assignHTMLObjects:function(oAppContainer){oAppContainer=jQuery.$(oAppContainer)||document;this.elEditingAreaContainer=jQuery("DIV.xpress_xeditor_editing_area_container",oAppContainer).get(0);this.elEditingAreaSkipUI=jQuery("A.skip",oAppContainer).get(0);},$BEFORE_MSG_APP_READY:function(msg){this.oApp.exec("ADD_APP_PROPERTY",["elEditingAreaContainer",this.elEditingAreaContainer]);this.oApp.exec("ADD_APP_PROPERTY",["getIR",jQuery.fnBind(this.getIR,this)]);this.oApp.exec("ADD_APP_PROPERTY",["setIR",this.setIR]);this.oApp.exec("ADD_APP_PROPERTY",["getEditingMode",jQuery.fnBind(this.getEditingMode,this)]);},$ON_MSG_APP_READY:function(){this.oApp.exec("CHANGE_EDITING_MODE",[this.sInitialMode,true]);this.oApp.exec("LOAD_IR_FIELD",[false]);this.oApp.registerBrowserEvent(this.elEditingAreaSkipUI,"focus","MSG_EDITING_AREA_SIZE_CHANGED",[],50);this.oApp.registerBrowserEvent(this.elEditingAreaSkipUI,"blur","MSG_EDITING_AREA_SIZE_CHANGED",[],50);var fOnBeforeUnload=this.fOnBeforeUnload||function(){if(this.getIR()!=this.oIRField.value||this.bIsDirty)return this.oApp.$MSG("XE_EditingAreaManager.onExit")};jQuery(window).bind("beforeunload",jQuery.fnBind(fOnBeforeUnload,this));},$AFTER_MSG_APP_READY:function(){this.oApp.exec("UPDATE_IR_FIELD",[]);},$ON_LOAD_IR_FIELD:function(bDontAddUndo){this.oApp.setIR(this.oIRField.value,bDontAddUndo);},$ON_UPDATE_IR_FIELD:function(){this.oIRField.value=this.oApp.getIR();},$BEFORE_CHANGE_EDITING_MODE:function(sMode){this._oPrevActivePlugin=this.oActivePlugin;this.oActivePlugin=this.oEditingMode[sMode];},$AFTER_CHANGE_EDITING_MODE:function(sMode,bNoFocus){if(this._oPrevActivePlugin){var sIR=this._oPrevActivePlugin.getIR();this.oApp.exec("SET_IR",[sIR]);this.oApp.exec("ENABLE_UI",[this._oPrevActivePlugin.sMode]);this._setEditingAreaDimension();} +this.oApp.exec("DISABLE_UI",[this.oActivePlugin.sMode]);if(!bNoFocus){this.oApp.exec("FOCUS",[]);}},$ON_SET_IS_DIRTY:function(bIsDirty){this.bIsDirty=bIsDirty;},$ON_FOCUS:function(){if(!this.oActivePlugin||typeof this.oActivePlugin.setIR!="function")return +this.oActivePlugin.focus();},$BEFORE_SET_IR:function(sIR,bDontAddUndoHistory){bDontAddUndoHistory=bDontAddUndoHistory||false;if(!bDontAddUndoHistory)this.oApp.exec("RECORD_UNDO_ACTION",["SET CONTENTS"]);},$ON_SET_IR:function(sIR){if(!this.oActivePlugin||typeof this.oActivePlugin.setIR!="function")return +this.oActivePlugin.setIR(sIR);},$AFTER_SET_IR:function(sIR,bDontAddUndoHistory){bDontAddUndoHistory=bDontAddUndoHistory||false;if(!bDontAddUndoHistory)this.oApp.exec("RECORD_UNDO_ACTION",["SET CONTENTS"]);},$ON_REGISTER_EDITING_AREA:function(oEditingAreaPlugin){this.oEditingMode[oEditingAreaPlugin.sMode]=oEditingAreaPlugin;this.attachDocumentEvents(oEditingAreaPlugin.oEditingArea);},$ON_MSG_EDITING_AREA_RESIZE_STARTED:function(){this.oActivePlugin.elEditingArea.style.display="none";this.iStartingHeight=parseInt(this.elEditingAreaContainer.style.height);},$ON_RESIZE_EDITING_AREA:function(ipNewWidth,ipNewHeight){var iNewWidth=parseInt(ipNewWidth);var iNewHeight=parseInt(ipNewHeight);if(iNewWidth=33&&oEvent.keyCode<=40)||oEvent.keyCode==16)return;this._recordUndo(oEvent);},$ON_PASTE_HTML:function(sHTML,oPSelection){if(this.oApp.getEditingMode()!=this.sMode)return;var oSelection=oPSelection||this.oApp.getSelection();oSelection.pasteHTML(sHTML);if(!jQuery.browser.msie){var sTmpBookmark=oSelection.placeStringBookmark();this.oApp.getWYSIWYGDocument().body.innerHTML=this.oApp.getWYSIWYGDocument().body.innerHTML;oSelection.moveToBookmark(sTmpBookmark);oSelection.collapseToEnd();oSelection.select();oSelection.removeStringBookmark(sTmpBookmark);} +this.oApp.exec("RECORD_UNDO_ACTION",["INSERT HTML"]);},$AFTER_MSG_EDITING_AREA_RESIZE_ENDED:function(FnMouseDown,FnMouseMove,FnMouseUp){this.oApp.exec("REFRESH_WYSIWYG",[]);},$ON_RESTORE_IE_SELECTION:function(){if(this._oIERange){this._oIERange.select();this._oPrevIERange=this._oIERange;this._oIERange=null;}},initIframe:function(){try{this.doc=this.iframe.contentWindow.document;if(this.doc==null||this.doc.location.href=='about:blank'){throw new Error('Access denied');} +this._enableWYSIWYG();this.status=xe.PLUGIN_STATUS["READY"];}catch(e){if(this._nIFrameReadyCount-->0){setTimeout(jQuery.fnBind(this.initIframe,this),100);}else{throw("iframe for WYSIWYG editing mode can't be initialized. Please check if the iframe document exists and is also accessable(cross-domain issues). ");}}},getIR:function(){var sContent=this.doc.body.innerHTML;var sIR;if(this.oApp.applyConverter) +sIR=this.oApp.applyConverter(this.sMode+"_TO_IR",sContent);else +sIR=sContent;return sIR;},setIR:function(sIR){var sContent;if(this.oApp.applyConverter) +sContent=this.oApp.applyConverter("IR_TO_"+this.sMode,sIR);else +sContent=sIR;this.doc.body.innerHTML=sContent;if(jQuery.browser.mozilla){if(this.doc.body.innerHTML=="")this.doc.body.innerHTML="
";}},getWindow:function(){return this.iframe.contentWindow;},getDocument:function(){return this.iframe.contentWindow.document;},focus:function(){this.getWindow().focus();this.oApp.exec("RESTORE_IE_SELECTION",[]);},_recordUndo:function(oKeyInfo){var curTime=new Date();if(curTime-this.iLastUndoRecorded";if(oEWrapper.innerHTML=="")oEWrapper.innerHTML="
";if(oEWrapper.nextSibling&&oEWrapper.nextSibling.tagName=="BR")oEWrapper.parentNode.removeChild(oEWrapper.nextSibling);oSelection.selectNodeContents(oEWrapper);oSelection.collapseToStart();oSelection.select();this.oApp.exec("CHECK_STYLE_CHANGE",[]);}else{oSelection.removeStringBookmark(sBM);}}}});xe.XE_WYSIWYGStyler=jQuery.Class({name:"XE_WYSIWYGStyler",$PRECONDITION:function(sFullCommand,aArgs){return(this.oApp.getEditingMode()=="WYSIWYG");},$ON_SET_WYSIWYG_STYLE:function(oStyles){var oSelection=this.oApp.getSelection();if(oSelection.collapsed){var oSpan=this.oApp.getWYSIWYGDocument().createElement("SPAN");oSelection.insertNode(oSpan);oSpan.innerHTML=unescape("%uFEFF");var sValue;for(var sName in oStyles){sValue=oStyles[sName];if(typeof sValue!="string")continue;oSpan.style[sName]=sValue;} +oSelection.selectNodeContents(oSpan);oSelection.collapseToEnd();oSelection._window.focus();oSelection._window.document.body.focus();oSelection.select();if(jQuery.browser.mozilla&&jQuery.browser.nVersion==3) +oSpan.innerHTML="";return;} +this.oApp.exec("RECORD_UNDO_BEFORE_ACTION",["FONT STYLE"]);oSelection.styleRange(oStyles);oSelection._window.focus();oSelection.select();this.oApp.exec("RECORD_UNDO_AFTER_ACTION",["FONT STYLE"]);}});xe.XE_WYSIWYGStyleGetter=jQuery.Class({name:"XE_WYSIWYGStyleGetter",hKeyUp:null,getStyleInterval:200,oStyleMap:{fontFamily:{type:"Value",css:"fontFamily"},fontSize:{type:"Value",css:"fontSize"},lineHeight:{type:"Value",css:"lineHeight",converter:function(sValue,oStyle){if(!sValue.match(/px$/))return sValue;return Math.ceil((parseInt(sValue)/parseInt(oStyle.fontSize))*10)/10;}},bold:{command:"bold"},underline:{command:"underline"},italic:{command:"italic"},lineThrough:{command:"strikethrough"},superscript:{command:"superscript"},subscript:{command:"subscript"},justifyleft:{command:"justifyleft"},justifycenter:{command:"justifycenter"},justifyright:{command:"justifyright"},justifyfull:{command:"justifyfull"},orderedlist:{command:"insertorderedlist"},unorderedlist:{command:"insertunorderedlist"}},$init:function(){this.oStyle=this._getBlankStyle();},$PRECONDITION:function(){if(this.oApp.getEditingMode()!="WYSIWYG")return false;return true;},$ON_MSG_APP_READY:function(){this.oDocument=this.oApp.getWYSIWYGDocument();this.oApp.exec("ADD_APP_PROPERTY",["getCurrentStyle",jQuery.fnBind(this.getCurrentStyle,this)]);},$ON_EVENT_EDITING_AREA_MOUSEUP:function(oEvnet){if(this.hKeyUp)clearTimeout(this.hKeyUp);this.oApp.exec("CHECK_STYLE_CHANGE",[]);},$ON_EVENT_EDITING_AREA_KEYUP:function(oEvent){if(!(oEvent.keyCode==8||(oEvent.keyCode>=33&&oEvent.keyCode<=40)||oEvent.keyCode==45||oEvent.keyCode==46))return;if(this.hKeyUp)clearTimeout(this.hKeyUp);this.hKeyUp=setTimeout(jQuery.fnBind(this.oApp.exec,this.oApp,"CHECK_STYLE_CHANGE",[]),this.getStyleInterval);},$ON_CHECK_STYLE_CHANGE:function(){this._getStyle();},$ON_RESET_STYLE_STATUS:function(){var oBlankStyle=this._getBlankStyle();for(var sAttributeName in oBlankStyle) +this.oApp.exec("SET_STYLE_STATUS",[sAttributeName,oBlankStyle[sAttributeName]]);},getCurrentStyle:function(){return this.oStyle;},_check_style_change:function(){this.oApp.exec("CHECK_STYLE_CHANGE",[]);},_getBlankStyle:function(){var oBlankStyle={};for(var attributeName in this.oStyleMap){if(this.oStyleMap[attributeName].type=="Value") +oBlankStyle[attributeName]="";else +oBlankStyle[attributeName]=0;} +return oBlankStyle;},_getStyle:function(){var oSelection=this.oApp.getSelection();var funcFilter=function(oNode){if(!oNode.childNodes||oNode.childNodes.length==0) +return true;else +return false;} +var aBottomNodes=oSelection.getNodes(false,funcFilter);var oStyle,oBaseStyle,oTmpStyle,attributeName;if(aBottomNodes.length==0){oStyle=this._getStyleOf(oSelection.commonAncestorContainer);}else{oStyle=this._getStyleOf(aBottomNodes[0]);} +for(attributeName in oStyle){if(this.oStyleMap[attributeName].converter){oStyle[attributeName]=this.oStyleMap[attributeName].converter(oStyle[attributeName],oStyle);} +if(this.oStyle[attributeName]!=oStyle[attributeName]) +this.oApp.exec("MSG_STYLE_CHANGED",[attributeName,oStyle[attributeName]]);} +this.oStyle=oStyle;},_getStyleOf:function(oNode){var oStyle=this._getBlankStyle();if(!oNode)return oStyle;if(oNode.nodeType==3)oNode=oNode.parentNode;var welNode=jQuery(oNode);var attribute,cssName;for(var styleName in this.oStyle){attribute=this.oStyleMap[styleName];if(attribute.type&&attribute.type=="Value"){if(attribute.css){var sValue=welNode.css(attribute.css);if(styleName=="fontFamily"){sValue=sValue.split(/,/)[0];} +oStyle[styleName]=sValue;}else{if(attribute.command){try{oStyle[styleName]=this.oDocument.queryCommandState(attribute.command);}catch(e){}}else{}}}else{if(attribute.command){try{if(this.oDocument.queryCommandState(attribute.command)){oStyle[styleName]=1;}else{oStyle[styleName]=0;}}catch(e){}}else{}}} +return oStyle;}});xe.XE_FontSizeWithSelectUI=jQuery.Class({name:"XE_FontSizeWithSelectUI",$init:function(elAppContainer){this._assignHTMLObjects(elAppContainer);},_assignHTMLObjects:function(elAppContainer){this.elFontSizeSelect=jQuery("SELECT.xpress_xeditor_ui_fontSize_select",elAppContainer).get(0);},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elFontSizeSelect,"change","SET_FONTSIZE_FROM_SELECT_UI");this.elFontSizeSelect.selectedIndex=0;},$ON_MSG_STYLE_CHANGED:function(sAttributeName,sAttributeValue){if(sAttributeName=="fontSize"){this.elFontSizeSelect.value=sAttributeValue;if(this.elFontSizeSelect.selectedIndex<0)this.elFontSizeSelect.selectedIndex=0;}},$ON_SET_FONTSIZE_FROM_SELECT_UI:function(){var sFontSize=this.elFontSizeSelect.value;if(!sFontSize)return;this.oApp.exec("SET_WYSIWYG_STYLE",[{"fontSize":sFontSize}]);this.oApp.exec("CHECK_STYLE_CHANGE",[]);}});xe.XE_FontNameWithSelectUI=jQuery.Class({name:"XE_FontNameWithSelectUI",$init:function(elAppContainer){this._assignHTMLObjects(elAppContainer);},_assignHTMLObjects:function(elAppContainer){this.elFontNameSelect=jQuery("SELECT.xpress_xeditor_ui_fontName_select",elAppContainer).get(0);},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elFontNameSelect,"change","SET_FONTNAME_FROM_SELECT_UI");this.elFontNameSelect.selectedIndex=0;},$ON_MSG_STYLE_CHANGED:function(sAttributeName,sAttributeValue){if(sAttributeName=="fontFamily"){this.elFontNameSelect.value=sAttributeValue.toLowerCase();if(this.elFontNameSelect.selectedIndex<0)this.elFontNameSelect.selectedIndex=0;}},$ON_SET_FONTNAME_FROM_SELECT_UI:function(){var sFontName=this.elFontNameSelect.value;if(!sFontName)return;this.oApp.exec("SET_WYSIWYG_STYLE",[{"fontFamily":sFontName}]);this.oApp.exec("CHECK_STYLE_CHANGE",[]);}});xe.XE_LineHeight=jQuery.Class({name:"XE_LineHeight",$init:function(oAppContainer){this._assignHTMLObjects(oAppContainer);},_assignHTMLObjects:function(oAppContainer){},$ON_SET_LINEHEIGHT:function(nLineHeight){this.setLineHeight(nLineHeight);},getLineHeight:function(){var nodes=this._getSelectedNodes(false);var curWrapper,prevWrapper;var iCurHeight,iHeight;if(nodes.length==0)return-1;var iLength=nodes.length;if(iLength==0){iHeight=-1;}else{prevWrapper=this._getLineWrapper(nodes[0]);iHeight=this._getWrapperLineheight(prevWrapper);} +var firstNode=this.oSelection.getStartNode();if(iHeight>0){for(var i=1;i=0;i--){if(aNodes[i].nodeType==3||aNodes[i].tagName=="BR"){var oP=oSelection._document.createElement("P");oInsertionPoint=aNodes[i].nextSibling;while(i>=0&&aNodes[i]&&(aNodes[i].nodeType==3||aNodes[i].tagName=="BR")){oP.insertBefore(aNodes[i--],oP.firstChild);} +oFormattingNode.insertBefore(oP,oInsertionPoint);i++;}} +if(oFormattingNode&&oFormattingNode.parentNode){var oP=oSelection._document.createElement("P");oP.innerHTML=unescape("
");oFormattingNode.parentNode.insertBefore(oP,oFormattingNode.nextSibling);} +this.oApp.exec("RECORD_UNDO_ACTION",["Block Quote"]);return oFormattingNode;},_expandToTableStart:function(oSelection,oNode){var oC=oSelection.commonAncestorContainer;var oResultNode=null;var bLastIteration=false;while(oNode&&!bLastIteration){if(oNode==oC)bLastIteration=true;if(/TBODY|TFOOT|THEAD|TR/i.test(oNode.tagName)){oResultNode=this._getTableRoot(oNode);break;} +oNode=oNode.parentNode;} +return oResultNode;},_getTableRoot:function(oNode){while(oNode&&oNode.tagName!="TABLE")oNode=oNode.parentNode;return oNode;}});xe.XE_SCharacter=jQuery.Class({name:"XE_SCharacter",$init:function(oAppContainer){this.bIE=jQuery.browser.msie;this._assignHTMLObjects(oAppContainer);this.charSet=[];this.charSet[0]=unescape('FF5B FF5D 3014 3015 3008 3009 300A 300B 300C 300D 300E 300F 3010 3011 2018 2019 201C 201D 3001 3002 %B7 2025 2026 %A7 203B 2606 2605 25CB 25CF 25CE 25C7 25C6 25A1 25A0 25B3 25B2 25BD 25BC 25C1 25C0 25B7 25B6 2664 2660 2661 2665 2667 2663 2299 25C8 25A3 25D0 25D1 2592 25A4 25A5 25A8 25A7 25A6 25A9 %B1 %D7 %F7 2260 2264 2265 221E 2234 %B0 2032 2033 2220 22A5 2312 2202 2261 2252 226A 226B 221A 223D 221D 2235 222B 222C 2208 220B 2286 2287 2282 2283 222A 2229 2227 2228 FFE2 21D2 21D4 2200 2203 %B4 FF5E 02C7 02D8 02DD 02DA 02D9 %B8 02DB %A1 %BF 02D0 222E 2211 220F 266D 2669 266A 266C 327F 2192 2190 2191 2193 2194 2195 2197 2199 2196 2198 321C 2116 33C7 2122 33C2 33D8 2121 2668 260F 260E 261C 261E %B6 2020 2021 %AE %AA %BA 2642 2640').replace(/(\S{4})/g,function(a){return"%u"+a}).split(' ');this.charSet[1]=unescape('%BD 2153 2154 %BC %BE 215B 215C 215D 215E %B9 %B2 %B3 2074 207F 2081 2082 2083 2084 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 FFE6 %24 FFE5 FFE1 20AC 2103 212B 2109 FFE0 %A4 2030 3395 3396 3397 2113 3398 33C4 33A3 33A4 33A5 33A6 3399 339A 339B 339C 339D 339E 339F 33A0 33A1 33A2 33CA 338D 338E 338F 33CF 3388 3389 33C8 33A7 33A8 33B0 33B1 33B2 33B3 33B4 33B5 33B6 33B7 33B8 33B9 3380 3381 3382 3383 3384 33BA 33BB 33BC 33BD 33BE 33BF 3390 3391 3392 3393 3394 2126 33C0 33C1 338A 338B 338C 33D6 33C5 33AD 33AE 33AF 33DB 33A9 33AA 33AB 33AC 33DD 33D0 33D3 33C3 33C9 33DC 33C6').replace(/(\S{4})/g,function(a){return"%u"+a}).split(' ');this.charSet[2]=unescape('3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 326A 326B 326C 326D 326E 326F 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 327A 327B 24D0 24D1 24D2 24D3 24D4 24D5 24D6 24D7 24D8 24D9 24DA 24DB 24DC 24DD 24DE 24DF 24E0 24E1 24E2 24E3 24E4 24E5 24E6 24E7 24E8 24E9 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 246A 246B 246C 246D 246E 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 320A 320B 320C 320D 320E 320F 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 321A 321B 249C 249D 249E 249F 24A0 24A1 24A2 24A3 24A4 24A5 24A6 24A7 24A8 24A9 24AA 24AB 24AC 24AD 24AE 24AF 24B0 24B1 24B2 24B3 24B4 24B5 2474 2475 2476 2477 2478 2479 247A 247B 247C 247D 247E 247F 2480 2481 2482').replace(/(\S{4})/g,function(a){return"%u"+a}).split(' ');this.charSet[3]=unescape('3131 3132 3133 3134 3135 3136 3137 3138 3139 313A 313B 313C 313D 313E 313F 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 314A 314B 314C 314D 314E 314F 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 315A 315B 315C 315D 315E 315F 3160 3161 3162 3163 3165 3166 3167 3168 3169 316A 316B 316C 316D 316E 316F 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 317A 317B 317C 317D 317E 317F 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 318A 318B 318C 318D 318E').replace(/(\S{4})/g,function(a){return"%u"+a}).split(' ');this.charSet[4]=unescape('0391 0392 0393 0394 0395 0396 0397 0398 0399 039A 039B 039C 039D 039E 039F 03A0 03A1 03A3 03A4 03A5 03A6 03A7 03A8 03A9 03B1 03B2 03B3 03B4 03B5 03B6 03B7 03B8 03B9 03BA 03BB 03BC 03BD 03BE 03BF 03C0 03C1 03C3 03C4 03C5 03C6 03C7 03C8 03C9 %C6 %D0 0126 0132 013F 0141 %D8 0152 %DE 0166 014A %E6 0111 %F0 0127 I 0133 0138 0140 0142 0142 0153 %DF %FE 0167 014B 0149 0411 0413 0414 0401 0416 0417 0418 0419 041B 041F 0426 0427 0428 0429 042A 042B 042C 042D 042E 042F 0431 0432 0433 0434 0451 0436 0437 0438 0439 043B 043F 0444 0446 0447 0448 0449 044A 044B 044C 044D 044E 044F').replace(/(\S{4})/g,function(a){return"%u"+a}).split(' ');this.charSet[5]=unescape('3041 3042 3043 3044 3045 3046 3047 3048 3049 304A 304B 304C 304D 304E 304F 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 305A 305B 305C 305D 305E 305F 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 306A 306B 306C 306D 306E 306F 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 307A 307B 307C 307D 307E 307F 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 308A 308B 308C 308D 308E 308F 3090 3091 3092 3093 30A1 30A2 30A3 30A4 30A5 30A6 30A7 30A8 30A9 30AA 30AB 30AC 30AD 30AE 30AF 30B0 30B1 30B2 30B3 30B4 30B5 30B6 30B7 30B8 30B9 30BA 30BB 30BC 30BD 30BE 30BF 30C0 30C1 30C2 30C3 30C4 30C5 30C6 30C7 30C8 30C9 30CA 30CB 30CC 30CD 30CE 30CF 30D0 30D1 30D2 30D3 30D4 30D5 30D6 30D7 30D8 30D9 30DA 30DB 30DC 30DD 30DE 30DF 30E0 30E1 30E2 30E3 30E4 30E5 30E6 30E7 30E8 30E9 30EA 30EB 30EC 30ED 30EE 30EF 30F0 30F1 30F2 30F3 30F4 30F5 30F6').replace(/(\S{4})/g,function(a){return"%u"+a}).split(' ');},_assignHTMLObjects:function(oAppContainer){oAppContainer=jQuery.$(oAppContainer)||document;this.elDropdownLayer=jQuery("DIV.xpress_xeditor_sCharacter_layer",oAppContainer).get(0);this.oTextField=jQuery("INPUT",this.elDropdownLayer).get(0);this.oInsertButton=jQuery("+ BUTTON",this.oTextField).get(0);this.aCloseButton=jQuery("BUTTON.close",this.elDropdownLayer).get();this.aSCharList=jQuery(".list",this.elDropdownLayer).get();var oLabelUL=jQuery(">UL",this.elDropdownLayer).get(0);this.aLabelA=jQuery("A",oLabelUL).get();},$ON_MSG_APP_READY:function(){var funcInsert=jQuery.fnBind(this.oApp.exec,this.oApp,"INSERT_SCHARACTERS",[this.oTextField.value]);jQuery(this.oInsertButton).click(funcInsert,this);this.oApp.exec("SET_SCHARACTER_LIST",[this.charSet]);for(var i=0;i");}else{button=document.createElement("BUTTON");button.type="button";} +span=document.createElement("SPAN");span.innerHTML=unescape(this.charSet[i][ii]);button.appendChild(span);aLI[ii].appendChild(button);this.aSCharList[i].appendChild(aLI[ii]);}},_stopBrowserEvent:function(obj,sEvent){jQuery(obj).bind(sEvent,function(e){e.stopPropagation();e.preventDefault();})}});xe.XE_UndoRedo=jQuery.Class({name:"XE_UndoRedo",actionHistory:null,oCurStateIdx:null,iMinimumSizeChange:10,sBlankContentsForFF:"
",$init:function(){this.aUndoHistory=[];this.oCurStateIdx={nIdx:0,nStep:0};},$PRECONDITION:function(sCmd){if(sCmd.match(/_DO_RECORD_UNDO_HISTORY_AT$/))return true;try{if(this.oApp.getEditingMode()!="WYSIWYG")return false;}catch(e){return false;} +return true;},$BEFORE_MSG_APP_READY:function(){this.oApp.exec("DO_RECORD_UNDO_HISTORY_AT",[this.oCurStateIdx,"","",null]);},$ON_MSG_APP_READY:function(){this.bFF=jQuery.browser.mozilla;this.oApp.exec("ADD_APP_PROPERTY",["getUndoHistory",jQuery.fnBind(this.getUndoHistory,this)]);this.oApp.exec("ADD_APP_PROPERTY",["getUndoStateIdx",jQuery.fnBind(this.getUndoStateIdx,this)]);this.oApp.exec("REGISTER_UI_EVENT",["undo","click","UNDO"]);this.oApp.exec("REGISTER_UI_EVENT",["redo","click","REDO"]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+z","UNDO"]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+y","REDO"]);},$ON_UNDO:function(){var oTmpStateIdx={};this.oApp.exec("DO_RECORD_UNDO_HISTORY",["KEYPRESS",false,false,1]);if(this.oCurStateIdx.nIdx==0)return;if(this.oCurStateIdx.nStep>0){this.oCurStateIdx.nStep--;}else{var oTmpHistory=this.aUndoHistory[this.oCurStateIdx.nIdx];this.oCurStateIdx.nIdx--;if(oTmpHistory.nTotalSteps>1){this.oCurStateIdx.nStep=0;}else{oTmpHistory=this.aUndoHistory[this.oCurStateIdx.nIdx];this.oCurStateIdx.nStep=oTmpHistory.nTotalSteps-1;}} +this.oApp.exec("RESTORE_UNDO_HISTORY",[this.oCurStateIdx.nIdx,this.oCurStateIdx.nStep]);this.oApp.exec("CHECK_STYLE_CHANGE",[]);},$ON_REDO:function(){if(this.oCurStateIdx.nIdx>=this.aUndoHistory.length)return;var oCurHistory=this.aUndoHistory[this.oCurStateIdx.nIdx];if(this.oCurStateIdx.nIdx==this.aUndoHistory.length-1&&this.oCurStateIdx.nStep>=oCurHistory.nTotalSteps-1)return;if(this.oCurStateIdx.nStep .bx",this.oUILayer).get();this.oFindInputSet=oTmp[0];this.oReplaceInputSet=oTmp[1];this.oFindInput_Keyword=jQuery("INPUT",this.oFindInputSet).get(0);oTmp=jQuery("INPUT",this.oReplaceInputSet).get();this.oReplaceInput_Original=oTmp[0];this.oReplaceInput_Replacement=oTmp[1];this.oFindNextButton=jQuery("BUTTON.find_next",this.oUILayer).get(0);this.oCancelButton=jQuery("BUTTON.cancel",this.oUILayer).get(0);this.oReplaceButton=jQuery("BUTTON.replace",this.oUILayer).get(0);this.oReplaceAllButton=jQuery("BUTTON.replace_all",this.oUILayer).get(0);this.aCloseButtons=jQuery("BUTTON.close",this.oUILayer).get();this.aCloseButtons[this.aCloseButtons.length]=this.oCancelButton;},$ON_MSG_APP_READY:function(){if(this.oEditingWindow&&this.oEditingWindow.tagName=="IFRAME") +this.oEditingWindow=this.oEditingWindow.contentWindow;this.oFindReplace=new xe.FindReplace(this.oEditingWindow);if(!this.oFindReplace.bBrowserSupported){this.oApp.exec("DISABLE_UI",["find_replace"]);return;} +for(var i=0;i"+sURL+"";this.oSelection.pasteHTML(str);}else{var nSession=Math.ceil(Math.random()*10000);var arg=(sURL==""?["unlink"]:["createLink",false,this.sATagMarker+nSession+sURL]);this.oApp.exec("EXECCOMMAND",arg);this.oSelection.setFromSelection();var oDoc=this.oApp.getWYSIWYGDocument();var aATags=oDoc.body.getElementsByTagName("A");var nLen=aATags.length;var rxMarker=new RegExp(this.sRXATagMarker+nSession,"i");var elATag;for(var i=0;ithis.iMaxRows)iRows=this.iMaxRows;this.oRowInput.value=iRows;this._showNewTable();},$ON_ST_SET_COLUMN_NUM:function(iColumns,iColumnDiff){iColumns=iColumns||parseInt(this.oColumnInput.value);iColumnDiff=iColumnDiff||0;iColumns+=iColumnDiff;if(iColumnsthis.iMaxColumns)iColumns=this.iMaxColumns;this.oColumnInput.value=iColumns;this._showNewTable();},$ON_ST_INSERT_TABLE:function(){var sTable=this._getTableString();this.oApp.exec("PASTE_HTML",[sTable]);this.oApp.exec("ST_CLOSE",[]);},$ON_ST_CLOSE:function(){this.oApp.exec("HIDE_ACTIVE_LAYER",[]);},$ON_ST_SET_BORDER_WIDTH:function(iBorderWidth,iBorderWidthDiff){iBorderWidth=iBorderWidth||parseInt(this.oBorderWidthInput.value);iBorderWidthDiff=iBorderWidthDiff||0;iBorderWidth+=iBorderWidthDiff;if(iBorderWidththis.iMaxBorderWidth)iBorderWidth=this.iMaxBorderWidth;this.oBorderWidthInput.value=iBorderWidth;this._showNewTable();},$ON_ST_INC_BORDER_WIDTH:function(){this.oApp.exec("ST_SET_BORDER_WIDTH",[null,1]);},$ON_ST_DEC_BORDER_WIDTH:function(){this.oApp.exec("ST_SET_BORDER_WIDTH",[null,-1]);},$ON_ST_TOGGLE_BORDER_COLOR_LAYER:function(){if(this.welDropdownLayer.hasClass("p1")) +this.oApp.exec("ST_HIDE_BORDER_COLOR_LAYER",[]);else +this.oApp.exec("ST_SHOW_BORDER_COLOR_LAYER",[]);},$ON_ST_SHOW_BORDER_COLOR_LAYER:function(){this.welDropdownLayer.addClass("p1");this.welDropdownLayer.removeClass("p2");this.oApp.exec("SHOW_COLOR_PALETTE",["ST_SET_BORDER_COLOR_FROM_PALETTE",this.elDropdownLayer]);},$ON_ST_HIDE_BORDER_COLOR_LAYER:function(){this.welDropdownLayer.removeClass("p1");this.oApp.exec("HIDE_COLOR_PALETTE",[]);},$ON_ST_TOGGLE_BGCOLOR_LAYER:function(){if(this.welDropdownLayer.hasClass("p2")) +this.oApp.exec("ST_HIDE_BGCOLOR_LAYER",[]);else +this.oApp.exec("ST_SHOW_BGCOLOR_LAYER",[]);},$ON_ST_SHOW_BGCOLOR_LAYER:function(){this.welDropdownLayer.removeClass("p1");this.welDropdownLayer.addClass("p2");this.oApp.exec("SHOW_COLOR_PALETTE",["ST_SET_BGCOLOR_FROM_PALETTE",this.elDropdownLayer]);},$ON_ST_HIDE_BGCOLOR_LAYER:function(){this.welDropdownLayer.removeClass("p2");this.oApp.exec("HIDE_COLOR_PALETTE",[]);},$ON_ST_SET_BORDER_COLOR_FROM_PALETTE:function(sColorCode){this.oApp.exec("ST_SET_BORDER_COLOR",[sColorCode]);this.oApp.exec("ST_HIDE_BORDER_COLOR_LAYER",[]);},$ON_ST_SET_BORDER_COLOR:function(sColorCode){this.oBorderColorInput.value=sColorCode;this.oButton_BorderColorPreview.style.backgroundColor=sColorCode;this._showNewTable();},$ON_ST_SET_BGCOLOR_FROM_PALETTE:function(sColorCode){this.oApp.exec("ST_SET_BGCOLOR",[sColorCode]);this.oApp.exec("ST_HIDE_BGCOLOR_LAYER",[]);},$ON_ST_SET_BGCOLOR:function(sColorCode){this.oBGColorInput.value=sColorCode;this.oButton_BGColorPreview.style.backgroundColor=sColorCode;this._showNewTable();},_showNewTable:function(){var oTmp=document.createElement("DIV");oTmp.innerHTML=this._getTableString();var oNewTable=oTmp.firstChild;this.oSampleTable.parentNode.insertBefore(oNewTable,this.oSampleTable);this.oSampleTable.parentNode.removeChild(this.oSampleTable);this.oSampleTable=oNewTable;},_getTableString:function(){var sBorderColorCode=this.oBorderColorInput.value;var sBGColorCode=this.oBGColorInput.value;var iBorderWidth=this.oBorderWidthInput.value;var sTD="";if(jQuery.browser.msie){sTD="

";}else{if(jQuery.browser.firefox){sTD="


";}else{sTD="

 

";}} +var sTable='';var sRow='';var iColumns=this.oColumnInput.value;for(var i=0;i";for(var i=0;i/ig,regex_meanless_css2=/(?:(?:margin|padding)\s*:\s*0(?:px)?|\-(?:moz|ms|webkit|opera)\-[\w-]+\s*:\s*.*?|[\w-]+\s*:\s*\-(?:moz|ms|webkit|opera)\-[\w-]+|(?:line-height|font-variant|font-stretch|font-size-adjust|font-size)\s*:\s*[a-z_-]+)\s*;?\s*|font-(?:weight|style)\s*:\s*normal;?/ig,regex_class=/<(.*?)\s+class\s*=(?:\s*".*?"|\s*'.*?'|[^\s>]+)(.*?)>/ig,regex_handler=/<(.*?)\s+on[a-z]+\s*=(?:\s*".*?"|\s*'.*?'|[^\s>]+)(.*?)>/ig,regex_id=/<(.*?)\s+id\s*=(?:[^\s>]+|\s*".*?"|\s*'.*?')(.*?)>/ig,regex_script=//ig,regex_font_color=/color\s*=(?:\s*"(.*?)"|\s*'(.*?)'|([^\s>]+))/i,regex_font_face=/face\s*=(?:\s*"(.*?)"|\s*'(.*?)'|([^\s>]+))/i,regex_font_size=/size\s*=(?:\s*"(\d+)"|\s*'(\d+)'|(\d+))/i,regex_style=/style\s*=\s*(?:\s*"(.*?)"|\s*'(.*?)'|([^\s>]+))/i,regex_font_weight=/font-weight\s*:\s*([a-z]+);?/i,regex_font_style=/font-style\s*:\s*italic;?/i,regex_font_decoration=/text-decoration\s*:\s*([a-z -]+);?/i;var +allow_tags='a,abbr,acronym,address,area,blockquote,br,caption,center,cite,code,col,colgroup,dd,del,dfn,div,dl,dt,em,embed,h1,h2,h3,h4,h5,h6,hr,img,ins,kbd,li,map,object,ol,p,param,pre,q,samp,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,u,ul,var'.split(','),lonely_tags='area,br,col,embed,hr,img,input,param'.split(',');var +replace_tags={'b':'strong','i':'em','s':'del','strike':'del'};xe.XE_XHTMLConverter=$.Class({name:"XE_XHTMLConverter",$ON_MSG_APP_READY:function(){this.oApp.addConverter("WYSIWYG_TO_IR",this.TO_IR);this.oApp.addConverter("HTMLSrc_TO_IR",this.TO_IR);this.oApp.addConverter("IR_TO_HTMLSrc",this.IR_TO);this.oApp.addConverter("IR_TO_WYSIWYG",this.IR_TO);},TO_IR:function(sContent){var stack=[];sContent=sContent.replace(regex_meanless_css1,function(m0,m1,m2,m3){m2=m2.replace(regex_meanless_css2,'');return'<'+m1+(m2?' style="'+m2+'"':'')+m3+'>';});sContent=sContent.replace(regex_class,'<$1$2>');sContent=sContent.replace(regex_handler,'<$1$2>');sContent=sContent.replace(regex_id,'<$1$2>');sContent=sContent.replace(regex_script,'');regex=/<(\/)?([:\w\/-]+)(.*?)>/ig;sContent=sContent.replace(regex,function(m0,m1,m2,m3){var m3s=[];var state='';m1=m1||'';m2=m2.toLowerCase();m3=$.trim(m3||'');if(!m1){if($.inArray(m2,lonely_tags)>=0){var len=m3.length;if(m2=='br')m3='';if(!m3||m3.substring(len-1,len)!='/')m3+=' /';return'<'+m2+' '+m3+'>';} +if(replace_tags[m2]){stack.push({tag:m2,state:'deleted'});m2=replace_tags[m2];state='inserted';}else if(m2=='font'){stack.push({tag:m2,state:'deleted'});m2='span';m3s=[];if(regex_font_color.test(m3))m3s.push('color:'+(RegExp.$1||RegExp.$2||RegExp.$3)+';');if(regex_font_face.test(m3))m3s.push('font-family:'+(RegExp.$1||RegExp.$2||RegExp.$3)+';');m3=m3s.length?'style="'+m3s.join('')+'"':'';state='inserted';}else if(m2=='center'){stack.push({tag:m2,state:'deleted'});m2='div' +m3='style="text-align:center"';state='inserted';}else if(m2=='span'){var style='';if(!m3){stack.push({tag:m3,state:'deleted'});return'';} +if(regex_style.test(m3)){var tmpstack=[];var tmptag='';style=RegExp.$1||RegExp.$2||RegExp.$3;m3=m3.replace(regex_style,'');if(regex_font_weight.test(style)){if(RegExp.$1=='bold'||RegExp.$1=='bolder'){style=style.replace(regex_font_weight,'');tmpstack.push({tag:'strong',state:'inserted'});tmptag+='';}} +if(regex_font_style.test(style)){style=style.replace(regex_font_style,'');tmpstack.push({tag:'em',state:'inserted'});tmptag+='';} +if(regex_font_decoration.test(style)){var deco_css=' '+RegExp.$1.toLowerCase()+' ';if(deco_css.indexOf('underline ')>0){deco_css=deco_css.replace('underline ','');tmpstack.push({tag:'u',state:'inserted'});tmptag+='';} +if(deco_css.indexOf('line-through ')>0){deco_css=deco_css.replace('line-through ','');tmpstack.push({tag:'del',state:'inserted'});tmptag+='';} +deco_css=$.trim(deco_css);style=style.replace(regex_font_decoration,(deco_css?'text-decoration:'+deco_css+';':''));} +style=$.trim(style);stack.push({tag:m2,state:(!m3&&!style?'deleted':'')});stack=stack.concat(tmpstack);return(!m3&&!style?'':'')+tmptag;}}else{state=(jQuery.inArray(m2,allow_tags)<0)?'deleted':'';if(state=='deleted')return'';} +stack.push({tag:m2,state:state});}else{var tags=[],t='';if(!stack.length)return'';do{t=stack.pop();if(t.state!='inserted'&&t.tag!=m2){stack.push(t);return tags.join('');} +if(t.state!='deleted')tags.push('');}while(stack.length&&t.tag!=m2);return tags.join('');} +return'<'+m1+m2+(m3?' '+m3:'')+'>';});if(stack.length){var t='';do{t=stack.pop();if(t.state!='deleted')sContent+='';}while(stack.length);} +return sContent;},IR_TO:function(sContent){return sContent;}});})(jQuery);xe.XE_Extension=jQuery.Class({name:"XE_Extension",seq:'',$init:function(elAppContainer,editor_sequence){this.seq=editor_sequence;this._assignHTMLObjects(elAppContainer);},_assignHTMLObjects:function(elAppContainer){this.elDropdownLayer=jQuery('DIV.xpress_xeditor_extension_layer',elAppContainer).get(0);},_removeAttrs:function(sContent){sContent=sContent.replace(/]*?) xe_handled\s*=\s*".+?"([^>]*?)>/i,'');return sContent;},_addEvent:function(){if(this.oApp.getEditingMode()!='WYSIWYG')return;var doc=this.oApp.getWYSIWYGDocument();var seq=this.seq;var fn=function(){var img=jQuery(this);var comp=img.attr('editor_component');if(comp&&jQuery.isFunction(openComponent)){editorPrevNode=img.get(0);openComponent(comp,seq);}};jQuery('img[editor_component]',doc).each(function(){var img=jQuery(this);if(!img.attr('xe_handled')){img.attr('xe_handled','yes').dblclick(fn);}});},$ON_MSG_APP_READY:function(){this.oApp.exec('REGISTER_UI_EVENT',['extension','click','TOGGLE_EXTENSION_LAYER']);this.oApp.addConverter("WYSIWYG_TO_IR",this._removeAttrs);},$ON_TOGGLE_EXTENSION_LAYER:function(){this.oApp.exec('TOGGLE_TOOLBAR_ACTIVE_LAYER',[this.elDropdownLayer]);},$ON_CHANGE_EDITING_MODE:function(mode){this._addEvent();},$ON_PASTE_HTML:function(){this._addEvent();},$ON_LOAD_IR_FIELD:function(){this._addEvent();},$ON_SET_IR:function(){this._addEvent();}});xe.XE_AutoSave=jQuery.Class({name:"XE_AutoSave",form:null,textarea:null,$init:function(oIRTextarea,elAppContainer){this.form=oIRTextarea.form;this.textarea=oIRTextarea;this._assignHTMLObjects(elAppContainer);},_assignHTMLObjects:function(elAppContainer){this.welMessageBox=jQuery('autosave_message');},$ON_MSG_APP_READY:function(){var elTitle=jQuery(this.form._saved_doc_title);var elContent=jQuery(this.form._saved_doc_content);var title=jQuery.trim(elTitle.val());var content=jQuery.trim(elContent.val());if(title||content){if(confirm(this.form._saved_doc_message.value)){jQuery(this.form.title).val(title);this.oApp.setIR(content);}else{editorRemoveSavedDoc();}} +editorEnableAutoSave(this.form,jQuery(this.form).attr("editor_sequence"));this.oApp.exec('REGISTER_HOTKEY',['ctrl+shift+s','AUTO_SAVE']);},$ON_AUTO_SAVE:function(){_editorAutoSave();}});xe.XE_FormatWithSelectUI=jQuery.Class({name:"XE_FormatWithSelectUI",$init:function(elAppContainer){this._assignHTMLObjects(elAppContainer);},_assignHTMLObjects:function(elAppContainer){this.elFormatSelect=jQuery("SELECT.xpress_xeditor_ui_format_select",elAppContainer).get(0);},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elFormatSelect,"change","SET_FORMAT_FROM_SELECT_UI");this.elFormatSelect.selectedIndex=0;},$ON_MSG_STYLE_CHANGED:function(sAttributeName,sAttributeValue){var blockName=this.oApp.getWYSIWYGDocument().queryCommandValue("FormatBlock");this.elFormatSelect.value=blockName.toLowerCase();if(this.elFormatSelect.selectedIndex<0)this.elFormatSelect.selectedIndex=0;},$ON_SET_FORMAT_FROM_SELECT_UI:function(){var sFormat=this.elFormatSelect.value;if(!sFormat)return;this.oApp.exec("EXECCOMMAND",["FormatBlock",false,sFormat]);this.oApp.exec("CHECK_STYLE_CHANGE",[]);}}); \ No newline at end of file diff --git a/modules/editor/skins/xpresseditor/js/xe_interface.js b/modules/editor/skins/xpresseditor/js/xe_interface.js new file mode 100644 index 000000000..373edeef7 --- /dev/null +++ b/modules/editor/skins/xpresseditor/js/xe_interface.js @@ -0,0 +1,166 @@ +if (!window.xe) xe = {}; + +xe.Editors = []; + +function editorStart_xe(editor_sequence, primary_key, content_key, editor_height) { + + var textarea = jQuery("#xpress-editor-"+editor_sequence); + var iframe = jQuery('