code
stringlengths
1
2.08M
language
stringclasses
1 value
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Chinese-Simplified * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['zh-cn'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : '部分内容尚未保存,确定关闭对话框么?', ok : '确定', cancel : '取消', confirmationTitle : '确认', messageTitle : '提示', inputTitle : '询问', undo : '撤销', redo : '重做', skip : '跳过', skipAll : '全部跳过', makeDecision : '应采取何样措施?', rememberDecision: '下次不再询问' }, dir : '自左向右', HelpLang : 'en', LangCode : 'zh-cn', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'yyyy年m月d日 h:MM aa', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : '文件夹', FolderLoading : '正在加载文件夹...', FolderNew : '请输入新文件夹名称: ', FolderRename : '请输入新文件夹名称: ', FolderDelete : '您确定要删除文件夹 "%1" 吗?', FolderRenaming : ' (正在重命名...)', FolderDeleting : ' (正在删除...)', // Files FileRename : '请输入新文件名: ', FileRenameExt : '如果改变文件扩展名,可能会导致文件不可用。\r\n确定要更改吗?', FileRenaming : '正在重命名...', FileDelete : '您确定要删除文件 "%1" 吗?', FilesLoading : '加载中...', FilesEmpty : '空文件夹', FilesMoved : '文件 %1 已移动至 %2:%3', FilesCopied : '文件 %1 已拷贝至 %2:%3', // Basket BasketFolder : '临时文件夹', BasketClear : '清空临时文件夹', BasketRemove : '从临时文件夹移除', BasketOpenFolder : '打开临时文件夹', BasketTruncateConfirm : '确认清空临时文件夹?', BasketRemoveConfirm : '确认从临时文件夹中移除文件 "%1" ?', BasketEmpty : '临时文件夹为空, 可拖放文件至其中.', BasketCopyFilesHere : '从临时文件夹复制至此', BasketMoveFilesHere : '从临时文件夹移动至此', BasketPasteErrorOther : '文件 %s 出错: %e', BasketPasteMoveSuccess : '已移动以下文件: %s', BasketPasteCopySuccess : '已拷贝以下文件: %s', // Toolbar Buttons (some used elsewhere) Upload : '上传', UploadTip : '上传文件', Refresh : '刷新', Settings : '设置', Help : '帮助', HelpTip : '查看在线帮助', // Context Menus Select : '选择', SelectThumbnail : '选中缩略图', View : '查看', Download : '下载', NewSubFolder : '创建子文件夹', Rename : '重命名', Delete : '删除', CopyDragDrop : '将文件复制至此', MoveDragDrop : '将文件移动至此', // Dialogs RenameDlgTitle : '重命名', NewNameDlgTitle : '文件名', FileExistsDlgTitle : '文件已存在', SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : '自动覆盖重名', FileAutorename : '自动重命名重名', // Generic OkBtn : '确定', CancelBtn : '取消', CloseBtn : '关闭', // Upload Panel UploadTitle : '上传文件', UploadSelectLbl : '选定要上传的文件', UploadProgressLbl : '(正在上传文件,请稍候...)', UploadBtn : '上传选定的文件', UploadBtnCancel : '取消', UploadNoFileMsg : '请选择一个要上传的文件', UploadNoFolder : '需先选择一个文件.', UploadNoPerms : '无文件上传权限.', UploadUnknError : '上传文件出错.', UploadExtIncorrect : '此文件后缀在当前文件夹中不可用.', // Settings Panel SetTitle : '设置', SetView : '查看:', SetViewThumb : '缩略图', SetViewList : '列表', SetDisplay : '显示:', SetDisplayName : '文件名', SetDisplayDate : '日期', SetDisplaySize : '大小', SetSort : '排列顺序:', SetSortName : '按文件名', SetSortDate : '按日期', SetSortSize : '按大小', // Status Bar FilesCountEmpty : '<空文件夹>', FilesCountOne : '1 个文件', FilesCountMany : '%1 个文件', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : '请求的操作未能完成. (错误 %1)', Errors : { 10 : '无效的指令.', 11 : '文件类型不在许可范围之内.', 12 : '文件类型无效.', 102 : '无效的文件名或文件夹名称.', 103 : '由于作者限制,该请求不能完成.', 104 : '由于文件系统的限制,该请求不能完成.', 105 : '无效的扩展名.', 109 : '无效请求.', 110 : '未知错误.', 115 : '存在重名的文件或文件夹.', 116 : '文件夹不存在. 请刷新后再试.', 117 : '文件不存在. 请刷新列表后再试.', 118 : '目标位置与当前位置相同.', 201 : '文件与现有的重名. 新上传的文件改名为 "%1"', 202 : '无效的文件', 203 : '无效的文件. 文件尺寸太大.', 204 : '上传文件已损失.', 205 : '服务器中的上传临时文件夹无效.', 206 : '因为安全原因,上传中断. 上传文件包含不能 HTML 类型数据.', 207 : '新上传的文件改名为 "%1"', 300 : '移动文件失败.', 301 : '复制文件失败.', 500 : '因为安全原因,文件不可浏览. 请联系系统管理员并检查CKFinder配置文件.', 501 : '不支持缩略图方式.' }, // Other Error Messages. ErrorMsg : { FileEmpty : '文件名不能为空', FileExists : '文件 %s 已存在.', FolderEmpty : '文件夹名称不能为空', FileInvChar : '文件名不能包含以下字符: \n\\ / : * ? " < > |', FolderInvChar : '文件夹名称不能包含以下字符: \n\\ / : * ? " < > |', PopupBlockView : '未能在新窗口中打开文件. 请修改浏览器配置解除对本站点的锁定.' }, // Imageresize plugin Imageresize : { dialogTitle : '改变尺寸 %s', sizeTooBig : '无法大于原图尺寸 (%size).', resizeSuccess : '图像尺寸已修改.', thumbnailNew : '创建缩略图', thumbnailSmall : '小 (%s)', thumbnailMedium : '中 (%s)', thumbnailLarge : '大 (%s)', newSize : '设置新尺寸', width : '宽度', height : '高度', invalidHeight : '无效高度.', invalidWidth : '无效宽度.', invalidName : '文件名无效.', newImage : '创建图像', noExtensionChange : '无法改变文件后缀.', imageSmall : '原文件尺寸过小', contextMenuName : '改变尺寸' }, // Fileeditor plugin Fileeditor : { save : '保存', fileOpenError : '无法打开文件.', fileSaveSuccess : '成功保存文件.', contextMenuName : '编辑', loadingFile : '加载文件中...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the English * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['ja'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, は利用できません。</span>', confirmCancel : '変更された項目があります。ウィンドウを閉じてもいいですか?', ok : '適用', cancel : 'キャンセル', confirmationTitle : '確認', messageTitle : 'インフォメーション', inputTitle : '質問', undo : '元に戻す', redo : 'やり直す', skip : 'スキップ', skipAll : 'すべてスキップ', makeDecision : 'どうしますか?', rememberDecision: '注意:' }, dir : 'ltr', HelpLang : 'en', LangCode : 'ja', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'm/d/yyyy h:MM aa', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Folders', FolderLoading : '読み込み中...', FolderNew : '新しいフォルダ名を入力してください: ', FolderRename : '新しいフォルダ名を入力してください: ', FolderDelete : '本当にフォルダ「"%1"」を削除してもよろしいですか?', FolderRenaming : ' (リネーム中...)', FolderDeleting : ' (削除中...)', // Files FileRename : '新しいファイル名を入力してください: ', FileRenameExt : 'ファイルが使えなくなる可能性がありますが、本当に拡張子を変更してもよろしいですか?', FileRenaming : 'リネーム中...', FileDelete : '本当に「"%1"」を削除してもよろしいですか?', FilesLoading : '読み込み中...', FilesEmpty : 'ファイルがありません', FilesMoved : ' %1 は %2:%3 に移動されました', FilesCopied : ' %1 cは %2:%3 にコピーされました', // Basket BasketFolder : 'Basket', BasketClear : 'バスケットを空にする', BasketRemove : 'バスケットから削除', BasketOpenFolder : '親フォルダを開く', BasketTruncateConfirm : '本当にバスケットの中身を空にしますか?', BasketRemoveConfirm : '本当に「"%1"」をバスケットから削除しますか?', BasketEmpty : 'バスケットの中にファイルがありません。このエリアにドラッグ&ドロップして追加することができます。', BasketCopyFilesHere : 'バスケットからファイルをコピー', BasketMoveFilesHere : 'バスケットからファイルを移動', BasketPasteErrorOther : 'ファイル %s のエラー: %e', BasketPasteMoveSuccess : '以下のファイルが移動されました: %s', BasketPasteCopySuccess : '以下のファイルがコピーされました: %s', // Toolbar Buttons (some used elsewhere) Upload : 'アップロード', UploadTip : '新しいファイルのアップロード', Refresh : '表示の更新', Settings : 'カスタマイズ', Help : 'ヘルプ', HelpTip : 'ヘルプ', // Context Menus Select : 'この画像を選択', SelectThumbnail : 'この画像のサムネイルを選択', View : '画像だけを表示', Download : 'ダウンロード', NewSubFolder : '新しいフォルダに入れる', Rename : 'ファイル名の変更', Delete : '削除', CopyDragDrop : 'コピーするファイルをここにドロップしてください', MoveDragDrop : '移動するファイルをここにドロップしてください', // Dialogs RenameDlgTitle : 'リネーム', NewNameDlgTitle : '新しい名前', FileExistsDlgTitle : 'ファイルはすでに存在します。', SysErrorDlgTitle : 'システムエラー', FileOverwrite : '上書き', FileAutorename : 'A自動でリネーム', // Generic OkBtn : 'OK', CancelBtn : 'キャンセル', CloseBtn : '閉じる', // Upload Panel UploadTitle : 'ファイルのアップロード', UploadSelectLbl : 'アップロードするファイルを選択してください', UploadProgressLbl : '(ファイルのアップロード中...)', UploadBtn : 'アップロード', UploadBtnCancel : 'キャンセル', UploadNoFileMsg : 'ファイルを選んでください。', UploadNoFolder : 'アップロードの前にフォルダを選択してください。', UploadNoPerms : 'ファイルのアップロード権限がありません。', UploadUnknError : 'ファイルの送信に失敗しました。', UploadExtIncorrect : '選択されたファイルの拡張子は許可されていません。', // Settings Panel SetTitle : '表示のカスタマイズ', SetView : '表示方法:', SetViewThumb : 'サムネイル', SetViewList : '表示形式', SetDisplay : '表示する項目:', SetDisplayName : 'ファイル名', SetDisplayDate : '日時', SetDisplaySize : 'ファイルサイズ', SetSort : '表示の順番:', SetSortName : 'ファイル名', SetSortDate : '日付', SetSortSize : 'サイズ', // Status Bar FilesCountEmpty : '<フォルダ内にファイルがありません>', FilesCountOne : '1つのファイル', FilesCountMany : '%1個のファイル', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'リクエストの処理に失敗しました。 (Error %1)', Errors : { 10 : '不正なコマンドです。', 11 : 'リソースタイプが特定できませんでした。', 12 : '要求されたリソースのタイプが正しくありません。', 102 : 'ファイル名/フォルダ名が正しくありません。', 103 : 'リクエストを完了できませんでした。認証エラーです。', 104 : 'リクエストを完了できませんでした。ファイルのパーミッションが許可されていません。', 105 : '拡張子が正しくありません。', 109 : '不正なリクエストです。', 110 : '不明なエラーが発生しました。', 115 : '同じ名前のファイル/フォルダがすでに存在しています。', 116 : 'フォルダが見つかりませんでした。ページを更新して再度お試し下さい。', 117 : 'ファイルが見つかりませんでした。ページを更新して再度お試し下さい。', 118 : '対象が移動元と同じ場所を指定されています。', 201 : '同じ名前のファイルがすでに存在しています。"%1" にリネームして保存されました。', 202 : '不正なファイルです。', 203 : 'ファイルのサイズが大きすぎます。', 204 : 'アップロードされたファイルは壊れています。', 205 : 'サーバ内の一時作業フォルダが利用できません。', 206 : 'セキュリティ上の理由からアップロードが取り消されました。このファイルにはHTMLに似たデータが含まれています。', 207 : 'ファイルは "%1" にリネームして保存されました。', 300 : 'ファイルの移動に失敗しました。', 301 : 'ファイルのコピーに失敗しました。', 500 : 'ファイルブラウザはセキュリティ上の制限から無効になっています。システム担当者に連絡をして、CKFinderの設定をご確認下さい。', 501 : 'サムネイル機能は無効になっています。' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'ファイル名を入力してください', FileExists : ' %s はすでに存在しています。別の名前を入力してください。', FolderEmpty : 'フォルダ名を入力してください', FileInvChar : 'ファイルに以下の文字は使えません: \n\\ / : * ? " < > |', FolderInvChar : 'フォルダに以下の文字は使えません: \n\\ / : * ? " < > |', PopupBlockView : 'ファイルを新しいウィンドウで開くことに失敗しました。 お使いのブラウザの設定でポップアップをブロックする設定を解除してください。' }, // Imageresize plugin Imageresize : { dialogTitle : 'リサイズ: %s', sizeTooBig : 'オリジナルの画像よりも大きいサイズは指定できません。 (%size).', resizeSuccess : '画像のリサイズに成功しました', thumbnailNew : 'サムネイルをつくる', thumbnailSmall : '小 (%s)', thumbnailMedium : '中 (%s)', thumbnailLarge : '大 (%s)', newSize : 'Set new size', width : '幅', height : '高さ', invalidHeight : '高さの値が不正です。', invalidWidth : '幅の値が不正です。', invalidName : 'ファイル名が不正です。', newImage : '新しい画像を作成', noExtensionChange : '拡張子は変更できません。', imageSmall : '元画像が小さすぎます。', contextMenuName : 'リサイズ' }, // Fileeditor plugin Fileeditor : { save : '保存', fileOpenError : 'ファイルを開けませんでした。', fileSaveSuccess : 'ファイルの保存が完了しました。', contextMenuName : '編集', loadingFile : 'ファイルの読み込み中...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Slovak * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['sk'] = { appTitle : 'CKFinder', // MISSING // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING ok : 'OK', // MISSING cancel : 'Cancel', // MISSING confirmationTitle : 'Confirmation', // MISSING messageTitle : 'Information', // MISSING inputTitle : 'Question', // MISSING undo : 'Undo', // MISSING redo : 'Redo', // MISSING skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', // MISSING HelpLang : 'en', LangCode : 'sk', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'mm/dd/yyyy HH:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Adresáre', FolderLoading : 'Nahrávam...', FolderNew : 'Zadajte prosím meno nového adresára: ', FolderRename : 'Zadajte prosím meno nového adresára: ', FolderDelete : 'Skutočne zmazať adresár "%1" ?', FolderRenaming : ' (Prebieha premenovanie adresára...)', FolderDeleting : ' (Prebieha zmazanie adresára...)', // Files FileRename : 'Zadajte prosím meno nového súboru: ', FileRenameExt : 'Skutočne chcete zmeniť príponu súboru? Upozornenie: zmenou prípony sa súbor môže stať nepoužiteľným, pokiaľ prípona nie je podporovaná.', FileRenaming : 'Prebieha premenovanie súboru...', FileDelete : 'Skutočne chcete odstrániť súbor "%1"?', FilesLoading : 'Loading...', // MISSING FilesEmpty : 'Empty folder', // MISSING FilesMoved : 'File %1 moved into %2:%3', // MISSING FilesCopied : 'File %1 copied into %2:%3', // MISSING // Basket BasketFolder : 'Basket', // MISSING BasketClear : 'Clear Basket', // MISSING BasketRemove : 'Remove from basket', // MISSING BasketOpenFolder : 'Open parent folder', // MISSING BasketTruncateConfirm : 'Do you really want to remove all files from the basket?', // MISSING BasketRemoveConfirm : 'Do you really want to remove the file "%1" from the basket?', // MISSING BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copy Files from Basket', // MISSING BasketMoveFilesHere : 'Move Files from Basket', // MISSING BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'The following files were moved: %s', // MISSING BasketPasteCopySuccess : 'The following files were copied: %s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Prekopírovať na server (Upload)', UploadTip : 'Prekopírovať nový súbor', Refresh : 'Znovunačítať (Refresh)', Settings : 'Nastavenia', Help : 'Pomoc', HelpTip : 'Pomoc', // Context Menus Select : 'Vybrať', SelectThumbnail : 'Select Thumbnail', // MISSING View : 'Náhľad', Download : 'Stiahnuť', NewSubFolder : 'Nový podadresár', Rename : 'Premenovať', Delete : 'Zmazať', CopyDragDrop : 'Copy file here', // MISSING MoveDragDrop : 'Move file here', // MISSING // Dialogs RenameDlgTitle : 'Rename', // MISSING NewNameDlgTitle : 'New name', // MISSING FileExistsDlgTitle : 'File already exists', // MISSING SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Overwrite', // MISSING FileAutorename : 'Auto-rename', // MISSING // Generic OkBtn : 'OK', CancelBtn : 'Zrušiť', CloseBtn : 'Zatvoriť', // Upload Panel UploadTitle : 'Nahrať nový súbor', UploadSelectLbl : 'Vyberte súbor, ktorý chcete prekopírovať na server', UploadProgressLbl : '(Prebieha kopírovanie, čakajte prosím...)', UploadBtn : 'Prekopírovať vybratý súbor', UploadBtnCancel : 'Cancel', // MISSING UploadNoFileMsg : 'Vyberte prosím súbor na Vašom počítači!', UploadNoFolder : 'Please select folder before uploading.', // MISSING UploadNoPerms : 'File upload not allowed.', // MISSING UploadUnknError : 'Error sending the file.', // MISSING UploadExtIncorrect : 'File extension not allowed in this folder.', // MISSING // Settings Panel SetTitle : 'Nastavenia', SetView : 'Náhľad:', SetViewThumb : 'Miniobrázky', SetViewList : 'Zoznam', SetDisplay : 'Zobraziť:', SetDisplayName : 'Názov súboru', SetDisplayDate : 'Dátum', SetDisplaySize : 'Veľkosť súboru', SetSort : 'Zoradenie:', SetSortName : 'podľa názvu súboru', SetSortDate : 'podľa dátumu', SetSortSize : 'podľa veľkosti', // Status Bar FilesCountEmpty : '<Prázdny adresár>', FilesCountOne : '1 súbor', FilesCountMany : '%1 súborov', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'Server nemohol dokončiť spracovanie požiadavky. (Chyba %1)', Errors : { 10 : 'Neplatný príkaz.', 11 : 'V požiadavke nebol špecifikovaný typ súboru.', 12 : 'Nepodporovaný typ súboru.', 102 : 'Neplatný názov súboru alebo adresára.', 103 : 'Nebolo možné dokončiť spracovanie požiadavky kvôli nepostačujúcej úrovni oprávnení.', 104 : 'Nebolo možné dokončiť spracovanie požiadavky kvôli obmedzeniam v prístupových právach ku súborom.', 105 : 'Neplatná prípona súboru.', 109 : 'Neplatná požiadavka.', 110 : 'Neidentifikovaná chyba.', 115 : 'Zadaný súbor alebo adresár už existuje.', 116 : 'Adresár nebol nájdený. Aktualizujte obsah adresára (Znovunačítať) a skúste znovu.', 117 : 'Súbor nebol nájdený. Aktualizujte obsah adresára (Znovunačítať) a skúste znovu.', 118 : 'Source and target paths are equal.', // MISSING 201 : 'Súbor so zadaným názvom už existuje. Prekopírovaný súbor bol premenovaný na "%1"', 202 : 'Neplatný súbor', 203 : 'Neplatný súbor - súbor presahuje maximálnu povolenú veľkosť.', 204 : 'Kopírovaný súbor je poškodený.', 205 : 'Server nemá špecifikovaný dočasný adresár pre kopírované súbory.', 206 : 'Kopírovanie prerušené kvôli nedostatočnému zabezpečeniu. Súbor obsahuje HTML data.', 207 : 'Prekopírovaný súbor bol premenovaný na "%1"', 300 : 'Moving file(s) failed.', // MISSING 301 : 'Copying file(s) failed.', // MISSING 500 : 'Prehliadanie súborov je zakázané kvôli bezpečnosti. Kontaktujte prosím administrátora a overte nastavenia v konfiguračnom súbore pre CKFinder.', 501 : 'Momentálne nie je zapnutá podpora pre generáciu miniobrázkov.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Názov súbor nesmie prázdny', FileExists : 'File %s already exists', // MISSING FolderEmpty : 'Názov adresára nesmie byť prázdny', FileInvChar : 'Súbor nesmie obsahovať žiadny z nasledujúcich znakov: \n\\ / : * ? " < > |', FolderInvChar : 'Adresár nesmie obsahovať žiadny z nasledujúcich znakov: \n\\ / : * ? " < > |', PopupBlockView : 'Nebolo možné otvoriť súbor v novom okne. Overte nastavenia Vášho prehliadača a zakážte všetky blokovače popup okien pre túto webstránku.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Resize %s', // MISSING sizeTooBig : 'Cannot set image height or width to a value bigger than the original size (%size).', // MISSING resizeSuccess : 'Image resized successfully.', // MISSING thumbnailNew : 'Create new thumbnail', // MISSING thumbnailSmall : 'Small (%s)', // MISSING thumbnailMedium : 'Medium (%s)', // MISSING thumbnailLarge : 'Large (%s)', // MISSING newSize : 'Set new size', // MISSING width : 'Width', // MISSING height : 'Height', // MISSING invalidHeight : 'Invalid height.', // MISSING invalidWidth : 'Invalid width.', // MISSING invalidName : 'Invalid file name.', // MISSING newImage : 'Create new image', // MISSING noExtensionChange : 'The file extension cannot be changed.', // MISSING imageSmall : 'Source image is too small', // MISSING contextMenuName : 'Resize' // MISSING }, // Fileeditor plugin Fileeditor : { save : 'Save', // MISSING fileOpenError : 'Unable to open file.', // MISSING fileSaveSuccess : 'File saved successfully.', // MISSING contextMenuName : 'Edit', // MISSING loadingFile : 'Loading file, please wait...' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2012, CKSource - Frederico Knabben. All rights reserved. * * The software, this file, and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying, or distributing this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object for the Vietnamese * language. */ /** * Contains the dictionary of language entries. * @namespace */ CKFinder.lang['en'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, không khả dụng</span>', confirmCancel : 'Vài tùy chọn đã thay đổi. Bạn có muốn đóng hộp thoại?', ok : 'OK', cancel : 'Hủy', confirmationTitle : 'Xác nhận', messageTitle : 'Thông tin', inputTitle : 'Câu hỏi', undo : 'Hoàn tác', redo : 'Làm lại', skip : 'Bỏ qua', skipAll : 'Bỏ qua tất cả', makeDecision : 'Chọn hành động nào?', rememberDecision: 'Ghi nhớ quyết định này' }, // Language direction, 'ltr' or 'rtl'. dir : 'ltr', HelpLang : 'en', LangCode : 'en', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'd/m/yyyy h:MM aa', DateAmPm : ['SA', 'CH'], // Folders FoldersTitle : 'Thư mục', FolderLoading : 'Đang tải...', FolderNew : 'Xin chọn tên cho thư mục mới: ', FolderRename : 'Xin chọn tên mới cho thư mục: ', FolderDelete : 'Bạn có chắc muốn xóa thư mục "%1"?', FolderRenaming : ' (Đang đổi tên...)', FolderDeleting : ' (Đang xóa...)', DestinationFolder : 'Destination Folder', // MISSING // Files FileRename : 'Xin nhập tên tập tin mới: ', FileRenameExt : 'Bạn có chắc muốn đổi phần mở rộng? Tập tin có thể sẽ không dùng được.', FileRenaming : 'Đang đổi tên...', FileDelete : 'Bạn có chắc muốn xóa tập tin "%1"?', FilesDelete : 'Are you sure you want to delete %1 files?', // MISSING FilesLoading : 'Đang tải...', FilesEmpty : 'Thư mục trống.', DestinationFile : 'Destination File', // MISSING SkippedFiles : 'List of skipped files:', // MISSING // Basket BasketFolder : 'Thùng rác', BasketClear : 'Dọn thùng rác', BasketRemove : 'Xóa khỏi thùng rác', BasketOpenFolder : 'Mở thư mục cha', BasketTruncateConfirm : 'Bạn có chắc muốn bỏ tất cả tập tin trong rổ?', BasketRemoveConfirm : 'Bạn có chắc muốn bỏ tập tin "%1" khỏi rổ?', BasketRemoveConfirmMultiple : 'Do you really want to remove %1 files from the basket?', // MISSING BasketEmpty : 'Không có tập tin trong rổ, hãy kéo và thả tập tin vào rổ.', BasketCopyFilesHere : 'Chép tập tin từ rổ', BasketMoveFilesHere : 'Chuyển tập tin từ rổ', // Global messages OperationCompletedSuccess : 'Operation completed successfully.', // MISSING OperationCompletedErrors : 'Operation completed with errors.', // MISSING FileError : '%s: %e', // MISSING // Move and Copy files MovedFilesNumber : 'Number of files moved: %s.', // MISSING CopiedFilesNumber : 'Number of files copied: %s.', // MISSING MoveFailedList : 'The following files could not be moved:<br />%s', // MISSING CopyFailedList : 'The following files could not be copied:<br />%s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Tải lên', UploadTip : 'Tải tập tin mới', Refresh : 'Làm tươi', Settings : 'Thiết lập', Help : 'Hướng dẫn', HelpTip : 'Hướng dẫn', // Context Menus Select : 'Chọn', SelectThumbnail : 'Chọn ảnh mẫu', View : 'Xem', Download : 'Tải về', NewSubFolder : 'Tạo thư mục con', Rename : 'Đổi tên', Delete : 'Xóa', DeleteFiles : 'Delete Files', // MISSING CopyDragDrop : 'Sao chép ở đây', MoveDragDrop : 'Di chuyển ở đây', // Dialogs RenameDlgTitle : 'Đổi tên', NewNameDlgTitle : 'Tên mới', FileExistsDlgTitle : 'Tập tin đã tồn tại', SysErrorDlgTitle : 'Lỗi hệ thống', FileOverwrite : 'Ghi đè', FileAutorename : 'Tự đổi tên', ManuallyRename : 'Manually rename', // MISSING // Generic OkBtn : 'OK', CancelBtn : 'Hủy bỏ', CloseBtn : 'Đóng', // Upload Panel UploadTitle : 'Tải tập tin mới', UploadSelectLbl : 'Chọn tập tin tải lên', UploadProgressLbl : '(Đang tải lên, vui lòng chờ...)', UploadBtn : 'Tải tập tin đã chọn', UploadBtnCancel : 'Hủy bỏ', UploadNoFileMsg : 'Xin chọn một tập tin trong máy tính.', UploadNoFolder : 'Xin chọn thư mục trước khi tải lên.', UploadNoPerms : 'Không được phép tải lên.', UploadUnknError : 'Lỗi khi tải tập tin.', UploadExtIncorrect : 'Kiểu tập tin không được chấp nhận trong thư mục này.', // Flash Uploads UploadLabel : 'Tập tin sẽ tải:', UploadTotalFiles : 'Tổng số tập tin:', UploadTotalSize : 'Dung lượng tổng cộng:', UploadSend : 'Tải lên', UploadAddFiles : 'Thêm tập tin', UploadClearFiles : 'Xóa tập tin', UploadCancel : 'Hủy tải', UploadRemove : 'Xóa', UploadRemoveTip : 'Xóa !f', UploadUploaded : 'Đã tải !n%', UploadProcessing : 'Đang xử lí...', // Settings Panel SetTitle : 'Thiết lập', SetView : 'Xem:', SetViewThumb : 'Ảnh mẫu', SetViewList : 'Danh sách', SetDisplay : 'Hiển thị:', SetDisplayName : 'Tên tập tin', SetDisplayDate : 'Ngày', SetDisplaySize : 'Dung lượng', SetSort : 'Sắp xếp:', SetSortName : 'Theo tên', SetSortDate : 'Theo ngày', SetSortSize : 'Theo dung lượng', SetSortExtension : 'Theo phần mở rộng', // Status Bar FilesCountEmpty : '<Thư mục rỗng>', FilesCountOne : '1 tập tin', FilesCountMany : '%1 tập tin', // Size and Speed Kb : '%1 KB', Mb : '%1 MB', Gb : '%1 GB', SizePerSecond : '%1/s', // Connector Error Messages. ErrorUnknown : 'Không thể hoàn tất yêu cầu. (Lỗi %1)', Errors : { 10 : 'Lệnh không hợp lệ.', 11 : 'Kiểu tài nguyên không được chỉ định trong yêu cầu.', 12 : 'Kiểu tài nguyên yêu cầu không hợp lệ.', 102 : 'Tên tập tin hay thư mục không hợp lệ.', 103 : 'Không thể hoàn tất yêu cầu vì giới hạn quyền.', 104 : 'Không thể hoàn tất yêu cầu vì giới hạn quyền của hệ thống tập tin.', 105 : 'Phần mở rộng tập tin không hợp lệ.', 109 : 'Yêu cầu không hợp lệ.', 110 : 'Lỗi không xác định.', 111 : 'It was not possible to complete the request due to resulting file size.', // MISSING 115 : 'Tập tin hoặc thư mục cùng tên đã tồn tại.', 116 : 'Không thấy thư mục. Hãy làm tươi và thử lại.', 117 : 'Không thấy tập tin. Hãy làm tươi và thử lại.', 118 : 'Đường dẫn nguồn và đích giống nhau.', 201 : 'Tập tin cùng tên đã tồn tại. Tập tin vừa tải lên được đổi tên thành "%1".', 202 : 'Tập tin không hợp lệ.', 203 : 'Tập tin không hợp lệ. Dung lượng quá lớn.', 204 : 'Tập tin tải lên bị hỏng.', 205 : 'Không có thư mục tạm để tải tập tin.', 206 : 'Huỷ tải lên vì lí do bảo mật. Tập tin chứa dữ liệu giống HTML.', 207 : 'Tập tin được đổi tên thành "%1".', 300 : 'Di chuyển tập tin thất bại.', 301 : 'Chép tập tin thất bại.', 500 : 'Trình duyệt tập tin bị vô hiệu vì lí do bảo mật. Xin liên hệ quản trị hệ thống và kiểm tra tập tin cấu hình CKFinder.', 501 : 'Chức năng hỗ trợ ảnh mẫu bị vô hiệu.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Không thể để trống tên tập tin.', FileExists : 'Tập tin %s đã tồn tại.', FolderEmpty : 'Không thể để trống tên thư mục.', FolderExists : 'Folder %s already exists.', // MISSING FolderNameExists : 'Folder already exists.', // MISSING FileInvChar : 'Tên tập tin không thể chưa các kí tự: \n\\ / : * ? " < > |', FolderInvChar : 'Tên thư mục không thể chứa các kí tự: \n\\ / : * ? " < > |', PopupBlockView : 'Không thể mở tập tin trong cửa sổ mới. Hãy kiểm tra trình duyệt và tắt chức năng chặn popup trên trang web này.', XmlError : 'Không thể nạp hồi đáp XML từ máy chủ web.', XmlEmpty : 'Không thể nạp hồi đáp XML từ máy chủ web. Dữ liệu rỗng.', XmlRawResponse : 'Hồi đáp thô từ máy chủ: %s' }, // Imageresize plugin Imageresize : { dialogTitle : 'Đổi kích thước %s', sizeTooBig : 'Không thể đặt chiều cao hoặc rộng to hơn kích thước gốc (%size).', resizeSuccess : 'Đổi kích thước ảnh thành công.', thumbnailNew : 'Tạo ảnh mẫu mới', thumbnailSmall : 'Nhỏ (%s)', thumbnailMedium : 'Vừa (%s)', thumbnailLarge : 'Lớn (%s)', newSize : 'Chọn kích thước mới', width : 'Rộng', height : 'Cao', invalidHeight : 'Chiều cao không hợp lệ.', invalidWidth : 'Chiều rộng không hợp lệ.', invalidName : 'Tên tập tin không hợp lệ.', newImage : 'Tạo ảnh mới', noExtensionChange : 'Không thể thay đổi phần mở rộng.', imageSmall : 'Ảnh nguồn quá nhỏ.', contextMenuName : 'Đổi kích thước', lockRatio : 'Khoá tỉ lệ', resetSize : 'Đặt lại kích thước' }, // Fileeditor plugin Fileeditor : { save : 'Lưu', fileOpenError : 'Không thể mở tập tin.', fileSaveSuccess : 'Lưu tập tin thành công.', contextMenuName : 'Sửa', loadingFile : 'Đang tải tập tin, xin chờ...' }, Maximize : { maximize : 'Cực đại hóa', minimize : 'Cực tiểu hóa' }, Gallery : { current : 'Hình thứ {current} trên {total}' }, Zip : { extractHereLabel : 'Extract here', // MISSING extractToLabel : 'Extract to...', // MISSING downloadZipLabel : 'Download as zip', // MISSING compressZipLabel : 'Compress to zip', // MISSING removeAndExtract : 'Remove existing and extract', // MISSING extractAndOverwrite : 'Extract overwriting existing files', // MISSING extractSuccess : 'File extracted successfully.' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Danish * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['da'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, ikke tilgængelig</span>', confirmCancel : 'Nogle af indstillingerne er blevet ændret. Er du sikker på at lukke dialogen?', ok : 'OK', cancel : 'Annuller', confirmationTitle : 'Bekræftelse', messageTitle : 'Information', inputTitle : 'Spørgsmål', undo : 'Fortryd', redo : 'Annuller fortryd', skip : 'Skip', skipAll : 'Skip alle', makeDecision : 'Hvad skal der foretages?', rememberDecision: 'Husk denne indstilling' }, dir : 'ltr', HelpLang : 'en', LangCode : 'da', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'dd-mm-yyyy HH:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Mapper', FolderLoading : 'Indlæser...', FolderNew : 'Skriv navnet på den nye mappe: ', FolderRename : 'Skriv det nye navn på mappen: ', FolderDelete : 'Er du sikker på, at du vil slette mappen "%1" ?', FolderRenaming : ' (Omdøber...)', FolderDeleting : ' (Sletter...)', // Files FileRename : 'Skriv navnet på den nye fil: ', FileRenameExt : 'Er du sikker på, at du vil ændre filtypen? Filen kan muligvis ikke bruges bagefter.', FileRenaming : '(Omdøber...)', FileDelete : 'Er du sikker på, at du vil slette filen "%1" ?', FilesLoading : 'Indlæser...', FilesEmpty : 'Tom mappe', FilesMoved : 'Filen %1 flyttet til %2:%3', FilesCopied : 'Filen %1 kopieret til %2:%3', // Basket BasketFolder : 'Kurv', BasketClear : 'Tøm kurv', BasketRemove : 'Fjern fra kurv', BasketOpenFolder : 'Åben overordnet mappe', BasketTruncateConfirm : 'Er du sikker på at du vil tømme kurven?', BasketRemoveConfirm : 'Er du sikker på at du vil slette filen "%1" fra kurven?', BasketEmpty : 'Ingen filer i kurven, brug musen til at trække filer til kurven.', BasketCopyFilesHere : 'Kopier Filer fra kurven', BasketMoveFilesHere : 'Flyt Filer fra kurven', BasketPasteErrorOther : 'Fil fejl: %e', BasketPasteMoveSuccess : 'Følgende filer blev flyttet: %s', BasketPasteCopySuccess : 'Følgende filer blev kopieret: %s', // Toolbar Buttons (some used elsewhere) Upload : 'Upload', UploadTip : 'Upload ny fil', Refresh : 'Opdatér', Settings : 'Indstillinger', Help : 'Hjælp', HelpTip : 'Hjælp', // Context Menus Select : 'Vælg', SelectThumbnail : 'Vælg thumbnail', View : 'Vis', Download : 'Download', NewSubFolder : 'Ny undermappe', Rename : 'Omdøb', Delete : 'Slet', CopyDragDrop : 'Kopier hertil', MoveDragDrop : 'Flyt hertil', // Dialogs RenameDlgTitle : 'Omdøb', NewNameDlgTitle : 'Nyt navn', FileExistsDlgTitle : 'Filen eksisterer allerede', SysErrorDlgTitle : 'System fejl', FileOverwrite : 'Overskriv', FileAutorename : 'Auto-omdøb', // Generic OkBtn : 'OK', CancelBtn : 'Annullér', CloseBtn : 'Luk', // Upload Panel UploadTitle : 'Upload ny fil', UploadSelectLbl : 'Vælg den fil, som du vil uploade', UploadProgressLbl : '(Uploader, vent venligst...)', UploadBtn : 'Upload filen', UploadBtnCancel : 'Annuller', UploadNoFileMsg : 'Vælg en fil på din computer', UploadNoFolder : 'Venligst vælg en mappe før upload startes.', UploadNoPerms : 'Upload er ikke tilladt.', UploadUnknError : 'Fejl ved upload.', UploadExtIncorrect : 'Denne filtype er ikke tilladt i denne mappe.', // Settings Panel SetTitle : 'Indstillinger', SetView : 'Vis:', SetViewThumb : 'Thumbnails', SetViewList : 'Liste', SetDisplay : 'Thumbnails:', SetDisplayName : 'Filnavn', SetDisplayDate : 'Dato', SetDisplaySize : 'Størrelse', SetSort : 'Sortering:', SetSortName : 'efter filnavn', SetSortDate : 'efter dato', SetSortSize : 'efter størrelse', // Status Bar FilesCountEmpty : '<tom mappe>', FilesCountOne : '1 fil', FilesCountMany : '%1 filer', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'Det var ikke muligt at fuldføre handlingen. (Fejl: %1)', Errors : { 10 : 'Ugyldig handling.', 11 : 'Ressourcetypen blev ikke angivet i anmodningen.', 12 : 'Ressourcetypen er ikke gyldig.', 102 : 'Ugyldig fil eller mappenavn.', 103 : 'Det var ikke muligt at fuldføre handlingen på grund af en begrænsning i rettigheder.', 104 : 'Det var ikke muligt at fuldføre handlingen på grund af en begrænsning i filsystem rettigheder.', 105 : 'Ugyldig filtype.', 109 : 'Ugyldig anmodning.', 110 : 'Ukendt fejl.', 115 : 'En fil eller mappe med det samme navn eksisterer allerede.', 116 : 'Mappen blev ikke fundet. Opdatér listen eller prøv igen.', 117 : 'Filen blev ikke fundet. Opdatér listen eller prøv igen.', 118 : 'Originalplacering og destination er ens', 201 : 'En fil med det samme filnavn eksisterer allerede. Den uploadede fil er blevet omdøbt til "%1"', 202 : 'Ugyldig fil.', 203 : 'Ugyldig fil. Filstørrelsen er for stor.', 204 : 'Den uploadede fil er korrupt.', 205 : 'Der er ikke en midlertidig mappe til upload til rådighed på serveren.', 206 : 'Upload annulleret af sikkerhedsmæssige årsager. Filen indeholder HTML-lignende data.', 207 : 'Den uploadede fil er blevet omdøbt til "%1"', 300 : 'Flytning af fil(er) fejlede.', 301 : 'Kopiering af fil(er) fejlede.', 500 : 'Filbrowseren er deaktiveret af sikkerhedsmæssige årsager. Kontakt systemadministratoren eller kontrollér CKFinders konfigurationsfil.', 501 : 'Understøttelse af thumbnails er deaktiveret.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Filnavnet må ikke være tomt', FileExists : 'Fil %erne eksisterer allerede', FolderEmpty : 'Mappenavnet må ikke være tomt', FileInvChar : 'Filnavnet må ikke indeholde et af følgende tegn: \n\\ / : * ? " < > |', FolderInvChar : 'Mappenavnet må ikke indeholde et af følgende tegn: \n\\ / : * ? " < > |', PopupBlockView : 'Det var ikke muligt at åbne filen i et nyt vindue. Kontrollér konfigurationen i din browser, og deaktivér eventuelle popup-blokkere for denne hjemmeside.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Rediger størrelse %s', sizeTooBig : 'Kan ikke ændre billedets højde eller bredde til en værdi større end dets originale størrelse (%size).', resizeSuccess : 'Størrelsen er nu ændret.', thumbnailNew : 'Opret ny thumbnail', thumbnailSmall : 'Lille (%s)', thumbnailMedium : 'Mellem (%s)', thumbnailLarge : 'Stor (%s)', newSize : 'Rediger størrelse', width : 'Bredde', height : 'Højde', invalidHeight : 'Ugyldig højde.', invalidWidth : 'Ugyldig bredde.', invalidName : 'Ugyldigt filenavn.', newImage : 'Opret nyt billede.', noExtensionChange : 'Filtypen kan ikke ændres.', imageSmall : 'Originalfilen er for lille', contextMenuName : 'Rediger størrelse' }, // Fileeditor plugin Fileeditor : { save : 'Gem', fileOpenError : 'Filen kan ikke åbnes.', fileSaveSuccess : 'Filen er nu gemt.', contextMenuName : 'Rediger', loadingFile : 'Henter fil, vent venligst...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['nb'] = { appTitle : 'CKFinder', // MISSING // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING ok : 'OK', // MISSING cancel : 'Cancel', // MISSING confirmationTitle : 'Confirmation', // MISSING messageTitle : 'Information', // MISSING inputTitle : 'Question', // MISSING undo : 'Undo', // MISSING redo : 'Redo', // MISSING skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', // MISSING HelpLang : 'en', LangCode : 'no', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'dd/mm/yyyy HH:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Mapper', FolderLoading : 'Laster...', FolderNew : 'Skriv inn det nye mappenavnet: ', FolderRename : 'Skriv inn det nye mappenavnet: ', FolderDelete : 'Er du sikker på at du vil slette mappen "%1"?', FolderRenaming : ' (Endrer mappenavn...)', FolderDeleting : ' (Sletter...)', // Files FileRename : 'Skriv inn det nye filnavnet: ', FileRenameExt : 'Er du sikker på at du vil endre filtypen? Filen kan bli ubrukelig', FileRenaming : 'Endrer filnavn...', FileDelete : 'Er du sikker på at du vil slette denne filen "%1"?', FilesLoading : 'Loading...', // MISSING FilesEmpty : 'Empty folder', // MISSING FilesMoved : 'File %1 moved into %2:%3', // MISSING FilesCopied : 'File %1 copied into %2:%3', // MISSING // Basket BasketFolder : 'Basket', // MISSING BasketClear : 'Clear Basket', // MISSING BasketRemove : 'Remove from basket', // MISSING BasketOpenFolder : 'Open parent folder', // MISSING BasketTruncateConfirm : 'Do you really want to remove all files from the basket?', // MISSING BasketRemoveConfirm : 'Do you really want to remove the file "%1" from the basket?', // MISSING BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copy Files from Basket', // MISSING BasketMoveFilesHere : 'Move Files from Basket', // MISSING BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'The following files were moved: %s', // MISSING BasketPasteCopySuccess : 'The following files were copied: %s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Last opp', UploadTip : 'Last opp en ny fil', Refresh : 'Oppdater', Settings : 'Innstillinger', Help : 'Hjelp', HelpTip : 'Hjelp finnes kun på engelsk', // Context Menus Select : 'Velg', SelectThumbnail : 'Velg Miniatyr', View : 'Vis fullversjon', Download : 'Last ned', NewSubFolder : 'Ny Undermappe', Rename : 'Endre navn', Delete : 'Slett', CopyDragDrop : 'Copy file here', // MISSING MoveDragDrop : 'Move file here', // MISSING // Dialogs RenameDlgTitle : 'Rename', // MISSING NewNameDlgTitle : 'New name', // MISSING FileExistsDlgTitle : 'File already exists', // MISSING SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Overwrite', // MISSING FileAutorename : 'Auto-rename', // MISSING // Generic OkBtn : 'OK', CancelBtn : 'Avbryt', CloseBtn : 'Lukk', // Upload Panel UploadTitle : 'Last opp ny fil', UploadSelectLbl : 'Velg filen du vil laste opp', UploadProgressLbl : '(Laster opp filen, vennligst vent...)', UploadBtn : 'Last opp valgt fil', UploadBtnCancel : 'Cancel', // MISSING UploadNoFileMsg : 'Du må velge en fil fra din datamaskin', UploadNoFolder : 'Please select folder before uploading.', // MISSING UploadNoPerms : 'File upload not allowed.', // MISSING UploadUnknError : 'Error sending the file.', // MISSING UploadExtIncorrect : 'File extension not allowed in this folder.', // MISSING // Settings Panel SetTitle : 'Innstillinger', SetView : 'Filvisning:', SetViewThumb : 'Miniatyrbilder', SetViewList : 'Liste', SetDisplay : 'Vis:', SetDisplayName : 'Filnavn', SetDisplayDate : 'Dato', SetDisplaySize : 'Filstørrelse', SetSort : 'Sorter etter:', SetSortName : 'Filnavn', SetSortDate : 'Dato', SetSortSize : 'Størrelse', // Status Bar FilesCountEmpty : '<Tom Mappe>', FilesCountOne : '1 fil', FilesCountMany : '%1 filer', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'Det var ikke mulig å utføre forespørselen. (Feil %1)', Errors : { 10 : 'Ugyldig kommando.', 11 : 'Ressurstypen ble ikke spesifisert i forepørselen.', 12 : 'Ugyldig ressurstype.', 102 : 'Ugyldig fil- eller mappenavn.', 103 : 'Kunne ikke utføre forespørselen pga manglende autorisasjon.', 104 : 'Kunne ikke utføre forespørselen pga manglende tilgang til filsystemet.', 105 : 'Ugyldig filtype.', 109 : 'Ugyldig forespørsel.', 110 : 'Ukjent feil.', 115 : 'Det finnes allerede en fil eller mappe med dette navnet.', 116 : 'Kunne ikke finne mappen. Oppdater vinduet og prøv igjen.', 117 : 'Kunne ikke finne filen. Oppdater vinduet og prøv igjen.', 118 : 'Source and target paths are equal.', // MISSING 201 : 'Det fantes allerede en fil med dette navnet. Den opplastede filens navn har blitt endret til "%1"', 202 : 'Ugyldig fil', 203 : 'Ugyldig fil. Filen er for stor.', 204 : 'Den opplastede filen er korrupt.', 205 : 'Det finnes ingen midlertidig mappe for filopplastinger.', 206 : 'Opplastingen ble avbrutt av sikkerhetshensyn. Filen inneholder HTML-aktig data.', 207 : 'Den opplastede filens navn har blitt endret til "%1"', 300 : 'Moving file(s) failed.', // MISSING 301 : 'Copying file(s) failed.', // MISSING 500 : 'Filvelgeren ikke tilgjengelig av sikkerhetshensyn. Kontakt systemansvarlig og be han sjekke CKFinder\'s konfigurasjonsfil.', 501 : 'Funksjon for minityrbilder er skrudd av.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Filnavnet kan ikke være tomt', FileExists : 'File %s already exists', // MISSING FolderEmpty : 'Mappenavnet kan ikke være tomt', FileInvChar : 'Filnavnet kan ikke inneholde følgende tegn: \n\\ / : * ? " < > |', FolderInvChar : 'Mappenavnet kan ikke inneholde følgende tegn: \n\\ / : * ? " < > |', PopupBlockView : 'Du må skru av popup-blockeren for å se bildet i nytt vindu.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Resize %s', // MISSING sizeTooBig : 'Cannot set image height or width to a value bigger than the original size (%size).', // MISSING resizeSuccess : 'Image resized successfully.', // MISSING thumbnailNew : 'Create new thumbnail', // MISSING thumbnailSmall : 'Small (%s)', // MISSING thumbnailMedium : 'Medium (%s)', // MISSING thumbnailLarge : 'Large (%s)', // MISSING newSize : 'Set new size', // MISSING width : 'Width', // MISSING height : 'Height', // MISSING invalidHeight : 'Invalid height.', // MISSING invalidWidth : 'Invalid width.', // MISSING invalidName : 'Invalid file name.', // MISSING newImage : 'Create new image', // MISSING noExtensionChange : 'The file extension cannot be changed.', // MISSING imageSmall : 'Source image is too small', // MISSING contextMenuName : 'Resize' // MISSING }, // Fileeditor plugin Fileeditor : { save : 'Save', // MISSING fileOpenError : 'Unable to open file.', // MISSING fileSaveSuccess : 'File saved successfully.', // MISSING contextMenuName : 'Edit', // MISSING loadingFile : 'Loading file, please wait...' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Chinese (Taiwan) * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['zh-tw'] = { appTitle : 'CKFinder', // MISSING // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING ok : 'OK', // MISSING cancel : 'Cancel', // MISSING confirmationTitle : 'Confirmation', // MISSING messageTitle : 'Information', // MISSING inputTitle : 'Question', // MISSING undo : 'Undo', // MISSING redo : 'Redo', // MISSING skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', // MISSING HelpLang : 'zh-tw', LangCode : 'zh-tw', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'mm/dd/yyyy HH:MM', DateAmPm : ['上午', '下午'], // Folders FoldersTitle : '目錄', FolderLoading : '載入中...', FolderNew : '請輸入新目錄名稱: ', FolderRename : '請輸入新目錄名稱: ', FolderDelete : '確定刪除 "%1" 這個目錄嗎?', FolderRenaming : ' (修改目錄...)', FolderDeleting : ' (刪除目錄...)', // Files FileRename : '請輸入新檔案名稱: ', FileRenameExt : '確定變更這個檔案的副檔名嗎? 變更後 , 此檔案可能會無法使用 !', FileRenaming : '修改檔案名稱...', FileDelete : '確定要刪除這個檔案 "%1"?', FilesLoading : 'Loading...', // MISSING FilesEmpty : 'Empty folder', // MISSING FilesMoved : 'File %1 moved into %2:%3', // MISSING FilesCopied : 'File %1 copied into %2:%3', // MISSING // Basket BasketFolder : 'Basket', // MISSING BasketClear : 'Clear Basket', // MISSING BasketRemove : 'Remove from basket', // MISSING BasketOpenFolder : 'Open parent folder', // MISSING BasketTruncateConfirm : 'Do you really want to remove all files from the basket?', // MISSING BasketRemoveConfirm : 'Do you really want to remove the file "%1" from the basket?', // MISSING BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copy Files from Basket', // MISSING BasketMoveFilesHere : 'Move Files from Basket', // MISSING BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'The following files were moved: %s', // MISSING BasketPasteCopySuccess : 'The following files were copied: %s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : '上傳檔案', UploadTip : '上傳一個新檔案', Refresh : '重新整理', Settings : '偏好設定', Help : '說明', HelpTip : '說明', // Context Menus Select : '選擇', SelectThumbnail : 'Select Thumbnail', // MISSING View : '瀏覽', Download : '下載', NewSubFolder : '建立新子目錄', Rename : '重新命名', Delete : '刪除', CopyDragDrop : 'Copy file here', // MISSING MoveDragDrop : 'Move file here', // MISSING // Dialogs RenameDlgTitle : 'Rename', // MISSING NewNameDlgTitle : 'New name', // MISSING FileExistsDlgTitle : 'File already exists', // MISSING SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Overwrite', // MISSING FileAutorename : 'Auto-rename', // MISSING // Generic OkBtn : '確定', CancelBtn : '取消', CloseBtn : '關閉', // Upload Panel UploadTitle : '上傳新檔案', UploadSelectLbl : '請選擇要上傳的檔案', UploadProgressLbl : '(檔案上傳中 , 請稍候...)', UploadBtn : '將檔案上傳到伺服器', UploadBtnCancel : 'Cancel', // MISSING UploadNoFileMsg : '請從你的電腦選擇一個檔案', UploadNoFolder : 'Please select folder before uploading.', // MISSING UploadNoPerms : 'File upload not allowed.', // MISSING UploadUnknError : 'Error sending the file.', // MISSING UploadExtIncorrect : 'File extension not allowed in this folder.', // MISSING // Settings Panel SetTitle : '設定', SetView : '瀏覽方式:', SetViewThumb : '縮圖預覽', SetViewList : '清單列表', SetDisplay : '顯示欄位:', SetDisplayName : '檔案名稱', SetDisplayDate : '檔案日期', SetDisplaySize : '檔案大小', SetSort : '排序方式:', SetSortName : '依 檔案名稱', SetSortDate : '依 檔案日期', SetSortSize : '依 檔案大小', // Status Bar FilesCountEmpty : '<此目錄沒有任何檔案>', FilesCountOne : '1 個檔案', FilesCountMany : '%1 個檔案', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : '無法連接到伺服器 ! (錯誤代碼 %1)', Errors : { 10 : '不合法的指令.', 11 : '連接過程中 , 未指定資源形態 !', 12 : '連接過程中出現不合法的資源形態 !', 102 : '不合法的檔案或目錄名稱 !', 103 : '無法連接:可能是使用者權限設定錯誤 !', 104 : '無法連接:可能是伺服器檔案權限設定錯誤 !', 105 : '無法上傳:不合法的副檔名 !', 109 : '不合法的請求 !', 110 : '不明錯誤 !', 115 : '檔案或目錄名稱重複 !', 116 : '找不到目錄 ! 請先重新整理 , 然後再試一次 !', 117 : '找不到檔案 ! 請先重新整理 , 然後再試一次 !', 118 : 'Source and target paths are equal.', // MISSING 201 : '伺服器上已有相同的檔案名稱 ! 您上傳的檔案名稱將會自動更改為 "%1"', 202 : '不合法的檔案 !', 203 : '不合法的檔案 ! 檔案大小超過預設值 !', 204 : '您上傳的檔案已經損毀 !', 205 : '伺服器上沒有預設的暫存目錄 !', 206 : '檔案上傳程序因為安全因素已被系統自動取消 ! 可能是上傳的檔案內容包含 HTML 碼 !', 207 : '您上傳的檔案名稱將會自動更改為 "%1"', 300 : 'Moving file(s) failed.', // MISSING 301 : 'Copying file(s) failed.', // MISSING 500 : '因為安全因素 , 檔案瀏覽器已被停用 ! 請聯絡您的系統管理者並檢查 CKFinder 的設定檔 config.php !', 501 : '縮圖預覽功能已被停用 !' }, // Other Error Messages. ErrorMsg : { FileEmpty : '檔案名稱不能空白 !', FileExists : 'File %s already exists', // MISSING FolderEmpty : '目錄名稱不能空白 !', FileInvChar : '檔案名稱不能包含以下字元: \n\\ / : * ? " < > |', FolderInvChar : '目錄名稱不能包含以下字元: \n\\ / : * ? " < > |', PopupBlockView : '無法在新視窗開啟檔案 ! 請檢查瀏覽器的設定並且針對這個網站 關閉 <封鎖彈跳視窗> 這個功能 !' }, // Imageresize plugin Imageresize : { dialogTitle : 'Resize %s', // MISSING sizeTooBig : 'Cannot set image height or width to a value bigger than the original size (%size).', // MISSING resizeSuccess : 'Image resized successfully.', // MISSING thumbnailNew : 'Create new thumbnail', // MISSING thumbnailSmall : 'Small (%s)', // MISSING thumbnailMedium : 'Medium (%s)', // MISSING thumbnailLarge : 'Large (%s)', // MISSING newSize : 'Set new size', // MISSING width : 'Width', // MISSING height : 'Height', // MISSING invalidHeight : 'Invalid height.', // MISSING invalidWidth : 'Invalid width.', // MISSING invalidName : 'Invalid file name.', // MISSING newImage : 'Create new image', // MISSING noExtensionChange : 'The file extension cannot be changed.', // MISSING imageSmall : 'Source image is too small', // MISSING contextMenuName : 'Resize' // MISSING }, // Fileeditor plugin Fileeditor : { save : 'Save', // MISSING fileOpenError : 'Unable to open file.', // MISSING fileSaveSuccess : 'File saved successfully.', // MISSING contextMenuName : 'Edit', // MISSING loadingFile : 'Loading file, please wait...' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['el'] = { appTitle : 'CKFinder', // MISSING // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING ok : 'OK', // MISSING cancel : 'Cancel', // MISSING confirmationTitle : 'Confirmation', // MISSING messageTitle : 'Information', // MISSING inputTitle : 'Question', // MISSING undo : 'Undo', // MISSING redo : 'Redo', // MISSING skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', // MISSING HelpLang : 'en', LangCode : 'el', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'dd/mm/yyyy HH:MM', DateAmPm : ['ΜΜ', 'ΠΜ'], // Folders FoldersTitle : 'Φάκελοι', FolderLoading : 'Φόρτωση...', FolderNew : 'Παρακαλούμε πληκτρολογήστε την ονομασία του νέου φακέλου: ', FolderRename : 'Παρακαλούμε πληκτρολογήστε την νέα ονομασία του φακέλου: ', FolderDelete : 'Είστε σίγουροι ότι θέλετε να διαγράψετε το φάκελο "%1";', FolderRenaming : ' (Μετονομασία...)', FolderDeleting : ' (Διαγραφή...)', // Files FileRename : 'Παρακαλούμε πληκτρολογήστε την νέα ονομασία του αρχείου: ', FileRenameExt : 'Είστε σίγουροι ότι θέλετε να αλλάξετε την επέκταση του αρχείου; Μετά από αυτή την ενέργεια το αρχείο μπορεί να μην μπορεί να χρησιμοποιηθεί', FileRenaming : 'Μετονομασία...', FileDelete : 'Είστε σίγουροι ότι θέλετε να διαγράψετε το αρχείο "%1"?', FilesLoading : 'Loading...', // MISSING FilesEmpty : 'Empty folder', // MISSING FilesMoved : 'File %1 moved into %2:%3', // MISSING FilesCopied : 'File %1 copied into %2:%3', // MISSING // Basket BasketFolder : 'Basket', // MISSING BasketClear : 'Clear Basket', // MISSING BasketRemove : 'Remove from basket', // MISSING BasketOpenFolder : 'Open parent folder', // MISSING BasketTruncateConfirm : 'Do you really want to remove all files from the basket?', // MISSING BasketRemoveConfirm : 'Do you really want to remove the file "%1" from the basket?', // MISSING BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copy Files from Basket', // MISSING BasketMoveFilesHere : 'Move Files from Basket', // MISSING BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'The following files were moved: %s', // MISSING BasketPasteCopySuccess : 'The following files were copied: %s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Μεταφόρτωση', UploadTip : 'Μεταφόρτωση Νέου Αρχείου', Refresh : 'Ανανέωση', Settings : 'Ρυθμίσεις', Help : 'Βοήθεια', HelpTip : 'Βοήθεια', // Context Menus Select : 'Επιλογή', SelectThumbnail : 'Επιλογή Μικρογραφίας', View : 'Προβολή', Download : 'Λήψη Αρχείου', NewSubFolder : 'Νέος Υποφάκελος', Rename : 'Μετονομασία', Delete : 'Διαγραφή', CopyDragDrop : 'Copy file here', // MISSING MoveDragDrop : 'Move file here', // MISSING // Dialogs RenameDlgTitle : 'Rename', // MISSING NewNameDlgTitle : 'New name', // MISSING FileExistsDlgTitle : 'File already exists', // MISSING SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Overwrite', // MISSING FileAutorename : 'Auto-rename', // MISSING // Generic OkBtn : 'OK', CancelBtn : 'Ακύρωση', CloseBtn : 'Κλείσιμο', // Upload Panel UploadTitle : 'Μεταφόρτωση Νέου Αρχείου', UploadSelectLbl : 'επιλέξτε το αρχείο που θέλετε να μεταφερθεί κάνοντας κλίκ στο κουμπί', UploadProgressLbl : '(Η μεταφόρτωση εκτελείται, παρακαλούμε περιμένετε...)', UploadBtn : 'Μεταφόρτωση Επιλεγμένου Αρχείου', UploadBtnCancel : 'Cancel', // MISSING UploadNoFileMsg : 'Παρακαλούμε επιλέξτε ένα αρχείο από τον υπολογιστή σας', UploadNoFolder : 'Please select folder before uploading.', // MISSING UploadNoPerms : 'File upload not allowed.', // MISSING UploadUnknError : 'Error sending the file.', // MISSING UploadExtIncorrect : 'File extension not allowed in this folder.', // MISSING // Settings Panel SetTitle : 'Ρυθμίσεις', SetView : 'Προβολή:', SetViewThumb : 'Μικρογραφίες', SetViewList : 'Λίστα', SetDisplay : 'Εμφάνιση:', SetDisplayName : 'Όνομα Αρχείου', SetDisplayDate : 'Ημερομηνία', SetDisplaySize : 'Μέγεθος Αρχείου', SetSort : 'Ταξινόμηση:', SetSortName : 'βάσει Όνοματος Αρχείου', SetSortDate : 'βάσει Ημερομήνιας', SetSortSize : 'βάσει Μεγέθους', // Status Bar FilesCountEmpty : '<Κενός Φάκελος>', FilesCountOne : '1 αρχείο', FilesCountMany : '%1 αρχεία', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'Η ενέργεια δεν ήταν δυνατόν να εκτελεστεί. (Σφάλμα %1)', Errors : { 10 : 'Λανθασμένη Εντολή.', 11 : 'Το resource type δεν ήταν δυνατόν να προσδιορίστεί.', 12 : 'Το resource type δεν είναι έγκυρο.', 102 : 'Το όνομα αρχείου ή φακέλου δεν είναι έγκυρο.', 103 : 'Δεν ήταν δυνατή η εκτέλεση της ενέργειας λόγω έλλειψης δικαιωμάτων ασφαλείας.', 104 : 'Δεν ήταν δυνατή η εκτέλεση της ενέργειας λόγω περιορισμών του συστήματος αρχείων.', 105 : 'Λανθασμένη Επέκταση Αρχείου.', 109 : 'Λανθασμένη Ενέργεια.', 110 : 'Άγνωστο Λάθος.', 115 : 'Το αρχείο ή φάκελος υπάρχει ήδη.', 116 : 'Ο φάκελος δεν βρέθηκε. Παρακαλούμε ανανεώστε τη σελίδα και προσπαθήστε ξανά.', 117 : 'Το αρχείο δεν βρέθηκε. Παρακαλούμε ανανεώστε τη σελίδα και προσπαθήστε ξανά.', 118 : 'Source and target paths are equal.', // MISSING 201 : 'Ένα αρχείο με την ίδια ονομασία υπάρχει ήδη. Το μεταφορτωμένο αρχείο μετονομάστηκε σε "%1"', 202 : 'Λανθασμένο Αρχείο', 203 : 'Λανθασμένο Αρχείο. Το μέγεθος του αρχείου είναι πολύ μεγάλο.', 204 : 'Το μεταφορτωμένο αρχείο είναι χαλασμένο.', 205 : 'Δεν υπάρχει προσωρινός φάκελος για να χρησιμοποιηθεί για τις μεταφορτώσεις των αρχείων.', 206 : 'Η μεταφόρτωση ακυρώθηκε για λόγους ασφαλείας. Το αρχείο περιέχει δεδομένα μορφής HTML.', 207 : 'Το μεταφορτωμένο αρχείο μετονομάστηκε σε "%1"', 300 : 'Moving file(s) failed.', // MISSING 301 : 'Copying file(s) failed.', // MISSING 500 : 'Ο πλοηγός αρχείων έχει απενεργοποιηθεί για λόγους ασφαλείας. Παρακαλούμε επικοινωνήστε με τον διαχειριστή της ιστοσελίδας και ελέγξτε το αρχείο ρυθμίσεων του πλοηγού (CKFinder).', 501 : 'Η υποστήριξη των μικρογραφιών έχει απενεργοποιηθεί.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Η ονομασία του αρχείου δεν μπορεί να είναι κενή', FileExists : 'File %s already exists', // MISSING FolderEmpty : 'Η ονομασία του φακέλου δεν μπορεί να είναι κενή', FileInvChar : 'Η ονομασία του αρχείου δεν μπορεί να περιέχει τους ακόλουθους χαρακτήρες: \n\\ / : * ? " < > |', FolderInvChar : 'Η ονομασία του φακέλου δεν μπορεί να περιέχει τους ακόλουθους χαρακτήρες: \n\\ / : * ? " < > |', PopupBlockView : 'Δεν ήταν εφικτό να ανοίξει το αρχείο σε νέο παράθυρο. Παρακαλώ, ελέγξτε τις ρυθμίσεις τους πλοηγού σας και απενεργοποιήστε όλους τους popup blockers για αυτή την ιστοσελίδα.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Resize %s', // MISSING sizeTooBig : 'Cannot set image height or width to a value bigger than the original size (%size).', // MISSING resizeSuccess : 'Image resized successfully.', // MISSING thumbnailNew : 'Create new thumbnail', // MISSING thumbnailSmall : 'Small (%s)', // MISSING thumbnailMedium : 'Medium (%s)', // MISSING thumbnailLarge : 'Large (%s)', // MISSING newSize : 'Set new size', // MISSING width : 'Width', // MISSING height : 'Height', // MISSING invalidHeight : 'Invalid height.', // MISSING invalidWidth : 'Invalid width.', // MISSING invalidName : 'Invalid file name.', // MISSING newImage : 'Create new image', // MISSING noExtensionChange : 'The file extension cannot be changed.', // MISSING imageSmall : 'Source image is too small', // MISSING contextMenuName : 'Resize' // MISSING }, // Fileeditor plugin Fileeditor : { save : 'Save', // MISSING fileOpenError : 'Unable to open file.', // MISSING fileSaveSuccess : 'File saved successfully.', // MISSING contextMenuName : 'Edit', // MISSING loadingFile : 'Loading file, please wait...' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Spanish * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['es'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, no disponible</span>', confirmCancel : 'Algunas opciones se han cambiado\r\n¿Está seguro de querer cerrar el diálogo?', ok : 'Aceptar', cancel : 'Cancelar', confirmationTitle : 'Confirmación', messageTitle : 'Información', inputTitle : 'Pregunta', undo : 'Deshacer', redo : 'Rehacer', skip : 'Omitir', skipAll : 'Omitir todos', makeDecision : '¿Qué acción debe realizarse?', rememberDecision: 'Recordar mi decisión' }, dir : 'ltr', HelpLang : 'es', LangCode : 'es', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'dd/mm/yyyy H:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Carpetas', FolderLoading : 'Cargando...', FolderNew : 'Por favor, escriba el nombre para la nueva carpeta: ', FolderRename : 'Por favor, escriba el nuevo nombre para la carpeta: ', FolderDelete : '¿Está seguro de que quiere borrar la carpeta "%1"?', FolderRenaming : ' (Renombrando...)', FolderDeleting : ' (Borrando...)', // Files FileRename : 'Por favor, escriba el nuevo nombre del fichero: ', FileRenameExt : '¿Está seguro de querer cambiar la extensión del fichero? El fichero puede dejar de ser usable', FileRenaming : 'Renombrando...', FileDelete : '¿Está seguro de que quiere borrar el fichero "%1"?', FilesLoading : 'Cargando...', FilesEmpty : 'Carpeta vacía', FilesMoved : 'Fichero %1 movido a %2:%3', FilesCopied : 'Fichero %1 copiado a %2:%3', // Basket BasketFolder : 'Cesta', BasketClear : 'Vaciar cesta', BasketRemove : 'Quitar de la cesta', BasketOpenFolder : 'Abrir carpeta padre', BasketTruncateConfirm : '¿Está seguro de querer quitar todos los ficheros de la cesta?', BasketRemoveConfirm : '¿Está seguro de querer quitar el fichero "%1" de la cesta?', BasketEmpty : 'No hay ficheros en la cesta, arrastra y suelta algunos.', BasketCopyFilesHere : 'Copiar ficheros de la cesta', BasketMoveFilesHere : 'Mover ficheros de la cesta', BasketPasteErrorOther : 'Fichero %s error: %e', BasketPasteMoveSuccess : 'Los siguientes ficheros han sido movidos: %s', BasketPasteCopySuccess : 'Los siguientes ficheros han sido copiados: %s', // Toolbar Buttons (some used elsewhere) Upload : 'Añadir', UploadTip : 'Añadir nuevo fichero', Refresh : 'Actualizar', Settings : 'Configuración', Help : 'Ayuda', HelpTip : 'Ayuda', // Context Menus Select : 'Seleccionar', SelectThumbnail : 'Seleccionar el icono', View : 'Ver', Download : 'Descargar', NewSubFolder : 'Nueva Subcarpeta', Rename : 'Renombrar', Delete : 'Borrar', CopyDragDrop : 'Copiar fichero aquí', MoveDragDrop : 'Mover fichero aquí', // Dialogs RenameDlgTitle : 'Renombrar', NewNameDlgTitle : 'Nuevo nombre', FileExistsDlgTitle : 'Fichero existente', SysErrorDlgTitle : 'Error de sistema', FileOverwrite : 'Sobreescribir', FileAutorename : 'Auto-renombrar', // Generic OkBtn : 'Aceptar', CancelBtn : 'Cancelar', CloseBtn : 'Cerrar', // Upload Panel UploadTitle : 'Añadir nuevo fichero', UploadSelectLbl : 'Elija el fichero a subir', UploadProgressLbl : '(Subida en progreso, por favor espere...)', UploadBtn : 'Subir el fichero elegido', UploadBtnCancel : 'Cancelar', UploadNoFileMsg : 'Por favor, elija un fichero de su ordenador', UploadNoFolder : 'Por favor, escoja la carpeta antes de iniciar la subida.', UploadNoPerms : 'No puede subir ficheros.', UploadUnknError : 'Error enviando el fichero.', UploadExtIncorrect : 'La extensión del fichero no está permitida en esta carpeta.', // Settings Panel SetTitle : 'Configuración', SetView : 'Vista:', SetViewThumb : 'Iconos', SetViewList : 'Lista', SetDisplay : 'Mostrar:', SetDisplayName : 'Nombre de fichero', SetDisplayDate : 'Fecha', SetDisplaySize : 'Peso del fichero', SetSort : 'Ordenar:', SetSortName : 'por Nombre', SetSortDate : 'por Fecha', SetSortSize : 'por Peso', // Status Bar FilesCountEmpty : '<Carpeta vacía>', FilesCountOne : '1 fichero', FilesCountMany : '%1 ficheros', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'No ha sido posible completar la solicitud. (Error %1)', Errors : { 10 : 'Comando incorrecto.', 11 : 'El tipo de recurso no ha sido especificado en la solicitud.', 12 : 'El tipo de recurso solicitado no es válido.', 102 : 'Nombre de fichero o carpeta no válido.', 103 : 'No se ha podido completar la solicitud debido a las restricciones de autorización.', 104 : 'No ha sido posible completar la solicitud debido a restricciones en el sistema de ficheros.', 105 : 'La extensión del archivo no es válida.', 109 : 'Petición inválida.', 110 : 'Error desconocido.', 115 : 'Ya existe un fichero o carpeta con ese nombre.', 116 : 'No se ha encontrado la carpeta. Por favor, actualice y pruebe de nuevo.', 117 : 'No se ha encontrado el fichero. Por favor, actualice la lista de ficheros y pruebe de nuevo.', 118 : 'Las rutas origen y destino son iguales.', 201 : 'Ya existía un fichero con ese nombre. El fichero subido ha sido renombrado como "%1"', 202 : 'Fichero inválido', 203 : 'Fichero inválido. El peso es demasiado grande.', 204 : 'El fichero subido está corrupto.', 205 : 'La carpeta temporal no está disponible en el servidor para las subidas.', 206 : 'La subida se ha cancelado por razones de seguridad. El fichero contenía código HTML.', 207 : 'El fichero subido ha sido renombrado como "%1"', 300 : 'Ha fallado el mover el(los) fichero(s).', 301 : 'Ha fallado el copiar el(los) fichero(s).', 500 : 'El navegador de archivos está deshabilitado por razones de seguridad. Por favor, contacte con el administrador de su sistema y compruebe el fichero de configuración de CKFinder.', 501 : 'El soporte para iconos está deshabilitado.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'El nombre del fichero no puede estar vacío', FileExists : 'El fichero %s ya existe', FolderEmpty : 'El nombre de la carpeta no puede estar vacío', FileInvChar : 'El nombre del fichero no puede contener ninguno de los caracteres siguientes: \n\\ / : * ? " < > |', FolderInvChar : 'El nombre de la carpeta no puede contener ninguno de los caracteres siguientes: \n\\ / : * ? " < > |', PopupBlockView : 'No ha sido posible abrir el fichero en una nueva ventana. Por favor, configure su navegador y desactive todos los bloqueadores de ventanas para esta página.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Redimensionar %s', sizeTooBig : 'No se puede poner la altura o anchura de la imagen mayor que las dimensiones originales (%size).', resizeSuccess : 'Imagen redimensionada correctamente.', thumbnailNew : 'Crear nueva minuatura', thumbnailSmall : 'Pequeña (%s)', thumbnailMedium : 'Mediana (%s)', thumbnailLarge : 'Grande (%s)', newSize : 'Establecer nuevo tamaño', width : 'Ancho', height : 'Alto', invalidHeight : 'Altura inválida.', invalidWidth : 'Anchura inválida.', invalidName : 'Nombre no válido.', newImage : 'Crear nueva imagen', noExtensionChange : 'La extensión no se puede cambiar.', imageSmall : 'La imagen original es demasiado pequeña', contextMenuName : 'Redimensionar' }, // Fileeditor plugin Fileeditor : { save : 'Guardar', fileOpenError : 'No se puede abrir el fichero.', fileSaveSuccess : 'Fichero guardado correctamente.', contextMenuName : 'Editar', loadingFile : 'Cargando fichero, por favor espere...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Finnish * language. Translated in Finnish 2010-12-15 by Petteri Salmela. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['fi'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, ei käytettävissä</span>', confirmCancel : 'Valintoja on muutettu. Suljetaanko ikkuna kuitenkin?', ok : 'OK', cancel : 'Peru', confirmationTitle : 'Varmistus', messageTitle : 'Ilmoitus', inputTitle : 'Kysymys', undo : 'Peru', redo : 'Tee uudelleen', skip : 'Ohita', skipAll : 'Ohita kaikki', makeDecision : 'Mikä toiminto suoritetaan?', rememberDecision: 'Muista valintani' }, dir : 'ltr', HelpLang : 'fi', LangCode : 'fi', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'yyyy-mm-dd HH:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Kansiot', FolderLoading : 'Lataan...', FolderNew : 'Kirjoita uuden kansion nimi: ', FolderRename : 'Kirjoita uusi nimi kansiolle ', FolderDelete : 'Haluatko varmasti poistaa kansion "%1"?', FolderRenaming : ' (Uudelleennimeää...)', FolderDeleting : ' (Poistaa...)', // Files FileRename : 'Kirjoita uusi tiedostonimi: ', FileRenameExt : 'Haluatko varmasti muuttaa tiedostotarkennetta? Tiedosto voi muuttua käyttökelvottomaksi.', FileRenaming : 'Uudelleennimeää...', FileDelete : 'Haluatko varmasti poistaa tiedoston "%1"?', FilesLoading : 'Lataa...', FilesEmpty : 'Tyhjä kansio.', FilesMoved : 'Tiedosto %1 siirretty nimelle %2:%3', FilesCopied : 'Tiedosto %1 kopioitu nimelle %2:%3', // Basket BasketFolder : 'Kori', BasketClear : 'Tyhjennä kori', BasketRemove : 'Poista korista', BasketOpenFolder : 'Avaa ylemmän tason kansio', BasketTruncateConfirm : 'Haluatko todella poistaa kaikki tiedostot korista?', BasketRemoveConfirm : 'Haluatko todella poistaa tiedoston "%1" korista?', BasketEmpty : 'Korissa ei ole tiedostoja. Lisää raahaamalla.', BasketCopyFilesHere : 'Kopioi tiedostot korista.', BasketMoveFilesHere : 'Siirrä tiedostot korista.', BasketPasteErrorOther : 'Tiedoston %s virhe: %e', BasketPasteMoveSuccess : 'Seuraavat tiedostot siirrettiin: %s', BasketPasteCopySuccess : 'Seuraavat tiedostot kopioitiin: %s', // Toolbar Buttons (some used elsewhere) Upload : 'Lataa palvelimelle', UploadTip : 'Lataa uusi tiedosto palvelimelle', Refresh : 'Päivitä', Settings : 'Asetukset', Help : 'Apua', HelpTip : 'Apua', // Context Menus Select : 'Valitse', SelectThumbnail : 'Valitse esikatselukuva', View : 'Näytä', Download : 'Lataa palvelimelta', NewSubFolder : 'Uusi alikansio', Rename : 'Uudelleennimeä ', Delete : 'Poista', CopyDragDrop : 'Kopioi tiedosto tähän', MoveDragDrop : 'Siirrä tiedosto tähän', // Dialogs RenameDlgTitle : 'Nimeä uudelleen', NewNameDlgTitle : 'Uusi nimi', FileExistsDlgTitle : 'Tiedostonimi on jo olemassa!', SysErrorDlgTitle : 'Järjestelmävirhe', FileOverwrite : 'Ylikirjoita', FileAutorename : 'Nimeä uudelleen automaattisesti', // Generic OkBtn : 'OK', CancelBtn : 'Peru', CloseBtn : 'Sulje', // Upload Panel UploadTitle : 'Lataa uusi tiedosto palvelimelle', UploadSelectLbl : 'Valitse ladattava tiedosto', UploadProgressLbl : '(Lataaminen palvelimelle käynnissä...)', UploadBtn : 'Lataa valittu tiedosto palvelimelle', UploadBtnCancel : 'Peru', UploadNoFileMsg : 'Valitse tiedosto tietokoneeltasi.', UploadNoFolder : 'Valitse kansio ennen palvelimelle lataamista.', UploadNoPerms : 'Tiedoston lataaminen palvelimelle evätty.', UploadUnknError : 'Tiedoston siirrossa tapahtui virhe.', UploadExtIncorrect : 'Tiedostotarkenne ei ole sallittu valitussa kansiossa.', // Settings Panel SetTitle : 'Asetukset', SetView : 'Näkymä:', SetViewThumb : 'Esikatselukuvat', SetViewList : 'Luettelo', SetDisplay : 'Näytä:', SetDisplayName : 'Tiedostonimi', SetDisplayDate : 'Päivämäärä', SetDisplaySize : 'Tiedostokoko', SetSort : 'Lajittele:', SetSortName : 'aakkosjärjestykseen', SetSortDate : 'päivämäärän mukaan', SetSortSize : 'tiedostokoon mukaan', // Status Bar FilesCountEmpty : '<Tyhjä kansio>', FilesCountOne : '1 tiedosto', FilesCountMany : '%1 tiedostoa', // Size and Speed Kb : '%1 kt', KbPerSecond : '%1 kt/s', // Connector Error Messages. ErrorUnknown : 'Pyyntöä ei voitu suorittaa. (Virhe %1)', Errors : { 10 : 'Virheellinen komento.', 11 : 'Pyynnön resurssityyppi on määrittelemättä.', 12 : 'Pyynnön resurssityyppi on virheellinen.', 102 : 'Virheellinen tiedosto- tai kansionimi.', 103 : 'Oikeutesi eivät riitä pyynnön suorittamiseen.', 104 : 'Tiedosto-oikeudet eivät riitä pyynnön suorittamiseen.', 105 : 'Virheellinen tiedostotarkenne.', 109 : 'Virheellinen pyyntö.', 110 : 'Tuntematon virhe.', 115 : 'Samanniminen tiedosto tai kansio on jo olemassa.', 116 : 'Kansiota ei löydy. Yritä uudelleen kansiopäivityksen jälkeen.', 117 : 'Tiedostoa ei löydy. Yritä uudelleen kansiopäivityksen jälkeen.', 118 : 'Lähde- ja kohdekansio on sama!', 201 : 'Samanniminen tiedosto on jo olemassa. Palvelimelle ladattu tiedosto on nimetty: "%1"', 202 : 'Virheellinen tiedosto', 203 : 'Virheellinen tiedosto. Tiedostokoko on liian suuri.', 204 : 'Palvelimelle ladattu tiedosto on vioittunut.', 205 : 'Väliaikaishakemistoa ei ole määritetty palvelimelle lataamista varten.', 206 : 'Palvelimelle lataaminen on peruttu turvallisuussyistä. Tiedosto sisältää HTML-tyylistä dataa.', 207 : 'Palvelimelle ladattu tiedosto on nimetty: "%1"', 300 : 'Tiedostosiirto epäonnistui.', 301 : 'Tiedostokopiointi epäonnistui.', 500 : 'Tiedostoselain on kytketty käytöstä turvallisuussyistä. Pyydä pääkäyttäjää tarkastamaan CKFinderin asetustiedosto.', 501 : 'Esikatselukuvien tuki on kytketty toiminnasta.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Tiedosto on nimettävä!', FileExists : 'Tiedosto %s on jo olemassa', FolderEmpty : 'Kansio on nimettävä!', FileInvChar : 'Tiedostonimi ei voi sisältää seuraavia merkkejä: \n\\ / : * ? " < > |', FolderInvChar : 'Kansionimi ei voi sisältää seuraavia merkkejä: \n\\ / : * ? " < > |', PopupBlockView : 'Tiedostoa ei voitu avata uuteen ikkunaan. Salli selaimesi asetuksissa ponnahdusikkunat tälle sivulle.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Muuta kokoa %s', sizeTooBig : 'Kuvan mittoja ei voi asettaa alkuperäistä suuremmiksi(%size).', resizeSuccess : 'Kuvan koon muuttaminen onnistui.', thumbnailNew : 'Luo uusi esikatselukuva.', thumbnailSmall : 'Pieni (%s)', thumbnailMedium : 'Keskikokoinen (%s)', thumbnailLarge : 'Suuri (%s)', newSize : 'Aseta uusi koko', width : 'Leveys', height : 'Korkeus', invalidHeight : 'Viallinen korkeus.', invalidWidth : 'Viallinen leveys.', invalidName : 'Viallinen tiedostonimi.', newImage : 'Luo uusi kuva', noExtensionChange : 'Tiedostomäärettä ei voi vaihtaa.', imageSmall : 'Lähdekuva on liian pieni', contextMenuName : 'Muuta kokoa' }, // Fileeditor plugin Fileeditor : { save : 'Tallenna', fileOpenError : 'Tiedostoa ei voi avata.', fileSaveSuccess : 'Tiedoston tallennus onnistui.', contextMenuName : 'Muokkaa', loadingFile : 'Tiedostoa ladataan ...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['no'] = { appTitle : 'CKFinder', // MISSING // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING ok : 'OK', // MISSING cancel : 'Cancel', // MISSING confirmationTitle : 'Confirmation', // MISSING messageTitle : 'Information', // MISSING inputTitle : 'Question', // MISSING undo : 'Undo', // MISSING redo : 'Redo', // MISSING skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', // MISSING HelpLang : 'en', LangCode : 'no', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'dd/mm/yyyy HH:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Mapper', FolderLoading : 'Laster...', FolderNew : 'Skriv inn det nye mappenavnet: ', FolderRename : 'Skriv inn det nye mappenavnet: ', FolderDelete : 'Er du sikker på at du vil slette mappen "%1"?', FolderRenaming : ' (Endrer mappenavn...)', FolderDeleting : ' (Sletter...)', // Files FileRename : 'Skriv inn det nye filnavnet: ', FileRenameExt : 'Er du sikker på at du vil endre filtypen? Filen kan bli ubrukelig', FileRenaming : 'Endrer filnavn...', FileDelete : 'Er du sikker på at du vil slette denne filen "%1"?', FilesLoading : 'Loading...', // MISSING FilesEmpty : 'Empty folder', // MISSING FilesMoved : 'File %1 moved into %2:%3', // MISSING FilesCopied : 'File %1 copied into %2:%3', // MISSING // Basket BasketFolder : 'Basket', // MISSING BasketClear : 'Clear Basket', // MISSING BasketRemove : 'Remove from basket', // MISSING BasketOpenFolder : 'Open parent folder', // MISSING BasketTruncateConfirm : 'Do you really want to remove all files from the basket?', // MISSING BasketRemoveConfirm : 'Do you really want to remove the file "%1" from the basket?', // MISSING BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copy Files from Basket', // MISSING BasketMoveFilesHere : 'Move Files from Basket', // MISSING BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'The following files were moved: %s', // MISSING BasketPasteCopySuccess : 'The following files were copied: %s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Last opp', UploadTip : 'Last opp en ny fil', Refresh : 'Oppdater', Settings : 'Innstillinger', Help : 'Hjelp', HelpTip : 'Hjelp finnes kun på engelsk', // Context Menus Select : 'Velg', SelectThumbnail : 'Velg Miniatyr', View : 'Vis fullversjon', Download : 'Last ned', NewSubFolder : 'Ny Undermappe', Rename : 'Endre navn', Delete : 'Slett', CopyDragDrop : 'Copy file here', // MISSING MoveDragDrop : 'Move file here', // MISSING // Dialogs RenameDlgTitle : 'Rename', // MISSING NewNameDlgTitle : 'New name', // MISSING FileExistsDlgTitle : 'File already exists', // MISSING SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Overwrite', // MISSING FileAutorename : 'Auto-rename', // MISSING // Generic OkBtn : 'OK', CancelBtn : 'Avbryt', CloseBtn : 'Lukk', // Upload Panel UploadTitle : 'Last opp ny fil', UploadSelectLbl : 'Velg filen du vil laste opp', UploadProgressLbl : '(Laster opp filen, vennligst vent...)', UploadBtn : 'Last opp valgt fil', UploadBtnCancel : 'Cancel', // MISSING UploadNoFileMsg : 'Du må velge en fil fra din datamaskin', UploadNoFolder : 'Please select folder before uploading.', // MISSING UploadNoPerms : 'File upload not allowed.', // MISSING UploadUnknError : 'Error sending the file.', // MISSING UploadExtIncorrect : 'File extension not allowed in this folder.', // MISSING // Settings Panel SetTitle : 'Innstillinger', SetView : 'Filvisning:', SetViewThumb : 'Miniatyrbilder', SetViewList : 'Liste', SetDisplay : 'Vis:', SetDisplayName : 'Filnavn', SetDisplayDate : 'Dato', SetDisplaySize : 'Filstørrelse', SetSort : 'Sorter etter:', SetSortName : 'Filnavn', SetSortDate : 'Dato', SetSortSize : 'Størrelse', // Status Bar FilesCountEmpty : '<Tom Mappe>', FilesCountOne : '1 fil', FilesCountMany : '%1 filer', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'Det var ikke mulig å utføre forespørselen. (Feil %1)', Errors : { 10 : 'Ugyldig kommando.', 11 : 'Ressurstypen ble ikke spesifisert i forepørselen.', 12 : 'Ugyldig ressurstype.', 102 : 'Ugyldig fil- eller mappenavn.', 103 : 'Kunne ikke utføre forespørselen pga manglende autorisasjon.', 104 : 'Kunne ikke utføre forespørselen pga manglende tilgang til filsystemet.', 105 : 'Ugyldig filtype.', 109 : 'Ugyldig forespørsel.', 110 : 'Ukjent feil.', 115 : 'Det finnes allerede en fil eller mappe med dette navnet.', 116 : 'Kunne ikke finne mappen. Oppdater vinduet og prøv igjen.', 117 : 'Kunne ikke finne filen. Oppdater vinduet og prøv igjen.', 118 : 'Source and target paths are equal.', // MISSING 201 : 'Det fantes allerede en fil med dette navnet. Den opplastede filens navn har blitt endret til "%1"', 202 : 'Ugyldig fil', 203 : 'Ugyldig fil. Filen er for stor.', 204 : 'Den opplastede filen er korrupt.', 205 : 'Det finnes ingen midlertidig mappe for filopplastinger.', 206 : 'Opplastingen ble avbrutt av sikkerhetshensyn. Filen inneholder HTML-aktig data.', 207 : 'Den opplastede filens navn har blitt endret til "%1"', 300 : 'Moving file(s) failed.', // MISSING 301 : 'Copying file(s) failed.', // MISSING 500 : 'Filvelgeren ikke tilgjengelig av sikkerhetshensyn. Kontakt systemansvarlig og be han sjekke CKFinder\'s konfigurasjonsfil.', 501 : 'Funksjon for minityrbilder er skrudd av.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Filnavnet kan ikke være tomt', FileExists : 'File %s already exists', // MISSING FolderEmpty : 'Mappenavnet kan ikke være tomt', FileInvChar : 'Filnavnet kan ikke inneholde følgende tegn: \n\\ / : * ? " < > |', FolderInvChar : 'Mappenavnet kan ikke inneholde følgende tegn: \n\\ / : * ? " < > |', PopupBlockView : 'Du må skru av popup-blockeren for å se bildet i nytt vindu.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Resize %s', // MISSING sizeTooBig : 'Cannot set image height or width to a value bigger than the original size (%size).', // MISSING resizeSuccess : 'Image resized successfully.', // MISSING thumbnailNew : 'Create new thumbnail', // MISSING thumbnailSmall : 'Small (%s)', // MISSING thumbnailMedium : 'Medium (%s)', // MISSING thumbnailLarge : 'Large (%s)', // MISSING newSize : 'Set new size', // MISSING width : 'Width', // MISSING height : 'Height', // MISSING invalidHeight : 'Invalid height.', // MISSING invalidWidth : 'Invalid width.', // MISSING invalidName : 'Invalid file name.', // MISSING newImage : 'Create new image', // MISSING noExtensionChange : 'The file extension cannot be changed.', // MISSING imageSmall : 'Source image is too small', // MISSING contextMenuName : 'Resize' // MISSING }, // Fileeditor plugin Fileeditor : { save : 'Save', // MISSING fileOpenError : 'Unable to open file.', // MISSING fileSaveSuccess : 'File saved successfully.', // MISSING contextMenuName : 'Edit', // MISSING loadingFile : 'Loading file, please wait...' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the English * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['en'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', ok : 'OK', cancel : 'Cancel', confirmationTitle : 'Confirmation', messageTitle : 'Information', inputTitle : 'Question', undo : 'Undo', redo : 'Redo', skip : 'Skip', skipAll : 'Skip all', makeDecision : 'What action should be taken?', rememberDecision: 'Remember my decision' }, dir : 'ltr', HelpLang : 'en', LangCode : 'en', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'm/d/yyyy h:MM aa', DateAmPm : ['AM','PM'], // Folders FoldersTitle : 'Folders', FolderLoading : 'Loading...', FolderNew : 'Please type the new folder name: ', FolderRename : 'Please type the new folder name: ', FolderDelete : 'Are you sure you want to delete the "%1" folder?', FolderRenaming : ' (Renaming...)', FolderDeleting : ' (Deleting...)', // Files FileRename : 'Please type the new file name: ', FileRenameExt : 'Are you sure you want to change the file name extension? The file may become unusable', FileRenaming : 'Renaming...', FileDelete : 'Are you sure you want to delete the file "%1"?', FilesLoading : 'Loading...', FilesEmpty : 'Empty folder', FilesMoved : 'File %1 moved into %2:%3', FilesCopied : 'File %1 copied into %2:%3', // Basket BasketFolder : 'Basket', BasketClear : 'Clear Basket', BasketRemove : 'Remove from basket', BasketOpenFolder : 'Open parent folder', BasketT
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Latvian * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['lv'] = { appTitle : 'CKFinder', // MISSING // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING ok : 'OK', // MISSING cancel : 'Cancel', // MISSING confirmationTitle : 'Confirmation', // MISSING messageTitle : 'Information', // MISSING inputTitle : 'Question', // MISSING undo : 'Undo', // MISSING redo : 'Redo', // MISSING skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', // MISSING HelpLang : 'en', LangCode : 'lv', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'dd/mm/yyyy H:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Mapes', FolderLoading : 'Ielādē...', FolderNew : 'Lūdzu ierakstiet mapes nosaukumu: ', FolderRename : 'Lūdzu ierakstiet jauno mapes nosaukumu: ', FolderDelete : 'Vai tiešām vēlaties neatgriezeniski dzēst mapi "%1"?', FolderRenaming : ' (Pārsauc...)', FolderDeleting : ' (Dzēš...)', // Files FileRename : 'Lūdzu ierakstiet jauno faila nosaukumu: ', FileRenameExt : 'Vai tiešām vēlaties mainīt faila paplašinājumu? Fails var palikt nelietojams.', FileRenaming : 'Pārsauc...', FileDelete : 'Vai tiešām vēlaties neatgriezeniski dzēst failu "%1"?', FilesLoading : 'Loading...', // MISSING FilesEmpty : 'Empty folder', // MISSING FilesMoved : 'File %1 moved into %2:%3', // MISSING FilesCopied : 'File %1 copied into %2:%3', // MISSING // Basket BasketFolder : 'Basket', // MISSING BasketClear : 'Clear Basket', // MISSING BasketRemove : 'Remove from basket', // MISSING BasketOpenFolder : 'Open parent folder', // MISSING BasketTruncateConfirm : 'Do you really want to remove all files from the basket?', // MISSING BasketRemoveConfirm : 'Do you really want to remove the file "%1" from the basket?', // MISSING BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copy Files from Basket', // MISSING BasketMoveFilesHere : 'Move Files from Basket', // MISSING BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'The following files were moved: %s', // MISSING BasketPasteCopySuccess : 'The following files were copied: %s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Augšupielādēt', UploadTip : 'Augšupielādēt jaunu failu', Refresh : 'Pārlādēt', Settings : 'Uzstādījumi', Help : 'Palīdzība', HelpTip : 'Palīdzība', // Context Menus Select : 'Izvēlēties', SelectThumbnail : 'Izvēlēties sīkbildi', View : 'Skatīt', Download : 'Lejupielādēt', NewSubFolder : 'Jauna apakšmape', Rename : 'Pārsaukt', Delete : 'Dzēst', CopyDragDrop : 'Copy file here', // MISSING MoveDragDrop : 'Move file here', // MISSING // Dialogs RenameDlgTitle : 'Rename', // MISSING NewNameDlgTitle : 'New name', // MISSING FileExistsDlgTitle : 'File already exists', // MISSING SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Overwrite', // MISSING FileAutorename : 'Auto-rename', // MISSING // Generic OkBtn : 'Labi', CancelBtn : 'Atcelt', CloseBtn : 'Aizvērt', // Upload Panel UploadTitle : 'Jauna faila augšupielādēšana', UploadSelectLbl : 'Izvēlaties failu, ko augšupielādēt', UploadProgressLbl : '(Augšupielādē, lūdzu uzgaidiet...)', UploadBtn : 'Augšupielādēt izvēlēto failu', UploadBtnCancel : 'Cancel', // MISSING UploadNoFileMsg : 'Lūdzu izvēlaties failu no sava datora', UploadNoFolder : 'Please select folder before uploading.', // MISSING UploadNoPerms : 'File upload not allowed.', // MISSING UploadUnknError : 'Error sending the file.', // MISSING UploadExtIncorrect : 'File extension not allowed in this folder.', // MISSING // Settings Panel SetTitle : 'Uzstādījumi', SetView : 'Attēlot:', SetViewThumb : 'Sīkbildes', SetViewList : 'Failu Sarakstu', SetDisplay : 'Rādīt:', SetDisplayName : 'Faila Nosaukumu', SetDisplayDate : 'Datumu', SetDisplaySize : 'Faila Izmēru', SetSort : 'Kārtot:', SetSortName : 'pēc Faila Nosaukuma', SetSortDate : 'pēc Datuma', SetSortSize : 'pēc Izmēra', // Status Bar FilesCountEmpty : '<Tukša mape>', FilesCountOne : '1 fails', FilesCountMany : '%1 faili', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'Nebija iespējams pabeigt pieprasījumu. (Kļūda %1)', Errors : { 10 : 'Nederīga komanda.', 11 : 'Resursa veids netika norādīts pieprasījumā.', 12 : 'Pieprasītais resursa veids nav derīgs.', 102 : 'Nederīgs faila vai mapes nosaukums.', 103 : 'Nav iespējams pabeigt pieprasījumu, autorizācijas aizliegumu dēļ.', 104 : 'Nav iespējams pabeigt pieprasījumu, failu sistēmas atļauju ierobežojumu dēļ.', 105 : 'Neatļauts faila paplašinājums.', 109 : 'Nederīgs pieprasījums.', 110 : 'Nezināma kļūda.', 115 : 'Fails vai mape ar šādu nosaukumu jau pastāv.', 116 : 'Mape nav atrasta. Lūdzu pārlādējiet šo logu un mēģiniet vēlreiz.', 117 : 'Fails nav atrasts. Lūdzu pārlādējiet failu sarakstu un mēģiniet vēlreiz.', 118 : 'Source and target paths are equal.', // MISSING 201 : 'Fails ar šādu nosaukumu jau eksistē. Augšupielādētais fails tika pārsaukts par "%1"', 202 : 'Nederīgs fails', 203 : 'Nederīgs fails. Faila izmērs pārsniedz pieļaujamo.', 204 : 'Augšupielādētais fails ir bojāts.', 205 : 'Neviena pagaidu mape nav pieejama priekš augšupielādēšanas uz servera.', 206 : 'Augšupielāde atcelta drošības apsvērumu dēļ. Fails satur HTML veida datus.', 207 : 'Augšupielādētais fails tika pārsaukts par "%1"', 300 : 'Moving file(s) failed.', // MISSING 301 : 'Copying file(s) failed.', // MISSING 500 : 'Failu pārlūks ir atslēgts drošības apsvērumu dēļ. Lūdzu sazinieties ar šīs sistēmas tehnisko administratoru vai pārbaudiet CKFinder konfigurācijas failu.', 501 : 'Sīkbilžu atbalsts ir atslēgts.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Faila nosaukumā nevar būt tukšums', FileExists : 'File %s already exists', // MISSING FolderEmpty : 'Mapes nosaukumā nevar būt tukšums', FileInvChar : 'Faila nosaukums nedrīkst saturēt nevienu no sekojošajām zīmēm: \n\\ / : * ? " < > |', FolderInvChar : 'Mapes nosaukums nedrīkst saturēt nevienu no sekojošajām zīmēm: \n\\ / : * ? " < > |', PopupBlockView : 'Nav iespējams failu atvērt jaunā logā. Lūdzu veiciet izmaiņas uzstādījumos savai interneta pārlūkprogrammai un izslēdziet visus uznirstošo logu bloķētājus šai adresei.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Resize %s', // MISSING sizeTooBig : 'Cannot set image height or width to a value bigger than the original size (%size).', // MISSING resizeSuccess : 'Image resized successfully.', // MISSING thumbnailNew : 'Create new thumbnail', // MISSING thumbnailSmall : 'Small (%s)', // MISSING thumbnailMedium : 'Medium (%s)', // MISSING thumbnailLarge : 'Large (%s)', // MISSING newSize : 'Set new size', // MISSING width : 'Width', // MISSING height : 'Height', // MISSING invalidHeight : 'Invalid height.', // MISSING invalidWidth : 'Invalid width.', // MISSING invalidName : 'Invalid file name.', // MISSING newImage : 'Create new image', // MISSING noExtensionChange : 'The file extension cannot be changed.', // MISSING imageSmall : 'Source image is too small', // MISSING contextMenuName : 'Resize' // MISSING }, // Fileeditor plugin Fileeditor : { save : 'Save', // MISSING fileOpenError : 'Unable to open file.', // MISSING fileSaveSuccess : 'File saved successfully.', // MISSING contextMenuName : 'Edit', // MISSING loadingFile : 'Loading file, please wait...' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the English * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['he'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, לא נגיש</span>', confirmCancel : 'חקל ממאפיינים שונו. ברצונך לסגור חלון?', ok : 'אישור', cancel : 'ביטול', confirmationTitle : 'אישור', messageTitle : 'מידע', inputTitle : 'שאלה', undo : 'לבטל', redo : 'לעשות שוב', skip : 'דלג', skipAll : 'דלג הכל', makeDecision : 'איזו פעולה לבצע?', rememberDecision: 'זכור החלטתי' }, dir : 'rtl', HelpLang : 'en', LangCode : 'he', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'm/d/yyyy h:MM aa', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'תיקיות', FolderLoading : 'טוען...', FolderNew : 'הקלד שם חדש לתיקיה: ', FolderRename : 'הקלד שם חדש לתיקיה: ', FolderDelete : 'האם ברצונך למחוק תיקיה "%1" ?', FolderRenaming : ' (משנה שם...)', FolderDeleting : ' (מוחק...)', // Files FileRename : 'הקלש שם חדש לקובץ: ', FileRenameExt : 'האם ברוצונך לשנות טיפוס של הקובץ', FileRenaming : 'משנה שם...', FileDelete : 'האם ברצונך למחוק קובץ "%1"?', FilesLoading : 'טוען...', FilesEmpty : 'תיקיה ריקה', FilesMoved : 'קובץ %1 הוזז ל- %2:%3', FilesCopied : 'קובץ %1 הועתק ל- %2:%3', // Basket BasketFolder : 'סל', BasketClear : 'נקה סל', BasketRemove : 'הורד מסל', BasketOpenFolder : 'פתח תיקיית אב', BasketTruncateConfirm : 'האם ברוצונך למחוק את כל הקבצים מסל?', BasketRemoveConfirm : 'האם ברוצונך למחוק את קובץ "%1" מסל?', BasketEmpty : 'אין קבצים בסל, גרור ושחרר משהוא.', BasketCopyFilesHere : 'העתק קבצים מסל', BasketMoveFilesHere : 'הזז קבצים מסל', BasketPasteErrorOther : 'קובץ %s שגיאה: %e', BasketPasteMoveSuccess : 'קבצים הבאים הוזזו: %s', BasketPasteCopySuccess : 'קבצים הבאים הועתקו: %s', // Toolbar Buttons (some used elsewhere) Upload : 'העלאה', UploadTip : 'לעלות קובץ חדש', Refresh : 'רענון', Settings : 'הגדרות', Help : 'עזרה', HelpTip : 'עזרה', // Context Menus Select : 'בחר', SelectThumbnail : 'בחר תמונה קטנה', View : 'צפה', Download : 'הורד', NewSubFolder : 'תת-תיקיה חדשה', Rename : 'שנה שם', Delete : 'מחק', CopyDragDrop : 'העתק קבצים לכאן', MoveDragDrop : 'הזז קבצים לכאן', // Dialogs RenameDlgTitle : 'שנה שם', NewNameDlgTitle : 'שם חדש', FileExistsDlgTitle : 'קובץ כבר קיים', SysErrorDlgTitle : 'שגיעת מערכת', FileOverwrite : 'החלף', FileAutorename : 'אוטומטית לשנות שם', // Generic OkBtn : 'אישור', CancelBtn : 'ביטול', CloseBtn : 'סגור', // Upload Panel UploadTitle : 'העלאת קובץ חדש', UploadSelectLbl : 'בחר קובץ להעלאה', UploadProgressLbl : '(העלאה בתהליך, אנא המתן...)', UploadBtn : 'לעלות קובץ', UploadBtnCancel : 'ביטול', UploadNoFileMsg : 'נא לבחור קובץ מהמחשב שלך', UploadNoFolder : 'נא לבחור תיקיה לפני העלאה.', UploadNoPerms : 'העלאת קובץ אסורה.', UploadUnknError : 'שגיעה בשליחת קובץ.', UploadExtIncorrect : 'סוג קובץ זה לא מאושר בתיקיה זאת.', // Settings Panel SetTitle : 'הגדרות', SetView : 'צפה:', SetViewThumb : 'תמונות קטנות', SetViewList : 'רשימה', SetDisplay : 'תצוגה:', SetDisplayName : 'שם קובץ', SetDisplayDate : 'תאריך', SetDisplaySize : 'גודל קובץ', SetSort : 'מיון:', SetSortName : 'לפי שם', SetSortDate : 'לפי תאריך', SetSortSize : 'לפי גודל', // Status Bar FilesCountEmpty : '<תיקיה ריקה>', FilesCountOne : 'קובץ 1', FilesCountMany : '%1 קבצים', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'בקשה נכשלה. שגיאה. (Error %1)', Errors : { 10 : 'Invalid command.', 11 : 'The resource type was not specified in the request.', 12 : 'The requested resource type is not valid.', 102 : 'Invalid file or folder name.', 103 : 'It was not possible to complete the request due to authorization restrictions.', 104 : 'It was not possible to complete the request due to file system permission restrictions.', 105 : 'Invalid file extension.', 109 : 'Invalid request.', 110 : 'Unknown error.', 115 : 'A file or folder with the same name already exists.', 116 : 'Folder not found. Please refresh and try again.', 117 : 'File not found. Please refresh the files list and try again.', 118 : 'Source and target paths are equal.', 201 : 'A file with the same name is already available. The uploaded file has been renamed to "%1"', 202 : 'Invalid file', 203 : 'Invalid file. The file size is too big.', 204 : 'The uploaded file is corrupt.', 205 : 'No temporary folder is available for upload in the server.', 206 : 'Upload cancelled for security reasons. The file contains HTML like data.', 207 : 'The uploaded file has been renamed to "%1"', 300 : 'Moving file(s) failed.', 301 : 'Copying file(s) failed.', 500 : 'The file browser is disabled for security reasons. Please contact your system administrator and check the CKFinder configuration file.', 501 : 'The thumbnails support is disabled.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'שם קובץ לא יכול להיות ריק', FileExists : 'קובץ %s already exists', FolderEmpty : 'שם תיקיה לא יכול להיות ריק', FileInvChar : 'שם הקובץ לא יכול לכלול תווים הבאים: \n\\ / : * ? " < > |', FolderInvChar : 'שם התיקיה לא יכול לכלול תווים הבאים: \n\\ / : * ? " < > |', PopupBlockView : 'בלתי אפשרי לפתוח קובץ בחלון חדש. נא לבדוק הגדרות דפדפן ולבטל כל החוסמים חלונות קופצות.' }, // Imageresize plugin Imageresize : { dialogTitle : 'שנה גודל %s', sizeTooBig : 'לא יכול לקבוע גובה ורוחב של תמונה יותר גדול מדודל מקורי (%size).', resizeSuccess : 'גודל שונה שהצלחה.', thumbnailNew : 'ליצור תמונה קטנה)טומבנייל(', thumbnailSmall : 'קטן (%s)', thumbnailMedium : 'בינוני (%s)', thumbnailLarge : 'גדול (%s)', newSize : 'קבע גודל חדש', width : 'רוחב', height : 'גובה', invalidHeight : 'גובה לא חוקי.', invalidWidth : 'רוחב לא חוקי.', invalidName : 'שם קובץ לא חוקי.', newImage : 'ליצור תמונה חדשה', noExtensionChange : 'לא ניתן לשנות סוג קובץ.', imageSmall : 'מקור תמונה קטן מדי', contextMenuName : 'שנה גודל' }, // Fileeditor plugin Fileeditor : { save : 'שמור', fileOpenError : 'לא מצליח לפתוח קובץ.', fileSaveSuccess : 'קובץ משמר בהצלחה.', contextMenuName : 'עריכה', loadingFile : 'טוען קובץ, אנא המתן...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Slovenian * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['sl'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, nedostopen</span>', confirmCancel : 'Nekatere opcije so bile spremenjene. Ali res želite zapreti pogovorno okno?', ok : 'Potrdi', cancel : 'Prekliči', confirmationTitle : 'Potrditev', messageTitle : 'Informacija', inputTitle : 'Vprašanje', undo : 'Razveljavi', redo : 'Obnovi', skip : 'Preskoči', skipAll : 'Preskoči vse', makeDecision : 'Katera aktivnost naj se izvede?', rememberDecision: 'Zapomni si mojo izbiro' }, dir : 'ltr', // MISSING HelpLang : 'en', LangCode : 'sl', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'd.m.yyyy H:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Mape', FolderLoading : 'Nalagam...', FolderNew : 'Vnesite ime za novo mapo: ', FolderRename : 'Vnesite ime nove mape: ', FolderDelete : 'Ali ste prepričani, da želite zbrisati mapo "%1"?', FolderRenaming : ' (Preimenujem...)', FolderDeleting : ' (Brišem...)', // Files FileRename : 'Vnesite novo ime datoteke: ', FileRenameExt : 'Ali ste prepričani, da želite spremeniti končnico datoteke? Možno je, da potem datoteka ne bo uporabna.', FileRenaming : 'Preimenujem...', FileDelete : 'Ali ste prepričani, da želite izbrisati datoteko "%1"?', FilesLoading : 'Nalagam...', FilesEmpty : 'Prazna mapa', FilesMoved : 'Datoteka %1 je bila premaknjena v %2:%3', FilesCopied : 'Datoteka %1 je bila kopirana v %2:%3', // Basket BasketFolder : 'Koš', BasketClear : 'Izprazni koš', BasketRemove : 'Odstrani iz koša', BasketOpenFolder : 'Odpri izvorno mapo', BasketTruncateConfirm : 'Ali res želite odstraniti vse datoteke iz koša?', BasketRemoveConfirm : 'Ali res želite odstraniti datoteko "%1" iz koša?', BasketEmpty : 'V košu ni datotek. Lahko jih povlečete in spustite.', BasketCopyFilesHere : 'Kopiraj datoteke iz koša', BasketMoveFilesHere : 'Premakni datoteke iz koša', BasketPasteErrorOther : 'Napaka z datoteko %s: %e', BasketPasteMoveSuccess : 'Seznam premaknjenih datotek: %s', BasketPasteCopySuccess : 'Seznam kopiranih datotek: %s', // Toolbar Buttons (some used elsewhere) Upload : 'Naloži na strežnik', UploadTip : 'Naloži novo datoteko na strežnik', Refresh : 'Osveži', Settings : 'Nastavitve', Help : 'Pomoč', HelpTip : 'Pomoč', // Context Menus Select : 'Izberi', SelectThumbnail : 'Izberi malo sličico (predogled)', View : 'Predogled', Download : 'Prenesi na svoj računalnik', NewSubFolder : 'Nova podmapa', Rename : 'Preimenuj', Delete : 'Zbriši', CopyDragDrop : 'Kopiraj datoteko', MoveDragDrop : 'Premakni datoteko', // Dialogs RenameDlgTitle : 'Preimenuj', NewNameDlgTitle : 'Novo ime', FileExistsDlgTitle : 'Datoteka že obstaja', SysErrorDlgTitle : 'Sistemska napaka', FileOverwrite : 'Prepiši', FileAutorename : 'Avtomatsko preimenuj', // Generic OkBtn : 'Potrdi', CancelBtn : 'Prekliči', CloseBtn : 'Zapri', // Upload Panel UploadTitle : 'Naloži novo datoteko na strežnik', UploadSelectLbl : 'Izberi datoteko za prenos na strežnik', UploadProgressLbl : '(Prenos na strežnik poteka, prosimo počakajte...)', UploadBtn : 'Prenesi izbrano datoteko na strežnik', UploadBtnCancel : 'Prekliči', UploadNoFileMsg : 'Prosimo izberite datoteko iz svojega računalnika za prenos na strežnik', UploadNoFolder : 'Izberite mapo v katero se bo naložilo datoteko!', UploadNoPerms : 'Nalaganje datotek ni dovoljeno.', UploadUnknError : 'Napaka pri pošiljanju datoteke.', UploadExtIncorrect : 'V tej mapi ta vrsta datoteke ni dovoljena.', // Settings Panel SetTitle : 'Nastavitve', SetView : 'Pogled:', SetViewThumb : 'majhne sličice', SetViewList : 'seznam', SetDisplay : 'Prikaz:', SetDisplayName : 'ime datoteke', SetDisplayDate : 'datum', SetDisplaySize : 'velikost datoteke', SetSort : 'Razvrščanje:', SetSortName : 'po imenu datoteke', SetSortDate : 'po datumu', SetSortSize : 'po velikosti', // Status Bar FilesCountEmpty : '<Prazna mapa>', FilesCountOne : '1 datoteka', FilesCountMany : '%1 datotek(e)', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/sek', // Connector Error Messages. ErrorUnknown : 'Prišlo je do napake. (Napaka %1)', Errors : { 10 : 'Napačen ukaz.', 11 : 'V poizvedbi ni bil jasen tip (resource type).', 12 : 'Tip datoteke ni primeren.', 102 : 'Napačno ime mape ali datoteke.', 103 : 'Vašega ukaza se ne da izvesti zaradi težav z avtorizacijo.', 104 : 'Vašega ukaza se ne da izvesti zaradi težav z nastavitvami pravic v datotečnem sistemu.', 105 : 'Napačna končnica datoteke.', 109 : 'Napačna zahteva.', 110 : 'Neznana napaka.', 115 : 'Datoteka ali mapa s tem imenom že obstaja.', 116 : 'Mapa ni najdena. Prosimo osvežite okno in poskusite znova.', 117 : 'Datoteka ni najdena. Prosimo osvežite seznam datotek in poskusite znova.', 118 : 'Začetna in končna pot je ista.', 201 : 'Datoteka z istim imenom že obstaja. Naložena datoteka je bila preimenovana v "%1"', 202 : 'Neprimerna datoteka.', 203 : 'Datoteka je prevelika in zasede preveč prostora.', 204 : 'Naložena datoteka je okvarjena.', 205 : 'Na strežniku ni na voljo začasna mapa za prenos datotek.', 206 : 'Nalaganje je bilo prekinjeno zaradi varnostnih razlogov. Datoteka vsebuje podatke, ki spominjajo na HTML kodo.', 207 : 'Naložena datoteka je bila preimenovana v "%1"', 300 : 'Premikanje datotek(e) ni uspelo.', 301 : 'Kopiranje datotek(e) ni uspelo.', 500 : 'Brskalnik je onemogočen zaradi varnostnih razlogov. Prosimo kontaktirajte upravljalca spletnih strani.', 501 : 'Ni podpore za majhne sličice (predogled).' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Ime datoteke ne more biti prazno', FileExists : 'Datoteka %s že obstaja', FolderEmpty : 'Mapa ne more biti prazna', FileInvChar : 'Ime datoteke ne sme vsebovati naslednjih znakov: \n\\ / : * ? " < > |', FolderInvChar : 'Ime mape ne sme vsebovati naslednjih znakov: \n\\ / : * ? " < > |', PopupBlockView : 'Datoteke ni možno odpreti v novem oknu. Prosimo nastavite svoj brskalnik tako, da bo dopuščal odpiranje oken (popups) oz. izklopite filtre za blokado odpiranja oken.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Spremeni velikost slike %s', sizeTooBig : 'Širina ali višina slike ne moreta biti večji kot je originalna velikost (%size).', resizeSuccess : 'Velikost slike je bila uspešno spremenjena.', thumbnailNew : 'Kreiraj novo majhno sličico', thumbnailSmall : 'majhna (%s)', thumbnailMedium : 'srednja (%s)', thumbnailLarge : 'velika (%s)', newSize : 'Določite novo velikost', width : 'Širina', height : 'Višina', invalidHeight : 'Nepravilna višina.', invalidWidth : 'Nepravilna širina.', invalidName : 'Nepravilno ime datoteke.', newImage : 'Kreiraj novo sliko', noExtensionChange : 'Končnica datoteke se ne more spremeniti.', imageSmall : 'Izvorna slika je premajhna', contextMenuName : 'Spremeni velikost' }, // Fileeditor plugin Fileeditor : { save : 'Shrani', fileOpenError : 'Datoteke ni mogoče odpreti.', fileSaveSuccess : 'Datoteka je bila shranjena.', contextMenuName : 'Uredi', loadingFile : 'Nalaganje datoteke, prosimo počakajte ...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['cs'] = { appTitle : 'CKFinder', // MISSING // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING ok : 'OK', // MISSING cancel : 'Cancel', // MISSING confirmationTitle : 'Confirmation', // MISSING messageTitle : 'Information', // MISSING inputTitle : 'Question', // MISSING undo : 'Undo', // MISSING redo : 'Redo', // MISSING skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', // MISSING HelpLang : 'en', LangCode : 'cs', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'm/d/yyyy h:MM aa', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Složky', FolderLoading : 'Načítání...', FolderNew : 'Zadejte jméno nové složky: ', FolderRename : 'Zadejte nové jméno složky: ', FolderDelete : 'Opravdu chcete smazat složku "%1" ?', FolderRenaming : ' (Přejmenovávám...)', FolderDeleting : ' (Mažu...)', // Files FileRename : 'Zadejte jméno novéhho souboru: ', FileRenameExt : 'Opravdu chcete změnit příponu souboru, může se stát nečitelným', FileRenaming : 'Přejmenovávám...', FileDelete : 'Opravdu chcete smazat soubor "%1"?', FilesLoading : 'Loading...', // MISSING FilesEmpty : 'Empty folder', // MISSING FilesMoved : 'File %1 moved into %2:%3', // MISSING FilesCopied : 'File %1 copied into %2:%3', // MISSING // Basket BasketFolder : 'Basket', // MISSING BasketClear : 'Clear Basket', // MISSING Ba
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Latin American Spanish * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['es-mx'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, no disponible</span>', confirmCancel : 'Algunas opciones se han cambiado\r\n¿Está seguro de querer cerrar el diálogo?', ok : 'Aceptar', cancel : 'Cancelar', confirmationTitle : 'Confirmación', messageTitle : 'Información', inputTitle : 'Pregunta', undo : 'Deshacer', redo : 'Rehacer', skip : 'Omitir', skipAll : 'Omitir todos', makeDecision : '¿Qué acción debe realizarse?', rememberDecision: 'Recordar mi decisión' }, dir : 'ltr', HelpLang : 'es-mx', LangCode : 'es-mx', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'dd/mm/yyyy H:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Carpetas', FolderLoading : 'Cargando...', FolderNew : 'Por favor, escriba el nombre para la nueva carpeta: ', FolderRename : 'Por favor, escriba el nuevo nombre para la carpeta: ', FolderDelete : '¿Está seguro de que quiere borrar la carpeta "%1"?', FolderRenaming : ' (Renombrando...)', FolderDeleting : ' (Borrando...)', // Files FileRename : 'Por favor, escriba el nuevo nombre del archivo: ', FileRenameExt : '¿Está seguro de querer cambiar la extensión del archivo? El archivo puede dejar de ser usable', FileRenaming : 'Renombrando...', FileDelete : '¿Está seguro de que quiere borrar el archivo "%1"?', FilesLoading : 'Cargando...', FilesEmpty : 'Carpeta vacía', FilesMoved : 'Archivo %1 movido a %2:%3', FilesCopied : 'Archivo %1 copiado a %2:%3', // Basket BasketFolder : 'Cesta', BasketClear : 'Vaciar cesta', BasketRemove : 'Quitar de la cesta', BasketOpenFolder : 'Abrir carpeta padre', BasketTruncateConfirm : '¿Está seguro de querer quitar todos los archivos de la cesta?', BasketRemoveConfirm : '¿Está seguro de querer quitar el archivo "%1" de la cesta?', BasketEmpty : 'No hay archivos en la cesta, arrastra y suelta algunos.', BasketCopyFilesHere : 'Copiar archivos de la cesta', BasketMoveFilesHere : 'Mover archivos de la cesta', BasketPasteErrorOther : 'Fichero %s error: %e', BasketPasteMoveSuccess : 'Los siguientes ficheros han sido movidos: %s', BasketPasteCopySuccess : 'Los siguientes ficheros han sido copiados: %s', // Toolbar Buttons (some used elsewhere) Upload : 'Añadir', UploadTip : 'Añadir nuevo archivo', Refresh : 'Actualizar', Settings : 'Configuración', Help : 'Ayuda', HelpTip : 'Ayuda', // Context Menus Select : 'Seleccionar', SelectThumbnail : 'Seleccionar el icono', View : 'Ver', Download : 'Descargar', NewSubFolder : 'Nueva Subcarpeta', Rename : 'Renombrar', Delete : 'Borrar', CopyDragDrop : 'Copiar archivo aquí', MoveDragDrop : 'Mover archivo aquí', // Dialogs RenameDlgTitle : 'Renombrar', NewNameDlgTitle : 'Nuevo nombre', FileExistsDlgTitle : 'Archivo existente', SysErrorDlgTitle : 'Error de sistema', FileOverwrite : 'Sobreescribir', FileAutorename : 'Auto-renombrar', // Generic OkBtn : 'Aceptar', CancelBtn : 'Cancelar', CloseBtn : 'Cerrar', // Upload Panel UploadTitle : 'Añadir nuevo archivo', UploadSelectLbl : 'Elija el archivo a subir', UploadProgressLbl : '(Subida en progreso, por favor espere...)', UploadBtn : 'Subir el archivo elegido', UploadBtnCancel : 'Cancelar', UploadNoFileMsg : 'Por favor, elija un archivo de su computadora', UploadNoFolder : 'Por favor, escoja la carpeta antes de iniciar la subida.', UploadNoPerms : 'No puede subir archivos.', UploadUnknError : 'Error enviando el archivo.', UploadExtIncorrect : 'La extensión del archivo no está permitida en esta carpeta.', // Settings Panel SetTitle : 'Configuración', SetView : 'Vista:', SetViewThumb : 'Iconos', SetViewList : 'Lista', SetDisplay : 'Mostrar:', SetDisplayName : 'Nombre de archivo', SetDisplayDate : 'Fecha', SetDisplaySize : 'Tamaño del archivo', SetSort : 'Ordenar:', SetSortName : 'por Nombre', SetSortDate : 'por Fecha', SetSortSize : 'por Tamaño', // Status Bar FilesCountEmpty : '<Carpeta vacía>', FilesCountOne : '1 archivo', FilesCountMany : '%1 archivos', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'No ha sido posible completar la solicitud. (Error %1)', Errors : { 10 : 'Comando incorrecto.', 11 : 'El tipo de recurso no ha sido especificado en la solicitud.', 12 : 'El tipo de recurso solicitado no es válido.', 102 : 'Nombre de archivo o carpeta no válido.', 103 : 'No se ha podido completar la solicitud debido a las restricciones de autorización.', 104 : 'No ha sido posible completar la solicitud debido a restricciones en el sistema de archivos.', 105 : 'La extensión del archivo no es válida.', 109 : 'Petición inválida.', 110 : 'Error desconocido.', 115 : 'Ya existe un archivo o carpeta con ese nombre.', 116 : 'No se ha encontrado la carpeta. Por favor, actualice y pruebe de nuevo.', 117 : 'No se ha encontrado el archivo. Por favor, actualice la lista de archivos y pruebe de nuevo.', 118 : 'Las rutas origen y destino son iguales.', 201 : 'Ya existía un archivo con ese nombre. El archivo subido ha sido renombrado como "%1"', 202 : 'Archivo inválido', 203 : 'Archivo inválido. El tamaño es demasiado grande.', 204 : 'El archivo subido está corrupto.', 205 : 'La carpeta temporal no está disponible en el servidor para las subidas.', 206 : 'La subida se ha cancelado por razones de seguridad. El archivo contenía código HTML.', 207 : 'El archivo subido ha sido renombrado como "%1"', 300 : 'Ha fallado el mover el(los) archivo(s).', 301 : 'Ha fallado el copiar el(los) archivo(s).', 500 : 'El navegador de archivos está deshabilitado por razones de seguridad. Por favor, contacte con el administrador de su sistema y compruebe el archivo de configuración de CKFinder.', 501 : 'El soporte para iconos está deshabilitado.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'El nombre del archivo no puede estar vacío', FileExists : 'El archivo %s ya existe', FolderEmpty : 'El nombre de la carpeta no puede estar vacío', FileInvChar : 'El nombre del archivo no puede contener ninguno de los caracteres siguientes: \n\\ / : * ? " < > |', FolderInvChar : 'El nombre de la carpeta no puede contener ninguno de los caracteres siguientes: \n\\ / : * ? " < > |', PopupBlockView : 'No ha sido posible abrir el archivo en una nueva ventana. Por favor, configure su navegador y desactive todos los bloqueadores de ventanas para esta página.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Redimensionar %s', sizeTooBig : 'No se puede poner la altura o anchura de la imagen mayor que las dimensiones originales (%size).', resizeSuccess : 'Imagen redimensionada correctamente.', thumbnailNew : 'Crear nueva minuatura', thumbnailSmall : 'Pequeña (%s)', thumbnailMedium : 'Mediana (%s)', thumbnailLarge : 'Grande (%s)', newSize : 'Establecer nuevo tamaño', width : 'Ancho', height : 'Alto', invalidHeight : 'Altura inválida.', invalidWidth : 'Anchura inválida.', invalidName : 'Nombre no válido.', newImage : 'Crear nueva imagen', noExtensionChange : 'La extensión no se puede cambiar.', imageSmall : 'La imagen original es demasiado pequeña', contextMenuName : 'Redimensionar' }, // Fileeditor plugin Fileeditor : { save : 'Guardar', fileOpenError : 'No se puede abrir el archivo.', fileSaveSuccess : 'Archivo guardado correctamente.', contextMenuName : 'Editar', loadingFile : 'Cargando archivo, por favor espere...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Portuguese (Brazilian) * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['pt-br'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Algumas opções foram modificadas. Deseja fechar a janela realmente?', ok : 'OK', cancel : 'Cancelar', confirmationTitle : 'Confirmação', messageTitle : 'Informação', inputTitle : 'Pergunta', undo : 'Desfazer', redo : 'Refazer', skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', HelpLang : 'en', LangCode : 'pt-br', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'dd/mm/yyyy HH:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Pastas', FolderLoading : 'Carregando...', FolderNew : 'Favor informar o nome da nova pasta: ', FolderRename : 'Favor informar o nome da nova pasta: ', FolderDelete : 'Você tem certeza que deseja apagar a pasta "%1"?', FolderRenaming : ' (Renomeando...)', FolderDeleting : ' (Apagando...)', // Files FileRename : 'Favor informar o nome do novo arquivo: ', FileRenameExt : 'Você tem certeza que deseja alterar a extensão do arquivo? O arquivo pode ser danificado', FileRenaming : 'Renomeando...', FileDelete : 'Você tem certeza que deseja apagar o arquivo "%1"?', FilesLoading : 'Carregando...', FilesEmpty : 'Pasta vazia', FilesMoved : 'Arquivo %1 movido para %2:%3', FilesCopied : 'Arquivo %1 copiado em %2:%3', // Basket BasketFolder : 'Cesta', BasketClear : 'Limpa Cesta', BasketRemove : 'Remove da cesta', BasketOpenFolder : 'Abre a pasta original', BasketTruncateConfirm : 'Remover todos os arquivas da cesta?', BasketRemoveConfirm : 'Remover o arquivo "%1" da cesta?', BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copia Arquivos da Cesta', BasketMoveFilesHere : 'Move os Arquivos da Cesta', BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'Os seguintes arquivos foram movidos: %s', BasketPasteCopySuccess : 'Os sequintes arquivos foram copiados: %s', // Toolbar Buttons (some used elsewhere) Upload : 'Enviar arquivo', UploadTip : 'Enviar novo arquivo', Refresh : 'Atualizar', Settings : 'Configurações', Help : 'Ajuda', HelpTip : 'Ajuda', // Context Menus Select : 'Selecionar', SelectThumbnail : 'Selecionar miniatura', View : 'Visualizar', Download : 'Download', NewSubFolder : 'Nova sub-pasta', Rename : 'Renomear', Delete : 'Apagar', CopyDragDrop : 'Copia arquivo aqui', MoveDragDrop : 'Move arquivo aqui', // Dialogs RenameDlgTitle : 'Renomeia', NewNameDlgTitle : 'Novo nome', FileExistsDlgTitle : 'O arquivo já existe', SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Sobrescrever', FileAutorename : 'Renomeia automaticamente', // Generic OkBtn : 'OK', CancelBtn : 'Cancelar', CloseBtn : 'Fechar', // Upload Panel UploadTitle : 'Enviar novo arquivo', UploadSelectLbl : 'Selecione o arquivo para enviar', UploadProgressLbl : '(Enviado arquivo, favor aguardar...)', UploadBtn : 'Enviar arquivo selecionado', UploadBtnCancel : 'Cancelar', UploadNoFileMsg : 'Favor selecionar o arquivo no seu computador', UploadNoFolder : 'Favor selecionar a pasta antes the enviar o arquivo.', UploadNoPerms : 'Não é permitido o envio de arquivos.', UploadUnknError : 'Erro no envio do arquivo.', UploadExtIncorrect : 'A extensão deste arquivo não é permitida nesat pasta.', // Settings Panel SetTitle : 'Configurações', SetView : 'Visualizar:', SetViewThumb : 'Miniaturas', SetViewList : 'Lista', SetDisplay : 'Exibir:', SetDisplayName : 'Arquivo', SetDisplayDate : 'Data', SetDisplaySize : 'Tamanho', SetSort : 'Ordenar:', SetSortName : 'por Nome do arquivo', SetSortDate : 'por Data', SetSortSize : 'por Tamanho', // Status Bar FilesCountEmpty : '<Pasta vazia>', FilesCountOne : '1 arquivo', FilesCountMany : '%1 arquivos', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'Não foi possível completer o seu pedido. (Erro %1)', Errors : { 10 : 'Comando inválido.', 11 : 'O tipo de recurso não foi especificado na solicitação.', 12 : 'O recurso solicitado não é válido.', 102 : 'Nome do arquivo ou pasta inválido.', 103 : 'Não foi possível completar a solicitação por restrições de acesso.', 104 : 'Não foi possível completar a solicitação por restrições de acesso do sistema de arquivos.', 105 : 'Extensão de arquivo inválida.', 109 : 'Solicitação inválida.', 110 : 'Erro desconhecido.', 115 : 'Uma arquivo ou pasta já existe com esse nome.', 116 : 'Pasta não encontrada. Atualize e tente novamente.', 117 : 'Arquivo não encontrado. Atualize a lista de arquivos e tente novamente.', 118 : 'Source and target paths are equal.', // MISSING 201 : 'Um arquivo com o mesmo nome já está disponível. O arquivo enviado foi renomeado para "%1"', 202 : 'Arquivo inválido', 203 : 'Arquivo inválido. O tamanho é muito grande.', 204 : 'O arquivo enviado está corrompido.', 205 : 'Nenhuma pasta temporária para envio está disponível no servidor.', 206 : 'Transmissão cancelada por razões de segurança. O arquivo contem dados HTML.', 207 : 'O arquivo enviado foi renomeado para "%1"', 300 : 'Não foi possível mover o(s) arquivo(s).', 301 : 'Não foi possível copiar o(s) arquivos(s).', 500 : 'A navegação de arquivos está desativada por razões de segurança. Contacte o administrador do sistema.', 501 : 'O suporte a miniaturas está desabilitado.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'O nome do arquivo não pode ser vazio', FileExists : 'O nome %s já é em uso', FolderEmpty : 'O nome da pasta não pode ser vazio', FileInvChar : 'O nome do arquivo não pode conter nenhum desses caracteres: \n\\ / : * ? " < > |', FolderInvChar : 'O nome da pasta não pode conter nenhum desses caracteres: \n\\ / : * ? " < > |', PopupBlockView : 'Não foi possível abrir o arquivo em outra janela. Configure seu navegador e desabilite o bloqueio a popups para esse site.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Redimensionar %s', sizeTooBig : 'Não possível usar dimensões maiores do que as originais (%size).', resizeSuccess : 'Imagem redimensionada corretamente.', thumbnailNew : 'Cria nova anteprima', thumbnailSmall : 'Pequeno (%s)', thumbnailMedium : 'Médio (%s)', thumbnailLarge : 'Grande (%s)', newSize : 'Novas dimensões', width : 'Largura', height : 'Altura', invalidHeight : 'Altura incorreta.', invalidWidth : 'Largura incorreta.', invalidName : 'O nome do arquivo não é válido.', newImage : 'Cria nova imagem', noExtensionChange : 'A extensão do arquivo não pode ser modificada.', imageSmall : 'A imagem original é muito pequena', contextMenuName : 'Redimensionar' }, // Fileeditor plugin Fileeditor : { save : 'Salva', fileOpenError : 'Não é possível abrir o arquivo.', fileSaveSuccess : 'Arquivo salvado corretamente.', contextMenuName : 'Modificar', loadingFile : 'Carregando arquivo. Por favor aguarde...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2012, CKSource - Frederico Knabben. All rights reserved. * * The software, this file, and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying, or distributing this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object for the Vietnamese * language. */ /** * Contains the dictionary of language entries. * @namespace */ CKFinder.lang['vi'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, không khả dụng</span>', confirmCancel : 'Vài tùy chọn đã thay đổi. Bạn có muốn đóng hộp thoại?', ok : 'OK', cancel : 'Hủy', confirmationTitle : 'Xác nhận', messageTitle : 'Thông tin', inputTitle : 'Câu hỏi', undo : 'Hoàn tác', redo : 'Làm lại', skip : 'Bỏ qua', skipAll : 'Bỏ qua tất cả', makeDecision : 'Chọn hành động nào?', rememberDecision: 'Ghi nhớ quyết định này' }, // Language direction, 'ltr' or 'rtl'. dir : 'ltr', HelpLang : 'en', LangCode : 'vi', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'd/m/yyyy h:MM aa', DateAmPm : ['SA', 'CH'], // Folders FoldersTitle : 'Thư mục', FolderLoading : 'Đang tải...', FolderNew : 'Xin chọn tên cho thư mục mới: ', FolderRename : 'Xin chọn tên mới cho thư mục: ', FolderDelete : 'Bạn có chắc muốn xóa thư mục "%1"?', FolderRenaming : ' (Đang đổi tên...)', FolderDeleting : ' (Đang xóa...)', DestinationFolder : 'Destination Folder', // MISSING // Files FileRename : 'Xin nhập tên tập tin mới: ', FileRenameExt : 'Bạn có chắc muốn đổi phần mở rộng? Tập tin có thể sẽ không dùng được.', FileRenaming : 'Đang đổi tên...', FileDelete : 'Bạn có chắc muốn xóa tập tin "%1"?', FilesDelete : 'Are you sure you want to delete %1 files?', // MISSING FilesLoading : 'Đang tải...', FilesEmpty : 'Thư mục trống.', DestinationFile : 'Destination File', // MISSING SkippedFiles : 'List of skipped files:', // MISSING // Basket BasketFolder : 'Rổ', BasketClear : 'Dọn rổ', BasketRemove : 'Xóa khỏi rổ', BasketOpenFolder : 'Mở thư mục cha', BasketTruncateConfirm : 'Bạn có chắc muốn bỏ tất cả tập tin trong rổ?', BasketRemoveConfirm : 'Bạn có chắc muốn bỏ tập tin "%1" khỏi rổ?', BasketRemoveConfirmMultiple : 'Do you really want to remove %1 files from the basket?', // MISSING BasketEmpty : 'Không có tập tin trong rổ, hãy kéo và thả tập tin vào rổ.', BasketCopyFilesHere : 'Chép tập tin từ rổ', BasketMoveFilesHere : 'Chuyển tập tin từ rổ', // Global messages OperationCompletedSuccess : 'Operation completed successfully.', // MISSING OperationCompletedErrors : 'Operation completed with errors.', // MISSING FileError : '%s: %e', // MISSING // Move and Copy files MovedFilesNumber : 'Number of files moved: %s.', // MISSING CopiedFilesNumber : 'Number of files copied: %s.', // MISSING MoveFailedList : 'The following files could not be moved:<br />%s', // MISSING CopyFailedList : 'The following files could not be copied:<br />%s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Tải lên', UploadTip : 'Tải tập tin mới', Refresh : 'Làm tươi', Settings : 'Thiết lập', Help : 'Hướng dẫn', HelpTip : 'Hướng dẫn', // Context Menus Select : 'Chọn', SelectThumbnail : 'Chọn ảnh mẫu', View : 'Xem', Download : 'Tải về', NewSubFolder : 'Tạo thư mục con', Rename : 'Đổi tên', Delete : 'Xóa', DeleteFiles : 'Delete Files', // MISSING CopyDragDrop : 'Sao chép ở đây', MoveDragDrop : 'Di chuyển ở đây', // Dialogs RenameDlgTitle : 'Đổi tên', NewNameDlgTitle : 'Tên mới', FileExistsDlgTitle : 'Tập tin đã tồn tại', SysErrorDlgTitle : 'Lỗi hệ thống', FileOverwrite : 'Ghi đè', FileAutorename : 'Tự đổi tên', ManuallyRename : 'Manually rename', // MISSING // Generic OkBtn : 'OK', CancelBtn : 'Hủy bỏ', CloseBtn : 'Đóng', // Upload Panel UploadTitle : 'Tải tập tin mới', UploadSelectLbl : 'Chọn tập tin tải lên', UploadProgressLbl : '(Đang tải lên, vui lòng chờ...)', UploadBtn : 'Tải tập tin đã chọn', UploadBtnCancel : 'Hủy bỏ', UploadNoFileMsg : 'Xin chọn một tập tin trong máy tính.', UploadNoFolder : 'Xin chọn thư mục trước khi tải lên.', UploadNoPerms : 'Không được phép tải lên.', UploadUnknError : 'Lỗi khi tải tập tin.', UploadExtIncorrect : 'Kiểu tập tin không được chấp nhận trong thư mục này.', // Flash Uploads UploadLabel : 'Tập tin sẽ tải:', UploadTotalFiles : 'Tổng số tập tin:', UploadTotalSize : 'Dung lượng tổng cộng:', UploadSend : 'Tải lên', UploadAddFiles : 'Thêm tập tin', UploadClearFiles : 'Xóa tập tin', UploadCancel : 'Hủy tải', UploadRemove : 'Xóa', UploadRemoveTip : 'Xóa !f', UploadUploaded : 'Đã tải !n%', UploadProcessing : 'Đang xử lí...', // Settings Panel SetTitle : 'Thiết lập', SetView : 'Xem:', SetViewThumb : 'Ảnh mẫu', SetViewList : 'Danh sách', SetDisplay : 'Hiển thị:', SetDisplayName : 'Tên tập tin', SetDisplayDate : 'Ngày', SetDisplaySize : 'Dung lượng', SetSort : 'Sắp xếp:', SetSortName : 'theo tên', SetSortDate : 'theo ngày', SetSortSize : 'theo dung lượng', SetSortExtension : 'theo phần mở rộng', // Status Bar FilesCountEmpty : '<Thư mục rỗng>', FilesCountOne : '1 tập tin', FilesCountMany : '%1 tập tin', // Size and Speed Kb : '%1 KB', Mb : '%1 MB', Gb : '%1 GB', SizePerSecond : '%1/s', // Connector Error Messages. ErrorUnknown : 'Không thể hoàn tất yêu cầu. (Lỗi %1)', Errors : { 10 : 'Lệnh không hợp lệ.', 11 : 'Kiểu tài nguyên không được chỉ định trong yêu cầu.', 12 : 'Kiểu tài nguyên yêu cầu không hợp lệ.', 102 : 'Tên tập tin hay thư mục không hợp lệ.', 103 : 'Không thể hoàn tất yêu cầu vì giới hạn quyền.', 104 : 'Không thể hoàn tất yêu cầu vì giới hạn quyền của hệ thống tập tin.', 105 : 'Phần mở rộng tập tin không hợp lệ.', 109 : 'Yêu cầu không hợp lệ.', 110 : 'Lỗi không xác định.', 111 : 'It was not possible to complete the request due to resulting file size.', // MISSING 115 : 'Tập tin hoặc thư mục cùng tên đã tồn tại.', 116 : 'Không thấy thư mục. Hãy làm tươi và thử lại.', 117 : 'Không thấy tập tin. Hãy làm tươi và thử lại.', 118 : 'Đường dẫn nguồn và đích giống nhau.', 201 : 'Tập tin cùng tên đã tồn tại. Tập tin vừa tải lên được đổi tên thành "%1".', 202 : 'Tập tin không hợp lệ.', 203 : 'Tập tin không hợp lệ. Dung lượng quá lớn.', 204 : 'Tập tin tải lên bị hỏng.', 205 : 'Không có thư mục tạm để tải tập tin.', 206 : 'Huỷ tải lên vì lí do bảo mật. Tập tin chứa dữ liệu giống HTML.', 207 : 'Tập tin được đổi tên thành "%1".', 300 : 'Di chuyển tập tin thất bại.', 301 : 'Chép tập tin thất bại.', 500 : 'Trình duyệt tập tin bị vô hiệu vì lí do bảo mật. Xin liên hệ quản trị hệ thống và kiểm tra tập tin cấu hình CKFinder.', 501 : 'Chức năng hỗ trợ ảnh mẫu bị vô hiệu.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Không thể để trống tên tập tin.', FileExists : 'Tập tin %s đã tồn tại.', FolderEmpty : 'Không thể để trống tên thư mục.', FolderExists : 'Folder %s already exists.', // MISSING FolderNameExists : 'Folder already exists.', // MISSING FileInvChar : 'Tên tập tin không thể chưa các kí tự: \n\\ / : * ? " < > |', FolderInvChar : 'Tên thư mục không thể chứa các kí tự: \n\\ / : * ? " < > |', PopupBlockView : 'Không thể mở tập tin trong cửa sổ mới. Hãy kiểm tra trình duyệt và tắt chức năng chặn popup trên trang web này.', XmlError : 'Không thể nạp hồi đáp XML từ máy chủ web.', XmlEmpty : 'Không thể nạp hồi đáp XML từ máy chủ web. Dữ liệu rỗng.', XmlRawResponse : 'Hồi đáp thô từ máy chủ: %s' }, // Imageresize plugin Imageresize : { dialogTitle : 'Đổi kích thước %s', sizeTooBig : 'Không thể đặt chiều cao hoặc rộng to hơn kích thước gốc (%size).', resizeSuccess : 'Đổi kích thước ảnh thành công.', thumbnailNew : 'Tạo ảnh mẫu mới', thumbnailSmall : 'Nhỏ (%s)', thumbnailMedium : 'Vừa (%s)', thumbnailLarge : 'Lớn (%s)', newSize : 'Chọn kích thước mới', width : 'Rộng', height : 'Cao', invalidHeight : 'Chiều cao không hợp lệ.', invalidWidth : 'Chiều rộng không hợp lệ.', invalidName : 'Tên tập tin không hợp lệ.', newImage : 'Tạo ảnh mới', noExtensionChange : 'Không thể thay đổi phần mở rộng.', imageSmall : 'Ảnh nguồn quá nhỏ.', contextMenuName : 'Đổi kích thước', lockRatio : 'Khoá tỉ lệ', resetSize : 'Đặt lại kích thước' }, // Fileeditor plugin Fileeditor : { save : 'Lưu', fileOpenError : 'Không thể mở tập tin.', fileSaveSuccess : 'Lưu tập tin thành công.', contextMenuName : 'Sửa', loadingFile : 'Đang tải tập tin, xin chờ...' }, Maximize : { maximize : 'Cực đại hóa', minimize : 'Cực tiểu hóa' }, Gallery : { current : 'Hình thứ {current} trên {total}' }, Zip : { extractHereLabel : 'Extract here', // MISSING extractToLabel : 'Extract to...', // MISSING downloadZipLabel : 'Download as zip', // MISSING compressZipLabel : 'Compress to zip', // MISSING removeAndExtract : 'Remove existing and extract', // MISSING extractAndOverwrite : 'Extract overwriting existing files', // MISSING extractSuccess : 'File extracted successfully.' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['nn'] = { appTitle : 'CKFinder', // MISSING // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING ok : 'OK', // MISSING cancel : 'Cancel', // MISSING confirmationTitle : 'Confirmation', // MISSING messageTitle : 'Information', // MISSING inputTitle : 'Question', // MISSING undo : 'Undo', // MISSING redo : 'Redo', // MISSING skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', // MISSING HelpLang : 'en', LangCode : 'no', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'dd/mm/yyyy HH:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Mapper', FolderLoading : 'Laster...', FolderNew : 'Skriv inn det nye mappenavnet: ', FolderRename : 'Skriv inn det nye mappenavnet: ', FolderDelete : 'Er du sikker på at du vil slette mappen "%1"?', FolderRenaming : ' (Endrer mappenavn...)', FolderDeleting : ' (Sletter...)', // Files FileRename : 'Skriv inn det nye filnavnet: ', FileRenameExt : 'Er du sikker på at du vil endre filtypen? Filen kan bli ubrukelig', FileRenaming : 'Endrer filnavn...', FileDelete : 'Er du sikker på at du vil slette denne filen "%1"?', FilesLoading : 'Loading...', // MISSING FilesEmpty : 'Empty folder', // MISSING FilesMoved : 'File %1 moved into %2:%3', // MISSING FilesCopied : 'File %1 copied into %2:%3', // MISSING // Basket BasketFolder : 'Basket', // MISSING BasketClear : 'Clear Basket', // MISSING BasketRemove : 'Remove from basket', // MISSING BasketOpenFolder : 'Open parent folder', // MISSING BasketTruncateConfirm : 'Do you really want to remove all files from the basket?', // MISSING BasketRemoveConfirm : 'Do you really want to remove the file "%1" from the basket?', // MISSING BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copy Files from Basket', // MISSING BasketMoveFilesHere : 'Move Files from Basket', // MISSING BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'The following files were moved: %s', // MISSING BasketPasteCopySuccess : 'The following files were copied: %s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Last opp', UploadTip : 'Last opp en ny fil', Refresh : 'Oppdater', Settings : 'Innstillinger', Help : 'Hjelp', HelpTip : 'Hjelp finnes kun på engelsk', // Context Menus Select : 'Velg', SelectThumbnail : 'Velg Miniatyr', View : 'Vis fullversjon', Download : 'Last ned', NewSubFolder : 'Ny Undermappe', Rename : 'Endre navn', Delete : 'Slett', CopyDragDrop : 'Copy file here', // MISSING MoveDragDrop : 'Move file here', // MISSING // Dialogs RenameDlgTitle : 'Rename', // MISSING NewNameDlgTitle : 'New name', // MISSING FileExistsDlgTitle : 'File already exists', // MISSING SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Overwrite', // MISSING FileAutorename : 'Auto-rename', // MISSING // Generic OkBtn : 'OK', CancelBtn : 'Avbryt', CloseBtn : 'Lukk', // Upload Panel UploadTitle : 'Last opp ny fil', UploadSelectLbl : 'Velg filen du vil laste opp', UploadProgressLbl : '(Laster opp filen, vennligst vent...)', UploadBtn : 'Last opp valgt fil', UploadBtnCancel : 'Cancel', // MISSING UploadNoFileMsg : 'Du må velge en fil fra din datamaskin', UploadNoFolder : 'Please select folder before uploading.', // MISSING UploadNoPerms : 'File upload not allowed.', // MISSING UploadUnknError : 'Error sending the file.', // MISSING UploadExtIncorrect : 'File extension not allowed in this folder.', // MISSING // Settings Panel SetTitle : 'Innstillinger', SetView : 'Filvisning:', SetViewThumb : 'Miniatyrbilder', SetViewList : 'Liste', SetDisplay : 'Vis:', SetDisplayName : 'Filnavn', SetDisplayDate : 'Dato', SetDisplaySize : 'Filstørrelse', SetSort : 'Sorter etter:', SetSortName : 'Filnavn', SetSortDate : 'Dato', SetSortSize : 'Størrelse', // Status Bar FilesCountEmpty : '<Tom Mappe>', FilesCountOne : '1 fil', FilesCountMany : '%1 filer', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'Det var ikke mulig å utføre forespørselen. (Feil %1)', Errors : { 10 : 'Ugyldig kommando.', 11 : 'Ressurstypen ble ikke spesifisert i forepørselen.', 12 : 'Ugyldig ressurstype.', 102 : 'Ugyldig fil- eller mappenavn.', 103 : 'Kunne ikke utføre forespørselen pga manglende autorisasjon.', 104 : 'Kunne ikke utføre forespørselen pga manglende tilgang til filsystemet.', 105 : 'Ugyldig filtype.', 109 : 'Ugyldig forespørsel.', 110 : 'Ukjent feil.', 115 : 'Det finnes allerede en fil eller mappe med dette navnet.', 116 : 'Kunne ikke finne mappen. Oppdater vinduet og prøv igjen.', 117 : 'Kunne ikke finne filen. Oppdater vinduet og prøv igjen.', 118 : 'Source and target paths are equal.', // MISSING 201 : 'Det fantes allerede en fil med dette navnet. Den opplastede filens navn har blitt endret til "%1"', 202 : 'Ugyldig fil', 203 : 'Ugyldig fil. Filen er for stor.', 204 : 'Den opplastede filen er korrupt.', 205 : 'Det finnes ingen midlertidig mappe for filopplastinger.', 206 : 'Opplastingen ble avbrutt av sikkerhetshensyn. Filen inneholder HTML-aktig data.', 207 : 'Den opplastede filens navn har blitt endret til "%1"', 300 : 'Moving file(s) failed.', // MISSING 301 : 'Copying file(s) failed.', // MISSING 500 : 'Filvelgeren ikke tilgjengelig av sikkerhetshensyn. Kontakt systemansvarlig og be han sjekke CKFinder\'s konfigurasjonsfil.', 501 : 'Funksjon for minityrbilder er skrudd av.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Filnavnet kan ikke være tomt', FileExists : 'File %s already exists', // MISSING FolderEmpty : 'Mappenavnet kan ikke være tomt', FileInvChar : 'Filnavnet kan ikke inneholde følgende tegn: \n\\ / : * ? " < > |', FolderInvChar : 'Mappenavnet kan ikke inneholde følgende tegn: \n\\ / : * ? " < > |', PopupBlockView : 'Du må skru av popup-blockeren for å se bildet i nytt vindu.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Resize %s', // MISSING sizeTooBig : 'Cannot set image height or width to a value bigger than the original size (%size).', // MISSING resizeSuccess : 'Image resized successfully.', // MISSING thumbnailNew : 'Create new thumbnail', // MISSING thumbnailSmall : 'Small (%s)', // MISSING thumbnailMedium : 'Medium (%s)', // MISSING thumbnailLarge : 'Large (%s)', // MISSING newSize : 'Set new size', // MISSING width : 'Width', // MISSING height : 'Height', // MISSING invalidHeight : 'Invalid height.', // MISSING invalidWidth : 'Invalid width.', // MISSING invalidName : 'Invalid file name.', // MISSING newImage : 'Create new image', // MISSING noExtensionChange : 'The file extension cannot be changed.', // MISSING imageSmall : 'Source image is too small', // MISSING contextMenuName : 'Resize' // MISSING }, // Fileeditor plugin Fileeditor : { save : 'Save', // MISSING fileOpenError : 'Unable to open file.', // MISSING fileSaveSuccess : 'File saved successfully.', // MISSING contextMenuName : 'Edit', // MISSING loadingFile : 'Loading file, please wait...' // MISSING } };
JavaScript
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckfinder.com/license */ CKFinder.customConfig = function( config ) { // Define changes to default configuration here. For example: //config.skin = 'kama'; config.language = 'vi'; };
JavaScript
CKFinder.addPlugin( 'imageresize', { connectorInitialized : function( api, xml ) { var node = xml.selectSingleNode( 'Connector/PluginsInfo/imageresize/@smallThumb' ); if ( node ) CKFinder.config.imageresize_thumbSmall = node.value; node = xml.selectSingleNode( 'Connector/PluginsInfo/imageresize/@mediumThumb' ); if ( node ) CKFinder.config.imageresize_thumbMedium = node.value; node = xml.selectSingleNode( 'Connector/PluginsInfo/imageresize/@largeThumb' ); if ( node ) CKFinder.config.imageresize_thumbLarge = node.value; }, uiReady : function( api ) { var regexExt = /^(.*)\.([^\.]+)$/, regexFileName = /^(.*?)(?:_\d+x\d+)?\.([^\.]+)$/, regexGetSize = /^\s*(\d+)(px)?\s*$/i, regexGetSizeOrEmpty = /(^\s*(\d+)(px)?\s*$)|^$/i, imageDimension = { width : 0, height : 0 }, file, doc; var updateFileName = function( dialog ) { var width = dialog.getValueOf( 'tab1', 'width' ) || 0, height = dialog.getValueOf( 'tab1', 'height' ) || 0, e = dialog.getContentElement('tab1', 'createNewBox'); if ( width && height ) { var matches = file.name.match( regexFileName ); dialog.setValueOf( 'tab1', 'fileName', matches[1] + "_" + width + "x" + height + "." + matches[2]); e.getElement().show(); } else e.getElement().hide(); }; var onSizeChange = function() { var value = this.getValue(), // This = input element. dialog = this.getDialog(), maxWidth = api.config.imagesMaxWidth, maxHeight = api.config.imagesMaxHeight, aMatch = value.match( regexGetSize ), width = imageDimension.width, height = imageDimension.height; if ( aMatch ) value = aMatch[1]; if ( !api.config.imageresize_allowEnlarging ) { if ( width && width < maxWidth ) maxWidth = width; if ( height && height < maxHeight ) maxHeight = height; } if ( maxHeight > 0 && this.id == 'height' && value > maxHeight ) { value = maxHeight; dialog.setValueOf( 'tab1', 'height', value ); } if ( maxWidth > 0 && this.id == 'width' && value > maxWidth ) { value = maxWidth; dialog.setValueOf( 'tab1', 'width', value ); } // Only if ratio is locked if ( dialog.lockRatio && width && height ) { if ( this.id == 'height' ) { if ( value && value != '0' ) value = Math.round( width * ( value / height ) ); if ( !isNaN( value ) ) { // newWidth > maxWidth if ( maxWidth > 0 && value > maxWidth ) { value = maxWidth; newHeight = Math.round( height * ( value / width ) ); dialog.setValueOf( 'tab1', 'height', newHeight ); } dialog.setValueOf( 'tab1', 'width', value ); } } else //this.id = txtWidth. { if ( value && value != '0' ) value = Math.round( height * ( value / width ) ); if ( !isNaN( value ) ) { // newHeight > maxHeight if ( maxHeight > 0 && value > maxHeight ) { value = maxHeight; newWidth = Math.round( width * ( value / height ) ); dialog.setValueOf( 'tab1', 'width', newWidth ); } dialog.setValueOf( 'tab1', 'height', value ); } } } updateFileName( dialog ); }; var resetSize = function( dialog ) { if ( imageDimension.width && imageDimension.height ) { dialog.setValueOf( 'tab1', 'width', imageDimension.width ); dialog.setValueOf( 'tab1', 'height', imageDimension.height ); updateFileName( dialog ); } }; var switchLockRatio = function( dialog, value ) { var doc = dialog.getElement().getDocument(), ratioButton = doc.getById( 'btnLockSizes' ); if ( imageDimension.width && imageDimension.height ) { if ( value == 'check' ) // Check image ratio and original image ratio. { var width = dialog.getValueOf( 'tab1', 'width' ), height = dialog.getValueOf( 'tab1', 'height' ), originalRatio = imageDimension.width * 1000 / imageDimension.height, thisRatio = width * 1000 / height; dialog.lockRatio = false; // Default: unlock ratio if ( !width && !height ) dialog.lockRatio = true; // If someone didn't start typing, lock ratio. else if ( !isNaN( originalRatio ) && !isNaN( thisRatio ) ) { if ( Math.round( originalRatio ) == Math.round( thisRatio ) ) dialog.lockRatio = true; } } else if ( value != undefined ) dialog.lockRatio = value; else dialog.lockRatio = !dialog.lockRatio; } else if ( value != 'check' ) // I can't lock ratio if ratio is unknown. dialog.lockRatio = false; if ( dialog.lockRatio ) ratioButton.removeClass( 'ckf_btn_unlocked' ); else ratioButton.addClass( 'ckf_btn_unlocked' ); return dialog.lockRatio; }; CKFinder.dialog.add( 'resizeDialog', function( api ) { return { title : api.lang.Imageresize.dialogTitle.replace( '%s', api.getSelectedFile().name ), // TODO resizable : CKFINDER.DIALOG_RESIZE_BOTH minWidth : 390, minHeight : 230, onShow : function() { var dialog = this, thumbSmall = CKFinder.config.imageresize_thumbSmall, thumbMedium = CKFinder.config.imageresize_thumbMedium, thumbLarge = CKFinder.config.imageresize_thumbLarge; doc = dialog.getElement().getDocument(); file = api.getSelectedFile(); this.setTitle( api.lang.Imageresize.dialogTitle.replace( '%s', file.name ) ); var previewImg = doc.getById('previewImage'); var sizeSpan = doc.getById('imageSize'); previewImg.setAttribute('src', file.getThumbnailUrl( true )); var updateImgDimension = function( width, height ) { if ( !width || !height ) { sizeSpan.setText( '' ); return; } imageDimension.width = width; imageDimension.height = height; sizeSpan.setText( width + " x " + height + " px" ); CKFinder.tools.setTimeout( function(){ switchLockRatio( dialog, 'check' ); }, 0, dialog ); }; api.connector.sendCommand( "ImageResizeInfo", { fileName : file.name }, function( xml ) { if ( xml.checkError() ) return; var width = xml.selectSingleNode( 'Connector/ImageInfo/@width' ), height = xml.selectSingleNode( 'Connector/ImageInfo/@height' ); if ( width && height ) { width = parseInt( width.value, 10 ); height = parseInt( height.value, 10 ); updateImgDimension( width, height ); var checkThumbs = function( id, size ) { if ( !size ) return; var reThumb = /^(\d+)x(\d+)$/; result = reThumb.exec( size ); var el = dialog.getContentElement( 'tab1', id ); if ( 0 + result[1] > width && 0 + result[2] > height ) { el.disable(); el.getElement().setAttribute('title', api.lang.Imageresize.imageSmall).addClass('cke_disabled'); } else { el.enable(); el.getElement().setAttribute('title', '').removeClass('cke_disabled'); } }; checkThumbs('smallThumb', thumbSmall ); checkThumbs('mediumThumb', thumbMedium ); checkThumbs('largeThumb', thumbLarge ); } }, file.folder.type, file.folder ); if ( !thumbSmall ) dialog.getContentElement('tab1', 'smallThumb').getElement().hide(); if ( !thumbMedium ) dialog.getContentElement('tab1', 'mediumThumb').getElement().hide(); if ( !thumbLarge ) dialog.getContentElement('tab1', 'largeThumb').getElement().hide(); if ( !thumbSmall && !thumbMedium && !thumbLarge ) dialog.getContentElement('tab1', 'thumbsLabel').getElement().hide(); dialog.setValueOf( 'tab1', 'fileName', file.name ); dialog.getContentElement('tab1', 'width').focus(); dialog.getContentElement('tab1', 'fileName').setValue(''); dialog.getContentElement('tab1', 'createNewBox').getElement().hide(); updateImgDimension( 0,0 ); }, onOk : function() { var dialog = this, width = dialog.getValueOf( 'tab1', 'width' ), height = dialog.getValueOf( 'tab1', 'height' ), small = dialog.getValueOf( 'tab1', 'smallThumb' ), medium = dialog.getValueOf( 'tab1', 'mediumThumb' ), large = dialog.getValueOf( 'tab1', 'largeThumb' ), fileName = dialog.getValueOf( 'tab1', 'fileName' ), createNew = dialog.getValueOf( 'tab1', 'createNew' ); if ( width && !height ) { api.openMsgDialog( '', api.lang.Imageresize.invalidHeight ); return false; } else if ( !width && height ) { api.openMsgDialog( '', api.lang.Imageresize.invalidWidth ); return false; } if ( !api.config.imageresize_allowEnlarging && ( parseInt( width, 10 ) > imageDimension.width || parseInt( height, 10 ) > imageDimension.height ) ) { var str = api.lang.Imageresize.sizeTooBig; api.openMsgDialog( '', str.replace( "%size", imageDimension.width + "x" + imageDimension.height ) ); return false; } if ( ( width && height ) || small || medium || large ) { if ( !createNew ) fileName = file.name; api.connector.sendCommandPost( "ImageResize", null, { width : width, height : height, fileName : file.name, newFileName : fileName, overwrite : createNew ? 0 : 1, small : small ? 1 : 0, medium : medium ? 1 : 0, large : large ? 1 : 0 }, function( xml ) { if ( xml.checkError() ) return; api.openMsgDialog( '', api.lang.Imageresize.resizeSuccess ); api.refreshOpenedFolder(); }, file.folder.type, file.folder ); } return undefined; }, contents : [ { id : 'tab1', label : '', title : '', expand : true, padding : 0, elements : [ { type : 'hbox', widths : [ '180px', '280px' ], children: [ { type : 'vbox', children: [ { type : 'html', html : '' + '<style type="text/css">' + 'a.ckf_btn_reset' + '{' + 'float: right;' + 'background-position: 0 -32px;' + 'background-image: url("' + CKFinder.getPluginPath('imageresize') + 'images/mini.gif");' + 'width: 16px;' + 'height: 16px;' + 'background-repeat: no-repeat;' + 'border: 1px none;' + 'font-size: 1px;' + '}' + 'a.ckf_btn_locked,' + 'a.ckf_btn_unlocked' + '{' + 'float: left;' + 'background-position: 0 0;' + 'background-image: url("' + CKFinder.getPluginPath('imageresize') + 'images/mini.gif");' + 'width: 16px;' + 'height: 16px;' + 'background-repeat: no-repeat;' + 'border: none 1px;' + 'font-size: 1px;' + '}' + 'a.ckf_btn_unlocked' + '{' + 'background-position: 0 -16px;' + 'background-image: url("' + CKFinder.getPluginPath('imageresize') + '/images/mini.gif");' + '}' + '.ckf_btn_over' + '{' + 'border: outset 1px;' + 'cursor: pointer;' + 'cursor: hand;' + '}' + '</style>' + '<div style="height:100px;padding:7px">' + '<img id="previewImage" src="" style="margin-bottom:4px;" /><br />' + '<span style="font-size:9px;" id="imageSize"></span>' + '</div>' }, { type : 'html', id : 'thumbsLabel', html : '<strong>' + api.lang.Imageresize.thumbnailNew + '</strong>' }, { type : 'checkbox', id : 'smallThumb', checked : false, label : api.lang.Imageresize.thumbnailSmall.replace( '%s', CKFinder.config.imageresize_thumbSmall ) }, { type : 'checkbox', id : 'mediumThumb', checked : false, label : api.lang.Imageresize.thumbnailMedium.replace( '%s', CKFinder.config.imageresize_thumbMedium ) }, { type : 'checkbox', id : 'largeThumb', checked : false, label : api.lang.Imageresize.thumbnailLarge.replace( '%s', CKFinder.config.imageresize_thumbLarge ) } ] }, { type : 'vbox', children : [ { type : 'html', html : '<strong>' + api.lang.Imageresize.newSize + '</strong>' }, { type : 'hbox', widths : [ '80%', '20%' ], children: [ { type : 'vbox', children: [ { type : 'text', labelLayout : 'horizontal', label : api.lang.Imageresize.width, onKeyUp : onSizeChange, validate: function() { var value = this.getValue(); if ( value ) { var aMatch = value.match( regexGetSize ); if ( !aMatch || parseInt( aMatch[1], 10 ) < 1 ) { api.openMsgDialog( '', api.lang.Imageresize.invalidWidth ); return false; } } return true; }, id : 'width' }, { type : 'text', labelLayout : 'horizontal', label : api.lang.Imageresize.height, onKeyUp : onSizeChange, validate: function() { var value = this.getValue(); if ( value ) { var aMatch = value.match( regexGetSize ); if ( !aMatch || parseInt( aMatch[1], 10 ) < 1 ) { api.openMsgDialog( '', api.lang.Imageresize.invalidHeight ); return false; } } return true; }, id : 'height' } ] }, { type : 'html', onLoad : function() { var doc = this.getElement().getDocument(), dialog = this.getDialog(); // Activate Reset button var resetButton = doc.getById( 'btnResetSize' ), ratioButton = doc.getById( 'btnLockSizes' ); if ( resetButton ) { resetButton.on( 'click', function(evt) { resetSize( this ); evt.data.preventDefault(); }, dialog ); resetButton.on( 'mouseover', function() { this.addClass( 'ckf_btn_over' ); }, resetButton ); resetButton.on( 'mouseout', function() { this.removeClass( 'ckf_btn_over' ); }, resetButton ); } // Activate (Un)LockRatio button if ( ratioButton ) { ratioButton.on( 'click', function(evt) { var locked = switchLockRatio( this ), width = this.getValueOf( 'tab1', 'width' ); if ( imageDimension.width && width ) { var height = imageDimension.height / imageDimension.width * width; if ( !isNaN( height ) ) { this.setValueOf( 'tab1', 'height', Math.round( height ) ); updateFileName( dialog ); } } evt.data.preventDefault(); }, dialog ); ratioButton.on( 'mouseover', function() { this.addClass( 'ckf_btn_over' ); }, ratioButton ); ratioButton.on( 'mouseout', function() { this.removeClass( 'ckf_btn_over' ); }, ratioButton ); } }, html : '<div style="margin-top:4px">'+ '<a href="javascript:void(0)" tabindex="-1" title="Lock ration" class="ckf_btn_locked ckf_btn_unlocked" id="btnLockSizes"></a>' + '<a href="javascript:void(0)" tabindex="-1" title="Reset size" class="ckf_btn_reset" id="btnResetSize"></a>'+ '</div>' } ] }, { type : 'vbox', id : 'createNewBox', hidden : true, children: [ { type : 'checkbox', checked : true, id : 'createNew', label : api.lang.Imageresize.newImage, 'default' : true, onChange : function() { var dialog = this.getDialog(); var filenameInput = dialog.getContentElement('tab1', 'fileName'); if ( filenameInput ) { if (!this.getValue()) filenameInput.getElement().hide(); else filenameInput.getElement().show(); } } }, { type : 'text', label : '', validate : function() { var dialog = this.getDialog(), createNew = dialog.getContentElement('tab1', 'createNew'), value = this.getValue(), matches = value.match( regexExt ); if ( createNew && dialog.getValueOf( 'tab1', 'width' ) && dialog.getValueOf( 'tab1', 'height' ) ) { if ( !value || !matches ) { api.openMsgDialog( '', api.lang.Imageresize.invalidName ); return false; } if ( file.ext != matches[2] ) { api.openMsgDialog( '', api.lang.Imageresize.noExtensionChange ); return false; } } return true; }, id : 'fileName' } ] } ] } ] } ] } ], // TODO http://dev.fckeditor.net/ticket/4750 buttons : [ CKFinder.dialog.okButton, CKFinder.dialog.cancelButton ] }; } ); api.addFileContextMenuOption( { label : api.lang.Imageresize.contextMenuName, command : "resizeImage" } , function( api, file ) { api.openDialog( 'resizeDialog' ); }, function ( file ) { // Disable for files other than images. if ( !file.isImage() || !api.getSelectedFolder().type ) return false; if ( file.folder.acl.fileDelete && file.folder.acl.fileUpload ) return true; else return -1; }); } } );
JavaScript
/* Demonstration of embedding CodeMirror in a bigger application. The * interface defined here is a mess of prompts and confirms, and * should probably not be used in a real project. */ function MirrorFrame(place, options) { this.home = document.createElement("div"); if (place.appendChild) place.appendChild(this.home); else place(this.home); var self = this; function makeButton(name, action) { var button = document.createElement("input"); button.type = "button"; button.value = name; self.home.appendChild(button); button.onclick = function(){self[action].call(self);}; } makeButton("Search", "search"); makeButton("Replace", "replace"); makeButton("Current line", "line"); makeButton("Jump to line", "jump"); makeButton("Insert constructor", "macro"); makeButton("Indent all", "reindent"); this.mirror = new CodeMirror(this.home, options); } MirrorFrame.prototype = { search: function() { var text = prompt("Enter search term:", ""); if (!text) return; var first = true; do { var cursor = this.mirror.getSearchCursor(text, first); first = false; while (cursor.findNext()) { cursor.select(); if (!confirm("Search again?")) return; } } while (confirm("End of document reached. Start over?")); }, replace: function() { // This is a replace-all, but it is possible to implement a // prompting replace. var from = prompt("Enter search string:", ""), to; if (from) to = prompt("What should it be replaced with?", ""); if (to == null) return; var cursor = this.mirror.getSearchCursor(from, false); while (cursor.findNext()) cursor.replace(to); }, jump: function() { var line = prompt("Jump to line:", ""); if (line && !isNaN(Number(line))) this.mirror.jumpToLine(Number(line)); }, line: function() { alert("The cursor is currently at line " + this.mirror.currentLine()); this.mirror.focus(); }, macro: function() { var name = prompt("Name your constructor:", ""); if (name) this.mirror.replaceSelection("function " + name + "() {\n \n}\n\n" + name + ".prototype = {\n \n};\n"); }, reindent: function() { this.mirror.reindent(); } };
JavaScript
var HTMLMixedParser = Editor.Parser = (function() { // tags that trigger seperate parsers var triggers = { "script": "JSParser", "style": "CSSParser" }; function checkDependencies() { var parsers = ['XMLParser']; for (var p in triggers) parsers.push(triggers[p]); for (var i in parsers) { if (!window[parsers[i]]) throw new Error(parsers[i] + " parser must be loaded for HTML mixed mode to work."); } XMLParser.configure({useHTMLKludges: true}); } function parseMixed(stream) { checkDependencies(); var htmlParser = XMLParser.make(stream), localParser = null, inTag = false; var iter = {next: top, copy: copy}; function top() { var token = htmlParser.next(); if (token.content == "<") inTag = true; else if (token.style == "xml-tagname" && inTag === true) inTag = token.content.toLowerCase(); else if (token.content == ">") { if (triggers[inTag]) { var parser = window[triggers[inTag]]; iter.next = local(parser, "</" + inTag); } inTag = false; } return token; } function local(parser, tag) { var baseIndent = htmlParser.indentation(); localParser = parser.make(stream, baseIndent + indentUnit); return function() { if (stream.lookAhead(tag, false, false, true)) { localParser = null; iter.next = top; return top(); } var token = localParser.next(); var lt = token.value.lastIndexOf("<"), sz = Math.min(token.value.length - lt, tag.length); if (lt != -1 && token.value.slice(lt, lt + sz).toLowerCase() == tag.slice(0, sz) && stream.lookAhead(tag.slice(sz), false, false, true)) { stream.push(token.value.slice(lt)); token.value = token.value.slice(0, lt); } if (token.indentation) { var oldIndent = token.indentation; token.indentation = function(chars) { if (chars == "</") return baseIndent; else return oldIndent(chars); }; } return token; }; } function copy() { var _html = htmlParser.copy(), _local = localParser && localParser.copy(), _next = iter.next, _inTag = inTag; return function(_stream) { stream = _stream; htmlParser = _html(_stream); localParser = _local && _local(_stream); iter.next = _next; inTag = _inTag; return iter; }; } return iter; } return { make: parseMixed, electricChars: "{}/:", configure: function(obj) { if (obj.triggers) triggers = obj.triggers; } }; })();
JavaScript
/* Simple parser for CSS */ var CSSParser = Editor.Parser = (function() { var tokenizeCSS = (function() { function normal(source, setState) { var ch = source.next(); if (ch == "@") { source.nextWhileMatches(/\w/); return "css-at"; } else if (ch == "/" && source.equals("*")) { setState(inCComment); return null; } else if (ch == "<" && source.equals("!")) { setState(inSGMLComment); return null; } else if (ch == "=") { return "css-compare"; } else if (source.equals("=") && (ch == "~" || ch == "|")) { source.next(); return "css-compare"; } else if (ch == "\"" || ch == "'") { setState(inString(ch)); return null; } else if (ch == "#") { source.nextWhileMatches(/\w/); return "css-hash"; } else if (ch == "!") { source.nextWhileMatches(/[ \t]/); source.nextWhileMatches(/\w/); return "css-important"; } else if (/\d/.test(ch)) { source.nextWhileMatches(/[\w.%]/); return "css-unit"; } else if (/[,.+>*\/]/.test(ch)) { return "css-select-op"; } else if (/[;{}:\[\]]/.test(ch)) { return "css-punctuation"; } else { source.nextWhileMatches(/[\w\\\-_]/); return "css-identifier"; } } function inCComment(source, setState) { var maybeEnd = false; while (!source.endOfLine()) { var ch = source.next(); if (maybeEnd && ch == "/") { setState(normal); break; } maybeEnd = (ch == "*"); } return "css-comment"; } function inSGMLComment(source, setState) { var dashes = 0; while (!source.endOfLine()) { var ch = source.next(); if (dashes >= 2 && ch == ">") { setState(normal); break; } dashes = (ch == "-") ? dashes + 1 : 0; } return "css-comment"; } function inString(quote) { return function(source, setState) { var escaped = false; while (!source.endOfLine()) { var ch = source.next(); if (ch == quote && !escaped) break; escaped = !escaped && ch == "\\"; } if (!escaped) setState(normal); return "css-string"; }; } return function(source, startState) { return tokenizer(source, startState || normal); }; })(); function indentCSS(inBraces, inRule, base) { return function(nextChars) { if (!inBraces || /^\}/.test(nextChars)) return base; else if (inRule) return base + indentUnit * 2; else return base + indentUnit; }; } // This is a very simplistic parser -- since CSS does not really // nest, it works acceptably well, but some nicer colouroing could // be provided with a more complicated parser. function parseCSS(source, basecolumn) { basecolumn = basecolumn || 0; var tokens = tokenizeCSS(source); var inBraces = false, inRule = false, inDecl = false;; var iter = { next: function() { var token = tokens.next(), style = token.style, content = token.content; if (style == "css-hash") style = token.style = inRule ? "css-colorcode" : "css-identifier"; if (style == "css-identifier") { if (inRule) token.style = "css-value"; else if (!inBraces && !inDecl) token.style = "css-selector"; } if (content == "\n") token.indentation = indentCSS(inBraces, inRule, basecolumn); if (content == "{" && inDecl == "@media") inDecl = false; else if (content == "{") inBraces = true; else if (content == "}") inBraces = inRule = inDecl = false; else if (content == ";") inRule = inDecl = false; else if (inBraces && style != "css-comment" && style != "whitespace") inRule = true; else if (!inBraces && style == "css-at") inDecl = content; return token; }, copy: function() { var _inBraces = inBraces, _inRule = inRule, _tokenState = tokens.state; return function(source) { tokens = tokenizeCSS(source, _tokenState); inBraces = _inBraces; inRule = _inRule; return iter; }; } }; return iter; } return {make: parseCSS, electricChars: "}"}; })();
JavaScript
/* Functionality for finding, storing, and restoring selections * * This does not provide a generic API, just the minimal functionality * required by the CodeMirror system. */ // Namespace object. var select = {}; (function() { select.ie_selection = document.selection && document.selection.createRangeCollection; // Find the 'top-level' (defined as 'a direct child of the node // passed as the top argument') node that the given node is // contained in. Return null if the given node is not inside the top // node. function topLevelNodeAt(node, top) { while (node && node.parentNode != top) node = node.parentNode; return node; } // Find the top-level node that contains the node before this one. function topLevelNodeBefore(node, top) { while (!node.previousSibling && node.parentNode != top) node = node.parentNode; return topLevelNodeAt(node.previousSibling, top); } var fourSpaces = "\u00a0\u00a0\u00a0\u00a0"; select.scrollToNode = function(node, cursor) { if (!node) return; var element = node, body = document.body, html = document.documentElement, atEnd = !element.nextSibling || !element.nextSibling.nextSibling || !element.nextSibling.nextSibling.nextSibling; // In Opera (and recent Webkit versions), BR elements *always* // have a offsetTop property of zero. var compensateHack = 0; while (element && !element.offsetTop) { compensateHack++; element = element.previousSibling; } // atEnd is another kludge for these browsers -- if the cursor is // at the end of the document, and the node doesn't have an // offset, just scroll to the end. if (compensateHack == 0) atEnd = false; // WebKit has a bad habit of (sometimes) happily returning bogus // offsets when the document has just been changed. This seems to // always be 5/5, so we don't use those. if (webkit && element && element.offsetTop == 5 && element.offsetLeft == 5) return; var y = compensateHack * (element ? element.offsetHeight : 0), x = 0, width = (node ? node.offsetWidth : 0), pos = element; while (pos && pos.offsetParent) { y += pos.offsetTop; // Don't count X offset for <br> nodes if (!isBR(pos)) x += pos.offsetLeft; pos = pos.offsetParent; } var scroll_x = body.scrollLeft || html.scrollLeft || 0, scroll_y = body.scrollTop || html.scrollTop || 0, scroll = false, screen_width = window.innerWidth || html.clientWidth || 0; if (cursor || width < screen_width) { if (cursor) { var off = select.offsetInNode(node), size = nodeText(node).length; if (size) x += width *
JavaScript
/* A few useful utility functions. */ // Capture a method on an object. function method(obj, name) { return function() {obj[name].apply(obj, arguments);}; } // The value used to signal the end of a sequence in iterators. var StopIteration = {toString: function() {return "StopIteration"}}; // Apply a function to each element in a sequence. function forEach(iter, f) { if (iter.next) { try {while (true) f(iter.next());} catch (e) {if (e != StopIteration) throw e;} } else { for (var i = 0; i < iter.length; i++) f(iter[i]); } } // Map a function over a sequence, producing an array of results. function map(iter, f) { var accum = []; forEach(iter, function(val) {accum.push(f(val));}); return accum; } // Create a predicate function that tests a string againsts a given // regular expression. No longer used but might be used by 3rd party // parsers. function matcher(regexp){ return function(value){return regexp.test(value);}; } // Test whether a DOM node has a certain CSS class. function hasClass(element, className) { var classes = element.className; return classes && new RegExp("(^| )" + className + "($| )").test(classes); } function removeClass(element, className) { element.className = element.className.replace(new RegExp(" " + className + "\\b", "g"), ""); return element; } // Insert a DOM node after another node. function insertAfter(newNode, oldNode) { var parent = oldNode.parentNode; parent.insertBefore(newNode, oldNode.nextSibling); return newNode; } function removeElement(node) { if (node.parentNode) node.parentNode.removeChild(node); } function clearElement(node) { while (node.firstChild) node.removeChild(node.firstChild); } // Check whether a node is contained in another one. function isAncestor(node, child) { while (child = child.parentNode) { if (node == child) return true; } return false; } // The non-breaking space character. var nbsp = "\u00a0"; var matching = {"{": "}", "[": "]", "(": ")", "}": "{", "]": "[", ")": "("}; // Standardize a few unportable event properties. function normalizeEvent(event) { if (!event.stopPropagation) { event.stopPropagation = function() {this.cancelBubble = true;}; event.preventDefault = function() {this.returnValue = false;}; } if (!event.stop) { event.stop = function() { this.stopPropagation(); this.preventDefault(); }; } if (event.type == "keypress") { event.code = (event.charCode == null) ? event.keyCode : event.charCode; event.character = String.fromCharCode(event.code); } return event; } // Portably register event handlers. function addEventHandler(node, type, handler, removeFunc) { function wrapHandler(event) { handler(normalizeEvent(event || window.event)); } if (typeof node.addEventListener == "function") { node.addEventListener(type, wrapHandler, false); if (removeFunc) return function() {node.removeEventListener(type, wrapHandler, false);}; } else { node.attachEvent("on" + type, wrapHandler); if (removeFunc) return function() {node.detachEvent("on" + type, wrapHandler);}; } } function nodeText(node) { return node.textContent || node.innerText || node.nodeValue || ""; } function nodeTop(node) { var top = 0; while (node.offsetParent) { top += node.offsetTop; node = node.offsetParent; } return top; } function isBR(node) { var nn = node.nodeName; return nn == "BR" || nn == "br"; } function isSpan(node) { var nn = node.nodeName; return nn == "SPAN" || nn == "span"; }
JavaScript
var SparqlParser = Editor.Parser = (function() { function wordRegexp(words) { return new RegExp("^(?:" + words.join("|") + ")$", "i"); } var ops = wordRegexp(["str", "lang", "langmatches", "datatype", "bound", "sameterm", "isiri", "isuri", "isblank", "isliteral", "union", "a"]); var keywords = wordRegexp(["base", "prefix", "select", "distinct", "reduced", "construct", "describe", "ask", "from", "named", "where", "order", "limit", "offset", "filter", "optional", "graph", "by", "asc", "desc"]); var operatorChars = /[*+\-<>=&|]/; var tokenizeSparql = (function() { function normal(source, setState) { var ch = source.next(); if (ch == "$" || ch == "?") { source.nextWhileMatches(/[\w\d]/); return "sp-var"; } else if (ch == "<" && !source.matches(/[\s\u00a0=]/)) { source.nextWhileMatches(/[^\s\u00a0>]/); if (source.equals(">")) source.next(); return "sp-uri"; } else if (ch == "\"" || ch == "'") { setState(inLiteral(ch)); return null; } else if (/[{}\(\),\.;\[\]]/.test(ch)) { return "sp-punc"; } else if (ch == "#") { while (!source.endOfLine()) source.next(); return "sp-comment"; } else if (operatorChars.test(ch)) { source.nextWhileMatches(operatorChars); return "sp-operator"; } else if (ch == ":") { source.nextWhileMatches(/[\w\d\._\-]/); return "sp-prefixed"; } else { source.nextWhileMatches(/[_\w\d]/); if (source.equals(":")) { source.next(); source.nextWhileMatches(/[\w\d_\-]/); return "sp-prefixed"; } var word = source.get(), type; if (ops.test(word)) type = "sp-operator"; else if (keywords.test(word)) type = "sp-keyword"; else type = "sp-word"; return {style: type, content: word}; } } function inLiteral(quote) { return function(source, setState) { var escaped = false; while (!source.endOfLine()) { var ch = source.next(); if (ch == quote && !escaped) { setState(normal); break; } escaped = !escaped && ch == "\\"; } return "sp-literal"; }; } return function(source, startState) { return tokenizer(source, startState || normal); }; })(); function indentSparql(context) { return function(nextChars) { var firstChar = nextChars && nextChars.charAt(0); if (/[\]\}]/.test(firstChar)) while (context && context.type == "pattern") context = context.prev; var closing = context && firstChar == matching[context.type]; if (!context) return 0; else if (context.type == "pattern") return context.col; else if (context.align) return context.col - (closing ? context.width : 0); else return context.indent + (closing ? 0 : indentUnit); } } function parseSparql(source) { var tokens = tokenizeSparql(source); var context = null, indent = 0, col = 0; function pushContext(type, width) { context = {prev: context, indent: indent, col: col, type: type, width: width}; } function popContext() { context = context.prev; } var iter = { next: function() { var token = tokens.next(), type = token.style, content = token.content, width = token.value.length; if (content == "\n") { token.indentation = indentSparql(context); indent = col = 0; if (context && context.align == null) context.align = false; } else if (type == "whitespace" && col == 0) { indent = width; } else if (type != "sp-comment" && context && context.align == null) { context.align = true; } if (content != "\n") col += width; if (/[\[\{\(]/.test(content)) { pushContext(content, width); } else if (/[\]\}\)]/.test(content)) { while (context && context.type == "pattern") popContext(); if (context && content == matching[context.type]) popContext(); } else if (content == "." && context && context.type == "pattern") { popContext(); } else if ((type == "sp-word" || type == "sp-prefixed" || type == "sp-uri" || type == "sp-var" || type == "sp-literal") && context && /[\{\[]/.test(context.type)) { pushContext("pattern", width); } return token; }, copy: function() { var _context = context, _indent = indent, _col = col, _tokenState = tokens.state; return function(source) { tokens = tokenizeSparql(source, _tokenState); context = _context; indent = _indent; col = _col; return iter; }; } }; return iter; } return {make: parseSparql, electricChars: "}]"}; })();
JavaScript
/* This file defines an XML parser, with a few kludges to make it * useable for HTML. autoSelfClosers defines a set of tag names that * are expected to not have a closing tag, and doNotIndent specifies * the tags inside of which no indentation should happen (see Config * object). These can be disabled by passing the editor an object like * {useHTMLKludges: false} as parserConfig option. */ var XMLParser = Editor.Parser = (function() { var Kludges = { autoSelfClosers: {"br": true, "img": true, "hr": true, "link": true, "input": true, "meta": true, "col": true, "frame": true, "base": true, "area": true}, doNotIndent: {"pre": true, "!cdata": true} }; var NoKludges = {autoSelfClosers: {}, doNotIndent: {"!cdata": true}}; var UseKludges = Kludges; var alignCDATA = false; // Simple stateful tokenizer for XML documents. Returns a // MochiKit-style iterator, with a state property that contains a // function encapsulating the current state. See tokenize.js. var tokenizeXML = (function() { function inText(source, setState) { var ch = source.next(); if (ch == "<") { if (source.equals("!")) { source.next(); if (source.equals("[")) { if (source.lookAhead("[CDATA[", true)) { setState(inBlock("xml-cdata", "]]>")); return null; } else { return "xml-text"; } } else if (source.lookAhead("--", true)) { setState(inBlock("xml-comment", "-->")); return null; } else if (source.lookAhead("DOCTYPE", true)) { source.nextWhileMatches(/[\w\._\-]/); setState(inBlock("xml-doctype", ">")); return "xml-doctype"; } else { return "xml-text"; } } else if (source.equals("?")) { source.next(); source.nextWhileMatches(/[\w\._\-]/); setState(inBlock("xml-processing", "?>")); return "xml-processing"; } else { if (source.equals("/")) source.next(); setState(inTag); return "xml-punctuation"; } } else if (ch == "&") { while (!source.endOfLine()) { if (source.next() == ";") break; } return "xml-entity"; } else { source.nextWhileMatches(/[^&<\n]/); return "xml-text"; } } function inTag(source, setState) { var ch = source.next(); if (ch == ">") { setState(inText); return "xml-punctuation"; } else if (/[?\/]/.test(ch) && source.equals(">")) { source.next(); setState(inText); return "xml-punctuation"; } else if (ch == "=") { return "xml-punctuation"; } else if (/[\'\"]/.test(ch)) { setState(inAttribute(ch)); return null; } else { source.nextWhileMatches(/[^\s\u00a0=<>\"\'\/?]/); return "xml-name"; } } function inAttribute(quote) { return function(source, setState) { while (!source.endOfLine()) { if (source.next() == quote) { setState(inTag); break; } } return "xml-attribute"; }; } function inBlock(style, terminator) { return function(source, setState) { while (!source.endOfLine()) { if (source.lookAhead(terminator, true)) { setState(inText); break; } source.next(); } return style; }; } return function(source, startState) { return tokenizer(source, startState || inText); }; })(); // The parser. The structure of this function largely follows that of // parseJavaScript in parsejavascript.js (there is actually a bit more // shared code than I'd like), but it is quite a bit simpler. function parseXML(source) { var tokens = tokenizeXML(source), token; var cc = [base]; var tokenNr = 0, indented = 0; var currentTag = null, context = null; var consume; function push(fs) { for (var i = fs.length - 1; i >= 0; i--) cc.push(fs[i]); } function cont() { push(arguments); consume = true; } function pass() { push(arguments); consume = false; } function markErr() { token.style += " xml-error"; } function expect(text) { return function(style, content) { if (content == text) cont(); else {markErr(); cont(arguments.callee);} }; } function pushContext(tagname, startOfLine) { var noIndent = UseKludges.doNotIndent.hasOwnProperty(tagname) || (context && context.noIndent); context = {prev: context, name: tagname, indent: indented, startOfLine: startOfLine, noIndent: noIndent}; } function popContext() { context = context.prev; } function computeIndentation(baseContext) { return function(nextChars, current) { var context = baseContext; if (context && context.noIndent) return current; if (alignCDATA && /<!\[CDATA\[/.test(nextChars)) return 0; if (context && /^<\//.test(nextChars)) context = context.prev; while (context && !context.startOfLine) context = context.prev; if (context) return context.indent + indentUnit; else return 0; }; } function base() { return pass(element, base); } var harmlessTokens = {"xml-text": true, "xml-entity": true, "xml-comment": true, "xml-processing": true, "xml-doctype": true}; function element(style, content) { if (content == "<") cont(tagname, attributes, endtag(tokenNr == 1)); else if (content == "</") cont(closetagname, expect(">")); else if (style == "xml-cdata") { if (!context || context.name != "!cdata") pushContext("!cdata"); if (/\]\]>$/.test(content)) popContext(); cont(); } else if (harmlessTokens.hasOwnProperty(style)) cont(); else {markErr(); cont();} } function tagname(style, content) { if (style == "xml-name") { currentTag = content.toLowerCase(); token.style = "xml-tagname"; cont(); } else { currentTag = null; pass(); } } function closetagname(style, content) { if (style == "xml-name") { token.style = "xml-tagname"; if (context && content.toLowerCase() == context.name) popContext(); else markErr(); } cont(); } function endtag(startOfLine) { return function(style, content) { if (content == "/>" || (content == ">" && UseKludges.autoSelfClosers.hasOwnProperty(currentTag))) cont(); else if (content == ">") {pushContext(currentTag, startOfLine); cont();} else {markErr(); cont(arguments.callee);} }; } function attributes(style) { if (style == "xml-name") {token.style = "xml-attname"; cont(attribute, attributes);} else pass(); } function attribute(style, content) { if (content == "=") cont(value); else if (content == ">" || content == "/>") pass(endtag); else pass(); } function value(style) { if (style == "xml-attribute") cont(value); else pass(); } return { indentation: function() {return indented;}, next: function(){ token = tokens.next(); if (token.style == "whitespace" && tokenNr == 0) indented = token.value.length; else tokenNr++; if (token.content == "\n") { indented = tokenNr = 0; token.indentation = computeIndentation(context); } if (token.style == "whitespace" || token.type == "xml-comment") return token; while(true){ consume = false; cc.pop()(token.style, token.content); if (consume) return token; } }, copy: function(){ var _cc = cc.concat([]), _tokenState = tokens.state, _context = context; var parser = this; return function(input){ cc = _cc.concat([]); tokenNr = indented = 0; context = _context; tokens = tokenizeXML(input, _tokenState); return parser; }; } }; } return { make: parseXML, electricChars: "/", configure: function(config) { if (config.useHTMLKludges != null) UseKludges = config.useHTMLKludges ? Kludges : NoKludges; if (config.alignCDATA) alignCDATA = config.alignCDATA; } }; })();
JavaScript
/* Tokenizer for JavaScript code */ var tokenizeJavaScript = (function() { // Advance the stream until the given character (not preceded by a // backslash) is encountered, or the end of the line is reached. function nextUntilUnescaped(source, end) { var escaped = false; while (!source.endOfLine()) { var next = source.next(); if (next == end && !escaped) return false; escaped = !escaped && next == "\\"; } return escaped; } // A map of JavaScript's keywords. The a/b/c keyword distinction is // very rough, but it gives the parser enough information to parse // correct code correctly (we don't care that much how we parse // incorrect code). The style information included in these objects // is used by the highlighter to pick the correct CSS style for a // token. var keywords = function(){ function result(type, style){ return {type: type, style: "js-" + style}; } // keywords that take a parenthised expression, and then a // statement (if) var keywordA = result("keyword a", "keyword"); // keywords that take just a statement (else) var keywordB = result("keyword b", "keyword"); // keywords that optionally take an expression, and form a // statement (return) var keywordC = result("keyword c", "keyword"); var operator = result("operator", "keyword"); var atom = result("atom", "atom"); return { "if": keywordA, "while": keywordA, "with": keywordA, "else": keywordB, "do": keywordB, "try": keywordB, "finally": keywordB, "return": keywordC, "break": keywordC, "continue": keywordC, "new": keywordC, "delete": keywordC, "throw": keywordC, "in": operator, "typeof": operator, "instanceof": operator, "var": result("var", "keyword"), "function": result("function", "keyword"), "catch": result("catch", "keyword"), "for": result("for", "keyword"), "switch": result("switch", "keyword"), "case": result("case", "keyword"), "default": result("default", "keyword"), "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom }; }(); // Some helper regexps var isOperatorChar = /[+\-*&%=<>!?|]/; var isHexDigit = /[0-9A-Fa-f]/; var isWordChar = /[\w\$_]/; // Wrapper around jsToken that helps maintain parser state (whether // we are inside of a multi-line comment and whether the next token // could be a regular expression). function jsTokenState(inside, regexp) { return function(source, setState) { var newInside = inside; var type = jsToken(inside, regexp, source, function(c) {newInside = c;}); var newRegexp = type.type == "operator" || type.type == "keyword c" || type.type.match(/^[\[{}\(,;:]$/); if (newRegexp != regexp || newInside != inside) setState(jsTokenState(newInside, newRegexp)); return type; }; } // The token reader, intended to be used by the tokenizer from // tokenize.js (through jsTokenState). Advances the source stream // over a token, and returns an object containing the type and style // of that token. function jsToken(inside, regexp, source, setInside) { function readHexNumber(){ source.next(); // skip the 'x' source.nextWhileMatches(isHexDigit); return {type: "number", style: "js-atom"}; } function readNumber() { source.nextWhileMatches(/[0-9]/); if (source.equals(".")){ source.next(); source.nextWhileMatches(/[0-9]/); } if (source.equals("e") || source.equals("E")){ source.next(); if (source.equals("-")) source.next(); source.nextWhileMatches(/[0-9]/); } return {type: "number", style: "js-atom"}; } // Read a word, look it up in keywords. If not found, it is a // variable, otherwise it is a keyword of the type found. function readWord() { source.nextWhileMatches(isWordChar); var word = source.get(); var known = keywords.hasOwnProperty(word) && keywords.propertyIsEnumerable(word) && keywords[word]; return known ? {type: known.type, style: known.style, content: word} : {type: "variable", style: "js-variable", content: word}; } function readRegexp() { nextUntilUnescaped(source, "/"); source.nextWhileMatches(/[gimy]/); // 'y' is "sticky" option in Mozilla return {type: "regexp", style: "js-string"}; } // Mutli-line comments are tricky. We want to return the newlines // embedded in them as regular newline tokens, and then continue // returning a comment token for every line of the comment. So // some state has to be saved (inside) to indicate whether we are // inside a /* */ sequence. function readMultilineComment(start){ var newInside = "/*"; var maybeEnd = (start == "*"); while (true) { if (source.endOfLine()) break; var next = source.next(); if (next == "/" && maybeEnd){ newInside = null; break; } maybeEnd = (next == "*"); } setInside(newInside); return {type: "comment", style: "js-comment"}; } function readOperator() { source.nextWhileMatches(isOperatorChar); return {type: "operator", style: "js-operator"}; } function readString(quote) { var endBackSlash = nextUntilUnescaped(source, quote); setInside(endBackSlash ? quote : null); return {type: "string", style: "js-string"}; } // Fetch the next token. Dispatches on first character in the // stream, or first two characters when the first is a slash. if (inside == "\"" || inside == "'") return readString(inside); var ch = source.next(); if (inside == "/*") return readMultilineComment(ch); else if (ch == "\"" || ch == "'") return readString(ch); // with punctuation, the type of the token is the symbol itself else if (/[\[\]{}\(\),;\:\.]/.test(ch)) return {type: ch, style: "js-punctuation"}; else if (ch == "0" && (source.equals("x") || source.equals("X"))) return readHexNumber(); else if (/[0-9]/.test(ch)) return readNumber(); else if (ch == "/"){ if (source.equals("*")) { source.next(); return readMultilineComment(ch); } else if (source.equals("/")) { nextUntilUnescaped(source, null); return {type: "comment", style: "js-comment"};} else if (regexp) return readRegexp(); else return readOperator(); } else if (isOperatorChar.test(ch)) return readOperator(); else return readWord(); } // The external interface to the tokenizer. return function(source, startState) { return tokenizer(source, startState || jsTokenState(false, true)); }; })();
JavaScript
// A framework for simple tokenizers. Takes care of newlines and // white-space, and of getting the text from the source stream into // the token object. A state is a function of two arguments -- a // string stream and a setState function. The second can be used to // change the tokenizer's state, and can be ignored for stateless // tokenizers. This function should advance the stream over a token // and return a string or object containing information about the next // token, or null to pass and have the (new) state be called to finish // the token. When a string is given, it is wrapped in a {style, type} // object. In the resulting object, the characters consumed are stored // under the content property. Any whitespace following them is also // automatically consumed, and added to the value property. (Thus, // content is the actual meaningful part of the token, while value // contains all the text it spans.) function tokenizer(source, state) { // Newlines are always a separate token. function isWhiteSpace(ch) { // The messy regexp is because IE's regexp matcher is of the // opinion that non-breaking spaces are no whitespace. return ch != "\n" && /^[\s\u00a0]*$/.test(ch); } var tokenizer = { state: state, take: function(type) { if (typeof(type) == "string") type = {style: type, type: type}; type.content = (type.content || "") + source.get(); if (!/\n$/.test(type.content)) source.nextWhile(isWhiteSpace); type.value = type.content + source.get(); return type; }, next: function () { if (!source.more()) throw StopIteration; var type; if (source.equals("\n")) { source.next(); return this.take("whitespace"); } if (source.applies(isWhiteSpace)) type = "whitespace"; else while (!type) type = this.state(source, function(s) {tokenizer.state = s;}); return this.take(type); } }; return tokenizer; }
JavaScript
/* CodeMirror main module (http://codemirror.net/) * * Implements the CodeMirror constructor and prototype, which take care * of initializing the editor frame, and providing the outside interface. */ // The CodeMirrorConfig object is used to specify a default // configuration. If you specify such an object before loading this // file, the values you put into it will override the defaults given // below. You can also assign to it after loading. var CodeMirrorConfig = window.CodeMirrorConfig || {}; var CodeMirror = (function(){ function setDefaults(object, defaults) { for (var option in defaults) { if (!object.hasOwnProperty(option)) object[option] = defaults[option]; } } function forEach(array, action) { for (var i = 0; i < array.length; i++) action(array[i]); } function createHTMLElement(el) { if (document.createElementNS && document.documentElement.namespaceURI !== null) return document.createElementNS("http://www.w3.org/1999/xhtml", el) else return document.createElement(el) } // These default options can be overridden by passing a set of // options to a specific CodeMirror constructor. See manual.html for // their meaning. setDefaults(CodeMirrorConfig, { stylesheet: [], path: "", parserfile: [], basefiles: ["util.js", "stringstream.js", "select.js", "undo.js", "editor.js", "tokenize.js"], iframeClass: null, passDelay: 200, passTime: 50, lineNumberDelay: 200, lineNumberTime: 50, continuousScanning: false, saveFunction: null, onLoad: null, onChange: null, undoDepth: 50, undoDelay: 800, disableSpellcheck: true, textWrapping: true, readOnly: false, width: "", height: "300px", minHeight: 100, autoMatchParens: false, markParen: null, unmarkParen: null, parserConfig: null, tabMode: "indent", // or "spaces", "default", "shift" enterMode: "indent", // or "keep", "flat" electricChars: true, reindentOnLoad: false, activeTokens: null, onCursorActivity: null, lineNumbers: false, firstLineNumber: 1, onLineNumberClick: null, indentUnit: 2, domain: null, noScriptCaching: false, incrementalLoading: false }); function addLineNumberDiv(container, firstNum) { var nums = createHTMLElement("div"), scroller = createHTMLElement("div"); nums.style.position = "absolute"; nums.style.height = "100%"; if (nums.style.setExpression) { try {nums.style.setExpression("height", "this.previousSibling.offsetHeight + 'px'");} catch(e) {} // Seems to throw 'Not Implemented' on some IE8 versions } nums.style.top = "0px"; nums.style.left = "0px"; nums.style.overflow = "hidden"; container.appendChild(nums); scroller.className = "CodeMirror-line-numbers"; nums.appendChild(scroller); scroller.innerHTML = "<div>" + firstNum + "</div>"; return nums; } function frameHTML(options) { if (typeof options.parserfile == "string") options.parserfile = [options.parserfile]; if (typeof options.basefiles == "string") options.basefiles = [options.basefiles]; if (typeof options.stylesheet == "string") options.stylesheet = [options.stylesheet]; var html = ["<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html><head>"]; // Hack to work around a bunch of IE8-specific problems. html.push("<meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\"/>"); var queryStr = options.noScriptCaching ? "?nocache=" + new Date().getTime().toString(16) : ""; forEach(options.stylesheet, function(file) { html.push("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + file + queryStr + "\"/>"); }); forEach(options.basefiles.concat(options.parserfile), function(file) { if (!/^https?:/.test(file)) file = options.path + file; html.push("<script type=\"text/javascript\" src=\"" + file + queryStr + "\"><" + "/script>"); }); html.push("</head><body style=\"border-width: 0;\" class=\"editbox\" spellcheck=\"" + (options.disableSpellcheck ? "false" : "true") + "\"></body></html>"); return html.join(""); } var internetExplorer = document.selection && window.ActiveXObject && /MSIE/.test(navigator.userAgent); function CodeMirror(place, options) { // Use passed options, if any, to override defaults. this.options = options = options || {}; setDefaults(options, CodeMirrorConfig); // Backward compatibility for deprecated options. if (options.dumbTabs) options.tabMode = "spaces"; else if (options.normalTab) options.tabMode = "default"; if (options.cursorActivity) options.onCursorActivity = options.cursorActivity; var frame = this.frame = createHTMLElement("iframe"); if (options.iframeClass) frame.className = options.iframeClass; frame.frameBorder = 0; frame.style.border = "0"; frame.style.width = '100%'; frame.style.height = '100%'; // display: block occasionally suppresses some Firefox bugs, so we // always add it, redundant as it sounds. frame.style.display = "block"; var div = this.wrapping = createHTMLElement("div"); div.style.position = "relative"; div.className = "CodeMirror-wrapping"; div.style.width = options.width; div.style.height = (options.height == "dynamic") ? options.minHeight + "px" : options.height; // This is used by Editor.reroutePasteEvent var teHack = this.textareaHack = createHTMLElement("textarea"); div.appendChild(teHack); teHack.style.position = "absolute"; teHack.style.left = "-10000px"; teHack.style.width = "10px"; teHack.tabIndex = 100000; // Link back to this object, so that the editor can fetch options // and add a reference to itself. frame.CodeMirror = this; if (options.domain && internetExplorer) { this.html = frameHTML(options); frame.src = "javascript:(function(){document.open();" + (options.domain ? "document.domain=\"" + options.domain + "\";" : "") + "document.write(window.frameElement.CodeMirror.html);document.close();})()"; } else { frame.src = "javascript:;"; } if (place.appendChild) place.appendChild(div); else place(div); div.appendChild(frame); if (options.lineNumbers) this.lineNumbers = addLineNumberDiv(div, options.firstLineNumber); this.win = frame.contentWindow; if (!options.domain || !internetExplorer) { this.win.document.open(); this.win.document.write(frameHTML(options)); this.win.document.close(); } } CodeMirror.prototype = { init: function() { // Deprecated, but still supported. if (this.options.initCallback) this.options.initCallback(this); if (this.options.onLoad) this.options.onLoad(this); if (this.options.lineNumbers) this.activateLineNumbers(); if (this.options.reindentOnLoad) this.reindent(); if (this.options.height == "dynamic") this.setDynamicHeight(); }, getCode: function() {return this.editor.getCode();}, setCode: function(code) {this.editor.importCode(code);}, selection: function() {this.focusIfIE(); return this.editor.selectedText();}, reindent: function() {this.editor.reindent();}, reindentSelection: function() {this.focusIfIE(); this.editor.reindentSelection(null);}, focusIfIE: function() { // in IE, a lot of selection-related functionality only works when the frame is focused if (this.win.select.ie_selection && document.activeElement != this.frame) this.focus(); }, focus: function() { this.win.focus(); if (this.editor.selectionSnapshot) // IE hack this.win.select.setBookmark(this.win.document.body, this.editor.selectionSnapshot); }, replaceSelection: function(text) { this.focus(); this.editor.replaceSelection(text); return true; }, replaceChars: function(text, start, end) { this.editor.replaceChars(text, start, end); }, getSearchCursor: function(string, fromCursor, caseFold) { return this.editor.getSearchCursor(string, fromCursor, caseFold); }, undo: function() {this.editor.history.undo();}, redo: function() {this.editor.history.redo();}, historySize: function() {return this.editor.history.historySize();}, clearHistory: function() {this.editor.history.clear();}, grabKeys: function(callback, filter) {this.editor.grabKeys(callback, filter);}, ungrabKeys: function() {this.editor.ungrabKeys();}, setParser: function(name, parserConfig) {this.editor.setParser(name, parserConfig);}, setSpellcheck: function(on) {this.win.document.body.spellcheck = on;}, setStylesheet: function(names) { if (typeof names === "string") names = [names]; var activeStylesheets = {}; var matchedNames = {}; var links = this.win.document.getElementsByTagName("link"); // Create hashes of active stylesheets and matched names. // This is O(n^2) but n is expected to be very small. for (var x = 0, link; link = links[x]; x++) { if (link.rel.indexOf("stylesheet") !== -1) { for (var y = 0; y < names.length; y++) { var name = names[y]; if (link.href.substring(link.href.length - name.length) === name) { activeStylesheets[link.href] = true; matchedNames[name] = true; } } } } // Activate the selected stylesheets and disable the rest. for (var x = 0, link; link = links[x]; x++) { if (link.rel.indexOf("stylesheet") !== -1) { link.disabled = !(link.href in activeStylesheets); } } // Create any new stylesheets. for (var y = 0; y < names.length; y++) { var name = names[y]; if (!(name in matchedNames)) { var link = this.win.document.createElement("link"); link.rel = "stylesheet"; link.type = "text/css"; link.href = name; this.win.document.getElementsByTagName('head')[0].appendChild(link); } } }, setTextWrapping: function(on) { if (on == this.options.textWrapping) return; this.win.document.body.style.whiteSpace = on ? "" : "nowrap"; this.options.textWrapping = on; if (this.lineNumbers) { this.setLineNumbers(false); this.setLineNumbers(true); } }, setIndentUnit: function(unit) {this.win.indentUnit = unit;}, setUndoDepth: function(depth) {this.editor.history.maxDepth = depth;}, setTabMode: function(mode) {this.options.tabMode = mode;}, setEnterMode: function(mode) {this.options.enterMode = mode;}, setLineNumbers: function(on) { if (on && !this.lineNumbers) { this.lineNumbers = addLineNumberDiv(this.wrapping,this.options.firstLineNumber); this.activateLineNumbers(); } else if (!on && this.lineNumbers) { this.wrapping.removeChild(this.lineNumbers); this.wrapping.style.paddingLeft = ""; this.lineNumbers = null; } }, cursorPosition: function(start) {this.focusIfIE(); return this.editor.cursorPosition(start);}, firstLine: function() {return this.editor.firstLine();}, lastLine: function() {return this.editor.lastLine();}, nextLine: function(line) {return this.editor.nextLine(line);}, prevLine: function(line) {return this.editor.prevLine(line);}, lineContent: function(line) {return this.editor.lineContent(line);}, setLineContent: function(line, content) {this.editor.setLineContent(line, content);}, removeLine: function(line){this.editor.removeLine(line);}, insertIntoLine: function(line, position, content) {this.editor.insertIntoLine(line, position, content);}, selectLines: function(startLine, startOffset, endLine, endOffset) { this.win.focus(); this.editor.selectLines(startLine, startOffset, endLine, endOffset); }, nthLine: function(n) { var line = this.firstLine(); for (; n > 1 && line !== false; n--) line = this.nextLine(line); return line; }, lineNumber: function(line) { var num = 0; while (line !== false) { num++; line = this.prevLine(line); } return num; }, jumpToLine: function(line) { if (typeof line == "number") line = this.nthLine(line); this.selectLines(line, 0); this.win.focus(); }, currentLine: function() { // Deprecated, but still there for backward compatibility return this.lineNumber(this.cursorLine()); }, cursorLine: function() { return this.cursorPosition().line; }, cursorCoords: function(start) {return this.editor.cursorCoords(start);}, activateLineNumbers: function() { var frame = this.frame, win = frame.contentWindow, doc = win.document, body = doc.body, nums = this.lineNumbers, scroller = nums.firstChild, self = this; var barWidth = null; nums.onclick = function(e) { var handler = self.options.onLineNumberClick; if (handler) { var div = (e || window.event).target || (e || window.event).srcElement; var num = div == nums ? NaN : Number(div.innerHTML); if (!isNaN(num)) handler(num, div); } }; function sizeBar() { if (frame.offsetWidth == 0) return; for (var root = frame; root.parentNode; root = root.parentNode){} if (!nums.parentNode || root != document || !win.Editor) { // Clear event handlers (their nodes might already be collected, so try/catch) try{clear();}catch(e){} clearInterval(sizeInterval); return; } if (nums.offsetWidth != barWidth) { barWidth = nums.offsetWidth; frame.parentNode.style.paddingLeft = barWidth + "px"; } } function doScroll() { nums.scrollTop = body.scrollTop || doc.documentElement.scrollTop || 0; } // Cleanup function, registered by nonWrapping and wrapping. var clear = function(){}; sizeBar(); var sizeInterval = setInterval(sizeBar, 500); function ensureEnoughLineNumbers(fill) { var lineHeight = scroller.firstChild.offsetHeight; if (lineHeight == 0) return; var targetHeight = 50 + Math.max(body.offsetHeight, Math.max(frame.offsetHeight, body.scrollHeight || 0)), lastNumber = Math.ceil(targetHeight / lineHeight); for (var i = scroller.childNodes.length; i <= lastNumber; i++) { var div = createHTMLElement("div"); div.appendChild(document.createTextNode(fill ? String(i + self.options.firstLineNumber) : "\u00a0")); scroller.appendChild(div); } } function nonWrapping() { function update() { ensureEnoughLineNumbers(true); doScroll(); } self.updateNumbers = update; var onScroll = win.addEventHandler(win, "scroll", doScroll, true), onResize = win.addEventHandler(win, "resize", update, true); clear = function(){ onScroll(); onResize(); if (self.updateNumbers == update) self.updateNumbers = null; }; update(); } function wrapping() { var node, lineNum, next, pos, changes = [], styleNums = self.options.styleNumbers; function setNum(n, node) { // Does not typically happen (but can, if you mess with the // document during the numbering) if (!lineNum) lineNum = scroller.appendChild(createHTMLElement("div")); if (styleNums) styleNums(lineNum, node, n); // Changes are accumulated, so that the document layout // doesn't have to be recomputed during the pass changes.push(lineNum); changes.push(n); pos = lineNum.offsetHeight + lineNum.offsetTop; lineNum = lineNum.nextSibling; } function commitChanges() { for (var i = 0; i < changes.length; i += 2) changes[i].innerHTML = changes[i + 1]; changes = []; } function work() { if (!scroller.parentNode || scroller.parentNode != self.lineNumbers) return; var endTime = new Date().getTime() + self.options.lineNumberTime; while (node) { setNum(next++, node.previousSibling); for (; node && !win.isBR(node); node = node.nextSibling) { var bott = node.offsetTop + node.offsetHeight; while (scroller.offsetHeight && bott - 3 > pos) { var oldPos = pos; setNum("&nbsp;"); if (pos <= oldPos) break; } } if (node) node = node.nextSibling; if (new Date().getTime() > endTime) { commitChanges(); pending = setTimeout(work, self.options.lineNumberDelay); return; } } while (lineNum) setNum(next++); commitChanges(); doScroll(); } function start(firstTime) { doScroll(); ensureEnoughLineNumbers(firstTime); node = body.firstChild; lineNum = scroller.firstChild; pos = 0; next = self.options.firstLineNumber; work(); } start(true); var pending = null; function update() { if (pending) clearTimeout(pending); if (self.editor.allClean()) start(); else pending = setTimeout(update, 200); } self.updateNumbers = update; var onScroll = win.addEventHandler(win, "scroll", doScroll, true), onResize = win.addEventHandler(win, "resize", update, true); clear = function(){ if (pending) clearTimeout(pending); if (self.updateNumbers == update) self.updateNumbers = null; onScroll(); onResize(); }; } (this.options.textWrapping || this.options.styleNumbers ? wrapping : nonWrapping)(); }, setDynamicHeight: function() { var self = this, activity = self.options.onCursorActivity, win = self.win, body = win.document.body, lineHeight = null, timeout = null, vmargin = 2 * self.frame.offsetTop; body.style.overflowY = "hidden"; win.document.documentElement.style.overflowY = "hidden"; this.frame.scrolling = "no"; function updateHeight() { var trailingLines = 0, node = body.lastChild, computedHeight; while (node && win.isBR(node)) { if (!node.hackBR) trailingLines++; node = node.previousSibling; } if (node) { lineHeight = node.offsetHeight; computedHeight = node.offsetTop + (1 + trailingLines) * lineHeight; } else if (lineHeight) { computedHeight = trailingLines * lineHeight; } if (computedHeight) self.wrapping.style.height = Math.max(vmargin + computedHeight, self.options.minHeight) + "px"; } setTimeout(updateHeight, 300); self.options.onCursorActivity = function(x) { if (activity) activity(x); clearTimeout(timeout); timeout = setTimeout(updateHeight, 100); }; } }; CodeMirror.InvalidLineHandle = {toString: function(){return "CodeMirror.InvalidLineHandle";}}; CodeMirror.replace = function(element) { if (typeof element == "string") element = document.getElementById(element); return function(newElement) { element.parentNode.replaceChild(newElement, element); }; }; CodeMirror.fromTextArea = function(area, options) { if (typeof area == "string") area = document.getElementById(area); options = options || {}; if (area.style.width && options.width == null) options.width = area.style.width; if (area.style.height && options.height == null) options.height = area.style.height; if (options.content == null) options.content = area.value; function updateField() { area.value = mirror.getCode(); } if (area.form) { if (typeof area.form.addEventListener == "function") area.form.addEventListener("submit", updateField, false); else area.form.attachEvent("onsubmit", updateField); var realSubmit = area.form.submit; function wrapSubmit() { updateField(); // Can't use realSubmit.apply because IE6 is too stupid area.form.submit = realSubmit; area.form.submit(); area.form.submit = wrapSubmit; } area.form.submit = wrapSubmit; } function insert(frame) { if (area.nextSibling) area.parentNode.insertBefore(frame, area.nextSibling); else area.parentNode.appendChild(frame); } area.style.display = "none"; var mirror = new CodeMirror(insert, options); mirror.save = updateField; mirror.toTextArea = function() { updateField(); area.parentNode.removeChild(mirror.wrapping); area.style.display = ""; if (area.form) { area.form.submit = realSubmit; if (typeof area.form.removeEventListener == "function") area.form.removeEventListener("submit", updateField, false); else area.form.detachEvent("onsubmit", updateField); } }; return mirror; }; CodeMirror.isProbablySupported = function() { // This is rather awful, but can be useful. var match; if (window.opera) return Number(window.opera.version()) >= 9.52; else if (/Apple Computer, Inc/.test(navigator.vendor) && (match = navigator.userAgent.match(/Version\/(\d+(?:\.\d+)?)\./))) return Number(match[1]) >= 3; else if (document.selection && window.ActiveXObject && (match = navigator.userAgent.match(/MSIE (\d+(?:\.\d*)?)\b/))) return Number(match[1]) >= 6; else if (match = navigator.userAgent.match(/gecko\/(\d{8})/i)) return Number(match[1]) >= 20050901; else if (match = navigator.userAgent.match(/AppleWebKit\/(\d+)/)) return Number(match[1]) >= 525; else return null; }; return CodeMirror; })();
JavaScript
// Minimal framing needed to use CodeMirror-style parsers to highlight // code. Load this along with tokenize.js, stringstream.js, and your // parser. Then call highlightText, passing a string as the first // argument, and as the second argument either a callback function // that will be called with an array of SPAN nodes for every line in // the code, or a DOM node to which to append these spans, and // optionally (not needed if you only loaded one parser) a parser // object. // Stuff from util.js that the parsers are using. var StopIteration = {toString: function() {return "StopIteration"}}; var Editor = {}; var indentUnit = 2; (function(){ function normaliseString(string) { var tab = ""; for (var i = 0; i < indentUnit; i++) tab += " "; string = string.replace(/\t/g, tab).replace(/\u00a0/g, " ").replace(/\r\n?/g, "\n"); var pos = 0, parts = [], lines = string.split("\n"); for (var line = 0; line < lines.length; line++) { if (line != 0) parts.push("\n"); parts.push(lines[line]); } return { next: function() { if (pos < parts.length) return parts[pos++]; else throw StopIteration; } }; } window.highlightText = function(string, callback, parser) { parser = (parser || Editor.Parser).make(stringStream(normaliseString(string))); var line = []; if (callback.nodeType == 1) { var node = callback; callback = function(line) { for (var i = 0; i < line.length; i++) node.appendChild(line[i]); node.appendChild(document.createElement("br")); }; } try { while (true) { var token = parser.next(); if (token.value == "\n") { callback(line); line = []; } else { var span = document.createElement("span"); span.className = token.style; span.appendChild(document.createTextNode(token.value)); line.push(span); } } } catch (e) { if (e != StopIteration) throw e; } if (line.length) callback(line); } })();
JavaScript
/* The Editor object manages the content of the editable frame. It * catches events, colours nodes, and indents lines. This file also * holds some functions for transforming arbitrary DOM structures into * plain sequences of <span> and <br> elements */ var internetExplorer = document.selection && window.ActiveXObject && /MSIE/.test(navigator.userAgent); var webkit = /AppleWebKit/.test(navigator.userAgent); var safari = /Apple Computer, Inc/.test(navigator.vendor); var gecko = navigator.userAgent.match(/gecko\/(\d{8})/i); if (gecko) gecko = Number(gecko[1]); var mac = /Mac/.test(navigator.platform); // TODO this is related to the backspace-at-end-of-line bug. Remove // this if Opera gets their act together, make the version check more // broad if they don't. var brokenOpera = window.opera && /Version\/10.[56]/.test(navigator.userAgent); // TODO remove this once WebKit 533 becomes less common. var slowWebkit = /AppleWebKit\/533/.test(navigator.userAgent); // Make sure a string does not contain two consecutive 'collapseable' // whitespace characters. function makeWhiteSpace(n) { var buffer = [], nb = true; for (; n > 0; n--) { buffer.push((nb || n == 1) ? nbsp : " "); nb ^= true; } return buffer.join(""); } // Create a set of white-space characters that will not be collapsed // by the browser, but will not break text-wrapping either. function fixSpaces(string) { if (string.charAt(0) == " ") string = nbsp + string.slice(1); return string.replace(/\t/g, function() {return makeWhiteSpace(indentUnit);}) .replace(/[ \u00a0]{2,}/g, function(s) {return makeWhiteSpace(s.length);}); } function cleanText(text) { return text.replace(/\u00a0/g, " ").replace(/\u200b/g, ""); } // Create a SPAN node with the expected properties for document part // spans. function makePartSpan(value) { var text = value; if (value.nodeType == 3) text = value.nodeValue; else value = document.createTextNode(text); var span = document.createElement("span"); span.isPart = true; span.appendChild(value); span.currentText = text; return span; } function alwaysZero() {return 0;} // On webkit, when the last BR of the document does not have text // behind it, the cursor can not be put on the line after it. This // makes pressing enter at the end of the document occasionally do // nothing (or at least seem to do nothing). To work around it, this // function makes sure the document ends with a span containing a // zero-width space character. The traverseDOM iterator filters such // character out again, so that the parsers won't see them. This // function is called from a few strategic places to make sure the // zwsp is restored after the highlighting process eats it. var webkitLastLineHack = webkit ? function(container) { var last = container.lastChild; if (!last || !last.hackBR) { var br = document.createElement("br"); br.hackBR = true; container.appendChild(br); } } : function() {}; function asEditorLines(string) { var tab = makeWhiteSpace(indentUnit); return map(string.replace(/\t/g, tab).replace(/\u00a0/g, " ").replace(/\r\n?/g, "\n").split("\n"), fixSpaces); } var Editor = (function(){ // The HTML elements whose content should be suffixed by a newline // when converting them to flat text. var newlineElements = {"P": true, "DIV": true, "LI": true}; // Helper function for traverseDOM. Flattens an arbitrary DOM node // into an array of textnodes and <br> tags. function simplifyDOM(root, atEnd) { var result = []; var leaving = true; function simplifyNode(node, top) { if (node.nodeType == 3) { var text = node.nodeValue = fixSpaces(node.nodeValue.replace(/[\r\u200b]/g, "").replace(/\n/g, " ")); if (text.length) leaving = false; result.push(node); } else if (isBR(node) && node.childNodes.length == 0) { leaving = true; result.push(node); } else { for (var n = node.firstChild; n; n = n.nextSibling) simplifyNode(n); if (!leaving && newlineElements.hasOwnProperty(node.nodeName.toUpperCase())) { leaving = true; if (!atEnd || !top) result.push(document.createElement("br")); } } } simplifyNode(root, true); return result; } // Creates a MochiKit-style iterator that goes over a series of DOM // nodes. The values it yields are strings, the textual content of // the nodes. It makes sure that all nodes up to and including the // one whose text is being yielded have been 'normalized' to be just // <span> and <br> elements. function traverseDOM(start){ var nodeQueue = []; // Create a function that can be used to insert nodes after the // one given as argument. function pointAt(node){ var parent = node.parentNode; var next = node.nextSibling; return function(newnode) { parent.insertBefore(newnode, next); }; } var point = null; // This an Opera-specific hack -- always insert an empty span // between two BRs, because Opera's cursor code gets terribly // confused when the cursor is between two BRs. var afterBR = true; // Insert a normalized node at the current point. If it is a text // node, wrap it in a <span>, and give that span a currentText // property -- this is used to cache the nodeValue, because // directly accessing nodeValue is horribly slow on some browsers. // The dirty property is used by the highlighter to determine // which parts of the document have to be re-highlighted. function insertPart(part){ var text = "\n"; if (part.nodeType == 3) { select.snapshotChanged(); part = makePartSpan(part); text = part.currentText; afterBR = false; } else { if (afterBR && window.opera) point(makePartSpan("")); afterBR = true; } part.dirty = true; nodeQueue.push(part); point(part); return text; } // Extract the text and newlines from a DOM node, insert them into // the document, and return the textual content. Used to replace // non-normalized nodes. function writeNode(node, end) { var simplified = simplifyDOM(node, end); for (var i = 0; i < simplified.length; i++) simplified[i] = insertPart(simplified[i]); return simplified.join(""); } // Check whether a node is a normalized <span> element. function partNode(node){ if (node.isPart && node.childNodes.length == 1 && node.firstChild.nodeType == 3) { var text = node.firstChild.nodeValue; node.dirty = node.dirty || text != node.currentText; node.currentText = text; return !/[\n\t\r]/.test(node.currentText); } return false; } // Advance to next node, return string for current node. function next() { if (!start) throw StopIteration; var node = start; start = node.nextSibling; if (partNode(node)){ nodeQueue.push(node); afterBR = false; return node.currentText; } else if (isBR(node)) { if (afterBR && window.opera) node.parentNode.insertBefore(makePartSpan(""), node); nodeQueue.push(node); afterBR = true; return "\n"; } else { var end = !node.nextSibling; point = pointAt(node); removeElement(node); return writeNode(node, end); } } // MochiKit iterators are objects with a next function that // returns the next value or throws StopIteration when there are // no more values. return {next: next, nodes: nodeQueue}; } // Determine the text size of a processed node. function nodeSize(node) { return isBR(node) ? 1 : node.currentText.length; } // Search backwards through the top-level nodes until the next BR or // the start of the frame. function startOfLine(node) { while (node && !isBR(node)) node = node.previousSibling; return node; } function endOfLine(node, container) { if (!node) node = container.firstChild; else if (isBR(node)) node = node.nextSibling; while (node && !isBR(node)) node = node.nextSibling; return node; } function time() {return new Date().getTime();} // Client interface for searching the content of the editor. Create // these by calling CodeMirror.getSearchCursor. To use, call // findNext on the resulting object -- this returns a boolean // indicating whether anything was found, and can be called again to // skip to the next find. Use the select and replace methods to // actually do something with the found locations. function SearchCursor(editor, pattern, from, caseFold) { this.editor = editor; this.history = editor.history; this.history.commit(); this.valid = !!pattern; this.atOccurrence = false; if (caseFold == undefined) caseFold = typeof pattern == "string" && pattern == pattern.toLowerCase(); function getText(node){ var line = cleanText(editor.history.textAfter(node)); return (caseFold ? line.toLowerCase() : line); } var topPos = {node: null, offset: 0}, self = this; if (from && typeof from == "object" && typeof from.character == "number") { editor.checkLine(from.line); var pos = {node: from.line, offset: from.character}; this.pos = {from: pos, to: pos}; } else if (from) { this.pos = {from: select.cursorPos(editor.container, true) || topPos, to: select.cursorPos(editor.container, false) || topPos}; } else { this.pos = {from: topPos, to: topPos}; } if (typeof pattern != "string") { // Regexp match this.matches = function(reverse, node, offset) { if (reverse) { var line = getText(node).slice(0, offset), match = line.match(pattern), start = 0; while (match) { var ind = line.indexOf(match[0]); start += ind; line = line.slice(ind + 1); var newmatch = line.match(pattern); if (newmatch) match = newmatch; else break; } } else { var line = getText(node).slice(offset), match = line.match(pattern), start = match && offset + line.indexOf(match[0]); } if (match) { self.currentMatch = match; return {from: {node: node, offset: start}, to: {node: node, offset: start + match[0].length}}; } }; return; } if (caseFold) pattern = pattern.toLowerCase(); // Create a matcher function based on the kind of string we have. var target = pattern.split("\n"); this.matches = (target.length == 1) ? // For one-line strings, searching can be done simply by calling // indexOf or lastIndexOf on the current line. function(reverse, node, offset) { var line = getText(node), len = pattern.length, match; if (reverse ? (offset >= len && (match = line.lastIndexOf(pattern, offset - len)) != -1) : (match = line.indexOf(pattern, offset)) != -1) return {from: {node: node, offset: match}, to: {node: node, offset: match + len}}; } : // Multi-line strings require internal iteration over lines, and // some clunky checks to make sure the first match ends at the // end of the line and the last match starts at the start. function(reverse, node, offset) { var idx = (reverse ? target.length - 1 : 0), match = target[idx], line = getText(node); var offsetA = (reverse ? line.indexOf(match) + match.length : line.lastIndexOf(match)); if (reverse ? offsetA >= offset || offsetA != match.length : offsetA <= offset || offsetA != line.length - match.length) return; var pos = node; while (true) { if (reverse && !pos) return; pos = (reverse ? this.history.nodeBefore(pos) : this.history.nodeAfter(pos) ); if (!reverse && !pos) return; line = getText(pos); match = target[reverse ? --idx : ++idx]; if (idx > 0 && idx < target.length - 1) { if (line != match) return; else continue; } var offsetB = (reverse ? line.lastIndexOf(match) : line.indexOf(match) + match.length); if (reverse ? offsetB != line.length - match.length : offsetB != match.length) return; return {from: {node: reverse ? pos : node, offset: reverse ? offsetB : offsetA}, to: {node: reverse ? node : pos, offset: reverse ? offsetA : offsetB}}; } }; } SearchCursor.prototype = { findNext: function() {return this.find(false);}, findPrevious: function() {return this.find(true);}, find: function(reverse) { if (!this.valid) return false; var self = this, pos = reverse ? this.pos.from : this.pos.to, node = pos.node, offset = pos.offset; // Reset the cursor if the current line is no longer in the DOM tree. if (node && !node.parentNode) { node = null; offset = 0; } function savePosAndFail() { var pos = {node: node, offset: offset}; self.pos = {from: pos, to: pos}; self.atOccurrence = false; return false; } while (true) { if (this.pos = this.matches(reverse, node, offset)) { this.atOccurrence = true; return true; } if (reverse) { if (!node) return savePosAndFail(); node = this.history.nodeBefore(node); offset = this.history.textAfter(node).length; } else { var next = this.history.nodeAfter(node); if (!next) { offset = this.history.textAfter(node).length; return savePosAndFail(); } node = next; offset = 0; } } }, select: function() { if (this.atOccurrence) { select.setCursorPos(this.editor.container, this.pos.from, this.pos.to); select.scrollToCursor(this.editor.container); } }, replace: function(string) { if (this.atOccurrence) { var fragments = this.currentMatch; if (fragments) string = string.replace(/\\(\d)/, function(m, i){return fragments[i];}); var end = this.editor.replaceRange(this.pos.from, this.pos.to, string); this.pos.to = end; this.atOccurrence = false; } }, position: function() { if (this.atOccurrence) return {line: this.pos.from.node, character: this.pos.from.offset}; } }; // The Editor object is the main inside-the-iframe interface. function Editor(options) { this.options = options; window.indentUnit = options.indentUnit; var container = this.container = document.body; this.history = new UndoHistory(container, options.undoDepth, options.undoDelay, this); var self = this; if (!Editor.Parser) throw "No parser loaded."; if (options.parserConfig && Editor.Parser.configure) Editor.Parser.configure(options.parserConfig); if (!options.readOnly && !internetExplorer) select.setCursorPos(container, {node: null, offset: 0}); this.dirty = []; this.importCode(options.content || ""); this.history.onChange = options.onChange; if (!options.readOnly) { if (options.continuousScanning !== false) { this.scanner = this.documentScanner(options.passTime); this.delayScanning(); } function setEditable() { // Use contentEditable instead of designMode on IE, since designMode frames // can not run any scripts. It would be nice if we could use contentEditable // everywhere, but it is significantly flakier than designMode on every // single non-IE browser. if (document.body.contentEditable != undefined && internetExplorer) document.body.contentEditable = "true"; else document.designMode = "on"; // Work around issue where you have to click on the actual // body of the document to focus it in IE, making focusing // hard when the document is small. if (internetExplorer && options.height != "dynamic") document.body.style.minHeight = ( window.frameElement.clientHeight - 2 * document.body.offsetTop - 5) + "px"; document.documentElement.style.borderWidth = "0"; if (!options.textWrapping) container.style.whiteSpace = "nowrap"; } // If setting the frame editable fails, try again when the user // focus it (happens when the frame is not visible on // initialisation, in Firefox). try { setEditable(); } catch(e) { var focusEvent = addEventHandler(document, "focus", function() { focusEvent(); setEditable(); }, true); } addEventHandler(document, "keydown", method(this, "keyDown")); addEventHandler(document, "keypress", method(this, "keyPress")); addEventHandler(document, "keyup", method(this, "keyUp")); function cursorActivity() {self.cursorActivity(false);} addEventHandler(internetExplorer ? document.body : window, "mouseup", cursorActivity); addEventHandler(document.body, "cut", cursorActivity); // workaround for a gecko bug [?] where going forward and then // back again breaks designmode (no more cursor) if (gecko) addEventHandler(window, "pagehide", function(){self.unloaded = true;}); addEventHandler(document.body, "paste", function(event) { cursorActivity(); var text = null; try { var clipboardData = event.clipboardData || window.clipboardData; if (clipboardData) text = clipboardData.getData('Text'); } catch(e) {} if (text !== null) { event.stop(); self.replaceSelection(text); select.scrollToCursor(self.container); } }); if (this.options.autoMatchParens) addEventHandler(document.body, "click", method(this, "scheduleParenHighlight")); } else if (!options.textWrapping) { container.style.whiteSpace = "nowrap"; } } function isSafeKey(code) { return (code >= 16 && code <= 18) || // shift, control, alt (code >= 33 && code <= 40); // arrows, home, end } Editor.prototype = { // Import a piece of code into the editor. importCode: function(code) { var lines = asEditorLines(code), chunk = 1000; if (!this.options.incrementalLoading || lines.length < chunk) { this.history.push(null, null, lines); this.history.reset(); } else { var cur = 0, self = this; function addChunk() { var chunklines = lines.slice(cur, cur + chunk); chunklines.push(""); self.history.push(self.history.nodeBefore(null), null, chunklines); self.history.reset(); cur += chunk; if (cur < lines.length) parent.setTimeout(addChunk, 1000); } addChunk(); } }, // Extract the code from the editor. getCode: function() { if (!this.container.firstChild) return ""; var accum = []; select.markSelection(); forEach(traverseDOM(this.container.firstChild), method(accum, "push")); select.selectMarked(); // On webkit, don't count last (empty) line if the webkitLastLineHack BR is present if (webkit && this.container.lastChild.hackBR) accum.pop(); webkitLastLineHack(this.container); return cleanText(accum.join("")); }, checkLine: function(node) { if (node === false || !(node == null || node.parentNode == this.container || node.hackBR)) throw parent.CodeMirror.InvalidLineHandle; }, cursorPosition: function(start) { if (start == null) start = true; var pos = select.cursorPos(this.container, start); if (pos) return {line: pos.node, character: pos.offset}; else return {line: null, character: 0}; }, firstLine: function() { return null; }, lastLine: function() { var last = this.container.lastChild; if (last) last = startOfLine(last); if (last && last.hackBR) last = startOfLine(last.previousSibling); return last; }, nextLine: function(line) { this.checkLine(line); var end = endOfLine(line, this.container); if (!end || end.hackBR) return false; else return end; }, prevLine: function(line) { this.checkLine(line); if (line == null) return false; return startOfLine(line.previousSibling); }, visibleLineCount: function() { var line = this.container.firstChild; while (line && isBR(line)) line = line.nextSibling; // BR heights are unreliable if (!line) return false; var innerHeight = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight); return Math.floor(innerHeight / line.offsetHeight); }, selectLines: function(startLine, startOffset, endLine, endOffset) { this.checkLine(startLine); var start = {node: startLine, offset: startOffset}, end = null; if (endOffset !== undefined) { this.checkLine(endLine); end = {node: endLine, offset: endOffset}; } select.setCursorPos(this.container, start, end); select.scrollToCursor(this.container); }, lineContent: function(line) { var accum = []; for (line = line ? line.nextSibling : this.container.firstChild; line && !isBR(line); line = line.nextSibling) accum.push(nodeText(line)); return cleanText(accum.join("")); }, setLineContent: function(line, content) { this.history.commit(); this.replaceRange({node: line, offset: 0}, {node: line, offset: this.history.textAfter(line).length}, content); this.addDirtyNode(line); this.scheduleHighlight(); }, removeLine: function(line) { var node = line ? line.nextSibling : this.container.firstChild; while (node) { var next = node.nextSibling; removeElement(node); if (isBR(node)) break; node = next; } this.addDirtyNode(line); this.scheduleHighlight(); }, insertIntoLine: function(line, position, content) { var before = null; if (position == "end") { before = endOfLine(line, this.container); } else { for (var cur = line ? line.nextSibling : this.container.firstChild; cur; cur = cur.nextSibling) { if (position == 0) { before = cur; break; } var text = nodeText(cur); if (text.length > position) { before = cur.nextSibling; content = text.slice(0, position) + content + text.slice(position); removeElement(cur); break; } position -= text.length; } } var lines = asEditorLines(content); for (var i = 0; i < lines.length; i++) { if (i > 0) this.container.insertBefore(document.createElement("BR"), before); this.container.insertBefore(makePartSpan(lines[i]), before); } this.addDirtyNode(line); this.scheduleHighlight(); }, // Retrieve the selected text. selectedText: function() { var h = this.history; h.commit(); var start = select.cursorPos(this.container, true), end = select.cursorPos(this.container, false); if (!start || !end) return ""; if (start.node == end.node) return h.textAfter(start.node).slice(start.offset, end.offset); var text = [h.textAfter(start.node).slice(start.offset)]; for (var pos = h.nodeAfter(start.node); pos != end.node; pos = h.nodeAfter(pos)) text.push(h.textAfter(pos)); text.push(h.textAfter(end.node).slice(0, end.offset)); return cleanText(text.join("\n")); }, // Replace the selection with another piece of text. replaceSelection: function(text) { this.history.commit(); var start = select.cursorPos(this.container, true), end = select.cursorPos(this.container, false); if (!start || !end) return; end = this.replaceRange(start, end, text); select.setCursorPos(this.container, end); webkitLastLineHack(this.container); }, cursorCoords: function(start, internal) { var sel = select.cursorPos(this.container, start); if (!sel) return null; var off = sel.offset, node = sel.node, self = this; function measureFromNode(node, xOffset) { var y = -(document.body.scrollTop || document.documentElement.scrollTop || 0), x = -(document.body.scrollLeft || document.documentElement.scrollLeft || 0) + xOffset; forEach([node, internal ? null : window.frameElement], function(n) { while (n) {x += n.offsetLeft; y += n.offsetTop;n = n.offsetParent;} }); return {x: x, y: y, yBot: y + node.offsetHeight}; } function withTempNode(text, f) { var node = document.createElement("SPAN"); node.appendChild(document.createTextNode(text)); try {return f(node);} finally {if (node.parentNode) node.parentNode.removeChild(node);} } while (off) { node = node ? node.nextSibling : this.container.firstChild; var txt = nodeText(node); if (off < txt.length) return withTempNode(txt.substr(0, off), function(tmp) { tmp.style.position = "absolute"; tmp.style.visibility = "hidden"; tmp.className = node.className; self.container.appendChild(tmp); return measureFromNode(node, tmp.offsetWidth); }); off -= txt.length; } if (node && isSpan(node)) return measureFromNode(node, node.offsetWidth); else if (node && node.nextSibling && isSpan(node.nextSibling)) return measureFromNode(node.nextSibling, 0); else return withTempNode("\u200b", function(tmp) { if (node) node.parentNode.insertBefore(tmp, node.nextSibling); else self.container.insertBefore(tmp, self.container.firstChild); return measureFromNode(tmp, 0); }); }, reroutePasteEvent: function() { if (this.capturingPaste || window.opera || (gecko && gecko >= 20101026)) return; this.capturingPaste = true; var te = window.frameElement.CodeMirror.textareaHack; var coords = this.cursorCoords(true, true); te.style.top = coords.y + "px"; if (internetExplorer) { var snapshot = select.getBookmark(this.container); if (snapshot) this.selectionSnapshot = snapshot; } parent.focus(); te.value = ""; te.focus(); var self = this; parent.setTimeout(function() { self.capturingPaste = false; window.focus(); if (self.selectionSnapshot) // IE hack window.select.setBookmark(self.container, self.selectionSnapshot); var text = te.value; if (text) { self.replaceSelection(text); select.scrollToCursor(self.container); } }, 10); }, replaceRange: function(from, to, text) { var lines = asEditorLines(text); lines[0] = this.history.textAfter(from.node).slice(0, from.offset) + lines[0]; var lastLine = lines[lines.length - 1]; lines[lines.length - 1] = lastLine + this.history.textAfter(to.node).slice(to.offset); var end = this.history.nodeAfter(to.node); this.history.push(from.node, end, lines); return {node: this.history.nodeBefore(end), offset: lastLine.length}; }, getSearchCursor: function(string, fromCursor, caseFold) { return new SearchCursor(this, string, fromCursor, caseFold); }, // Re-indent the whole buffer reindent: function() { if (this.container.firstChild) this.indentRegion(null, this.container.lastChild); }, reindentSelection: function(direction) { if (!select.somethingSelected()) { this.indentAtCursor(direction); } else { var start = select.selectionTopNode(this.container, true), end = select.selectionTopNode(this.container, false); if (start === false || end === false) return; this.indentRegion(start, end, direction); } }, grabKeys: function(eventHandler, filter) { this.frozen = eventHandler; this.keyFilter = filter; }, ungrabKeys: function() { this.frozen = "leave"; }, setParser: function(name, parserConfig) { Editor.Parser = window[name]; parserConfig = parserConfig || this.options.parserConfig; if (parserConfig && Editor.Parser.configure) Editor.Parser.configure(parserConfig); if (this.container.firstChild) { forEach(this.container.childNodes, function(n) { if (n.nodeType != 3) n.dirty = true; }); this.addDirtyNode(this.firstChild); this.scheduleHighlight(); } }, // Intercept enter and tab, and assign their new functions. keyDown: function(event) { if (this.frozen == "leave") {this.frozen = null; this.keyFilter = null;} if (this.frozen && (!this.keyFilter || this.keyFilter(event.keyCode, event))) { event.stop(); this.frozen(event); return; } var code = event.keyCode; // Don't scan when the user is typing. this.delayScanning(); // Schedule a paren-highlight event, if configured. if (this.options.autoMatchParens) this.scheduleParenHighlight(); // The various checks for !altKey are there because AltGr sets both // ctrlKey and altKey to true, and should not be recognised as // Control. if (code == 13) { // enter if (event.ctrlKey && !event.altKey) { this.reparseBuffer(); } else { select.insertNewlineAtCursor(); var mode = this.options.enterMode; if (mode != "flat") this.indentAtCursor(mode == "keep" ? "keep" : undefined); select.scrollToCursor(this.container); } event.stop(); } else if (code == 9 && this.options.tabMode != "default" && !event.ctrlKey) { // tab this.handleTab(!event.shiftKey); event.stop(); } else if (code == 32 && event.shiftKey && this.options.tabMode == "default") { // space this.handleTab(true); event.stop(); } else if (code == 36 && !event.shiftKey && !event.ctrlKey) { // home if (this.home()) event.stop(); } else if (code == 35 && !event.shiftKey && !event.ctrlKey) { // end if (this.end()) event.stop(); } // Only in Firefox is the default behavior for PgUp/PgDn correct. else if (code == 33 && !event.shiftKey && !event.ctrlKey && !gecko) { // PgUp if (this.pageUp()) event.stop(); } else if (code == 34 && !event.shiftKey && !event.ctrlKey && !gecko) { // PgDn if (this.pageDown()) event.stop(); } else if ((code == 219 || code == 221) && event.ctrlKey && !event.altKey) { // [, ] this.highlightParens(event.shiftKey, true); event.stop(); } else if (event.metaKey && !event.shiftKey && (code == 37 || code == 39)) { // Meta-left/right var cursor = select.selectionTopNode(this.container); if (cursor === false || !this.container.firstChild) return; if (code == 37) select.focusAfterNode(startOfLine(cursor), this.container); else { var end = endOfLine(cursor, this.container); select.focusAfterNode(end ? end.previousSibling : this.container.lastChild, this.container); } event.stop(); } else if ((event.ctrlKey || event.metaKey) && !event.altKey) { if ((event.shiftKey && code == 90) || code == 89) { // shift-Z, Y select.scrollToNode(this.history.redo()); event.stop(); } else if (code == 90 || (safari && code == 8)) { // Z, backspace select.scrollToNode(this.history.undo()); event.stop(); } else if (code == 83 && this.options.saveFunction) { // S this.options.saveFunction(); event.stop(); } else if (code == 86 && !mac) { // V this.reroutePasteEvent(); } } }, // Check for characters that should re-indent the current line, // and prevent Opera from handling enter and tab anyway. keyPress: function(event) { var electric = this.options.electricChars && Editor.Parser.electricChars, self = this; // Hack for Opera, and Firefox on OS X, in which stopping a // keydown event does not prevent the associated keypress event // from happening, so we have to cancel enter and tab again // here. if ((this.frozen && (!this.keyFilter || this.keyFilter(event.keyCode || event.code, event))) || event.code == 13 || (event.code == 9 && this.options.tabMode != "default") || (event.code == 32 && event.shiftKey && this.options.tabMode == "default")) event.stop(); else if (mac && (event.ctrlKey || event.metaKey) && event.character == "v") { this.reroutePasteEvent(); } else if (electric && electric.indexOf(event.character) != -1) parent.setTimeout(function(){self.indentAtCursor(null);}, 0); // Work around a bug where pressing backspace at the end of a // line, or delete at the start, often causes the cursor to jump // to the start of the line in Opera 10.60. else if (brokenOpera) { if (event.code == 8) { // backspace var sel = select.selectionTopNode(this.container), self = this, next = sel ? sel.nextSibling : this.container.firstChild; if (sel !== false && next && isBR(next)) parent.setTimeout(function(){ if (select.selectionTopNode(self.container) == next) select.focusAfterNode(next.previousSibling, self.container); }, 20); } else if (event.code == 46) { // delete var sel = select.selectionTopNode(this.container), self = this; if (sel && isBR(sel)) { parent.setTimeout(function(){ if (select.selectionTopNode(self.container) != sel) select.focusAfterNode(sel, self.container); }, 20); } } } // In 533.* WebKit versions, when the document is big, typing // something at the end of a line causes the browser to do some // kind of stupid heavy operation, creating delays of several // seconds before the typed characters appear. This very crude // hack inserts a temporary zero-width space after the cursor to // make it not be at the end of the line. else if (slowWebkit) { var sel = select.selectionTopNode(this.container), next = sel ? sel.nextSibling : this.container.firstChild; // Doesn't work on empty lines, for some reason those always // trigger the delay. if (sel && next && isBR(next) && !isBR(sel)) { var cheat = document.createTextNode("\u200b"); this.container.insertBefore(cheat, next); parent.setTimeout(function() { if (cheat.nodeValue == "\u200b") removeElement(cheat); else cheat.nodeValue = cheat.nodeValue.replace("\u200b", ""); }, 20); } } // Magic incantation that works abound a webkit bug when you // can't type on a blank line following a line that's wider than // the window. if (webkit && !this.options.textWrapping) setTimeout(function () { var node = select.selectionTopNode(self.container, true); if (node && node.nodeType == 3 && node.previousSibling && isBR(node.previousSibling) && node.nextSibling && isBR(node.nextSibling)) node.parentNode.replaceChild(document.createElement("BR"), node.previousSibling); }, 50); }, // Mark the node at the cursor dirty when a non-safe key is // released. keyUp: function(event) { this.cursorActivity(isSafeKey(event.keyCode)); }, // Indent the line following a given <br>, or null for the first // line. If given a <br> element, this must have been highlighted // so that it has an indentation method. Returns the whitespace // element that has been modified or created (if any). indentLineAfter: function(start, direction) { function whiteSpaceAfter(node) { var ws = node ? node.nextSibling : self.container.firstChild; if (!ws || !hasClass(ws, "whitespace")) return null; return ws; } // whiteSpace is the whitespace span at the start of the line, // or null if there is no such node. var self = this, whiteSpace = whiteSpaceAfter(start); var newIndent = 0, curIndent = whiteSpace ? whiteSpace.currentText.length : 0; var firstText = whiteSpace ? whiteSpace.nextSibling : (start ? start.nextSibling : this.container.firstChild); if (direction == "keep") { if (start) { var prevWS = whiteSpaceAfter(startOfLine(start.previousSibling)) if (prevWS) newIndent = prevWS.currentText.length; } } else { // Sometimes the start of the line can influence the correct // indentation, so we retrieve it. var nextChars = (start && firstText && firstText.currentText) ? firstText.currentText : ""; // Ask the lexical context for the correct indentation, and // compute how much this differs from the current indentation. if (direction != null && this.options.tabMode == "shift") newIndent = direction ? curIndent + indentUnit : Math.max(0, curIndent - indentUnit) else if (start) newIndent = start.indentation(nextChars, curIndent, direction, firstText); else if (Editor.Parser.firstIndentation) newIndent = Editor.Parser.firstIndentation(nextChars, curIndent, direction, firstText); } var indentDiff = newIndent - curIndent; // If there is too much, this is just a matter of shrinking a span. if (indentDiff < 0) { if (newIndent == 0) { if (firstText) select.snapshotMove(whiteSpace.firstChild, firstText.firstChild || firstText, 0); removeElement(whiteSpace); whiteSpace = null; } else { select.snapshotMove(whiteSpace.firstChild, whiteSpace.firstChild, indentDiff, true); whiteSpace.currentText = makeWhiteSpace(newIndent); whiteSpace.firstChild.nodeValue = whiteSpace.currentText; } } // Not enough... else if (indentDiff > 0) { // If there is whitespace, we grow it. if (whiteSpace) { whiteSpace.currentText = makeWhiteSpace(newIndent); whiteSpace.firstChild.nodeValue = whiteSpace.currentText; select.snapshotMove(whiteSpace.firstChild, whiteSpace.firstChild, indentDiff, true); } // Otherwise, we have to add a new whitespace node. else { whiteSpace = makePartSpan(makeWhiteSpace(newIndent)); whiteSpace.className = "whitespace"; if (start) insertAfter(whiteSpace, start); else this.container.insertBefore(whiteSpace, this.container.firstChild); select.snapshotMove(firstText && (firstText.firstChild || firstText), whiteSpace.firstChild, newIndent, false, true); } } // Make sure cursor ends up after the whitespace else if (whiteSpace) { select.snapshotMove(whiteSpace.firstChild, whiteSpace.firstChild, newIndent, false); } if (indentDiff != 0) this.addDirtyNode(start); }, // Re-highlight the selected part of the document. highlightAtCursor: function() { var pos = select.selectionTopNode(this.container, true); var to = select.selectionTopNode(this.container, false); if (pos === false || to === false) return false; select.markSelection(); if (this.highlight(pos, endOfLine(to, this.container), true, 20) === false) return false; select.selectMarked(); return true; }, // When tab is pressed with text selected, the whole selection is // re-indented, when nothing is selected, the line with the cursor // is re-indented. handleTab: function(direction) { if (this.options.tabMode == "spaces") select.insertTabAtCursor(); else this.reindentSelection(direction); }, // Custom home behaviour that doesn't land the cursor in front of // leading whitespace unless pressed twice. home: function() { var cur = select.selectionTopNode(this.container, true), start = cur; if (cur === false || !(!cur || cur.isPart || isBR(cur)) || !this.container.firstChild) return false; while (cur && !isBR(cur)) cur = cur.previousSibling; var next = cur ? cur.nextSibling : this.container.firstChild; if (next && next != start && next.isPart && hasClass(next, "whitespace")) select.focusAfterNode(next, this.container); else select.focusAfterNode(cur, this.container); select.scrollToCursor(this.container); return true; }, // Some browsers (Opera) don't manage to handle the end key // properly in the face of vertical scrolling. end: function() { var cur = select.selectionTopNode(this.container, true); if (cur === false) return false; cur = endOfLine(cur, this.container); if (!cur) return false; select.focusAfterNode(cur.previousSibling, this.container); select.scrollToCursor(this.container); return true; }, pageUp: function() { var line = this.cursorPosition().line, scrollAmount = this.visibleLineCount(); if (line === false || scrollAmount === false) return false; // Try to keep one line on the screen. scrollAmount -= 2; for (var i = 0; i < scrollAmount; i++) { line = this.prevLine(line); if (line === false) break; } if (i == 0) return false; // Already at first line select.setCursorPos(this.container, {node: line, offset: 0}); select.scrollToCursor(this.container); return true; }, pageDown: function() { var line = this.cursorPosition().line, scrollAmount = this.visibleLineCount(); if (line === false || scrollAmount === false) return false; // Try to move to the last line of the current page. scrollAmount -= 2; for (var i = 0; i < scrollAmount; i++) { var nextLine = this.nextLine(line); if (nextLine === false) break; line = nextLine; } if (i == 0) return false; // Already at last line select.setCursorPos(this.container, {node: line, offset: 0}); select.scrollToCursor(this.container); return true; }, // Delay (or initiate) the next paren highlight event. scheduleParenHighlight: function() { if (this.parenEvent) parent.clearTimeout(this.parenEvent); var self = this; this.parenEvent = parent.setTimeout(function(){self.highlightParens();}, 300); }, // Take the token before the cursor. If it contains a character in // '()[]{}', search for the matching paren/brace/bracket, and // highlight them in green for a moment, or red if no proper match // was found. highlightParens: function(jump, fromKey) { var self = this, mark = this.options.markParen; if (typeof mark == "string") mark = [mark, mark]; // give the relevant nodes a colour. function highlight(node, ok) { if (!node) return; if (!mark) { node.style.fontWeight = "bold"; node.style.color = ok ? "#8F8" : "#F88"; } else if (mark.call) mark(node, ok); else node.className += " " + mark[ok ? 0 : 1]; } function unhighlight(node) { if (!node) return; if (mark && !mark.call) removeClass(removeClass(node, mark[0]), mark[1]); else if (self.options.unmarkParen) self.options.unmarkParen(node); else { node.style.fontWeight = ""; node.style.color = ""; } } if (!fromKey && self.highlighted) { unhighlight(self.highlighted[0]); unhighlight(self.highlighted[1]); } if (!window || !window.parent || !window.select) return; // Clear the event property. if (this.parenEvent) parent.clearTimeout(this.parenEvent); this.parenEvent = null; // Extract a 'paren' from a piece of text. function paren(node) { if (node.currentText) { var match = node.currentText.match(/^[\s\u00a0]*([\(\)\[\]{}])[\s\u00a0]*$/); return match && match[1]; } } // Determine the direction a paren is facing. function forward(ch) { return /[\(\[\{]/.test(ch); } var ch, cursor = select.selectionTopNode(this.container, true); if (!cursor || !this.highlightAtCursor()) return; cursor = select.selectionTopNode(this.container, true); if (!(cursor && ((ch = paren(cursor)) || (cursor = cursor.nextSibling) && (ch = paren(cursor))))) return; // We only look for tokens with the same className. var className = cursor.className, dir = forward(ch), match = matching[ch]; // Since parts of the document might not have been properly // highlighted, and it is hard to know in advance which part we // have to scan, we just try, and when we find dirty nodes we // abort, parse them, and re-try. function tryFindMatch() { var stack = [], ch, ok = true; for (var runner = cursor; runner; runner = dir ? runner.nextSibling : runner.previousSibling) { if (runner.className == className && isSpan(runner) && (ch = paren(runner))) { if (forward(ch) == dir) stack.push(ch); else if (!stack.length) ok = false; else if (stack.pop() != matching[ch]) ok = false; if (!stack.length) break; } else if (runner.dirty || !isSpan(runner) && !isBR(runner)) { return {node: runner, status: "dirty"}; } } return {node: runner, status: runner && ok}; } while (true) { var found = tryFindMatch(); if (found.status == "dirty") { this.highlight(found.node, endOfLine(found.node)); // Needed because in some corner cases a highlight does not // reach a node. found.node.dirty = false; continue; } else { highlight(cursor, found.status); highlight(found.node, found.status); if (fromKey) parent.setTimeout(function() {unhighlight(cursor); unhighlight(found.node);}, 500); else self.highlighted = [cursor, found.node]; if (jump && found.node) select.focusAfterNode(found.node.previousSibling, this.container); break; } } }, // Adjust the amount of whitespace at the start of the line that // the cursor is on so that it is indented properly. indentAtCursor: function(direction) { if (!this.container.firstChild) return; // The line has to have up-to-date lexical information, so we // highlight it first. if (!this.highlightAtCursor()) return; var cursor = select.selectionTopNode(this.container, false); // If we couldn't determine the place of the cursor, // there's nothing to indent. if (cursor === false) return; select.markSelection(); this.indentLineAfter(startOfLine(cursor), direction); select.selectMarked(); }, // Indent all lines whose start falls inside of the current // selection. indentRegion: function(start, end, direction) { var current = (start = startOfLine(start)), before = start && startOfLine(start.previousSibling); if (!isBR(end)) end = endOfLine(end, this.container); this.addDirtyNode(start); do { var next = endOfLine(current, this.container); if (current) this.highlight(before, next, true); this.indentLineAfter(current, direction); before = current; current = next; } while (current != end); select.setCursorPos(this.container, {node: start, offset: 0}, {node: end, offset: 0}); }, // Find the node that the cursor is in, mark it as dirty, and make // sure a highlight pass is scheduled. cursorActivity: function(safe) { // pagehide event hack above if (this.unloaded) { window.document.designMode = "off"; window.document.designMode = "on"; this.unloaded = false; } if (internetExplorer) { this.container.createTextRange().execCommand("unlink"); clearTimeout(this.saveSelectionSnapshot); var self = this; this.saveSelectionSnapshot = setTimeout(function() { var snapshot = select.getBookmark(self.container); if (snapshot) self.selectionSnapshot = snapshot; }, 200); } var activity = this.options.onCursorActivity; if (!safe || activity) { var cursor = select.selectionTopNode(this.container, false); if (cursor === false || !this.container.firstChild) return; cursor = cursor || this.container.firstChild; if (activity) activity(cursor); if (!safe) { this.scheduleHighlight(); this.addDirtyNode(cursor); } } }, reparseBuffer: function() { forEach(this.container.childNodes, function(node) {node.dirty = true;}); if (this.container.firstChild) this.addDirtyNode(this.container.firstChild); }, // Add a node to the set of dirty nodes, if it isn't already in // there. addDirtyNode: function(node) { node = node || this.container.firstChild; if (!node) return; for (var i = 0; i < this.dirty.length; i++) if (this.dirty[i] == node) return; if (node.nodeType != 3) node.dirty = true; this.dirty.push(node); }, allClean: function() { return !this.dirty.length; }, // Cause a highlight pass to happen in options.passDelay // milliseconds. Clear the existing timeout, if one exists. This // way, the passes do not happen while the user is typing, and // should as unobtrusive as possible. scheduleHighlight: function() { // Timeouts are routed through the parent window, because on // some browsers designMode windows do not fire timeouts. var self = this; parent.clearTimeout(this.highlightTimeout); this.highlightTimeout = parent.setTimeout(function(){self.highlightDirty();}, this.options.passDelay); }, // Fetch one dirty node, and remove it from the dirty set. getDirtyNode: function() { while (this.dirty.length > 0) { var found = this.dirty.pop(); // IE8 sometimes throws an unexplainable 'invalid argument' // exception for found.parentNode try { // If the node has been coloured in the meantime, or is no // longer in the document, it should not be returned. while (found && found.parentNode != this.container) found = found.parentNode; if (found && (found.dirty || found.nodeType == 3)) return found; } catch (e) {} } return null; }, // Pick dirty nodes, and highlight them, until options.passTime // milliseconds have gone by. The highlight method will continue // to next lines as long as it finds dirty nodes. It returns // information about the place where it stopped. If there are // dirty nodes left after this function has spent all its lines, // it shedules another highlight to finish the job. highlightDirty: function(force) { // Prevent FF from raising an error when it is firing timeouts // on a page that's no longer loaded. if (!window || !window.parent || !window.select) return false; if (!this.options.readOnly) select.markSelection(); var start, endTime = force ? null : time() + this.options.passTime; while ((time() < endTime || force) && (start = this.getDirtyNode())) { var result = this.highlight(start, endTime); if (result && result.node && result.dirty) this.addDirtyNode(result.node.nextSibling); } if (!this.options.readOnly) select.selectMarked(); if (start) this.scheduleHighlight(); return this.dirty.length == 0; }, // Creates a function that, when called through a timeout, will // continuously re-parse the document. documentScanner: function(passTime) { var self = this, pos = null; return function() { // FF timeout weirdness workaround. if (!window || !window.parent || !window.select) return; // If the current node is no longer in the document... oh // well, we start over. if (pos && pos.parentNode != self.container) pos = null; select.markSelection(); var result = self.highlight(pos, time() + passTime, true); select.selectMarked(); var newPos = result ? (result.node && result.node.nextSibling) : null; pos = (pos == newPos) ? null : newPos; self.delayScanning(); }; }, // Starts the continuous scanning process for this document after // a given interval. delayScanning: function() { if (this.scanner) { parent.clearTimeout(this.documentScan); this.documentScan = parent.setTimeout(this.scanner, this.options.continuousScanning); } }, // The function that does the actual highlighting/colouring (with // help from the parser and the DOM normalizer). Its interface is // rather overcomplicated, because it is used in different // situations: ensuring that a certain line is highlighted, or // highlighting up to X milliseconds starting from a certain // point. The 'from' argument gives the node at which it should // start. If this is null, it will start at the beginning of the // document. When a timestamp is given with the 'target' argument, // it will stop highlighting at that time. If this argument holds // a DOM node, it will highlight until it reaches that node. If at // any time it comes across two 'clean' lines (no dirty nodes), it // will stop, except when 'cleanLines' is true. maxBacktrack is // the maximum number of lines to backtrack to find an existing // parser instance. This is used to give up in situations where a // highlight would take too long and freeze the browser interface. highlight: function(from, target, cleanLines, maxBacktrack){ var container = this.container, self = this, active = this.options.activeTokens; var endTime = (typeof target == "number" ? target : null); if (!container.firstChild) return false; // Backtrack to the first node before from that has a partial // parse stored. while (from && (!from.parserFromHere || from.dirty)) { if (maxBacktrack != null && isBR(from) && (--maxBacktrack) < 0) return false; from = from.previousSibling; } // If we are at the end of the document, do nothing. if (from && !from.nextSibling) return false; // Check whether a part (<span> node) and the corresponding token // match. function correctPart(token, part){ return !part.reduced && part.currentText == token.value && part.className == token.style; } // Shorten the text associated with a part by chopping off // characters from the front. Note that only the currentText // property gets changed. For efficiency reasons, we leave the // nodeValue alone -- we set the reduced flag to indicate that // this part must be replaced. function shortenPart(part, minus){ part.currentText = part.currentText.substring(minus); part.reduced = true; } // Create a part corresponding to a given token. function tokenPart(token){ var part = makePartSpan(token.value); part.className = token.style; return part; } function maybeTouch(node) { if (node) { var old = node.oldNextSibling; if (lineDirty || old === undefined || node.nextSibling != old) self.history.touch(node); node.oldNextSibling = node.nextSibling; } else { var old = self.container.oldFirstChild; if (lineDirty || old === undefined || self.container.firstChild != old) self.history.touch(null); self.container.oldFirstChild = self.container.firstChild; } } // Get the token stream. If from is null, we start with a new // parser from the start of the frame, otherwise a partial parse // is resumed. var traversal = traverseDOM(from ? from.nextSibling : container.firstChild), stream = stringStream(traversal), parsed = from ? from.parserFromHere(stream) : Editor.Parser.make(stream); function surroundedByBRs(node) { return (node.previousSibling == null || isBR(node.previousSibling)) && (node.nextSibling == null || isBR(node.nextSibling)); } // parts is an interface to make it possible to 'delay' fetching // the next DOM node until we are completely done with the one // before it. This is necessary because often the next node is // not yet available when we want to proceed past the current // one. var parts = { current: null, // Fetch current node. get: function(){ if (!this.current) this.current = traversal.nodes.shift(); return this.current; }, // Advance to the next part (do not fetch it yet). next: function(){ this.current = null; }, // Remove the current part from the DOM tree, and move to the // next. remove: function(){ container.removeChild(this.get()); this.current = null; }, // Advance to the next part that is not empty, discarding empty // parts. getNonEmpty: function(){ var part = this.get(); // Allow empty nodes when they are alone on a line, needed // for the FF cursor bug workaround (see select.js, // insertNewlineAtCursor). while (part && isSpan(part) && part.currentText == "") { // Leave empty nodes that are alone on a line alone in // Opera, since that browsers doesn't deal well with // having 2 BRs in a row. if (window.opera && surroundedByBRs(part)) { this.next(); part = this.get(); } else { var old = part; this.remove(); part = this.get(); // Adjust selection information, if any. See select.js for details. select.snapshotMove(old.firstChild, part && (part.firstChild || part), 0); } } return part; } }; var lineDirty = false, prevLineDirty = true, lineNodes = 0; // This forEach loops over the tokens from the parsed stream, and // at the same time uses the parts object to proceed through the // corresponding DOM nodes. forEach(parsed, function(token){ var part = parts.getNonEmpty(); if (token.value == "\n"){ // The idea of the two streams actually staying synchronized // is such a long shot that we explicitly check. if (!isBR(part)) throw "Parser out of sync. Expected BR."; if (part.dirty || !part.indentation) lineDirty = true; maybeTouch(from); from = part; // Every <br> gets a copy of the parser state and a lexical // context assigned to it. The first is used to be able to // later resume parsing from this point, the second is used // for indentation. part.parserFromHere = parsed.copy(); part.indentation = token.indentation || alwaysZero; part.dirty = false; // If the target argument wasn't an integer, go at least // until that node. if (endTime == null && part == target) throw StopIteration; // A clean line with more than one node means we are done. // Throwing a StopIteration is the way to break out of a // MochiKit forEach loop. if ((endTime != null && time() >= endTime) || (!lineDirty && !prevLineDirty && lineNodes > 1 && !cleanLines)) throw StopIteration; prevLineDirty = lineDirty; lineDirty = false; lineNodes = 0; parts.next(); } else { if (!isSpan(part)) throw "Parser out of sync. Expected SPAN."; if (part.dirty) lineDirty = true; lineNodes++; // If the part matches the token, we can leave it alone. if (correctPart(token, part)){ if (active && part.dirty) active(part, token, self); part.dirty = false; parts.next(); } // Otherwise, we have to fix it. else { lineDirty = true; // Insert the correct part. var newPart = tokenPart(token); container.insertBefore(newPart, part); if (active) active(newPart, token, self); var tokensize = token.value.length; var offset = 0; // Eat up parts until the text for this token has been // removed, adjusting the stored selection info (see // select.js) in the process. while (tokensize > 0) { part = parts.get(); var partsize = part.currentText.length; select.snapshotReplaceNode(part.firstChild, newPart.firstChild, tokensize, offset); if (partsize > tokensize){ shortenPart(part, tokensize); tokensize = 0; } else { tokensize -= partsize; offset += partsize; parts.remove(); } } } } }); maybeTouch(from); webkitLastLineHack(this.container); // The function returns some status information that is used by // hightlightDirty to determine whether and where it has to // continue. return {node: parts.getNonEmpty(), dirty: lineDirty}; } }; return Editor; })(); addEventHandler(window, "load", function() { var CodeMirror = window.frameElement.CodeMirror; var e = CodeMirror.editor = new Editor(CodeMirror.options); parent.setTimeout(method(CodeMirror, "init"), 0); });
JavaScript
/* String streams are the things fed to parsers (which can feed them * to a tokenizer if they want). They provide peek and next methods * for looking at the current character (next 'consumes' this * character, peek does not), and a get method for retrieving all the * text that was consumed since the last time get was called. * * An easy mistake to make is to let a StopIteration exception finish * the token stream while there are still characters pending in the * string stream (hitting the end of the buffer while parsing a * token). To make it easier to detect such errors, the stringstreams * throw an exception when this happens. */ // Make a stringstream stream out of an iterator that returns strings. // This is applied to the result of traverseDOM (see codemirror.js), // and the resulting stream is fed to the parser. var stringStream = function(source){ // String that's currently being iterated over. var current = ""; // Position in that string. var pos = 0; // Accumulator for strings that have been iterated over but not // get()-ed yet. var accum = ""; // Make sure there are more characters ready, or throw // StopIteration. function ensureChars() { while (pos == current.length) { accum += current; current = ""; // In case source.next() throws pos = 0; try {current = source.next();} catch (e) { if (e != StopIteration) throw e; else return false; } } return true; } return { // peek: -> character // Return the next character in the stream. peek: function() { if (!ensureChars()) return null; return current.charAt(pos); }, // next: -> character // Get the next character, throw StopIteration if at end, check // for unused content. next: function() { if (!ensureChars()) { if (accum.length > 0) throw "End of stringstream reached without emptying buffer ('" + accum + "')."; else throw StopIteration; } return current.charAt(pos++); }, // get(): -> string // Return the characters iterated over since the last call to // .get(). get: function() { var temp = accum; accum = ""; if (pos > 0){ temp += current.slice(0, pos); current = current.slice(pos); pos = 0; } return temp; }, // Push a string back into the stream. push: function(str) { current = current.slice(0, pos) + str + current.slice(pos); }, lookAhead: function(str, consume, skipSpaces, caseInsensitive) { function cased(str) {return caseInsensitive ? str.toLowerCase() : str;} str = cased(str); var found = false; var _accum = accum, _pos = pos; if (skipSpaces) this.nextWhileMatches(/[\s\u00a0]/); while (true) { var end = pos + str.length, left = current.length - pos; if (end <= current.length) { found = str == cased(current.slice(pos, end)); pos = end; break; } else if (str.slice(0, left) == cased(current.slice(pos))) { accum += current; current = ""; try {current = source.next();} catch (e) {if (e != StopIteration) throw e; break;} pos = 0; str = str.slice(left); } else { break; } } if (!(found && consume)) { current = accum.slice(_accum.length) + current; pos = _pos; accum = _accum; } return found; }, // Wont't match past end of line. lookAheadRegex: function(regex, consume) { if (regex.source.charAt(0) != "^") throw new Error("Regexps passed to lookAheadRegex must start with ^"); // Fetch the rest of the line while (current.indexOf("\n", pos) == -1) { try {current += source.next();} catch (e) {if (e != StopIteration) throw e; break;} } var matched = current.slice(pos).match(regex); if (matched && consume) pos += matched[0].length; return matched; }, // Utils built on top of the above // more: -> boolean // Produce true if the stream isn't empty. more: function() { return this.peek() !== null; }, applies: function(test) { var next = this.peek(); return (next !== null && test(next)); }, nextWhile: function(test) { var next; while ((next = this.peek()) !== null && test(next)) this.next(); }, matches: function(re) { var next = this.peek(); return (next !== null && re.test(next)); }, nextWhileMatches: function(re) { var next; while ((next = this.peek()) !== null && re.test(next)) this.next(); }, equals: function(ch) { return ch === this.peek(); }, endOfLine: function() { var next = this.peek(); return next == null || next == "\n"; } }; };
JavaScript
/** * Storage and control for undo information within a CodeMirror * editor. 'Why on earth is such a complicated mess required for * that?', I hear you ask. The goal, in implementing this, was to make * the complexity of storing and reverting undo information depend * only on the size of the edited or restored content, not on the size * of the whole document. This makes it necessary to use a kind of * 'diff' system, which, when applied to a DOM tree, causes some * complexity and hackery. * * In short, the editor 'touches' BR elements as it parses them, and * the UndoHistory stores these. When nothing is touched in commitDelay * milliseconds, the changes are committed: It goes over all touched * nodes, throws out the ones that did not change since last commit or * are no longer in the document, and assembles the rest into zero or * more 'chains' -- arrays of adjacent lines. Links back to these * chains are added to the BR nodes, while the chain that previously * spanned these nodes is added to the undo history. Undoing a change * means taking such a chain off the undo history, restoring its * content (text is saved per line) and linking it back into the * document. */ // A history object needs to know about the DOM container holding the // document, the maximum amount of undo levels it should store, the // delay (of no input) after which it commits a set of changes, and, // unfortunately, the 'parent' window -- a window that is not in // designMode, and on which setTimeout works in every browser. function UndoHistory(container, maxDepth, commitDelay, editor) { this.container = container; this.maxDepth = maxDepth; this.commitDelay = commitDelay; this.editor = editor; // This line object represents the initial, empty editor. var initial = {text: "", from: null, to: null}; // As the borders between lines are represented by BR elements, the // start of the first line and the end of the last one are // represented by null. Since you can not store any properties // (links to line objects) in null, these properties are used in // those cases. this.first = initial; this.last = initial; // Similarly, a 'historyTouched' property is added to the BR in // front of lines that have already been touched, and 'firstTouched' // is used for the first line. this.firstTouched = false; // History is the set of committed changes, touched is the set of // nodes touched since the last commit. this.history = []; this.redoHistory = []; this.touched = []; this.lostundo = 0; } UndoHistory.prototype = { // Schedule a commit (if no other touches come in for commitDelay // milliseconds). scheduleCommit: function() { var self = this; parent.clearTimeout(this.commitTimeout); this.commitTimeout = parent.setTimeout(function(){self.tryCommit();}, this.commitDelay); }, // Mark a node as touched. Null is a valid argument. touch: function(node) { this.setTouched(node); this.scheduleCommit(); }, // Undo the last change. undo: function() { // Make sure pending changes have been committed. this.commit(); if (this.history.length) { // Take the top diff from the history, apply it, and store its // shadow in the redo history. var item = this.history.pop(); this.redoHistory.push(this.updateTo(item, "applyChain")); this.notifyEnvironment(); return this.chainNode(item); } }, // Redo the last undone change. redo: function() { this.commit(); if (this.redoHistory.length) { // The inverse of undo, basically. var item = this.redoHistory.pop(); this.addUndoLevel(this.updateTo(item, "applyChain")); this.notifyEnvironment(); return this.chainNode(item); } }, clear: function() { this.history = []; this.redoHistory = []; this.lostundo = 0; }, // Ask for the size of the un/redo histories. historySize: function() { return {undo: this.history.length, redo: this.redoHistory.length, lostundo: this.lostundo}; }, // Push a changeset into the document. push: function(from, to, lines) { var chain = []; for (var i = 0; i < lines.length; i++) { var end = (i == lines.length - 1) ? to : document.createElement("br"); chain.push({from: from, to: end, text: cleanText(lines[i])}); from = end; } this.pushChains([chain], from == null && to == null); this.notifyEnvironment(); }, pushChains: function(chains, doNotHighlight) { this.commit(doNotHighlight); this.addUndoLevel(this.updateTo(chains, "applyChain")); this.redoHistory = []; }, // Retrieve a DOM node from a chain (for scrolling to it after undo/redo). chainNode: function(chains) { for (var i = 0; i < chains.length; i++) { var start = chains[i][0], node = start && (start.from || start.to); if (node) return node; } }, // Clear the undo history, make the current document the start // position. reset: function() { this.history = []; this.redoHistory = []; this.lostundo = 0; }, textAfter: function(br) { return this.after(br).text; }, nodeAfter: function(br) { return this.after(br).to; }, nodeBefore: function(br) { return this.before(br).from; }, // Commit unless there are pending dirty nodes. tryCommit: function() { if (!window || !window.parent || !window.UndoHistory) return; // Stop when frame has been unloaded if (this.editor.highlightDirty()) this.commit(true); else this.scheduleCommit(); }, // Check whether the touched nodes hold any changes, if so, commit // them. commit: function(doNotHighlight) { parent.clearTimeout(this.commitTimeout); // Make sure there are no pending dirty nodes. if (!doNotHighlight) this.editor.highlightDirty(true); // Build set of chains. var chains = this.touchedChains(), self = this; if (chains.length) { this.addUndoLevel(this.updateTo(chains, "linkChain")); this.redoHistory = []; this.notifyEnvironment(); } }, // [ end of public interface ] // Update the document with a given set of chains, return its // shadow. updateFunc should be "applyChain" or "linkChain". In the // second case, the chains are taken to correspond the the current // document, and only the state of the line data is updated. In the // first case, the content of the chains is also pushed iinto the // document. updateTo: function(chains, updateFunc) { var shadows = [], dirty = []; for (var i = 0; i < chains.length; i++) { shadows.push(this.shadowChain(chains[i])); dirty.push(this[updateFunc](chains[i])); } if (updateFunc == "applyChain") this.notifyDirty(dirty); return shadows; }, // Notify the editor that some nodes have changed. notifyDirty: function(nodes) { forEach(nodes, method(this.editor, "addDirtyNode")) this.editor.scheduleHighlight(); }, notifyEnvironment: function() { if (this.onChange) this.onChange(this.editor); // Used by the line-wrapping line-numbering code. if (window.frameElement && window.frameElement.CodeMirror.updateNumbers) window.frameElement.CodeMirror.updateNumbers(); }, // Link a chain into the DOM nodes (or the first/last links for null // nodes). linkChain: function(chain) { for (var i = 0; i < chain.length; i++) { var line = chain[i]; if (line.from) line.from.historyAfter = line; else this.first = line; if (line.to) line.to.historyBefore = line; else this.last = line; } }, // Get the line object after/before a given node. after: function(node) { return node ? node.historyAfter : this.first; }, before: function(node) { return node ? node.historyBefore : this.last; }, // Mark a node as touched if it has not already been marked. setTouched: function(node) { if (node) { if (!node.historyTouched) { this.touched.push(node); node.historyTouched = true; } } else { this.firstTouched = true; } }, // Store a new set of undo info, throw away info if there is more of // it than allowed. addUndoLevel: function(diffs) { this.history.push(diffs); if (this.history.length > this.maxDepth) { this.history.shift(); lostundo += 1; } }, // Build chains from a set of touched nodes. touchedChains: function() { var self = this; // The temp system is a crummy hack to speed up determining // whether a (currently touched) node has a line object associated // with it. nullTemp is used to store the object for the first // line, other nodes get it stored in their historyTemp property. var nullTemp = null; function temp(node) {return node ? node.historyTemp : nullTemp;} function setTemp(node, line) { if (node) node.historyTemp = line; else nullTemp = line; } function buildLine(node) { var text = []; for (var cur = node ? node.nextSibling : self.container.firstChild; cur && (!isBR(cur) || cur.hackBR); cur = cur.nextSibling) if (!cur.hackBR && cur.currentText) text.push(cur.currentText); return {from: node, to: cur, text: cleanText(text.join(""))}; } // Filter out unchanged lines and nodes that are no longer in the // document. Build up line objects for remaining nodes. var lines = []; if (self.firstTouched) self.touched.push(null); forEach(self.touched, function(node) { if (node && (node.parentNode != self.container || node.hackBR)) return; if (node) node.historyTouched = false; else self.firstTouched = false; var line = buildLine(node), shadow = self.after(node); if (!shadow || shadow.text != line.text || shadow.to != line.to) { lines.push(line); setTemp(node, line); } }); // Get the BR element after/before the given node. function nextBR(node, dir) { var link = dir + "Sibling", search = node[link]; while (search && !isBR(search)) search = search[link]; return search; } // Assemble line objects into chains by scanning the DOM tree // around them. var chains = []; self.touched = []; forEach(lines, function(line) { // Note that this makes the loop skip line objects that have // been pulled into chains by lines before them. if (!temp(line.from)) return; var chain = [], curNode = line.from, safe = true; // Put any line objects (referred to by temp info) before this // one on the front of the array. while (true) { var curLine = temp(curNode); if (!curLine) { if (safe) break; else curLine = buildLine(curNode); } chain.unshift(curLine); setTemp(curNode, null); if (!curNode) break; safe = self.after(curNode); curNode = nextBR(curNode, "previous"); } curNode = line.to; safe = self.before(line.from); // Add lines after this one at end of array. while (true) { if (!curNode) break; var curLine = temp(curNode); if (!curLine) { if (safe) break; else curLine = buildLine(curNode); } chain.push(curLine); setTemp(curNode, null); safe = self.before(curNode); curNode = nextBR(curNode, "next"); } chains.push(chain); }); return chains; }, // Find the 'shadow' of a given chain by following the links in the // DOM nodes at its start and end. shadowChain: function(chain) { var shadows = [], next = this.after(chain[0].from), end = chain[chain.length - 1].to; while (true) { shadows.push(next); var nextNode = next.to; if (!nextNode || nextNode == end) break; else next = nextNode.historyAfter || this.before(end); // (The this.before(end) is a hack -- FF sometimes removes // properties from BR nodes, in which case the best we can hope // for is to not break.) } return shadows; }, // Update the DOM tree to contain the lines specified in a given // chain, link this chain into the DOM nodes. applyChain: function(chain) { // Some attempt is made to prevent the cursor from jumping // randomly when an undo or redo happens. It still behaves a bit // strange sometimes. var cursor = select.cursorPos(this.container, false), self = this; // Remove all nodes in the DOM tree between from and to (null for // start/end of container). function removeRange(from, to) { var pos = from ? from.nextSibling : self.container.firstChild; while (pos != to) { var temp = pos.nextSibling; removeElement(pos); pos = temp; } } var start = chain[0].from, end = chain[chain.length - 1].to; // Clear the space where this change has to be made. removeRange(start, end); // Insert the content specified by the chain into the DOM tree. for (var i = 0; i < chain.length; i++) { var line = chain[i]; // The start and end of the space are already correct, but BR // tags inside it have to be put back. if (i > 0) self.container.insertBefore(line.from, end); // Add the text. var node = makePartSpan(fixSpaces(line.text)); self.container.insertBefore(node, end); // See if the cursor was on this line. Put it back, adjusting // for changed line length, if it was. if (cursor && cursor.node == line.from) { var cursordiff = 0; var prev = this.after(line.from); if (prev && i == chain.length - 1) { // Only adjust if the cursor is after the unchanged part of // the line. for (var match = 0; match < cursor.offset && line.text.charAt(match) == prev.text.charAt(match); match++){} if (cursor.offset > match) cursordiff = line.text.length - prev.text.length; } select.setCursorPos(this.container, {node: line.from, offset: Math.max(0, cursor.offset + cursordiff)}); } // Cursor was in removed line, this is last new line. else if (cursor && (i == chain.length - 1) && cursor.node && cursor.node.parentNode != this.container) { select.setCursorPos(this.container, {node: line.from, offset: line.text.length}); } } // Anchor the chain in the DOM tree. this.linkChain(chain); return start; } };
JavaScript
/* Parse function for JavaScript. Makes use of the tokenizer from * tokenizejavascript.js. Note that your parsers do not have to be * this complicated -- if you don't want to recognize local variables, * in many languages it is enough to just look for braces, semicolons, * parentheses, etc, and know when you are inside a string or comment. * * See manual.html for more info about the parser interface. */ var JSParser = Editor.Parser = (function() { // Token types that can be considered to be atoms. var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true}; // Setting that can be used to have JSON data indent properly. var json = false; // Constructor for the lexical context objects. function JSLexical(indented, column, type, align, prev, info) { // indentation at start of this line this.indented = indented; // column at which this scope was opened this.column = column; // type of scope ('vardef', 'stat' (statement), 'form' (special form), '[', '{', or '(') this.type = type; // '[', '{', or '(' blocks that have any text after their opening // character are said to be 'aligned' -- any lines below are // indented all the way to the opening character. if (align != null) this.align = align; // Parent scope, if any. this.prev = prev; this.info = info; } // My favourite JavaScript indentation rules. function indentJS(lexical) { return function(firstChars) { var firstChar = firstChars && firstChars.charAt(0), type = lexical.type; var closing = firstChar == type; if (type == "vardef") return lexical.indented + 4; else if (type == "form" && firstChar == "{") return lexical.indented; else if (type == "stat" || type == "form") return lexical.indented + indentUnit; else if (lexical.info == "switch" && !closing) return lexical.indented + (/^(?:case|default)\b/.test(firstChars) ? indentUnit : 2 * indentUnit); else if (lexical.align) return lexical.column - (closing ? 1 : 0); else return lexical.indented + (closing ? 0 : indentUnit); }; } // The parser-iterator-producing function itself. function parseJS(input, basecolumn) { // Wrap the input in a token stream var tokens = tokenizeJavaScript(input); // The parser state. cc is a stack of actions that have to be // performed to finish the current statement. For example we might // know that we still need to find a closing parenthesis and a // semicolon. Actions at the end of the stack go first. It is // initialized with an infinitely looping action that consumes // whole statements. var
JavaScript
var DummyParser = Editor.Parser = (function() { function tokenizeDummy(source) { while (!source.endOfLine()) source.next(); return "text"; } function parseDummy(source) { function indentTo(n) {return function() {return n;}} source = tokenizer(source, tokenizeDummy); var space = 0; var iter = { next: function() { var tok = source.next(); if (tok.type == "whitespace") { if (tok.value == "\n") tok.indentation = indentTo(space); else space = tok.value.length; } return tok; }, copy: function() { var _space = space; return function(_source) { space = _space; source = tokenizer(_source, tokenizeDummy); return iter; }; } }; return iter; } return {make: parseDummy}; })();
JavaScript
/* Tokenizer for CSharp code */ var tokenizeCSharp = (function() { // Advance the stream until the given character (not preceded by a // backslash) is encountered, or the end of the line is reached. function nextUntilUnescaped(source, end) { var escaped = false; var next; while (!source.endOfLine()) { var next = source.next(); if (next == end && !escaped) return false; escaped = !escaped && next == "\\"; } return escaped; } // A map of JavaScript's keywords. The a/b/c keyword distinction is // very rough, but it gives the parser enough information to parse // correct code correctly (we don't care that much how we parse // incorrect code). The style information included in these objects // is used by the highlighter to pick the correct CSS style for a // token. var keywords = function(){ function result(type, style){ return {type: type, style: "csharp-" + style}; } // keywords that take a parenthised expression, and then a // statement (if) var keywordA = result("keyword a", "keyword"); // keywords that take just a statement (else) var keywordB = result("keyword b", "keyword"); // keywords that optionally take an expression, and form a // statement (return) var keywordC = result("keyword c", "keyword"); var operator = result("operator", "keyword"); var atom = result("atom", "atom"); // just a keyword with no indentation implications var keywordD = result("keyword d", "keyword"); return { "if": keywordA, "while": keywordA, "with": keywordA, "else": keywordB, "do": keywordB, "try": keywordB, "finally": keywordB, "return": keywordC, "break": keywordC, "continue": keywordC, "new": keywordC, "delete": keywordC, "throw": keywordC, "in": operator, "typeof": operator, "instanceof": operator, "var": result("var", "keyword"), "function": result("function", "keyword"), "catch": result("catch", "keyword"), "for": result("for", "keyword"), "switch": result("switch", "keyword"), "case": result("case", "keyword"), "default": result("default", "keyword"), "true": atom, "false": atom, "null": atom, "class": result("class", "keyword"), "namespace": result("class", "keyword"), "public": keywordD, "private": keywordD, "protected": keywordD, "internal": keywordD, "extern": keywordD, "override": keywordD, "virtual": keywordD, "abstract": keywordD, "static": keywordD, "out": keywordD, "ref": keywordD, "const": keywordD, "foreach": result("for", "keyword"), "using": keywordC, "int": keywordD, "double": keywordD, "long": keywordD, "bool": keywordD, "char": keywordD, "void": keywordD, "string": keywordD, "byte": keywordD, "sbyte": keywordD, "decimal": keywordD, "float": keywordD, "uint": keywordD, "ulong": keywordD, "object": keywordD, "short": keywordD, "ushort": keywordD, "get": keywordD, "set": keywordD, "value": keywordD }; }(); // Some helper regexps var isOperatorChar = /[+\-*&%=<>!?|]/; var isHexDigit = /[0-9A-Fa-f]/; var isWordChar = /[\w\$_]/; // Wrapper around jsToken that helps maintain parser state (whether // we are inside of a multi-line comment and whether the next token // could be a regular expression). function jsTokenState(inside, regexp) { return function(source, setState) { var newInside = inside; var type = jsToken(inside, regexp, source, function(c) {newInside = c;}); var newRegexp = type.type == "operator" || type.type == "keyword c" || type.type.match(/^[\[{}\(,;:]$/); if (newRegexp != regexp || newInside != inside) setState(jsTokenState(newInside, newRegexp)); return type; }; } // The token reader, inteded to be used by the tokenizer from // tokenize.js (through jsTokenState). Advances the source stream // over a token, and returns an object containing the type and style // of that token. function jsToken(inside, regexp, source, setInside) { function readHexNumber(){ source.next(); // skip the 'x' source.nextWhileMatches(isHexDigit); return {type: "number", style: "csharp-atom"}; } function readNumber() { source.nextWhileMatches(/[0-9]/); if (source.equals(".")){ source.next(); source.nextWhileMatches(/[0-9]/); } if (source.equals("e") || source.equals("E")){ source.next(); if (source.equals("-")) source.next(); source.nextWhileMatches(/[0-9]/); } return {type: "number", style: "csharp-atom"}; } // Read a word, look it up in keywords. If not found, it is a // variable, otherwise it is a keyword of the type found. function readWord() { source.nextWhileMatches(isWordChar); var word = source.get(); var known = keywords.hasOwnProperty(word) && keywords.propertyIsEnumerable(word) && keywords[word]; return known ? {type: known.type, style: known.style, content: word} : {type: "variable", style: "csharp-variable", content: word}; } function readRegexp() { nextUntilUnescaped(source, "/"); source.nextWhileMatches(/[gi]/); return {type: "regexp", style: "csharp-string"}; } // Mutli-line comments are tricky. We want to return the newlines // embedded in them as regular newline tokens, and then continue // returning a comment token for every line of the comment. So // some state has to be saved (inside) to indicate whether we are // inside a /* */ sequence. function readMultilineComment(start){ var newInside = "/*"; var maybeEnd = (start == "*"); while (true) { if (source.endOfLine()) break; var next = source.next(); if (next == "/" && maybeEnd){ newInside = null; break; } maybeEnd = (next == "*"); } setInside(newInside); return {type: "comment", style: "csharp-comment"}; } function readOperator() { source.nextWhileMatches(isOperatorChar); return {type: "operator", style: "csharp-operator"}; } function readString(quote) { var endBackSlash = nextUntilUnescaped(source, quote); setInside(endBackSlash ? quote : null); return {type: "string", style: "csharp-string"}; } // Fetch the next token. Dispatches on first character in the // stream, or first two characters when the first is a slash. if (inside == "\"" || inside == "'") return readString(inside); var ch = source.next(); if (inside == "/*") return readMultilineComment(ch); else if (ch == "\"" || ch == "'") return readString(ch); // with punctuation, the type of the token is the symbol itself else if (/[\[\]{}\(\),;\:\.]/.test(ch)) return {type: ch, style: "csharp-punctuation"}; else if (ch == "0" && (source.equals("x") || source.equals("X"))) return readHexNumber(); else if (/[0-9]/.test(ch)) return readNumber(); else if (ch == "/"){ if (source.equals("*")) { source.next(); return readMultilineComment(ch); } else if (source.equals("/")) { nextUntilUnescaped(source, null); return {type: "comment", style: "csharp-comment"};} else if (regexp) return readRegexp(); else return readOperator(); } else if (ch == "#") { // treat c# regions like comments nextUntilUnescaped(source, null); return {type: "comment", style: "csharp-comment"}; } else if (isOperatorChar.test(ch)) return readOperator(); else return readWord(); } // The external interface to the tokenizer. return function(source, startState) { return tokenizer(source, startState || jsTokenState(false, true)); }; })();
JavaScript
/* Parse function for JavaScript. Makes use of the tokenizer from * tokenizecsharp.js. Note that your parsers do not have to be * this complicated -- if you don't want to recognize local variables, * in many languages it is enough to just look for braces, semicolons, * parentheses, etc, and know when you are inside a string or comment. * * See manual.html for more info about the parser interface. */ var JSParser = Editor.Parser = (function() { // Token types that can be considered to be atoms. var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true}; // Setting that can be used to have JSON data indent properly. var json = false; // Constructor for the lexical context objects. function CSharpLexical(indented, column, type, align, prev, info) { // indentation at start of this line this.indented = indented; // column at which this scope was opened this.column = column; // type of scope ('vardef', 'stat' (statement), 'form' (special form), '[', '{', or '(') this.type = type; // '[', '{', or '(' blocks that have any text after their opening // character are said to be 'aligned' -- any lines below are // indented all the way to the opening character. if (align != null) this.align = align; // Parent scope, if any. this.prev = prev; this.info = info; } // CSharp indentation rules. function indentCSharp(lexical) { return function(firstChars) { var firstChar = firstChars && firstChars.charAt(0), type = lexical.type; var closing = firstChar == type; if (type == "vardef") return lexical.indented + 4; else if (type == "form" && firstChar == "{") return lexical.indented; else if (type == "stat" || type == "form") return lexical.indented + indentUnit; else if (lexical.info == "switch" && !closing) return lexical.indented + (/^(?:case|default)\b/.test(firstChars) ? indentUnit : 2 * indentUnit); else if (lexical.align) return lexical.column - (closing ? 1 : 0); else return lexical.indented + (closing ? 0 : indentUnit); }; } // The parser-iterator-producing function itself. function parseCSharp(input, basecolumn) { // Wrap the input in a token stream var tokens = tokenizeCSharp(input); // The parser state. cc is a stack of actions that have to be // performed to finish the current statement. For example we might // know that we still need to find a closing parenthesis and a // semicolon. Actions at the end of the stack go first. It is // initialized with an infinitely looping action that consumes // whole statements. var cc = [statements]; // The lexical scope, used mostly for indentation. var lexical = new CSharpLexical((basecolumn || 0) - indentUnit, 0, "block", false); // Current column, and the indentation at the start of the current // line. Used to create lexical scope objects. var column = 0; var indented = 0; // Variables which are used by the mark, cont, and pass functions // below to communicate with the driver loop in the 'next' // function. var consume, marked; // The iterator object. var parser = {next: next, copy: copy}; function next(){ // Start by performing any 'lexical' actions (adjusting the // lexical variable), or the operations below will be working // with the wrong lexical state. while(cc[cc.length - 1].lex) cc.pop()(); // Fetch a token. var token = tokens.next(); // Adjust column and indented. if (token.type == "whitespace" && column == 0) indented = token.value.length; column += token.value.length; if (token.content == "\n"){ indented = column = 0; // If the lexical scope's align property is still undefined at // the end of the line, it is an un-aligned scope. if (!("align" in lexical)) lexical.align = false; // Newline tokens get an indentation function associated with // them. token.indentation = indentCSharp(lexical); } // No more processing for meaningless tokens. if (token.type == "whitespace" || token.type == "comment") return token; // When a meaningful token is found and the lexical scope's // align is undefined, it is an aligned scope. if (!("align" in lexical)) lexical.align = true; // Execute actions until one 'consumes' the token and we can // return it. while(true) { consume = marked = false; // Take and execute the topmost action. cc.pop()(token.type, token.content); if (consume){ // Marked is used to change the style of the current token. if (marked) token.style = marked; return token; } } } // This makes a copy of the parser state. It stores all the // stateful variables in a closure, and returns a function that // will restore them when called with a new input stream. Note // that the cc array has to be copied, because it is contantly // being modified. Lexical objects are not mutated, and context // objects are not mutated in a harmful way, so they can be shared // between runs of the parser. function copy(){ var _lexical = lexical, _cc = cc.concat([]), _tokenState = tokens.state; return function copyParser(input){ lexical = _lexical; cc = _cc.concat([]); // copies the array column = indented = 0; tokens = tokenizeCSharp(input, _tokenState); return parser; }; } // Helper function for pushing a number of actions onto the cc // stack in reverse order. function push(fs){ for (var i = fs.length - 1; i >= 0; i--) cc.push(fs[i]); } // cont and pass are used by the action functions to add other // actions to the stack. cont will cause the current token to be // consumed, pass will leave it for the next action. function cont(){ push(arguments); consume = true; } function pass(){ push(arguments); consume = false; } // Used to change the style of the current token. function mark(style){ marked = style; } // Push a new lexical context of the given type. function pushlex(type, info) { var result = function(){ lexical = new CSharpLexical(indented, column, type, null, lexical, info) }; result.lex = true; return result; } // Pop off the current lexical context. function poplex(){ lexical = lexical.prev; } poplex.lex = true; // The 'lex' flag on these actions is used by the 'next' function // to know they can (and have to) be ran before moving on to the // next token. // Creates an action that discards tokens until it finds one of // the given type. function expect(wanted){ return function expecting(type){ if (type == wanted) cont(); else cont(arguments.callee); }; } // Looks for a statement, and then calls itself. function statements(type){ return pass(statement, statements); } // Dispatches various types of statements based on the type of the // current token. function statement(type){ if (type == "var") cont(pushlex("vardef"), vardef1, expect(";"), poplex); else if (type == "keyword a") cont(pushlex("form"), expression, statement, poplex); else if (type == "keyword b") cont(pushlex("form"), statement, poplex); else if (type == "{" && json) cont(pushlex("}"), commasep(objprop, "}"), poplex); else if (type == "{") cont(pushlex("}"), block, poplex); else if (type == "function") cont(functiondef); else if (type == "for") cont(pushlex("form"), expect("("), pushlex(")"), forspec1, expect(")"), poplex, statement, poplex); else if (type == "variable") cont(pushlex("stat"), maybelabel); else if (type == "switch") cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"), block, poplex, poplex); else if (type == "case") cont(expression, expect(":")); else if (type == "default") cont(expect(":")); else if (type == "catch") cont(pushlex("form"), expect("("), funarg, expect(")"), statement, poplex); else if (type == "class") cont(classdef); else if (type == "keyword d") cont(statement); else pass(pushlex("stat"), expression, expect(";"), poplex); } // Dispatch expression types. function expression(type){ if (atomicTypes.hasOwnProperty(type)) cont(maybeoperator); else if (type == "function") cont(functiondef); else if (type == "keyword c") cont(expression); else if (type == "(") cont(pushlex(")"), expression, expect(")"), poplex, maybeoperator); else if (type == "operator") cont(expression); else if (type == "[") cont(pushlex("]"), commasep(expression, "]"), poplex, maybeoperator); else if (type == "{") cont(pushlex("}"), commasep(objprop, "}"), poplex, maybeoperator); } // Called for places where operators, function calls, or // subscripts are valid. Will skip on to the next action if none // is found. function maybeoperator(type){ if (type == "operator") cont(expression); else if (type == "(") cont(pushlex(")"), expression, commasep(expression, ")"), poplex, maybeoperator); else if (type == ".") cont(property, maybeoperator); else if (type == "[") cont(pushlex("]"), expression, expect("]"), poplex, maybeoperator); } // When a statement starts with a variable name, it might be a // label. If no colon follows, it's a regular statement. function maybelabel(type){ if (type == ":") cont(poplex, statement); else if (type == "(") cont(commasep(funarg, ")"), poplex, statement); // method definition else if (type == "{") cont(poplex, pushlex("}"), block, poplex); // property definition else pass(maybeoperator, expect(";"), poplex); } // Property names need to have their style adjusted -- the // tokenizer thinks they are variables. function property(type){ if (type == "variable") {mark("csharp-property"); cont();} } // This parses a property and its value in an object literal. function objprop(type){ if (type == "variable") mark("csharp-property"); if (atomicTypes.hasOwnProperty(type)) cont(expect(":"), expression); } // Parses a comma-separated list of the things that are recognized // by the 'what' argument. function commasep(what, end){ function proceed(type) { if (type == ",") cont(what, proceed); else if (type == end) cont(); else cont(expect(end)); }; return function commaSeparated(type) { if (type == end) cont(); else pass(what, proceed); }; } // Look for statements until a closing brace is found. function block(type){ if (type == "}") cont(); else pass(statement, block); } // Variable definitions are split into two actions -- 1 looks for // a name or the end of the definition, 2 looks for an '=' sign or // a comma. function vardef1(type, value){ if (type == "variable"){cont(vardef2);} else cont(); } function vardef2(type, value){ if (value == "=") cont(expression, vardef2); else if (type == ",") cont(vardef1); } // For loops. function forspec1(type){ if (type == "var") cont(vardef1, forspec2); else if (type == "keyword d") cont(vardef1, forspec2); else if (type == ";") pass(forspec2); else if (type == "variable") cont(formaybein); else pass(forspec2); } function formaybein(type, value){ if (value == "in") cont(expression); else cont(maybeoperator, forspec2); } function forspec2(type, value){ if (type == ";") cont(forspec3); else if (value == "in") cont(expression); else cont(expression, expect(";"), forspec3); } function forspec3(type) { if (type == ")") pass(); else cont(expression); } // A function definition creates a new context, and the variables // in its argument list have to be added to this context. function functiondef(type, value){ if (type == "variable") cont(functiondef); else if (type == "(") cont(commasep(funarg, ")"), statement); } function funarg(type, value){ if (type == "variable"){cont();} } function classdef(type) { if (type == "variable") cont(classdef, statement); else if (type == ":") cont(classdef, statement); } return parser; } return { make: parseCSharp, electricChars: "{}:", configure: function(obj) { if (obj.json != null) json = obj.json; } }; })();
JavaScript
function waitForStyles() { for (var i = 0; i < document.styleSheets.length; i++) if (/googleapis/.test(document.styleSheets[i].href)) return document.body.className += " droid"; setTimeout(waitForStyles, 100); } setTimeout(function() { if (/AppleWebKit/.test(navigator.userAgent) && /iP[oa]d|iPhone/.test(navigator.userAgent)) return; var link = document.createElement("LINK"); link.type = "text/css"; link.rel = "stylesheet"; link.href = "http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans:bold"; document.documentElement.getElementsByTagName("HEAD")[0].appendChild(link); waitForStyles(); }, 20);
JavaScript
CKFinder.addPlugin( 'fileeditor', function( api ) { var regexExt = /^(.*)\.([^\.]+)$/, regexTextExt = /^(txt|css|html|htm|js|asp|cfm|cfc|ascx|php|inc|xml|xslt|xsl)$/i, regexCodeMirrorExt = /^(css|html|htm|js|xml|xsl|php)$/i, codemirror, file, fileLoaded = false, doc; var codemirrorPath = CKFinder.getPluginPath('fileeditor') + 'codemirror/'; var codeMirrorParsers = { css : 'parsecss.js', js : [ 'tokenizejavascript.js', 'parsejavascript.js' ], xml : 'parsexml.js', php : ['parsexml.js', 'parsecss.js', 'tokenizejavascript.js', 'parsejavascript.js', '../contrib/php/js/tokenizephp.js', '../contrib/php/js/parsephp.js', '../contrib/php/js/parsephphtmlmixed.js'] }; var codeMirrorCss = { css : codemirrorPath + 'css/csscolors.css', js : codemirrorPath + 'css/jscolors.css', xml : codemirrorPath + 'css/xmlcolors.css', php : [ codemirrorPath + 'css/xmlcolors.css', codemirrorPath + 'css/jscolors.css', codemirrorPath + 'css/csscolors.css', codemirrorPath + 'contrib/php/css/phpcolors.css' ] }; codeMirrorCss.xsl = codeMirrorCss.xml; codeMirrorCss.htm = codeMirrorCss.xml; codeMirrorCss.html = codeMirrorCss.xml; codeMirrorParsers.xsl = codeMirrorParsers.xml; codeMirrorParsers.htm = codeMirrorParsers.xml; codeMirrorParsers.html = codeMirrorParsers.xml; var isTextFile = function( file ) { return regexTextExt.test( file.ext ); }; CKFinder.dialog.add( 'fileEditor', function( api ) { var height, width; var saveButton = (function() { return { id : 'save', label : api.lang.Fileeditor.save, type : 'button', onClick : function ( evt ) { if ( !fileLoaded ) return true; var dialog = evt.data.dialog; var content = codemirror ? codemirror.getCode() : doc.getById( 'fileContent' ).getValue(); api.connector.sendCommandPost( "SaveFile", null, { content : content, fileName : file.name }, function( xml ) { if ( xml.checkError() ) return false; api.openMsgDialog( '', api.lang.Fileeditor.fileSaveSuccess ); dialog.hide(); return undefined; }, file.folder.type, file.folder ); return false; } }; })(); if ( api.inPopup ) { width = api.document.documentElement.offsetWidth; height = api.document.documentElement.offsetHeight; } else { var parentWindow = ( api.document.parentWindow || api.document.defaultView ).parent; width = parentWindow.innerWidth ? parentWindow.innerWidth : parentWindow.document.documentElement.clientWidth; height = parentWindow.innerHeight ? parentWindow.innerHeight : parentWindow.document.documentElement.clientHeight; } return { title : api.getSelectedFile().name, // TODO CKFINDER.DIALOG_RESIZE_BOTH // resizable : CKFINDER.DIALOG_RESIZE_BOTH, minWidth : parseInt( width, 10 ) * 0.6, minHeight : parseInt( height, 10 ) * 0.7, onHide : function() { if ( fileLoaded ) { var fileContent = doc.getById( 'fileContent' ); if ( fileContent ) fileContent.remove(); } }, onShow : function() { var dialog = this; var cssWidth = parseInt( width, 10 ) * 0.6 - 10; var cssHeight = parseInt( height, 10 ) * 0.7 - 20; doc = dialog.getElement().getDocument(); var win = doc.getWindow(); doc.getById( 'fileArea' ).setHtml( '<div class="ckfinder_loader_32" style="margin: 100px auto 0 auto;text-align:center;"><p style="height:' + cssHeight + 'px;width:' + cssWidth + 'px;">' + api.lang.Fileeditor.loadingFile + '</p></div>' ); file = api.getSelectedFile(); var enableCodeMirror = regexCodeMirrorExt.test( file.ext ); this.setTitle( file.name ); if ( enableCodeMirror && win.$.CodeMirror === undefined ) { var head= doc.$.getElementsByTagName( 'head' )[0]; var script= doc.$.createElement( 'script' ); script.type= 'text/javascript'; script.src = CKFinder.getPluginPath( 'fileeditor' ) + 'codemirror/js/codemirror.js'; head.appendChild( script ); } // If CKFinder is runninng under a different domain than baseUrl, then the following call will fail: // CKFinder.ajax.load( file.getUrl() + '?t=' + (new Date().getTime()), function( data )... var url = api.connector.composeUrl( 'DownloadFile', { FileName : file.name, format : 'text', t : new Date().getTime() }, file.folder.type, file.folder ); CKFinder.ajax.load( url, function( data ) { if ( data === null || ( file.size > 0 && data === '' ) ) { api.openMsgDialog( '', api.lang.Fileeditor.fileOpenError ); dialog.hide(); return; } else fileLoaded = true; var fileArea = doc.getById( 'fileArea' ); fileArea.setStyle('height', '100%'); fileArea.setHtml( '<textarea id="fileContent" style="height:' + cssHeight + 'px; width:' + cssWidth + 'px"></textarea>' ); doc.getById( 'fileContent' ).setText( data ); codemirror = null; if ( enableCodeMirror && win.$.CodeMirror !== undefined ) { codemirror = win.$.CodeMirror.fromTextArea( doc.getById( 'fileContent').$, { height : cssHeight + 'px', parserfile : codeMirrorParsers[ file.ext.toLowerCase() ], stylesheet : codeMirrorCss[ file.ext.toLowerCase() ], path : codemirrorPath + "js/" } ); // TODO get rid of ugly buttons and provide something better var undoB = doc.createElement( "button", { attributes: { "label" : api.lang.common.undo } } ); undoB.on( 'click', function() { codemirror.undo(); }); undoB.setHtml( api.lang.common.undo ); undoB.appendTo( doc.getById( 'fileArea' ) ); var redoB = doc.createElement( 'button', { attributes: { "label" : api.lang.common.redo } } ); redoB.on('click', function() { codemirror.redo(); }); redoB.setHtml( api.lang.common.redo ); redoB.appendTo( doc.getById( 'fileArea' ) ); } }); }, contents : [ { id : 'tab1', label : '', title : '', expand : true, padding : 0, elements : [ { type : 'html', id : 'htmlLoader', html : '' + '<style type="text/css">' + '.CodeMirror-wrapping {background:white;}' + '</style>' + '<div id="fileArea"></div>' } ] } ], // TODO http://dev.fckeditor.net/ticket/4750 buttons : [ saveButton, CKFinder.dialog.cancelButton ] }; } ); api.addFileContextMenuOption( { label : api.lang.Fileeditor.contextMenuName, command : "fileEditor" } , function( api, file ) { api.openDialog( 'fileEditor' ); }, function ( file ) { var maxSize = 1024; if ( typeof (CKFinder.config.fileeditorMaxSize) != 'undefined' ) maxSize = CKFinder.config.fileeditorMaxSize; // Disable for images, binary files, large files etc. if ( isTextFile( file ) && file.size <= maxSize ) { if ( file.folder.acl.fileDelete ) return true; else return -1; } return false; }); } );
JavaScript
/** * Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.html or http://ckeditor.com/license * * CKFinder 2.x - sample "dummy" plugin. * * To enable it, add the following line to config.js: * config.extraPlugins = 'dummy'; */ /** * See http://docs.cksource.com/ckfinder_2.x_api/symbols/CKFinder.html#.addPlugin */ CKFinder.addPlugin( 'dummy', { lang : [ 'en', 'pl' ], appReady : function( api ) { CKFinder.dialog.add( 'dummydialog', function( api ) { // CKFinder.dialog.definition var dialogDefinition = { title : api.lang.dummy.title, minWidth : 390, minHeight : 230, onOk : function() { // "this" is now a CKFinder.dialog object. var value = this.getValueOf( 'tab1', 'textareaId' ); if ( !value ) { api.openMsgDialog( '', api.lang.dummy.typeText ); return false; } else { alert( "You have entered: " + value ); } }, contents : [ { id : 'tab1', label : '', title : '', expand : true, padding : 0, elements : [ { type : 'html', html : '<h3>' + api.lang.dummy.typeText + '</h3>' }, { type : 'textarea', id : 'textareaId', rows : 10, cols : 40 } ] } ], buttons : [ CKFinder.dialog.cancelButton, CKFinder.dialog.okButton ] }; return dialogDefinition; } ); api.addFileContextMenuOption( { label : api.lang.dummy.menuItem, command : "dummycommand" } , function( api, file ) { api.openDialog('dummydialog'); }); } });
JavaScript
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKFinder.setPluginLang( 'dummy', 'pl', { dummy : { title : 'Testowe okienko', menuItem : 'Otwórz okienko dummy', typeText : 'Podaj jakiś tekst.' } });
JavaScript
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKFinder.setPluginLang( 'dummy', 'en', { dummy : { title : 'Dummy dialog', menuItem : 'Open dummy dialog', typeText : 'Please type some text.' } });
JavaScript
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function () { var a = (function () { var f = { jY: 'B23C', _: {}, status: 'unloaded', basePath: (function () { var i = window.CKFINDER_BASEPATH || ''; if (!i) { var j = document.getElementsByTagName('script'); for (var k = 0; k < j.length; k++) { var l = j[k].src.match(/(^|.*[\\\/])CKFINDER(?:_basic)?(?:_v2)?(?:_source)?.js(?:\?.*)?$/i); if (l) { i = l[1]; break; } } } if (i.indexOf('://') == -1) if (i.indexOf('/') === 0) i = location.href.match(/^.*?:\/\/[^\/]*/)[0] + i; else i = location.href.match(/^[^\?]*\/(?:)/)[0] + i; return i; })(), getUrl: function (i) { if (i.indexOf('://') == -1 && i.indexOf('/') !== 0) i = this.basePath + i; if (this.jY && i.charAt(i.length - 1) != '/') i += (i.indexOf('?') >= 0 ? '&' : '?') + 't=' + this.jY; return i; } }, g = window.CKFINDER_GETURL; if (g) { var h = f.getUrl; f.getUrl = function (i) { return g.call(f, i) || h.call(f, i); }; } return f; })(); function b(f) { return a.instances[f]; }; var c = { callback: 1, selectThumbnailActionFunction: 1, selectActionFunction: 1 }; a.jd = function () { var h = this; var f = {}; for (var g in h) { if (!h.hasOwnProperty(g)) continue; if (typeof h[g] == 'function' && !c[g]) continue; f[g] = h[g]; } if (h.callback) f.callback = h.callback; return f; }; a.lj = function (f) { var i = this; f = f || i.basePath; var g = ''; if (!f || f.length === 0) f = CKFinder.DEFAULT_basePath; if (f.substr(f.length - 1, 1) != '/') f += '/'; f += 'ckfinder.html'; var h; if (i.hh) { h = i.hh; if (typeof h == 'function') h = h.toString().match(/function ([^(]+)/)[1]; g += '?action=js&amp;func=' + h; } if (i.jx) { g += g ? '&amp;' : '?'; g += 'data=' + encodeURIComponent(i.jx); } if (i.disableThumbnailSelection) { g += g ? '&amp;' : '?'; g += 'dts=1'; } else if (i.lH || i.hh) { h = i.lH || i.hh; if (typeof h == 'function') h = h.toString().match(/function ([^(]+)/)[1]; g += g ? '&amp;' : '?'; g += 'thumbFunc=' + h; if (i.nm) g += '&amp;tdata=' + encodeURIComponent(i.nm); else if (!i.lH && i.jx) g += '&amp;tdata=' + encodeURIComponent(i.jx); } if (i.startupPath) { g += g ? '&amp;' : '?'; g += 'start=' + encodeURIComponent(i.startupPath + (i.startupFolderExpanded ? ':1' : ':0')); } if (!i.rememberLastFolder) { g += g ? '&amp;' : '?'; g += 'rlf=0'; } if (i.id) { g += g ? '&amp;' : '?'; g += 'id=' + encodeURIComponent(i.id); } if (i.skin) { g += g ? '&amp;' : '?'; g += 'skin=' + encodeURIComponent(i.skin); } return f + g; }; function d(f) { var i = this; i.id = f.name; var g = f.ax.getDocument().getWindow().$, h = a.oC.getWindow().$; i.inPopup = !!(g && g.opener); i.inIframe = !i.inPopup && g != h.top && g.frameElement.nodeName.toLowerCase() == 'iframe'; i.inFrame = !i.inPopup && g != h.top && g.frameElement.nodeName.toLowerCase() == 'frame'; i.inUrlPopup = !!(i.inPopup && h.opener); }; function e(f, g, h) { g.on('appReady', function (i) { i.aF(); f.document = g.document.$; f.folders = g.folders; f.files = g.aG['filesview.filesview'][0].data().files; f.basketFiles = g.basketFiles; f.resourceTypes = g.resourceTypes; f.connector = g.connector; f.lang = g.lang; f.langCode = g.langCode; f.config = g.config; g.aG['foldertree.foldertree'][0].on('afterAddFolder', function (j) { j.aF(); if (h) h(f); }, f); }, f, null, 999); }; d.prototype = { _: {}, addFileContextMenuOption: function (f, g, h) { var i = b(this.id), j = 'FileContextMenu_' + f.command; i.bD(j, { exec: function (m) { var n = m.aG['filesview.filesview'][0].tools.dH(); g(m.cg, n); } }); f.command = j; if (!f.group) f.group = 'file1'; i.gp(j, f); var k = i.aG['filesview.filesview']; for (var l = 0; l < k.length; l++) k[l].on('beforeContextMenu', function o(m) { if (h) { var n = h(this.tools.dH()); if (n) m.data.bj[j] = n == -1 ? a.aY : a.aS; } else m.data.bj[j] = a.aS; }); }, disableFileContextMenuOption: function (f, g) { var h = b(this.id), i = g ? 'FileContextMenu_' + f : f, j = h.aG['filesview.filesview'], k = []; for (var l = 0; l < j.length; l++) { var m = k.push(function o(n) { delete n.data.bj[i]; }); j[l].on('beforeContextMenu', k[m - 1]); } return function () { for (var n = 0; n < k.length; n++) h.aG['foldertree.foldertree'][n].aF('beforeContextMenu', k[n]); }; }, addFolderContextMenuOption: function (f, g, h) { var i = b(this.id), j = 'FolderContextMenu_' + f.command; i.bD(j, { exec: function (m) { g(m.cg, m.aV); } }); f.command = j; if (!f.group) f.group = 'folder1'; i.gp(j, f); var k = i.aG['foldertree.foldertree']; for (var l = 0; l < k.length; l++) k[l].on('beforeContextMenu', function o(m) { if (h) { var n = h(this.app.aV); if (n) m.data.bj[j] = n == -1 ? a.aY : a.aS; } else m.data.bj[j] = a.aS; }); }, disableFolderContextMenuOption: function (f, g) { var h = b(this.id), i = g ? 'FolderContextMenu_' + f : f, j = h.aG['foldertree.foldertree'], k = []; for (var l = 0; l < j.length; l++) { var m = k.push(function o(n) { delete n.data.bj[i]; }); j[l].on('beforeContextMenu', k[m - 1]); } return function () { for (var n = 0; n < k.length; n++) h.aG['foldertree.foldertree'][n].aF('beforeContextMenu', k[n]); }; }, getSelectedFile: function () { return b(this.id).aG['filesview.filesview'][0].tools.dH(); }, getSelectedFolder: function () { return b(this.id).aV; }, setUiColor: function (f) { return b(this.id).setUiColor(f); }, openDialog: function (f, g) { var j = this; var h = new a.dom.document(window.document).eD(), i = b(j.id).document.getWindow(); if (j.inFrame || j.inPopup || j.inIframe) a.document = b(j.id).document; return b(j.id).openDialog(f, g, h); }, openMsgDialog: function (f, g) { b(this.id).msgDialog(f, g); }, openConfirmDialog: function (f, g, h) { b(this.id).fe(f, g, h); }, openInputDialog: function (f, g, h, i) { b(this.id).hs(f, g, h, i); }, addTool: function (f) { return b(this.id).plugins.tools.addTool(f); }, addToolPanel: function (f) { return b(this.id).plugins.tools.addToolPanel(f); }, removeTool: function (f) { b(this.id).plugins.tools.removeTool(f); }, showTool: function (f) { b(this.id).plugins.tools.showTool(f); }, hideTool: function (f) { b(this.id).plugins.tools.hideTool(f); }, getResourceType: function (f) { return b(this.id).getResourceType(f); }, log: function (f) { a.log.apply(a.log, arguments); }, getLog: function () { return a.mZ(); }, emptyBasket: function () { b(this.id).execCommand('TruncateBasket'); }, replaceUploadForm: function (f, g) { var h = b(this.id); h.aG['formpanel.formpanel'][0].on('beforeUploadFileForm', function (i) { if (i.data.step != 2) return; i.cancel(true); var j = this.data(), k = i.data.folder; try { if (j.dc == 'upload') this.oW('requestUnloadForm', function () { this.app.cS('upload').bR(a.aS); }); else { if (this.data().dc) this.oW('requestUnloadForm'); this.oW('requestLoadForm', { html: f, command: 'upload' }); g && g(); } } catch (l) { this.oW('failedUploadFileForm', i.data); this.oW('afterUploadFileForm', i.data); throw a.ba(l); } }); return { hide: function () { h.oW('requestUnloadForm', function () { h.cS('upload').bR(a.aS); }); } }; }, refreshOpenedFolder: function () { var f = b(this.id), g = f.aG['filesview.filesview'][0].tools.currentFolder(); f.oW('requestSelectFolder', { folder: g }); }, closePopup: function () { if (!this.inPopup) return; b(this.id).ax.getDocument().getWindow().$.close(); } }; (function () { window.CKFinder = function (f, g) { if (f) for (var h in f) { if (!f.hasOwnProperty(h)) continue; if (typeof f[h] == 'function' && h != 'callback') continue; this[h] = f[h]; } this.callback = g; }; CKFinder.prototype = { create: function (f) { var g = 'ckf' + Math.random().toString().substr(2, 4); document.write('<span id="' + g + '"></span>'); f = a.tools.extend(a.jd.call(this), f, true); var h = a.replace(g, f, CKFinder); this.lN = h.cg; return h.cg; }, appendTo: function (f, g) { g = a.tools.extend(a.jd.call(this), g, true); var h = a.appendTo(f, g, CKFinder); this.lN = h.cg; return h.cg; }, replace: function (f, g) { g = a.tools.extend(a.jd.call(this), g, true); var h = a.replace(f, g, CKFinder); this.lN = h.cg; return h.cg; }, popup: function (f, g) { var o = this; f = f || '80%'; g = g || '70%'; if (typeof f == 'string' && f.length > 1 && f.substr(f.length - 1, 1) == '%') f = parseInt(window.screen.width * parseInt(f, 10) / 100, 10); if (typeof g == 'string' && g.length > 1 && g.substr(g.length - 1, 1) == '%') g = parseInt(window.screen.height * parseInt(g, 10) / 100, 10); if (f < 200) f = 200; if (g < 200) g = 200; var h = parseInt((window.screen.height - g) / 2, 10), i = parseInt((window.screen.width - f) / 2, 10), j = 'location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,jy=yes,width=' + f + ',height=' + g + ',top=' + h + ',left=' + i, k = a.env.webkit ? 'about:blank' : '', l = window.open(k, 'CKFinderpopup', j, true); if (!l) return false; o.width = o.height = '100%'; var m = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><title>CKFinder 2</title><style type="text/css">body, html, iframe, #ckfinder { margin: 0; padding: 0; border: 0; width: 100%; height: 100%; overflow: hidden; }</style></head><body></body></html>', n = new a.dom.document(l.document); n.$.open(); if (a.env.isCustomDomain()) n.$.domain = window.document.domain; n.$.write(m); n.$.close(); try { l.moveTo(i, h); l.resizeTo(f, g); l.focus(); return o.appendTo(n.bH()); } catch (p) { return o.appendTo(n.bH()); } return false; } }; CKFinder._ = {}; CKFinder.lang = {}; CKFinder.version = '2.0.2'; CKFinder.revision = 'UNKNOWN'; CKFinder.addPlugin = function (f, g, h) { var i = { bM: h || [] }; if (typeof g == 'function') g = { appReady: g }; for (var j in g) { if (!g.hasOwnProperty(j)) continue; if (j != 'connectorInitialized' && j != 'uiReady') i[j] = g[j]; } i.bz = function (k) { if (g.connectorInitialized) k.on('connectorInitialized', function (l) { var m = g.connectorInitialized; if (m) m.call(m, k.cg, l.data.xml); }, null, null, 1000); if (g.uiReady) k.on('uiReady', function () { var l = g.uiReady; l.call(l, k.cg); }, null, null, 1000); if (g.appReady) k.on('appReady', function () { var l = g.appReady; l.call(l, k.cg); }, null, null, 1000); }; a.plugins.add(f, i); }; CKFinder.getPluginPath = function (f) { return a.plugins.getPath(f); }; CKFinder.addExternalPlugin = function (f, g, h) { a.plugins.tR(f, g, h); }; CKFinder.setPluginLang = function (f, g, h) { a.plugins.rX(f, g, h); }; CKFinder.dialog = { add: function (f, g) { if (typeof g == 'function') g = a.tools.override(g, function (h) { return function (i) { return h(i.cg); }; }); a.dialog.add(f, g); } }; CKFinder.tools = {}; CKFinder.env = {}; CKFinder.dom = {}; CKFinder.create = function (f, g, h, i, j) { var k; if (f !== null && typeof f === 'object') { k = new CKFinder(); for (var l in f) k[l] = f[l]; } else { k = new CKFinder(); k.basePath = f; if (g) k.width = g; if (h) k.height = g; if (i) k.selectActionFunction = i; if (j) k.callback = j; } return k.create(); }; CKFinder.popup = function (f, g, h, i, j) { var k; if (f !== null && typeof f === 'object') { k = new CKFinder(); for (var l in f) k[l] = f[l]; } else { k = new CKFinder(); k.basePath = f; if (i) k.selectActionFunction = i; if (j) k.callback = j; } return k.popup(g, h); }; CKFinder.setupFCKeditor = function (f, g, h, i) { var j; if (g !== null && typeof g === 'object') { j = new CKFinder(); for (var k in g) { j[k] = g[k]; if (k == 'width') { var l = j[k] || 800; if (typeof l == 'string' && l.length > 1 && l.substr(l.length - 1, 1) == '%') l = parseInt(window.screen.width * parseInt(l, 10) / 100, 10); f.Config.LinkBrowserWindowWidth = l; f.Config.ImageBrowserWindowWidth = l; f.Config.FlashBrowserWindowWidth = l; } else if (k == 'height') { var m = j[k] || 600; if (typeof m == 'string' && m.length > 1 && m.substr(m.length - 1, 1) == '%') m = parseInt(window.screen.height * parseInt(m, 10) / 100, 10); f.Config.LinkBrowserWindowHeight = m; f.Config.ImageBrowserWindowHeight = m; f.Config.FlashBrowserWindowHeight = m; } } } else { j = new CKFinder(); j.basePath = g; } var n = j.basePath; if (n.substr(0, 1) != '/' && n.indexOf('://') == -1) n = document.location.pathname.substring(0, document.location.pathname.lastIndexOf('/') + 1) + n; n = a.lj.call(j, n); var o = n.indexOf('?') !== -1 ? '&amp;' : '?'; f.Config.LinkBrowserURL = n; f.Config.ImageBrowserURL = n + o + 'type=' + (h || 'Images'); f.Config.FlashBrowserURL = n + o + 'type=' + (i || 'Flash'); var p = n.substring(0, 1 + n.lastIndexOf('/')); f.Config.LinkUploadURL = p + 'core/connector/' + CKFinder.config.connectorLanguage + '/connector.' + CKFinder.config.connectorLanguage + '?command=QuickUpload&type=Files'; f.Config.ImageUploadURL = p + 'core/connector/' + CKFinder.config.connectorLanguage + '/connector.' + CKFinder.config.connectorLanguage + '?command=QuickUpload&type=' + (h || 'Images'); f.Config.FlashUploadURL = p + 'core/connector/' + CKFinder.config.connectorLanguage + '/connector.' + CKFinder.config.connectorLanguage + '?command=QuickUpload&type=' + (i || 'Flash'); }; CKFinder.setupCKEditor = function (f, g, h, i) { if (f === null) { for (var j in CKEDITOR.instances) CKFinder.setupCKEditor(CKEDITOR.instances[j], g, h, i); CKEDITOR.on('instanceCreated', function (r) { CKFinder.setupCKEditor(r.editor, g, h, i); }); return; } var k; if (g !== null && typeof g === 'object') { k = new CKFinder(); for (var l in g) { k[l] = g[l]; if (l == 'width') { var m = k[l] || 800; if (typeof m == 'string' && m.length > 1 && m.substr(m.length - 1, 1) == '%') m = parseInt(window.screen.width * parseInt(m, 10) / 100, 10); f.config.filebrowserWindowWidth = m; } else if (l == 'height') { var n = k[l] || 600; if (typeof n == 'string' && n.length > 1 && n.substr(n.length - 1, 1) == '%') n = parseInt(window.screen.height * parseInt(n, 10) / 100, 10); f.config.filebrowserWindowHeight = m; } } } else { k = new CKFinder(); k.basePath = g; } var o = k.basePath; if (o.substr(0, 1) != '/' && o.indexOf('://') == -1) o = document.location.pathname.substring(0, document.location.pathname.lastIndexOf('/') + 1) + o; o = a.lj.call(k, o); var p = o.indexOf('?') !== -1 ? '&amp;' : '?'; f.config.filebrowserBrowseUrl = o; f.config.filebrowserImageBrowseUrl = o + p + 'type=' + (h || 'Images'); f.config.filebrowserFlashBrowseUrl = o + p + 'type=' + (i || 'Flash'); var q = o.substring(0, 1 + o.lastIndexOf('/')); f.config.filebrowserUploadUrl = q + 'core/connector/' + CKFinder.config.connectorLanguage + '/connector.' + CKFinder.config.connectorLanguage + '?command=QuickUpload&type=Files'; f.config.filebrowserImageUploadUrl = q + 'core/connector/' + CKFinder.config.connectorLanguage + '/connector.' + CKFinder.config.connectorLanguage + '?command=QuickUpload&type=' + (h || 'Images'); f.config.filebrowserFlashUploadUrl = q + 'core/connector/' + CKFinder.config.connectorLanguage + '/connector.' + CKFinder.config.connectorLanguage + '?command=QuickUpload&type=' + (i || 'Flash'); }; })(); if (!a.event) { a.event = function () { }; a.event.du = function (f, g) { var h = a.event.prototype; for (var i in h) { if (f[i] == undefined) f[i] = h[i]; } }; a.event.prototype = (function () { var f = function (h) { var i = h.kk && h.kk() || h._ || (h._ = {}); return i.cC || (i.cC = {}); }, g = function (h) { this.name = h; this.dF = []; }; g.prototype = { mi: function (h) { for (var i = 0, j = this.dF; i < j.length; i++) { if (j[i].gg == h) return i; } return -1; } }; return { on: function (h, i, j, k, l) { var m = f(this), n = m[h] || (m[h] = new g(h)); if (n.mi(i) < 0) { var o = n.dF; if (!j) j = this; if (isNaN(l)) l = 10; var p = this, q = function (s, t, u, v) { var w = { name: h, jN: this, application: s, data: t, jO: k, stop: u, cancel: v, aF: function () { p.aF(h, i); } }; i.call(j, w); return w.data; }; q.gg = i; q.nT = l; for (var r = o.length - 1; r >= 0; r--) { if (o[r].nT <= l) { o.splice(r + 1, 0, q); return; } } o.unshift(q); } }, oW: (function () { var h = false, i = function () { h = true; }, j = false, k = function (l) { j = l ? 2 : true; }; return function w(l, m, n, o) { if (typeof m == 'function') { o = m; m = null; } else if (typeof n == 'function') { o = n; n = null; } if (l != 'mousemove') a.log('[EVENT] ' + l, m, o); var p = f(this)[l], q = h, r = j; h = j = false; if (p) { var s = p.dF; if (s.length) { s = s.slice(0); for (var t = 0; t < s.length; t++) { var u = s[t].call(this, n, m, i, k); if (typeof u != 'undefined') m = u; if (h || j && j != 2) break; } } } var v = j || (typeof m == 'undefined' ? false : !m || typeof m.result == 'undefined' ? m : m.result); if (typeof o === 'function' && j != 2) v = o.call(this, j, m) || v; h = q; j = r; return v; }; })(), cr: function (h, i, j) { var k = this.oW(h, i, j); delete f(this)[h]; return k; }, aF: function (h, i) { var j = f(this)[h]; if (j) { var k = j.mi(i); if (k >= 0) j.dF.splice(k, 1); } }, mF: function () { var h = f(this); for (var i = 0; i < h.length; i++) h[i].dF = []; }, rC: function (h) { var i = f(this)[h]; return i && i.dF.length > 0; } }; })(); } if (!a.application) { a.kZ = 0; a.fc = 1; a.qE = 2; a.application = function (f, g, h, i) { var j = this; j._ = { kw: f, ax: g }; j.ff = h || a.kZ; a.event.call(j); j.iI(i); }; a.application.replace = function (f, g, h) { var i = f; if (typeof i != 'object') { i = document.getElementById(f); if (!i) { var j = 0, k = document.getElementsByName(f); while ((i = k[j++]) && i.tagName.toLowerCase() != 'textarea') { } } if (!i) throw '[CKFINDER.application.replace] The ax with id or name "' + f + '" was not found.'; } return new a.application(g, i, a.fc, h); }; a.application.appendTo = function (f, g, h) { if (typeof f != 'object') { f = document.getElementById(f); if (!f) throw '[CKFINDER.application.appendTo] The ax with id "' + f + '" was not found.'; } return new a.application(g, f, a.qE, h); }; a.application.prototype = { iI: function () { var f = a.application.eb || (a.application.eb = []); f.push(this); }, oW: function (f, g, h) { return a.event.prototype.oW.call(this, f, g, this, h); }, cr: function (f, g, h) { return a.event.prototype.cr.call(this, f, g, this, h); } }; a.event.du(a.application.prototype, true); } if (!a.env) { a.env = (function () { var f = navigator.userAgent.toLowerCase(), g = window.opera, h = { ie: /*@cc_on!@*/ false, opera: !!g && g.version, webkit: f.indexOf(' applewebkit/') > -1, air: f.indexOf(' adobeair/') > -1, mac: f.indexOf('macintosh') > -1, quirks: document.compatMode == 'BackCompat', isCustomDomain: function () { return this.ie && document.domain != window.location.hostname; } }; h.gecko = navigator.product == 'Gecko' && !h.webkit && !h.opera; var i = 0; if (h.ie) { i = parseFloat(f.match(/msie (\d+)/)[1]); h.ie8 = !!document.documentMode; h.ie8Compat = document.documentMode == 8; h.ie7Compat = i == 7 && !document.documentMode || document.documentMode == 7; h.ie6Compat = i < 7 || h.quirks; } if (h.gecko) { var j = f.match(/rv:([\d\.]+)/); if (j) { j = j[1].split('.'); i = j[0] * 10000 + (j[1] || 0) * 100 + +(j[2] || 0); } } if (h.opera) i = parseFloat(g.version()); if (h.air) i = parseFloat(f.match(/ adobeair\/(\d+)/)[1]); if (h.webkit) i = parseFloat(f.match(/ applewebkit\/(\d+)/)[1]); h.version = i; h.isCompatible = h.ie && i >= 6 || h.gecko && i >= 10801 || h.opera && i >= 9.5 || h.air && i >= 1 || h.webkit && i >= 522 || false; h.cssClass = 'browser_' + (h.ie ? 'ie' : h.gecko ? 'gecko' : h.opera ? 'opera' : h.air ? 'air' : h.webkit ? 'webkit' : 'unknown'); if (h.quirks) h.cssClass += ' browser_quirks'; if (h.ie) { h.cssClass += ' browser_ie' + (h.version < 7 ? '6' : h.version >= 8 ? '8' : '7'); if (h.quirks) h.cssClass += ' browser_iequirks'; } if (h.gecko && i < 10900) h.cssClass += ' browser_gecko18'; return h; })(); CKFinder.env = a.env; } var f = a.env; var g = f.ie; if (a.status == 'unloaded') (function () { a.event.du(a); a.dO = function () { if (a.status != 'basic_ready') { a.dO.qr = true; return; } delete a.dO; var i = document.createElement('script'); i.type = 'text/javascript'; i.src = a.basePath + 'ckfinder.js'; document.getElementsByTagName('head')[0].appendChild(i); }; a.mS = 0; a.uQ = 'ckfinder'; a.uM = true; var h = function (i, j, k, l) { if (f.isCompatible) { if (a.dO) a.dO(); var m = k(i, j, l); a.add(m); return m; } return null; }; a.replace = function (i, j, k) { return h(i, j, a.application.replace, k); }; a.appendTo = function (i, j, k) { return h(i, j, a.application.appendTo, k); }; a.add = function (i) { var j = this._.io || (this._.io = []); j.push(i); }; a.uL = function () { var i = document.getElementsByTagName('textarea'); for (var j = 0; j < i.length; j++) { var k = null, l = i[j], m = l.name; if (!l.name && !l.id) continue; if (typeof arguments[0] == 'string') { var n = new RegExp('(?:^| )' + arguments[0] + '(?:$| )'); if (!n.test(l.className)) continue; } else if (typeof arguments[0] == 'function') { k = {}; if (arguments[0](l, k) === false) continue; } this.replace(l, k); } }; (function () { var i = function () { var j = a.dO, k = a.mS; a.status = 'basic_ready'; if (j && j.qr) j(); else if (k) setTimeout(function () { if (a.dO) a.dO(); }, k * 1000); }; if (window.addEventListener) window.addEventListener('load', i, false); else if (window.attachEvent) window.attachEvent('onload', i); })(); a.status = 'basic_loaded'; })(); a.dom = {}; CKFinder.dom = a.dom; var h = a.dom; a.ajax = (function () { var i = function () { if (!g || location.protocol != 'file:') try { return new XMLHttpRequest(); } catch (n) { } try { return new ActiveXObject('Msxml2.XMLHTTP'); } catch (o) { } try { return new ActiveXObject('Microsoft.XMLHTTP'); } catch (p) { } return null; }, j = function (n) { return n.readyState == 4 && (n.status >= 200 && n.status < 300 || n.status == 304 || n.status === 0 || n.status == 1223); }, k = function (n) { if (j(n)) return n.responseText; return null; }, l = function (n) { if (j(n)) { var o = n.responseXML, p = new a.xml(o && o.firstChild && o.documentElement && o.documentElement.nodeName != 'parsererror' ? o : n.responseText.replace(/^[^<]+/, '').replace(/[^>]+$/, '')); if (p && p.mq && p.mq.documentElement && p.mq.documentElement.nodeName != 'parsererror' && p.mq.documentElement.nodeName != 'html' && p.mq.documentElement.nodeName != 'br') return p; } var q = a.eq || a.jt, r = n.responseText; if (/text\/plain/.test(n.getResponseHeader('Content-Type'))) { r = a.tools.htmlEncode(r); r = r.replace(/\n/g, '<br>'); r = '<div style="width:600px; overflow:scroll"><font>' + r + '</font></div>'; } q.msgDialog(q.lang.SysErrorDlgTitle, r); return {}; }, m = function (n, o, p, q) { var r = !!o; a.log('[AJAX] POST ' + n); var s = i(); if (!s) return null; if (!q) s.open('GET', n, r); else s.open('POST', n, r); if (r) s.onreadystatechange = function () { if (s.readyState == 4) { o(p(s)); s = null; } }; if (q) { s.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); s.send(q); } else s.send(null); return r ? '' : p(s); }; return { load: function (n, o, p) { return m(n, o, k, p); }, loadXml: function (n, o, p) { return m(n, o, l, p); } }; })(); CKFinder.ajax = a.ajax; (function () { var i = []; a.tools = { arrayCompare: function (j, k) { if (!j && !k) return true; if (!j || !k || j.length != k.length) return false; for (var l = 0; l < j.length; l++) { if (j[l] != k[l]) return false; } return true; }, clone: function (j) { var k; if (j && j instanceof Array) { k = []; for (var l = 0; l < j.length; l++) k[l] = this.clone(j[l]); return k; } if (j === null || typeof j != 'object' || j instanceof String || j instanceof Number || j instanceof Boolean || j instanceof Date) return j; k = new j.constructor(); for (var m in j) { var n = j[m]; k[m] = this.clone(n); } return k; }, extend: function (j) { var k = arguments.length, l, m; if (typeof (l = arguments[k - 1]) == 'boolean') k--; else if (typeof (l = arguments[k - 2]) == 'boolean') { m = arguments[k - 1]; k -= 2; } for (var n = 1; n < k; n++) { var o = arguments[n]; for (var p in o) { if (l === true || j[p] == undefined) if (!m || p in m) j[p] = o[p]; } } return j; }, prototypedCopy: function (j) { var k = function () { }; k.prototype = j; return new k(); }, isArray: function (j) { return !!j && j instanceof Array; }, cssStyleToDomStyle: (function () { var j = document.createElement('div').style, k = typeof j.cssFloat != 'undefined' ? 'cssFloat' : typeof j.styleFloat != 'undefined' ? 'styleFloat' : 'float'; return function (l) { if (l == 'float') return k; else return l.replace(/-./g, function (m) { return m.substr(1).toUpperCase(); }); }; })(), htmlEncode: function (j) { var k = function (o) { var p = new h.ax('span'); p.setText(o); return p.getHtml(); }, l = k('\n').toLowerCase() == '<br>' ? function (o) { return k(o).replace(/<br>/gi, '\n'); } : k, m = k('>') == '>' ? function (o) { return l(o).replace(/>/g, '&gt;'); } : l, n = k(' ') == '&nbsp; ' ? function (o) { return m(o).replace(/&nbsp;/g, ' '); } : m; this.htmlEncode = n; return this.htmlEncode(j); }, getNextNumber: (function () { var j = 0; return function () { return ++j; }; })(), override: function (j, k) { return k(j); }, setTimeout: function (j, k, l, m, n) { if (!n) n = window; if (!l) l = n; return n.setTimeout(function () { if (m) j.apply(l, [].concat(m)); else j.apply(l); }, k || 0); }, trim: (function () { var j = /(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g; return function (k) { return k ? k.replace(j, '') : null; }; })(), ltrim: (function () { var j = /^[ \t\n\r]+/g; return function (k) { return k ? k.replace(j, '') : null; }; })(), rtrim: (function () { var j = /[ \t\n\r]+$/g; return function (k) { return k ? k.replace(j, '') : null; }; })(), indexOf: Array.prototype.indexOf ? function (j, k) { return j.indexOf(k); } : function (j, k) { for (var l = 0, m = j.length; l < m; l++) { if (j[l] === k) return l; } return -1; }, bind: function (j, k) { return function () { return j.apply(k, arguments); }; }, createClass: function (j) { var k = j.$, l = j.base, m = j.vd || j._, n = j.ej, o = j.statics; if (m) { var p = k; k = function () { var t = this; var q = t._ || (t._ = {}); for (var r in m) { var s = m[r]; q[r] = typeof s == 'function' ? a.tools.bind(s, t) : s; } p.apply(t, arguments); }; } if (l) { k.prototype = this.prototypedCopy(l.prototype); k.prototype['constructor'] = k; k.prototype.base = function () { this.base = l.prototype.base; l.apply(this, arguments); this.base = arguments.callee; }; } if (n) this.extend(k.prototype, n, true); if (o) this.extend(k, o, true); return k; }, addFunction: function (j, k) { return i.push(function () { j.apply(k || this, arguments); }) - 1; }, callFunction: function (j) { var k = i[j]; return k.apply(window, Array.prototype.slice.call(arguments, 1)); }, cssLength: (function () { var j = /^\d+(?:\.\d+)?$/; return function (k) { return k + (j.test(k) ? 'px' : ''); }; })(), repeat: function (j, k) { return new Array(k + 1).join(j); }, deepCopy: function (j) { var k = {}; if (typeof j == 'object') { if (typeof j.length != 'undefined') k = []; for (var l in j) { if (j[l] === null) k[l] = j[l]; else if (typeof j[l] == 'object') k[l] = a.tools.deepCopy(j[l]); else if (typeof j[l] == 'string') k[l] = j[l]; else if (typeof j[l] == 'number') k[l] = j[l]; else if (typeof j[l] == 'boolean') j[l] === true ? k[l] = true : k[l] = false; } } return k; }, getUrlParam: function (j, k) { var l = new RegExp('(?:[?&]|&amp;)' + j + '=([^&]+)', 'i'), m = (k || window).location.search.match(l); return m && m.length > 1 ? m[1] : null; }, htmlEncode: function (j) { if (!j) return ''; j = typeof j != 'string' ? j.toString() : j; j = j.replace(/&/g, '&amp;'); j = j.replace(/</g, '&lt;'); j = j.replace(/>/g, '&gt;'); return j; }, setCookie: function (j, k, l) { document.cookie = j + '=' + k + (!l ? '; expires=Thu, 6 Oct 2016 01:00:00 UTC; path=/' : ''); }, getCookie: function (j) { var k = document.cookie.match(new RegExp('(^|\\s|;)' + j + '=([^;]*)')); return k && k.length > 0 ? k[2] : ''; } }; CKFinder._.callFunction = a.tools.callFunction; CKFinder.tools = a.tools; })(); var i = a.tools; h.event = function (j) { this.$ = j; }; h.event.prototype = { oV: function () { return this.$.keyCode || this.$.which; }, db: function () { var k = this; var j = k.oV(); if (k.$.ctrlKey || k.$.metaKey) j += a.bP; if (k.$.shiftKey) j += a.dy; if (k.$.altKey) j += a.eJ; return j; }, preventDefault: function (j) { var k = this.$; if (k.preventDefault) k.preventDefault(); else k.returnValue = false; if (j) this.stopPropagation(); }, stopPropagation: function () { var j = this.$; if (j.stopPropagation) j.stopPropagation(); else j.cancelBubble = true; }, bK: function () { var j = this.$.target || this.$.srcElement; return j ? new h.bi(j) : null; } }; a.bP = 1000; a.dy = 2000; a.eJ = 4000; h.dE = function (j) { if (j) this.$ = j; }; h.dE.prototype = (function () { var j = function (k, l) { return function (m) { if (typeof a != 'undefined') k.oW(l, new h.event(m)); }; }; return { kk: function () { var k; if (!(k = this.dw('_'))) this.fL('_', k = {}); return k; }, on: function (k) { var n = this; var l = n.dw('_cke_nativeListeners'); if (!l) { l = {}; n.fL('_cke_nativeListeners', l); } if (!l[k]) { var m = l[k] = j(n, k); if (n.$.addEventListener && !g) n.$.addEventListener(k, m, !!a.event.jP); else if (n.$.attachEvent) n.$.attachEvent('on' + k, m); } return a.event.prototype.on.apply(n, arguments); }, aF: function (k) { var n = this; a.event.prototype.aF.apply(n, arguments); if (!n.rC(k)) { var l = n.dw('_cke_nativeListeners'), m = l && l[k]; if (m) { if (n.$.removeEventListener) n.$.removeEventListener(k, m, false); else if (n.$.detachEvent) n.$.detachEvent('on' + k, m); delete l[k]; } } } }; })(); (function (j) { var k = {}; j.equals = function (l) { return l && l.$ === this.$; }; j.fL = function (l, m) { var n = this.iY(), o = k[n] || (k[n] = {}); o[l] = m; return this; }; j.dw = function (l) { var m = this.$.dj, n = m && k[m]; return n && n[l]; }; j.jF = function (l) { var m = this.$.dj, n = m && k[m], o = n && n[l]; if (typeof o != 'undefined') delete n[l]; return o || null; }; j.iY = function () { return this.$.dj || (this.$.dj = i.getNextNumber()); }; a.event.du(j); })(h.dE.prototype); h.window = function (j) { h.dE.call(this, j); }; h.window.prototype = new h.dE(); i.extend(h.window.prototype, { focus: function () { if (f.webkit && this.$.parent) this.$.parent.focus(); this.$.focus(); }, eR: function () { var j = this.$.document, k = j.compatMode == 'CSS1Compat'; return { width: (k ? j.documentElement.clientWidth : j.body.clientWidth) || 0, height: (k ? j.documentElement.clientHeight : j.body.clientHeight) || 0 }; }, hV: function () { var j = this.$; if ('pageXOffset' in j) return { x: j.pageXOffset || 0, y: j.pageYOffset || 0 }; else { var k = j.document; return { x: k.documentElement.scrollLeft || k.body.scrollLeft || 0, y: k.documentElement.scrollTop || k.body.scrollTop || 0 }; } } }); h.document = function (j) { h.dE.call(this, j); }; var j = h.document; j.prototype = new h.dE(); i.extend(j.prototype, { pb: function (k) { if (this.$.createStyleSheet) this.$.createStyleSheet(k); else { var l = new h.ax('link'); l.setAttributes({ rel: 'stylesheet', type: 'text/css', href: k }); this.eD().append(l); } }, createElement: function (k, l) { var m = new h.ax(k, this); if (l) { if (l.attributes) m.setAttributes(l.attributes); if (l.gS) m.setStyles(l.gS); } return m; }, jT: function (k) { return new h.text(k, this); }, focus: function () { this.getWindow().focus(); }, getById: function (k) { var l = this.$.getElementById(k); return l ? new h.ax(l) : null; }, vu: function (k, l) { var m = this.$.documentElement; for (var n = 0; m && n < k.length; n++) { var o = k[n]; if (!l) { m = m.childNodes[o]; continue; } var p = -1; for (var q = 0; q < m.childNodes.length; q++) { var r = m.childNodes[q]; if (l === true && r.nodeType == 3 && r.previousSibling && r.previousSibling.nodeType == 3) continue; p++; if (p == o) { m = r; break; } } } return m ? new h.bi(m) : null; }, eG: function (k, l) { if (!g && l) k = l + ':' + k; return new h.iT(this.$.getElementsByTagName(k)); }, eD: function () { var k = this.$.getElementsByTagName('head')[0]; k = new h.ax(k); return (this.eD = function () { return k; })(); }, bH: function () { var k = new h.ax(this.$.body); return (this.bH = function () { return k; })(); }, gT: function () { var k = new h.ax(this.$.documentElement); return (this.gT = function () { return k; })(); }, getWindow: function () { var k = new h.window(this.$.parentWindow || this.$.defaultView); return (this.getWindow = function () { return k; })(); } }); h.bi = function (k) { if (k) { switch (k.nodeType) { case a.cv: return new h.ax(k); case a.fl: return new h.text(k); } h.dE.call(this, k); } return this; }; h.bi.prototype = new h.dE(); a.cv = 1; a.fl = 3; a.va = 8; a.om = 11; a.oh = 0; a.op = 1; a.gW = 2; a.gX = 4; a.mo = 8; a.lF = 16; i.extend(h.bi.prototype, { appendTo: function (k, l) { k.append(this, l); return k; }, clone: function (k, l) { var m = this.$.cloneNode(k); if (!l) { var n = function (o) { if (o.nodeType != a.cv) return; o.removeAttribute('id', false); o.removeAttribute('dj', false); var p = o.childNodes; for (var q = 0; q < p.length; q++) n(p[q]); }; n(m); } return new h.bi(m); }, gE: function () { return !!this.$.previousSibling; }, ge: function () { return !!this.$.nextSibling; }, kB: function (k) { k.$.parentNode.insertBefore(this.$, k.$.nextSibling); return k; }, insertBefore: function (k) { k.$.parentNode.insertBefore(this.$, k.$); return k; }, vP: function (k) { this.$.parentNode.insertBefore(k.$, this.$); return k; }, lU: function (k) { var l = [], m = this.getDocument().$.documentElement, n = this.$; while (n && n != m) { var o = n.parentNode, p = -1; for (var q = 0; q < o.childNodes.length; q++) { var r = o.childNodes[q]; if (k && r.nodeType == 3 && r.previousSibling && r.previousSibling.nodeType == 3) continue; p++; if (r == n) break; } l.unshift(p); n = n.parentNode; } return l; }, getDocument: function () { var k = new j(this.$.ownerDocument || this.$.parentNode.ownerDocument); return (this.getDocument = function () { return k; })(); }, vA: function () { var k = this.$, l = k.parentNode && k.parentNode.firstChild, m = -1; while (l) { m++; if (l == k) return m; l = l.nextSibling; } return -1; }, hL: function (k, l, m) { if (m && !m.call) { var n = m; m = function (q) { return !q.equals(n); }; } var o = !k && this.getFirst && this.getFirst(), p; if (!o) { if (this.type == a.cv && m && m(this, true) === false) return null; o = this.dG(); } while (!o && (p = (p || this).getParent())) { if (m && m(p, true) === false) return null; o = p.dG(); } if (!o) return null; if (m && m(o) === false) return null; if (l && l != o.type) return o.hL(false, l, m); return o; }, hZ: function (k, l, m) { if (m && !m.call) { var n = m; m = function (q) { return !q.equals(n); }; } var o = !k && this.dB && this.dB(), p; if (!o) { if (this.type == a.cv && m && m(this, true) === false) return null; o = this.cf(); } while (!o && (p = (p || this).getParent())) { if (m && m(p, true) === false) return null; o = p.cf(); } if (!o) return null; if (m && m(o) === false) return null; if (l && o.type != l) return o.hZ(false, l, m); return o; }, cf: function (k) { var l = this.$, m; do { l = l.previousSibling; m = l && new h.bi(l); } while (m && k && !k(m)); return m; }, vs: function () { return this.cf(function (k) { return k.$.nodeType == 1; }); }, dG: function (k) { var l = this.$, m; do { l = l.nextSibling; m = l && new h.bi(l); } while (m && k && !k(m)); return m; }, vk: function () { return this.dG(function (k) { return k.$.nodeType == 1; }); }, getParent: function () { var k = this.$.parentNode; return k && k.nodeType == 1 ? new h.bi(k) : null; }, vn: function (k) { var l = this, m = []; do m[k ? 'push' : 'unshift'](l); while (l = l.getParent()); return m; }, vv: function (k) { var m = this; if (k.equals(m)) return m; if (k.contains && k.contains(m)) return k; var l = m.contains ? m : m.getParent(); do { if (l.contains(k)) return l; } while (l = l.getParent()); return null; }, gz: function (k) { var l = this.$, m = k.$; if (l.compareDocumentPosition) return l.compareDocumentPosition(m); if (l == m) return a.oh; if (this.type == a.cv && k.type == a.cv) { if (l.contains) { if (l.contains(m)) return a.lF + a.gX; if (m.contains(l)) return a.mo + a.gW; } if ('sourceIndex' in l) return l.sourceIndex < 0 || m.sourceIndex < 0 ? a.op : l.sourceIndex < m.sourceIndex ? a.gX : a.gW; } var n = this.lU(), o = k.lU(), p = Math.min(n.length, o.length); for (var q = 0; q <= p - 1; q++) { if (n[q] != o[q]) { if (q < p) return n[q] < o[q] ? a.gX : a.gW; break; } } return n.length < o.length ? a.lF + a.gX : a.mo + a.gW; }, vw: function (k, l) { var m = this.$; if (!l) m = m.parentNode; while (m) { if (m.nodeName && m.nodeName.toLowerCase() == k) return new h.bi(m); m = m.parentNode; } return null; }, vX: function (k, l) { var m = this.$; if (!l) m = m.parentNode; while (m) { if (m.nodeName && m.nodeName.toLowerCase() == k) return true; m = m.parentNode; } return false; }, move: function (k, l) { k.append(this.remove(), l); }, remove: function (k) { var l = this.$, m = l.parentNode; if (m) { if (k) for (var n; n = l.firstChild; ) m.insertBefore(l.removeChild(n), l); m.removeChild(l); } return this; }, replace: function (k) { this.insertBefore(k); k.remove(); }, trim: function () { this.ltrim(); this.rtrim(); }, ltrim: function () { var n = this; var k; while (n.getFirst && (k = n.getFirst())) { if (k.type == a.fl) { var l = i.ltrim(k.getText()), m = k.hJ(); if (!l) { k.remove(); continue; } else if (l.length < m) { k.split(m - l.length); n.$.removeChild(n.$.firstChild); } } break; } }, rtrim: function () { var n = this; var k; while (n.dB && (k = n.dB())) { if (k.type == a.fl) { var l = i.rtrim(k.getText()), m = k.hJ(); if (!l) { k.remove(); continue; } else if (l.length < m) { k.split(l.length); n.$.lastChild.parentNode.removeChild(n.$.lastChild); } } break; } if (!g && !f.opera) { k = n.$.lastChild; if (k && k.type == 1 && k.nodeName.toLowerCase() == 'br') k.parentNode.removeChild(k); } } }); h.iT = function (k) { this.$ = k; }; h.iT.prototype = { count: function () { return this.$.length; }, getItem: function (k) { var l = this.$[k]; return l ? new h.bi(l) : null; } }; h.ax = function (k, l) { if (typeof k == 'string') k = (l ? l.$ : document).createElement(k); h.dE.call(this, k); }; var k = h.ax; k.eB = function (l) { return l && (l.$ ? l : new k(l)); }; k.prototype = new h.bi(); k.et = function (l, m) { var n = new k('div', m); n.setHtml(l); return n.getFirst().remove(); }; k.rS = function (l, m, n, o) { var p = m.dw('list_marker_id') || m.fL('list_marker_id', i.getNextNumber()).dw('list_marker_id'), q = m.dw('list_marker_names') || m.fL('list_marker_names', {}).dw('list_marker_names'); l[p] = m; q[n] = 1; return m.fL(n, o); }; k.sM = function (l) { for (var m in l) k.qZ(l, l[m], true); }; k.qZ = function (l, m, n) { var o = m.dw('list_marker_names'), p = m.dw('list_marker_id'); for (var q in o) m.jF(q); m.jF('list_marker_names'); if (n) { m.jF('list_marker_id'); delete l[p]; } }; i.extend(k.prototype, { type: a.cv, addClass: function (l) { var m = this.$.className; if (m) { var n = new RegExp('(?:^|\\s)' + l + '(?:\\s|$)', ''); if (!n.test(m)) m += ' ' + l; } this.$.className = m || l; }, removeClass: function (l) { var m = this.getAttribute('class'); if (m) { var n = new RegExp('(?:^|\\s+)' + l + '(?=\\s|$)', 'i'); if (n.test(m)) { m = m.replace(n, '').replace(/^\s+/, ''); if (m) this.setAttribute('class', m); else this.removeAttribute('class'); } } }, hasClass: function (l) { var m = new RegExp('(?:^|\\s+)' + l + '(?=\\s|$)', ''); return m.test(this.getAttribute('class')); }, append: function (l, m) { var n = this; if (typeof l == 'string') l = n.getDocument().createElement(l); if (m) n.$.insertBefore(l.$, n.$.firstChild); else n.$.appendChild(l.$); a.log('[DOM] DOM flush into ' + n.getName()); return l; }, appendHtml: function (l) { var n = this; if (!n.$.childNodes.length) n.setHtml(l); else { var m = new k('div', n.getDocument()); m.setHtml(l); m.jg(n); } }, appendText: function (l) { if (this.$.text != undefined) this.$.text += l; else this.append(new h.text(l)); }, pd: function () { var m = this; var l = m.dB(); while (l && l.type == a.fl && !i.rtrim(l.getText())) l = l.cf(); if (!l || !l.is || !l.is('br')) m.append(f.opera ? m.getDocument().jT('') : m.getDocument().createElement('br')); }, tV: function (l) { var o = this; var m = new h.mk(o.getDocument()); m.setStartAfter(o); m.setEndAfter(l); var n = m.extractContents(); m.insertNode(o.remove()); n.kA(o); }, contains: g || f.webkit ? function (l) { var m = this.$; return l.type != a.cv ? m.contains(l.getParent().$) : m != l.$ && m.contains(l.$); } : function (l) { return !!(this.$.compareDocumentPosition(l.$) & 16); }, focus: function () { try { this.$.focus(); } catch (l) { } }, getHtml: function () { return this.$.innerHTML; }, vi: function () { var m = this; if (m.$.outerHTML) return m.$.outerHTML.replace(/<\?[^>]*>/, ''); var l = m.$.ownerDocument.createElement('div'); l.appendChild(m.$.cloneNode(true)); return l.innerHTML; }, setHtml: function (l) { a.log('[DOM] DOM flush into ' + this.getName()); return this.$.innerHTML = l; }, setText: function (l) { k.prototype.setText = this.$.innerText != undefined ? function (m) { a.log('[DOM] Text flush'); return this.$.innerText = m; } : function (m) { a.log('[DOM] Text flush'); return this.$.textContent = m; }; return this.setText(l); }, getAttribute: (function () { var l = function (m) { return this.$.getAttribute(m, 2); }; if (g && (f.ie7Compat || f.ie6Compat)) return function (m) { var o = this; switch (m) { case 'class': m = 'className'; break; case 'tabindex': var n = l.call(o, m); if (n !== 0 && o.$.tabIndex === 0) n = null; return n; break; case 'checked': return o.$.checked; break; case 'style': return o.$.style.cssText; } return l.call(o, m); }; else return l; })(), getChildren: function () { return new h.iT(this.$.childNodes); }, getComputedStyle: g ? function (l) { return this.$.currentStyle[i.cssStyleToDomStyle(l)]; } : function (l) { return this.getWindow().$.getComputedStyle(this.$, '').getPropertyValue(l); }, pf: function () { var l = a.ga[this.getName()]; this.pf = function () { return l; }; return l; }, eG: j.prototype.eG, vp: g ? function () { var l = this.$.tabIndex; if (l === 0 && !a.ga.ug[this.getName()] && parseInt(this.getAttribute('tabindex'), 10) !== 0) l = -1; return l; } : f.webkit ? function () { var l = this.$.tabIndex; if (l == undefined) { l = parseInt(this.getAttribute('tabindex'), 10); if (isNaN(l)) l = -1; } return l; } : function () { return this.$.tabIndex; }, getText: function () { return this.$.textContent || this.$.innerText || ''; }, getWindow: function () { return this.getDocument().getWindow(); }, dS: function () { return this.$.id || null; }, vm: function () { return this.$.name || null; }, getName: function () { var l = this.$.nodeName.toLowerCase(); if (g) { var m = this.$.scopeName; if (m != 'HTML') l = m.toLowerCase() + ':' + l; } return (this.getName = function () { return l; })(); }, getValue: function () { return this.$.value; }, getFirst: function () { var l = this.$.firstChild; return l ? new h.bi(l) : null; }, dB: function (l) { var m = this.$.lastChild, n = m && new h.bi(m); if (n && l && !l(n)) n = n.cf(l); return n; }, rd: function (l) { return this.$.style[i.cssStyleToDomStyle(l)]; }, is: function () { var l = this.getName(); for (var m = 0; m < arguments.length; m++) { if (arguments[m] == l) return true; } return false; }, vL: function () { var l = this.getName(), m = !a.ga.uj[l] && (a.ga[l] || a.ga.span); return m && m['#']; }, isIdentical: function (l) { if (this.getName() != l.getName()) return false; var m = this.$.attributes, n = l.$.attributes, o = m.length, p = n.length; if (!g && o != p) return false; for (var q = 0; q < o; q++) { var r = m[q]; if ((!g || r.specified && r.nodeName != 'dj') && r.nodeValue != l.getAttribute(r.nodeName)) return false; } if (g) for (q = 0; q < p; q++) { r = n[q]; if ((!g || r.specified && r.nodeName != 'dj') && r.nodeValue != m.getAttribute(r.nodeName)) return false; } return true; }, isVisible: function () { return this.$.offsetWidth && this.$.style.visibility != 'hidden'; }, hasAttributes: g && (f.ie7Compat || f.ie6Compat) ? function () { var l = this.$.attributes; for (var m = 0; m < l.length; m++) { var n = l[m]; switch (n.nodeName) { case 'class': if (this.getAttribute('class')) return true; case 'dj': continue; default: if (n.specified) return true; } } return false; } : function () { var l = this.$.attributes; return l.length > 1 || l.length == 1 && l[0].nodeName != 'dj'; }, hasAttribute: function (l) { var m = this.$.attributes.getNamedItem(l); return !!(m && m.specified); }, hide: function () { this.setStyle('display', 'none'); }, jg: function (l, m) { var n = this.$; l = l.$; if (n == l) return; var o; if (m) while (o = n.lastChild) l.insertBefore(n.removeChild(o), l.firstChild); else while (o = n.firstChild) l.appendChild(n.removeChild(o)); }, show: function () { this.setStyles({ display: '', visibility: '' }); }, setAttribute: (function () { var l = function (m, n) { this.$.setAttribute(m, n); return this; }; if (g && (f.ie7Compat || f.ie6Compat)) return function (m, n) { var o = this; if (m == 'class') o.$.className = n; else if (m == 'style') o.$.style.cssText = n; else if (m == 'tabindex') o.$.tabIndex = n; else if (m == 'checked') o.$.checked = n; else l.apply(o, arguments); return o; }; else return l; })(), setAttributes: function (l) { for (var m in l) this.setAttribute(m, l[m]); return this; }, setValue: function (l) { this.$.value = l; return this; }, removeAttribute: (function () { var l = function (m) { this.$.removeAttribute(m); }; if (g && (f.ie7Compat || f.ie6Compat)) return function (m) { if (m == 'class') m = 'className'; else if (m == 'tabindex') m = 'tabIndex'; l.call(this, m); }; else return l; })(), uW: function (l) { for (var m = 0; m < l.length; m++) this.removeAttribute(l[m]); }, removeStyle: function (l) { var m = this; if (m.$.style.removeAttribute) m.$.style.removeAttribute(i.cssStyleToDomStyle(l)); else m.setStyle(l, ''); if (!m.$.style.cssText) m.removeAttribute('style'); }, setStyle: function (l, m) { this.$.style[i.cssStyleToDomStyle(l)] = m; return this; }, setStyles: function (l) { for (var m in l) this.setStyle(m, l[m]); return this; }, setOpacity: function (l) { if (g) { l = Math.round(l * 100); this.setStyle('filter', l >= 100 ? '' : 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + l + ')'); } else this.setStyle('opacity', l); }, unselectable: f.gecko ? function () { this.$.style.MozUserSelect = 'none'; } : f.webkit ? function () { this.$.style.uE = 'none'; } : function () { if (g || f.opera) { var l = this.$, m, n = 0; l.unselectable = 'on'; while (m = l.all[n++]) switch (m.tagName.toLowerCase()) { case 'iframe': case 'textarea': case 'input': case 'select': break; default: m.unselectable = 'on'; } } }, vr: function () { var l = this; while (l.getName() != 'html') { if (l.getComputedStyle('position') != 'static') return l; l = l.getParent(); } return null; }, ir: function (l) { var G = this; var m = 0, n = 0, o = G.getDocument().bH(), p = G.getDocument().$.compatMode == 'BackCompat', q = G.getDocument(); if (document.documentElement.getBoundingClientRect) { var r = G.$.getBoundingClientRect(), s = q.$, t = s.documentElement, u = t.clientTop || o.$.clientTop || 0, v = t.clientLeft || o.$.clientLeft || 0, w = true; if (g) { var x = q.gT().contains(G), y = q.bH().contains(G); w = p && y || !p && x; } if (w) { m = r.left + (!p && t.scrollLeft || o.$.scrollLeft); m -= v; n = r.top + (!p && t.scrollTop || o.$.scrollTop); n -= u; } } else { var z = G, A = null, B; while (z && !(z.getName() == 'body' || z.getName() == 'html')) { m += z.$.offsetLeft - z.$.scrollLeft; n += z.$.offsetTop - z.$.scrollTop; if (!z.equals(G)) { m += z.$.clientLeft || 0; n += z.$.clientTop || 0; } var C = A; while (C && !C.equals(z)) { m -= C.$.scrollLeft; n -= C.$.scrollTop; C = C.getParent(); } A = z; z = (B = z.$.offsetParent) ? new k(B) : null; } } if (l) { var D = G.getWindow(), E = l.getWindow(); if (!D.equals(E) && D.$.frameElement) { var F = new k(D.$.frameElement).ir(l); m += F.x; n += F.y; } } if (!document.documentElement.getBoundingClientRect) if (f.gecko && !p) { m += G.$.clientLeft ? 1 : 0; n += G.$.clientTop ? 1 : 0; } return { x: m, y: n }; }, scrollIntoView: function (l) { var r = this; var m = r.getWindow(), n = m.eR().height, o = n * -1; if (l) o += n; else { o += r.$.offsetHeight || 0; o += parseInt(r.getComputedStyle('marginBottom') || 0, 10) || 0; } var p = r.ir(); o += p.y; o = o < 0 ? 0 : o; var q = m.hV().y; if (o > q || o < q - n) m.$.scrollTo(0, o); }, bR: function (l) { var m = this; switch (l) { case a.eV: m.addClass('cke_on'); m.removeClass('cke_off'); m.removeClass('cke_disabled'); break; case a.aY: m.addClass('cke_disabled'); m.removeClass('cke_off'); m.removeClass('cke_on'); break; default: m.addClass('cke_off'); m.removeClass('cke_on'); m.removeClass('cke_disabled'); break; } }, getFrameDocument: function () { var l = this.$; try { l.contentWindow.document; } catch (m) { l.src = l.src; if (g && f.version < 7) window.showModalDialog('javascript:document.write("<script>window.setTimeout(function(){window.close();},50);</script>")'); } return l && new j(l.contentWindow.document); }, qw: function (l, m) { var s = this; var n = s.$.attributes; m = m || {}; for (var o = 0; o < n.length; o++) { var p = n[o]; if (p.specified || g && p.nodeValue && p.nodeName.toLowerCase() == 'value') { var q = p.nodeName; if (q in m) continue; var r = s.getAttribute(q); if (r === null) r = p.nodeValue; l.setAttribute(q, r); } } if (s.$.style.cssText !== '') l.$.style.cssText = s.$.style.cssText; }, renameNode: function (l) { var o = this; if (o.getName() == l) return; var m = o.getDocument(), n = new k(l, m); o.qw(n); o.jg(n); o.$.parentNode.replaceChild(n.$, o.$); n.$.dj = o.$.dj; o.$ = n.$; }, aC: function (l) { var m = this.$; if (!l.slice) m = m.childNodes[l]; else while (l.length > 0 && m) m = m.childNodes[l.shift()]; return m ? new h.bi(m) : null; }, iu: function () { return this.$.childNodes.length; }, hX: function () { this.on('contextmenu', function (l) { if (!l.data.bK().hasClass('cke_enable_context_menu')) l.data.preventDefault(); }); }, 'toString': function () { return this.getName() + '#' + this.dS() + '.' + this.getAttribute('class'); } }); a.command = function (l, m) { this.pW = []; this.exec = function (n) { if (this.bu == a.aY) return false; if (m.oD) l.focus(); return m.exec.call(this, l, n) !== false; }; i.extend(this, m, { iH: { qt: 1 }, oD: true, bu: a.aS }); a.event.call(this); }; a.command.prototype = { enable: function () { var l = this; if (l.bu == a.aY) l.bR(!l.vf || typeof l.lJ == 'undefined' ? a.aS : l.lJ); }, disable: function () { this.bR(a.aY); }, bR: function (l) { var m = this; if (m.bu == l) return false; m.lJ = m.bu; m.bu = l; m.oW('bu'); return true; }, rJ: function () { var l = this; if (l.bu == a.aS) l.bR(a.eV); else if (l.bu == a.eV) l.bR(a.aS); } }; a.event.du(a.command.prototype, true); a.config = { customConfig: a.getUrl('config.js'), connectorLanguage: 'aspx', language: '', defaultLanguage: 'en', defaultViewType: 'thumbnails', defaultSortBy: 'filename', defaultDisplayFilename: true, defaultDisplayDate: true, defaultDisplayFilesize: true, pO: '', height: 400, plugins: 'foldertree,folder,filebrowser,container,connector,resource,toolbar,formpanel,filesview,status,contextmenu,uploadform,keystrokes,dragdrop,basket,dialog,tools,resize,help', extraPlugins: '', fileIcons: 'ai|avi|bmp|cs|dll|doc|docx|exe|fla|gif|jpg|js|mdb|mp3|ogg|pdf|ppt|pptx|rdp|swf|swt|txt|vsd|xls|xlsx|xml|zip', removePlugins: '', tabIndex: 0, theme: 'default', skin: 'kama', width: '100%', baseFloatZIndex: 10000, directDownload: false, log: false, logStackTrace: false, rememberLastFolder: true, id: null, startupPath: '', startupFolderExpanded: true, selectActionFunction: null, selectActionData: null, selectThumbnailActionFunction: null, selectThumbnailActionData: null, disableThumbnailSelection: false, thumbsUrl: null, thumbsDirectAccess: false, imagesMaxWidth: 0, imagesMaxHeight: 0, selectActionType: 'js', resourceType: null, disableHelpButton: false, connectorPath: 'core/connector/' }; CKFinder.config = a.config; var l = a.config; a.dU = function (m, n) { this.rG = m; this.message = n; }; a.fs = function (m) { if (m.fs) return m.fs; this.hasFocus = false; this._ = { application: m }; return this; }; a.fs.prototype = { focus: function () { var n = this; if (n._.fW) clearTimeout(n._.fW); if (!n.hasFocus) { if (a.eq) a.eq.fs.ly(); var m = n._.application; m.container.getFirst().addClass('cke_focus'); n.hasFocus = true; m.oW('focus'); } }, blur: function () { var m = this; if (m._.fW) clearTimeout(m._.fW); m._.fW = setTimeout(function () { delete m._.fW; m.ly(); }, 100); }, ly: function () { if (this.hasFocus) { var m = this._.application; m.container.getFirst().removeClass('cke_focus'); this.hasFocus = false; m.oW('blur'); } } }; (function () { var m = {}; a.lang = { ko: { cs: 1, da: 1, de: 1, el: 1, en: 1, es: 1, 'es-mx': 1, fi: 1, fr: 1, he: 1, hu: 1, it: 1, ja: 1, lv: 1, nb: 1, nl: 1, no: 1, nn: 1, pl: 1, 'pt-br': 1, ru: 1, sk: 1, sl: 1, sv: 1, 'zh-cn': 1, 'zh-tw': 1 }, load: function (n, o, p) { if (!n || !a.lang.ko[n]) n = this.jV(o, n); if (!this[n]) a.ec.load(a.getUrl('lang/' + n + '.js'), function () { p(n, CKFinder.lang[n]); }, this); else p(n, this[n]); }, jV: function (n, o) { var p = this.ko; o = o || navigator.userLanguage || navigator.language; var q = o.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/), r = q[1], s = q[2]; if (p[r + '-' + s]) r = r + '-' + s; else if (!p[r]) r = null; a.lang.jV = r ? function () { return r; } : function (t) { return t; }; return r || n; } }; })(); (function () { a.log = function () { if (!l.log && !window.CKFINDER_LOG) return; var m = ''; for (var n = 0; n < arguments.length; n++) { var o = arguments[n]; if (!o) continue; if (m) m += '; '; switch (typeof o) { case 'function': var p = /function (\w+?)\(/.exec(o.toString()); p = p ? p[1] : 'anonymous func'; m += p; break; default: m += o ? o.toString() : ''; } } a._.log.push(m); if (typeof window.console == 'object') if (!console.log.apply) console.log(m); else console.log.apply(console, arguments); }; a.ba = function (m) { if (l.logStackTrace) a.log('[EXCEPTION] ' + m.toString()); return m; }; a.mZ = function (m) { var n = ''; for (var o = 0; o < a._.log.length; o++) n += o + 1 + '. ' + a._.log[o] + '\n'; return n; }; a._.log = []; })(); a.ec = (function () { var m = {}, n = {}; return { load: function (o, p, q, r, s) { var t = typeof o == 'string'; if (t) o = [o]; if (!q) q = a; var u = o.length, v = [], w = [], x = function (C) { if (p) if (t) p.call(q, C); else p.call(q, v, w); }; if (u === 0) { x(true); return; } var y = function (C, D) { (D ? v : w).push(C); if (--u <= 0) x(D); }, z = function (C, D) { m[C] = 1; var E = n[C]; delete n[C]; for (var F = 0; F < E.length; F++) E[F](C, D); }, A = function (C) { if (r !== true && m[C]) { y(C, true); return; } var D = n[C] || (n[C] = []); D.push(y); if (D.length > 1) return; var E = new k('script'); E.setAttributes({ type: 'text/javascript', src: C }); if (p) if (g) E.$.onreadystatechange = function () { if (E.$.readyState == 'loaded' || E.$.readyState == 'complete') { E.$.onreadystatechange = null; a.log('[LOADED] ' + C); z(C, true); } }; else { E.$.onload = function () { setTimeout(function () { a.log('[LOADED] ' + C); z(C, true); }, 0); }; E.$.onerror = function () { z(C, false); }; } E.appendTo(s ? s : a.document.eD()); }; for (var B = 0; B < u; B++) A(o[B]); }, uq: function (o) { var p = new k('script'); p.setAttribute('type', 'text/javascript'); p.appendText(o); p.appendTo(a.document.eD()); } }; })(); a.fQ = function (m, n) { var o = this; o.basePath = m; o.fileName = n; o.bX = {}; o.loaded = {}; o.jn = {}; o._ = { rZ: {} }; }; a.fQ.prototype = { add: function (m, n) { if (this.bX[m]) throw '[CKFINDER.fQ.add] The resource name "' + m + '" is already bX.'; this.bX[m] = n || {}; }, eB: function (m) { return this.bX[m] || null; }, getPath: function (m) { var n = this.jn[m]; return a.getUrl(n && n.dir || this.basePath + m + '/'); }, pi: function (m) { var n = this.jn[m]; return a.getUrl(this.getPath(m) + (n && n.file || this.fileName + '.js')); }, tR: function (m, n, o) { m = m.split(','); for (var p = 0; p < m.length; p++) { var q = m[p]; this.jn[q] = { dir: n, file: o }; } }, load: function (m, n, o) { if (!i.isArray(m)) m = m ? [m] : []; var p = this.loaded, q = this.bX, r = [], s = {}, t = {}; for (var u = 0; u < m.length; u++) { var v = m[u]; if (!v) continue; if (!p[v] && !q[v]) { var w = this.pi(v); r.push(w); if (!(w in s)) s[w] = []; s[w].push(v); } else t[v] = this.eB(v); } a.ec.load(r, function (x, y) { if (y.length) throw '[CKFINDER.fQ.load] Resource name "' + s[y[0]].join(',') + '" was not found at "' + y[0] + '".'; for (var z = 0; z < x.length; z++) { var A = s[x[z]]; for (var B = 0; B < A.length; B++) { var C = A[B]; t[C] = this.eB(C); p[C] = 1; } } n.call(o, t); }, this); } }; a.plugins = new a.fQ('plugins/', 'plugin'); var m = a.plugins; m.load = i.override(m.load, function (n) { return function (o, p, q) { var r = {}, s = function (t) { n.call(this, t, function (u) { i.extend(r, u); var v = []; for (var w in u) { var x = u[w], y = x && x.bM; if (y) for (var z = 0; z < y.length; z++) { if (!r[y[z]]) v.push(y[z]); } } if (v.length) s.call(this, v); else { for (w in r) { x = r[w]; if (x.onLoad && !x.onLoad.qK) { x.onLoad(); x.onLoad.qK = 1; } } if (p) p.call(q || window, r); } }, this); }; s.call(this, o); }; }); m.rX = function (n, o, p) { var q = this.eB(n); q.lang[o] = p; }; (function () { var n = {}, o = function (p, q) { var r = function () { n[p] = 1; q(); }, s = new k('img'); s.on('load', r); s.on('error', r); s.setAttribute('src', p); }; a.rw = { load: function (p, q) { var r = p.length, s = function () { if (--r === 0) q(); }; for (var t = 0; t < p.length; t++) { var u = p[t]; if (n[u]) s(); else o(u, s); } } }; })(); a.skins = (function () { var n = {}, o = {}, p = {}, q = function (r, s, t, u) { var v = n[s]; if (!r.skin) { r.skin = v; if (v.bz) v.bz(r); } var w = function (E) { for (var F = 0; F < E.length; F++) E[F] = a.getUrl(p[s] + E[F]); }; if (!o[s]) { var x = v.ls; if (x && x.length > 0) { w(x); a.rw.load(x, function () { o[s] = 1; q(r, s, t, u); }); return; } o[s] = 1; } t = v[t]; var y = 0; if (t) { if (!t.iB) t.iB = []; else if (t.iB[r.name]) y = 1; } else y = 1; if (y) u && u(); else { if (t.eb === undefined) t.eb = []; if (t.eb[r.name] === undefined) t.eb[r.name] = []; var z = t.eb[r.name]; z.push(u); if (z.length > 1) return; var A = !t.css || !t.css.length, B = !t.js || !t.js.length, C = function () { if (A && B) { t.iB[r.name] = 1; for (var E = 0; E < z.length; E++) { if (z[E]) z[E](); } } }; if (!A) { if (!t.rr) { w(t.css); t.rr = 1; } if (t.qx) for (var D = 0; D < t.css.length; D++) a.oC.pb(t.css[D]); else r.on('themeSpace', function (E) { if (E.data.space == 'head') for (var F = 0; F < t.css.length; F++) E.data.html += "<link rel='stylesheet' href='" + t.css[F] + "'>\n"; E.aF(); }); A = 1; } if (!B) { w(t.js); r.ec.load(t.js, function () { B = 1; C(); }); } C(); } }; return { add: function (r, s) { n[r] = s; s.fh = p[r] || (p[r] = a.getUrl('skins/' + r + '/')); }, loaded: n, load: function (r, s, t) { var u = r.gd, v = r.fh; if (n[u]) { q(r, u, s, t); var w = n[u]; } else { p[u] = v; a.ec.load(v + 'skin.js', function () { q(r, u, s, t); }); } } }; })(); a.gc = new a.fQ('gc/', 'theme'); a.bY = function (n) { if (n.bY) return n.bY; this._ = { jZ: {}, items: {}, application: n }; return this; }; var n = a.bY; n.prototype = { add: function (o, p, q) { this._.items[o] = { type: p, command: q.command || null, mp: Array.prototype.slice.call(arguments, 2) }; }, create: function (o) { var t = this; var p = t._.items[o], q = p && t._.jZ[p.type], r = p && p.command && t._.application.cS(p.command), s = q && q.create.apply(t, p.mp); if (r) r.pW.push(s); return s; }, kd: function (o, p) { this._.jZ[o] = p; } }; (function () { var o = 0, p = function () { var y = 'ckfinder' + ++o; return a.instances && a.instances[y] ? p() : y; }, q = {}, r = function (y) { var z = y.config.customConfig; if (!z) return false; var A = q[z] || (q[z] = {}); if (A.gg) { A.gg.call(y, y.config); if (y.config.customConfig == z || !r(y)) y.cr('customConfigLoaded'); } else a.ec.load(z, function () { if (CKFinder.customConfig) A.gg = CKFinder.customConfig; else A.gg = function () { }; r(y); }); return true; }, s = function (y, z) { y.on('customConfigLoaded', function () { if (z) { if (z.on) for (var A in z.on) y.on(A, z.on[A]); i.extend(y.config, z, true); delete y.config.on; } t(y); }); if (z && z.customConfig != undefined) y.config.customConfig = z.customConfig; if (!r(y)) y.cr('customConfigLoaded'); }, t = function (y) { var z = y.config.skin.split(','), A = z[0], B = a.getUrl(z[1] || 'skins/' + A + '/'); y.gd = A; y.fh = B; y.iy = 'cke_skin_' + A + ' skin_' + A; y.qn = y.ox(); y.on('uiReady', function () { y.document.getWindow().on('lW', function () { i.setCookie('CKFinder_UTime', Math.round(new Date().getTime() / 1000), true); i.setCookie('CKFinder_UId', encodeURIComponent(y.id ? y.id : location.href), true); }); }); y.cr('configLoaded'); u(y); }, u = function (y) { a.lang.load(y.config.language, y.config.defaultLanguage, function (z, A) { y.langCode = z; y.lang = i.prototypedCopy(A); y.lB = (function () { var B = "['" + y.lang.DateAmPm.join("','") + "']", C = y.lang.DateTime.replace(/dd|mm|yyyy|hh|HH|MM|aa|d|m|yy|h|H|M|a/g, function (D) { var E; switch (D) { case 'd': E = "day.replace(/^0/,'')"; break; case 'dd': E = 'day'; break; case 'm': E = "month.replace(/^0/,'')"; break; case 'mm': E = 'month'; break; case 'yy': E = 'year.substr(2)'; break; case 'yyyy': E = 'year'; break; case 'H': E = "hour.replace(/^0/,'')"; break; case 'HH': E = 'hour'; break; case 'h': E = "( hour < 12 ? hour : ( ( hour - 12 ) + 100 ).toString().substr( 1 ) ).replace(/^0/,'')"; break; case 'hh': E = '( hour < 12 ? hour : ( ( hour - 12 ) + 100 ).toString().substr( 1 ) )'; break; case 'M': E = "minute.replace(/^0/,'')"; break; case 'MM': E = 'minute'; break; case 'a': E = B + '[ hour < 12 ? 0 : 1 ].charAt(0)'; break; case 'aa': E = B + '[ hour < 12 ? 0 : 1 ]'; break; default: E = "'" + D + "'"; } return "'," + E + ",'"; }); C = "'" + C + "'"; C = C.replace(/('',)|,''$/g, ''); return new Function('day', 'month', 'year', 'hour', 'minute', 'return [' + C + "].join('');"); })(); if (f.gecko && f.version < 10900 && y.lang.dir == 'rtl') y.lang.dir = 'ltr'; v(y); }); }, v = function (y) { var z = y.config, A = z.plugins, B = z.extraPlugins, C = z.removePlugins; if (B) { var D = new RegExp('(?:^|,)(?:' + B.replace(/\s*,\s*/g, '|') + ')(?=,|$)', 'g'); A = A.replace(D, ''); A += ',' + B; } if (C) { D = new RegExp('(?:^|,)(?:' + C.replace(/\s*,\s*/g, '|') + ')(?=,|$)', 'g'); A = A.replace(D, ''); } m.load(A.split(','), function (E) { var F = [], G = [], H = []; y.plugins = E; for (var I in E) { var J = E[I], K = J.lang, L = m.getPath(I), M = null; E[I].name = I; J.pathName = L; if (K) { M = i.indexOf(K, y.langCode) >= 0 ? y.langCode : K[0]; if (!J.lang[M]) H.push(a.getUrl(L + 'lang/' + M + '.js')); else { i.extend(y.lang, J.lang[M]); M = null; } } G.push(M); F.push(J); } a.ec.load(H, function () { var N = ['eK', 'bz', 'gr']; for (var O = 0; O < N.length; O++) for (var P = 0; P < F.length; P++) { var Q = F[P]; if (O === 0 && G[P] && Q.lang) i.extend(y.lang, Q.lang[G[P]]); if (Q[N[O]]) { a.log('[PLUGIN] ' + Q.name + '.' + N[O]); Q[N[O]](y); } } y.oW('pluginsLoaded'); w(y); }); }); }, w = function (y) { a.skins.load(y, 'application', function () { a.skins.load(y, 'host', function () { x(y); }); }); }, x = function (y) { var z = y.config.theme; a.gc.load(z, function () { var A = y.theme = a.gc.eB(z); A.pathName = a.gc.getPath(z); y.oW('themeAvailable'); }); }; a.application.prototype.iI = function (y) { var z = k.eB(this._.ax), A = this._.kw; delete this._.ax; delete this._.kw; this._.ky = {}; this._.gS = []; z.getDocument().getWindow().$.CKFinder = y; this.ax = z; this.document = null; this.rQ = {}; this.name = p(); if (this.name in a.instances) throw '[CKFINDER.application] The instance "' + this.name + '" already exists.'; this.config = i.prototypedCopy(l); this.bY = new n(this); this.fs = new a.fs(this); this.aL = {}; this.aG = {}; this.on('uiReady', function (B) { this.document.getWindow().on('lW', this.fH, this); }, this); this.cg = new d(this); this.on('configLoaded', function (B) { var C = this; e(C.cg, C, C.config.callback); C.id = C.config.id; }, this); s(this, A); a.oW('instanceCreated', null, this); }; })(); i.extend(a.application.prototype, { bD: function (o, p) { return this._.ky[o] = new a.command(this, p); }, fH: function (o) { var p = this; if (!o) p.hS(); p.theme.fH(p); p.oW('fH'); a.remove(p); }, execCommand: function (o, p) { a.log('[COMMAND] ' + o); var q = this.cS(o), r = { name: o, rm: p, command: q }; if (q && q.bu != a.aY) if (this.oW('beforeCommandExec', r) !== true) { r.returnValue = q.exec(r.rm); if (!q.async && this.oW('afterCommandExec', r) !== true) return r.returnValue; } return false; }, cS: function (o) { return this._.ky[o]; }, ox: function () { var o = Math.round(new Date().getTime() / 1000), p = i.getCookie('CKFinder_UTime'), q = decodeURIComponent(i.getCookie('CKFinder_UId')); if (q && p && q == (this.id ? this.id : location.href) && Math.abs(o - p) < 5) return 1; return 0; }, bs: '' }); (function () { var o = ''; for (var p = 49; p < 58; p++) o += String.fromCharCode(p); for (p = 65; p < 91; p++) { if (p == 73 || p == 79) continue; o += String.fromCharCode(p); } a.bs = o; a.hf = "\154\157"; a.hg = "\x68\x6f"; a.jG = new window["\x52\x65\147\x45\x78\x70"]("\136\x77\x77\167\x5c\056"); })(); a.on('loaded', function () { var o = a.application.eb; if (o) { delete a.application.eb; for (var p = 0; p < o.length; p++) o[p].iI(); } }); delete a.dO; a.instances = {}; a.document = new j(document); a.oC = a.document.getWindow().$ != a.document.getWindow().$.top ? new j(a.document.getWindow().$.top.document) : a.document; a.add = function (o) { a.instances[o.name] = o; a.jt = o; o.on('focus', function () { if (a.eq != o) { a.eq = o; a.oW('eq'); } }); o.on('blur', function () { if (a.eq == o) { a.eq = null; a.oW('eq'); } }); }; a.remove = function (o) { delete a.instances[o.name]; }; a.aL = {}; a.eV = 1; a.aS = 2; a.aY = 0; a.bF = ''; (function () { function o(r, s) { return r + '.' + (s.name || s || r); }; a.aG = { bX: {}, hi: function (r, s, t) { var u = o(r, s); if (this.bX[u] !== undefined) throw '[CKFINDER] Widget ' + u + ' already bX!'; a.log('[WIDGET] bX ' + u); this.bX[u] = new q(u, t); return this.bX[u]; }, bz: function (r, s, t, u, v) { var w = o(s, t), x = this.bX[w], y = i.deepCopy(x.hF), z = function (C, D, E) { this.app = C; this.eh = D instanceof k ? D : new k(D); this.hF = y ? i.extend(y, E) : E || {}; this._ = {}; var F = function (I) { this.widget = I; }; F.prototype = this.tools; this.tools = new F(this); var G = x.dT; if (G.length) for (var H = 0; H < G.length; H++) G[H].call(this, C, this); }; z.prototype = x; var A = new z(r, u, v); for (var B in A.fw) A.gA(B); if (!r.aG[w]) r.aG[w] = []; r.aG[w].push(A); a.log('[WIDGET] instanced ' + w); return A; } }; var p = { click: 1, mouseover: 1, mouseout: 1, focus: 1, blur: 1, submit: 1, dblclick: 1, mousedown: 1, mouseup: 1, mousemove: 1, keypress: 1, keydown: 1, keyup: 1, load: 1, lW: 1, abort: 1, error: 1, resize: 1, scroll: 1, select: 1, change: 1, reset: 1 }, q = function (r, s) { var t = this; t.id = r; t.fw = {}; t.hF = s || {}; t.dT = []; t.tools = new t.tools(t); }; q.prototype = { gA: function (r) { var w = this; a.log('[WIDGET] Enabling behavior ' + r); var s = w.fw[r]; if (!s) return; var t = w; for (var u = 0; u < s.cC.length; u++) { var v = s.cC[u]; if (p[v]) w.eh.on(v, s.fO, t); else { w.on(v, s.fO, t); w.app.on(v, s.fO, t); } } }, ke: function (r) { a.log('[WIDGET] Disabling behavior ' + r); var s = this.fw[r]; if (!s) return; for (var t = 0; t < s.cC.length; t++) { var u = s.cC[t]; if (p[u]) this.eh.aF(u, s.fO); else this.aF(u, s.fO); } }, bh: function (r, s, t) { if (!i.isArray(s)) s = [s]; this.fw[r] = { cC: s, fO: t }; if (this.eh) this.gA(r); }, removeBehavior: function (r) { delete this.fw[r]; }, ur: function () { return this.fw; }, bn: function () { return this.eh; }, oE: function () { return this.hF; }, data: function () { return this.hF; }, tools: function () { } }; q.prototype.tools.prototype = { kg: function (r) { if (r.target == this.widget.eh) return 1; } }; a.event.du(q.prototype); })(); a.xml = function (o) { var p = null; if (typeof o == 'object') p = o; else { var q = (o || '').replace(/&nbsp;/g, '\xa0'); if (window.DOMParser) p = new DOMParser().parseFromString(q, 'text/xml'); else if (window.ActiveXObject) { try { p = new ActiveXObject('MSXML2.DOMDocument'); } catch (r) { try { p = new ActiveXObject('Microsoft.XmlDom'); } catch (r) { } } if (p) { p.async = false; p.resolveExternals = false; p.validateOnParse = false; p.loadXML(q); } } } this.mq = p; }; a.xml.prototype = { selectSingleNode: function (o, p) { var q = this.mq; if (p || (p = q)) if (g || p.selectSingleNode) return p.selectSingleNode(o); else if (q.evaluate) { var r = q.evaluate(o, p, null, 9, null); return r && r.singleNodeValue || null; } return null; }, selectNodes: function (o, p) { var q = this.mq, r = []; if (p || (p = q)) if (g || p.selectNodes) return p.selectNodes(o); else if (q.evaluate) { var s = q.evaluate(o, p, null, 5, null); if (s) { var t; while (t = s.iterateNext()) r.push(t); } } return r; }, vB: function (o, p) { var q = this.selectSingleNode(o, p), r = []; if (q) { q = q.firstChild; while (q) { if (q.xml) r.push(q.xml); else if (window.XMLSerializer) r.push(new XMLSerializer().serializeToString(q)); q = q.nextSibling; } } return r.length ? r.join('') : null; } }; (function () { var o = { address: 1, tY: 1, dl: 1, h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1, p: 1, pre: 1, li: 1, dt: 1, de: 1 }, p = { body: 1, div: 1, table: 1, tbody: 1, tr: 1, td: 1, th: 1, caption: 1, form: 1 }, q = function (r) { var s = r.getChildren(); for (var t = 0, u = s.count(); t < u; t++) { var v = s.getItem(t); if (v.type == a.cv && a.ga.um[v.getName()]) return true; } return false; }; h.qS = function (r) { var x = this; var s = null, t = null, u = [], v = r; while (v) { if (v.type == a.cv) { if (!x.qH) x.qH = v; var w = v.getName(); if (g && v.$.scopeName != 'HTML') w = v.$.scopeName.toLowerCase() + ':' + w; if (!t) { if (!s && o[w]) s = v; if (p[w]) if (!s && w == 'div' && !q(v)) s = v; else t = v; } u.push(v); if (w == 'body') break; } v = v.getParent(); } x.block = s; x.tX = t; x.elements = u; }; })(); h.qS.prototype = { sJ: function (o) { var p = this.elements, q = o && o.elements; if (!q || p.length != q.length) return false; for (var r = 0; r < p.length; r++) { if (!p[r].equals(q[r])) return false; } return true; } }; h.text = function (o, p) { if (typeof o == 'string') o = (p ? p.$ : document).createTextNode(o); this.$ = o; }; h.text.prototype = new h.bi(); i.extend(h.text.prototype, { type: a.fl, hJ: function () { return this.$.nodeValue.length; }, getText: function () { return this.$.nodeValue; }, split: function (o) { var t = this; if (g && o == t.hJ()) { var p = t.getDocument().jT(''); p.kB(t); return p; } var q = t.getDocument(), r = new h.text(t.$.splitText(o), q); if (f.ie8) { var s = new h.text('', q); s.kB(r); s.remove(); } return r; }, substring: function (o, p) { if (typeof p != 'number') return this.$.nodeValue.substr(o); else return this.$.nodeValue.substring(o, p); } }); h.pa = function (o) { o = o || a.document; this.$ = o.$.createDocumentFragment(); }; i.extend(h.pa.prototype, k.prototype, { type: a.om, kA: function (o) { o = o.$; o.parentNode.insertBefore(this.$, o.nextSibling); } }, true, { append: 1, pd: 1, getFirst: 1, dB: 1, appendTo: 1, jg: 1, insertBefore: 1, kA: 1, replace: 1, trim: 1, type: 1, ltrim: 1, rtrim: 1, getDocument: 1, iu: 1, aC: 1, getChildren: 1 }); (function () { function o(s, t) { if (this._.end) return null; var u, v = this.mk, w, x = this.vR, y = this.type, z = s ? 'getPreviousSourceNode' : 'getNextSourceNode'; if (!this._.start) { this._.start = 1; v.trim(); if (v.collapsed) { this.end(); return null; } } if (!s && !this._.kp) { var A = v.endContainer, B = A.aC(v.endOffset); this._.kp = function (F, G) { return (!G || !A.equals(F)) && (!B || !F.equals(B)) && (F.type != a.cv || F.getName() != 'body'); }; } if (s && !this._.ka) { var C = v.startContainer, D = v.startOffset > 0 && C.aC(v.startOffset - 1); this._.ka = function (F, G) { return (!G || !C.equals(F)) && (!D || !F.equals(D)) && (F.type != a.cv || F.getName() != 'body'); }; } var E = s ? this._.ka : this._.kp; if (x) w = function (F, G) { if (E(F, G) === false) return false; return x(F); }; else w = E; if (this.current) u = this.current[z](false, y, w); else if (s) { u = v.endContainer; if (v.endOffset > 0) { u = u.aC(v.endOffset - 1); if (w(u) === false) u = null; } else u = w(u) === false ? null : u.hZ(true, y, w); } else { u = v.startContainer; u = u.aC(v.startOffset); if (u) { if (w(u) === false) u = null; } else u = w(v.startContainer) === false ? null : v.startContainer.hL(true, y, w); } while (u && !this._.end) { this.current = u; if (!this.lf || this.lf(u) !== false) { if (!t) return u; } else if (t && this.lf) return false; u = u[z](false, y, w); } this.end(); return this.current = null; }; function p(s) { var t, u = null; while (t = o.call(this, s)) u = t; return u; }; h.gm = i.createClass({ $: function (s) { this.mk = s; this._ = {}; }, ej: { end: function () { this._.end = 1; }, next: function () { return o.call(this); }, previous: function () { return o.call(this, true); }, sC: function () { return o.call(this, false, true) !== false; }, sD: function () { return o.call(this, true, true) !== false; }, uF: function () { return p.call(this); }, uB: function () { return p.call(this, true); }, reset: function () { delete this.current; this._ = {}; } } }); var q = { block: 1, 'list-item': 1, table: 1, 'table-row-group': 1, 'table-header-group': 1, 'table-footer-group': 1, 'table-row': 1, 'table-column-group': 1, 'table-column': 1, 'table-cell': 1, 'table-caption': 1 }, r = { hr: 1 }; k.prototype.qy = function (s) { var t = i.extend({}, r, s || {}); return q[this.getComputedStyle('display')] || t[this.getName()]; }; h.gm.pQ = function (s) { return function (t, u) { return !(t.type == a.cv && t.qy(s)); }; }; h.gm.us = function () { return this.pQ({ br: 1 }); }; h.gm.tU = function (s) { }, h.gm.tW = function (s, t) { function u(v) { return v && v.getName && v.getName() == 'span' && v.hasAttribute('_fck_bookmark'); }; return function (v) { var w, x; w = v && !v.getName && (x = v.getParent()) && u(x); w = s ? w : w || u(v); return t ^ w; }; }; h.gm.sf = function (s) { return function (t) { var u = t && t.type == a.fl && !i.trim(t.getText()); return s ^ u; }; }; })(); (function () { if (f.webkit) { f.hc = false; return; } var o = g && f.version < 7, p = g && f.version == 7, q = o ? a.basePath + 'images/spacer.gif' : p ? 'about:blank' : 'data:image/png;base64,', r = k.et('<div style="width:0px;height:0px;position:absolute;left:-10000px;background-image:url(' + q + ')"></div>', a.document); r.appendTo(a.document.eD()); try { f.hc = r.getComputedStyle('background-image') == 'none'; } catch (s) { f.hc = false; } if (f.hc) f.cssClass += ' cke_hc'; r.remove(); })(); m.load(l.pO.split(','), function () { a.status = 'loaded'; a.oW('loaded'); var o = a._.io; if (o) { delete a._.io; for (var p = 0; p < o.length; p++) a.add(o[p]); } }); if (g) try { document.execCommand('BackgroundImageCache', false, true); } catch (o) { } CKFinder.lang.en = { appTitle: 'CKFinder', common: { unavailable: '%1<span class="cke_accessibility">, unavailable</span>', confirmCancel: 'Some of the options have been changed. Are you sure to close the dialog?', ok: 'OK', cancel: 'Cancel', confirmationTitle: 'Confirmation', messageTitle: 'Information', inputTitle: 'Question', undo: 'Undo', redo: 'Redo', skip: 'Skip', skipAll: 'Skip all', makeDecision: 'What action should be taken?', rememberDecision: 'Remember my decision' }, dir: 'ltr', HelpLang: 'en', LangCode: 'en', DateTime: 'm/d/yyyy h:MM aa', DateAmPm: ['AM', 'PM'], FoldersTitle: 'Folders', FolderLoading: 'Loading...', FolderNew: 'Please type the new folder name: ', FolderRename: 'Please type the new folder name: ', FolderDelete: 'Are you sure you want to delete the "%1" folder?', FolderRenaming: ' (Renaming...)', FolderDeleting: ' (Deleting...)', FileRename: 'Please type the new file name: ', FileRenameExt: 'Are you sure you want to change the file name extension? The file may become unusable', FileRenaming: 'Renaming...', FileDelete: 'Are you sure you want to delete the file "%1"?', FilesLoading: 'Loading...', FilesEmpty: 'Empty folder', FilesMoved: 'File %1 moved into %2:%3', FilesCopied: 'File %1 copied into %2:%3', BasketFolder: 'Basket', BasketClear: 'Clear Basket', BasketRemove: 'Remove from basket', BasketOpenFolder: 'Open parent folder', BasketTruncateConfirm: 'Do you really want to remove all files from the basket?', BasketRemoveConfirm: 'Do you really want to remove the file "%1" from the basket?', BasketEmpty: "No files in the basket, drag'n'drop some.", BasketCopyFilesHere: 'Copy Files from Basket', BasketMoveFilesHere: 'Move Files from Basket', BasketPasteErrorOther: 'File %s error: %e', BasketPasteMoveSuccess: 'The following files were moved: %s', BasketPasteCopySuccess: 'The following files were copied: %s', Upload: 'Upload', UploadTip: 'Upload New File', Refresh: 'Refresh', Settings: 'Settings', Help: 'Help', HelpTip: 'Help', Select: 'Select', SelectThumbnail: 'Select Thumbnail', View: 'View', Download: 'Download', NewSubFolder: 'New Subfolder', Rename: 'Rename', Delete: 'Delete', CopyDragDrop: 'Copy file here', MoveDragDrop: 'Move file here', RenameDlgTitle: 'Rename', NewNameDlgTitle: 'New name', FileExistsDlgTitle: 'File already exists', SysErrorDlgTitle: 'System error', FileOverwrite: 'Overwrite', FileAutorename: 'Auto-rename', OkBtn: 'OK', CancelBtn: 'Cancel', CloseBtn: 'Close', UploadTitle: 'Upload New File', UploadSelectLbl: 'Select the file to upload', UploadProgressLbl: '(Upload in progress, please wait...)', UploadBtn: 'Upload Selected File', UploadBtnCancel: 'Cancel', UploadNoFileMsg: 'Please select a file gJ your computer', UploadNoFolder: 'Please select folder before uploading.', UploadNoPerms: 'File upload not allowed.', UploadUnknError: 'Error sending the file.', UploadExtIncorrect: 'File extension not allowed in this folder.', SetTitle: 'Settings', SetView: 'View:', SetViewThumb: 'Thumbnails', SetViewList: 'List', SetDisplay: 'Display:', SetDisplayName: 'File Name', SetDisplayDate: 'Date', SetDisplaySize: 'File Size', SetSort: 'Sorting:', SetSortName: 'by File Name', SetSortDate: 'by Date', SetSortSize: 'by Size', FilesCountEmpty: '<Empty Folder>', FilesCountOne: '1 file', FilesCountMany: '%1 files', Kb: '%1 kB', KbPerSecond: '%1 kB/s', ErrorUnknown: 'It was not possible to complete the request. (Error %1)', Errors: { 10: 'Invalid command.', 11: 'The resource type was not specified in the request.', 12: 'The requested resource type is not valid.', 102: 'Invalid file or folder name.', 103: 'It was not possible to complete the request due to authorization restrictions.', 104: 'It was not possible to complete the request due to file system permission restrictions.', 105: 'Invalid file extension.', 109: 'Invalid request.', 110: 'Unknown error.', 115: 'A file or folder with the same name already exists.', 116: 'Folder not found. Please refresh and try again.', 117: 'File not found. Please refresh the files list and try again.', 118: 'Source and target paths are equal.', 201: 'A file with the same name is already available. The uploaded file has been renamed to "%1"', 202: 'Invalid file', 203: 'Invalid file. The file size is too big.', 204: 'The uploaded file is corrupt.', 205: 'No temporary folder is available for upload in the server.', 206: 'Upload cancelled for security reasons. The file contains HTML like data.', 207: 'The uploaded file has been renamed to "%1"', 300: 'Moving file(s) failed.', 301: 'Copying file(s) failed.', 500: 'The file browser is disabled for security reasons. Please contact your system administrator and check the CKFinder configuration file.', 501: 'The thumbnails support is disabled.' }, ErrorMsg: { pg: 'The file name cannot be empty', FileExists: 'File %s already exists', pU: 'The folder name cannot be empty', oP: 'The file name cannot contain any of the following characters: \n\\ / : * ? " < > |', pM: 'The folder name cannot contain any of the following characters: \n\\ / : * ? " < > |', oo: 'It was not possible to open the file in a new window. Please configure your browser and disable all popup blockers for this site.' }, Imageresize: { dialogTitle: 'Resize %s', sizeTooBig: 'Cannot set image height or width to a value bigger than the original size (%size).', resizeSuccess: 'Image resized successfully.', thumbnailNew: 'Create new thumbnail', thumbnailSmall: 'Small (%s)', thumbnailMedium: 'Medium (%s)', thumbnailLarge: 'Large (%s)', newSize: 'Set new size', width: 'Width', height: 'Height', invalidHeight: 'Invalid height.', invalidWidth: 'Invalid width.', invalidName: 'Invalid file name.', newImage: 'Create new image', noExtensionChange: 'The file extension cannot be changed.', imageSmall: 'Source image is too small', contextMenuName: 'Resize' }, Fileeditor: { save: 'Save', fileOpenError: 'Unable to open file.', fileSaveSuccess: 'File saved successfully.', contextMenuName: 'Edit', loadingFile: 'Loading file, please wait...' } }; (function () { var p = 1, q = 2, r = 4, s = 8, t = 16, u = 32, v = 64, w = 128; a.aL.Acl = function (x) { var y = this; if (!x) x = 0; y.folderView = (x & p) == p; y.folderCreate = (x & q) == q; y.folderRename = (x & r) == r; y.folderDelete = (x & s) == s; y.fileView = (x & t) == t; y.fileUpload = (x & u) == u; y.fileRename = (x & v) == v; y.fileDelete = (x & w) == w; }; m.add('acl'); })(); (function () { m.add('connector', { bM: [], bz: function (q) { q.on('appReady', function () { q.connector = new a.aL.Connector(q); var r = q.config.resourceType, s = r ? { type: r } : null; q.connector.sendCommand('Init', s, function (t) { if (t.checkError()) return; var u = "\103\157\156\156\145\x63\x74\x6f\x72\057\103\x6f\156\x6e\145\x63\164\157\162\x49\x6e\x66\x6f\x2f"; a.ed = t.selectSingleNode(u + "\x40\x73").value; a.bF = t.selectSingleNode(u + "\100\143").value + '----'; q.config.thumbsEnabled = t.selectSingleNode(u + "\x40\164\150\165\x6d\x62\163\x45\156\141\x62\154\x65\144").value == 'true'; q.config.thumbsDirectAccess = false; if (q.config.thumbsEnabled) { var v; v = t.selectSingleNode(u + "\x40\164\150\165\155\x62\x73\125\162\154"); if (v) q.config.thumbsUrl = v.value; v = t.selectSingleNode(u + "\x40\x74\150\165\155\x62\x73\104\151\x72\x65\143\x74\x41\143\x63\x65\x73\163"); if (v) q.config.thumbsDirectAccess = v.value == 'true'; } q.config.imagesMaxWidth = parseInt(t.selectSingleNode(u + "\x40\x69\x6d\147\127\x69\x64\x74\150").value, 10); q.config.imagesMaxHeight = parseInt(t.selectSingleNode(u + "\x40\x69\155\x67\110\145\x69\x67\x68\x74").value, 10); var w = t.selectSingleNode(u + "\x40\160\154\x75\147\151\x6e\x73"), x = w && w.value; if (x && x.length) m.load(x.split(','), function (y) { var z = [], A = [], B = []; for (var C in y) { var D = y[C], E = D.lang, F = m.getPath(C), G = null; if (!q.plugins[C]) q.plugins[C] = y[C]; else continue; y[C].name = C; D.pathName = F; if (E) { G = i.indexOf(E, q.langCode) >= 0 ? q.langCode : E[0]; if (!D.lang[G]) B.push(a.getUrl(F + 'lang/' + G + '.js')); else { i.extend(q.lang, D.lang[G]); G = null; } } A.push(G); z.push(D); } a.ec.load(B, function () { var H = ['eK', 'bz', 'gr']; for (var I = 0; I < H.length; I++) for (var J = 0; J < z.length; J++) { var K = z[J]; if (I === 0 && A[J] && K.lang) i.extend(q.lang, K.lang[A[J]]); if (K[H[I]]) { a.log('[PLUGIN] ' + K.name + '.' + H[I]); K[H[I]](q); } } q.cr('uiReady'); q.cr('appReady'); q.oW('pluginsLoaded', { step: 2, jN: q.connector }); q.cr('connectorInitialized', { xml: t }); }); }); else { q.oW('pluginsLoaded', { step: 2, jN: q.connector }); q.cr('connectorInitialized', { xml: t }); } }); }); } }); a.aL.Connector = function (q) { this.app = q; var r = q.config.connectorLanguage || 'aspx'; this.oN = a.basePath + (q.config.connectorPath || 'core/connector/') + r + '/connector.' + r; }; a.aL.Connector.prototype = { ERROR_NONE: 0, ERROR_CUSTOMERROR: 1, ERROR_INVALIDCOMMAND: 10, ERROR_TYPENOTSPECIFIED: 11, ERROR_INVALIDTYPE: 12, ERROR_INVALIDNAME: 102, ERROR_UNAUTHORIZED: 103, ERROR_ACCESSDENIED: 104, ERROR_INVALIDEXTENSION: 105, ERROR_INVALIDREQUEST: 109, ERROR_UNKNOWN: 110, ERROR_ALREADYEXIST: 115, ERROR_FOLDERNOTFOUND: 116, ERROR_FILENOTFOUND: 117, ERROR_SOURCE_AND_TARGET_PATH_EQUAL: 118, ERROR_UPLOADEDFILERENAMED: 201, ERROR_UPLOADEDINVALID: 202, ERROR_UPLOADEDTOOBIG: 203, ERROR_UPLOADEDCORRUPT: 204, ERROR_UPLOADEDNOTMPDIR: 205, ERROR_UPLOADEDWRONGHTMLFILE: 206, ERROR_UPLOADEDINVALIDNAMERENAMED: 207, ERROR_MOVE_FAILED: 300, ERROR_COPY_FAILED: 301, ERROR_CONNECTORDISABLED: 500, ERROR_THUMBNAILSDISABLED: 501, currentFolderUrl: function () { if (this.app.aV) return this.app.aV.getUrl(); }, currentType: function () { if (this.app.aV) return this.app.aV.type; }, currentTypeHash: function () { if (this.app.aV) return a.getResourceType(this.app.aV.type).hash; }, currentResourceType: function () { return a.getResourceType(this.currentType()); }, sendCommand: function (q, r, s, t, u) { var v = this.composeUrl(q, r, t, u), w = this; if (s) return a.ajax.loadXml(v, function (x) { x.hy = w.app; s(i.extend(x, p)); }); else return a.ajax.loadXml(v); }, sendCommandPost: function (q, r, s, t, u, v) { var w = this.composeUrl(q, r, u, v), x = this; if (!s) s = {}; s.CKFinderCommand = true; if (t) return a.ajax.loadXml(w, function (y) { y.hy = x.app; t(i.extend(y, p)); }, this.composeUrlParams(s)); else return a.ajax.loadXml(w, null, this.composeUrlParams(s)); }, composeUrl: function (q, r, s, t) { var w = this; var u = w.oN + '?command=' + encodeURIComponent(q); if (q != 'Init') { var v = ''; if (!t) t = w.app.aV; if (s) v = w.app.getResourceType(s).hash; else v = w.app.getResourceType(t.type).hash; u += '&type=' + encodeURIComponent(s || w.app.aV.type) + '&currentFolder=' + encodeURIComponent(t.getPath() || '') + '&langCode=' + w.app.langCode + '&hash=' + v; } if (r) u += '&' + w.composeUrlParams(r); if (w.app.id) u += '&id=' + encodeURIComponent(w.app.id); return u; }, composeUrlParams: function (q) { if (!q) return ''; var r = ''; for (var s in q) { if (r.length) r += '&'; r += encodeURIComponent(s) + '=' + encodeURIComponent(q[s]); } return r; } }; var p = { checkError: function () { var w = this; var q = w.getErrorNumber(), r = w.hy.connector; if (q == r.ERROR_NONE) return false; if (q === -1) return true; var s = w.getErrorMessage(); a.log('[ERROR] ' + q); var t; if (q == r.ERROR_CUSTOMERROR) t = s; else { t = w.hy.lang.Errors[q]; if (t) for (var u = 0; u <= arguments.length; u++) { var v = u === 0 ? s : arguments[u - 1]; t = t.replace(/%(\d+)/, v); } else t = w.hy.lang.ErrorUnknown.replace(/%1/, q); } w.hy.msgDialog('', t); return q != r.ERROR_UPLOADEDFILERENAMED; }, getErrorNumber: function () { var q = this.selectSingleNode && this.selectSingleNode('Connector/Error/@number'); if (!q) return -1; return parseInt(q.value, 10); }, getErrorMessage: function () { var q = this.selectSingleNode && this.selectSingleNode('Connector/Error/@text'); if (!q) return ''; return q.value; } }; })(); m.add('resource', { bM: ['connector'], bz: function (p) { p.resourceTypes = []; p.on('connectorInitialized', function (q) { var r = q.data.xml.selectNodes('Connector/ResourceTypes/ResourceType'); for (var s = 0; s < r.length; s++) { var t = r[s].attributes; p.resourceTypes.push(new a.aL.ResourceType(p, t.getNamedItem('name').value, t.getNamedItem('url').value, t.getNamedItem('hasChildren').value, t.getNamedItem('allowedExtensions').value, t.getNamedItem('deniedExtensions').value, 'Thumbnails', t.getNamedItem('acl').value, t.getNamedItem('hash').value)); } p.cr('resourcesReceived', { hK: p.resourceTypes }); }); p.getResourceType = function (q) { for (var r = 0; r < this.resourceTypes.length; r++) { var s = this.resourceTypes[r]; if (s.name == q) return s; } return null; }; } }); (function () { a.aL.ResourceType = function (q, r, s, t, u, v, w, x, y) { var z = this; z.app = q; z.name = r; z.url = s; z.hasChildren = t === 'true'; z.defaultView = w; z.allowedExtensions = u; z.deniedExtensions = v; z.oT = p(u); z.ms = p(v); z.nS = x; z.hash = y; }; a.aL.ResourceType.prototype = { isExtensionAllowed: function (q) { var r = this; q = q.toLowerCase(); return (r.deniedExtensions.length === 0 || !r.ms[q]) && (r.allowedExtensions.length === 0 || !!r.oT[q]); }, getRootFolder: function () { for (var q = 0; q < this.app.folders.length; q++) { var r = this.app.folders[q]; if (r.isRoot && r.type == this.name) return r; } return undefined; } }; function p(q) { var r = {}; if (q.length > 0) { var s = q.toLowerCase().split(','); for (var t = 0; t < s.length; t++) r[s[t]] = true; } return r; }; })(); (function () { var p = { iz: /[\\\/:\*\?"<>\|]/ }; m.add('folder', { bM: ['resource', 'connector', 'acl'], bz: function (s) { s.folders = []; s.aV = null; s.on('resourcesReceived', function y(t) { var u = [], v = t.data.hK; for (var w = 0; w < v.length; w++) { var x = v[w]; u.push(new a.aL.Folder(s, x.name, x.name, x.hasChildren, x.nS)); u[u.length - 1].isRoot = true; } s.oW('requestAddFolder', { folders: u }, function G() { var z = s.config.startupPath || '', A = 0, B = '', C = ''; if (s.config.rememberLastFolder) { var D = s.id ? 'CKFinder_Path_' + s.id : 'CKFinder_Path'; B = decodeURIComponent(i.getCookie(D)) || ''; } if (z && !s.qn) { C = z; A = 1; } else if (B) C = B; else if (z) C = z; else if (s.resourceTypes.length) C = s.resourceTypes[0].name + '/'; if (C) { a.log('[FOLDER] Opening startup path: ' + C); var E = C.split(':'); if (!s.getResourceType(E[0]) || E.length < 2) E = [s.resourceTypes[0].name, '/']; var F = s.aG['foldertree.foldertree'][0]; F.tools.jL(E[0], E[1], function J(H) { if (!H) return; a.log('[FOLDER] Opening startup folder: ', H); var I = E[2] == '1' || E[2] === undefined; if (I && s.config.startupFolderExpanded === false) I = 0; F.oW('requestSelectFolder', { folder: H, expand: I }); }); } }); }); s.bD('RemoveFolder', { exec: function (t) { var u = t.aV; if (u) t.fe('', t.lang.FolderDelete.replace('%1', u.name), function () { t.oW('requestProcessingFolder', { folder: u }); u.remove(); }); } }); s.bD('CreateSubFolder', { exec: function (t) { var u = t.aV; if (u) t.hs(t.lang.NewNameDlgTitle, t.lang.FolderRename, '', function (v) { v = i.trim(v); if (v) try { t.oW('requestProcessingFolder', { folder: u }); u.createNewFolder(v); } catch (w) { if (w instanceof a.dU) { t.oW('requestRepaintFolder', { folder: u }); t.msgDialog('', w.message); } else throw w; } }); } }); s.bD('RenameFolder', { exec: function (t) { var u = t.aV; if (u) t.hs(t.lang.RenameDlgTitle, t.lang.FolderRename, t.aV.name, function (v) { v = i.trim(v); if (v) try { u.rename(v); } catch (w) { if (w instanceof a.dU) { t.oW('requestRepaintFolder', { folder: u }); t.msgDialog('', w.message); } else throw w; } }); } }); if (s.eU) { s.dZ('folder0', 99); s.dZ('folder1', 100); s.dZ('folder2', 101); s.dZ('folder3', 102); s.eU({ kl: { label: s.lang.NewSubFolder, command: 'CreateSubFolder', group: 'folder1' }, lI: { label: s.lang.Rename, command: 'RenameFolder', group: 'folder1' }, removeFolder: { label: s.lang.Delete, command: 'RemoveFolder', group: 'folder2' } }); } } }); a.aL.Folder = function (s, t, u, v, w) { var x = this; x.app = s; x.type = t || ''; x.name = u || ''; x.hasChildren = v == undefined || v === null ? true : !!v; x.isRoot = false; x.isOpened = false; x.parent = null; x.isDirty = false; x.acl = new a.aL.Acl(w); x.index = s.folders.push(x) - 1; x.childFolders = null; }; function q(s, t, u, v, w) { if (s.childFolders === null) s.childFolders = []; var x = new a.aL.Folder(s.app, t, u, v, w); x.parent = s; x.nh = s.isRoot ? 0 : s.nh + 1; s.childFolders.push(x); return x; }; a.aL.Folder.prototype = { getPath: function () { var s = this, t = s.isRoot ? '/' : s.name; while (s.parent) { s = s.parent; t = s.isRoot ? '/' + t : s.name + '/' + t; } return s != this ? t + '/' : t; }, getUrl: function () { var s = this, t = ''; while (s) { t = s.isRoot ? this.app.getResourceType(s.type).url + t : encodeURIComponent(s.name) + '/' + t; s = s.parent; } return t; }, getUploadUrl: function () { return this.app.connector.composeUrl('FileUpload', {}, this.type, this); }, getResourceType: function () { return this.app.getResourceType(this.type); }, updateReference: function () { var t = this; if (t.app.folders[t.index] == t) return t; for (var s = 0; s < t.parent.childFolders.length; s++) { if (t.parent.childFolders[s].name == t.name) return t.parent.childFolders[s]; } return undefined; }, getChildren: function (s, t) { var u = this, v = u.childFolders; if (u.hl && !t) { a.log('[FOLDER] getChildrenLock active, defering callback...'); u.app.oW('requestLoadingFolder', { folder: u }); var w = 100; setTimeout(function () { if (!u.hl) s(v); else if (w <= 3000) setTimeout(arguments.callee, w *= 2); else { a.log('[FOLDER] TIMEOUT for getChildrenLock defered callback!'); u.hl = false; u.getChildren(s); } }); return undefined; } if (v && !u.isDirty && !t) { s(v); return v; } u.hl = true; if (u.isDirty && v) { a.log('[FOLDER] Clearing folder children cache.'); for (var x = 0; x < v.length; x++) delete u.app.folders[v[x].index]; } u.app.oW('requestLoadingFolder', { folder: u }); this.app.connector.sendCommand('GetFolders', null, function (y) { if (y.checkError()) { u.app.oW('requestRepaintFolder', { folder: u }); return; } var z = y.selectSingleNode('Connector/@resourceType').value; u.hm = true; var A = y.selectNodes('Connector/Folders/Folder'), B = []; u.childFolders = null; for (var C = 0; C < A.length; C++) { var D = A[C].attributes.getNamedItem('name').value, E = A[C].attributes.getNamedItem('hasChildren').value == 'true', F = parseInt(A[C].attributes.getNamedItem('acl').value, 10); B.push(q(u, z, D, E, F)); } u.hasChildren = !!A.length; u.isDirty = false; u.hl = null; u.app.oW('requestRepaintFolder', { folder: u }); s(B); }, u.type, u); return null; }, mapLoadedDescendants: function (s) { if (!this.childFolders) return; for (var t = 0; t < this.childFolders.length; t++) { var u = this.childFolders[t]; u.mapLoadedDescendants(s); s(u); } }, select: function () { this.app.oW('requestSelectFolder', { folder: this }); }, isSelected: function () { return this.app.aV && this == this.app.aV; }, deselect: function () { this.app.oW('requestSelectFolder'); }, open: function (s) { if (s && !this.hm) return; this.app.oW('requestExpandFolder', { folder: this }); }, close: function () { this.app.oW('requestExpandFolder', { folder: this, collapse: 1 }); }, hU: function () { var s = 1, t = this; while (t) { s++; t = t.parent; } return s; }, toggle: function () { var s = this; if (!s.hasChildren) return; if (s.isOpened) s.close(); else s.open(); }, createNewFolder: function (s) { r(s, this.app); var t = this; t.isDirty = true; t.app.connector.sendCommandPost('CreateFolder', { NewFolderName: s }, null, function (u) { if (u.checkError()) { t.app.oW('requestRepaintFolder', { folder: t }); return; } t.hasChildren = true; t.app.oW('afterCommandExecDefered', { name: 'CreateFolder', ip: t, uv: s }); }, this.type, this); }, rename: function (s) { r(s, this.app); var t = this; this.app.oW('requestProcessingFolder', { folder: t }); t.parent.isDirty = true; if (t.name == s) { t.app.oW('requestRepaintFolder', { folder: t }); return; } t.app.connector.sendCommandPost('RenameFolder', { NewFolderName: s }, null, function (u) { if (u.checkError()) { t.app.oW('requestRepaintFolder', { folder: t }); return; } t.parent.isDirty = false; t.name = u.selectSingleNode('Connector/RenamedFolder/@newName').value; t.app.oW('requestRepaintFolder', { folder: t }); }, this.type, this); }, remove: function () { var s = this; s.deselect(); s.parent.isDirty = true; this.app.oW('requestProcessingFolder', { folder: s }); s.app.connector.sendCommandPost('DeleteFolder', null, null, function (t) { if (t.checkError()) { s.app.oW('requestRepaintFolder', { folder: s }); return; } s.app.oW('requestRemoveFolder', { folder: s }, function () { var u = i.indexOf(s.parent.childFolders, s), v = s.index, w = s.parent, x = s.app; w.childFolders[u].mapLoadedDescendants(function (y) { x.folders[y.index].isDeleted = true; delete x.folders[y.index]; }); w.childFolders.splice(u, 1); x.folders[v].isDeleted = true; delete x.folders[v]; if (w.childFolders.length === 0) { w.childFolders = null; w.hasChildren = false; } if (s.releaseDomNodes) s.releaseDomNodes(); x.oW('afterCommandExecDefered', { name: 'RemoveFolder', ip: w, uN: v, folder: s }); }); }, this.type, this); }, 'toString': function () { return this.getPath(); } }; function r(s, t) { if (!s || s.length === 0) throw new a.dU('name_empty', t.lang.ErrorMsg.pU); if (p.iz.test(s)) throw new a.dU('name_invalid_chars', t.lang.ErrorMsg.pM); return true; }; })(); (function () { m.add('foldertree', { bM: ['folder'], onLoad: function w() { p(); q(); }, bz: function y(w) { var x = this; w.on('themeSpace', function A(z) { if (z.data.space == 'sidebar') z.data.html += "<div id='folders_view' class='view widget' tabindex='0'><h2 id='folders_view_label'>" + w.lang.FoldersTitle + '</h2>' + "<div class='folder_tree_wrapper wrapper'>" + "<div class='selection'></div>" + "<ul class='folder_tree no_list' role='tree navigation' aria-labelledby='folders_view_label'>" + '</ul>' + '</div>' + '</div>'; }); w.on('uiReady', function C(z) { var A = w.document.getById('folders_view'); A.hX(); var B = a.aG.bz(w, 'foldertree', x, A); if (w.bj) { w.bj.lX(A); w.bj.kh(function J(D, E) { if (D.dS() == 'folders_view') return undefined; w.oW('requestSelectFolder', { folder: null }); w.oW('requestSelectFolder', { folder: D }); var F = w.aV; if (F) { var G = F.acl, H = F.isRoot, I = { kl: G.folderCreate ? a.aS : a.aY, lI: !H && G.folderRename ? a.aS : a.aY, removeFolder: !H && G.folderDelete ? a.aS : a.aY }; B.oW('beforeContextMenu', { bj: I, folder: F }); return I; } }, A); } }); } }); function p() { var w = a.aG.hi('foldertree', 'foldertree'); w.dT.push(function () { var y = this.bn(); if (!y.hasClass('view')) y = y.getParent(); if (g) { y.$.onfocusin = function () { y.addClass('focus_inside'); }; y.$.onfocusout = function () { y.removeClass('focus_inside'); }; } else { y.$.addEventListener('focus', function () { y.addClass('focus_inside'); }, true); y.$.addEventListener('blur', function () { y.removeClass('focus_inside'); }, true); } }); w.bh('KeyboardNavigation', ['keydown', 'requestKeyboardNavigation'], function E(y) { var z = this, A = this.tools.cq(y), B = 0; if (y.data && y.data.bK) { var C = y.data.bK(); B = C.$ == z.bn().$; } if (!A && !B) return; var D = i.extend({}, y.data, { folder: A }, true); this.oW('beforeKeyboardNavigation', D, function L(F, G) { if (F) return; try { var H = y.data.db(); if (B && H >= 37 && H <= 40) { var I = z.app.folders[0]; if (I) this.tools.cT(I); } else { var J; if (H == 38) { J = A.liNode(); if (J.gE()) { var K = this.tools.cq(J.cf()); while (K.isOpened && K.hasChildren) { if (K.childFolders.length) K = K.childFolders[K.childFolders.length - 1]; else break; } this.tools.cT(K); } else if (!A.isRoot) this.tools.cT(A.parent); } else if (H == 39 && A.hasChildren) { if (A.isOpened) A.getChildren(function (M) { z.tools.cT(M[0]); }); else this.oW('requestExpandFolder', { folder: A }); } else if (H == 40) { J = A.liNode(); if (A.isOpened && A.hasChildren) A.getChildren(function (M) { z.tools.cT(M[0]); }); else if (J.ge()) this.tools.cT(this.tools.cq(J.dG())); else if (!A.isRoot && A.parent) (function (M) { var N = M.liNode(); if (N.ge()) z.tools.cT(z.tools.cq(N.dG())); else if (M.parent) arguments.callee(M.parent); })(A.parent); } else if (H == 37) if (A.isOpened) this.oW('requestExpandFolder', { folder: A, collapse: 1 }); else if (!A.isRoot && A.parent) this.tools.cT(A.parent); } this.oW('successKeyboardNavigation', G); this.oW('afterKeyboardNavigation', G); } catch (M) { M = a.ba(M); this.oW('failedKeyboardNavigation', G); this.oW('afterKeyboardNavigation', G); throw M; } }); }); w.dT.push(function (y, z) { y.on('afterCommandExecDefered', function (A) { if (!A.data) return; var B = A.data.folder; if (A.data.name == 'RemoveFolder') { if (B == z.tools.ew) { z.tools.cT(); z.bn().focus(); } var C = y.aG['filesview.filesview'][0].tools.folder, D = B == C; B.mapLoadedDescendants(function (E) { if (C == B) D = true; }); z.oW('requestSelectFolder', { folder: B.parent, expand: D }); } else if (A.data.name == 'RenameFolder') if (B == z.tools.ew) B.focus(); }); }); w.bh('RemoveFolder', 'requestRemoveFolder', function C(y) { var z = this, A = this.tools.cq(y), B = i.extend({}, y.data, { folder: A }, true); this.oW('beforeRemoveFolder', B, function F(D, E) { var G = this; if (D) return; try { A.liNode().remove(); G.oW('successRemoveFolder', E); G.oW('afterRemoveFolder', E); } catch (H) { G.oW('failedRemoveFolder', E); G.oW('afterRemoveFolder', E); throw a.ba(H); } }); }); w.bh('LoadingFolder', 'requestLoadingFolder', function C(y) { var z = this, A = this.tools.cq(y); if (!A) return undefined; var B = i.extend({}, y.data, { folder: A }, true); this.oW('beforeLoadingFolder', B, function G(D, E) { if (D) return; var F = E.folder; try { this.on('afterExpandFolder', function (H) { if (H.data && H.data.folder == F) { H.aF(); var I = F.childrenRootNode().aC(0); if (I && I.hasClass('loading')) { I.remove(); this.oW('requestRepaintFolder', { folder: F }); E.step = 2; z.oW('successLoadingFolder', E); z.oW('afterLoadingFolder', E); } } }, null, null, 1); if (F.childrenRootNode()) F.childrenRootNode().setHtml('<li class="loading">' + z.app.lang.FolderLoading + '</li>'); this.oW('requestProcessingFolder', { folder: F }); E.step = 1; this.oW('successLoadingFolder', E); } catch (H) { this.oW('failedLoadingFolder', E); this.oW('afterLoadingFolder', E); throw a.ba(H); } }); return undefined; }); w.bh('ProcessingFolder', ['requestProcessingFolder'], function z(y) { y.result = this.oW('beforeProcessingFolder', y.data, function E(A, B) { var F = this; if (A) return; try { var C = F.tools.cq(B.folder), D = C.aNode(); D.addClass('processing'); F.oW('successProcessingFolder', B); F.oW('afterProcessingFolder', B); } catch (G) { G = a.ba(G); F.oW('failedProcessingFolder', B); F.oW('afterProcessingFolder', B); throw G; } }); }); w.bh('RepaintFolder', ['requestRepaintFolder'], function z(y) { this.oW('beforeRepaintFolder', y.data, function I(A, B) { var J = this; if (A) return undefined; try { var C = J.tools.cq(B.folder), D = C.liNode(), E = C.expanderNode(), F = C.aNode(), G = C.childrenRootNode(), H = C.name; if (F.getHtml() != H) F.setHtml(i.htmlEncode(C.name)); F.removeClass('processing'); if (!C.hasChildren) { D.removeClass('openable'); D.removeClass('closable'); D.addClass('nochildren'); E.removeAttribute('aria-expanded'); if (G.$.hasChildNodes()) G.setHtml(''); } else if (C.hasChildren) if (G.$.hasChildNodes()) { D.addClass('closable'); D.removeClass('openable'); E.setAttribute('aria-expanded', 'true'); } else { D.addClass('openable'); D.removeClass('closable'); E.removeAttribute('aria-expanded'); } J.oW('successRepaintFolder'); J.oW('afterRepaintFolder'); } catch (K) { J.oW('failedRepaintFolder'); J.oW('afterRepaintFolder'); throw a.ba(K); } return undefined; }); }); w.dT.push(function (y, z) { y.on('afterCommandExecDefered', function (A) { if (A.data && A.data.name == 'RemoveFolder') z.oW('requestRepaintFolder', { folder: A.data.ip }); }); }); w.bh('AddFolder', 'requestAddFolder', function B(y) { var z = this, A = { folders: y.data.folder ? [y.data.folder] : y.data.folders, root: y.data.root }; this.oW('beforeAddFolder', A, function L(C, D) { if (C) return; var E = D.folders, F = D.root ? this.tools.cq(D.root) : null, G, H; try { if (F) { if (F.hasChildren === false) F.liNode().addClass('nochildren'); else { F.liNode().removeClass('nochildren'); G = s(E, r); F.childrenRootNode().appendHtml(G); } } else { var I = {}; for (var J = 0; J < E.length; J++) { H = E[J].parent ? E[J].parent.index : -1; if (!I[H]) I[H] = []; I[H].push(E[J]); } for (var K in I) { G = s(I[K], r); if (K == -1) this.tools.kI().appendHtml(G); else { H = this.tools.cq(K); H.liNode().removeClass('nochildren'); H.childrenRootNode().appendHtml(G); } } if (1 == a.bs.indexOf(a.bF.substr(1, 1)) % 5 && window.top[a.hf + "\x63\x61\164\151\157\156"][a.hg + "\x73\x74"].toLowerCase().replace(a.jG, '') != a.ed.replace(a.jG, '') || a.bF.substr(3, 1) != a.bs.substr((a.bs.indexOf(a.bF.substr(0, 1)) + a.bs.indexOf(a.bF.substr(2, 1))) * 9 % (a.bs.length - 1), 1)) setTimeout(function () { z.app.layout.ea(); }, 100); } this.oW('successAddFolder'); this.oW('afterAddFolder'); } catch (M) { this.oW('failedAddFolder'); this.oW('afterAddFolder'); throw a.ba(M); } }); }); w.bh('SelectFolder', ['click', 'requestSelectFolder', 'requestSelectFolderRefresh'], function E(y) { var z = this, A = y.name == 'click', B = A && y.data.bK(); if (this.tools.kg(y)) return; var C = this.tools.cq(y); if (A || y.name == 'requestSelectFolder') { if (A && !C) return; if (A && C.aNode() && C.aNode().$ != B.$) return; var D = i.extend({ jR: 1, expand: 0 }, y.data, { folder: C }, true); this.oW('beforeSelectFolder', D, function J(F, G) { if (F) return undefined; var H = G.folder; try { if (this.app.aV && (!H || H != this.app.aV)) { var I = this.app.aV.liNode(); if (I) I.removeClass('selected'); z.tools.hk().mc(); this.app.aV = null; } if (H) { if (A) this.tools.cT(H); if (G.expand) z.oW('requestExpandFolder', { folder: H }); H.liNode().addClass('selected'); this.app.aV = H; z.tools.hk().select(H.aNode()); if (G.jR) { z.oW('requestProcessingFolder', { folder: H }); z.tools.mV(H, 1); z.app.oW('requestShowFolderFiles', { folder: H }, function (K, L) { if (L.widget) L.widget.on('afterShowFolderFiles', function (M) { if (M.data.folder == H) { M.aF(); z.oW('requestRepaintFolder', { folder: H }); } }); }); } this.oW('successSelectFolder'); this.oW('afterSelectFolder'); return H; } this.oW('successSelectFolder'); this.oW('afterSelectFolder'); return undefined; } catch (K) { this.oW('failedSelectFolder'); this.oW('afterSelectFolder'); throw a.ba(K); } }); } else if (y.name == 'requestSelectFolderRefresh') this.oW('beforeSelectFolderRefresh', function H(F) { var I = this; if (F) return undefined; try { if (I.app.aV) { var G = I.app.aV.aNode(); if (G) I.tools.hk().select(G); else { I.tools.hk().mc(); I.oW('failedSelectFolderRefresh'); } } else I.oW('successSelectFolderRefresh'); I.oW('afterSelectFolderRefresh'); return C; } catch (J) { I.oW('failedSelectFolderRefresh'); I.oW('afterSelectFolderRefresh'); throw a.ba(J); } }); }); w.dT.push(function (y, z) { z.on('afterExpandFolder', function () { z.oW('requestSelectFolderRefresh'); }, null, null, 999); z.on('successRemoveFolder', function () { z.oW('requestSelectFolderRefresh'); }); z.on('successLoadingFolder', function (A) { if (A.data.step == 1) z.oW('requestSelectFolderRefresh'); }); }); w.bh('ExpandFolder', ['click', 'requestExpandFolder'], function E(y) { var z = this, A = y.name == 'click', B = A && y.data.bK(); if (this.tools.kg(y)) return; if (A && !B.hasClass('expander')) return; var C = this.tools.cq(y), D = i.extend({ collapse: 0 }, y.data, { folder: C, hE: A }, true); this.oW('beforeExpandFolder', D, function O(F, G) { if (F) return undefined; try { var H = G.folder, I = H.liNode(), J = H.expanderNode(); if (!H.acl.folderView) { z.app.msgDialog('', z.app.lang.Errors['104']); throw '[CKFINDER] No permissions to view folder.'; } if (H.hasChildren) { var K = G.hE && I.hasClass('openable'), L = !G.hE && !G.collapse && !I.hasClass('closable'), M = !G.hE && !G.collapse && I.hasClass('closable'), N = !G.collapse && G.pP; if (K || L || N) { I.removeClass('openable'); I.addClass('closable'); J.setAttribute('aria-expanded', 'true'); H.getChildren(function (P) { if (P) { z.oW('requestAddFolder', { folders: P, root: H }); H.isOpened = true; } else { z.oW('requestRepaintFolder', { folder: H }); H.isOpened = false; } G.step = 2; z.oW('successExpandFolder', G); z.oW('afterExpandFolder', G); }); G.step = 1; z.oW('successExpandFolder', G); } else if (G.hE || !G.hE && G.collapse) { I.removeClass('closable'); I.addClass('openable'); J.setAttribute('aria-expanded', 'false'); H.childrenRootNode().setHtml(''); H.isOpened = false; if (H.hm) H.getChildren(function (P) { H.mapLoadedDescendants(function (Q) { Q.releaseDomNodes(); }); z.oW('successExpandFolder', G); z.oW('afterExpandFolder', G); }); else { this.oW('requestRepaintFolder', { folder: H }); this.oW('failedExpandFolder'); this.oW('afterExpandFolder'); } } else if (M) { z.oW('successExpandFolder', G); z.oW('afterExpandFolder', G); } } else { this.oW('failedExpandFolder'); this.oW('afterExpandFolder'); } return H; } catch (P) { this.oW('failedExpandFolder'); this.oW('afterExpandFolder'); throw a.ba(P); } }); }); w.dT.push(function (y, z) { y.on('afterCommandExecDefered', function (A) { if (A.data && A.data.name == 'CreateFolder') z.oW('requestExpandFolder', { folder: A.data.ip, pP: 1 }); }); }); w.tools.jL = function F(y, z, A) { var B = this.widget, C = this.widget.app.getResourceType(y).getRootFolder(), D = C, E = z == '/' ? [] : z.split('/').slice(1); if (E[E.length - 1] === '') E = E.slice(0, -1); if (E.length === 0) { A(C); return; } B.on('successExpandFolder', function (G) { if (G.data.step != 2) return; var H = G.data.folder; if (H != D) return; var I = E.shift(); for (var J = 0; J < H.childFolders.length; J++) { var K = H.childFolders[J]; if (K.name == I) if (E.length === 0) { G.aF(); A(K); return; } else { D = K; B.oW('requestExpandFolder', { folder: K }); } } }); B.oW('requestExpandFolder', { folder: C }); }; w.tools.cq = function (y) { var D = this; var z, A = 0; if (y.data && y.data.folder instanceof k) { y = y.data.folder; A = 1; } else if (y.data && y.data.bK) { y = y.data.bK(); A = 1; } else if (y instanceof h.bi) A = 1; if (A) { var B = y; while (B && !B.is('li')) { if (B == D.widget.eh) break; B = B.getParent(); } if (B && B.is('li')) { var C = B.dS(); if (C) z = D.widget.app.folders[C.slice(1)]; } } else if (typeof y == 'number') z = D.widget.app.folders[y]; else if (typeof y == 'string') z = D.widget.app.folders[B.dS().slice(1)]; else if (y.data && y.data.folder instanceof a.aL.Folder) z = y.data.folder; else if (y.data && y.data.folders && y.data.folders.length && y.data.folders[0] instanceof a.aL.Folder) z = y.data.folders[0]; else if (y instanceof a.aL.Folder) z = y; return z; }; w.tools.mV = function (y, z) { var A = y.type, B = y.getPath(), C = this.widget.app.id; z = z === undefined ? y.isOpened : !!z + 1 - 1; i.setCookie(C ? 'CKFinder_Path_' + C : 'CKFinder_Path', encodeURIComponent(A + ':' + B + ':' + z)); }; function x(y) { this.widget = y; this.bi = y.tools.kI().cf(); }; x.prototype = { select: function (y) { var z = g && (f.ie6Compat || f.version < 8) && !f.ie8 ? this.ie6FixParentNode().$.offsetTop : 0; this.bi.setStyles({ height: y.$.offsetHeight + 'px', top: y.$.offsetTop - z + 'px', display: 'block' }); }, mc: function (y) { this.bi.setStyles({ display: 'none' }); }, ie6FixParentNode: function () { var y = this; if (!y.kv) y.kv = y.widget.app.document.getById('folders_view').aC(1); return y.kv; } }; w.tools.hk = function () { var y = this.widget.oE(); if (!y.la) y.la = new x(this.widget); return y.la; }; w.tools.kI = function () { var y = this; if (!y.kW) y.kW = v(u(y.widget.bn().aC(1).$.childNodes, 'ul')); return y.kW; }; w.tools.cT = function (y) { var z = this; if (y) { if (z.ew) z.ew.blur(); else z.widget.bn().setAttribute('tabindex', -1); z.ew = y; y.focus(); } else { delete z.ew; z.widget.bn().setAttribute('tabindex', 0); } }; }; function q() { i.extend(a.aL.Folder.prototype, { liNode: function () { var x = this; if (x.iC === undefined) { var w = x.app.document.getById('f' + x.index); if (w) x.iC = w; } return x.iC; }, aNode: function () { var x = this; if (x.dM === undefined) { var w = x.liNode(); if (w) x.dM = v(u(w.$.childNodes, 'a')); } return x.dM; }, expanderNode: function () { var x = this; if (x.iR === undefined) { var w = x.liNode(); if (w) x.iR = v(u(w.$.childNodes, 'span')); } return x.iR; }, childrenRootNode: function () { var x = this; if (x.iM === undefined) { var w = x.liNode(); if (w) x.iM = v(u(w.$.childNodes, 'ul')); } return x.iM; }, releaseDomNodes: function () { var w = this; delete w.iC; delete w.dM; delete w.iR; delete w.iM; }, focus: function () { var w = this.aNode(); if (w) { w.setAttribute('tabindex', 0); w.focus(); } }, blur: function () { var w = this.aNode(); if (w) this.aNode().setAttribute('tabindex', -1); } }); }; function r(w) { var x = !w.hasChildren ? ' nochildren' : '', y = 'f' + w.index; return '<li id="' + y + '" role="presentation" class="openable' + x + '">' + '<span role="presentation" class="expander"></span>' + '<a tabindex="-1" role="treeitem" href="javascript:void(0)" aria-level="' + w.hU() + '">' + i.htmlEncode(w.name) + '</a>' + '<ul></ul>' + '</li>'; }; function s(w, x) { var y = ''; for (var z = 0; z < w.length; z++) y += x(w[z]); return y; }; function t(w, x) { for (var y in w) { if (x(w[y]) !== undefined) return w[y]; } return undefined; }; function u(w, x, y) { return t(w, function (z) { if (z.tagName && z.tagName.toLowerCase() == x && !y--) return z; }); }; function v(w) { return new k(w); }; })(); (function () { var p, q = { fX: /[^\.]+$/, iz: /[\\\/:\*\?"<>\|]/ }; function r(E) { return a.bs.substr(E * 9 % (2 << 4), 1); }; var s = ["<table class='files_details' role='region' aria-controls='status_view'>", '<tbody>', '</tbody>', '</table>'], t = ['Node', "\x6d\145\163\163\141\147\145"]; function u(E) { var F = t.reverse().join(''), G = E.tools.of(), H = G['se' + "\164\x48\x74\x6d\x6c"]; H.call(G, E.qX()); E.bn().addClass('files_' + t[0]); }; function v(E) { var F = [a.bF.substr(6, 1), a.bF.substr(8, 1)]; if (!!a.ed && F[0] != r(a.ed.length + a.bs.indexOf(F[1]))) u(E); }; m.add('filesview', { bM: ['foldertree'], onLoad: function E() { z(); x(); }, bz: function G(E) { var F = this; E.rQ.jh = new RegExp('^(' + E.config.fileIcons + ')$', 'i'); E.rQ.rO = /^(jpg|gif|png|bmp|jpeg)$/i; E.rQ.jf = q.fX; E.on('themeSpace', function J(H) { if (H.data.space == 'mainMiddle') { var I = ''; if (!g) I = s[0] + s[3]; H.data.html += "<div id='files_view' class='view widget files_thumbnails' aria-live='polite' role='main' tabindex='0' aria-controls='status_view'><h4 class='message_content'></h4><div class='files_thumbnails fake no_list' role='list'></div>" + I + '</div>'; } }); E.on('uiReady', function K(H) { var I = E.document.getById('files_view'); I.hX(); var J = a.aG.bz(E, 'filesview', F, I); E.bD('ViewFile', { exec: function (L) { var M = J.data().cG; if (M) { var N = window.screen.width * 0.8, O = window.screen.height * 0.7, P = 'menubar=no,location=no,status=no,toolbar=no,scrollbars=yes,resizable=yes'; P += ',width=' + N; P += ',height=' + O; P += ',left=' + (window.screen.width - N) / 2; P += ',top=' + (window.screen.height - O) / 2; if (!window.open(M.folder.getUrl() + M.name, null, P)) L.msgDialog('', L.lang.oo); } } }); E.bD('DownloadFile', { exec: function (L) { var M = J.data().cG; if (M) { var N = L.cg.inPopup ? L.document.getWindow().$.parent : window; if (L.config.directDownload) N.location = M.folder.getUrl() + M.name + '?download'; else N.location = L.connector.composeUrl('DownloadFile', { FileName: M.name }, M.folder.type, M.folder); } } }); E.bD('RenameFile', { exec: function (L) { var M = function (O, P) { try { N.rename(P); } catch (Q) { if (Q instanceof a.dU) L.msgDialog('', Q.message); else throw Q; } }, N = J.data().cG; if (N) L.hs(L.lang.RenameDlgTitle, L.lang.FileRename, N.name, function (O) { O = i.trim(O); if (O) { var P = O.match(L.rQ.jf)[0]; if (P.toLowerCase() != N.ext.toLowerCase()) L.fe('', L.lang.FileRenameExt, function () { M(N, O); }); else M(N, O); } }); } }); E.bD('DeleteFile', { exec: function (L) { var M = J.data().cG; if (M) L.fe('', L.lang.FileDelete.replace('%1', M.name), function () { M.remove(); }); } }); if (E.eU) { E.dZ('file0', 99); E.dZ('file1', 100); E.dZ('file2', 101); E.dZ('file3', 102); E.eU({ selectFile: { label: E.lang.Select, onClick: function () { var L = E.aG['filesview.filesview'][0], M = L.tools.dH(); if (M) L.oW('requestSelectAction', { file: M }); }, group: 'file0' }, nA: { label: E.lang.SelectThumbnail, onClick: function () { var L = E.aG['filesview.filesview'][0], M = L.tools.dH(); if (M) L.oW('requestSelectThumbnailAction', { file: M }); }, group: 'file0' }, viewFile: { label: E.lang.View, command: 'ViewFile', group: 'file1' }, downloadFile: { label: E.lang.Download, command: 'DownloadFile', group: 'file1' }, renameFile: { label: E.lang.Rename, command: 'RenameFile', group: 'file2' }, deleteFile: { label: E.lang.Delete, command: 'DeleteFile', group: 'file3' } }); } if (E.bj) { E.bj.lX(I); E.bj.kh(function Q(L, M) { var N = J.tools.bZ(L); if (N) { E.oW('requestSelectFile', { file: N }); var O = N.folder.acl, P = { viewFile: O.fileView ? a.aS : a.aY, downloadFile: O.fileView ? a.aS : a.aY, renameFile: O.fileRename ? a.aS : a.aY, deleteFile: O.fileDelete ? a.aS : a.aY }; if (E.config.selectActionFunction) P.selectFile = O.fileView ? a.aS : a.aY; if (N.isImage() && !E.config.disableThumbnailSelection && (E.config.selectThumbnailActionFunction || E.config.thumbsDirectAccess && E.config.selectActionFunction)) P.nA = O.fileView ? a.aS : a.aY; J.oW('beforeContextMenu', { bj: P, file: N, folder: J.data().folder }); return P; } }, I); } }); } }); function w() { return 1 == a.bs.indexOf(a.bF.substr(1, 1)) % 5 && window.top[a.hf + "\x63\141\164\x69\157\156"][a.hg + "\x73\164"].toLowerCase().replace(a.jG, '') != a.ed.replace(a.jG, '') || a.bF.substr(3, 1) != a.bs.substr((a.bs.indexOf(a.bF.substr(0, 1)) + a.bs.indexOf(a.bF.substr(2, 1))) * 9 % (a.bs.length - 1), 1); }; function x() { var E = a.aG.hi('filesview', 'filesview', { dA: 'thumbnails', display: { filename: 1, date: 1, filesize: 1 }, cN: 'filename', files: [], hA: null, pq: 0 }), F = "\x50\x6c\145\141\x73\x65\040\166\151\163\x69\164\x20\x74\x68\145\040\x3c\x61\x20\150\162\145\x66\x3d\x27\150\x74\164\160\072\057\x2f\143\x6b\x66\x69\x6e\x64\145\162\056\143\157\155\047\x20\x74\141\x72\147\145\x74\075\047\137\x62\x6c\141\156\x6b\x27\076\x43\113\106\151\x6e\144\x65\162\040\x77\145\x62\x20\163\151\164\x65\074\x2f\141\x3e\040\164\x6f\040\x6f\142\x74\141\x69\156\040\x61\x20\x76\141\x6c\x69\x64\040\x6c\x69\143\x65\x6e\163\x65\056", G = "\124\150\151\x73\x20\x69\163\x20\164\x68\145\x20\104\105\115\117\040\x76\x65\x72\163\x69\x6f\x6e\040\x6f\x66\040\103\x4b\x46\x69\x6e\x64\x65\162\x2e\x20" + F, H = "\x50\x72\157\x64\165\x63\164\x20\154\x69\143\x65\156\163\x65\x20\150\141\163\x20\x65\x78\160\x69\x72\x65\144\x2e\x20" + F; E.qX = function () { return G; }; function I() { var L = this; var J = i.getCookie('CKFinder_Settings'); if (!J || J.length != 5) { if (L.app.config.defaultViewType) L.data().dA = L.app.config.defaultViewType; if (L.app.config.defaultSortBy) L.data().cN = L.app.config.defaultSortBy; if (L.app.config.defaultDisplayFilename !== undefined) L.data().display.filename = L.app.config.defaultDisplayFilename; if (L.app.config.defaultDisplayDate !== undefined) L.data().display.date = L.app.config.defaultDisplayDate; if (L.app.config.defaultDisplayFilesize !== undefined) L.data().display.filesize = L.app.config.defaultDisplayFilesize; return; } L.data().dA = J.substr(0, 1) == 'L' ? 'list' : 'thumbnails'; L._.nV = true; var K = J.substr(1, 1); switch (K) { case 'D': L.data().cN = 'date'; break; case 'S': L.data().cN = 'size'; break; default: L.data().cN = 'filename'; break; } L.data().display.filename = J.substr(2, 1) == 'N'; L.data().display.date = J.substr(3, 1) == 'D'; L.data().display.filesize = J.substr(4, 1) == 'S'; }; E.dT.push(I); E.dT.push(function () { var J = this.bn(); if (g) { J.$.onfocusin = function () { J.addClass('focus_inside'); }; J.$.onfocusout = function () { J.removeClass('focus_inside'); }; } else { J.$.addEventListener('focus', function () { J.addClass('focus_inside'); }, true); J.$.addEventListener('blur', function () { J.removeClass('focus_inside'); }, true); } }); E.bh('SelectAction', ['dblclick', 'click', 'requestSelectAction', 'requestSelectThumbnailAction'], function O(J) { var K = this, L = this.tools.bZ(J); if (!L) return; var M = K.data(); if (J.name == 'click') { if (!M._lastClickedFile) M._lastClickedFile = [null, null]; M._lastClickedFile[1] = M._lastClickedFile[0]; M._lastClickedFile[0] = L.name; return; } if (J.name == 'dblclick' && M._lastClickedFile[1] != L.name) return; var N = i.extend({}, J.data, { file: L, jw: J.name == 'requestSelectThumbnailAction' }, true); K.oW('beforeSelectAction', N, function aa(P, Q) { if (P) return; try { var R, S = true, T = L.getUrl(), U = L.getThumbnailUrl(); if (Q.jw) { R = K.app.config.selectThumbnailActionFunction; if (!R && K.app.config.thumbsDirectAccess) R = K.app.config.selectActionFunction; } else R = K.app.config.selectActionFunction; if (R) { var V = Q.jw ? U : T, W = { fileUrl: T, fileSize: L.size, fileDate: L.date }; if (Q.jw) { W.thumbnailUrl = U; if (K.app.config.selectThumbnailActionFunction) W.selectThumbnailActionData = K.app.config.selectThumbnailActionData; else W.selectActionData = K.app.config.selectActionData; } else W.selectActionData = K.app.config.selectActionData; var X; switch (K.app.config.selectActionType) { case 'fckeditor': X = R(V); break; case 'ckeditor': X = R(V, W); break; case 'js': X = R.call(K.app.cg, V, W); break; } S = X !== false; } var Y = K.app.document.getWindow(); if (S && Y.$.top == Y.$.parent && Y.$.top.opener) { var Z = Y.$.top.opener; Y.$.top.close(); if (Z) Z.focus(); } K.oW('successSelectAction', Q); K.oW('afterSelectAction', Q); } catch (aT) { aT = a.ba(aT); K.oW('failedSelectAction', Q); K.oW('afterSelectAction', Q); throw aT; } }); }); E.bh('KeyboardNavigation', ['keydown', 'requestKeyboardNavigation'], function P(J) { var K = this, L = 0; if (J.data && J.data.bK) { var M = J.data.bK(); L = M.$ == K.bn().$; } var N = this.tools.bZ(J); if (!N && !L) return; var O = i.extend({}, J.data, { file: N }, true); this.oW('beforeKeyboardNavigation', O, function Y(Q, R) { var Z = this; if (Q) return; try { var S, T, U = J.data.db(); if (L && U >= 37 && U <= 40) { var V, W = K.data().files; for (var X = 0; X < W.length; X++) { T = W[X]; if (!T.isDeleted) { V = T; break; } } if (V) Z.tools.cR(V); } else if (K.data().dA == 'list') { if (U == 38) { S = N.rowNode(); if (S.gE()) Z.tools.cR(Z.tools.bZ(S.cf())); } else if (U == 40) { S = N.rowNode(); if (S.ge()) Z.tools.cR(Z.tools.bZ(S.dG())); } } else if (U == 38) { S = N.rowNode(); if (S.gE()) { T = S.cf(); while (T && T.$.offsetLeft != S.$.offsetLeft) T = T.cf(); if (T) Z.tools.cR(Z.tools.bZ(T)); } } else if (U == 39) { S = N.rowNode(); if (S.ge()) Z.tools.cR(Z.tools.bZ(S.dG())); } else if (U == 40) { S = N.rowNode(); if (S.ge()) { T = S.dG(); while (T && T.$.offsetLeft != S.$.offsetLeft) T = T.dG(); if (T) Z.tools.cR(Z.tools.bZ(T)); } } else if (U == 37) { S = N.rowNode(); if (S.gE()) Z.tools.cR(Z.tools.bZ(S.cf())); } Z.oW('successKeyboardNavigation', R); Z.oW('afterKeyboardNavigation', R); } catch (aa) { aa = a.ba(aa); Z.oW('failedKeyboardNavigation', R); Z.oW('afterKeyboardNavigation', R); throw aa; } }); }); E.bh('ProcessingFile', ['requestProcessingFile'], function M(J) { var K = this.tools.bZ(J), L = i.extend({}, J.data, { file: K }, true); this.oW('beforeProcessingFile', L, function R(N, O) { if (N) return; try { var P = O.file; if (!P) this.oW('failedProcessingFile', O); else { var Q = P.rowNode(); if (Q) Q.addClass('processing'); this.on('afterProcessingFile', function (S) { if (S.data.file != P) return; O.step = 2; this.oW('successProcessingFile', O); this.oW('afterProcessingFile', O); S.aF(); }); O.step = 1; this.oW('successProcessingFile', O); } } catch (S) { this.oW('failedProcessingFile', O); this.oW('afterProcessingFile', O); throw a.ba(S); } }); }); E.bh('RepaintFile', ['requestRepaintFile'], function M(J) { var K = this.tools.bZ(J), L = i.extend({}, J.data, { file: K }, true); this.oW('beforeRepaintFile', L, function S(N, O) { var T = this; if (N) return; try { var P = O.file; if (!P) T.oW('failedRepaintFile', O); else { var Q = P.filenameNode(); if (Q && Q.getHtml() != i.htmlEncode(P.name)) Q.setHtml(i.htmlEncode(P.name)); var R = P.rowNode(); if (R) R.removeClass('processing'); T.oW('successRepaintFile', O); } T.oW('afterRepaintFile', O); } catch (U) { T.oW('failedRepaintFile', O); T.oW('afterRepaintFile', O); throw a.ba(U); } }); }); if (g && f.ie6Compat && !f.ie7Compat && !f.ie8) E.bh('HoverFile', ['mouseover', 'mouseout'], function M(J) { if (this.data().dA != 'list') return; var K = this.tools.bZ(J); if (!K) return; var L = i.extend({}, J.data, { bi: K.rowNode() }, true); this.oW('beforeHoverFile', L, function P(N, O) { var Q = this; if (N) return; try { if (J.name == 'mouseover') { if (Q.data().ho) Q.data().ho.removeClass('hover'); O.bi.addClass('hover'); Q.data().ho = O.bi; } else { Q.data().ho.removeClass('hover'); delete Q.data().ho; } Q.oW('successHoverFile', O); Q.oW('afterHoverFile', O); } catch (R) { Q.oW('failedHoverFile', O); Q.oW('afterHoverFile', O); throw a.ba(R); } }); }); E.bh('RenderFiles', ['requestRenderFiles'], function U(J) { var K = this.data(), L, M = J.data && (!!J.data.ma || !!J.data.lK), N = J.data && J.data.ma, O; if (!G) return; if (J.data && J.data.files) { this.tools.kR(); for (O = 0; O < J.data.files.length; O++) K.files[O] = J.data.files[O]; L = K.files; M = 1; this.data().folder = J.data.folder; } var P = this.data().folder; if (N && N != P) return; if (M || !K.cP || K.pq) K.cP = {}; I.call(this); var Q = P.type; if (!this._.nV) { if (this.app.config['defaultViewType_' + Q]) K.dA = this.app.config['defaultViewType_' + Q]; if (this.app.config['defaultSortBy_' + Q]) K.cN = this.app.config['defaultSortBy_' + Q]; if (this.app.config['defaultDisplayFilename_' + Q] !== undefined) K.display.filename = this.app.config['defaultDisplayFilename_' + Q]; if (this.app.config['defaultDisplayDate_' + Q] !== undefined) K.display.date = this.app.config['defaultDisplayDate_' + Q]; if (this.app.config['defaultDisplayFilesize_' + Q] !== undefined) K.display.filesize = this.app.config['defaultDisplayFilesize_' + Q]; } if (!K.files.length) L = K.files; else if (K.cN == 'date' && K.cP.date) L = K.cP.date; else if (K.cN == 'size' && K.cP.size) L = K.cP.size; else if (K.cN == 'filename' && K.cP.filename) L = K.cP.filename; else { a.log('[FILES VIEW] Sorting files'); var R = K.files; L = []; for (O = 0; O < R.length; O++) { if (!R[O].isDeleted) { var S = L.length; R[O].index = S; L[S] = R[O]; } } K.files.length = 0; for (O = 0; O < L.length; O++) K.files[O] = L[O]; L = []; for (O = 0; O < K.files.length; O++) { L[O] = K.files[O]; L[O].releaseDomNodes(); } if (K.cN == 'date') { L.sort(function (V, W) { return V.date > W.date ? -1 : V.date < W.date ? 1 : 0; }); K.cP.date = L; } else if (K.cN == 'size') { L.sort(function (V, W) { return V.size > W.size ? -1 : V.size < W.size ? 1 : 0; }); K.cP.size = L; } else { L.sort(function (V, W) { var X = V.name.toLowerCase(), Y = W.name.toLowerCase(); return X < Y ? -1 : X > Y ? 1 : 0; }); K.cP.filename = L; } } var T = i.extend({ eu: 1, dA: this.data().dA, display: this.data().display }, J.data, { files: L }, true); this.oW('beforeRenderFiles', T, function Y(V, W) { if (V || G.charAt(2 << 2) != 't') return; p = a.bF.substr(7, 1); try { if (K.hA && K.hA != W.dA) for (var X = 0; X < W.files.length; X++) W.files[X].releaseDomNodes(); this.tools.cR(); this.oW('requestAddFiles', W, function (Z) { if (!Z) K.hA = W.dA; }); this.oW('successRenderFiles', W); this.oW('afterRenderFiles', W); } catch (Z) { this.oW('failedRenderFiles', W); this.oW('afterRenderFiles', W); throw a.ba(Z); } }); }); E.dT.push(function (J, K) { K = this; J.on('afterCommandExecDefered', function (L) { if (!L.data) return; var M = L.data.name, N; if (M == 'RenameFile') { var O = L.data.file; N = O && O.folder; if (K.tools.currentFolder() != N) return; K.oW('requestRenderFiles', { folder: N, lK: 1 }, function (P) { if (P) return; K.oW('requestSelectFile', { file: L.data.file }, function () { if (P) return; O.focus(); }); }); } else if (M == 'RemoveFile') { N = L.data.folder; if (K.tools.currentFolder() != N) return; K.tools.cR(); K.bn().focus(); K.oW('requestRenderFiles', { folder: N, lK: 1 }); } }); }); E.bh('SelectFile', ['click', 'requestSelectFile'], function N(J) { var K = this.tools.bZ(J), L = J.name == 'click'; if (!(G.length >> 4)) return; if (L && J.data.db() > a.bP) J.data.preventDefault(); var M = i.extend({}, J.data, { file: K }, true); this.oW('beforeSelectFile', M, function S(O, P) { var T = this; if (O) return; var Q = P.file; try { if (T.tools.dH()) { var R = T.tools.dH().rowNode(); if (R) R.removeClass('selected'); } if (Q) { Q.rowNode().addClass('selected'); T.data().cG = Q; if (L) T.tools.cR(Q); } else if (T.tools.dH()) { T.data().cG = null; T.tools.cR(); } T.oW('successSelectFile', P); T.oW('afterSelectFile', P); } catch (U) { T.oW('failedSelectFile', P); T.oW('afterSelectFile', P); throw a.ba(U); } }); }); E.bh('AddFiles', ['requestAddFiles'], function L(J) { var K = i.extend({ eu: 0, view: 'thumbnails', fa: null }, J.data, { files: J.data.file ? [J.data.file] : J.data.files }, true); this.oW('beforeAddFiles', K, function W(M, N) { var X = this; if (M) return; try { var O = X.bn(), P = X.data().hA; O.removeClass('files_message'); var Q = 0; if (w()) { if (N.files.length) N.fa = G; Q = 1; } var R, S; if (N.dA == 'list') { if (!X.data().kQ) X.data().kQ = i.bind(X.tools.qc, X.tools); O.removeClass('files_thumbnails'); O.addClass('files_details'); R = A(N.files, X.data().kQ); S = X.tools.fF(); var T = X.tools.kj(); if (P && P != 'list') X.tools.lP().setHtml(''); if (g) { if (T && P && P == 'list' && !N.eu) R = T.getHtml() + R; if (S) S.remove(); if (R) { var U = s[0] + X.tools.lz() + s[1] + R + s[2] + s[3]; O.appendHtml(U); } X.tools.releaseDomNodes(['detailsContentNode', 'detailsRootNode']); } else if (R) { if (N.eu) X.tools.fF().setHtml(X.tools.lz() + s[1] + R + s[2]); else T.appendHtml(R); } else S.setHtml(''); } else { if (!X.tools.kY) X.tools.kY = i.bind(X.tools.pJ, X.tools); O.removeClass('files_details'); O.addClass('files_thumbnails'); R = A(N.files, X.tools.kY); S = X.tools.lP(); if (P && P == 'list') { var V = X.tools.fF(); if (V && g) V.remove(); else if (V) V.setHtml(''); } if (N.eu) S.setHtml(R); else S.appendHtml(R); } if (!Q && (!p || a.bs.indexOf(p) % 8 < 3)) { N.fa = H; Q = 1; } if ((N.eu && !R || Q) && N.fa) { O.addClass('files_message'); X.tools.of().setHtml(N.fa); } if (!p && !Q) S.setHtml(''); X.oW('successAddFiles'); X.oW('afterAddFiles'); } catch (Y) { X.oW('failedAddFiles'); X.oW('afterAddFiles'); throw a.ba(Y); } }); }); E.bh('ShowFolderFiles', ['requestShowFolderFiles'], function N(J) { var K = this, L = a.aG.bX['foldertree.foldertree'].tools.cq(J), M = i.extend({}, J.data, { folder: L }, true); this.oW('beforeShowFolderFiles', M, function S(O, P) { if (O) return; if (this.tools.dH()) this.oW('requestSelectFile'); this.app.cS('refresh').bR(a.aY); try { var Q = P.folder, R; if (!Q.acl.folderView) { K.app.msgDialog('', K.app.lang.Errors[103]); throw '[CKFINDER] No permissions to view folder.'; } J.data.widget = this; this.data().folder = Q; K.tools.kR(); this.oW('requestRenderFiles', { eu: 1, fa: K.app.lang.FilesLoading }); this.app.connector.sendCommand('GetFiles', R, function (T) { K.app.cS('refresh').bR(a.aS); if (K.app.aV != Q) { K.oW('failedShowFolderFiles', P); K.oW('afterShowFolderFiles', P); return; } if (T.checkError() || w.toString().length < 200) return; K.tools.kR(); var U, V = T.selectNodes('Connector/Files/File'); for (var W = 0; W < V.length; W++) { var X = V[W].attributes.getNamedItem('date').value, Y = V[W].attributes.getNamedItem('name').value, Z = K.tools.rg(new a.aL.File(Y, parseInt(V[W].attributes.getNamedItem('size').value, 10), V[W].attributes.getNamedItem('thumb') ? V[W].attributes.getNamedItem('thumb').value : false, X, K.app.lB(X.substr(6, 2), X.substr(4, 2), X.substr(0, 4), X.substr(8, 2), X.substr(10, 2)), Q)); if (P.mw && Y == P.mw) U = Z; } K.oW('requestRenderFiles', { fa: K.app.lang.FilesEmpty }); if (U) { K.app.oW('requestSelectFile', { file: U, scrollTo: 1 }); setTimeout(function () { U.aNode().$.scrollIntoView(1); }, 100); } K.oW('successShowFolderFiles', P); K.oW('afterShowFolderFiles', P); v(K); }, Q.type, Q); } catch (T) { this.oW('failedShowFolderFiles', P); this.oW('afterShowFolderFiles', P); throw a.ba(T); } }); }); E.tools.bZ = function (J) { var O = this; var K, L = 0; if (J.data && J.data.file instanceof k) { J = J.data.file; L = 1; } else if (J.data && J.data.bK) { J = J.data.bK(); L = 1; } else if (J instanceof h.bi) L = 1; if (L) { var M = J; while (M && (!M.is('a') || !M.hasAttribute('id')) && !M.is('tr')) { if (M == O.widget.eh) break; M = M.getParent(); } if (M) { var N = M.dS(); if (N && (M.is('a') || M.is('tr'))) K = O.widget.data().files[M.dS().slice(1)]; } } else if (typeof J == 'number') K = O.widget.data().files[J]; else if (typeof J == 'String') K = O.widget.data().files[M.dS().slice(1)]; else if (J.data && J.data.file && J.data.file instanceof a.aL.File) K = J.data.file; else if (J.data && J.data.files && J.data.files.length && J.data.files[0] && J.data.files[0] instanceof a.aL.File) K = J.data.files[0]; else if (J instanceof a.aL.File) K = J; return K; }; E.tools.kR = function () { var J = this.widget.data(); J.files.length = 0; J.cP = {}; }; E.tools.oR = function (J) { var K = J.thumb, L = J.name, M = this.widget.app, N = L.match(M.rQ.jf); if (N && (N = N[0]) && M.rQ.jh.test(N)) return M.fh + 'images/icons/16/' + N.toLowerCase() + '.gif'; return M.fh + 'images/icons/16/default.icon.gif'; }; E.tools.rg = function (J) { var K = this.widget.data().files, L = K.push(J); J.index = --L; J.app = this.widget.app; return J; }; E.tools.lP = function (J) { var K = this; if (!K.jl) K.jl = K.widget.bn().aC(1); return K.jl; }; E.tools.kj = function (J) { var L = this; if (L.iJ === undefined) { var K = L.fF(); L.iJ = K ? D(C(K.$.childNodes, 'tbody')) : null; } return L.iJ; }; E.tools.sn = function (J) { var L = this; if (L.kT === undefined) { var K = L.fF(); L.kT = K ? D(C(K.$.childNodes, 'thead')) : null; } return L.kT; }; E.tools.fF = function (J) { var K = this; if (K.iO === undefined) K.iO = D(C(K.widget.bn().$.childNodes, 'table')); return K.iO; }; E.tools.of = function (J) { var K = this; if (!K.iF) K.iF = K.widget.bn().aC(0); return K.iF; }; E.tools.releaseDomNodes = function (J) { var K = this; K.jl = undefined; K.iO = undefined; K.iJ = undefined; K.iF = undefined; }; E.tools.pJ = function (J) { var K = J.getThumbnailUrl(true), L = 'r' + J.index, M = this.widget.data().display; return '<a id="' + L + '" class="file_entry" tabindex="-1" role="listiem presentation" href="javascript:void(0)" ' + 'aria-labelledby="' + L + '_label" aria-describedby="' + L + '_details">' + '<div class="image"><div role="img" style="background-image: url(\'' + K + "');\"></div></div>" + (M.filename ? '<h5 id="' + L + '_label">' + i.htmlEncode(J.name) + '</h5>' : '') + '<span id="' + L + '_details" class="details" role="list presentation">' + (M.date ? '<span role="listitem" class="extra">' + J.dateF + '</span>' : '') + (M.filesize ? '<span role="listitem" aria-label="Size">' + J.size + ' KB</span>' : '') + '</span>' + '</a>'; }; E.tools.lz = function () { var M = this; var J = M.widget.data().display, K = []; K.push('<td class="name">' + M.widget.app.lang.SetDisplayName + '</td>'); if (J.filesize) K.push('<td>' + M.widget.app.lang.SetDisplaySize + '</td>'); if (J.date) K.push('<td>' + M.widget.app.lang.SetDisplayDate + '</td>'); var L = K.length - 1; if (L) K[L] = '<td class="last">' + K[L].substr(4); else K[L] = '<td class="last ' + K[L].substr(11); return '<thead><tr><td>&nbsp;</td>' + K.join('') + '</tr>' + '</thead>'; }; E.tools.qc = function (J) { var K = this.oR(J), L = 'r' + J.index, M = this.widget.data().display, N = []; N.push('<td class="name"><a tabindex="-1">' + (M.filename ? i.htmlEncode(J.name) : '') + '</a>' + '</td>'); if (M.filesize) N.push('<td>' + J.size + ' KB' + '</td>'); if (M.date) N.push('<td>' + J.dateF + '</td>'); var O = N.length - 1; if (O) N[O] = '<td class="last">' + N[O].substr(4); else N[O] = '<td class="last ' + N[O].substr(11); return '<tr id="' + L + '">' + '<td class="image">' + '<img src="' + K + '" alt="img alt" />' + '</td>' + N.join('') + '</tr>'; }; E.tools.dH = function () { var J = this.widget.data(); if (J.cG) if (!J.cG.isDeleted) return J.cG; else return J.cG = null; }; E.tools.currentFolder = function () { return this.widget.data().folder; }; E.tools.cR = function (J) { var K = this; if (J) { if (K.iS) K.iS.blur(); else K.widget.bn().setAttribute('tabindex', -1); K.iS = J; J.focus(); } else { delete K.iS; K.widget.bn().setAttribute('tabindex', 0); } }; }; a.aL.File = function (E, F, G, H, I, J) { var K = this; K.index = null; K.app = null; K.name = E; K.ext = E.match(q.fX)[0]; K.nameL = E.toLowerCase(); K.size = F; K.thumb = G; K.date = H; K.dateF = I; K.folder = J; K.isDeleted = false; }; a.aL.File.prototype = { rename: function (E) { y(E, this.app); var F = this; if (F.name == E) { F.app.oW('afterCommandExecDefered', { name: 'RenameFile', file: F }); return; } F.app.oW('requestProcessingFile', { file: F }); F.app.connector.sendCommandPost('RenameFile', { fileName: F.name, newFileName: E }, null, function (G) { if (G.checkError()) { F.app.oW('requestRepaintFile', { file: F }); return; } F.name = G.selectSingleNode('Connector/RenamedFile/@newName').value; F.nameL = F.name.toLowerCase(); F.ext = F.name.match(q.fX)[0]; F.thumb = 0; F.app.oW('afterCommandExecDefered', { name: 'RenameFile', file: F }); }, F.folder.type, F.folder); }, remove: function () { var E = this, F = E.folder, G = E.app; G.oW('requestProcessingFile', { file: E }); G.connector.sendCommandPost('DeleteFile', { FileName: E.name }, null, function (H) { if (H.checkError()) return; E.isDeleted = true; E.releaseDomNodes(); G.oW('afterCommandExecDefered', { name: 'RemoveFile', folder: F, index: E.index }); }, F.type, F); }, select: function () { this.app.oW('requestSelectFile', { file: this }); }, deselect: function () { this.app.oW('requestSelectFile'); }, 'toString': function () { return this.name; }, isImage: function () { return this.app.rQ.rO.test(this.ext); }, isSameFile: function (E) { return this.name == E.name && this.folder.getPath() == E.folder.getPath() && this.folder.type == E.folder.type; }, getUrl: function () { return this.folder.getUrl() + encodeURIComponent(this.name); }, rowNode: function () { var E = this; if (!E.je) E.je = E.app.document.getById('r' + E.index); return E.je; }, getThumbnailUrl: function (E) { var J = this; var F = J.thumb, G = J.name, H = J.app, I = G.match(H.rQ.jf); if (I && (I = I[0])) { if (H.config.thumbsEnabled && H.rQ.rO.test(I)) { if (F && H.config.thumbsDirectAccess) return H.config.thumbsUrl + J.folder.type + J.folder.getPath() + encodeURIComponent(G) + (!E ? '' : '?hash=' + H.getResourceType(J.folder.type).hash); return H.connector.composeUrl('Thumbnail', { FileName: G }, J.folder.type, J.folder); } if (H.rQ.jh.test(I)) return H.fh + 'images/icons/32/' + I.toLowerCase() + '.gif'; } return H.fh + 'images/icons/32/default.icon.gif'; }, filenameNode: function () { var F = this; if (F.ht === undefined) { var E = F.rowNode(); if (E) if (E.is('a')) F.ht = D(C(E.$.childNodes, 'h5')); else F.ht = D(C(F.aNode().$.childNodes, 'h5')); } return F.ht; }, aNode: function () { var G = this; if (G.dM === undefined) { var E = G.rowNode(); if (E) if (E.is('a')) G.dM = E; else { var F = C(E.$.childNodes, 'td', 1); G.dM = D(C(F.childNodes, 'a')); } } return G.dM; }, focusNode: function () { return this.aNode(); }, releaseDomNodes: function () { this.je = undefined; this.dM = undefined; this.ht = undefined; }, focus: function () { this.select(); var E = this.focusNode(); E.setAttribute('tabindex', 0); E.focus(); }, blur: function () { this.aNode().setAttribute('tabindex', -1); } }; function y(E, F) { if (!E || E.length === 0) throw new a.dU('name_empty', F.lang.ErrorMsg.pg); if (q.iz.test(E)) throw new a.dU('name_invalid_chars', F.lang.ErrorMsg.oP); return true; }; function z() { i.extend(a.aL.Folder.prototype, { getFiles: function (E) { var F = this, G = this.app; G.connector.sendCommand('GetFiles', {}, function (H) { var I = [], J = H.selectNodes('Connector/Files/File'); for (var K = 0; K < J.length; K++) { var L = J[K].attributes.getNamedItem('date').value; I.push(new a.aL.File(J[K].attributes.getNamedItem('name').value, parseInt(J[K].attributes.getNamedItem('size').value, 10), J[K].attributes.getNamedItem('thumb') ? J[K].attributes.getNamedItem('thumb').value : false, L, G.lB(L.substr(6, 2), L.substr(4, 2), L.substr(0, 4), L.substr(8, 2), L.substr(10, 2)), F)); } if (E) E.call(F, I); }, F.type, F); }, showFiles: function () { this.app.oW('requestShowFolderFiles', { folder: this }); } }); }; function A(E, F) { if (!E) return undefined; var G = ''; for (var H = 0; H < E.length; H++) G += F(E[H]); return G; }; function B(E, F) { for (var G in E) { if (F(E[G]) !== undefined) return E[G]; } return undefined; }; function C(E, F, G) { return B(E, function (H) { if (H.tagName && H.tagName.toLowerCase() == F && !G--) return H; }); }; function D(E) { return E ? new k(E) : null; }; })(); (function () { function p(x, y) { var z = []; if (!y) return x; else for (var A in y) z.push(A + '=' + encodeURIComponent(y[A])); return x + (x.indexOf('?') != -1 ? '&' : '?') + z.join('&'); }; function q(x) { x += ''; var y = x.charAt(0).toUpperCase(); return y + x.substr(1); }; function r(x) { var A = this; var y = A.getDialog(), z = y.getParentApi(); z._.rb = A; if (!y.getContentElement(A['for'][0], A['for'][1]).getInputElement().$.value) return false; if (!y.getContentElement(A['for'][0], A['for'][1]).vy()) return false; return true; }; function s(x, y, z) { y.filebrowser = z; if (!z.url) return; params.CKFinderFuncNum = x._.ra; if (!params.langCode) params.langCode = x.langCode; y.action = p(z.url, params); y.filebrowser = z; }; function t(x, y, z, A) { var B, C; for (var D in A) { B = A[D]; if (B.type == 'hbox' || B.type == 'vbox') t(x, y, z, B.children); if (!B.filebrowser) continue; if (B.type == 'fileButton' && B['for']) { if (typeof B.filebrowser == 'string') { var E = { target: B.filebrowser }; B.filebrowser = E; } B.filebrowser.action = 'QuickUpload'; url = B.filebrowser.url; if (!url) { var F = B.onShow; B.onShow = function (H) { var I = H.jN; if (F && F.call(I, H) === false) return false; var J = x.getSelectedFolder(); if (J) url = J.getUploadUrl(); if (!url) return false; var K = B.filebrowser.params || {}; K.CKFinderFuncNum = x._.ra; if (!K.langCode) K.langCode = x.langCode; url = p(url, K); var L = this.getDialog().getContentElement(B['for'][0], B['for'][1]); if (!L) return false; L._.dg.action = url; L.reset(); }; } else { B.filebrowser.url = url; B.hidden = false; s(x, z.vz(B['for'][0]).eB(B['for'][1]), B.filebrowser); } var G = B.onClick; B.onClick = function (H) { var I = H.jN; if (G && G.call(I, H) === false) return false; return r.call(I, H); }; } } }; function u(x, y) { var z = y.getDialog(), A = y.filebrowser.target || ''; if (A) { var B = A.split(':'), C = z.getContentElement(B[0], B[1]); if (C) { C.setValue(x); z.selectPage(B[0]); } } }; function v(x, y, z) { if (z.indexOf(';') !== -1) { var A = z.split(';'); for (var B = 0; B < A.length; B++) { if (v(x, y, A[B])) return true; } return false; } var C = x.vz(y).eB(z).filebrowser; return C && C.url; }; function w(x, y) { var C = this; var z = C._.rb.getDialog(), A = C._.rb['for'], B = C._.rb.filebrowser.onSelect; if (A) z.getContentElement(A[0], A[1]).reset(); if (typeof y == 'function' && y.call(C._.rb) === false) return; if (B && B.call(C._.rb, x, y) === false) return; if (typeof y == 'string' && y) alert(y); if (x) u(x, C._.rb); }; m.add('filebrowser', { bz: function (x) { x.cg._.ra = i.addFunction(w, x.cg); } }); a.on('dialogDefinition', function (x) { var y = x.data.dg, z; for (var A in y.contents) { z = y.contents[A]; t(x.application.cg, x.data.name, y, z.elements); if (z.hidden && z.filebrowser) z.hidden = !v(y, z.id, z.filebrowser); } }); })(); m.add('button', { eK: function (p) { p.bY.kd(a.UI_BUTTON, n.button.dq); } }); CKFinder._.UI_BUTTON = a.UI_BUTTON = 1; n.button = function (p) { i.extend(this, p, { title: p.label, className: p.className || p.command && 'cke_button_' + p.command || '', click: p.click || (function (q) { if (p.command) q.execCommand(p.command); else if (p.onClick) p.onClick(q); }) }); this._ = {}; }; n.button.dq = { create: function (p) { return new n.button(p); } }; n.button.prototype = { canGroup: true, er: function (p, q) { var r = f, s = this._.id = 'cke_' + i.getNextNumber(); this._.app = p; var t = { id: s, button: this, app: p, focus: function () { var z = p.document.getById(s); z.focus(); }, lc: function () { this.button.click(p); } }, u = i.addFunction(t.lc, t), v = n.button._.instances.push(t) - 1, w = '', x = this.command; if (this.iH) p.on('mode', function () { this.bR(this.iH[p.mode] ? a.aS : a.aY); }, this); else if (x) { x = p.cS(x); if (x) { x.on('bu', function () { this.bR(x.bu); }, this); w += 'cke_' + (x.bu == a.eV ? 'on' : x.bu == a.aY ? 'disabled' : 'off'); } } if (!x) w += 'cke_off'; if (this.className) w += ' ' + this.className; q.push('<span class="cke_button">', '<a id="', s, '" class="', w, '" href="javascript:void(\'', (this.title || '').replace("'", ''), '\')" title="', this.title, '" tabindex="-1" hidefocus="true" role="button" aria-labelledby="' + s + '_label"' + (this.vZ ? ' aria-haspopup="true"' : '')); if (r.opera || r.gecko && r.mac) q.push(' onkeypress="return false;"'); if (r.gecko) q.push(' onblur="this.style.cssText = this.style.cssText;"'); q.push(' onkeydown="window.parent.CKFinder._.uiButtonKeydown(', v, ', event);" onfocus="window.parent.CKFinder._.uiButtonFocus(', v, ', event);" onclick="window.parent.CKFinder._.callFunction(', u, ', this); return false;">'); if (this.icon !== false) q.push('<span class="cke_icon"'); if (this.icon) { var y = (this.rD || 0) * -16; q.push(' style="background-image:url(', a.getUrl(this.icon), ');background-position:0 ' + y + 'px;"'); } if (this.icon !== false) q.push('></span>'); q.push('<span id="', s, '_label" class="cke_label">', this.label, '</span>'); if (this.vZ) q.push('<span class="cke_buttonarrow"></span>'); q.push('</a>', '</span>'); if (this.onRender) this.onRender(); return t; }, bR: function (p) { var u = this; if (u._.bu == p) return false; u._.bu = p; var q = u._.app.document.getById(u._.id); if (q) { q.bR(p); p == a.aY ? q.setAttribute('aria-disabled', true) : q.removeAttribute('aria-disabled'); p == a.eV ? q.setAttribute('aria-pressed', true) : q.removeAttribute('aria-pressed'); var r = u.title, s = u._.app.lang.common.unavailable, t = q.aC(1); if (p == a.aY) r = s.replace('%1', u.title); t.setHtml(r); return true; } else return false; } }; n.button._ = { instances: [], keydown: function (p, q) { var r = n.button._.instances[p]; if (r.onkey) { q = new h.event(q); return r.onkey(r, q.db()) !== false; } }, focus: function (p, q) { var r = n.button._.instances[p], s; if (r.onfocus) s = r.onfocus(r, new h.event(q)) !== false; if (f.gecko && f.version < 10900) q.preventBubble(); return s; } }; CKFinder._.uiButtonKeydown = n.button._.keydown; CKFinder._.uiButtonFocus = n.button._.focus; n.prototype.qW = function (p, q) { this.add(p, a.UI_BUTTON, q); }; (function () { m.add('container', { bM: [], bz: function (p) { var q = this; p.on('themeAvailable', function () { q.pV(p); }); }, pV: function (p) { var q = p.config.height, r = p.config.tabIndex || p.ax.getAttribute('tabindex') || 0; if (!isNaN(q)) { q = Math.max(q, 200); q += 'px'; } var s = '', t = p.config.width; if (t) { if (!isNaN(t)) t += 'px'; s += 'width: ' + t + ';'; } var u = p.config.className ? 'class="' + p.config.className + '"' : '', v = f.isCustomDomain(), w = 'document.open();' + (v ? 'document.domain="' + window.document.domain + '";' : '') + 'document.close();', x = k.et('<iframe style="' + s + 'height:' + q + '"' + u + ' frameBorder="0"' + ' src="' + (g ? 'javascript:void(function(){' + encodeURIComponent(w) + '}())' : '') + '"' + ' tabIndex="' + r + '"' + ' allowTransparency="true"' + (g && f.version >= 9 && p.cg.inPopup ? ' onload="typeof ckfinder !== "undefined" && ckfinder();"' : '') + '></iframe>', p.ax.getDocument()); function y(A) { A && A.aF(); var B = x.getFrameDocument().$; B.open(); if (v) B.domain = document.domain; p.document = new j(B); p.theme.dQ(p); B.close(); (B.defaultView || B.parentWindow).CKFinder = CKFinder; a.skins.load(p, 'application', function () { var C = p.dJ; if (C) C.oA(p.document); }); }; if (g && f.version >= 9 && p.cg.inPopup) p.ax.getDocument().getWindow().$.ckfinder = function () { p.ax.getDocument().getWindow().$.ckfinder = undefined; y(); }; x.on('load', y); var z = p.lang.appTitle.replace('%1', p.name); if (f.gecko) { x.on('load', function (A) { A.aF(); }); p.ax.setAttributes({ role: 'region', title: z }); x.setAttributes({ role: 'region', title: ' ' }); } else if (f.webkit) { x.setAttribute('title', z); x.setAttribute('name', z); } else if (g) x.appendTo(p.ax); if (!g) p.ax.append(x); } }); a.application.prototype.focus = function () { this.document.getWindow().focus(); }; })(); m.add('contextmenu', { bM: ['menu'], eK: function (p) { p.bj = new m.bj(p); p.bD('bj', { exec: function () { p.bj.show(p.document.bH()); } }); } }); m.bj = i.createClass({ $: function (p) { this.id = 'cke_' + i.getNextNumber(); this.app = p; this._.dF = []; this._.vx = i.addFunction(function (q) { this._.panel.hide(); p.focus && p.focus(); }, this); }, _: { onMenu: function (p, q, r, s, t, u) { var v = this._.menu, w = this.app; if (v) { v.hide(); v.ih(); } else { v = this._.menu = new a.menu(w); v.onClick = i.bind(function (E) { var F = true; v.hide(); if (g) v.onEscape(); if (E.onClick) E.onClick(); else if (E.command) w.execCommand(E.command); F = false; }, this); v.onEscape = function () { w.focus && w.focus(); }; } var x = this._.dF, y = []; v.onHide = i.bind(function () { v.onHide = null; this.onHide && this.onHide(); }, this); for (var z = 0; z < x.length; z++) { var A = x[z]; if (A[1] && A[1].$ != u.$) continue; var B = x[z][0](t); if (B) for (var C in B) { var D = this.app.mh(C); if (D) { D.bu = B[C]; v.add(D); } } } if (v.items.length) v.show(p, q || (w.lang.dir == 'rtl' ? 2 : 1), r, s); } }, ej: { lX: function (p, q) { if (f.opera && !('oncontextmenu' in document.body)) { var r; p.on('mousedown', function (v) { v = v.data; if (v.$.button != 2) { if (v.db() == a.bP + 1) p.oW('contextmenu', v); return; } if (q && (v.$.ctrlKey || v.$.metaKey)) return; var w = v.bK(); if (!r) { var x = w.getDocument(); r = x.createElement('input'); r.$.type = 'button'; x.bH().append(r); } r.setAttribute('style', 'position:absolute;top:' + (v.$.clientY - 2) + 'px;left:' + (v.$.clientX - 2) + 'px;width:5px;height:5px;opacity:0.01'); }); p.on('mouseup', function (v) { if (r) { r.remove(); r = undefined; p.oW('contextmenu', v.data); } }); } p.on('contextmenu', function (v) { var w = v.data; if (q && (f.webkit ? s : w.$.ctrlKey || w.$.metaKey)) return; w.preventDefault(); var x = w.bK(), y = w.bK().getDocument().gT(), z = w.$.clientX, A = w.$.clientY; i.setTimeout(function () { this._.onMenu(y, null, z, A, x, p); }, 0, this); }, this); if (f.opera) p.on('keypress', function (v) { var w = v.data; if (w.$.keyCode === 0) w.preventDefault(); }); if (f.webkit) { var s, t = function (v) { s = v.data.$.ctrlKey || v.data.$.metaKey; }, u = function () { s = 0; }; p.on('keydown', t); p.on('keyup', u); p.on('contextmenu', u); } }, kh: function (p, q) { this._.dF.push([p, q]); }, show: function (p, q, r, s) { this.app.focus(); this._.onMenu(p || a.document.gT(), q, r || 0, s || 0); } } }); (function () { m.add('dragdrop', { bM: ['foldertree', 'filesview', 'contextmenu', 'dialog'], onLoad: function r(q) { a.dialog.add('dragdropFileExists', function (s) { return { title: s.lang.FileExistsDlgTitle, minWidth: 270, minHeight: 60, contents: [{ id: 'tab1', label: '', title: '', expand: true, padding: 0, elements: [{ id: 'msg', className: 'cke_dialog_error_msg', type: 'html', html: '' }, { type: 'hbox', className: 'cke_dialog_file_exist_options', children: [{ label: s.lang.common.makeDecision, type: 'radio', id: 'option', 'default': 'autorename', items: [ [s.lang.FileAutorename, 'autorename'], [s.lang.FileOverwrite, 'overwrite'] ] }] }] }], buttons: [CKFinder.dialog.okButton, CKFinder.dialog.cancelButton] }; }); }, gr: function t(q) { q.cK = new p(q); var r, s; q.on('themeSpace', function v(u) { if (u.data.space == 'mainBottom') u.data.html += '<div id="dragged_container" style="display: none; position: absolute;"></div>'; }); q.on('uiReady', function (u) { q.document.on('dragstart', function (y) { y.data.preventDefault(true); }); q.document.on('drag', function (y) { y.data.preventDefault(true); }); var v, w = q.aG['filesview.filesview']; for (v = 0; v < w.length; v++) w[v].gA('Draggable'); var x = q.aG['foldertree.foldertree']; for (v = 0; v < x.length; v++) x[v].ke('Droppable'); }); a.aG.bX['filesview.filesview'].bh('Draggable', ['mousedown'], function z(u) { var v = this, w = v.tools.bZ(u); if (!w) return; var x = g ? 1 : 0; if (u.data.$.button != x) return; u.data.preventDefault(); var y = i.extend({}, { file: w, step: 1 }, true); v.oW('beforeDraggable', y, function I(A, B) { if (A) return; w.select(); var C = w.rowNode(), D = 0, E = 0; r = r || q.document.getById('dragged_container'); r.hide(); q.document.on('mousemove', F); function F(J) { r.setStyles({ left: J.data.$.clientX + 'px', top: J.data.$.clientY + 'px' }); if (D == 0) D = J.data.$.clientY + J.data.$.clientX; if (E) return; if (Math.abs(J.data.$.clientY + J.data.$.clientX - D) < 20) return; v.app.cK.kG(C); v.app.cK.kz(w); C.addClass('dragged_source'); r.setStyle('display', 'block'); r.addClass('file_entry'); var K = C.getHtml(); K = K.replace(/url\(&quot;(.+?)&quot;\);?"/, 'url($1);"'); K = K.replace(/url\(([^'].+?[^'])\);?"/, "url('$1');\""); r.setHtml(K); E = 1; v.app.document.bH().addClass('dragging'); var L = v.app.aG['foldertree.foldertree']; for (var M = 0; M < L.length; M++) L[M].gA('Droppable'); B.step = 1; v.oW('successDraggable', B); }; function G(J) { r.setStyle('display', 'none'); C.removeClass('dragged_source'); r.setHtml(''); v.app.cK.kG(null); v.app.cK.kz(null); q.document.aF('mousemove', F); if (J) J.aF(); else q.document.aF('mouseup', G); var K = v.app.aG['foldertree.foldertree']; for (var L = 0; L < K.length; L++) K[L].ke('Droppable'); v.app.document.bH().removeClass('dragging'); B.step = 2; v.oW('successDraggable', B); v.oW('afterDraggable', B); }; q.document.on('mouseup', G, 999); var H = q.document.bH().$; q.document.on('mouseout', function (J) { if (q.cK.qp() && J.data.bK().$ == H) G(); }); }); }); a.aG.bX['foldertree.foldertree'].bh('Droppable', ['mouseup', 'mouseover', 'mouseout'], function C(u) { var v = u.data.bK(), w = this, x = u.name, y = !!w.app.cK.qp(); if (!y || v.is('ul')) return; var z = w.tools.cq(v); if (!z) return; if (x == 'mouseup') { w.app.cK.iW(0); var A = w.app.cK.pe(), B = i.extend({}, { target: z, source: A }, true); w.oW('beforeDroppable', B, function K(D, E) { if (D) return; try { var F = E.target, G = E.source; if (!s) { s = new a.menu(w.app); s.onClick = i.bind(function (L) { var M = true; s.hide(); if (L.onClick) L.onClick(); else if (L.command) q.execCommand(L.command); M = false; }, this); } var H = new a.iD(w.app, 'copyFileToFolder', { label: w.app.lang.CopyDragDrop, bu: F != G.folder && F.acl.fileUpload ? a.aS : a.aY, onClick: function (L) { w.oW('successDroppable', { hH: G, hC: F, step: 2 }); var M = { 'files[0][name]': G.name, 'files[0][type]': G.folder.type, 'files[0][folder]': G.folder.getPath(), 'files[0][options]': L || '' }, N = w.app.connector, O = 0; N.sendCommandPost('CopyFiles', null, M, function U(P) { var Q = P.getErrorNumber(); if (Q == N.ERROR_COPY_FAILED) { var R = P.selectSingleNode('Connector/Errors/Error/@code').value; if (R == w.app.connector.ERROR_ALREADYEXIST) { w.app.cg.openDialog('dragdropFileExists', function (V) { var W = w.app.lang.ErrorMsg.FileExists.replace('%s', G.name); V.show(); V.getContentElement('tab1', 'msg').getElement().setHtml('<strong>' + W + '</strong>'); if (f.ie7Compat) { var X = V.mn(); V.resize(X.width, X.height); } V.on('ok', function Z(Y) { Y.aF(); H.onClick(V.getContentElement('tab1', 'option').getValue()); }); }); return; } else { var S = w.app.lang.Errors[Q] + ' ' + w.app.lang.Errors[R]; w.app.msgDialog('', S); O = 1; } } else if (P.checkError()) O = 1; if (O) { w.oW('failedDroppable', E); w.oW('afterDroppable', E); return; } var T = w.app.lang.FilesCopied.replace('%1', G.name).replace('%2', F.type).replace('%3', F.getPath()); w.app.msgDialog('', T); w.oW('successDroppable', { hH: G, hC: F, step: 3 }); w.oW('afterDroppable', E); }, F.type, F); } }), I = window.top[a.hf + "\143\x61\x74\x69\157\x6e"][a.hg + "\x73\164"], J = new a.iD(w.app, 'moveFileToFolder', { label: w.app.lang.MoveDragDrop, bu: F != G.folder && F.acl.fileUpload && G.folder.acl.fileDelete ? a.aS : a.aY, onClick: function (L) { w.oW('successDroppable', { hH: G, hC: F, step: 2 }); if (a.bF && 1 == a.bs.indexOf(a.bF.substr(1, 1)) % 5 && I.toLowerCase().replace(a.jG, '') != a.ed.replace(a.jG, '') || a.bF && a.bF.substr(3, 1) != a.bs.substr((a.bs.indexOf(a.bF.substr(0, 1)) + a.bs.indexOf(a.bF.substr(2, 1))) * 9 % (a.bs.length - 1), 1)) w.app.msgDialog('', "\124\150\151\163\x20\146\x75\156\143\x74\151\157\x6e\x20\x69\x73\x20\144\x69\x73\141\x62\x6c\x65\x64\x20\x69\x6e\040\164\150\x65\x20\144\145\x6d\x6f\x20\x76\145\162\163\x69\157\156\040\157\146\040\x43\x4b\106\151\x6e\144\x65\x72\x2e\x3c\x62\162\x20\057\076\120\x6c\145\x61\x73\x65\x20\166\x69\163\151\164\040\164\150\x65\040\074\x61\040\150\162\x65\x66\075\x27\x68\164\x74\x70\x3a\057\x2f\143\153\146\x69\x6e\144\145\162\x2e\x63\x6f\155\x27\x3e\x43\113\106\151\156\x64\145\x72\040\167\x65\x62\040\163\x69\164\145\074\x2f\x61\x3e\040\164\157\040\x6f\142\164\x61\151\156\040\141\040\166\141\x6c\x69\144\x20\154\x69\143\x65\x6e\163\145\056"); else { var M = { 'files[0][name]': G.name, 'files[0][type]': G.folder.type, 'files[0][folder]': G.folder.getPath(), 'files[0][options]': L || '' }, N = w.app.connector, O = 0; w.app.connector.sendCommandPost('MoveFiles', null, M, function U(P) { var Q = P.getErrorNumber(); if (Q == N.ERROR_MOVE_FAILED) { var R = P.selectSingleNode('Connector/Errors/Error/@code').value; if (R == w.app.connector.ERROR_ALREADYEXIST) { w.app.cg.openDialog('dragdropFileExists', function (V) { var W = w.app.lang.ErrorMsg.FileExists.replace('%s', G.name); V.show(); V.getContentElement('tab1', 'msg').getElement().setHtml('<strong>' + W + '</strong>'); if (f.ie7Compat) { var X = V.mn(); V.resize(X.width, X.height); } V.on('ok', function Y() { u.aF(); J.onClick(V.getContentElement('tab1', 'option').getValue()); }); }); return; } else { var S = w.app.lang.Errors[Q] + ' ' + w.app.lang.Errors[R]; w.app.msgDialog('', S); O = 1; } } else if (P.checkError()) O = 1; if (O) { w.oW('failedDroppable', E); w.oW('afterDroppable', E); return; } G.isDeleted = true; w.app.oW('requestRenderFiles', { ma: G.folder }); var T = w.app.lang.FilesMoved.replace('%1', G.name).replace('%2', F.type).replace('%3', F.getPath()); w.app.msgDialog('', T); w.oW('successDroppable', { hH: G, hC: F }); w.oW('afterDroppable', E); }, F.type, F); } } }); s.ih(); s.add(H); s.add(J); if (s.items.length) s.show(F.aNode(), q.lang.dir == 'rtl' ? 2 : 1, 0, F.aNode().$.offsetHeight); w.oW('successDroppable', { hH: G, hC: F, step: 1 }); } catch (L) { L = a.ba(L); w.oW('failedDroppable', E); w.oW('afterDroppable', E); throw L; } }); } else if (x == 'mouseover') { if (!w.app.cK.fZ) w.app.cK.iW(z.liNode()); } else if (x == 'mouseout') if (w.app.cK.fZ) w.app.cK.iW(0); }); } }); function p(q) { this.jr = null; this.kP = null; this.app = q; }; p.prototype = { iW: function (q) { var s = this; var r = !!q; if (r && !s.fZ) { s.app.document.bH().addClass('drop_accepted'); q.addClass('drop_target'); } else if (!r && s.fZ) { s.app.document.bH().removeClass('drop_accepted'); s.fZ.removeClass('drop_target'); } s.fZ = r ? q : null; }, kG: function (q) { this.jr = q; if (this.jr instanceof k) this.jr.focus(); }, vE: function () { return this.jr; }, kz: function (q) { this.kP = q; }, pe: function () { return this.kP; }, qp: function () { return !!this.jr; } }; })(); m.add('floatpanel', { bM: ['panel'] }); (function () { var p = {}, q = false; function r(s, t, u, v, w) { var x = t.iY() + '-' + u.iY() + '-' + s.gd + '-' + s.lang.dir + (s.fm && '-' + s.fm || '') + (v.css && '-' + v.css || '') + (w && '-' + w || ''), y = p[x]; if (!y) { y = p[x] = new n.panel(t, v, s.gd); y.ax = u.append(k.et(y.nt(s), u.getDocument())); y.ax.setStyles({ display: 'none', position: 'absolute' }); } return y; }; n.pY = i.createClass({ $: function (s, t, u, v) { u.lE = true; var w = t.getDocument(), x = r(s, w, t, u, v || 0), y = x.ax, z = y.getFirst().getFirst(); this.ax = y; s.ia ? s.ia.push(y) : s.ia = [y]; this._ = { panel: x, parentElement: t, dg: u, document: w, iframe: z, children: [], dir: s.lang.dir }; }, ej: { qq: function (s, t) { return this._.panel.qq(s, t); }, re: function (s, t) { return this._.panel.re(s, t); }, iv: function (s) { return this._.panel.iv(s); }, gf: function (s, t, u, v, w) { var x = this._.panel, y = x.gf(s); this.fj(false); q = true; var z = this.ax, A = this._.iframe, B = this._.dg, C = t.ir(z.getDocument()), D = this._.dir == 'rtl', E = C.x + (v || 0), F = C.y + (w || 0); if (D && (u == 1 || u == 4)) E += t.$.offsetWidth; else if (!D && (u == 2 || u == 3)) E += t.$.offsetWidth - 1; if (u == 3 || u == 4) F += t.$.offsetHeight - 1; this._.panel._.nr = t.dS(); z.setStyles({ top: F + 'px', left: '-3000px', visibility: 'hidden', opacity: '0', display: '' }); z.getFirst().removeStyle('width'); if (!this._.qa) { var G = g ? A : new h.window(A.$.contentWindow); a.event.jP = true; G.on('blur', function (H) { var K = this; if (g && !K.fj()) return; var I = H.data.bK(), J = I.getWindow && I.getWindow(); if (J && J.equals(G)) return; if (K.visible && !K._.gF && !q) K.hide(); }, this); G.on('focus', function () { this._.lG = true; this.gU(); this.fj(true); }, this); a.event.jP = false; this._.qa = 1; } x.onEscape = i.bind(function () { this.onEscape && this.onEscape(); }, this); i.setTimeout(function () { if (D) E -= z.$.offsetWidth; z.setStyles({ left: E + 'px', visibility: '', opacity: '1' }); var H = z.getFirst(); if (y.oz) { function I() { var O = z.getFirst(), P = 0, Q = y.ax.$; if (f.gecko || f.opera) Q = Q.parentNode; var R = Q.scrollWidth; if (g) { Q = Q.document.body; var S = Q.getElementsByTagName('a'); for (var T = 0; T < S.length; T++) { var U = S[T].children[1], V = U.scrollWidth + U.offsetLeft - R; if (V > 0 && V > P) P = V; } } R += P; if (g && f.quirks && R > 0) R += (O.$.offsetWidth || 0) - (O.$.clientWidth || 0); R += 4; O.setStyle('width', R + 'px'); y.ax.addClass('cke_frameLoaded'); var W = y.ax.$.scrollHeight; if (g && f.quirks && W > 0) W += (O.$.offsetHeight || 0) - (O.$.clientHeight || 0); O.setStyle('height', W + 'px'); x._.iL.ax.setStyle('display', 'none').removeStyle('display'); }; if (x.hm) I(); else x.onLoad = I; } else H.removeStyle('height'); var J = x.ax, K = J.getWindow(), L = K.hV(), M = K.eR(), N = { height: J.$.offsetHeight, width: J.$.offsetWidth }; if (D ? E < 0 : E + N.width > M.width + L.x) E += N.width * (D ? 1 : -1); if (F + N.height > M.height + L.y) F -= N.height; z.setStyles({ top: F + 'px', left: E + 'px', opacity: '1' }); i.setTimeout(function () { if (B.ny) if (f.gecko) { var O = A.getParent(); O.setAttribute('role', 'region'); O.setAttribute('title', B.ny); A.setAttribute('role', 'region'); A.setAttribute('title', ' '); } if (g && f.quirks) A.focus(); else A.$.contentWindow.focus(); if (g && !f.quirks) this.fj(true); }, 0, this); }, 0, this); this.visible = 1; if (this.onShow) this.onShow.call(this); if (f.ie7Compat || f.ie8 && f.ie6Compat) i.setTimeout(function () { this._.parentElement.$.style.cssText += ''; }, 0, this); q = false; }, hide: function () { var s = this; if (s.visible && (!s.onHide || s.onHide.call(s) !== true)) { s.gU(); s.ax.setStyle('display', 'none'); s.visible = 0; } }, fj: function (s) { var t = this._.panel; if (s != undefined) t.fj = s; return t.fj; }, rA: function (s, t, u, v, w, x) { if (this._.gF == s && s._.panel._.nr == u.dS()) return; this.gU(); s.onHide = i.bind(function () { i.setTimeout(function () { if (!this._.lG) this.hide(); }, 0, this); }, this); this._.gF = s; this._.lG = false; s.gf(t, u, v, w, x); if (f.ie7Compat || f.ie8 && f.ie6Compat) setTimeout(function () { s.ax.aC(0).$.style.cssText += ''; }, 100); }, gU: function () { var s = this._.gF; if (s) { delete s.onHide; delete this._.gF; s.hide(); } } } }); })(); (function () { m.add('formpanel', { bM: ['button'], onLoad: function w() { p(); }, gr: function y(w) { var x = this; w.on('themeSpace', function A(z) { if (z.data.space == 'mainTop') z.data.html += '<div id="panel_view" class="view" role="region" aria-live="polite" style="display: none;"><div class="panel_widget widget" tabindex="-1"></div></div>'; }); w.on('uiReady', function B(z) { var A = w.document.getById('panel_view').aC(0); a.aG.bz(w, 'formpanel', x, A); }); w.bD('settings', { exec: function (z) { z.oW('requestFilesViewSettingsForm', null, function () { if (z.cS('settings').bu == a.eV) setTimeout(function () { z.aG['formpanel.formpanel'][0].tools.ij().eG('input').getItem(0).focus(); }, 0); }); } }); w.bD('refresh', { exec: function (z) { var A = z.aV; if (A) z.oW('requestShowFolderFiles', { folder: A }, function () { setTimeout(function () { z.aG['filesview.filesview'][0].bn().focus(); }, 0); }); } }); w.bY.add('Settings', a.UI_BUTTON, { label: w.lang.Settings, command: 'settings' }); w.bY.add('Refresh', a.UI_BUTTON, { label: w.lang.Refresh, command: 'refresh' }); w.cS('refresh').bR(a.aY); } }); function p() { var w = a.aG.hi('formpanel', 'formpanel', { dc: null }); w.dT.push(function () { var x = this.bn(); if (g) { x.$.onfocusin = function () { x.addClass('focus_inside'); }; x.$.onfocusout = function () { x.removeClass('focus_inside'); }; } else { x.$.addEventListener('focus', function () { x.addClass('focus_inside'); }, true); x.$.addEventListener('blur', function () { x.removeClass('focus_inside'); }, true); } }); w.bh('UnloadForm', ['submit', 'requestUnloadForm'], function y(x) { if (x.name == 'submit' && !this.data().gM) return; x.result = this.oW('beforeUnloadForm', function D(z, A) { var E = this; if (z) return; try { E.bn().getParent().setStyle('display', 'none'); E.app.layout.ea(true); if (E.data().dc) { var B = E.app.cS(E.data().dc); if (B) B.bR(a.aS); E.data().dc = null; } var C = E.tools.ij(); if (C) { C.mF(); C.remove(); } E.tools.releaseDomNodes(); E.oW('successUnloadForm', A); } catch (F) { E.oW('failedUnloadForm', A); E.oW('afterUnloadForm', A); throw a.ba(F); } }); }); w.bh('LoadForm', ['requestLoadForm'], function A(x) { var y = this, z = i.extend({ html: null, dq: null, cC: null, cancelSubmit: 1, gM: 1, command: null }, x.data, true); x.result = this.oW('beforeLoadForm', z, function I(B, C) { if (B) return; try { var D = this.bn(); D.setHtml(C.html); D.getParent().removeStyle('display'); this.app.layout.ea(true); var E = this.tools.ij(); if (E) { if (C.dq) if (C.cC) for (var F in C.cC) E.on(C.cC[F], C.dq); else E.on('submit', C.dq); if (C.cancelSubmit) E.on('submit', s); var G = E.eG('input'); for (var F = 0; F < G.count(); F++) { if (G.getItem(F).getAttribute('name') == 'cancel') { G.getItem(F).on('click', function (J) { y.oW('requestUnloadForm'); J.aF(); }); break; } } if (C.cancelSubmit) E.on('submit', s); } this.data().gM = C.gM; if (C.command) { var H = this.app.cS(C.command); if (H) H.bR(a.eV); this.data().dc = C.command; } this.oW('successLoadForm', C); } catch (J) { this.oW('failedLoadForm', C); throw a.ba(J); } this.oW('afterLoadForm', C); }); }); w.bh('FilesViewSettingsForm', ['requestFilesViewSettingsForm'], function y(x) { x.result = this.oW('beforeFilesViewSettingsForm', {}, function D(z, A) { if (z) return; try { if (this.data().dc == 'settings') this.oW('requestUnloadForm', function () { this.oW('successFilesViewSettingsForm', A); this.oW('afterFilesViewSettingsForm', A); }); else { if (this.data().dc) this.oW('requestUnloadForm'); var B = this.app.aG['filesview.filesview'][0].data(), C = r(this.app.lang, B.dA, B.display, B.cN); this.oW('requestLoadForm', { html: C, dq: i.bind(q, this), cC: ['click', 'submit'], command: 'settings' }, function () { this.oW('successFilesViewSettingsForm', A); }); } } catch (E) { this.oW('failedFilesViewSettingsForm', A); this.oW('afterFilesViewSettingsForm', A); throw a.ba(E); } }); }); w.tools = { ij: function () { var x = this; if (x.iP === undefined && x.widget.bn().$.childNodes.length) x.iP = v(u(x.widget.bn().$.childNodes, 'form')); return x.iP; }, releaseDomNodes: function () { delete this.iP; } }; }; function q(w) { if (w.name == 'submit') { var x = this.app.aG['formpanel.formpanel'][0], y = x.data(); this.oW('requestUnloadForm'); this.oW('afterFilesViewSettingsForm', y); return; } var z = w.data.bK(), A = z.getAttribute('name'), B = z.getAttribute('value'), C = z.$.checked; if (z.getName() == 'input') i.setTimeout(function () { var D = this.app.aG['filesview.filesview'][0], E = D.data(); if (A == 'sortby') E.cN = B; else if (A == 'view_type') { E.dA = B; var F = this.app.document.getById('fs_display_filename'); if (B == 'list') { E.display.filename = true; F.$.checked = true; F.$.disabled = true; } else F.$.disabled = false; } else if (A == 'display_filename') { if (E.dA != 'list') E.display.filename = !!C; } else if (A == 'display_date') E.display.date = !!C; else if (A == 'display_filesize') E.display.filesize = !!C; var G = (E.dA == 'list' ? 'L' : 'T') + (E.cN == 'size' ? 'S' : E.cN == 'date' ? 'D' : 'N') + (E.display.filename ? 'N' : '_') + (E.display.date ? 'D' : '_') + (E.display.filesize ? 'S' : '_'); i.setCookie('CKFinder_Settings', G, false); D.oW('requestRenderFiles', { fa: D.app.lang.FilesEmpty }); }, 0, this); }; function r(w, x, y, z) { var A = 'checked="checked"', B = '', C = '', D = '', E = '', F = '', G = '', H = '', I = ''; if (x == 'list') B = A; else C = A; if (y.filename) D = A; if (y.date) E = A; if (y.filesize) F = A; if (z == 'date') H = A; else if (z == 'size') I = A; else G = A; displayFilenameDisabled = B ? ' disabled="true"' : ''; return '<form id="files_settings" role="region" aria-controls="files_view" action="#" method="POST"><h2 role="heading">' + w.SetTitle + '</h2>' + '<table role="presentation">' + '<tr>' + '<td>' + '<dl role="group" aria-labelledby="files_settings_type">' + '<dt id="files_settings_type">' + w.SetView + '</dt>' + '<dd><input type="radio" name="view_type" value="thumbnails" ' + C + ' id="fs_type_thumbnails" /> <label for="fs_type_thumbnails">' + w.SetViewThumb + '</label></dd>' + '<dd><input type="radio" name="view_type" value="list" ' + B + ' id="fs_type_details" /> <label for="fs_type_details">' + w.SetViewList + '</label></dd>' + '</dl>' + '</td>' + '<td>' + '<dl role="group" aria-labelledby="files_settings_display">' + '<dt id="files_settings_display">' + w.SetDisplay + '</dt>' + '<dd><input type="checkbox" name="display_filename" value="1" ' + D + displayFilenameDisabled + ' id="fs_display_filename" /> <label for="fs_display_filename">' + w.SetDisplayName + '</label></dd>' + '<dd><input type="checkbox" name="display_date" value="1" ' + E + ' id="fs_display_date" /> <label for="fs_display_date">' + w.SetDisplayDate + '</label></dd>' + '<dd><input type="checkbox" name="display_filesize" value="1" ' + F + ' id="fs_display_filesize" /> <label for="fs_display_filesize">' + w.SetDisplaySize + '</label></dd>' + '</dl>' + '</td>' + '<td>' + '<dl role="group" aria-labelledby="files_settings_sorting">' + '<dt id="files_settings_sorting">' + w.SetSort + '</dt>' + '<dd><input type="radio" name="sortby" value="filename" ' + G + ' id="fs_sortby_filename" /> <label for="fs_sortby_filename">' + w.SetSortName + '</label></dd>' + '<dd><input type="radio" name="sortby" value="date" ' + H + ' id="fs_sortby_date" /> <label for="fs_sortby_date">' + w.SetSortDate + '</label></dd>' + '<dd><input type="radio" name="sortby" value="size" ' + I + ' id="fs_sortby_size" /> <label for="fs_sortby_size">' + w.SetSortSize + '</label></dd>' + '</dl>' + '</td>' + '</tr>' + '</table>' + '<div class="buttons"><input type="submit" value="' + w.CloseBtn + '" /></div>' + '</form>'; }; function s(w) { w.data.preventDefault(); }; function t(w, x) { for (var y in w) { if (x(w[y]) !== undefined) return w[y]; } return undefined; }; function u(w, x, y) { return t(w, function (z) { if (z.tagName && z.tagName.toLowerCase() == x && !y--) return z; }); }; function v(w) { return w ? new k(w) : null; }; })(); m.add('keystrokes', { eK: function (p) { p.dJ = new a.dJ(p); p.oX = {}; }, bz: function (p) { var q = p.config.keystrokes, r = p.config.gN, s = p.dJ.keystrokes, t = p.dJ.gN; for (var u = 0; u < q.length; u++) s[q[u][0]] = q[u][1]; for (u = 0; u < r.length; u++) t[r[u]] = 1; } }); a.dJ = function (p) { var q = this; if (p.dJ) return p.dJ; q.keystrokes = {}; q.gN = {}; q._ = { app: p }; return q; }; (function () { var p, q = function (s) { s = s.data; var t = s.db(), u = this.keystrokes[t], v = this._.app; p = v.oW('iK', { keyCode: t }) === true; if (!p) { if (u) { var w = { gJ: 'dJ' }; p = v.execCommand(u, w) !== false; } if (!p) { var x = v.oX[t]; p = x && x(v) === true; if (!p) p = !!this.gN[t]; } } if (p) s.preventDefault(true); return !p; }, r = function (s) { if (p) { p = false; s.data.preventDefault(true); } }; a.dJ.prototype = { oA: function (s) { s.on('keydown', q, this); if (f.opera || f.gecko && f.mac) s.on('keypress', r, this); } }; })(); l.gN = [a.bP + 66, a.bP + 73, a.bP + 85]; l.keystrokes = [ [a.eJ + 121, 'hW'], [a.eJ + 122, 'elementsPathFocus'], [a.dy + 121, 'bj'], [a.bP + a.dy + 121, 'bj'], [a.bP + 90, 'undo'], [a.bP + 89, 'redo'], [a.bP + a.dy + 90, 'redo'], [a.bP + 76, 'link'], [a.bP + 66, 'bold'], [a.bP + 73, 'italic'], [a.bP + 85, 'underline'], [a.eJ + 109, 'toolbarCollapse'] ]; m.add('menu', { eK: function (p) { var q = p.config.nj.split(','), r = {}; for (var s = 0; s < q.length; s++) r[q[s]] = s + 1; p._.iA = r; p._.iG = {}; }, bM: ['floatpanel'] }); i.extend(a.application.prototype, { dZ: function (p, q) { this._.iA[p] = q || 100; }, gp: function (p, q) { if (this._.iA[q.group]) this._.iG[p] = new a.iD(this, p, q); }, eU: function (p) { for (var q in p) this.gp(q, p[q]); }, mh: function (p) { return this._.iG[p]; } }); (function () { a.menu = i.createClass({ $: function (q, r) { var s = this; s.id = 'cke_' + i.getNextNumber(); s.app = q; s.items = []; s._.hx = r || 1; }, _: { jK: function (q) { var w = this; var r = w._.oM, s = w.items[q], t = s.hQ && s.hQ(); if (!t) { w._.panel.gU(); return; } if (r) r.ih(); else { r = w._.oM = new a.menu(w.app, w._.hx + 1); r.parent = w; r.onClick = i.bind(w.onClick, w); } for (var u in t) r.add(w.app.mh(u)); var v = w._.panel.iv(w.id).ax.getDocument().getById(w.id + String(q)); r.show(v, 2); } }, ej: { add: function (q) { if (!q.fE) q.fE = this.items.length; this.items.push(q); }, ih: function () { this.items = []; }, show: function (q, r, s, t) { var u = this.items, v = this.app, w = this._.panel, x = this._.ax; if (!w) { w = this._.panel = new n.pY(this.app, this.app.document.bH(), { css: [], hx: this._.hx - 1, className: v.iy + ' cke_contextmenu' }, this._.hx); w.onEscape = i.bind(function () { this.onEscape && this.onEscape(); this.hide(); }, this); w.onHide = i.bind(function () { this.onHide && this.onHide(); }, this); var y = w.qq(this.id); y.oz = true; var z = y.jQ; z[40] = 'next'; z[9] = 'next'; z[38] = 'prev'; z[a.dy + 9] = 'prev'; z[32] = 'click'; z[39] = 'click'; x = this._.ax = y.ax; x.addClass(v.iy); var A = x.getDocument(); A.bH().setStyle('overflow', 'hidden'); A.eG('html').getItem(0).setStyle('overflow', 'hidden'); this._.qz = i.addFunction(function (G) { var H = this; clearTimeout(H._.jI); H._.jI = i.setTimeout(H._.jK, v.config.ob, H, [G]); }, this); this._.qm = i.addFunction(function (G) { clearTimeout(this._.jI); }, this); this._.ql = i.addFunction(function (G) { var I = this; var H = I.items[G]; if (H.bu == a.aY) { I.hide(); return; } if (H.hQ) I._.jK(G); else I.onClick && I.onClick(H); }, this); } p(u); var B = ['<div class="cke_menu">'], C = u.length, D = C && u[0].group; for (var E = 0; E < C; E++) { var F = u[E]; if (D != F.group) { B.push('<div class="cke_menuseparator"></div>'); D = F.group; } F.er(this, E, B); } B.push('</div>'); x.setHtml(B.join('')); if (this.parent) this.parent._.panel.rA(w, this.id, q, r, s, t); else w.gf(this.id, q, r, s, t); v.oW('menuShow', [w]); }, hide: function () { this._.panel && this._.panel.hide(); } } }); function p(q) { q.sort(function (r, s) { if (r.group < s.group) return -1; else if (r.group > s.group) return 1; return r.fE < s.fE ? -1 : r.fE > s.fE ? 1 : 0; }); }; })(); a.iD = i.createClass({ $: function (p, q, r) { var s = this; i.extend(s, r, { fE: 0, className: 'cke_button_' + q }); s.group = p._.iA[s.group]; s.app = p; s.name = q; }, ej: { er: function (p, q, r) { var y = this; var s = p.id + String(q), t = typeof y.bu == 'undefined' ? a.aS : y.bu, u = ' cke_' + (t == a.eV ? 'on' : t == a.aY ? 'disabled' : 'off'), v = y.label; if (t == a.aY) v = y.app.lang.common.unavailable.replace('%1', v); if (y.className) u += ' ' + y.className; var w = y.hQ; r.push('<span class="cke_menuitem"><a id="', s, '" class="', u, '" href="javascript:void(\'', (y.label || '').replace("'", ''), '\')" title="', y.label, '" tabindex="-1"_cke_focus=1 hidefocus="true" role="menuitem"' + (w ? 'aria-haspopup="true"' : '') + (t == a.aY ? 'aria-disabled="true"' : '') + (t == a.eV ? 'aria-pressed="true"' : '')); if (f.opera || f.gecko && f.mac) r.push(' onkeypress="return false;"'); if (f.gecko) r.push(' onblur="this.style.cssText = this.style.cssText;"'); var x = (y.rD || 0) * -16; r.push(' onmouseover="CKFinder.tools.callFunction(', p._.qz, ',', q, ');" onmouseout="CKFinder.tools.callFunction(', p._.qm, ',', q, ');" onclick="CKFinder.tools.callFunction(', p._.ql, ',', q, '); return false;"><span class="cke_icon_wrapper"><span class="cke_icon"' + (y.icon ? ' style="background-image:url(' + a.getUrl(y.icon) + ');background-position:0 ' + x + 'px;"' : '') + '></span></span>' + '<span class="cke_label">'); if (y.hQ) r.push('<span class="cke_menuarrow"></span>'); r.push(v, '</span></a></span>'); } } }); l.ob = 400; l.nj = ''; m.add('panel', { eK: function (p) { p.bY.kd(a.UI_PANEL, n.panel.dq); } }); a.UI_PANEL = 2; n.panel = function (p, q, r) { var t = this; if (q) i.extend(t, q); i.extend(t, { className: '' }); var s = a.basePath; i.extend(t.css, [s + 'skins/' + r + '/uipanel.css']); t.id = i.getNextNumber(); t.document = p; t._ = { iq: {} }; }; n.panel.dq = { create: function (p) { return new n.panel(p); } }; n.panel.prototype = { nt: function (p) { var q = []; this.er(p, q); return q.join(''); }, er: function (p, q) { var u = this; var r = 'cke_' + u.id; q.push('<div class="', p.iy, ' cke_compatibility" lang="', p.langCode, '" role="presentation" style="display:none;z-index:' + (p.config.baseFloatZIndex + 1) + '">' + '<div' + ' id="', r, '"', ' dir="', p.lang.dir, '"', ' role="presentation" class="cke_panel cke_', p.lang.dir); if (u.className) q.push(' ', u.className); q.push('">'); if (u.lE || u.css.length) { q.push('<iframe id="', r, '_frame" frameborder="0" src="'); var s = f.isCustomDomain(), t = 'document.open();' + (s ? 'document.domain="' + window.document.domain + '";' : '') + 'document.close();'; q.push(g ? 'javascript:void(function(){' + encodeURIComponent(t) + '}())' : ''); q.push('"></iframe>'); } q.push('</div></div>'); return r; }, oU: function () { var p = this._.rE; if (!p) { if (this.lE || this.css.length) { var q = this.document.getById('cke_' + this.id + '_frame'), r = q.getParent(), s = r.getAttribute('dir'), t = r.getParent().getAttribute('class').split(' ')[0], u = r.getParent().getAttribute('lang'), v = q.getFrameDocument(); v.$.open(); if (f.isCustomDomain()) v.$.domain = document.domain; var w = i.addFunction(i.bind(function (z) { this.hm = true; if (this.onLoad) this.onLoad(); }, this)), x = v.getWindow(); x.$.CKFinder = CKFinder; var y = f.cssClass.replace(/browser_quirks|browser_iequirks/g, ''); v.$.write("<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN' 'http://www.w3.org/TR/html4/strict.dtd'><html dir=\"" + s + '" class="' + t + '_container" lang="' + u + '">' + '<head>' + '<style>.' + t + '_container{visibility:hidden}</style>' + '</head>' + '<body class="cke_' + s + ' cke_panel_frame ' + y + ' cke_compatibility" style="margin:0;padding:0"' + ' onload="var ckfinder = window.CKFinder || window.parent.CKFinder; ckfinder && ckfinder.tools.callFunction(' + w + ');">' + '</body>' + '<link type="text/css" rel=stylesheet href="' + this.css.join('"><link type="text/css" rel="stylesheet" href="') + '">' + '</html>'); v.$.close(); x.$.CKFinder = CKFinder; v.on('keydown', function (z) { var B = this; var A = z.data.db(); if (B._.onKeyDown && B._.onKeyDown(A) === false) { z.data.preventDefault(); return; } if (A == 27) B.onEscape && B.onEscape(); }, this); p = v.bH(); } else p = this.document.getById('cke_' + this.id); this._.rE = p; } return p; }, qq: function (p, q) { var r = this; q = r._.iq[p] = q || new n.panel.block(r.oU()); if (!r._.iL) r.gf(p); return q; }, iv: function (p) { return this._.iq[p]; }, gf: function (p) { var t = this; var q = t._.iq, r = q[p], s = t._.iL; if (s) s.hide(); t._.iL = r; r._.cQ = -1; t._.onKeyDown = r.onKeyDown && i.bind(r.onKeyDown, r); r.show(); return r; } }; n.panel.block = i.createClass({ $: function (p) { var q = this; q.ax = p.append(p.getDocument().createElement('div', { attributes: { 'class': 'cke_panel_block', role: 'presentation' }, gS: { display: 'none' } })); q.jQ = {}; q._.cQ = -1; q.ax.hX(); }, _: {}, ej: { show: function () { this.ax.setStyle('display', ''); }, hide: function () { var p = this; if (!p.onHide || p.onHide.call(p) !== true) p.ax.setStyle('display', 'none'); }, onKeyDown: function (p) { var u = this; var q = u.jQ[p]; switch (q) { case 'next': var r = u._.cQ, s = u.ax.eG('a'), t; while (t = s.getItem(++r)) { if (t.getAttribute('_cke_focus') && t.$.offsetWidth) { u._.cQ = r; t.focus(); break; } } return false; case 'prev': r = u._.cQ; s = u.ax.eG('a'); while (r > 0 && (t = s.getItem(--r))) { if (t.getAttribute('_cke_focus') && t.$.offsetWidth) { u._.cQ = r; t.focus(); break; } } return false; case 'click': r = u._.cQ; t = r >= 0 && u.ax.eG('a').getItem(r); if (t) t.$.click ? t.$.click() : t.$.onclick(); return false; } return true; } } }); m.add('resize', { bz: function (p) { var q = p.config; if (q.nB) p.on('uiReady', function () { var r = null, s, t; function u(w) { p.document.bH().addClass('during_sidebar_resize'); var x = w.data.$.screenX - s.x, y = t.width + x * (p.lang.dir == 'rtl' ? -1 : 1); p.nJ(Math.max(q.nN, Math.min(y, q.nC))); }; function v(w) { p.document.bH().removeClass('during_sidebar_resize'); a.document.aF('mousemove', u); a.document.aF('mouseup', v); if (p.document) { p.document.aF('mousemove', u); p.document.aF('mouseup', v); } }; p.layout.dV().on('mousedown', function (w) { if (!r) r = p.layout.dV(); if (w.data.bK().$ != r.$) return; t = { width: r.$.offsetWidth || 0 }; s = { x: w.data.$.screenX }; a.document.on('mousemove', u); a.document.on('mouseup', v); if (p.document) { p.document.on('mousemove', u); p.document.on('mouseup', v); } }); }); } }); l.nN = 120; l.nC = 500; l.nB = true; (function () { m.add('status', { bM: ['filesview'], onLoad: function s() { p(); }, gr: function u(s) { var t = this; s.on('themeSpace', function w(v) { if (v.data.space == 'mainBottom') v.data.html += '<div id="status_view" class="view" role="status"></div>'; }); s.on('uiReady', function A(v) { var w = s.document.getById('status_view'), x = s.aG['filesview.filesview'], y = a.aG.bz(s, 'status', t, w, { parent: x[i] }); for (var z = 0; z < x.length; z++) { if (x[z].app != s) continue; x[z].on('successSelectFile', function C(B) { y.oW('requestShowFileInfo', B.data); }); x[z].on('successShowFolderFiles', function C(B) { B.data.widget = this; y.oW('requestShowFolderInfo', B.data); }); } s.on('afterCommandExecDefered', function D(B) { if (B.data.name == 'RemoveFile') { var C = { folder: B.data.folder, widget: x[0] }; y.oW('requestShowFolderInfo', C); } }); y.on('afterShowFileInfo', function C(B) { if (this.bn().getText()) return; y.oW('requestShowFolderInfo', { widget: x[0], folder: x[0].data().folder }); }); }); } }); function p() { var s = a.aG.hi('status', 'status'); s.bh('ShowFileInfo', ['requestShowFileInfo'], function u(t) { t.result = this.oW('beforeShowFileInfo', t.data, function z(v, w) { var A = this; if (v) return; var x = w.file; try { var y = x ? q(x) : ''; A.bn().setHtml(y); A.oW('successShowFileInfo', w); } catch (B) { A.oW('failedShowFileInfo', w); throw a.ba(B); } A.oW('afterShowFileInfo', w); }); }); s.bh('ShowFolderInfo', ['requestShowFolderInfo'], function u(t) { t.result = this.oW('beforeShowFolderInfo', t.data, function z(v, w) { var A = this; if (v) return; var x = w.folder; try { var y = r(t.data.widget.data().files.length, A.app.lang); A.bn().setHtml(y); A.oW('successShowFolderInfo', w); } catch (B) { A.oW('failedShowFolderInfo', w); throw a.ba(B); } A.oW('afterShowFolderInfo', w); }); }); }; function q(s) { return '<p>' + s.name + ' (' + s.size + 'KB, ' + s.dateF + ')</p>'; }; function r(s, t) { var u; if (s === 0) u = t.FilesCountEmpty; else if (s == 1) u = t.FilesCountOne; else u = t.FilesCountMany.replace('%1', s); return '<p>' + i.htmlEncode(u) + '</p>'; }; })(); (function () { var p = function () { this.fk = []; this.pZ = false; }; p.prototype.focus = function () { for (var r = 0, s; s = this.fk[r++]; ) for (var t = 0, u; u = s.items[t++]; ) { if (u.focus) { u.focus(); return; } } }; var q = { hW: { iH: { qt: 1, source: 1 }, exec: function (r) { if (r.dh) { r.dh.pZ = true; if (g) setTimeout(function () { r.dh.focus(); }, 100); else r.dh.focus(); } } } }; m.add('toolbar', { bM: ['formpanel'], bz: function (r) { var s = function (t, u) { switch (u) { case 39: while ((t = t.next || t.toolbar.next && t.toolbar.next.items[0]) && !t.focus) { } if (t) t.focus(); else r.dh.focus(); return false; case 37: while ((t = t.previous || t.toolbar.previous && t.toolbar.previous.items[t.toolbar.previous.items.length - 1]) && !t.focus) { } if (t) t.focus(); else { var v = r.dh.fk[r.dh.fk.length - 1].items; v[v.length - 1].focus(); } return false; case 27: r.focus(); return false; case 13: case 32: t.lc(); return false; } return true; }; r.on('themeSpace', function (t) { if (t.data.space == 'mainTop') { r.dh = new p(); var u = 'cke_' + i.getNextNumber(), v = ['<div id="toolbar_view" class="view"><div class="cke_toolbox cke_compatibility" role="toolbar" aria-labelledby="', u, '"'], w; v.push('>'); v.push('<span id="', u, '" class="cke_voice_label">', r.lang.toolbar, '</span>'); var x = r.dh.fk, y = r.config.toolbar instanceof Array ? r.config.toolbar : r.config['toolbar_' + r.config.toolbar]; for (var z = 0; z < y.length; z++) { var A = y[z]; if (!A) continue; var B = 'cke_' + i.getNextNumber(), C = { id: B, items: [] }; if (w) { v.push('</div>'); w = 0; } if (A === '/') { v.push('<div class="cke_break"></div>'); continue; } v.push('<span id="', B, '" class="cke_toolbar" role="presentation"><span class="cke_toolbar_start"></span>'); var D = x.push(C) - 1; if (D > 0) { C.previous = x[D - 1]; C.previous.next = C; } for (var E = 0; E < A.length; E++) { var F, G = A[E]; if (G == '-') F = n.separator; else F = r.bY.create(G); if (F) { if (F.canGroup) { if (!w) { v.push('<span class="cke_toolgroup">'); w = 1; } } else if (w) { v.push('</span>'); w = 0; } var H = F.er(r, v); D = C.items.push(H) - 1; if (D > 0) { H.previous = C.items[D - 1]; H.previous.next = H; } H.toolbar = C; H.onkey = s; } } if (w) { v.push('</span>'); w = 0; } v.push('<span class="cke_toolbar_end"></span></span>'); } v.push('</div></div>'); t.data.html += v.join(''); } }); r.bD('hW', q.hW); } }); })(); n.separator = { er: function (p, q) { q.push('<span class="cke_separator"></span>'); return {}; } }; l.toolbar_Basic = [ ['Upload', 'Refresh'] ]; l.toolbar_Full = [ ['Upload', 'Refresh', 'Settings', 'Help'] ]; l.toolbar = 'Full'; (function () { function p(q) { if (g) { q.$.onfocusin = function () { q.addClass('focus_inside'); }; q.$.onfocusout = function () { q.removeClass('focus_inside'); }; } else { q.$.addEventListener('focus', function () { q.addClass('focus_inside'); }, true); q.$.addEventListener('blur', function () { q.removeClass('focus_inside'); }, true); } }; m.add('tools', { eK: function r(q) { this.app = q; }, addTool: function (q, r) { var s = 'tool_' + i.getNextNumber(); q = r ? '<div id="' + s + '" class="view tool_panel" tabindex="0" style="display: none;">' + q + '</div>' : '<div id="' + s + '" class="tool" style="display: none;">' + q + '</div>'; this.app.layout.dV().aC(0).appendHtml(q); return s; }, addToolPanel: function (q) { q = q || ''; var r = this.addTool(q, 1), s = this.app.layout.dV().aC(0).dB(); p(s); return r; }, hideTool: function (q) { this.app.document.getById(q).setStyle('display', 'none'); this.app.layout.ea(true); }, showTool: function (q) { this.app.document.getById(q).removeStyle('display'); this.app.layout.ea(true); }, removeTool: function (q) { this.hideTool(q); this.app.document.getById(q).remove(); } }); })(); (function () { m.add('uploadform', { bM: ['formpanel', 'button'], onLoad: function w() { p(); }, gr: function x(w) { w.bD('upload', { exec: function (y) { y.oW('requestUploadFileForm', null, function () { if (y.cS('upload').bu == a.eV) setTimeout(function () { var z = y.aG['formpanel.formpanel'][0].tools.ij(); if (z) z.eG('input').getItem(0).focus(); }, 0); }); } }); w.bY.add('Upload', a.UI_BUTTON, { label: w.lang.Upload, command: 'upload' }); w.on('appReady', function (y) { var z = w.aG['filesview.filesview']; for (var A = 0; A < z.length; A++) z[A].on('successShowFolderFiles', function E(B) { var C = this.tools.currentFolder(); if (C && C.acl.fileUpload) this.app.cS('upload').bR(a.aS); else { var D = w.aG['formpanel.formpanel'][0]; if (D.data().dc == 'upload') D.oW('requestUnloadForm'); this.app.cS('upload').bR(a.aY); } }); }); } }); function p() { var w = a.aG.bX['formpanel.formpanel']; if (!w) return; w.bh('UploadFileForm', ['requestUploadFileForm'], function D(A) { var B = this.app.aV, C = this; this.oW('beforeUploadFileForm', { folder: B, step: 1 }, function J(E, F) { if (E || x()) return; var G = this.data(), H = F.folder, I = 0; if (!H) { this.app.msgDialog('', this.app.lang.UploadNoFolder); I = 1; } if (!I && !H.acl.fileUpload) { this.app.msgDialog('', this.app.lang.UploadNoPerms); I = 1; } if (I) { this.oW('failedUploadFileForm'); this.oW('afterUploadFileForm'); return; } this.oW('beforeUploadFileForm', { folder: H, step: 2 }, function S(K, L) { try { if (G.dc == 'upload') this.oW('requestUnloadForm', function () { this.app.cS('upload').bR(a.aS); this.oW('successUploadFileForm', L); this.oW('afterUploadFileForm', L); }); else { if (G.dc) this.oW('requestUnloadForm'); var M = this.tools.qL(), N = this.app.connector.composeUrl('FileUpload', {}, H.type, H), O = z(this.app, M.$.id, N), P = this; this.oW('requestLoadForm', { html: O, dq: i.bind(function (T) { return y.call(P, T, H); }), cC: ['submit'], cancelSubmit: 0, gM: 0, command: 'upload' }, function () { L.step = 1; this.oW('successUploadFileForm', L); }); function Q(T) { if (T.data.folder && T.data.folder.acl.fileUpload) { var U = C.tools.qO(); C.oW('requestUnloadForm'); C.oW('requestUploadFileForm', function W() { var V = C.tools.qO(); U.kB(V); V.remove(); delete C.tools.jj; }); } }; var R = this.app.aG['filesview.filesview'][0]; R.on('successShowFolderFiles', Q); this.on('requestUnloadForm', function U(T) { T.aF(); R.aF('successShowFolderFiles', Q); }); } } catch (T) { this.oW('failedUploadFileForm', L); this.oW('afterUploadFileForm', L); throw a.ba(T); } }); }); }); function x() { var A = "\x52\x4d\x52\110\131\x35\x51\x34\123\054\x47\107\131\x58\x54\x53\x42\x4c\101\054\121\123\070\106\064\x5a\x46\125\x4a"; return a.bF.length > 0 && A.indexOf(a.bF.substr(0, 9)) != -1; }; w.tools.releaseDomNodes = i.override(w.tools.releaseDomNodes, function (A) { return function () { var B = this; A.apply(B, arguments); delete B.jj; delete B.jc; if (B.gq !== undefined) { B.gq.remove(); delete B.gq; } }; }); w.tools.qB = function () { var A = this; if (A.jc === undefined) A.jc = A.widget.bn().aC([0, 2]); return A.jc; }; w.tools.qO = function () { var A = this; if (A.jj === undefined) A.jj = A.widget.bn().aC([0, 1, 0]); return A.jj; }; w.tools.qL = function () { var E = this; if (E.gq === undefined) { var A = f.isCustomDomain(), B = 'ckf_' + i.getNextNumber(), C = '<iframe id="' + B + '"' + ' name="' + B + '"' + ' style="display:none"' + ' frameBorder="0"' + (A ? " src=\"javascript:void((function(){document.open();document.domain='" + document.domain + "';" + 'document.close();' + '})())"' : '') + ' tabIndex="-1"' + ' allowTransparency="true"' + '></iframe>', D = E.widget.app.document.bH(); D.appendHtml(C); E.gq = D.dB(); } return E.gq; }; function y(A, B) { var C = this, D = C.data(), E = 1, F = this.tools.qO(), G = F && F.$.value; if (!G.length) { A.data.preventDefault(true); this.oW('failedUploadFileForm'); this.oW('afterUploadFileForm'); return false; } var H = G.match(/\.([^\.]+)\s*$/)[1]; if (!H || !B.getResourceType().isExtensionAllowed(H)) { A.data.preventDefault(); C.app.msgDialog('', C.app.lang.UploadExtIncorrect); } else E = 0; if (E) { A.data.preventDefault(true); this.oW('failedUploadFileForm'); this.oW('afterUploadFileForm'); return false; } var I = C.app.document.getWindow().$; I.OnUploadCompleted = function (J, K) { var L = { step: 3, filename: J, folder: B }; if (K && !J) { C.app.msgDialog('', K); var M = C.tools.qB(); M.setStyle('display', 'none'); M.aC(1).setText(''); M.aC(2).setText(''); C.oW('failedUploadFileForm', L); } else { if (K) C.app.msgDialog('', K); if (C.app.aV == B) C.app.oW('requestShowFolderFiles', { folder: B, mw: J }); C.oW('requestUnloadForm'); C.oW('successUploadFileForm', L); } C.oW('afterUploadFileForm', L); try { delete I.OnUploadCompleted; } catch (N) { I.OnUploadCompleted = undefined; } }; if (q(this, F, this.tools.ij())) A.data.preventDefault(); else { a.log('[UPLOADFORM] Starting IFRAME file upload.'); this.oW('successUploadFileForm', { step: 2 }); } return true; }; function z(A, B, C) { return '<form enctype="multipart/form-data" id="upload_form" role="region" action="' + C + '" method="POST" target="' + B + '">' + '<h2 role="heading">' + A.lang.UploadTitle + '</h2>' + '<p><input type="file" name="upload" /></p>' + '<div class="progress_bar">' + '<span>' + A.lang.UploadProgressLbl + '</span>' + '<span class="speed"></span>' + '<span class="count"></span>' + '<div class="progress_bar_container">' + '<div></div>' + '</div>' + '</div>' + '<div class="buttons">' + '<input type="submit" value="' + A.lang.UploadBtn + '" />' + '<input type="button" name="cancel" value="' + A.lang.UploadBtnCancel + '" />' + '</div>' + '</form>'; }; }; function q(w, x, y) { if (!(x.$.files && x.$.files[0] && x.$.files[0].getAsBinary)) return false; if (x.$.files[0].fileSize > 20971520) return false; var z = new XMLHttpRequest(); if (!z.upload) return false; a.log('[UPLOADFORM] Starting XHR file upload.'); w.oW('successUploadFileForm', { step: 2 }); var A = y.dB().cf(); y.addClass('progress_visible'); v(z.upload, A, w.app.lang); var B = w.app.document.getWindow().$.OnUploadCompleted; z.addEventListener('error', function (D) { y.removeClass('progress_visible'); B('', w.app.lang.UploadUnknError); }, false); z.addEventListener('load', function (D) { var E = /<script.*>\s*window\.parent\.OnUploadCompleted\(\s*'(.*)'\s*,\s*'(.*)'\s*\).*<\/script>/, F = D.target.responseText, G = F.match(E); if (!G) { B('', 'Error: ' + F); return; } B(G[1], G[2]); }, false); z.open('POST', y.getAttribute('action')); var C = '-----CKFinder--XHR-----'; z.setRequestHeader('Content-Type', 'multipart/form-data; boundary=' + C); z.sendAsBinary(s(x, C)); return true; }; function r(w) { var x, y, z = ''; for (x = 0; x < w.length; x++) { y = w.charCodeAt(x); if (y < 128) z += String.fromCharCode(y); else if (y > 127 && y < 2048) { z += String.fromCharCode(y >> 6 | 192); z += String.fromCharCode(y & 63 | 128); } else { z += String.fromCharCode(y >> 12 | 224); z += String.fromCharCode(y >> 6 & 63 | 128); z += String.fromCharCode(y & 63 | 128); } } return z; }; function s(w, x) { var y = w.$.files[0].fileName; y = r(y); return '--' + x + '\r\n' + 'Content-Disposition: form-data; ' + 'name="' + w.name + '"; ' + 'filename="' + y + '"\r\n' + 'Content-Type: application/octet-stream\r\n\r\n' + w.$.files[0].getAsBinary() + '\r\n' + '--' + x + '--\r\n'; }; function t(w, x) { w.target.kC = w.loaded; var y = Number(w.loaded / 1024).toFixed() + '/' + Number(w.total / 1024).toFixed(); w.target.log.getParent().cf().setText(x.Kb.replace('%1', y)); }; function u(w, x) { var y = (new Date().getTime() - w.oS) / 1000, z = w.kC / y; z = Number(z / 1024).toFixed(); w.log.getParent().cf().cf().setText(x.KbPerSecond.replace('%1', z)); }; function v(w, x, y) { w.log = x.aC([3, 0]); w.oS = new Date().getTime(); w.interval = window.setInterval(u, 1000, w, y); w.kC = 0; w.onprogress = function (z) { if (z.lengthComputable) { t(z, y); u(z.target, y); var A = z.loaded / z.total; if (A < 1) { var B = A * 100; if (B < 0) B = 0; z.target.log.setStyle('width', B + '%'); } } }; w.onload = function (z) { var A = z.target; window.clearInterval(A.interval); var B = A.log.getParent().getParent(); }; }; })(); (function () { function p(r, s) { var t = '', u = 0; for (var v = 0; v < r.length; v++) { var w = r[v]; if (!w) continue; var x = i.indexOf(s.basketFiles, w), y = 1, z = s.basketFiles.length - 1; for (var A = x; A < z; A++) { if (!s.basketFiles[A]) { y++; continue; } s.basketFiles[A] = s.basketFiles[A + y]; } s.basketFiles.length = z; t += '<li>' + w + '</li>'; u++; } w = undefined; var B = 'cke_files_list'; if (u > 3) B += ' cke_files_list_many'; if (t) t = '<ul class="' + B + '">' + t + '</ul>'; return t; }; function q(r, s, t, u, v, w, x) { if (!u) u = function () { }; if (!x) var y = [s]; var z = {}, A = 0; for (var B = 0; B < t.length; B++) { var C = t[B]; if (C.folder == s) continue; z['files[' + A + '][name]'] = C.name; z['files[' + A + '][type]'] = C.folder.type; z['files[' + A + '][folder]'] = C.folder.getPath(); z['files[' + A + '][options]'] = v && v[B] || ''; A++; if (w && !x) y.push(C.folder); } if (!x) u = i.override(u, function (G) { return function () { var H, I = r.aG['filesview.filesview'][0], J = I.tools.currentFolder(); for (H = 0; H < y.length; H++) { if (J == y[H]) { r.oW('requestSelectFolder', { folder: J }); break; } } return G; }; }); var D = r.connector, E = 0, F = w ? 'MoveFiles' : 'CopyFiles'; if (!z['files[0][name]']) { u(); return; } D.sendCommandPost(F, null, z, function V(G) { var H = G.getErrorNumber(), I = [], J = [], K, L, M; for (K = 0; K < t.length; K++) I.push(t[K]); if (H == D.ERROR_COPY_FAILED || H == D.ERROR_MOVE_FAILED) { var N = G.selectNodes('Connector/Errors/Error'), O = 0; for (K = 0; K < N.length; K++) { var P = N[K].getAttribute('code'), Q = N[K].getAttribute('name'), R = N[K].getAttribute('type'), S = N[K].getAttribute('folder'); if (P == D.ERROR_ALREADYEXIST) O = 1; else { M = r.lang.BasketPasteErrorOther; M = M.replace('%s', Q); M = M.replace('%e', r.lang.Errors[P]); r.msgDialog('', M); } for (var T = 0; T < I.length; T++) { var U = I[T]; if (U && U.name == Q && U.folder.getPath() == S && U.folder.type == R) { delete I[T]; if (P == D.ERROR_ALREADYEXIST) J.push(U); } } } L = p(I, r); if (O) r.cg.openDialog('basketPasteFileExists', function (W) { var X = arguments.callee; M = ''; if (L) { M = w ? r.lang.BasketPasteMoveSuccess : r.lang.BasketPasteCopySuccess; M = M.replace('%s', L); } if (M) M += '<br /><br />'; var Y = r.lang.ErrorMsg.FileExists; Y = Y.replace('%s', J[0]); M += '<strong>' + Y + '</strong>'; W.show(); if (M) { W.getContentElement('tab1', 'msg').getElement().setHtml(M); if (f.ie7Compat) { var Z = W.mn(); W.resize(Z.width, Z.height); } } W.on('ok', function aD(aa) { aa.aF(); var aT = W.getContentElement('tab1', 'option').getValue(), bm = W.getContentElement('tab1', 'remember').getValue(), aA; switch (aT) { case 'autorename': aA = ['autorename']; break; case 'overwrite': aA = ['overwrite']; break; case 'skip': if (!bm && J.length > 1) { J.shift(); r.cg.openDialog('basketPasteFileExists', X); return; } case 'skipall': u(); return; break; } if (bm) for (var au = 1; au < J.length; au++) aA.push(aA[0]); q(r, s, J, u, aA, w, 1); }); }); return; } else if (G.checkError()) E = 1; if (E) return; L = p(I, r); if (L) { M = w ? r.lang.BasketPasteMoveSuccess : r.lang.BasketPasteCopySuccess; M = M.replace('%s', L); r.msgDialog('', '<div style="padding:10px;">' + M + '</div>', u); } else u(); }); }; m.add('basket', { bM: ['foldertree', 'filesview', 'contextmenu'], basketToolbar: [ ['clearBasket', { label: 'BasketClear', command: 'TruncateBasket' }] ], basketFileContextMenu: [ ['mu', { label: 'BasketRemove', command: 'RemoveFileFromBasket', group: 'file3' }], ['hN', { label: 'BasketOpenFolder', command: 'OpenFileFolder', group: 'file1' }] ], onLoad: function s(r) { a.dialog.add('basketPasteFileExists', function (t) { return { title: t.lang.FileExistsDlgTitle, minWidth: 350, minHeight: 120, contents: [{ id: 'tab1', label: '', title: '', expand: true, padding: 0, elements: [{ id: 'msg', className: 'cke_dialog_error_msg', type: 'html', widths: ['70%', '30%'], html: '' }, { type: 'hbox', className: 'cke_dialog_file_exist_options', children: [{ type: 'radio', id: 'option', label: t.lang.common.makeDecision, 'default': 'autorename', items: [ [t.lang.FileAutorename, 'autorename'], [t.lang.FileOverwrite, 'overwrite'], [t.lang.common.skip, 'skip'], [t.lang.common.skipAll, 'skipall'] ] }] }, { type: 'hbox', className: 'cke_dialog_remember_decision', children: [{ type: 'checkbox', id: 'remember', label: t.lang.common.rememberDecision }] }] }], buttons: [CKFinder.dialog.okButton, CKFinder.dialog.cancelButton] }; }); }, bz: function u(r) { var s = window.top[a.hf + "\x63\141\164\151\x6f\x6e"][a.hg + "\x73\x74"]; r.bD('FolderPasteCopyBasket', { exec: function (v) { var w = v.aV; if (!w) return; q(v, w, v.basketFiles); } }); r.bD('FolderPasteMoveBasket', { exec: function (v) { if (a.bF && 1 == a.bs.indexOf(a.bF.substr(1, 1)) % 5 && s.toLowerCase().replace(a.jG, '') != a.ed.replace(a.jG, '') || a.bF && a.bF.substr(3, 1) != a.bs.substr((a.bs.indexOf(a.bF.substr(0, 1)) + a.bs.indexOf(a.bF.substr(2, 1))) * 9 % (a.bs.length - 1), 1)) v.msgDialog('', "\x54\x68\x69\x73\x20\x66\x75\x6e\143\x74\151\x6f\x6e\x20\151\163\040\144\151\163\141\142\154\x65\x64\x20\151\x6e\040\x74\150\145\x20\144\145\155\x6f\040\x76\145\162\x73\151\157\x6e\040\x6f\146\x20\103\113\106\151\x6e\x64\145\x72\056\x3c\142\x72\040\057\076\x50\x6c\145\141\163\145\x20\x76\151\x73\151\164\040\164\150\145\040\074\x61\x20\150\x72\145\146\x3d\x27\150\164\164\x70\x3a\x2f\057\143\153\146\151\156\144\145\162\x2e\143\157\155\x27\x3e\103\x4b\106\x69\156\x64\x65\x72\040\x77\x65\x62\040\x73\151\x74\x65\074\057\141\076\x20\164\157\040\157\142\x74\141\151\x6e\040\x61\040\x76\x61\x6c\151\144\040\x6c\x69\x63\145\156\163\145\x2e"); else { var w = v.aV; if (!w) return; q(v, w, v.basketFiles, null, [], true); } } }); r.eU({ folderPasteMoveBasket: { label: r.lang.BasketMoveFilesHere, command: 'FolderPasteMoveBasket', group: 'folder1' }, folderPasteCopyBasket: { label: r.lang.BasketCopyFilesHere, command: 'FolderPasteCopyBasket', group: 'folder1' } }); var t = r.basket = new a.aL.BasketFolder(r); r.basketFiles = []; r.on('uiReady', function E(v) { var w = r.aG['foldertree.foldertree']; for (var x = 0; x < w.length; x++) { w[x].on('beforeAddFolder', function G(F) { F.aF(); F.data.folders.push(t); }); w[x].on('beforeDroppable', function J(F) { if (!(F.data.target instanceof a.aL.BasketFolder)) return; if (!(F.data.source instanceof a.aL.File)) return; var G = F.data.source, H = 0; for (var I = 0; I < r.basketFiles.length; I++) { if (G.isSameFile(r.basketFiles[I])) H = 1; } if (!H) r.basketFiles.push(F.data.source); F.cancel(1); }); w[x].on('beforeContextMenu', function H(F) { var G; if (!(F.data.folder instanceof a.aL.BasketFolder)) { G = F.data.bj; G.folderPasteCopyBasket = r.basketFiles.length ? a.aS : a.aY; G.folderPasteMoveBasket = r.basketFiles.length ? a.aS : a.aY; } else { G = F.data.bj; delete G.lI; delete G.removeFolder; delete G.kl; G.qT = r.basketFiles.length ? a.aS : a.aY; } }); } r.bD('TruncateBasket', { exec: function (F) { if (F.basketFiles.length) F.fe('', F.lang.BasketTruncateConfirm, function () { F.basketFiles.length = 0; F.oW('requestSelectFolder', { folder: F.basket }); }); } }); r.bD('RemoveFileFromBasket', { exec: function (F) { var G = F.aG['filesview.filesview'][0].data().cG; if (G) F.fe('', F.lang.BasketRemoveConfirm.replace('%1', G.name), function () { for (var H = 0; H < F.basketFiles.length; H++) { var I = F.basketFiles[H]; if (G.isSameFile(I)) { F.basketFiles.splice(H, 1); break; } } F.oW('requestSelectFolder', { folder: F.basket }); }); } }); r.bD('OpenFileFolder', { exec: function (F) { var G = F.aG['filesview.filesview'][0].data().cG; if (G) F.oW('requestSelectFolder', { folder: G.folder }); } }); if (r.eU) r.gp('truncateBasket', { label: r.lang.BasketClear, command: 'TruncateBasket', group: 'folder' }); var y = [], z = r.aG['filesview.filesview'], A = []; for (var B = 0; B < z.length; B++) { z[B].on('beforeContextMenu', function (F) { if (!(F.data.folder instanceof a.aL.BasketFolder)) return; var G = F.data.bj; delete G.renameFile; delete G.deleteFile; G.mu = a.aS; G.hN = a.aS; for (var H = 0; H < A.length; H++) G[A[H]] = a.aS; }); z[B].on('beforeShowFolderFiles', function O(F) { if (!(F.data.folder instanceof a.aL.BasketFolder)) return; F.cancel(1); this.app.oW('requestRenderFiles', { files: r.basketFiles, fa: r.lang.BasketEmpty, eu: 1, folder: F.data.folder }); this.app.oW('requestRepaintFolder', F.data); C(this.app); D(this.app); var G = this.app.dh.fk; for (var H = 0; H < G.length; H++) { var I = this.app.document.getById(G[H].id), J = ['<span class="cke_toolgroup" id="basket">']; for (var K in this.app.bY._.items) { if (!this.app.bY._.items.hasOwnProperty(K)) continue; var L = r.bY._.items[K]; if (!L.mp[0].basketToolbar) continue; L = r.bY.create(K); var M = L.er(r, J), N = G[H].items.push(M) - 1; if (N > 0) { M.previous = G[H].items[N - 1]; M.previous.next = M; } if (!y[H]) y[H] = []; y[H].push(N); } J.push('</span>'); I.appendHtml(J.join('')); } this.on('beforeShowFolderFiles', function (P) { this.app.document.getById('basket').remove(); var Q = this.app.dh.fk; for (var R = 0; R < Q.length; R++) for (var S = 0; S < Q[R].items.length; S++) { if (y[R][S]) delete Q[R].items[S]; } P.aF(); }, null, null, 1); this.oW('successShowFolderFiles', F.data); this.oW('afterShowFolderFiles', F.data); }); } function C(F) { for (var G in F.plugins) { if (!F.plugins.hasOwnProperty(G)) continue; G = F.plugins[G]; if (!G.basketToolbar) continue; for (var H = 0; H < G.basketToolbar.length; H++) { var I = G.basketToolbar[H]; if (F.bY._.items[I[0]]) continue; var J = i.deepCopy(I[1]); if (!J.command) { var K = I[1].onClick, L = 'BasketToolbar_' + I[0]; F.bD('BasketToolbar_' + I[0], { exec: function (M) { K(M.cg); } }); J.command = L; } if (F.lang[J.label]) J.label = F.lang[J.label]; J.basketToolbar = 1; F.bY.add(I[0], CKFinder._.UI_BUTTON, J); } } }; function D(F) { if (!F.eU) return; for (var G in F.plugins) { if (!F.plugins.hasOwnProperty(G)) continue; G = F.plugins[G]; if (!G.basketFileContextMenu) continue; for (var H = 0; H < G.basketFileContextMenu.length; H++) { var I = G.basketFileContextMenu[H]; if (F._.iG[I[0]]) continue; var J = i.deepCopy(I[1]); if (!J.command) { var K = 'BasketContextMenu_' + I[0], L = I[1].onClick; F.bD('BasketContextMenu_' + I[0], { exec: function (M) { L(M.cg); } }); J.command = K; } if (F.lang[J.label]) J.label = F.lang[J.label]; F.gp(I[0], J); A.push(I[0]); } } }; }); } }); a.aL.BasketFolder = i.createClass({ $: function (r) { var s = this; a.aL.Folder.call(s, r, null, r.lang.BasketFolder); s.hasChildren = 0; s.acl = new a.aL.Acl('1111111'); s.isBasket = true; }, base: a.aL.Folder, ej: { createNewFolder: function () { }, getChildren: function (r) { r.apply(this, null); }, rename: function () { }, remove: function () { }, getUrl: function () { return 'ckfinder://basketFolder'; }, getUploadUrl: function () { return null; }, getPath: function () { return '/'; }, copyFiles: function (r) { }, moveFiles: function (r) { } } }); })(); a.rs = 0; a.sz = 1; a.sy = 2; a.ss = 3; (function () { function p(P) { return !!this._.tabs[P][0].$.offsetHeight; }; function q() { var T = this; var P = T._.gx, Q = T._.cU.length, R = i.indexOf(T._.cU, P) + Q; for (var S = R - 1; S > R - Q; S--) { if (p.call(T, T._.cU[S % Q])) return T._.cU[S % Q]; } return null; }; function r() { var T = this; var P = T._.gx, Q = T._.cU.length, R = i.indexOf(T._.cU, P); for (var S = R + 1; S < R + Q; S++) { if (p.call(T, T._.cU[S % Q])) return T._.cU[S % Q]; } return null; }; a.dialog = function (P, Q) { var R = a.dialog._.ev[Q]; R = i.extend(R(P), t); R = i.clone(R); R = new x(this, R); var S = a.document, T = P.theme.pu(P); this._ = { app: P, ax: T.ax, name: Q, hB: { width: 0, height: 0 }, size: { width: 0, height: 0 }, gH: false, contents: {}, buttons: {}, iX: {}, tabs: {}, cU: [], gx: null, nM: null, gV: 0, qF: null, eC: false, eO: [], gu: 0, hasFocus: false }; this.bO = T.bO; this.bO.dialog.setStyles({ position: f.ie6Compat ? 'absolute' : 'fixed', top: 0, left: 0, visibility: 'hidden' }); a.event.call(this); this.dg = R = a.oW('dialogDefinition', { name: Q, dg: R }, P).dg; if (R.onLoad) this.on('load', R.onLoad); if (R.onShow) this.on('show', R.onShow); if (R.onHide) this.on('hide', R.onHide); if (R.onOk) this.on('ok', function (aD) { if (R.onOk.call(this, aD) === false) aD.data.hide = false; }); if (R.onCancel) this.on('cancel', function (aD) { if (R.onCancel.call(this, aD) === false) aD.data.hide = false; }); var U = this, V = function (aD) { var aP = U._.contents, bV = false; for (var eN in aP) for (var gB in aP[eN]) { bV = aD.call(this, aP[eN][gB]); if (bV) return; } }; this.on('ok', function (aD) { V(function (aP) { if (aP.validate) { var bV = aP.validate(this); if (typeof bV == 'string') { P.document.getWindow().$.alert(bV); bV = false; } if (bV === false) { if (aP.select) aP.select(); else aP.focus(); aD.data.hide = false; aD.stop(); return true; } } }); }, this, null, 0); this.on('cancel', function (aD) { V(function (aP) { if (aP.isChanged()) { if (!P.document.getWindow().$.confirm(P.lang.common.confirmCancel)) aD.data.hide = false; return true; } }); }, this, null, 0); this.bO.close.on('click', function (aD) { if (this.oW('cancel', { hide: true }).hide !== false) this.hide(); }, this); function W(aD) { var aP = U._.eO, bV = aD ? 1 : -1; if (aP.length < 1) return; var eN = (U._.gu + bV + aP.length) % aP.length, gB = eN; while (!aP[gB].fM()) { gB = (gB + bV + aP.length) % aP.length; if (gB == eN) break; } aP[gB].focus(); if (aP[gB].type == 'text') aP[gB].select(); }; var X; function Y(aD) { if (U != a.dialog._.dL) return; var aP = aD.data.db(); X = 0; if (aP == 9 || aP == a.dy + 9) { var bV = aP == a.dy + 9; if (U._.eC) { var eN = bV ? q.call(U) : r.call(U); U.selectPage(eN); U._.tabs[eN][0].focus(); } else W(!bV); X = 1; } else if (aP == a.eJ + 121 && !U._.eC) { U._.eC = true; U._.tabs[U._.gx][0].focus(); X = 1; } else if ((aP == 37 || aP == 39) && U._.eC) { eN = aP == 37 ? q.call(U) : r.call(U); U.selectPage(eN); U._.tabs[eN][0].focus(); X = 1; } if (X) { aD.stop(); aD.data.preventDefault(); } }; function Z(aD) { X && aD.data.preventDefault(); }; this.on('show', function () { a.document.on('keydown', Y, this, null, 0); if (f.opera || f.gecko && f.mac) a.document.on('keypress', Z, this); if (f.ie6Compat) { var aD = C.aC(0).getFrameDocument(); aD.on('keydown', Y, this, null, 0); } }); this.on('hide', function () { a.document.aF('keydown', Y); if (f.opera || f.gecko && f.mac) a.document.aF('keypress', Z); }); this.on('iframeAdded', function (aD) { var aP = new j(aD.data.iframe.$.contentWindow.document); aP.on('keydown', Y, this, null, 0); }); this.on('show', function () { if (!this._.hasFocus) { this._.gu = -1; W(true); } }, this, null, 4294967295); if (f.ie6Compat) this.on('load', function (aD) { var aP = this.getElement(), bV = aP.getFirst(); bV.remove(); bV.appendTo(aP); }, this); z(this); A(this); this.bO.title.setText(R.title); for (var aa = 0; aa < R.contents.length; aa++) this.addPage(R.contents[aa]); var aT = /cke_dialog_tab(\s|$|_)/, bm = /cke_dialog_tab(\s|$)/; this.bO.tabs.on('click', function (aD) { var dX = this; var aP = aD.data.bK(), bV = aP, eN, gB; if (!(aT.test(aP.$.className) || aP.getName() == 'a')) return; eN = aP.$.id.substr(0, aP.$.id.lastIndexOf('_')); dX.selectPage(eN); if (dX._.eC) { dX._.eC = false; dX._.gu = -1; W(true); } aD.data.preventDefault(); }, this); var aA = [], au = a.dialog._.gv.hbox.dQ(this, { type: 'hbox', className: 'cke_dialog_footer_buttons', widths: [], children: R.buttons }, aA).aC(); this.bO.footer.setHtml(aA.join('')); for (aa = 0; aa < au.length; aa++) this._.buttons[au[aa].id] = au[aa]; a.skins.load(P, 'dialog'); }; function s(P, Q, R) { this.ax = Q; this.cQ = R; this.fM = function () { return !Q.getAttribute('disabled') && Q.isVisible(); }; this.focus = function () { P._.gu = this.cQ; this.ax.focus(); }; Q.on('keydown', function (S) { if (S.data.db() in { 32: 1, 13: 1 }) this.oW('click'); }); Q.on('focus', function () { this.oW('mouseover'); }); Q.on('blur', function () { this.oW('mouseout'); }); }; a.dialog.prototype = { resize: (function () { return function (P, Q) { var R = this; if (R._.hB && R._.hB.width == P && R._.hB.height == Q) return; a.dialog.oW('resize', { dialog: R, skin: R._.app.gd, width: P, height: Q }, R._.app); R._.hB = { width: P, height: Q }; R._.gH = true; }; })(), hR: function () { var R = this; if (!R._.gH) return R._.size; var P = R._.ax.getFirst(), Q = R._.size = { width: P.$.offsetWidth || 0, height: P.$.offsetHeight || 0 }; R._.gH = !Q.width || !Q.height; return Q; }, mn: function () { var P = this.hR(); P.height = P.height - (this.bO.title.$.offsetHeight || 0) - (this.bO.footer.$.offsetHeight || 0); return P; }, move: (function () { var P; return function (Q, R) { var U = this; var S = U._.ax.getFirst(); if (P === undefined) P = S.getComputedStyle('position') == 'fixed'; if (P && U._.position && U._.position.x == Q && U._.position.y == R) return; U._.position = { x: Q, y: R }; if (!P) { var T = a.document.getWindow().hV(); Q += T.x; R += T.y; } S.setStyles({ left: (Q > 0 ? Q : 0) + 'px', top: (R > 0 ? R : 0) + 'px' }); }; })(), gz: function () { return i.extend({}, this._.position); }, show: function () { var P = this._.app; if (P.mode == 'qt' && g) { var Q = P.getSelection(); Q && Q.up(); } var R = this._.ax, S = this.dg; if (!(R.getParent() && R.getParent().equals(a.document.bH()))) R.appendTo(a.document.bH()); else return; if (f.gecko && f.version < 10900) { var T = this.bO.dialog; T.setStyle('position', 'absolute'); setTimeout(function () { T.setStyle('position', 'fixed'); }, 0); } this.resize(S.minWidth, S.minHeight); this.selectPage(this.dg.contents[0].id); this.reset(); if (a.dialog._.gw === null) a.dialog._.gw = this._.app.config.baseFloatZIndex; this._.ax.getFirst().setStyle('z-index', a.dialog._.gw += 10); if (a.dialog._.dL === null) { a.dialog._.dL = this; this._.ep = null; D(this._.app); R.on('keydown', G); R.on(f.opera ? 'keypress' : 'keyup', H); for (var U in { keyup: 1, keydown: 1, keypress: 1 }) R.on(U, N); } else { this._.ep = a.dialog._.dL; var V = this._.ep.getElement().getFirst(); V.$.style.zIndex -= Math.floor(this._.app.config.baseFloatZIndex / 2); a.dialog._.dL = this; } I(this, this, '\x1b', null, function () { this.getButton('cancel') && this.getButton('cancel').click(); }); this._.hasFocus = false; i.setTimeout(function () { var W = a.document.getWindow().eR(), X = this.hR(); this.move((W.width - S.minWidth) / 2, (W.height - X.height) / 2); this.bO.dialog.setStyle('visibility', ''); this.cr('load', {}); this.oW('show', {}); this._.app.oW('dialogShow', this); this.gh(function (Y) { Y.jW && Y.jW(); }); }, 100, this); }, gh: function (P) { var S = this; for (var Q in S._.contents) for (var R in S._.contents[Q]) P(S._.contents[Q][R]); return S; }, reset: (function () { var P = function (Q) { if (Q.reset) Q.reset(); }; return function () { this.gh(P); return this; }; })(), rN: function () { var P = arguments; this.gh(function (Q) { if (Q.qi) Q.qi.apply(Q, P); }); }, sI: function () { var P = arguments; this.gh(function (Q) { if (Q.rx) Q.rx.apply(Q, P); }); }, hide: function () { this.oW('hide', {}); this._.app.oW('dialogHide', this); var P = this._.ax; if (!P.getParent()) return; P.remove(); this.bO.dialog.setStyle('visibility', 'hidden'); J(this); if (!this._.ep) E(); else { var Q = this._.ep.getElement().getFirst(); Q.setStyle('z-index', parseInt(Q.$.style.zIndex, 10) + Math.floor(this._.app.config.baseFloatZIndex / 2)); } a.dialog._.dL = this._.ep; if (!this._.ep) { a.dialog._.gw = null; P.aF('keydown', G); P.aF(f.opera ? 'keypress' : 'keyup', H); for (var R in { keyup: 1, keydown: 1, keypress: 1 }) P.aF(R, N); var S = this._.app; S.focus(); if (S.mode == 'qt' && g) { var T = S.getSelection(); T && T.sd(true); } } else a.dialog._.gw -= 10; this.gh(function (U) { U.ki && U.ki(); }); }, addPage: function (P) { var Z = this; var Q = [], R = P.label ? ' title="' + i.htmlEncode(P.label) + '"' : '', S = P.elements, T = a.dialog._.gv.vbox.dQ(Z, { type: 'vbox', className: 'cke_dialog_page_contents', children: P.elements, expand: !!P.expand, padding: P.padding, style: P.style || 'width: 100%; height: 100%;' }, Q), U = k.et(Q.join(''), a.document), V = k.et(['<a class="cke_dialog_tab"', Z._.gV > 0 ? ' cke_last' : 'cke_first', R, !!P.hidden ? ' style="display:none"' : '', ' id="', P.id + '_', i.getNextNumber(), '" href="javascript:void(0)"', ' hp="true">', P.label, '</a>'].join(''), a.document); if (Z._.gV === 0) Z.bO.dialog.addClass('cke_single_page'); else Z.bO.dialog.removeClass('cke_single_page'); Z._.tabs[P.id] = [V, U]; Z._.cU.push(P.id); Z._.gV++; Z._.qF = V; var W = Z._.contents[P.id] = {}, X, Y = T.aC(); while (X = Y.shift()) { W[X.id] = X; if (typeof X.aC == 'function') Y.push.apply(Y, X.aC()); } U.setAttribute('name', P.id); U.appendTo(Z.bO.contents); V.unselectable(); Z.bO.tabs.append(V); if (P.accessKey) { I(Z, Z, 'bP+' + P.accessKey, L, K); Z._.iX['bP+' + P.accessKey] = P.id; } }, selectPage: function (P) { var U = this; for (var Q in U._.tabs) { var R = U._.tabs[Q][0], S = U._.tabs[Q][1]; if (Q != P) { R.removeClass('cke_dialog_tab_selected'); S.hide(); } } var T = U._.tabs[P]; T[0].addClass('cke_dialog_tab_selected'); T[1].show(); U._.gx = P; U._.nM = i.indexOf(U._.cU, P); }, vJ: function (P) { var Q = this._.tabs[P] && this._.tabs[P][0]; if (!Q) return; Q.hide(); }, showPage: function (P) { var Q = this._.tabs[P] && this._.tabs[P][0]; if (!Q) return; Q.show(); }, getElement: function () { return this._.ax; }, getName: function () { return this._.name; }, getContentElement: function (P, Q) { return this._.contents[P][Q]; }, getValueOf: function (P, Q) { return this.getContentElement(P, Q).getValue(); }, setValueOf: function (P, Q, R) { return this.getContentElement(P, Q).setValue(R); }, getButton: function (P) { return this._.buttons[P]; }, click: function (P) { return this._.buttons[P].click(); }, disableButton: function (P) { return this._.buttons[P].disable(); }, enableButton: function (P) { return this._.buttons[P].enable(); }, vj: function () { return this._.gV; }, getParentApi: function () { return this._.app.cg; }, eY: function () { return this._.app; }, rf: function () { return this.eY().getSelection().rf(); }, tQ: function (P, Q) { var S = this; if (typeof Q == 'undefined') { Q = S._.eO.length; S._.eO.push(new s(S, P, Q)); } else { S._.eO.splice(Q, 0, new s(S, P, Q)); for (var R = Q + 1; R < S._.eO.length; R++) S._.eO[R].cQ++; } }, setTitle: function (P) { this.bO.title.setText(P); } }; i.extend(a.dialog, { add: function (P, Q) { if (!this._.ev[P] || typeof Q == 'function') this._.ev[P] = Q; }, exists: function (P) { return !!this._.ev[P]; }, getCurrent: function () { return a.dialog._.dL; }, okButton: (function () { var P = function (Q, R) { R = R || {}; return i.extend({ id: 'ok', type: 'button', label: Q.lang.common.ok, 'class': 'cke_dialog_ui_button_ok', onClick: function (S) { var T = S.data.dialog; if (T.oW('ok', { hide: true }).hide !== false) T.hide(); } }, R, true); }; P.type = 'button'; P.override = function (Q) { return i.extend(function (R) { return P(R, Q); }, { type: 'button' }, true); }; return P; })(), cancelButton: (function () { var P = function (Q, R) { R = R || {}; return i.extend({ id: 'cancel', type: 'button', label: Q.lang.common.cancel, 'class': 'cke_dialog_ui_button_cancel', onClick: function (S) { var T = S.data.dialog; if (T.oW('cancel', { hide: true }).hide !== false) T.hide(); } }, R, true); }; P.type = 'button'; P.override = function (Q) { return i.extend(function (R) { return P(R, Q); }, { type: 'button' }, true); }; return P; })(), addUIElement: function (P, Q) { this._.gv[P] = Q; } }); a.dialog._ = { gv: {}, ev: {}, dL: null, gw: null }; a.event.du(a.dialog); a.event.du(a.dialog.prototype, true); var t = { jy: a.rs, minWidth: 600, minHeight: 400, buttons: [a.dialog.okButton, a.dialog.cancelButton] }, u = function (P, Q, R) { for (var S = 0, T; T = P[S]; S++) { if (T.id == Q) return T; if (R && T[R]) { var U = u(T[R], Q, R); if (U) return U; } } return null; }, v = function (P, Q, R, S, T) { if (R) { for (var U = 0, V; V = P[U]; U++) { if (V.id == R) { P.splice(U, 0, Q); return Q; } if (S && V[S]) { var W = v(V[S], Q, R, S, true); if (W) return W; } } if (T) return null; } P.push(Q); return Q; }, w = function (P, Q, R) { for (var S = 0, T; T = P[S]; S++) { if (T.id == Q) return P.splice(S, 1); if (R && T[R]) { var U = w(T[R], Q, R); if (U) return U; } } return null; }, x = function (P, Q) { this.dialog = P; var R = Q.contents; for (var S = 0, T; T = R[S]; S++) R[S] = new y(P, T); i.extend(this, Q); }; x.prototype = { vz: function (P) { return u(this.contents, P); }, getButton: function (P) { return u(this.buttons, P); }, uh: function (P, Q) { return v(this.contents, P, Q); }, qW: function (P, Q) { return v(this.buttons, P, Q); }, uP: function (P) { w(this.contents, P); }, uO: function (P) { w(this.buttons, P); } }; function y(P, Q) { this._ = { dialog: P }; i.extend(this, Q); }; y.prototype = { eB: function (P) { return u(this.elements, P, 'children'); }, add: function (P, Q) { return v(this.elements, P, Q, 'children'); }, remove: function (P) { w(this.elements, P, 'children'); } }; function z(P) { var Q = null, R = null, S = P.getElement().getFirst(), T = P.eY(), U = T.config.dialog_magnetDistance, V = T.skin.margins || [0, 0, 0, 0]; if (typeof U == 'undefined') U = 20; function W(Y) { var Z = P.hR(), aa = a.document.getWindow().eR(), aT = Y.data.$.screenX, bm = Y.data.$.screenY, aA = aT - Q.x, au = bm - Q.y, aD, aP; Q = { x: aT, y: bm }; R.x += aA; R.y += au; if (R.x + V[3] < U) aD = -V[3]; else if (R.x - V[1] > aa.width - Z.width - U) aD = aa.width - Z.width + V[1]; else aD = R.x; if (R.y + V[0] < U) aP = -V[0]; else if (R.y - V[2] > aa.height - Z.height - U) aP = aa.height - Z.height + V[2]; else aP = R.y; P.move(aD, aP); Y.data.preventDefault(); }; function X(Y) { a.document.aF('mousemove', W); a.document.aF('mouseup', X); if (f.ie6Compat) { var Z = C.aC(0).getFrameDocument(); Z.aF('mousemove', W); Z.aF('mouseup', X); } }; P.bO.title.on('mousedown', function (Y) { P._.gH = true; Q = { x: Y.data.$.screenX, y: Y.data.$.screenY }; a.document.on('mousemove', W); a.document.on('mouseup', X); R = P.gz(); if (f.ie6Compat) { var Z = C.aC(0).getFrameDocument(); Z.on('mousemove', W); Z.on('mouseup', X); } Y.data.preventDefault(); }, P); }; function A(P) { var Q = P.dg, R = Q.minWidth || 0, S = Q.minHeight || 0, T = Q.jy, U = P.eY().skin.margins || [0, 0, 0, 0]; function V(aP, bV) { aP.y += bV; }; function W(aP, bV) { aP.eS += bV; }; function X(aP, bV) { aP.bW += bV; }; function Y(aP, bV) { aP.x += bV; }; var Z = null, aa = null, aT = P._.app.config.ux, bm = ['tl', 't', 'tr', 'l', 'r', 'bl', 'b', 'br']; function aA(aP) { var bV = aP.jO.fU, eN = P.hR(); aa = P.gz(); i.extend(aa, { eS: aa.x + eN.width, bW: aa.y + eN.height }); Z = { x: aP.data.$.screenX, y: aP.data.$.screenY }; a.document.on('mousemove', au, P, { fU: bV }); a.document.on('mouseup', aD, P, { fU: bV }); if (f.ie6Compat) { var gB = C.aC(0).getFrameDocument(); gB.on('mousemove', au, P, { fU: bV }); gB.on('mouseup', aD, P, { fU: bV }); } aP.data.preventDefault(); }; function au(aP) { var bV = aP.data.$.screenX, eN = aP.data.$.screenY, gB = bV - Z.x, dX = eN - Z.y, gs = a.document.getWindow().eR(), am = aP.jO.fU; if (am.search('t') != -1) V(aa, dX); if (am.search('l') != -1) Y(aa, gB); if (am.search('b') != -1) X(aa, dX); if (am.search('r') != -1) W(aa, gB); Z = { x: bV, y: eN }; var gP, gR, pw, aq; if (aa.x + U[3] < aT) gP = -U[3]; else if (am.search('l') != -1 && aa.eS - aa.x < R + aT) gP = aa.eS - R; else gP = aa.x; if (aa.y + U[0] < aT) gR = -U[0]; else if (am.search('t') != -1 && aa.bW - aa.y < S + aT) gR = aa.bW - S; else gR = aa.y; if (aa.eS - U[1] > gs.width - aT) pw = gs.width + U[1]; else if (am.search('r') != -1 && aa.eS - aa.x < R + aT) pw = aa.x + R; else pw = aa.eS; if (aa.bW - U[2] > gs.height - aT) aq = gs.height + U[2]; else if (am.search('b') != -1 && aa.bW - aa.y < S + aT) aq = aa.y + S; else aq = aa.bW; P.move(gP, gR); P.resize(pw - gP, aq - gR); aP.data.preventDefault(); }; function aD(aP) { a.document.aF('mouseup', aD); a.document.aF('mousemove', au); if (f.ie6Compat) { var bV = C.aC(0).getFrameDocument(); bV.aF('mouseup', aD); bV.aF('mousemove', au); } }; }; var B, C, D = function (P) { var Q = a.document.getWindow(); if (!C) { var R = P.config.so || 'white', S = ['<div style="position: ', f.ie6Compat ? 'absolute' : 'fixed', '; z-index: ', P.config.baseFloatZIndex, '; top: 0px; left: 0px; ', !f.ie6Compat ? 'background-color: ' + R : '', '" id="cke_dialog_background_cover">']; if (f.ie6Compat) { var T = f.isCustomDomain(), U = "<html><body style=\\'background-color:" + R + ";\\'></body></html>"; S.push('<iframe hp="true" frameborder="0" id="cke_dialog_background_iframe" src="javascript:'); S.push('void((function(){document.open();' + (T ? "document.domain='" + document.domain + "';" : '') + "document.write( '" + U + "' );" + 'document.close();' + '})())'); S.push('" style="position:absolute;left:0;top:0;width:100%;height: 100%;progid:DXImageTransform.Microsoft.Alpha(opacity=0)"></iframe>'); } S.push('</div>'); C = k.et(S.join(''), a.document); } var V = C, W = function () { var aa = Q.eR(); V.setStyles({ width: aa.width + 'px', height: aa.height + 'px' }); }, X = function () { var aa = Q.hV(), aT = a.dialog._.dL; V.setStyles({ left: aa.x + 'px', top: aa.y + 'px' }); do { var bm = aT.gz(); aT.move(bm.x, bm.y); } while (aT = aT._.ep); }; B = W; Q.on('resize', W); W(); if (f.ie6Compat) { var Y = function () { X(); arguments.callee.lw.apply(this, arguments); }; Q.$.setTimeout(function () { Y.lw = window.onscroll || (function () { }); window.onscroll = Y; }, 0); X(); } var Z = P.config.dialog_backgroundCoverOpacity; V.setOpacity(typeof Z != 'undefined' ? Z : 0.5); V.appendTo(a.document.bH()); }, E = function () { if (!C) return; var P = a.document.getWindow(); C.remove(); P.aF('resize', B); if (f.ie6Compat) P.$.setTimeout(function () { var Q = window.onscroll && window.onscroll.lw; window.onscroll = Q || null; }, 0); B = null; }, F = {}, G = function (P) { var Q = P.data.$.ctrlKey || P.data.$.metaKey, R = P.data.$.altKey, S = P.data.$.shiftKey, T = String.fromCharCode(P.data.$.keyCode), U = F[(Q ? 'bP+' : '') + (R ? 'eJ+' : '') + (S ? 'dy+' : '') + T]; if (!U || !U.length) return; U = U[U.length - 1]; U.keydown && U.keydown.call(U.bf, U.dialog, U.iK); P.data.preventDefault(); }, H = function (P) { var Q = P.data.$.ctrlKey || P.data.$.metaKey, R = P.data.$.altKey, S = P.data.$.shiftKey, T = String.fromCharCode(P.data.$.keyCode), U = F[(Q ? 'bP+' : '') + (R ? 'eJ+' : '') + (S ? 'dy+' : '') + T]; if (!U || !U.length) return; U = U[U.length - 1]; if (U.keyup) { U.keyup.call(U.bf, U.dialog, U.iK); P.data.preventDefault(); } }, I = function (P, Q, R, S, T) { var U = F[R] || (F[R] = []); U.push({ bf: P, dialog: Q, iK: R, keyup: T || P.eZ, keydown: S || P.iU }); }, J = function (P) { for (var Q in F) { var R = F[Q]; for (var S = R.length - 1; S >= 0; S--) { if (R[S].dialog == P || R[S].bf == P) R.splice(S, 1); } if (R.length === 0) delete F[Q]; } }, K = function (P, Q) { if (P._.iX[Q]) P.selectPage(P._.iX[Q]); }, L = function (P, Q) { }, M = { 27: 1, 13: 1 }, N = function (P) { if (P.data.db() in M) P.data.stopPropagation(); }; (function () { n.dialog = { bf: function (P, Q, R, S, T, U, V) { if (arguments.length < 4) return; var W = (S.call ? S(Q) : S) || 'div', X = ['<', W, ' '], Y = (T && T.call ? T(Q) : T) || {}, Z = (U && U.call ? U(Q) : U) || {}, aa = (V && V.call ? V(P, Q) : V) || '', aT = this.oJ = Z.id || i.getNextNumber() + '_uiElement', bm = this.id = Q.id, aA; Z.id = aT; var au = {}; if (Q.type) au['cke_dialog_ui_' + Q.type] = 1; if (Q.className) au[Q.className] = 1; var aD = Z['class'] && Z['class'].split ? Z['class'].split(' ') : []; for (aA = 0; aA < aD.length; aA++) { if (aD[aA]) au[aD[aA]] = 1; } var aP = []; for (aA in au) aP.push(aA); Z['class'] = aP.join(' '); if (Q.title) Z.title = Q.title; var bV = (Q.style || '').split(';'); for (aA in Y) bV.push(aA + ':' + Y[aA]); if (Q.hidden) bV.push('display:none'); for (aA = bV.length - 1; aA >= 0; aA--) { if (bV[aA] === '') bV.splice(aA, 1); } if (bV.length > 0) Z.style = (Z.style ? Z.style + '; ' : '') + bV.join('; '); for (aA in Z) X.push(aA + '="' + i.htmlEncode(Z[aA]) + '" '); X.push('>', aa, '</', W, '>'); R.push(X.join('')); (this._ || (this._ = {})).dialog = P; if (typeof Q.isChanged == 'boolean') this.isChanged = function () { return Q.isChanged; }; if (typeof Q.isChanged == 'function') this.isChanged = Q.isChanged; a.event.du(this); this.nc(Q); if (this.eZ && this.iU && Q.accessKey) I(this, P, 'bP+' + Q.accessKey); var eN = this; P.on('load', function () { if (eN.getInputElement()) eN.getInputElement().on('focus', function () { P._.eC = false; P._.hasFocus = true; eN.oW('focus'); }, eN); }); if (this.eA) { this.cQ = P._.eO.push(this) - 1; this.on('focus', function () { P._.gu = eN.cQ; }); } i.extend(this, Q); }, hbox: function (P, Q, R, S, T) { if (arguments.length < 4) return; this._ || (this._ = {}); var U = this._.children = Q, V = T && T.widths || null, W = T && T.height || null, X = {}, Y, Z = function () { var aa = ['<tbody><tr class="cke_dialog_ui_hbox">']; for (Y = 0; Y < R.length; Y++) { var aT = 'cke_dialog_ui_hbox_child', bm = []; if (Y === 0) aT = 'cke_dialog_ui_hbox_first'; if (Y == R.length - 1) aT = 'cke_dialog_ui_hbox_last'; aa.push('<td class="', aT, '" '); if (V) { if (V[Y]) bm.push('width:' + i.cssLength(V[Y])); } else bm.push('width:' + Math.floor(100 / R.length) + '%'); if (W) bm.push('height:' + i.cssLength(W)); if (T && T.padding != undefined) bm.push('padding:' + i.cssLength(T.padding)); if (bm.length > 0) aa.push('style="' + bm.join('; ') + '" '); aa.push('>', R[Y], '</td>'); } aa.push('</tr></tbody>'); return aa.join(''); }; n.dialog.bf.call(this, P, T || { type: 'hbox' }, S, 'table', X, T && T.align && { align: T.align } || null, Z); }, vbox: function (P, Q, R, S, T) { if (arguments.length < 3) return; this._ || (this._ = {}); var U = this._.children = Q, V = T && T.width || null, W = T && T.vY || null, X = function () { var Y = ['<table cellspacing="0" border="0" ']; Y.push('style="'); if (T && T.expand) Y.push('height:100%;'); Y.push('width:' + i.cssLength(V || '100%'), ';'); Y.push('"'); Y.push('align="', i.htmlEncode(T && T.align || (P.eY().lang.dir == 'ltr' ? 'left' : 'right')), '" '); Y.push('><tbody>'); for (var Z = 0; Z < R.length; Z++) { var aa = []; Y.push('<tr><td '); if (V) aa.push('width:' + i.cssLength(V || '100%')); if (W) aa.push('height:' + i.cssLength(W[Z])); else if (T && T.expand) aa.push('height:' + Math.floor(100 / R.length) + '%'); if (T && T.padding != undefined) aa.push('padding:' + i.cssLength(T.padding)); if (aa.length > 0) Y.push('style="', aa.join('; '), '" '); Y.push(' class="cke_dialog_ui_vbox_child">', R[Z], '</td></tr>'); } Y.push('</tbody></table>'); return Y.join(''); }; n.dialog.bf.call(this, P, T || { type: 'vbox' }, S, 'div', null, null, X); } }; })(); n.dialog.bf.prototype = { getElement: function () { return a.document.getById(this.oJ); }, getInputElement: function () { return this.getElement(); }, getDialog: function () { return this._.dialog; }, setValue: function (P) { this.getInputElement().setValue(P); this.oW('change', { value: P }); return this; }, getValue: function () { return this.getInputElement().getValue(); }, isChanged: function () { return false; }, selectParentTab: function () { var S = this; var P = S.getInputElement(), Q = P, R; while ((Q = Q.getParent()) && Q.$.className.search('cke_dialog_page_contents') == -1) { } if (!Q) return S; R = Q.getAttribute('name'); if (S._.dialog._.gx != R) S._.dialog.selectPage(R); return S; }, focus: function () { this.selectParentTab().getInputElement().focus(); return this; }, nc: function (P) { var Q = /^on([A-Z]\w+)/, R, S = function (U, V, W, X) { V.on('load', function () { U.getInputElement().on(W, X, U); }); }; for (var T in P) { if (!(R = T.match(Q))) continue; if (this.dm[T]) this.dm[T].call(this, this._.dialog, P[T]); else S(this, this._.dialog, R[1].toLowerCase(), P[T]); } return this; }, dm: { onLoad: function (P, Q) { P.on('load', Q, this); }, onShow: function (P, Q) { P.on('show', Q, this); }, onHide: function (P, Q) { P.on('hide', Q, this); } }, iU: function (P, Q) { this.focus(); }, eZ: function (P, Q) { }, disable: function () { var P = this.getInputElement(); P.setAttribute('disabled', 'true'); P.addClass('cke_disabled'); }, enable: function () { var P = this.getInputElement(); P.removeAttribute('disabled'); P.removeClass('cke_disabled'); }, isEnabled: function () { return !this.getInputElement().getAttribute('disabled'); }, isVisible: function () { return this.getInputElement().isVisible(); }, fM: function () { if (!this.isEnabled() || !this.isVisible()) return false; return true; } }; n.dialog.hbox.prototype = i.extend(new n.dialog.bf(), { aC: function (P) { var Q = this; if (arguments.length < 1) return Q._.children.concat(); if (!P.splice) P = [P]; if (P.length < 2) return Q._.children[P[0]]; else return Q._.children[P[0]] && Q._.children[P[0]].aC ? Q._.children[P[0]].aC(P.slice(1, P.length)) : null; } }, true); n.dialog.vbox.prototype = new n.dialog.hbox(); (function () { var P = { dQ: function (Q, R, S) { var T = R.children, U, V = [], W = []; for (var X = 0; X < T.length && (U = T[X]); X++) { var Y = []; V.push(Y); W.push(a.dialog._.gv[U.type].dQ(Q, U, Y)); } return new n.dialog[R.type](Q, W, V, S, R); } }; a.dialog.addUIElement('hbox', P); a.dialog.addUIElement('vbox', P); })(); a.rB = function (P) { this.ry = P; }; a.rB.prototype = { exec: function (P) { P.openDialog(this.ry); }, sG: false }; (function () { var P = /^([a]|[^a])+$/, Q = /^\d*$/, R = /^\d*(?:\.\d+)?$/; a.sg = 1; a.jb = 2; a.dialog.validate = { functions: function () { return function () { var Y = this; var S = Y && Y.getValue ? Y.getValue() : arguments[0], T = undefined, U = a.jb, V = [], W; for (W = 0; W < arguments.length; W++) { if (typeof arguments[W] == 'function') V.push(arguments[W]); else break; } if (W < arguments.length && typeof arguments[W] == 'string') { T = arguments[W]; W++; } if (W < arguments.length && typeof arguments[W] == 'number') U = arguments[W]; var X = U == a.jb ? true : false; for (W = 0; W < V.length; W++) { if (U == a.jb) X = X && V[W](S); else X = X || V[W](S); } if (!X) { if (T !== undefined) alert(T); if (Y && (Y.select || Y.focus)) Y.select || Y.focus(); return false; } return true; }; }, regex: function (S, T) { return function () { var V = this; var U = V && V.getValue ? V.getValue() : arguments[0]; if (!S.test(U)) { if (T !== undefined) alert(T); if (V && (V.select || V.focus)) if (V.select) V.select(); else V.focus(); return false; } return true; }; }, notEmpty: function (S) { return this.regex(P, S); }, integer: function (S) { return this.regex(Q, S); }, number: function (S) { return this.regex(R, S); }, equals: function (S, T) { return this.functions(function (U) { return U == S; }, T); }, notEqual: function (S, T) { return this.functions(function (U) { return U != S; }, T); } }; })(); function O(P, Q) { var R = function () { T(this); Q(this); }, S = function () { T(this); }, T = function (U) { U.aF('ok', R); U.aF('cancel', S); }; P.on('ok', R); P.on('cancel', S); }; i.extend(a.application.prototype, { openDialog: function (P, Q, R) { var S = a.dialog._.ev[P]; if (typeof S == 'function') { var T = this._.oB || (this._.oB = {}), U = T[P] || (T[P] = new a.dialog(this, P)); Q && Q.call(U, U); U.show(); return U; } else if (S == 'failed') throw new Error('[CKFINDER.dialog.openDialog] Dialog "' + P + '" failed when loading dg.'); var V = a.document.bH(), W = V.$.style.cursor, X = this; V.setStyle('cursor', 'wait'); a.ec.load(a.getUrl(S), function () { if (typeof a.dialog._.ev[P] != 'function') a.dialog._.ev[P] = 'failed'; X.openDialog(P, Q); V.setStyle('cursor', W); }, null, null, R); return null; }, hs: function (P, Q, R, S) { var T = this; setTimeout(function () { T.cg.openDialog('Input', function (U) { U.show(); U.setTitle(P || T.lang.common.inputTitle); U.getContentElement('tab1', 'msg').getElement().setHtml(Q); U.getContentElement('tab1', 'input').setValue(R); O(U, function (W) { var X = W.getContentElement('tab1', 'input').getValue(); S(X); }); if (f.ie7Compat) { var V = U.mn(); U.resize(V.width, V.height); } }); }, 0); }, msgDialog: function (P, Q, R) { var S = this; setTimeout(function () { S.cg.openDialog('Msg', function (T) { T.show(); T.setTitle(P || S.lang.common.messageTitle); T.getContentElement('tab1', 'msg').getElement().setHtml(Q); R && O(T, function (V) { R(); }); if (f.ie7Compat) { var U = T.mn(); T.resize(U.width, U.height); } }); }, 0); }, fe: function (P, Q, R) { var S = this; setTimeout(function () { S.cg.openDialog('Confirm', function (T) { T.show(); T.setTitle(P || S.lang.common.confirmationTitle); T.getContentElement('tab1', 'msg').getElement().setHtml(Q); O(T, function (V) { R(); }); if (f.ie7Compat) { var U = T.mn(); T.resize(U.width, U.height); } }); }, 0); } }); m.add('dialog', { bM: ['dialogui'], onLoad: function () { a.dialog.add('Confirm', function (P) { return { title: P.lang.common.confirmationTitle, minWidth: 270, minHeight: 60, contents: [{ id: 'tab1', elements: [{ type: 'html', html: '', id: 'msg' }] }], buttons: [CKFinder.dialog.okButton, CKFinder.dialog.cancelButton] }; }); a.dialog.add('Msg', function (P) { return { title: P.lang.common.messageTitle, minWidth: 270, minHeight: 60, contents: [{ id: 'tab1', elements: [{ type: 'html', html: '', id: 'msg' }] }], buttons: [CKFinder.dialog.okButton] }; }); a.dialog.add('Input', function (P) { return { title: P.lang.common.inputTitle, minWidth: 270, minHeight: 60, contents: [{ id: 'tab1', elements: [{ type: 'html', html: '', id: 'msg' }, { type: 'text', id: 'input' }] }], buttons: [CKFinder.dialog.okButton, CKFinder.dialog.cancelButton] }; }); } }); })(); m.add('dialogui'); (function () { var p = function (w) { var z = this; z._ || (z._ = {}); z._['default'] = z._.hq = w['default'] || ''; var x = [z._]; for (var y = 1; y < arguments.length; y++) x.push(arguments[y]); x.push(true); i.extend.apply(i, x); return z._; }, q = { dQ: function (w, x, y) { return new n.dialog.ju(w, x, y); } }, r = { dQ: function (w, x, y) { return new n.dialog[x.type](w, x, y); } }, s = { isChanged: function () { return this.getValue() != this.lu(); }, reset: function () { this.setValue(this.lu()); }, jW: function () { this._.hq = this.getValue(); }, ki: function () { this._.hq = this._['default']; }, lu: function () { return this._.hq; } }, t = i.extend({}, n.dialog.bf.prototype.dm, { onChange: function (w, x) { if (!this._.pL) { w.on('load', function () { this.getInputElement().on('change', function () { this.oW('change', { value: this.getValue() }); }, this); }, this); this._.pL = true; } this.on('change', x); } }, true), u = /^on([A-Z]\w+)/, v = function (w) { for (var x in w) { if (u.test(x) || x == 'title' || x == 'type') delete w[x]; } return w; }; i.extend(n.dialog, { dD: function (w, x, y, z) { if (arguments.length < 4) return; var A = p.call(this, x); A.hz = i.getNextNumber() + '_label'; var B = this._.children = [], C = function () { var D = []; if (x.uC != 'horizontal') D.push('<div class="cke_dialog_ui_labeled_label" id="', A.hz, '" >', x.label, '</div>', '<div class="cke_dialog_ui_labeled_content">', z(w, x), '</div>'); else { var E = { type: 'hbox', widths: x.widths, padding: 0, children: [{ type: 'html', html: '<span class="cke_dialog_ui_labeled_label" id="' + A.hz + '">' + i.htmlEncode(x.label) + '</span>' }, { type: 'html', html: '<span class="cke_dialog_ui_labeled_content">' + z(w, x) + '</span>' }] }; a.dialog._.gv.hbox.dQ(w, E, D); } return D.join(''); }; n.dialog.bf.call(this, w, x, y, 'div', null, null, C); }, ju: function (w, x, y) { if (arguments.length < 3) return; p.call(this, x); var z = this._.le = i.getNextNumber() + '_textInput', A = { 'class': 'cke_dialog_ui_input_' + x.type, id: z, type: 'text' }, B; if (x.validate) this.validate = x.validate; if (x.maxLength) A.uy = x.maxLength; if (x.size) A.size = x.size; var C = this, D = false; w.on('load', function () { C.getInputElement().on('keydown', function (F) { if (F.data.db() == 13) D = true; }); C.getInputElement().on('keyup', function (F) { if (F.data.db() == 13 && D) { w.getButton('ok') && setTimeout(function () { w.getButton('ok').click(); }, 0); D = false; } }, null, null, 1000); }); var E = function () { var F = ['<div class="cke_dialog_ui_input_', x.type, '"']; if (x.width) F.push('style="width:' + x.width + '" '); F.push('><input '); for (var G in A) F.push(G + '="' + A[G] + '" '); F.push(' /></div>'); return F.join(''); }; n.dialog.dD.call(this, w, x, y, E); }, textarea: function (w, x, y) { if (arguments.length < 3) return; p.call(this, x); var z = this, A = this._.le = i.getNextNumber() + '_textarea', B = {}; if (x.validate) this.validate = x.validate; B.rows = x.rows || 5; B.cols = x.cols || 20; var C = function () { var D = ['<div class="cke_dialog_ui_input_textarea"><textarea class="cke_dialog_ui_input_textarea" id="', A, '" ']; for (var E in B) D.push(E + '="' + i.htmlEncode(B[E]) + '" '); D.push('>', i.htmlEncode(z._['default']), '</textarea></div>'); return D.join(''); }; n.dialog.dD.call(this, w, x, y, C); }, checkbox: function (w, x, y) { if (arguments.length < 3) return; var z = p.call(this, x, { 'default': !!x['default'] }); if (x.validate) this.validate = x.validate; var A = function () { var B = i.extend({}, x, { id: x.id ? x.id + '_checkbox' : i.getNextNumber() + '_checkbox' }, true), C = [], D = { 'class': 'cke_dialog_ui_checkbox_input', type: 'checkbox' }; v(B); if (x['default']) D.checked = 'checked'; z.checkbox = new n.dialog.bf(w, B, C, 'input', null, D); C.push(' <label for="', D.id, '">', i.htmlEncode(x.label), '</label>'); return C.join(''); }; n.dialog.bf.call(this, w, x, y, 'span', null, null, A); }, radio: function (w, x, y) { if (arguments.length < 3) return; p.call(this, x); if (!this._['default']) this._['default'] = this._.hq = x.items[0][1]; if (x.validate) this.validate = x.sh; var z = [], A = this, B = function () { var C = [], D = [], E = { 'class': 'cke_dialog_ui_radio_item' }, F = x.id ? x.id + '_radio' : i.getNextNumber() + '_radio'; for (var G = 0; G < x.items.length; G++) { var H = x.items[G], I = H[2] !== undefined ? H[2] : H[0], J = H[1] !== undefined ? H[1] : H[0], K = i.extend({}, x, { id: i.getNextNumber() + '_radio_input', title: null, type: null }, true), L = i.extend({}, K, { id: null, title: I }, true), M = { type: 'radio', 'class': 'cke_dialog_ui_radio_input', name: F, value: J }, N = []; if (A._['default'] == J) M.checked = 'checked'; v(K); v(L); z.push(new n.dialog.bf(w, K, N, 'input', null, M)); N.push(' '); new n.dialog.bf(w, L, N, 'label', null, { 'for': M.id }, H[0]); C.push(N.join('')); } new n.dialog.hbox(w, [], C, D); return D.join(''); }; n.dialog.dD.call(this, w, x, y, B); this._.children = z; }, button: function (w, x, y) { if (!arguments.length) return; if (typeof x == 'function') x = x(w.eY()); p.call(this, x, { disabled: x.disabled || false }); a.event.du(this); var z = this; w.on('load', function (B) { var C = this.getElement(); (function () { C.on('click', function (D) { z.oW('click', { dialog: z.getDialog() }); D.data.preventDefault(); }); })(); C.unselectable(); }, this); var A = i.extend({}, x); delete A.style; n.dialog.bf.call(this, w, A, y, 'a', null, { style: x.style, href: 'javascript:void(0)', title: x.label, hp: 'true', 'class': x['class'] }, '<span class="cke_dialog_ui_button">' + i.htmlEncode(x.label) + '</span>'); }, select: function (w, x, y) { if (arguments.length < 3) return; var z = p.call(this, x); if (x.validate) this.validate = x.validate; var A = function () { var B = i.extend({}, x, { id: x.id ? x.id + '_select' : i.getNextNumber() + '_select' }, true), C = [], D = [], E = { 'class': 'cke_dialog_ui_input_select' }; if (x.size != undefined) E.size = x.size; if (x.multiple != undefined) E.multiple = x.multiple; v(B); for (var F = 0, G; F < x.items.length && (G = x.items[F]); F++) D.push('<option value="', i.htmlEncode(G[1] !== undefined ? G[1] : G[0]), '" /> ', i.htmlEncode(G[0])); z.select = new n.dialog.bf(w, B, C, 'select', null, E, D.join('')); return C.join(''); }; n.dialog.dD.call(this, w, x, y, A); }, file: function (w, x, y) { if (arguments.length < 3) return; if (x['default'] === undefined) x['default'] = ''; var z = i.extend(p.call(this, x), { dg: x, buttons: [] }); if (x.validate) this.validate = x.validate; var A = function () { z.gL = i.getNextNumber() + '_fileInput'; var B = f.isCustomDomain(), C = ['<iframe frameborder="0" allowtransparency="0" class="cke_dialog_ui_input_file" id="', z.gL, '" title="', x.label, '" src="javascript:void(']; C.push(B ? "(function(){document.open();document.domain='" + document.domain + "';" + 'document.close();' + '})()' : '0'); C.push(')"></iframe>'); return C.join(''); }; w.on('load', function () { var B = a.document.getById(z.gL), C = B.getParent(); C.addClass('cke_dialog_ui_input_file'); }); n.dialog.dD.call(this, w, x, y, A); }, fileButton: function (w, x, y) { if (arguments.length < 3) return; var z = p.call(this, x), A = this; if (x.validate) this.validate = x.validate; var B = i.extend({}, x), C = B.onClick; B.className = (B.className ? B.className + ' ' : '') + 'cke_dialog_ui_button'; B.onClick = function (D) { var E = x['for']; if (!C || C.call(this, D) !== false) { w.getContentElement(E[0], E[1]).submit(); this.disable(); } }; w.on('load', function () { w.getContentElement(x['for'][0], x['for'][1])._.buttons.push(A); }); n.dialog.button.call(this, w, B, y); }, html: (function () { var w = /^\s*<[\w:]+\s+([^>]*)?>/, x = /^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/, y = /\/$/; return function (z, A, B) { if (arguments.length < 3) return; var C = [], D, E = A.html, F, G; if (E.charAt(0) != '<') E = '<span>' + E + '</span>'; if (A.focus) { var H = this.focus; this.focus = function () { H.call(this); A.focus.call(this); this.oW('focus'); }; if (A.fM) { var I = this.fM; this.fM = I; } this.eA = true; } n.dialog.bf.call(this, z, A, C, 'span', null, null, ''); D = C.join(''); F = D.match(w); G = E.match(x) || ['', '', '']; if (y.test(G[1])) { G[1] = G[1].slice(0, -1); G[2] = '/' + G[2]; } B.push([G[1], ' ', F[1] || '', G[2]].join('')); }; })() }, true); n.dialog.html.prototype = new n.dialog.bf(); n.dialog.dD.prototype = i.extend(new n.dialog.bf(), { rW: function (w) { var x = a.document.getById(this._.hz); if (x.iu() < 1) new h.text(w, a.document).appendTo(x); else x.aC(0).$.nodeValue = w; return this; }, vt: function () { var w = a.document.getById(this._.hz); if (!w || w.iu() < 1) return ''; else return w.aC(0).getText(); }, dm: t }, true); n.dialog.button.prototype = i.extend(new n.dialog.bf(), { click: function () { var w = this; if (!w._.disabled) return w.oW('click', { dialog: w._.dialog }); w.getElement().$.blur(); return false; }, enable: function () { this._.disabled = false; var w = this.getElement(); w && w.removeClass('disabled'); }, disable: function () { this._.disabled = true; this.getElement().addClass('disabled'); }, isVisible: function () { return this.getElement().getFirst().isVisible(); }, isEnabled: function () { return !this._.disabled; }, dm: i.extend({}, n.dialog.bf.prototype.dm, { onClick: function (w, x) { this.on('click', x); } }, true), eZ: function () { this.click(); }, iU: function () { this.focus(); }, eA: true }, true); n.dialog.ju.prototype = i.extend(new n.dialog.dD(), { getInputElement: function () { return a.document.getById(this._.le); }, focus: function () { var w = this.selectParentTab(); setTimeout(function () { var x = w.getInputElement(); x && x.$.focus(); }, 0); }, select: function () { var w = this.selectParentTab(); setTimeout(function () { var x = w.getInputElement(); if (x) { x.$.focus(); x.$.select(); } }, 0); }, eZ: function () { this.select(); }, setValue: function (w) { w = w !== null ? w : ''; return n.dialog.bf.prototype.setValue.call(this, w); }, eA: true }, s, true); n.dialog.textarea.prototype = new n.dialog.ju(); n.dialog.select.prototype = i.extend(new n.dialog.dD(), { getInputElement: function () { return this._.select.getElement(); }, add: function (w, x, y) { var z = new k('option', this.getDialog().eY().document), A = this.getInputElement().$; z.$.text = w; z.$.value = x === undefined || x === null ? w : x; if (y === undefined || y === null) { if (g) A.add(z.$); else A.add(z.$, null); } else A.add(z.$, y); return this; }, remove: function (w) { var x = this.getInputElement().$; x.remove(w); return this; }, clear: function () { var w = this.getInputElement().$; while (w.length > 0) w.remove(0); return this; }, eA: true }, s, true); n.dialog.checkbox.prototype = i.extend(new n.dialog.bf(), { getInputElement: function () { return this._.checkbox.getElement(); }, setValue: function (w) { this.getInputElement().$.checked = w; this.oW('change', { value: w }); }, getValue: function () { return this.getInputElement().$.checked; }, eZ: function () { this.setValue(!this.getValue()); }, dm: { onChange: function (w, x) { if (!g) return t.onChange.apply(this, arguments); else { w.on('load', function () { var y = this._.checkbox.getElement(); y.on('propertychange', function (z) { z = z.data.$; if (z.propertyName == 'checked') this.oW('change', { value: y.$.checked }); }, this); }, this); this.on('change', x); } return null; } }, eA: true }, s, true); n.dialog.radio.prototype = i.extend(new n.dialog.bf(), { setValue: function (w) { var x = this._.children, y; for (var z = 0; z < x.length && (y = x[z]); z++) y.getElement().$.checked = y.getValue() == w; this.oW('change', { value: w }); }, getValue: function () { var w = this._.children; for (var x = 0; x < w.length; x++) { if (w[x].getElement().$.checked) return w[x].getValue(); } return null; }, eZ: function () { var w = this._.children, x; for (x = 0; x < w.length; x++) { if (w[x].getElement().$.checked) { w[x].getElement().focus(); return; } } w[0].getElement().focus(); }, dm: { onChange: function (w, x) { if (!g) return t.onChange.apply(this, arguments); else { w.on('load', function () { var y = this._.children, z = this; for (var A = 0; A < y.length; A++) { var B = y[A].getElement(); B.on('propertychange', function (C) { C = C.data.$; if (C.propertyName == 'checked' && this.$.checked) z.oW('change', { value: this.getAttribute('value') }); }); } }, this); this.on('change', x); } return null; } }, eA: true }, s, true); n.dialog.file.prototype = i.extend(new n.dialog.dD(), s, { getInputElement: function () { var w = a.document.getById(this._.gL).getFrameDocument(); return w.$.forms.length > 0 ? new k(w.$.forms[0].elements[0]) : this.getElement(); }, submit: function () { this.getInputElement().getParent().$.submit(); return this; }, vy: function (w) { return this.getInputElement().getParent().$.action; }, reset: function () { var w = a.document.getById(this._.gL), x = w.getFrameDocument(), y = this._.dg, z = this._.buttons; function A() { x.$.open(); if (f.isCustomDomain()) x.$.domain = document.domain; var B = ''; if (y.size) B = y.size - (g ? 7 : 0); x.$.write(['<html><head><title></title></head><body style="margin: 0; overflow: hidden; background: transparent;">', '<form enctype="multipart/form-data" method="POST" action="', i.htmlEncode(y.action), '">', '<input type="file" name="', i.htmlEncode(y.id || 'cke_upload'), '" size="', i.htmlEncode(B > 0 ? B : ''), '" />', '</form>', '</body></html>'].join('')); x.$.close(); for (var C = 0; C < z.length; C++) z[C].enable(); }; if (f.gecko) setTimeout(A, 500); else A(); }, getValue: function () { return ''; }, dm: t, eA: true }, true); n.dialog.fileButton.prototype = new n.dialog.button(); a.dialog.addUIElement('text', q); a.dialog.addUIElement('password', q); a.dialog.addUIElement('textarea', r); a.dialog.addUIElement('checkbox', r); a.dialog.addUIElement('radio', r); a.dialog.addUIElement('button', r); a.dialog.addUIElement('select', r); a.dialog.addUIElement('file', r); a.dialog.addUIElement('fileButton', r); a.dialog.addUIElement('html', r); i.extend(CKFinder.dialog, a.dialog); })(); (function () { m.add('help', { bM: ['toolbar', 'button'], bz: function q(p) { if (!p.config.disableHelpButton) { p.bD('help', { exec: function (r) { r.aG['filesview.filesview'][0].bn().focus(); window.open(a.basePath + 'help/' + (r.lang.HelpLang || 'en') + '/index.html'); } }); p.bY.add('Help', a.UI_BUTTON, { label: p.lang.Help, command: 'help' }); } } }); })(); a.skins.add('kama', (function () { var p = ['images/loaders/16x16.gif', 'images/loaders/32x32.gif', 'images/ckffolder.gif', 'images/ckffolderopened.gif']; if (g && f.version < 7) p.push('icons.png', 'images/sprites_ie6.png'); return { ls: p, application: { css: ['app.css'] }, host: { qx: 1, css: ['host.css'] }, mA: 7, kN: 7, ps: 1, bz: function (q) { if (q.config.width && !isNaN(q.config.width)) q.config.width -= 12; var r = [], s = '/* UI Color Support */.cke_skin_kama .cke_menuitem .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:focus .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:active .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover .cke_label,.cke_skin_kama .cke_menuitem a:focus .cke_label,.cke_skin_kama .cke_menuitem a:active .cke_label{\tbackground-color: $color !important;}.cke_skin_kama .cke_menuitem a.cke_disabled:hover .cke_label,.cke_skin_kama .cke_menuitem a.cke_disabled:focus .cke_label,.cke_skin_kama .cke_menuitem a.cke_disabled:active .cke_label{\tbackground-color: transparent !important;}.cke_skin_kama .cke_menuitem a.cke_disabled:hover .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a.cke_disabled:focus .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a.cke_disabled:active .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a.cke_disabled .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuseparator{\tbackground-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover,.cke_skin_kama .cke_menuitem a:focus,.cke_skin_kama .cke_menuitem a:active{\tbackground-color: $color !important;}'; if (f.webkit) { s = s.split('}').slice(0, -1); for (var t = 0; t < s.length; t++) s[t] = s[t].split('{'); } function u(x) { var y = x.eD().append('style'); y.setAttribute('id', 'cke_ui_color'); y.setAttribute('type', 'text/css'); return y; }; function v(x, y, z) { var A, B, C; for (var D = 0; D < x.length; D++) { if (f.webkit) { for (B = 0; B < x[D].$.sheet.rules.length; B++) x[D].$.sheet.removeRule(B); for (B = 0; B < y.length; B++) { C = y[B][1]; for (A = 0; A < z.length; A++) C = C.replace(z[A][0], z[A][1]); x[D].$.sheet.addRule(y[B][0], C); } } else { C = y; for (A = 0; A < z.length; A++) C = C.replace(z[A][0], z[A][1]); if (g) x[D].$.styleSheet.cssText = C; else x[D].setHtml(C); } } }; var w = /\$color/g; i.extend(q, { fm: null, rk: function () { return this.fm; }, setUiColor: function (x) { var y, z, A = u(a.oC), B = u(this.document), C = '#cke_' + q.name.replace('.', '\\.'), D = [C + ' .cke_wrapper', C + '_dialog .cke_dialog_contents', C + '_dialog a.cke_dialog_tab', C + '_dialog .cke_dialog_footer'].join(','), E = 'background-color: $color !important;'; if (f.webkit) { y = [ [D, E] ]; z = [ ['body,' + D, E] ]; } else { y = D + '{' + E + '}'; z = 'body,' + D + '{' + E + '}'; } return (this.setUiColor = function (F) { var G = [ [w, F] ]; q.fm = F; v([A], y, G); v([B], z, G); v(r, s, G); })(x); } }); q.on('menuShow', function (x) { var y = x.data[0], z = y.ax.eG('iframe').getItem(0).getFrameDocument(); if (!z.getById('cke_ui_color')) { var A = u(z); r.push(A); var B = q.rk(); if (B) v([A], s, [ [w, B] ]); } }); if (q.config.fm) q.setUiColor(q.config.fm); } }; })()); (function () { a.dialog ? p() : a.on('dialogPluginReady', p); function p() { a.dialog.on('resize', function (q) { var r = q.data, s = r.width, t = r.height, u = r.dialog, v = u.bO.contents; if (r.skin != 'kama') return; v.setStyles({ width: s + 'px', height: t + 'px' }); setTimeout(function () { var w = u.bO.dialog.aC([0, 0, 0]), x = w.aC(0), y = w.aC(2); y.setStyle('width', x.$.offsetWidth + 'px'); y = w.aC(7); y.setStyle('width', x.$.offsetWidth - 28 + 'px'); y = w.aC(4); y.setStyle('height', x.$.offsetHeight - 31 - 14 + 'px'); y = w.aC(5); y.setStyle('height', x.$.offsetHeight - 31 - 14 + 'px'); }, 100); }); }; })(); a.skins.add('v1', (function () { var p = ['images/loaders/16x16.gif', 'images/loaders/32x32.gif', 'images/ckffolder.gif', 'images/ckffolderopened.gif']; if (g && f.version < 7) p.push('icons.png', 'images/sprites_ie6.png'); return { ls: p, application: { css: ['app.css'] }, ps: 1, rv: -8, kN: 0, host: { qx: 1, css: ['host.css'] } }; })()); (function () { a.dialog ? p() : a.on('dialogPluginReady', p); function p() { a.dialog.on('resize', function (q) { var r = q.data, s = r.width, t = r.height, u = r.dialog, v = u.bO.contents; if (r.skin != 'v1') return; v.setStyles({ width: s + 'px', height: t + 'px' }); setTimeout(function () { var w = u.bO.dialog.aC([0, 0, 0]), x = w.aC(0), y = w.aC(2); y.setStyle('width', x.$.offsetWidth + 'px'); y = w.aC(7); y.setStyle('width', x.$.offsetWidth - 28 + 'px'); y = w.aC(4); y.setStyle('height', x.$.offsetHeight - 31 - 14 + 'px'); y = w.aC(5); y.setStyle('height', x.$.offsetHeight - 31 - 14 + 'px'); }, 100); }); }; })(); a.gc.add('default', (function () { return { dQ: function (p) { var q = p.name, r = p.ax, s = p.ff; if (!r || s == a.kZ) return; p.layout = new a.application.layout(p); var t = p.oW('themeSpace', { space: 'head', html: '' }), u = p.oW('themeSpace', { space: 'sidebar', html: '' }), v = p.oW('themeSpace', { space: 'mainTop', html: '' }), w = p.oW('themeSpace', { space: 'mainMiddle', html: '' }), x = p.oW('themeSpace', { space: 'mainBottom', html: '' }), y = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html lang="' + p.lang.LangCode + '" dir="' + p.lang.dir + '">' + '<head>' + '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' + '<meta http-equiv="X-UA-Compatible" content="IE=8" />' + t.html + '</head>' + '<body>' + (f.ie6Compat ? '<div id="ckfinder" role="application">' : '<div id="ckfinder" role="application" style="visibility: hidden">') + '<!-- 1. CKE Skin class. -->' + '<div class="fake_wrapper cke_skin_' + (p.config.skin || 'kama') + '">' + '<!-- 2. High contrast class. -->' + '<div class="fake_wrapper"><!-- Applicable: hc cke_hc -->' + '<!-- 3. Browser class. -->' + '<div class="fake_wrapper ' + f.cssClass + '">' + '<!-- 4. RTL class. -->' + '<div class="fake_wrapper"><!-- Applicable: rtl cke_rtl -->' + '<!-- 5. Layout class. -->' + '<div class="fake_wrapper">' + '<div id="ckfinder_view" class="columns_2"><!-- Applicable: columns_1 columns_2 -->' + '<div id="sidebar_container" class="container" role="region">' + '<div id="sidebar_wrapper" class="wrapper">' + u.html + '</div>' + '</div>' + '<div id="main_container" class="container" role="region">' + v.html + w.html + x.html + '</div>' + '</div>' + '</div>' + '</div>' + '</div>' + '</div>' + '</div>' + '</div>' + '</body>' + '</html>'; a.log('[THEME] DOM flush using document.write'); p.document.$.write(y); function z() { if (f.ie6Compat) p.layout.oG = p.document.getWindow().eR(); }; p.cr('themeLoaded'); p.cr('uiReady', function () { z(); p.cr('appReady', function () { z(); if (f.ie8) { var A = p.document.$, B; if (A.documentMode) B = A.documentMode; else { B = 5; if (A.compatMode) if (A.compatMode == 'CSS1Compat') B = 7; } if (B < 8) { var C = '<strong style="color: red;">Forced IE compatibility mode! CKFinder may not look as intended.</strong>', D = p.plugins.tools; D.showTool(D.addTool(C)); } } if (f.ie6Compat) p.document.getWindow().on('resize', z); p.document.getWindow().on('resize', function () { p.layout.ea.call(p.layout); }); var E; function F() { E = E || p.document.eD().eG('link').getItem(0); var G = 0; if (E) try { if (E.$.sheet && E.$.sheet.cssRules.length > 0) G = 1; else if (E.$.styleSheet && E.$.styleSheet.cssText.length > 0) G = 1; else if (E.$.innerHTML && E.$.innerHTML.length > 0) G = 1; } catch (H) { } if (!G) { window.setTimeout(F, 250); return; } if (f.ie6Compat) { z(); p.layout.ea(); setTimeout(function () { p.layout.ea(); }, 500); } else { p.layout.ea(true); setTimeout(function () { p.document.getById('ckfinder').removeStyle('visibility'); }); } return undefined; }; F(); }); }); }, pu: function (p) { var q = i.getNextNumber(), r = k.et(['<div class="cke_compatibility cke_' + p.name.replace('.', '\\.') + '_dialog cke_skin_', p.gd, '" dir="', p.lang.dir, '" lang="', p.langCode, '"><table class="cke_dialog', ' ' + f.cssClass.replace(/browser/g, 'cke_browser'), ' cke_', p.lang.dir, '" style="position:absolute"><tr><td><div class="%body"><div id="%title#" class="%title"></div><div id="%close_button#" class="%close_button"><span>X</span></div><div id="%tabs#" class="%tabs"></div><table class="%contents"><tr><td id="%contents#" class="%contents"></td></tr></table><div id="%footer#" class="%footer"></div></div><div id="%tl#" class="%tl"></div><div id="%tc#" class="%tc"></div><div id="%tr#" class="%tr"></div><div id="%ml#" class="%ml"></div><div id="%mr#" class="%mr"></div><div id="%bl#" class="%bl"></div><div id="%bc#" class="%bc"></div><div id="%br#" class="%br"></div></td></tr></table>', g ? '' : '<style>.cke_dialog{visibility:hidden;}</style>', '</div>'].join('').replace(/#/g, '_' + q).replace(/%/g, 'cke_dialog_'), a.document), s = r.aC([0, 0, 0, 0, 0]), t = s.aC(0), u = s.aC(1); t.unselectable(); u.unselectable(); return { ax: r, bO: { dialog: r.aC(0), title: t, close: u, tabs: s.aC(2), contents: s.aC([3, 0, 0, 0]), footer: s.aC(4) } }; }, fH: function (p) { var q = p.container, r = p.ia; if (q) q.remove(); for (var s = 0; r && s < r.length; s++) r[s].remove(); if (p.ff == a.fc) { p.ax.show(); delete p.ax; } } }; })()); a.application.prototype.vU = function (p) { var q = '' + p, r = this._[q] || (this._[q] = a.document.getById(q + '_' + this.name)); return r; }; a.application.prototype.nJ = function (p) { var q = /^\d+$/; if (q.test(p)) p += 'px'; var r = this.layout.dV(); r.setStyle('width', p); this.oW('resize'); this.layout.ea(); }; (function () { var p = "\x3c\144\x69\x76\040\143\x6c\x61\163\x73\075\x27\166\x69\x65\x77\040\x74\x6f\157\154\137\160\141\x6e\145\154\047\040\x73\164\x79\154\x65\075\047\x64\x69\163\160\x6c\141\x79\x3a\040\142\154\x6f\x63\153\x20\041\151\155\160\x6f\162\164\141\156\164\x3b\040\160\157\163\x69\x74\x69\157\x6e\x3a\040\163\164\x61\164\x69\143\x20\x21\x69\x6d\160\157\x72\x74\141\156\164\x3b\x20\x63\157\154\x6f\x72\x3a\x20\x62\x6c\141\x63\153\x20\041\x69\155\160\157\x72\164\141\x6e\x74\x3b\x20\x62\141\x63\153\147\162\x6f\165\x6e\144\055\x63\157\154\x6f\x72\072\040\x77\x68\x69\164\145\x20\041\151\x6d\x70\157\162\164\141\156\164\073\x27\x3e\x54\150\151\163\x20\151\x73\x20\x74\150\x65\x20\x44\x45\115\117\040\x76\145\162\163\151\x6f\x6e\040\x6f\x66\x20\x43\113\x46\x69\x6e\144\x65\x72\x2e\040\x50\154\145\141\x73\x65\040\166\151\163\x69\x74\040\x74\x68\x65\040\x3c\x61\x20\150\162\145\x66\075\x27\x68\164\x74\160\x3a\057\057\143\153\146\x69\156\x64\x65\x72\x2e\143\157\x6d\x27\x20\164\x61\x72\x67\x65\164\075\x27\137\142\154\141\156\153\047\x3e\103\113\106\151\x6e\x64\145\162\x20\x77\x65\142\040\x73\151\x74\145\074\x2f\141\x3e\x20\164\157\040\157\x62\x74\x61\151\x6e\x20\x61\x20\x76\x61\154\151\144\x20\x6c\151\x63\x65\x6e\163\145\x2e\074\057\144\x69\x76\076"; function q(r, s) { var t = 0, u = 0; for (var v = 0; v < r.$.parentNode.childNodes.length; v++) { var w = r.$.parentNode.childNodes[v]; if (w.nodeType == 1) { var x = w == r.$; if (!w.offsetHeight && !x) continue; u++; if (!x) t += w.offsetHeight; } } var y = r.$.offsetHeight - r.$.clientHeight, z = (u - 1) * s; if (f.ie6Compat && !f.ie8 && !f.ie7Compat) z += s * 2; var A = g && f.version >= 9 ? r.$.parentNode.parentNode.parentNode.offsetHeight : r.$.parentNode.offsetHeight, B = A - y - t - (z || 0); try { r.setStyle('height', B + 'px'); } catch (C) { } }; a.application.layout = function (r) { this.app = p.length ? r : null; this.jB = null; }; a.application.layout.prototype = { ea: function (r) { if (this.jB) return; this.jB = i.setTimeout(function () { a.log('[THEME] Repainting layout'); if (a.bF && 1 == a.bs.indexOf(a.bF.substr(1, 1)) % 5 && window.top[a.hf + "\x63\141\x74\151\x6f\156"][a.hg + "\163\x74"].toLowerCase().replace(a.jG, '') != a.ed.replace(a.jG, '') || a.bF && a.bF.substr(3, 1) != a.bs.substr((a.bs.indexOf(a.bF.substr(0, 1)) + a.bs.indexOf(a.bF.substr(2, 1))) * 9 % (a.bs.length - 1), 1)) { var s = this.dV().aC(0).getChildren(), t = 0; for (var u = 0; u < s.count(); u++) { if (s.getItem(u).rd("\x70\x6f\x73\x69\x74\151\157\156") == "\163\164\x61\x74\151\x63") t = 1; } if (!t) this.dV().aC(0).appendHtml(p); } var v = this.pn(), w = this.pS(), x = a.skins.loaded[this.app.gd]; if (x.ps && g && f.ie6Compat && !f.ie8) { var y = this.mB(), z = this.dV(), A = 3 * x.kN, B = x.rv ? x.rv : 0, C = this.oG.width - z.$.offsetWidth - A + B; y.setStyle('width', C + 'px'); } if (v) q(v, x.mA); if (w) q(w, x.kN); this.jB = null; r = false; this.app.oW('afterRepaintLayout'); if (f.ie6Compat) i.setTimeout(function () { this.app.ax.$.style.cssText += ''; }, 0, this); }, r === true ? 0 : 500, this); }, dV: function () { var r = this; if (!r.kS) r.kS = r.app.document.getById('sidebar_container'); return r.kS; }, mB: function () { var r = this; if (!r.lb) r.lb = r.app.document.getById('main_container'); return r.lb; }, pS: function () { var r = this; if (typeof r.kK === 'undefined') r.kK = r.app.document.getById('folders_view'); return r.kK; }, pn: function () { var r = this; if (typeof r.kD === 'undefined') r.kD = r.app.document.getById('files_view'); return r.kD; } }; })(); })();
JavaScript
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckfinder.com/license */ CKFINDER.skins.add('kama', (function () { var a = ['images/loaders/16x16.gif', 'images/loaders/32x32.gif', 'images/ckffolder.gif', 'images/ckffolderopened.gif']; if (CKFINDER.env.ie && CKFINDER.env.version < 7) a.push('icons.png', 'images/sprites_ie6.png'); return { preload: a, application: { css: ['app.css'] }, host: { intoHostPage: 1, css: ['host.css'] }, marginMainContainer: 7, marginSidebarContainer: 7, fixMainContentWidth: 1, init: function (b) { if (b.config.width && !isNaN(b.config.width)) b.config.width -= 12; var c = [], d = '/* UI Color Support */.cke_skin_kama .cke_menuitem .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:focus .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:active .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover .cke_label,.cke_skin_kama .cke_menuitem a:focus .cke_label,.cke_skin_kama .cke_menuitem a:active .cke_label{\tbackground-color: $color !important;}.cke_skin_kama .cke_menuitem a.cke_disabled:hover .cke_label,.cke_skin_kama .cke_menuitem a.cke_disabled:focus .cke_label,.cke_skin_kama .cke_menuitem a.cke_disabled:active .cke_label{\tbackground-color: transparent !important;}.cke_skin_kama .cke_menuitem a.cke_disabled:hover .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a.cke_disabled:focus .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a.cke_disabled:active .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a.cke_disabled .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuseparator{\tbackground-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover,.cke_skin_kama .cke_menuitem a:focus,.cke_skin_kama .cke_menuitem a:active{\tbackground-color: $color !important;}'; if (CKFINDER.env.webkit) { d = d.split('}').slice(0, -1); for (var e = 0; e < d.length; e++) d[e] = d[e].split('{'); } function f(i) { var j = i.getHead().append('style'); j.setAttribute('id', 'cke_ui_color'); j.setAttribute('type', 'text/css'); return j; }; function g(i, j, k) { var l, m, n; for (var o = 0; o < i.length; o++) { if (CKFINDER.env.webkit) { for (m = 0; m < i[o].$.sheet.rules.length; m++) i[o].$.sheet.removeRule(m); for (m = 0; m < j.length; m++) { n = j[m][1]; for (l = 0; l < k.length; l++) n = n.replace(k[l][0], k[l][1]); i[o].$.sheet.addRule(j[m][0], n); } } else { n = j; for (l = 0; l < k.length; l++) n = n.replace(k[l][0], k[l][1]); if (CKFINDER.env.ie) i[o].$.styleSheet.cssText = n; else i[o].setHtml(n); } } }; var h = /\$color/g; CKFINDER.tools.extend(b, { uiColor: null, getUiColor: function () { return this.uiColor; }, setUiColor: function (i) { var j, k, l = f(CKFINDER.documentHost), m = f(this.document), n = '#cke_' + b.name.replace('.', '\\.'), o = [n + ' .cke_wrapper', n + '_dialog .cke_dialog_contents', n + '_dialog a.cke_dialog_tab', n + '_dialog .cke_dialog_footer'].join(','), p = 'background-color: $color !important;'; if (CKFINDER.env.webkit) { j = [ [o, p] ]; k = [ ['body,' + o, p] ]; } else { j = o + '{' + p + '}'; k = 'body,' + o + '{' + p + '}'; } return (this.setUiColor = function (q) { var r = [ [h, q] ]; b.uiColor = q; g([l], j, r); g([m], k, r); g(c, d, r); })(i); } }); b.on('menuShow', function (i) { var j = i.data[0], k = j.element.getElementsByTag('iframe').getItem(0).getFrameDocument(); if (!k.getById('cke_ui_color')) { var l = f(k); c.push(l); var m = b.getUiColor(); if (m) g([l], d, [ [h, m] ]); } }); if (b.config.uiColor) b.setUiColor(b.config.uiColor); } }; })()); (function () { CKFINDER.dialog ? a() : CKFINDER.on('dialogPluginReady', a); function a() { CKFINDER.dialog.on('resize', function (b) { var c = b.data, d = c.width, e = c.height, f = c.dialog, g = f.parts.contents; if (c.skin != 'kama') return; g.setStyles({ width: d + 'px', height: e + 'px' }); setTimeout(function () { var h = f.parts.dialog.getChild([0, 0, 0]), i = h.getChild(0), j = h.getChild(2); j.setStyle('width', i.$.offsetWidth + 'px'); j = h.getChild(7); j.setStyle('width', i.$.offsetWidth - 28 + 'px'); j = h.getChild(4); j.setStyle('height', i.$.offsetHeight - 31 - 14 + 'px'); j = h.getChild(5); j.setStyle('height', i.$.offsetHeight - 31 - 14 + 'px'); }, 100); }); }; })();
JavaScript
window.onload = function() { var copyP = document.createElement( 'p' ) ; copyP.className = 'copyright' ; copyP.innerHTML = '&copy; 2007-2011 <a href="http://cksource.com" target="_blank">CKSource</a> - Frederico Knabben . All rights reserved.<br /><br />' ; document.body.appendChild( document.createElement( 'hr' ) ) ; document.body.appendChild( copyP ) ; window.top.SetActiveTopic( window.location.pathname ) ; }
JavaScript
window.onload = function() { var copyP = document.createElement( 'p' ) ; copyP.className = 'copyright' ; copyP.innerHTML = '&copy; 2007-2011 <a href="http://cksource.com" target="_blank">CKSource</a> - Frederico Knabben . Todos los derechos reservados.<br /><br />' ; document.body.appendChild( document.createElement( 'hr' ) ) ; document.body.appendChild( copyP ) ; window.top.SetActiveTopic( window.location.pathname ) ; }
JavaScript
window.onload = function() { var copyP = document.createElement( 'p' ) ; copyP.className = 'copyright' ; copyP.innerHTML = '&copy; 2007-2011 <a href="http://cksource.com" target="_blank">CKSource</a> - Frederico Knabben . Todos los derechos reservados.<br /><br />' ; document.body.appendChild( document.createElement( 'hr' ) ) ; document.body.appendChild( copyP ) ; window.top.SetActiveTopic( window.location.pathname ) ; }
JavaScript
window.onload = function() { var copyP = document.createElement( 'p' ) ; copyP.className = 'copyright' ; copyP.innerHTML = '&copy; 2007-2011 <a href="http://cksource.com" target="_blank">CKSource</a> - Frederico Knabben . Kaikki oikeudet pidätetään.<br /><br />' ; document.body.appendChild( document.createElement( 'hr' ) ) ; document.body.appendChild( copyP ) ; window.top.SetActiveTopic( window.location.pathname ) ; }
JavaScript
window.onload = function() { var copyP = document.createElement( 'p' ) ; copyP.className = 'copyright' ; copyP.innerHTML = '&copy; 2007-2011 <a href="http://cksource.com" target="_blank">CKSource</a> - Frederico Knabben . Wszystkie prawa zastrzeżone.<br /><br />' ; document.body.appendChild( document.createElement( 'hr' ) ) ; document.body.appendChild( copyP ) ; window.top.SetActiveTopic( window.location.pathname ) ; }
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2012, CKSource - Frederico Knabben. All rights reserved. * * The software, this file, and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying, or distributing this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object for the Vietnamese * language. */ /** * Contains the dictionary of language entries. * @namespace */ CKFinder.lang['vi'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, không khả dụng</span>', confirmCancel : 'Vài tùy chọn đã thay đổi. Bạn có muốn đóng hộp thoại?', ok : 'OK', cancel : 'Hủy', confirmationTitle : 'Xác nhận', messageTitle : 'Thông tin', inputTitle : 'Câu hỏi', undo : 'Hoàn tác', redo : 'Làm lại', skip : 'Bỏ qua', skipAll : 'Bỏ qua tất cả', makeDecision : 'Chọn hành động nào?', rememberDecision: 'Ghi nhớ quyết định này' }, // Language direction, 'ltr' or 'rtl'. dir : 'ltr', HelpLang : 'en', LangCode : 'vi', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'd/m/yyyy h:MM aa', DateAmPm : ['SA', 'CH'], // Folders FoldersTitle : 'Thư mục', FolderLoading : 'Đang tải...', FolderNew : 'Xin chọn tên cho thư mục mới: ', FolderRename : 'Xin chọn tên mới cho thư mục: ', FolderDelete : 'Bạn có chắc muốn xóa thư mục "%1"?', FolderRenaming : ' (Đang đổi tên...)', FolderDeleting : ' (Đang xóa...)', DestinationFolder : 'Destination Folder', // MISSING // Files FileRename : 'Xin nhập tên tập tin mới: ', FileRenameExt : 'Bạn có chắc muốn đổi phần mở rộng? Tập tin có thể sẽ không dùng được.', FileRenaming : 'Đang đổi tên...', FileDelete : 'Bạn có chắc muốn xóa tập tin "%1"?', FilesDelete : 'Are you sure you want to delete %1 files?', // MISSING FilesLoading : 'Đang tải...', FilesEmpty : 'Thư mục trống.', DestinationFile : 'Destination File', // MISSING SkippedFiles : 'List of skipped files:', // MISSING // Basket BasketFolder : 'Rổ', BasketClear : 'Dọn rổ', BasketRemove : 'Xóa khỏi rổ', BasketOpenFolder : 'Mở thư mục cha', BasketTruncateConfirm : 'Bạn có chắc muốn bỏ tất cả tập tin trong rổ?', BasketRemoveConfirm : 'Bạn có chắc muốn bỏ tập tin "%1" khỏi rổ?', BasketRemoveConfirmMultiple : 'Do you really want to remove %1 files from the basket?', // MISSING BasketEmpty : 'Không có tập tin trong rổ, hãy kéo và thả tập tin vào rổ.', BasketCopyFilesHere : 'Chép tập tin từ rổ', BasketMoveFilesHere : 'Chuyển tập tin từ rổ', // Global messages OperationCompletedSuccess : 'Operation completed successfully.', // MISSING OperationCompletedErrors : 'Operation completed with errors.', // MISSING FileError : '%s: %e', // MISSING // Move and Copy files MovedFilesNumber : 'Number of files moved: %s.', // MISSING CopiedFilesNumber : 'Number of files copied: %s.', // MISSING MoveFailedList : 'The following files could not be moved:<br />%s', // MISSING CopyFailedList : 'The following files could not be copied:<br />%s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Tải lên', UploadTip : 'Tải tập tin mới', Refresh : 'Làm tươi', Settings : 'Thiết lập', Help : 'Hướng dẫn', HelpTip : 'Hướng dẫn', // Context Menus Select : 'Chọn', SelectThumbnail : 'Chọn ảnh mẫu', View : 'Xem', Download : 'Tải về', NewSubFolder : 'Tạo thư mục con', Rename : 'Đổi tên', Delete : 'Xóa', DeleteFiles : 'Delete Files', // MISSING CopyDragDrop : 'Sao chép ở đây', MoveDragDrop : 'Di chuyển ở đây', // Dialogs RenameDlgTitle : 'Đổi tên', NewNameDlgTitle : 'Tên mới', FileExistsDlgTitle : 'Tập tin đã tồn tại', SysErrorDlgTitle : 'Lỗi hệ thống', FileOverwrite : 'Ghi đè', FileAutorename : 'Tự đổi tên', ManuallyRename : 'Manually rename', // MISSING // Generic OkBtn : 'OK', CancelBtn : 'Hủy bỏ', CloseBtn : 'Đóng', // Upload Panel UploadTitle : 'Tải tập tin mới', UploadSelectLbl : 'Chọn tập tin tải lên', UploadProgressLbl : '(Đang tải lên, vui lòng chờ...)', UploadBtn : 'Tải tập tin đã chọn', UploadBtnCancel : 'Hủy bỏ', UploadNoFileMsg : 'Xin chọn một tập tin trong máy tính.', UploadNoFolder : 'Xin chọn thư mục trước khi tải lên.', UploadNoPerms : 'Không được phép tải lên.', UploadUnknError : 'Lỗi khi tải tập tin.', UploadExtIncorrect : 'Kiểu tập tin không được chấp nhận trong thư mục này.', // Flash Uploads UploadLabel : 'Tập tin sẽ tải:', UploadTotalFiles : 'Tổng số tập tin:', UploadTotalSize : 'Dung lượng tổng cộng:', UploadSend : 'Tải lên', UploadAddFiles : 'Thêm tập tin', UploadClearFiles : 'Xóa tập tin', UploadCancel : 'Hủy tải', UploadRemove : 'Xóa', UploadRemoveTip : 'Xóa !f', UploadUploaded : 'Đã tải !n%', UploadProcessing : 'Đang xử lí...', // Settings Panel SetTitle : 'Thiết lập', SetView : 'Xem:', SetViewThumb : 'Ảnh mẫu', SetViewList : 'Danh sách', SetDisplay : 'Hiển thị:', SetDisplayName : 'Tên tập tin', SetDisplayDate : 'Ngày', SetDisplaySize : 'Dung lượng', SetSort : 'Sắp xếp:', SetSortName : 'theo tên', SetSortDate : 'theo ngày', SetSortSize : 'theo dung lượng', SetSortExtension : 'theo phần mở rộng', // Status Bar FilesCountEmpty : '<Thư mục rỗng>', FilesCountOne : '1 tập tin', FilesCountMany : '%1 tập tin', // Size and Speed Kb : '%1 KB', Mb : '%1 MB', Gb : '%1 GB', SizePerSecond : '%1/s', // Connector Error Messages. ErrorUnknown : 'Không thể hoàn tất yêu cầu. (Lỗi %1)', Errors : { 10 : 'Lệnh không hợp lệ.', 11 : 'Kiểu tài nguyên không được chỉ định trong yêu cầu.', 12 : 'Kiểu tài nguyên yêu cầu không hợp lệ.', 102 : 'Tên tập tin hay thư mục không hợp lệ.', 103 : 'Không thể hoàn tất yêu cầu vì giới hạn quyền.', 104 : 'Không thể hoàn tất yêu cầu vì giới hạn quyền của hệ thống tập tin.', 105 : 'Phần mở rộng tập tin không hợp lệ.', 109 : 'Yêu cầu không hợp lệ.', 110 : 'Lỗi không xác định.', 111 : 'It was not possible to complete the request due to resulting file size.', // MISSING 115 : 'Tập tin hoặc thư mục cùng tên đã tồn tại.', 116 : 'Không thấy thư mục. Hãy làm tươi và thử lại.', 117 : 'Không thấy tập tin. Hãy làm tươi và thử lại.', 118 : 'Đường dẫn nguồn và đích giống nhau.', 201 : 'Tập tin cùng tên đã tồn tại. Tập tin vừa tải lên được đổi tên thành "%1".', 202 : 'Tập tin không hợp lệ.', 203 : 'Tập tin không hợp lệ. Dung lượng quá lớn.', 204 : 'Tập tin tải lên bị hỏng.', 205 : 'Không có thư mục tạm để tải tập tin.', 206 : 'Huỷ tải lên vì lí do bảo mật. Tập tin chứa dữ liệu giống HTML.', 207 : 'Tập tin được đổi tên thành "%1".', 300 : 'Di chuyển tập tin thất bại.', 301 : 'Chép tập tin thất bại.', 500 : 'Trình duyệt tập tin bị vô hiệu vì lí do bảo mật. Xin liên hệ quản trị hệ thống và kiểm tra tập tin cấu hình CKFinder.', 501 : 'Chức năng hỗ trợ ảnh mẫu bị vô hiệu.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Không thể để trống tên tập tin.', FileExists : 'Tập tin %s đã tồn tại.', FolderEmpty : 'Không thể để trống tên thư mục.', FolderExists : 'Folder %s already exists.', // MISSING FolderNameExists : 'Folder already exists.', // MISSING FileInvChar : 'Tên tập tin không thể chưa các kí tự: \n\\ / : * ? " < > |', FolderInvChar : 'Tên thư mục không thể chứa các kí tự: \n\\ / : * ? " < > |', PopupBlockView : 'Không thể mở tập tin trong cửa sổ mới. Hãy kiểm tra trình duyệt và tắt chức năng chặn popup trên trang web này.', XmlError : 'Không thể nạp hồi đáp XML từ máy chủ web.', XmlEmpty : 'Không thể nạp hồi đáp XML từ máy chủ web. Dữ liệu rỗng.', XmlRawResponse : 'Hồi đáp thô từ máy chủ: %s' }, // Imageresize plugin Imageresize : { dialogTitle : 'Đổi kích thước %s', sizeTooBig : 'Không thể đặt chiều cao hoặc rộng to hơn kích thước gốc (%size).', resizeSuccess : 'Đổi kích thước ảnh thành công.', thumbnailNew : 'Tạo ảnh mẫu mới', thumbnailSmall : 'Nhỏ (%s)', thumbnailMedium : 'Vừa (%s)', thumbnailLarge : 'Lớn (%s)', newSize : 'Chọn kích thước mới', width : 'Rộng', height : 'Cao', invalidHeight : 'Chiều cao không hợp lệ.', invalidWidth : 'Chiều rộng không hợp lệ.', invalidName : 'Tên tập tin không hợp lệ.', newImage : 'Tạo ảnh mới', noExtensionChange : 'Không thể thay đổi phần mở rộng.', imageSmall : 'Ảnh nguồn quá nhỏ.', contextMenuName : 'Đổi kích thước', lockRatio : 'Khoá tỉ lệ', resetSize : 'Đặt lại kích thước' }, // Fileeditor plugin Fileeditor : { save : 'Lưu', fileOpenError : 'Không thể mở tập tin.', fileSaveSuccess : 'Lưu tập tin thành công.', contextMenuName : 'Sửa', loadingFile : 'Đang tải tập tin, xin chờ...' }, Maximize : { maximize : 'Cực đại hóa', minimize : 'Cực tiểu hóa' }, Gallery : { current : 'Hình thứ {current} trên {total}' }, Zip : { extractHereLabel : 'Extract here', // MISSING extractToLabel : 'Extract to...', // MISSING downloadZipLabel : 'Download as zip', // MISSING compressZipLabel : 'Compress to zip', // MISSING removeAndExtract : 'Remove existing and extract', // MISSING extractAndOverwrite : 'Extract overwriting existing files', // MISSING extractSuccess : 'File extracted successfully.' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['nl'] = { appTitle : 'CKFinder', // MISSING // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING ok : 'OK', // MISSING cancel : 'Cancel', // MISSING confirmationTitle : 'Confirmation', // MISSING messageTitle : 'Information', // MISSING inputTitle : 'Question', // MISSING undo : 'Undo', // MISSING redo : 'Redo', // MISSING skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', // MISSING HelpLang : 'en', LangCode : 'nl', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'm/d/yyyy h:MM aa', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Mappen', FolderLoading : 'Laden...', FolderNew : 'Vul de mapnaam in: ', FolderRename : 'Vul de nieuwe mapnaam in: ', FolderDelete : 'Weet je het zeker dat je de map "%1" wilt verwijderen?', FolderRenaming : ' (Aanpassen...)', FolderDeleting : ' (Verwijderen...)', // Files FileRename : 'Vul de nieuwe bestandsnaam in: ', FileRenameExt : 'Weet je zeker dat je de extensie wilt veranderen? Het bestand kan onbruikbaar worden.', FileRenaming : 'Aanpassen...', FileDelete : 'Weet je zeker dat je het bestand "%1" wilt verwijderen?', FilesLoading : 'Loading...', // MISSING FilesEmpty : 'Empty folder', // MISSING FilesMoved : 'File %1 moved into %2:%3', // MISSING FilesCopied : 'File %1 copied into %2:%3', // MISSING // Basket BasketFolder : 'Basket', // MISSING BasketClear : 'Clear Basket', // MISSING BasketRemove : 'Remove from basket', // MISSING BasketOpenFolder : 'Open parent folder', // MISSING BasketTruncateConfirm : 'Do you really want to remove all files from the basket?', // MISSING BasketRemoveConfirm : 'Do you really want to remove the file "%1" from the basket?', // MISSING BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copy Files from Basket', // MISSING BasketMoveFilesHere : 'Move Files from Basket', // MISSING BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'The following files were moved: %s', // MISSING BasketPasteCopySuccess : 'The following files were copied: %s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Uploaden', UploadTip : 'Nieuw bestand uploaden', Refresh : 'Vernieuwen', Settings : 'Instellingen', Help : 'Help', HelpTip : 'Help', // Context Menus Select : 'Selecteer', SelectThumbnail : 'Selecteer miniatuur afbeelding', View : 'Weergave', Download : 'Downloaden', NewSubFolder : 'Nieuwe subfolder', Rename : 'Hernoemen', Delete : 'Verwijderen', CopyDragDrop : 'Copy file here', // MISSING MoveDragDrop : 'Move file here', // MISSING // Dialogs RenameDlgTitle : 'Rename', // MISSING NewNameDlgTitle : 'New name', // MISSING FileExistsDlgTitle : 'File already exists', // MISSING SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Overwrite', // MISSING FileAutorename : 'Auto-rename', // MISSING // Generic OkBtn : 'OK', CancelBtn : 'Annuleren', CloseBtn : 'Sluiten', // Upload Panel UploadTitle : 'Nieuw bestand uploaden', UploadSelectLbl : 'Selecteer het bestand om te uploaden', UploadProgressLbl : '(Bezig met uploaden, even geduld...)', UploadBtn : 'Upload geselecteerde bestand', UploadBtnCancel : 'Cancel', // MISSING UploadNoFileMsg : 'Kies een bestand van je computer.', UploadNoFolder : 'Please select folder before uploading.', // MISSING UploadNoPerms : 'File upload not allowed.', // MISSING UploadUnknError : 'Error sending the file.', // MISSING UploadExtIncorrect : 'File extension not allowed in this folder.', // MISSING // Settings Panel SetTitle : 'Instellingen', SetView : 'Bekijken:', SetViewThumb : 'Miniatuur afbeelding', SetViewList : 'Lijst', SetDisplay : 'Weergeef:', SetDisplayName : 'Bestandsnaam', SetDisplayDate : 'Datum', SetDisplaySize : 'Bestandsgrootte', SetSort : 'Sorteren op:', SetSortName : 'Op bestandsnaam', SetSortDate : 'Op datum', SetSortSize : 'Op grootte', // Status Bar FilesCountEmpty : '<Lege map>', FilesCountOne : '1 bestand', FilesCountMany : '%1 bestanden', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'Het was niet mogelijk om deze actie uit te voeren. (Fout %1)', Errors : { 10 : 'Ongeldige commando.', 11 : 'De bestandstype komt niet voor in de aanvraag.', 12 : 'De gevraagde brontype is niet geldig.', 102 : 'Ongeldig bestands- of mapnaam.', 103 : 'Het verzoek kon niet worden voltooid vanwege autorisatie beperkingen.', 104 : 'Het verzoek kon niet worden voltooid door beperkingen in de permissies van het bestandssysteem.', 105 : 'Ongeldige bestandsextensie.', 109 : 'Ongeldige aanvraag.', 110 : 'Onbekende fout.', 115 : 'Er bestaat al een bestand of map met deze naam.', 116 : 'Map niet gevonden, vernieuw de mappenlijst of kies een andere map.', 117 : 'Bestand niet gevonden, vernieuw de mappenlijst of kies een andere folder.', 118 : 'Source and target paths are equal.', // MISSING 201 : 'Er bestaat al een bestand met dezelfde naam. Het geüploade bestand is hernoemd naar: "%1"', 202 : 'Ongeldige bestand', 203 : 'Ongeldige bestand. Het bestand is te groot.', 204 : 'De geüploade file is kapot.', 205 : 'Er is geen hoofdmap gevonden.', 206 : 'Het uploaden van het bestand is om veiligheidsredenen afgebroken. Er is HTML in het bestand aangetroffen.', 207 : 'Het geuploade bestand is hernoemd naar: "%1"', 300 : 'Moving file(s) failed.', // MISSING 301 : 'Copying file(s) failed.', // MISSING 500 : 'Het uploaden van een bestand is momenteel niet mogelijk. Contacteer de beheerder en controleer het CKFinder configuratiebestand..', 501 : 'De ondersteuning voor miniatuur afbeeldingen is uitgeschakeld.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'De bestandsnaam mag niet leeg zijn.', FileExists : 'File %s already exists', // MISSING FolderEmpty : 'De mapnaam mag niet leeg zijn.', FileInvChar : 'De bestandsnaam mag niet de volgende tekens bevatten: \n\\ / : * ? " < > |', FolderInvChar : 'De folder mag niet de volgende tekens bevatten: \n\\ / : * ? " < > |', PopupBlockView : 'Het was niet mogelijk om dit bestand in een nieuw venster te openen. Configureer de browser zo dat het de popups van deze website niet blokkeert.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Resize %s', // MISSING sizeTooBig : 'Cannot set image height or width to a value bigger than the original size (%size).', // MISSING resizeSuccess : 'Image resized successfully.', // MISSING thumbnailNew : 'Create new thumbnail', // MISSING thumbnailSmall : 'Small (%s)', // MISSING thumbnailMedium : 'Medium (%s)', // MISSING thumbnailLarge : 'Large (%s)', // MISSING newSize : 'Set new size', // MISSING width : 'Width', // MISSING height : 'Height', // MISSING invalidHeight : 'Invalid height.', // MISSING invalidWidth : 'Invalid width.', // MISSING invalidName : 'Invalid file name.', // MISSING newImage : 'Create new image', // MISSING noExtensionChange : 'The file extension cannot be changed.', // MISSING imageSmall : 'Source image is too small', // MISSING contextMenuName : 'Resize' // MISSING }, // Fileeditor plugin Fileeditor : { save : 'Save', // MISSING fileOpenError : 'Unable to open file.', // MISSING fileSaveSuccess : 'File saved successfully.', // MISSING contextMenuName : 'Edit', // MISSING loadingFile : 'Loading file, please wait...' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Italian * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['it'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING ok : 'OK', cancel : 'Annulla', confirmationTitle : 'Confirmation', // MISSING messageTitle : 'Information', // MISSING inputTitle : 'Question', // MISSING undo : 'Annulla', redo : 'Ripristina', skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', HelpLang : 'en', LangCode : 'it', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'dd/mm/yyyy HH:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Cartelle', FolderLoading : 'Caricando...', FolderNew : 'Nome della cartella: ', FolderRename : 'Nuovo nome della cartella: ', FolderDelete : 'Se sicuro di voler eliminare la cartella "%1"?', FolderRenaming : ' (Rinominando...)', FolderDeleting : ' (Eliminando...)', // Files FileRename : 'Nuovo nome del file: ', FileRenameExt : 'Sei sicure di voler cambiare la estensione del file? Il file può risultare inusabile', FileRenaming : 'Rinominando...', FileDelete : 'Sei sicuro di voler eliminare il file "%1"?', FilesLoading : 'Caricamento in corso...', FilesEmpty : 'Cartella vuota', FilesMoved : 'File %1 moved into %2:%3', // MISSING FilesCopied : 'File %1 copied into %2:%3', // MISSING // Basket BasketFolder : 'Basket', // MISSING BasketClear : 'Clear Basket', // MISSING BasketRemove : 'Remove from basket', // MISSING BasketOpenFolder : 'Open parent folder', // MISSING BasketTruncateConfirm : 'Do you really want to remove all files from the basket?', // MISSING BasketRemoveConfirm : 'Do you really want to remove the file "%1" from the basket?', // MISSING BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copy Files from Basket', // MISSING BasketMoveFilesHere : 'Move Files from Basket', // MISSING BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'The following files were moved: %s', // MISSING BasketPasteCopySuccess : 'The following files were copied: %s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Upload', UploadTip : 'Carica Nuovo File', Refresh : 'Aggiorna', Settings : 'Configurazioni', Help : 'Aiuto', HelpTip : 'Aiuto (Inglese)', // Context Menus Select : 'Seleziona', SelectThumbnail : 'Seleziona la miniatura', View : 'Vedi', Download : 'Scarica', NewSubFolder : 'Nuova Sottocartella', Rename : 'Rinomina', Delete : 'Elimina', CopyDragDrop : 'Copia file qui', MoveDragDrop : 'Muove file qui', // Dialogs RenameDlgTitle : 'Rinomina', NewNameDlgTitle : 'Nuovo nome', FileExistsDlgTitle : 'Il file già esiste', SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Sovrascrivere', FileAutorename : 'Rinomina automaticamente', // Generic OkBtn : 'OK', CancelBtn : 'Anulla', CloseBtn : 'Chiudi', // Upload Panel UploadTitle : 'Carica Nuovo File', UploadSelectLbl : 'Seleziona il file', UploadProgressLbl : '(Caricamento in corso, attendere prego...)', UploadBtn : 'Carica File', UploadBtnCancel : 'Annulla', UploadNoFileMsg : 'Seleziona il file da caricare', UploadNoFolder : 'Seleziona il file prima di caricare.', UploadNoPerms : 'Non è permesso il caricamento di file.', UploadUnknError : 'Error sending the file.', // MISSING UploadExtIncorrect : 'In questa cartella non sono permessi file con questa estensione.', // Settings Panel SetTitle : 'Configurazioni', SetView : 'Vedi:', SetViewThumb : 'Anteprima', SetViewList : 'Lista', SetDisplay : 'Informazioni:', SetDisplayName : 'Nome del File', SetDisplayDate : 'Data', SetDisplaySize : 'Dimensione', SetSort : 'Ordina:', SetSortName : 'per Nome', SetSortDate : 'per Data', SetSortSize : 'per Dimensione', // Status Bar FilesCountEmpty : '<Nessun file>', FilesCountOne : '1 file', FilesCountMany : '%1 file', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'Impossibile completare la richiesta. (Errore %1)', Errors : { 10 : 'Commando non valido.', 11 : 'Il tipo di risorsa non è stato specificato nella richiesta.', 12 : 'Il tipo di risorsa richiesto non è valido.', 102 : 'Nome di file o cartella non valido.', 103 : 'Non è stato possibile completare la richiesta a causa di restrizioni di autorizazione.', 104 : 'Non è stato possibile completare la richiesta a causa di restrizioni nei permessi del file system.', 105 : 'L\'estensione del file non è valida.', 109 : 'Richiesta invalida.', 110 : 'Errore sconosciuto.', 115 : 'Un file o cartella con lo stesso nome è già esistente.', 116 : 'Cartella non trovata. Prego aggiornare e riprovare.', 117 : 'File non trovato. Prego aggirnare la lista dei file e riprovare.', 118 : 'Source and target paths are equal.', // MISSING 201 : 'Un file con lo stesso nome è già disponibile. Il file caricato è stato rinominato in "%1".', 202 : 'File invalido', 203 : 'File invalido. La dimensione del file eccede i limiti del sistema.', 204 : 'Il file caricato è corrotto.', 205 : 'Il folder temporario non è disponibile new server.', 206 : 'Upload annullato per motivi di sicurezza. Il file contiene dati in formatto HTML.', 207 : 'El fichero subido ha sido renombrado como "%1"', 300 : 'Moving file(s) failed.', // MISSING 301 : 'Copying file(s) failed.', // MISSING 500 : 'Questo programma è disabilitato per motivi di sicurezza. Prego contattare l\'amministratore del sistema e verificare le configurazioni di CKFinder.', 501 : 'Il supporto alle anteprime non è attivo.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Il nome del file non può essere vuoto', FileExists : 'File %s already exists', // MISSING FolderEmpty : 'Il nome della cartella non può essere vuoto', FileInvChar : 'I seguenti caratteri non possono essere usati per comporre il nome del file: \n\\ / : * ? " < > |', FolderInvChar : 'I seguenti caratteri non possono essere usati per comporre il nome della cartella: \n\\ / : * ? " < > |', PopupBlockView : 'Non è stato possile aprire il file in una nuova finestra. Prego configurare il browser e disabilitare i blocchi delle popup.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Ridimensiona %s', sizeTooBig : 'Cannot set image height or width to a value bigger than the original size (%size).', // MISSING resizeSuccess : 'Image resized successfully.', // MISSING thumbnailNew : 'Create new thumbnail', // MISSING thumbnailSmall : 'Piccolo (%s)', thumbnailMedium : 'Medio (%s)', thumbnailLarge : 'Grande (%s)', newSize : 'Nuove dimensioni', width : 'Larghezza', height : 'Altezza', invalidHeight : 'Invalid height.', // MISSING invalidWidth : 'Invalid width.', // MISSING invalidName : 'Invalid file name.', // MISSING newImage : 'Crea nuova immagine', noExtensionChange : 'L\'estensione del file non può essere cambiata.', imageSmall : 'Source image is too small', // MISSING contextMenuName : 'Ridimensiona' }, // Fileeditor plugin Fileeditor : { save : 'Salva', fileOpenError : 'Non è stato possibile aprire il file.', fileSaveSuccess : 'File saved successfully.', // MISSING contextMenuName : 'Modifica', loadingFile : 'Attendere prego. Caricamento del file in corso...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the German * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['de'] = { appTitle : 'CKFinder', // MISSING // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING ok : 'OK', // MISSING cancel : 'Cancel', // MISSING confirmationTitle : 'Confirmation', // MISSING messageTitle : 'Information', // MISSING inputTitle : 'Question', // MISSING undo : 'Undo', // MISSING redo : 'Redo', // MISSING skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', // MISSING HelpLang : 'en', LangCode : 'de', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'd.m.yyyy H:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Verzeichnisse', FolderLoading : 'Laden...', FolderNew : 'Bitte geben Sie den neuen Verzeichnisnamen an: ', FolderRename : 'Bitte geben Sie den neuen Verzeichnisnamen an: ', FolderDelete : 'Wollen Sie wirklich den Ordner "%1" löschen?', FolderRenaming : ' (Umbenennen...)', FolderDeleting : ' (Löschen...)', // Files FileRename : 'Bitte geben Sie den neuen Dateinamen an: ', FileRenameExt : 'Wollen Sie wirklich die Dateierweiterung ändern? Die Datei könnte unbrauchbar werden!', FileRenaming : 'Umbennenen...', FileDelete : 'Wollen Sie wirklich die Datei "%1" löschen?', FilesLoading : 'Loading...', // MISSING FilesEmpty : 'Empty folder', // MISSING FilesMoved : 'File %1 moved into %2:%3', // MISSING FilesCopied : 'File %1 copied into %2:%3', // MISSING // Basket BasketFolder : 'Basket', // MISSING BasketClear : 'Clear Basket', // MISSING BasketRemove : 'Remove from basket', // MISSING BasketOpenFolder : 'Open parent folder', // MISSING BasketTruncateConfirm : 'Do you really want to remove all files from the basket?', // MISSING BasketRemoveConfirm : 'Do you really want to remove the file "%1" from the basket?', // MISSING BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copy Files from Basket', // MISSING BasketMoveFilesHere : 'Move Files from Basket', // MISSING BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'The following files were moved: %s', // MISSING BasketPasteCopySuccess : 'The following files were copied: %s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Hochladen', UploadTip : 'Neue Datei hochladen', Refresh : 'Aktualisieren', Settings : 'Einstellungen', Help : 'Hilfe', HelpTip : 'Hilfe', // Context Menus Select : 'Auswählen', SelectThumbnail : 'Miniatur auswählen', View : 'Ansehen', Download : 'Herunterladen', NewSubFolder : 'Neues Unterverzeichnis', Rename : 'Umbenennen', Delete : 'Löschen', CopyDragDrop : 'Copy file here', // MISSING MoveDragDrop : 'Move file here', // MISSING // Dialogs RenameDlgTitle : 'Rename', // MISSING NewNameDlgTitle : 'New name', // MISSING FileExistsDlgTitle : 'File already exists', // MISSING SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Overwrite', // MISSING FileAutorename : 'Auto-rename', // MISSING // Generic OkBtn : 'OK', CancelBtn : 'Abbrechen', CloseBtn : 'Schließen', // Upload Panel UploadTitle : 'Neue Datei hochladen', UploadSelectLbl : 'Bitte wählen Sie die Datei aus', UploadProgressLbl : '(Die Daten werden übertragen, bitte warten...)', UploadBtn : 'Ausgewählte Datei hochladen', UploadBtnCancel : 'Cancel', // MISSING UploadNoFileMsg : 'Bitte wählen Sie eine Datei auf Ihrem Computer aus', UploadNoFolder : 'Please select folder before uploading.', // MISSING UploadNoPerms : 'File upload not allowed.', // MISSING UploadUnknError : 'Error sending the file.', // MISSING UploadExtIncorrect : 'File extension not allowed in this folder.', // MISSING // Settings Panel SetTitle : 'Einstellungen', SetView : 'Ansicht:', SetViewThumb : 'Miniaturansicht', SetViewList : 'Liste', SetDisplay : 'Anzeige:', SetDisplayName : 'Dateiname', SetDisplayDate : 'Datum', SetDisplaySize : 'Dateigröße', SetSort : 'Sortierung:', SetSortName : 'nach Dateinamen', SetSortDate : 'nach Datum', SetSortSize : 'nach Größe', // Status Bar FilesCountEmpty : '<Leeres Verzeichnis>', FilesCountOne : '1 Datei', FilesCountMany : '%1 Datei', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'Ihre Anfrage konnte nicht bearbeitet werden. (Fehler %1)', Errors : { 10 : 'Unbekannter Befehl.', 11 : 'Der Ressourcentyp wurde nicht spezifiziert.', 12 : 'Der Ressourcentyp ist nicht gültig.', 102 : 'Ungültiger Datei oder Verzeichnisname.', 103 : 'Ihre Anfrage konnte wegen Authorisierungseinschränkungen nicht durchgeführt werden.', 104 : 'Ihre Anfrage konnte wegen Dateisystemeinschränkungen nicht durchgeführt werden.', 105 : 'Invalid file extension.', 109 : 'Unbekannte Anfrage.', 110 : 'Unbekannter Fehler.', 115 : 'Es existiert bereits eine Datei oder ein Ordner mit dem gleichen Namen.', 116 : 'Verzeichnis nicht gefunden. Bitte aktualisieren Sie die Anzeige und versuchen es noch einmal.', 117 : 'Datei nicht gefunden. Bitte aktualisieren Sie die Dateiliste und versuchen es noch einmal.', 118 : 'Source and target paths are equal.', // MISSING 201 : 'Es existiert bereits eine Datei unter gleichem Namen. Die hochgeladene Datei wurde unter "%1" gespeichert.', 202 : 'Ungültige Datei', 203 : 'ungültige Datei. Die Dateigröße ist zu groß.', 204 : 'Die hochgeladene Datei ist korrupt.', 205 : 'Es existiert kein temp. Ordner für das Hochladen auf den Server.', 206 : 'Das Hochladen wurde aus Sicherheitsgründen abgebrochen. Die Datei enthält HTML-Daten.', 207 : 'Die hochgeladene Datei wurde unter "%1" gespeichert.', 300 : 'Moving file(s) failed.', // MISSING 301 : 'Copying file(s) failed.', // MISSING 500 : 'Der Dateibrowser wurde aus Sicherheitsgründen deaktiviert. Bitte benachrichtigen Sie Ihren Systemadministrator und prüfen Sie die Konfigurationsdatei.', 501 : 'Die Miniaturansicht wurde deaktivert.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Der Dateinamen darf nicht leer sein', FileExists : 'File %s already exists', // MISSING FolderEmpty : 'Der Verzeichnisname darf nicht leer sein', FileInvChar : 'Der Dateinamen darf nicht eines der folgenden Zeichen enthalten: \n\\ / : * ? " < > |', FolderInvChar : 'Der Verzeichnisname darf nicht eines der folgenden Zeichen enthalten: \n\\ / : * ? " < > |', PopupBlockView : 'Die Datei konnte nicht in einem neuen Fenster geöffnet werden. Bitte deaktivieren Sie in Ihrem Browser alle Popup-Blocker für diese Seite.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Resize %s', // MISSING sizeTooBig : 'Cannot set image height or width to a value bigger than the original size (%size).', // MISSING resizeSuccess : 'Image resized successfully.', // MISSING thumbnailNew : 'Create new thumbnail', // MISSING thumbnailSmall : 'Small (%s)', // MISSING thumbnailMedium : 'Medium (%s)', // MISSING thumbnailLarge : 'Large (%s)', // MISSING newSize : 'Set new size', // MISSING width : 'Width', // MISSING height : 'Height', // MISSING invalidHeight : 'Invalid height.', // MISSING invalidWidth : 'Invalid width.', // MISSING invalidName : 'Invalid file name.', // MISSING newImage : 'Create new image', // MISSING noExtensionChange : 'The file extension cannot be changed.', // MISSING imageSmall : 'Source image is too small', // MISSING contextMenuName : 'Resize' // MISSING }, // Fileeditor plugin Fileeditor : { save : 'Save', // MISSING fileOpenError : 'Unable to open file.', // MISSING fileSaveSuccess : 'File saved successfully.', // MISSING contextMenuName : 'Edit', // MISSING loadingFile : 'Loading file, please wait...' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Polish * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['pl'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, wyłączone</span>', confirmCancel : 'Pewne opcje zostały zmienione. Czy na pewno zamknąć okno dialogowe?', ok : 'OK', cancel : 'Anuluj', confirmationTitle : 'Potwierdzenie', messageTitle : 'Informacja', inputTitle : 'Pytanie', undo : 'Cofnij', redo : 'Ponów', skip : 'Pomiń', skipAll : 'Pomiń wszystkie', makeDecision : 'Wybierz jedną z opcji:', rememberDecision: 'Zapamiętaj mój wybór' }, dir : 'ltr', HelpLang : 'pl', LangCode : 'pl', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'yyyy-mm-dd HH:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Katalogi', FolderLoading : 'Ładowanie...', FolderNew : 'Podaj nazwę nowego katalogu: ', FolderRename : 'Podaj nową nazwę katalogu: ', FolderDelete : 'Czy na pewno chcesz usunąć katalog "%1"?', FolderRenaming : ' (Zmieniam nazwę...)', FolderDeleting : ' (Kasowanie...)', // Files FileRename : 'Podaj nową nazwę pliku: ', FileRenameExt : 'Czy na pewno chcesz zmienić rozszerzenie pliku? Może to spowodować problemy z otwieraniem pliku przez innych użytkowników', FileRenaming : 'Zmieniam nazwę...', FileDelete : 'Czy na pewno chcesz usunąć plik "%1"?', FilesLoading : 'Ładowanie...', FilesEmpty : 'Katalog jest pusty', FilesMoved : 'Plik %1 został przeniesiony do %2:%3', FilesCopied : 'Plik %1 został skopiowany do %2:%3', // Basket BasketFolder : 'Koszyk', BasketClear : 'Wyczyść koszyk', BasketRemove : 'Usuń z koszyka', BasketOpenFolder : 'Otwórz katalog z plikiem', BasketTruncateConfirm : 'Czy naprawdę chcesz usunąć wszystkie pliki z koszyka?', BasketRemoveConfirm : 'Czy naprawdę chcesz usunąć plik "%1" z koszyka?', BasketEmpty : 'Brak plików w koszyku, aby dodać plik, przeciągnij i upuść (drag\'n\'drop) dowolny plik do koszyka.', BasketCopyFilesHere : 'Skopiuj pliki z koszyka', BasketMoveFilesHere : 'Przenieś pliki z koszyka', BasketPasteErrorOther : 'Plik: %s błąd: %e', BasketPasteMoveSuccess : 'Następujące pliki zostały przeniesione: %s', BasketPasteCopySuccess : 'Następujące pliki zostały skopiowane: %s', // Toolbar Buttons (some used elsewhere) Upload : 'Wyślij', UploadTip : 'Wyślij plik', Refresh : 'Odśwież', Settings : 'Ustawienia', Help : 'Pomoc', HelpTip : 'Wskazówka', // Context Menus Select : 'Wybierz', SelectThumbnail : 'Wybierz miniaturkę', View : 'Zobacz', Download : 'Pobierz', NewSubFolder : 'Nowy podkatalog', Rename : 'Zmień nazwę', Delete : 'Usuń', CopyDragDrop : 'Skopiuj tutaj plik', MoveDragDrop : 'Przenieś tutaj plik', // Dialogs RenameDlgTitle : 'Zmiana nazwy', NewNameDlgTitle : 'Nowa nazwa', FileExistsDlgTitle : 'Plik już istnieje', SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Nadpisz', FileAutorename : 'Zmień automatycznie nazwę', // Generic OkBtn : 'OK', CancelBtn : 'Anuluj', CloseBtn : 'Zamknij', // Upload Panel UploadTitle : 'Wyślij plik', UploadSelectLbl : 'Wybierz plik', UploadProgressLbl : '(Trwa wysyłanie pliku, proszę czekać...)', UploadBtn : 'Wyślij wybrany plik', UploadBtnCancel : 'Anuluj', UploadNoFileMsg : 'Wybierz plik ze swojego komputera', UploadNoFolder : 'Wybierz katalog przed wysłaniem pliku.', UploadNoPerms : 'Wysyłanie plików nie jest dozwolone.', UploadUnknError : 'Błąd podczas wysyłania pliku.', UploadExtIncorrect : 'Rozszerzenie pliku nie jest dozwolone w tym katalogu.', // Settings Panel SetTitle : 'Ustawienia', SetView : 'Widok:', SetViewThumb : 'Miniaturki', SetViewList : 'Lista', SetDisplay : 'Wyświetlanie:', SetDisplayName : 'Nazwa pliku', SetDisplayDate : 'Data', SetDisplaySize : 'Rozmiar pliku', SetSort : 'Sortowanie:', SetSortName : 'wg nazwy pliku', SetSortDate : 'wg daty', SetSortSize : 'wg rozmiaru', // Status Bar FilesCountEmpty : '<Pusty katalog>', FilesCountOne : '1 plik', FilesCountMany : 'Ilość plików: %1', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'Wykonanie operacji zakończyło się niepowodzeniem. (Błąd %1)', Errors : { 10 : 'Nieprawidłowe polecenie (command).', 11 : 'Brak wymaganego parametru: źródło danych (type).', 12 : 'Nieprawidłowe źródło danych (type).', 102 : 'Nieprawidłowa nazwa pliku lub katalogu.', 103 : 'Wykonanie operacji nie jest możliwe: brak autoryzacji.', 104 : 'Wykonanie operacji nie powiodło się z powodu niewystarczających uprawnień do systemu plików.', 105 : 'Nieprawidłowe rozszerzenie.', 109 : 'Nieprawiłowe polecenie.', 110 : 'Niezidentyfikowany błąd.', 115 : 'Plik lub katalog o podanej nazwie już istnieje.', 116 : 'Nie znaleziono katalogu. Odśwież panel i spróbuj ponownie.', 117 : 'Nie znaleziono pliku. Odśwież listę plików i spróbuj ponownie.', 118 : 'Ścieżki źródłowa i docelowa są jednakowe.', 201 : 'Plik o podanej nazwie już istnieje. Nazwa przesłanego pliku została zmieniona na "%1"', 202 : 'Nieprawidłowy plik.', 203 : 'Nieprawidłowy plik. Plik przekroczył dozwolony rozmiar.', 204 : 'Przesłany plik jest uszkodzony.', 205 : 'Brak folderu tymczasowego na serwerze do przesyłania plików.', 206 : 'Przesyłanie pliku zakończyło się niepowodzeniem z powodów bezpieczeństwa. Plik zawiera dane przypominające HTML.', 207 : 'Nazwa przesłanego pliku została zmieniona na "%1"', 300 : 'Przenoszenie nie powiodło się.', 301 : 'Kopiowanie nie powiodo się.', 500 : 'Menedżer plików jest wyłączony z powodów bezpieczeństwa. Skontaktuj się z administratorem oraz sprawdź plik konfiguracyjny CKFindera.', 501 : 'Tworzenie miniaturek jest wyłączone.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Nazwa pliku nie może być pusta', FileExists : 'Plik %s już istnieje', FolderEmpty : 'Nazwa katalogu nie może być pusta', FileInvChar : 'Nazwa pliku nie może zawierać żadnego z podanych znaków: \n\\ / : * ? " < > |', FolderInvChar : 'Nazwa katalogu nie może zawierać żadnego z podanych znaków: \n\\ / : * ? " < > |', PopupBlockView : 'Otwarcie pliku w nowym oknie nie powiodło się. Proszę zmienić konfigurację przeglądarki i wyłączyć wszelkie blokady okienek popup dla tej strony.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Zmiana rozmiaru %s', sizeTooBig : 'Nie możesz zmienić wysokości lub szerokości na wartośc wyższą niż oryginalny rozmiar (%size).', resizeSuccess : 'Obrazek został pomyślnie przeskalowany.', thumbnailNew : 'Utwórz nową miniaturkę', thumbnailSmall : 'Mały (%s)', thumbnailMedium : 'Średni (%s)', thumbnailLarge : 'Duży (%s)', newSize : 'Podaj nowe wymiary', width : 'Szerokość', height : 'Wysokość', invalidHeight : 'Nieprawidłowa wysokość.', invalidWidth : 'Nieprawidłowa szerokość.', invalidName : 'Nieprawidłowa nazwa pliku.', newImage : 'Utwórz nowy obrazek', noExtensionChange : 'Rozszerzenie pliku nie może zostac zmienione.', imageSmall : 'Plik źródłowy jest zbyt mały', contextMenuName : 'Zmień rozmiar' }, // Fileeditor plugin Fileeditor : { save : 'Zapisz', fileOpenError : 'Nie udało się otworzyć pliku.', fileSaveSuccess : 'Plik został zapisany pomyślnie.', contextMenuName : 'Edytuj', loadingFile : 'Trwa ładowanie pliku, proszę czekać...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['hu'] = { appTitle : 'CKFinder', // MISSING // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING ok : 'OK', // MISSING cancel : 'Cancel', // MISSING confirmationTitle : 'Confirmation', // MISSING messageTitle : 'Information', // MISSING inputTitle : 'Question', // MISSING undo : 'Undo', // MISSING redo : 'Redo', // MISSING skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', // MISSING HelpLang : 'en', LangCode : 'hu', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'yyyy. m. d. HH:MM', DateAmPm : ['de.', 'du.'], // Folders FoldersTitle : 'Mappák', FolderLoading : 'Betöltés...', FolderNew : 'Kérjük adja meg a mappa nevét: ', FolderRename : 'Kérjük adja meg a mappa új nevét: ', FolderDelete : 'Biztosan törölni szeretné a következő mappát: "%1"?', FolderRenaming : ' (átnevezés...)', FolderDeleting : ' (törlés...)', // Files FileRename : 'Kérjük adja meg a fájl új nevét: ', FileRenameExt : 'Biztosan szeretné módosítani a fájl kiterjesztését? A fájl esetleg használhatatlan lesz.', FileRenaming : 'Átnevezés...', FileDelete : 'Biztosan törölni szeretné a következő fájlt: "%1"?', FilesLoading : 'Loading...', // MISSING FilesEmpty : 'Empty folder', // MISSING FilesMoved : 'File %1 moved into %2:%3', // MISSING FilesCopied : 'File %1 copied into %2:%3', // MISSING // Basket BasketFolder : 'Basket', // MISSING BasketClear : 'Clear Basket', // MISSING BasketRemove : 'Remove from basket', // MISSING BasketOpenFolder : 'Open parent folder', // MISSING BasketTruncateConfirm : 'Do you really want to remove all files from the basket?', // MISSING BasketRemoveConfirm : 'Do you really want to remove the file "%1" from the basket?', // MISSING BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copy Files from Basket', // MISSING BasketMoveFilesHere : 'Move Files from Basket', // MISSING BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'The following files were moved: %s', // MISSING BasketPasteCopySuccess : 'The following files were copied: %s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Feltöltés', UploadTip : 'Új fájl feltöltése', Refresh : 'Frissítés', Settings : 'Beállítások', Help : 'Súgó', HelpTip : 'Súgó (angolul)', // Context Menus Select : 'Kiválaszt', SelectThumbnail : 'Bélyegkép kiválasztása', View : 'Megtekintés', Download : 'Letöltés', NewSubFolder : 'Új almappa', Rename : 'Átnevezés', Delete : 'Törlés', CopyDragDrop : 'Copy file here', // MISSING MoveDragDrop : 'Move file here', // MISSING // Dialogs RenameDlgTitle : 'Rename', // MISSING NewNameDlgTitle : 'New name', // MISSING FileExistsDlgTitle : 'File already exists', // MISSING SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Overwrite', // MISSING FileAutorename : 'Auto-rename', // MISSING // Generic OkBtn : 'OK', CancelBtn : 'Mégsem', CloseBtn : 'Bezárás', // Upload Panel UploadTitle : 'Új fájl feltöltése', UploadSelectLbl : 'Válassza ki a feltölteni kívánt fájlt', UploadProgressLbl : '(A feltöltés folyamatban, kérjük várjon...)', UploadBtn : 'A kiválasztott fájl feltöltése', UploadBtnCancel : 'Cancel', // MISSING UploadNoFileMsg : 'Kérjük válassza ki a fájlt a számítógépéről', UploadNoFolder : 'Please select folder before uploading.', // MISSING UploadNoPerms : 'File upload not allowed.', // MISSING UploadUnknError : 'Error sending the file.', // MISSING UploadExtIncorrect : 'File extension not allowed in this folder.', // MISSING // Settings Panel SetTitle : 'Beállítások', SetView : 'Nézet:', SetViewThumb : 'bélyegképes', SetViewList : 'listás', SetDisplay : 'Megjelenik:', SetDisplayName : 'fájl neve', SetDisplayDate : 'dátum', SetDisplaySize : 'fájlméret', SetSort : 'Rendezés:', SetSortName : 'fájlnév', SetSortDate : 'dátum', SetSortSize : 'méret', // Status Bar FilesCountEmpty : '<üres mappa>', FilesCountOne : '1 fájl', FilesCountMany : '%1 fájl', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'A parancsot nem sikerült végrehajtani. (Hiba: %1)', Errors : { 10 : 'Érvénytelen parancs.', 11 : 'A fájl típusa nem lett a kérés során beállítva.', 12 : 'A kívánt fájl típus érvénytelen.', 102 : 'Érvénytelen fájl vagy könyvtárnév.', 103 : 'Hitelesítési problémák miatt nem sikerült a kérést teljesíteni.', 104 : 'Jogosultsági problémák miatt nem sikerült a kérést teljesíteni.', 105 : 'Érvénytelen fájl kiterjesztés.', 109 : 'Érvénytelen kérés.', 110 : 'Ismeretlen hiba.', 115 : 'A fálj vagy mappa már létezik ezen a néven.', 116 : 'Mappa nem található. Kérjük frissítsen és próbálja újra.', 117 : 'Fájl nem található. Kérjük frissítsen és próbálja újra.', 118 : 'Source and target paths are equal.', // MISSING 201 : 'Ilyen nevű fájl már létezett. A feltöltött fájl a következőre lett átnevezve: "%1"', 202 : 'Érvénytelen fájl', 203 : 'Érvénytelen fájl. A fájl mérete túl nagy.', 204 : 'A feltöltött fájl hibás.', 205 : 'A szerveren nem található a feltöltéshez ideiglenes mappa.', 206 : 'A feltöltés biztonsági okok miatt meg lett szakítva. The file contains HTML like data.', 207 : 'El fichero subido ha sido renombrado como "%1"', 300 : 'Moving file(s) failed.', // MISSING 301 : 'Copying file(s) failed.', // MISSING 500 : 'A fájl-tallózó biztonsági okok miatt nincs engedélyezve. Kérjük vegye fel a kapcsolatot a rendszer üzemeltetőjével és ellenőrizze a CKFinder konfigurációs fájlt.', 501 : 'A bélyegkép támogatás nincs engedélyezve.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'A fájl neve nem lehet üres', FileExists : 'File %s already exists', // MISSING FolderEmpty : 'A mappa neve nem lehet üres', FileInvChar : 'A fájl neve nem tartalmazhatja a következő karaktereket: \n\\ / : * ? " < > |', FolderInvChar : 'A mappa neve nem tartalmazhatja a következő karaktereket: \n\\ / : * ? " < > |', PopupBlockView : 'A felugró ablak megnyitása nem sikerült. Kérjük ellenőrizze a böngészője beállításait és tiltsa le a felugró ablakokat blokkoló alkalmazásait erre a honlapra.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Resize %s', // MISSING sizeTooBig : 'Cannot set image height or width to a value bigger than the original size (%size).', // MISSING resizeSuccess : 'Image resized successfully.', // MISSING thumbnailNew : 'Create new thumbnail', // MISSING thumbnailSmall : 'Small (%s)', // MISSING thumbnailMedium : 'Medium (%s)', // MISSING thumbnailLarge : 'Large (%s)', // MISSING newSize : 'Set new size', // MISSING width : 'Width', // MISSING height : 'Height', // MISSING invalidHeight : 'Invalid height.', // MISSING invalidWidth : 'Invalid width.', // MISSING invalidName : 'Invalid file name.', // MISSING newImage : 'Create new image', // MISSING noExtensionChange : 'The file extension cannot be changed.', // MISSING imageSmall : 'Source image is too small', // MISSING contextMenuName : 'Resize' // MISSING }, // Fileeditor plugin Fileeditor : { save : 'Save', // MISSING fileOpenError : 'Unable to open file.', // MISSING fileSaveSuccess : 'File saved successfully.', // MISSING contextMenuName : 'Edit', // MISSING loadingFile : 'Loading file, please wait...' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Russian * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['ru'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, недоступно</span>', confirmCancel : 'Внесенные вами изменения будут утеряны. Вы уверены?', ok : 'OK', cancel : 'Отмена', confirmationTitle : 'Подтверждение', messageTitle : 'Информация', inputTitle : 'Вопрос', undo : 'Отменить', redo : 'Повторить', skip : 'Пропустить', skipAll : 'Пропустить все', makeDecision : 'Что следует сделать?', rememberDecision: 'Запомнить мой выбор' }, dir : 'ltr', HelpLang : 'en', LangCode : 'ru', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'dd.mm.yyyy H:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Папки', FolderLoading : 'Загрузка...', FolderNew : 'Пожалуйста, введите новое имя папки: ', FolderRename : 'Пожалуйста, введите новое имя папки: ', FolderDelete : 'Вы уверены, что хотите удалить папку "%1"?', FolderRenaming : ' (Переименовываю...)', FolderDeleting : ' (Удаляю...)', // Files FileRename : 'Пожалуйста, введите новое имя файла: ', FileRenameExt : 'Вы уверены, что хотите изменить расширение файла? Файл может стать недоступным', FileRenaming : 'Переименовываю...', FileDelete : 'Вы уверены, что хотите удалить файл "%1"?', FilesLoading : 'Загрузка...', FilesEmpty : 'Пустая папка', FilesMoved : 'Файл %1 перемещен в %2:%3', FilesCopied : 'Файл %1 скопирован в %2:%3', // Basket BasketFolder : 'Корзина', BasketClear : 'Очистить корзину', BasketRemove : 'Убрать из корзины', BasketOpenFolder : 'Перейти в папку этого файла', BasketTruncateConfirm : 'Вы точно хотите очистить корзину?', BasketRemoveConfirm : 'Вы точно хотите убрать файл "%1" из корзины?', BasketEmpty : 'В корзине пока нет файлов, добавьте новые с помощью драг-н-дропа (перетащите файл в корзину).', BasketCopyFilesHere : 'Скопировать файл из корзины', BasketMoveFilesHere : 'Переместить файл из корзины', BasketPasteErrorOther : 'Произошла ошибка при обработке файла %s: %e', BasketPasteMoveSuccess : 'Файлы перемещены: %s', BasketPasteCopySuccess : 'Файлы скопированы: %s', // Toolbar Buttons (some used elsewhere) Upload : 'Загрузка', UploadTip : 'Загрузить новый файл', Refresh : 'Обновить', Settings : 'Установки', Help : 'Помощь', HelpTip : 'Помощь', // Context Menus Select : 'Выбрать', SelectThumbnail : 'Выбрать миниатюру', View : 'Посмотреть', Download : 'Сохранить', NewSubFolder : 'Новая папка', Rename : 'Переименовать', Delete : 'Удалить', CopyDragDrop : 'Копировать', MoveDragDrop : 'Переместить', // Dialogs RenameDlgTitle : 'Переименовать', NewNameDlgTitle : 'Новое имя', FileExistsDlgTitle : 'Файл уже существует', SysErrorDlgTitle : 'Системная ошибка', FileOverwrite : 'Заменить файл', FileAutorename : 'Автоматически переименовывать', // Generic OkBtn : 'ОК', CancelBtn : 'Отмена', CloseBtn : 'Закрыть', // Upload Panel UploadTitle : 'Загрузить новый файл', UploadSelectLbl : 'Выбрать файл для загрузки', UploadProgressLbl : '(Загрузка в процессе, пожалуйста подождите...)', UploadBtn : 'Загрузить выбранный файл', UploadBtnCancel : 'Отмена', UploadNoFileMsg : 'Пожалуйста, выберите файл на вашем компьютере', UploadNoFolder : 'Пожалуйста, выберите папку, в которую вы хотите закачать файл.', UploadNoPerms : 'Загрузка файлов запрещена.', UploadUnknError : 'Ошибка при передаче файла.', UploadExtIncorrect : 'В эту папку нельзя закачивать файлы с таким расширением.', // Settings Panel SetTitle : 'Установки', SetView : 'Просмотр:', SetViewThumb : 'Миниатюры', SetViewList : 'Список', SetDisplay : 'Отобразить:', SetDisplayName : 'Имя файла', SetDisplayDate : 'Дата', SetDisplaySize : 'Размер файла', SetSort : 'Сортировка:', SetSortName : 'по имени файла', SetSortDate : 'по дате', SetSortSize : 'по размеру', // Status Bar FilesCountEmpty : '<Пустая папка>', FilesCountOne : '1 файл', FilesCountMany : '%1 файлов', // Size and Speed Kb : '%1 кБ', KbPerSecond : '%1 кБ/с', // Connector Error Messages. ErrorUnknown : 'Невозможно завершить запрос. (Ошибка %1)', Errors : { 10 : 'Неверная команда.', 11 : 'Тип ресурса не указан в запросе.', 12 : 'Неверный запрошенный тип ресурса.', 102 : 'Неверное имя файла или папки.', 103 : 'Невозможно завершить запрос из-за ограничений авторизации.', 104 : 'Невозможно завершить запрос из-за ограничения разрешений файловой системы.', 105 : 'Неверное расширение файла.', 109 : 'Неверный запрос.', 110 : 'Неизвестная ошибка.', 115 : 'Файл или папка с таким именем уже существует.', 116 : 'Папка не найдена. Пожалуйста, обновите вид папок и попробуйте еще раз.', 117 : 'Файл не найден. Пожалуйста, обновите список файлов и попробуйте еще раз.', 118 : 'Исходное расположение файла совпадает с указанным.', 201 : 'Файл с таким именем уже существует. Загруженный файл был переименован в "%1"', 202 : 'Неверный файл', 203 : 'Неверный файл. Размер файла слишком большой.', 204 : 'Загруженный файл поврежден.', 205 : 'Недоступна временная папка для загрузки файлов на сервер.', 206 : 'Загрузка отменена из-за соображений безопасности. Файл содержит похожие на HTML данные.', 207 : 'Загруженный файл был переименован в "%1"', 300 : 'Произошла ошибка при перемещении файла(ов).', 301 : 'Произошла ошибка при копировании файла(ов).', 500 : 'Браузер файлов отключен из-за соображений безопасности. Пожалуйста, сообщите вашему системному администратру и проверьте конфигурационный файл CKFinder.', 501 : 'Поддержка миниатюр отключена.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Имя файла не может быть пустым', FileExists : 'Файл %s уже существует', FolderEmpty : 'Имя папки не может быть пустым', FileInvChar : 'Имя файла не может содержать любой из перечисленных символов: \n\\ / : * ? " < > |', FolderInvChar : 'Имя папки не может содержать любой из перечисленных символов: \n\\ / : * ? " < > |', PopupBlockView : 'Невозможно открыть файл в новом окне. Пожалуйста, проверьте настройки браузера и отключите все блокировки всплывающих окон для этого сайта.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Изменить размеры %s', sizeTooBig : 'Нельзя указывать размеры больше, чем у оригинального файла (%size).', resizeSuccess : 'Размеры успешно изменены.', thumbnailNew : 'Создать миниатюру(ы)', thumbnailSmall : 'Маленькая (%s)', thumbnailMedium : 'Средняя (%s)', thumbnailLarge : 'Большая (%s)', newSize : 'Установить новые размеры', width : 'Ширина', height : 'Высота', invalidHeight : 'Высота должна быть числом больше нуля.', invalidWidth : 'Ширина должна быть числом больше нуля.', invalidName : 'Неверное имя файла.', newImage : 'Сохранить как новый файл', noExtensionChange : 'Не удалось поменять расширение файла.', imageSmall : 'Исходная картинка слишком маленькая', contextMenuName : 'Изменить размер' }, // Fileeditor plugin Fileeditor : { save : 'Сохранить', fileOpenError : 'Не удалось открыть файл.', fileSaveSuccess : 'Файл успешно сохранен.', contextMenuName : 'Редактировать', loadingFile : 'Файл загружается, пожалуйста подождите...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Swedish * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['sv'] = { appTitle : 'CKFinder', // MISSING // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING ok : 'OK', // MISSING cancel : 'Cancel', // MISSING confirmationTitle : 'Confirmation', // MISSING messageTitle : 'Information', // MISSING inputTitle : 'Question', // MISSING undo : 'Undo', // MISSING redo : 'Redo', // MISSING skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', // MISSING HelpLang : 'en', LangCode : 'en', // MISSING // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'yyyy-mm-dd HH:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Mappar', FolderLoading : 'Laddar...', FolderNew : 'Skriv namnet på den nya mappen: ', FolderRename : 'Skriv det nya namnet på mappen: ', FolderDelete : 'Är du säker på att du vill radera mappen "%1"?', FolderRenaming : ' (Byter mappens namn...)', FolderDeleting : ' (Raderar...)', // Files FileRename : 'Skriv det nya filnamnet: ', FileRenameExt : 'Är du säker på att du fill ändra på filändelsen? Filen kan bli oanvändbar', FileRenaming : 'Byter filnamn...', FileDelete : 'Är du säker på att du vill radera filen "%1"?', FilesLoading : 'Loading...', // MISSING FilesEmpty : 'Empty folder', // MISSING FilesMoved : 'File %1 moved into %2:%3', // MISSING FilesCopied : 'File %1 copied into %2:%3', // MISSING // Basket BasketFolder : 'Basket', // MISSING BasketClear : 'Clear Basket', // MISSING BasketRemove : 'Remove from basket', // MISSING BasketOpenFolder : 'Open parent folder', // MISSING BasketTruncateConfirm : 'Do you really want to remove all files from the basket?', // MISSING BasketRemoveConfirm : 'Do you really want to remove the file "%1" from the basket?', // MISSING BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copy Files from Basket', // MISSING BasketMoveFilesHere : 'Move Files from Basket', // MISSING BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'The following files were moved: %s', // MISSING BasketPasteCopySuccess : 'The following files were copied: %s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Ladda upp', UploadTip : 'Ladda upp en ny fil', Refresh : 'Uppdatera', Settings : 'Inställningar', Help : 'Hjälp', HelpTip : 'Hjälp', // Context Menus Select : 'Infoga bild', SelectThumbnail : 'Infoga som tumnagel', View : 'Visa', Download : 'Ladda ner', NewSubFolder : 'Ny Undermapp', Rename : 'Byt namn', Delete : 'Radera', CopyDragDrop : 'Copy file here', // MISSING MoveDragDrop : 'Move file here', // MISSING // Dialogs RenameDlgTitle : 'Rename', // MISSING NewNameDlgTitle : 'New name', // MISSING FileExistsDlgTitle : 'File already exists', // MISSING SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Overwrite', // MISSING FileAutorename : 'Auto-rename', // MISSING // Generic OkBtn : 'OK', CancelBtn : 'Avbryt', CloseBtn : 'Stäng', // Upload Panel UploadTitle : 'Ladda upp en ny fil', UploadSelectLbl : 'Välj fil att ladda upp', UploadProgressLbl : '(Laddar upp filen, var god vänta...)', UploadBtn : 'Ladda upp den valda filen', UploadBtnCancel : 'Cancel', // MISSING UploadNoFileMsg : 'Välj en fil från din dator', UploadNoFolder : 'Please select folder before uploading.', // MISSING UploadNoPerms : 'File upload not allowed.', // MISSING UploadUnknError : 'Error sending the file.', // MISSING UploadExtIncorrect : 'File extension not allowed in this folder.', // MISSING // Settings Panel SetTitle : 'Inställningar', SetView : 'Visa:', SetViewThumb : 'Tumnaglar', SetViewList : 'Lista', SetDisplay : 'Visa:', SetDisplayName : 'Filnamn', SetDisplayDate : 'Datum', SetDisplaySize : 'Filstorlek', SetSort : 'Sortering:', SetSortName : 'Filnamn', SetSortDate : 'Datum', SetSortSize : 'Storlek', // Status Bar FilesCountEmpty : '<Tom Mapp>', FilesCountOne : '1 fil', FilesCountMany : '%1 filer', // Size and Speed Kb : '%1 kB', // MISSING KbPerSecond : '%1 kB/s', // MISSING // Connector Error Messages. ErrorUnknown : 'Begäran kunde inte utföras eftersom ett fel uppstod. (Error %1)', Errors : { 10 : 'Ogiltig begäran.', 11 : 'Resursens typ var inte specificerad i förfrågan.', 12 : 'Den efterfrågade resurstypen är inte giltig.', 102 : 'Ogiltigt fil- eller mappnamn.', 103 : 'Begäran kunde inte utföras p.g.a. restriktioner av rättigheterna.', 104 : 'Begäran kunde inte utföras p.g.a. restriktioner av rättigheter i filsystemet.', 105 : 'Ogiltig filändelse.', 109 : 'Ogiltig begäran.', 110 : 'Okänt fel.', 115 : 'En fil eller mapp med aktuellt namn finns redan.', 116 : 'Mappen kunde inte hittas. Var god uppdatera sidan och försök igen.', 117 : 'Filen kunde inte hittas. Var god uppdatera sidan och försök igen.', 118 : 'Source and target paths are equal.', // MISSING 201 : 'En fil med aktuellt namn fanns redan. Den uppladdade filen har döpts om till "%1"', 202 : 'Ogiltig fil', 203 : 'Ogiltig fil. Filen var för stor.', 204 : 'Den uppladdade filen var korrupt.', 205 : 'En tillfällig mapp för uppladdning är inte tillgänglig på servern.', 206 : 'Uppladdningen stoppades av säkerhetsskäl. Filen innehåller HTML-liknande data.', 207 : 'Den uppladdade filen har döpts om till "%1"', 300 : 'Moving file(s) failed.', // MISSING 301 : 'Copying file(s) failed.', // MISSING 500 : 'Filhanteraren har stoppats av säkerhetsskäl. Var god kontakta administratören för att kontrollera konfigurationsfilen för CKFinder.', 501 : 'Stöd för tumnaglar har stängts av.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Filnamnet får inte vara tomt', FileExists : 'File %s already exists', // MISSING FolderEmpty : 'Mappens namn får inte vara tomt', FileInvChar : 'Filnamnet får inte innehålla något av följande tecken: \n\\ / : * ? " < > |', FolderInvChar : 'Mappens namn får inte innehålla något av följande tecken: \n\\ / : * ? " < > |', PopupBlockView : 'Det gick inte att öppna filen i ett nytt fönster. Ändra inställningarna i din webbläsare och tillåt popupfönster för den här hemsidan.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Resize %s', // MISSING sizeTooBig : 'Cannot set image height or width to a value bigger than the original size (%size).', // MISSING resizeSuccess : 'Image resized successfully.', // MISSING thumbnailNew : 'Create new thumbnail', // MISSING thumbnailSmall : 'Small (%s)', // MISSING thumbnailMedium : 'Medium (%s)', // MISSING thumbnailLarge : 'Large (%s)', // MISSING newSize : 'Set new size', // MISSING width : 'Width', // MISSING height : 'Height', // MISSING invalidHeight : 'Invalid height.', // MISSING invalidWidth : 'Invalid width.', // MISSING invalidName : 'Invalid file name.', // MISSING newImage : 'Create new image', // MISSING noExtensionChange : 'The file extension cannot be changed.', // MISSING imageSmall : 'Source image is too small', // MISSING contextMenuName : 'Resize' // MISSING }, // Fileeditor plugin Fileeditor : { save : 'Save', // MISSING fileOpenError : 'Unable to open file.', // MISSING fileSaveSuccess : 'File saved successfully.', // MISSING contextMenuName : 'Edit', // MISSING loadingFile : 'Loading file, please wait...' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the French * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['fr'] = { appTitle : 'CKFinder', // MISSING // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, Inaccessible</span>', confirmCancel : 'Certaines options ont été modifiées. Êtes vous sûr de vouloir fermer cette fenêtre ?', ok : 'OK', cancel : 'Annuler', confirmationTitle : 'Confirmation', messageTitle : 'Information', inputTitle : 'Question', undo : 'Annuler', redo : 'Rétablir', skip : 'Passer', skipAll : 'passer tout', makeDecision : 'Quelle action choisir ?', rememberDecision: 'Se rappeller de la décision' }, dir : 'ltr', HelpLang : 'en', LangCode : 'fr', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'dd/mm/yyyy H:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Dossiers', FolderLoading : 'Chargement...', FolderNew : 'Entrez le nouveau nom du dossier: ', FolderRename : 'Entrez le nouveau nom du dossier: ', FolderDelete : 'Êtes-vous sûr de vouloir effacer le dossier "%1" ?', FolderRenaming : ' (Renommage en cours...)', FolderDeleting : ' (Suppression en cours...)', // Files FileRename : 'Entrez le nouveau nom du fichier: ', FileRenameExt : 'Êtes-vous sûr de vouloir ¨changer l\'extension de ce fichier? Le fichier pourrait devenir inutilisable', FileRenaming : 'Renommage en cours...', FileDelete : 'Êtes-vous sûr de vouloir effacer le fichier "%1" ?', FilesLoading : 'Chargement...', FilesEmpty : 'Répertoire vide', FilesMoved : 'Fichier %1 déplacé vers %2:%3', FilesCopied : 'Fichier %1 copié vers %2:%3', // Basket BasketFolder : 'Corbeille', BasketClear : 'Vider la corbeille', BasketRemove : 'Retirer de la corbeille', BasketOpenFolder : 'Ouvrir le répertiore parent', BasketTruncateConfirm : 'Êtes vous sûr de vouloir supprimer tous les fichiers de la corbeille ?', BasketRemoveConfirm : 'Êtes vous sûr de vouloir supprimer le fichier "%1" de la corbeille ?', BasketEmpty : 'Aucun fichier dans la corbeille, déposez en queques uns.', BasketCopyFilesHere : 'Copier des fichiers depuis la corbeille', BasketMoveFilesHere : 'Déplacer des fichiers depuis la corbeille', BasketPasteErrorOther : 'Fichier %s erreur: %e', BasketPasteMoveSuccess : 'Les fichiers suivant ont été déplacés: %s', BasketPasteCopySuccess : 'Les fichiers suivant ont été copiés: %s', // Toolbar Buttons (some used elsewhere) Upload : 'Envoyer', UploadTip : 'Envoyer un nouveau fichier', Refresh : 'Rafraîchir', Settings : 'Configuration', Help : 'Aide', HelpTip : 'Aide', // Context Menus Select : 'Choisir', SelectThumbnail : 'Choisir une miniature', View : 'Voir', Download : 'Télécharger', NewSubFolder : 'Nouveau sous-dossier', Rename : 'Renommer', Delete : 'Effacer', CopyDragDrop : 'Copier les fichiers ici', MoveDragDrop : 'Déplacer les fichiers ici', // Dialogs RenameDlgTitle : 'Renommer', NewNameDlgTitle : 'Nouveau fichier', FileExistsDlgTitle : 'Fichier déjà existant', SysErrorDlgTitle : 'Erreur système', FileOverwrite : 'Ré-écrire', FileAutorename : 'Re-nommage automatique', // Generic OkBtn : 'OK', CancelBtn : 'Annuler', CloseBtn : 'Fermer', // Upload Panel UploadTitle : 'Envoyer un nouveau fichier', UploadSelectLbl : 'Sélectionner le fichier à télécharger', UploadProgressLbl : '(Envoi en cours, veuillez patienter...)', UploadBtn : 'Envoyer le fichier sélectionné', UploadBtnCancel : 'Annuler', UploadNoFileMsg : 'Sélectionner un fichier sur votre ordinateur', UploadNoFolder : 'Merci de sélectionner un répertoire avant l\'envoi.', UploadNoPerms : 'L\'envoi de fichier n\'est pas autorisé', UploadUnknError : 'Erreur pendant l\'envoi du fichier.', UploadExtIncorrect : 'L\'extension du fichier n\'est pas autorisée dans ce dossier.', // Settings Panel SetTitle : 'Configuration', SetView : 'Voir:', SetViewThumb : 'Miniatures', SetViewList : 'Liste', SetDisplay : 'Affichage:', SetDisplayName : 'Nom du fichier', SetDisplayDate : 'Date', SetDisplaySize : 'Taille du fichier', SetSort : 'Classement:', SetSortName : 'par Nom de Fichier', SetSortDate : 'par Date', SetSortSize : 'par Taille', // Status Bar FilesCountEmpty : '<Dossier Vide>', FilesCountOne : '1 fichier', FilesCountMany : '%1 fichiers', // Size and Speed Kb : '%1 ko', KbPerSecond : '%1 ko/s', // Connector Error Messages. ErrorUnknown : 'La demande n\'a pas abouti. (Erreur %1)', Errors : { 10 : 'Commande invalide.', 11 : 'Le type de ressource n\'a pas été spécifié dans la commande.', 12 : 'Le type de ressource n\'est pas valide.', 102 : 'Nom de fichier ou de dossier invalide.', 103 : 'La demande n\'a pas abouti : problème d\'autorisations.', 104 : 'La demande n\'a pas abouti : problème de restrictions de permissions.', 105 : 'Extension de fichier invalide.', 109 : 'Demande invalide.', 110 : 'Erreur inconnue.', 115 : 'Un fichier ou un dossier avec ce nom existe déjà.', 116 : 'Ce dossier n\'existe pas. Veuillez rafraîchir la page et réessayer.', 117 : 'Ce fichier n\'existe pas. Veuillez rafraîchir la page et réessayer.', 118 : 'Les chemins vers la source et la cible sont les mêmes.', 201 : 'Un fichier avec ce nom existe déjà. Le fichier téléversé a été renommé en "%1"', 202 : 'Fichier invalide', 203 : 'Fichier invalide. La taille est trop grande.', 204 : 'Le fichier téléversé est corrompu.', 205 : 'Aucun dossier temporaire n\'est disponible sur le serveur.', 206 : 'Envoi interrompu pour raisons de sécurité. Le fichier contient des données de type HTML.', 207 : 'El fichero subido ha sido renombrado como "%1"', 300 : 'Le déplacement des fichiers a échoué.', 301 : 'La copie des fichiers a échoué.', 500 : 'L\'interface de gestion des fichiers est désactivé. Contactez votre administrateur et vérifier le fichier de configuration de CKFinder.', 501 : 'La fonction "miniatures" est désactivée.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Le nom du fichier ne peut être vide', FileExists : 'Le fichier %s existes déjà', FolderEmpty : 'Le nom du dossier ne peut être vide', FileInvChar : 'Le nom du fichier ne peut pas contenir les charactères suivants : \n\\ / : * ? " < > |', FolderInvChar : 'Le nom du dossier ne peut pas contenir les charactères suivants : \n\\ / : * ? " < > |', PopupBlockView : 'Il n\'a pas été possible d\'ouvrir la nouvelle fenêtre. Désactiver votre bloqueur de fenêtres pour ce site.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Redimensionner %s', sizeTooBig : 'Impossible de modifier la hauteur ou la largeur de cette image pour une valeur plus grande que l\'original (%size).', resizeSuccess : 'L\'image a été redimensionné avec succès.', thumbnailNew : 'Créer une nouvelle vignette', thumbnailSmall : 'Petit (%s)', thumbnailMedium : 'Moyen (%s)', thumbnailLarge : 'Gros (%s)', newSize : 'Déterminer les nouvelles dimensions', width : 'Largeur', height : 'Hauteur', invalidHeight : 'Hauteur invalide.', invalidWidth : 'Largeur invalide.', invalidName : 'Nom de fichier incorrect.', newImage : 'Créer une nouvelle image', noExtensionChange : 'L\'extension du fichier ne peut pas être changé.', imageSmall : 'L\'image est trop petit', contextMenuName : 'Redimensionner' }, // Fileeditor plugin Fileeditor : { save : 'Sauvegarder', fileOpenError : 'Impossible d\'ouvrir le fichier', fileSaveSuccess : 'Fichier sauvegardé avec succès.', contextMenuName : 'Edition', loadingFile : 'Chargement du fichier, veuillez patientez...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Chinese-Simplified * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['zh-cn'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : '部分内容尚未保存,确定关闭对话框么?', ok : '确定', cancel : '取消', confirmationTitle : '确认', messageTitle : '提示', inputTitle : '询问', undo : '撤销', redo : '重做', skip : '跳过', skipAll : '全部跳过', makeDecision : '应采取何样措施?', rememberDecision: '下次不再询问' }, dir : '自左向右', HelpLang : 'en', LangCode : 'zh-cn', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'yyyy年m月d日 h:MM aa', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : '文件夹', FolderLoading : '正在加载文件夹...', FolderNew : '请输入新文件夹名称: ', FolderRename : '请输入新文件夹名称: ', FolderDelete : '您确定要删除文件夹 "%1" 吗?', FolderRenaming : ' (正在重命名...)', FolderDeleting : ' (正在删除...)', // Files FileRename : '请输入新文件名: ', FileRenameExt : '如果改变文件扩展名,可能会导致文件不可用。\r\n确定要更改吗?', FileRenaming : '正在重命名...', FileDelete : '您确定要删除文件 "%1" 吗?', FilesLoading : '加载中...', FilesEmpty : '空文件夹', FilesMoved : '文件 %1 已移动至 %2:%3', FilesCopied : '文件 %1 已拷贝至 %2:%3', // Basket BasketFolder : '临时文件夹', BasketClear : '清空临时文件夹', BasketRemove : '从临时文件夹移除', BasketOpenFolder : '打开临时文件夹', BasketTruncateConfirm : '确认清空临时文件夹?', BasketRemoveConfirm : '确认从临时文件夹中移除文件 "%1" ?', BasketEmpty : '临时文件夹为空, 可拖放文件至其中.', BasketCopyFilesHere : '从临时文件夹复制至此', BasketMoveFilesHere : '从临时文件夹移动至此', BasketPasteErrorOther : '文件 %s 出错: %e', BasketPasteMoveSuccess : '已移动以下文件: %s', BasketPasteCopySuccess : '已拷贝以下文件: %s', // Toolbar Buttons (some used elsewhere) Upload : '上传', UploadTip : '上传文件', Refresh : '刷新', Settings : '设置', Help : '帮助', HelpTip : '查看在线帮助', // Context Menus Select : '选择', SelectThumbnail : '选中缩略图', View : '查看', Download : '下载', NewSubFolder : '创建子文件夹', Rename : '重命名', Delete : '删除', CopyDragDrop : '将文件复制至此', MoveDragDrop : '将文件移动至此', // Dialogs RenameDlgTitle : '重命名', NewNameDlgTitle : '文件名', FileExistsDlgTitle : '文件已存在', SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : '自动覆盖重名', FileAutorename : '自动重命名重名', // Generic OkBtn : '确定', CancelBtn : '取消', CloseBtn : '关闭', // Upload Panel UploadTitle : '上传文件', UploadSelectLbl : '选定要上传的文件', UploadProgressLbl : '(正在上传文件,请稍候...)', UploadBtn : '上传选定的文件', UploadBtnCancel : '取消', UploadNoFileMsg : '请选择一个要上传的文件', UploadNoFolder : '需先选择一个文件.', UploadNoPerms : '无文件上传权限.', UploadUnknError : '上传文件出错.', UploadExtIncorrect : '此文件后缀在当前文件夹中不可用.', // Settings Panel SetTitle : '设置', SetView : '查看:', SetViewThumb : '缩略图', SetViewList : '列表', SetDisplay : '显示:', SetDisplayName : '文件名', SetDisplayDate : '日期', SetDisplaySize : '大小', SetSort : '排列顺序:', SetSortName : '按文件名', SetSortDate : '按日期', SetSortSize : '按大小', // Status Bar FilesCountEmpty : '<空文件夹>', FilesCountOne : '1 个文件', FilesCountMany : '%1 个文件', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : '请求的操作未能完成. (错误 %1)', Errors : { 10 : '无效的指令.', 11 : '文件类型不在许可范围之内.', 12 : '文件类型无效.', 102 : '无效的文件名或文件夹名称.', 103 : '由于作者限制,该请求不能完成.', 104 : '由于文件系统的限制,该请求不能完成.', 105 : '无效的扩展名.', 109 : '无效请求.', 110 : '未知错误.', 115 : '存在重名的文件或文件夹.', 116 : '文件夹不存在. 请刷新后再试.', 117 : '文件不存在. 请刷新列表后再试.', 118 : '目标位置与当前位置相同.', 201 : '文件与现有的重名. 新上传的文件改名为 "%1"', 202 : '无效的文件', 203 : '无效的文件. 文件尺寸太大.', 204 : '上传文件已损失.', 205 : '服务器中的上传临时文件夹无效.', 206 : '因为安全原因,上传中断. 上传文件包含不能 HTML 类型数据.', 207 : '新上传的文件改名为 "%1"', 300 : '移动文件失败.', 301 : '复制文件失败.', 500 : '因为安全原因,文件不可浏览. 请联系系统管理员并检查CKFinder配置文件.', 501 : '不支持缩略图方式.' }, // Other Error Messages. ErrorMsg : { FileEmpty : '文件名不能为空', FileExists : '文件 %s 已存在.', FolderEmpty : '文件夹名称不能为空', FileInvChar : '文件名不能包含以下字符: \n\\ / : * ? " < > |', FolderInvChar : '文件夹名称不能包含以下字符: \n\\ / : * ? " < > |', PopupBlockView : '未能在新窗口中打开文件. 请修改浏览器配置解除对本站点的锁定.' }, // Imageresize plugin Imageresize : { dialogTitle : '改变尺寸 %s', sizeTooBig : '无法大于原图尺寸 (%size).', resizeSuccess : '图像尺寸已修改.', thumbnailNew : '创建缩略图', thumbnailSmall : '小 (%s)', thumbnailMedium : '中 (%s)', thumbnailLarge : '大 (%s)', newSize : '设置新尺寸', width : '宽度', height : '高度', invalidHeight : '无效高度.', invalidWidth : '无效宽度.', invalidName : '文件名无效.', newImage : '创建图像', noExtensionChange : '无法改变文件后缀.', imageSmall : '原文件尺寸过小', contextMenuName : '改变尺寸' }, // Fileeditor plugin Fileeditor : { save : '保存', fileOpenError : '无法打开文件.', fileSaveSuccess : '成功保存文件.', contextMenuName : '编辑', loadingFile : '加载文件中...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the English * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['ja'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, は利用できません。</span>', confirmCancel : '変更された項目があります。ウィンドウを閉じてもいいですか?', ok : '適用', cancel : 'キャンセル', confirmationTitle : '確認', messageTitle : 'インフォメーション', inputTitle : '質問', undo : '元に戻す', redo : 'やり直す', skip : 'スキップ', skipAll : 'すべてスキップ', makeDecision : 'どうしますか?', rememberDecision: '注意:' }, dir : 'ltr', HelpLang : 'en', LangCode : 'ja', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'm/d/yyyy h:MM aa', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Folders', FolderLoading : '読み込み中...', FolderNew : '新しいフォルダ名を入力してください: ', FolderRename : '新しいフォルダ名を入力してください: ', FolderDelete : '本当にフォルダ「"%1"」を削除してもよろしいですか?', FolderRenaming : ' (リネーム中...)', FolderDeleting : ' (削除中...)', // Files FileRename : '新しいファイル名を入力してください: ', FileRenameExt : 'ファイルが使えなくなる可能性がありますが、本当に拡張子を変更してもよろしいですか?', FileRenaming : 'リネーム中...', FileDelete : '本当に「"%1"」を削除してもよろしいですか?', FilesLoading : '読み込み中...', FilesEmpty : 'ファイルがありません', FilesMoved : ' %1 は %2:%3 に移動されました', FilesCopied : ' %1 cは %2:%3 にコピーされました', // Basket BasketFolder : 'Basket', BasketClear : 'バスケットを空にする', BasketRemove : 'バスケットから削除', BasketOpenFolder : '親フォルダを開く', BasketTruncateConfirm : '本当にバスケットの中身を空にしますか?', BasketRemoveConfirm : '本当に「"%1"」をバスケットから削除しますか?', BasketEmpty : 'バスケットの中にファイルがありません。このエリアにドラッグ&ドロップして追加することができます。', BasketCopyFilesHere : 'バスケットからファイルをコピー', BasketMoveFilesHere : 'バスケットからファイルを移動', BasketPasteErrorOther : 'ファイル %s のエラー: %e', BasketPasteMoveSuccess : '以下のファイルが移動されました: %s', BasketPasteCopySuccess : '以下のファイルがコピーされました: %s', // Toolbar Buttons (some used elsewhere) Upload : 'アップロード', UploadTip : '新しいファイルのアップロード', Refresh : '表示の更新', Settings : 'カスタマイズ', Help : 'ヘルプ', HelpTip : 'ヘルプ', // Context Menus Select : 'この画像を選択', SelectThumbnail : 'この画像のサムネイルを選択', View : '画像だけを表示', Download : 'ダウンロード', NewSubFolder : '新しいフォルダに入れる', Rename : 'ファイル名の変更', Delete : '削除', CopyDragDrop : 'コピーするファイルをここにドロップしてください', MoveDragDrop : '移動するファイルをここにドロップしてください', // Dialogs RenameDlgTitle : 'リネーム', NewNameDlgTitle : '新しい名前', FileExistsDlgTitle : 'ファイルはすでに存在します。', SysErrorDlgTitle : 'システムエラー', FileOverwrite : '上書き', FileAutorename : 'A自動でリネーム', // Generic OkBtn : 'OK', CancelBtn : 'キャンセル', CloseBtn : '閉じる', // Upload Panel UploadTitle : 'ファイルのアップロード', UploadSelectLbl : 'アップロードするファイルを選択してください', UploadProgressLbl : '(ファイルのアップロード中...)', UploadBtn : 'アップロード', UploadBtnCancel : 'キャンセル', UploadNoFileMsg : 'ファイルを選んでください。', UploadNoFolder : 'アップロードの前にフォルダを選択してください。', UploadNoPerms : 'ファイルのアップロード権限がありません。', UploadUnknError : 'ファイルの送信に失敗しました。', UploadExtIncorrect : '選択されたファイルの拡張子は許可されていません。', // Settings Panel SetTitle : '表示のカスタマイズ', SetView : '表示方法:', SetViewThumb : 'サムネイル', SetViewList : '表示形式', SetDisplay : '表示する項目:', SetDisplayName : 'ファイル名', SetDisplayDate : '日時', SetDisplaySize : 'ファイルサイズ', SetSort : '表示の順番:', SetSortName : 'ファイル名', SetSortDate : '日付', SetSortSize : 'サイズ', // Status Bar FilesCountEmpty : '<フォルダ内にファイルがありません>', FilesCountOne : '1つのファイル', FilesCountMany : '%1個のファイル', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'リクエストの処理に失敗しました。 (Error %1)', Errors : { 10 : '不正なコマンドです。', 11 : 'リソースタイプが特定できませんでした。', 12 : '要求されたリソースのタイプが正しくありません。', 102 : 'ファイル名/フォルダ名が正しくありません。', 103 : 'リクエストを完了できませんでした。認証エラーです。', 104 : 'リクエストを完了できませんでした。ファイルのパーミッションが許可されていません。', 105 : '拡張子が正しくありません。', 109 : '不正なリクエストです。', 110 : '不明なエラーが発生しました。', 115 : '同じ名前のファイル/フォルダがすでに存在しています。', 116 : 'フォルダが見つかりませんでした。ページを更新して再度お試し下さい。', 117 : 'ファイルが見つかりませんでした。ページを更新して再度お試し下さい。', 118 : '対象が移動元と同じ場所を指定されています。', 201 : '同じ名前のファイルがすでに存在しています。"%1" にリネームして保存されました。', 202 : '不正なファイルです。', 203 : 'ファイルのサイズが大きすぎます。', 204 : 'アップロードされたファイルは壊れています。', 205 : 'サーバ内の一時作業フォルダが利用できません。', 206 : 'セキュリティ上の理由からアップロードが取り消されました。このファイルにはHTMLに似たデータが含まれています。', 207 : 'ファイルは "%1" にリネームして保存されました。', 300 : 'ファイルの移動に失敗しました。', 301 : 'ファイルのコピーに失敗しました。', 500 : 'ファイルブラウザはセキュリティ上の制限から無効になっています。システム担当者に連絡をして、CKFinderの設定をご確認下さい。', 501 : 'サムネイル機能は無効になっています。' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'ファイル名を入力してください', FileExists : ' %s はすでに存在しています。別の名前を入力してください。', FolderEmpty : 'フォルダ名を入力してください', FileInvChar : 'ファイルに以下の文字は使えません: \n\\ / : * ? " < > |', FolderInvChar : 'フォルダに以下の文字は使えません: \n\\ / : * ? " < > |', PopupBlockView : 'ファイルを新しいウィンドウで開くことに失敗しました。 お使いのブラウザの設定でポップアップをブロックする設定を解除してください。' }, // Imageresize plugin Imageresize : { dialogTitle : 'リサイズ: %s', sizeTooBig : 'オリジナルの画像よりも大きいサイズは指定できません。 (%size).', resizeSuccess : '画像のリサイズに成功しました', thumbnailNew : 'サムネイルをつくる', thumbnailSmall : '小 (%s)', thumbnailMedium : '中 (%s)', thumbnailLarge : '大 (%s)', newSize : 'Set new size', width : '幅', height : '高さ', invalidHeight : '高さの値が不正です。', invalidWidth : '幅の値が不正です。', invalidName : 'ファイル名が不正です。', newImage : '新しい画像を作成', noExtensionChange : '拡張子は変更できません。', imageSmall : '元画像が小さすぎます。', contextMenuName : 'リサイズ' }, // Fileeditor plugin Fileeditor : { save : '保存', fileOpenError : 'ファイルを開けませんでした。', fileSaveSuccess : 'ファイルの保存が完了しました。', contextMenuName : '編集', loadingFile : 'ファイルの読み込み中...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Slovak * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['sk'] = { appTitle : 'CKFinder', // MISSING // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING ok : 'OK', // MISSING cancel : 'Cancel', // MISSING confirmationTitle : 'Confirmation', // MISSING messageTitle : 'Information', // MISSING inputTitle : 'Question', // MISSING undo : 'Undo', // MISSING redo : 'Redo', // MISSING skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', // MISSING HelpLang : 'en', LangCode : 'sk', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'mm/dd/yyyy HH:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Adresáre', FolderLoading : 'Nahrávam...', FolderNew : 'Zadajte prosím meno nového adresára: ', FolderRename : 'Zadajte prosím meno nového adresára: ', FolderDelete : 'Skutočne zmazať adresár "%1" ?', FolderRenaming : ' (Prebieha premenovanie adresára...)', FolderDeleting : ' (Prebieha zmazanie adresára...)', // Files FileRename : 'Zadajte prosím meno nového súboru: ', FileRenameExt : 'Skutočne chcete zmeniť príponu súboru? Upozornenie: zmenou prípony sa súbor môže stať nepoužiteľným, pokiaľ prípona nie je podporovaná.', FileRenaming : 'Prebieha premenovanie súboru...', FileDelete : 'Skutočne chcete odstrániť súbor "%1"?', FilesLoading : 'Loading...', // MISSING FilesEmpty : 'Empty folder', // MISSING FilesMoved : 'File %1 moved into %2:%3', // MISSING FilesCopied : 'File %1 copied into %2:%3', // MISSING // Basket BasketFolder : 'Basket', // MISSING BasketClear : 'Clear Basket', // MISSING BasketRemove : 'Remove from basket', // MISSING BasketOpenFolder : 'Open parent folder', // MISSING BasketTruncateConfirm : 'Do you really want to remove all files from the basket?', // MISSING BasketRemoveConfirm : 'Do you really want to remove the file "%1" from the basket?', // MISSING BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copy Files from Basket', // MISSING BasketMoveFilesHere : 'Move Files from Basket', // MISSING BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'The following files were moved: %s', // MISSING BasketPasteCopySuccess : 'The following files were copied: %s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Prekopírovať na server (Upload)', UploadTip : 'Prekopírovať nový súbor', Refresh : 'Znovunačítať (Refresh)', Settings : 'Nastavenia', Help : 'Pomoc', HelpTip : 'Pomoc', // Context Menus Select : 'Vybrať', SelectThumbnail : 'Select Thumbnail', // MISSING View : 'Náhľad', Download : 'Stiahnuť', NewSubFolder : 'Nový podadresár', Rename : 'Premenovať', Delete : 'Zmazať', CopyDragDrop : 'Copy file here', // MISSING MoveDragDrop : 'Move file here', // MISSING // Dialogs RenameDlgTitle : 'Rename', // MISSING NewNameDlgTitle : 'New name', // MISSING FileExistsDlgTitle : 'File already exists', // MISSING SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Overwrite', // MISSING FileAutorename : 'Auto-rename', // MISSING // Generic OkBtn : 'OK', CancelBtn : 'Zrušiť', CloseBtn : 'Zatvoriť', // Upload Panel UploadTitle : 'Nahrať nový súbor', UploadSelectLbl : 'Vyberte súbor, ktorý chcete prekopírovať na server', UploadProgressLbl : '(Prebieha kopírovanie, čakajte prosím...)', UploadBtn : 'Prekopírovať vybratý súbor', UploadBtnCancel : 'Cancel', // MISSING UploadNoFileMsg : 'Vyberte prosím súbor na Vašom počítači!', UploadNoFolder : 'Please select folder before uploading.', // MISSING UploadNoPerms : 'File upload not allowed.', // MISSING UploadUnknError : 'Error sending the file.', // MISSING UploadExtIncorrect : 'File extension not allowed in this folder.', // MISSING // Settings Panel SetTitle : 'Nastavenia', SetView : 'Náhľad:', SetViewThumb : 'Miniobrázky', SetViewList : 'Zoznam', SetDisplay : 'Zobraziť:', SetDisplayName : 'Názov súboru', SetDisplayDate : 'Dátum', SetDisplaySize : 'Veľkosť súboru', SetSort : 'Zoradenie:', SetSortName : 'podľa názvu súboru', SetSortDate : 'podľa dátumu', SetSortSize : 'podľa veľkosti', // Status Bar FilesCountEmpty : '<Prázdny adresár>', FilesCountOne : '1 súbor', FilesCountMany : '%1 súborov', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'Server nemohol dokončiť spracovanie požiadavky. (Chyba %1)', Errors : { 10 : 'Neplatný príkaz.', 11 : 'V požiadavke nebol špecifikovaný typ súboru.', 12 : 'Nepodporovaný typ súboru.', 102 : 'Neplatný názov súboru alebo adresára.', 103 : 'Nebolo možné dokončiť spracovanie požiadavky kvôli nepostačujúcej úrovni oprávnení.', 104 : 'Nebolo možné dokončiť spracovanie požiadavky kvôli obmedzeniam v prístupových právach ku súborom.', 105 : 'Neplatná prípona súboru.', 109 : 'Neplatná požiadavka.', 110 : 'Neidentifikovaná chyba.', 115 : 'Zadaný súbor alebo adresár už existuje.', 116 : 'Adresár nebol nájdený. Aktualizujte obsah adresára (Znovunačítať) a skúste znovu.', 117 : 'Súbor nebol nájdený. Aktualizujte obsah adresára (Znovunačítať) a skúste znovu.', 118 : 'Source and target paths are equal.', // MISSING 201 : 'Súbor so zadaným názvom už existuje. Prekopírovaný súbor bol premenovaný na "%1"', 202 : 'Neplatný súbor', 203 : 'Neplatný súbor - súbor presahuje maximálnu povolenú veľkosť.', 204 : 'Kopírovaný súbor je poškodený.', 205 : 'Server nemá špecifikovaný dočasný adresár pre kopírované súbory.', 206 : 'Kopírovanie prerušené kvôli nedostatočnému zabezpečeniu. Súbor obsahuje HTML data.', 207 : 'Prekopírovaný súbor bol premenovaný na "%1"', 300 : 'Moving file(s) failed.', // MISSING 301 : 'Copying file(s) failed.', // MISSING 500 : 'Prehliadanie súborov je zakázané kvôli bezpečnosti. Kontaktujte prosím administrátora a overte nastavenia v konfiguračnom súbore pre CKFinder.', 501 : 'Momentálne nie je zapnutá podpora pre generáciu miniobrázkov.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Názov súbor nesmie prázdny', FileExists : 'File %s already exists', // MISSING FolderEmpty : 'Názov adresára nesmie byť prázdny', FileInvChar : 'Súbor nesmie obsahovať žiadny z nasledujúcich znakov: \n\\ / : * ? " < > |', FolderInvChar : 'Adresár nesmie obsahovať žiadny z nasledujúcich znakov: \n\\ / : * ? " < > |', PopupBlockView : 'Nebolo možné otvoriť súbor v novom okne. Overte nastavenia Vášho prehliadača a zakážte všetky blokovače popup okien pre túto webstránku.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Resize %s', // MISSING sizeTooBig : 'Cannot set image height or width to a value bigger than the original size (%size).', // MISSING resizeSuccess : 'Image resized successfully.', // MISSING thumbnailNew : 'Create new thumbnail', // MISSING thumbnailSmall : 'Small (%s)', // MISSING thumbnailMedium : 'Medium (%s)', // MISSING thumbnailLarge : 'Large (%s)', // MISSING newSize : 'Set new size', // MISSING width : 'Width', // MISSING height : 'Height', // MISSING invalidHeight : 'Invalid height.', // MISSING invalidWidth : 'Invalid width.', // MISSING invalidName : 'Invalid file name.', // MISSING newImage : 'Create new image', // MISSING noExtensionChange : 'The file extension cannot be changed.', // MISSING imageSmall : 'Source image is too small', // MISSING contextMenuName : 'Resize' // MISSING }, // Fileeditor plugin Fileeditor : { save : 'Save', // MISSING fileOpenError : 'Unable to open file.', // MISSING fileSaveSuccess : 'File saved successfully.', // MISSING contextMenuName : 'Edit', // MISSING loadingFile : 'Loading file, please wait...' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2012, CKSource - Frederico Knabben. All rights reserved. * * The software, this file, and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying, or distributing this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object for the Vietnamese * language. */ /** * Contains the dictionary of language entries. * @namespace */ CKFinder.lang['en'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, không khả dụng</span>', confirmCancel : 'Vài tùy chọn đã thay đổi. Bạn có muốn đóng hộp thoại?', ok : 'OK', cancel : 'Hủy', confirmationTitle : 'Xác nhận', messageTitle : 'Thông tin', inputTitle : 'Câu hỏi', undo : 'Hoàn tác', redo : 'Làm lại', skip : 'Bỏ qua', skipAll : 'Bỏ qua tất cả', makeDecision : 'Chọn hành động nào?', rememberDecision: 'Ghi nhớ quyết định này' }, // Language direction, 'ltr' or 'rtl'. dir : 'ltr', HelpLang : 'en', LangCode : 'en', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'd/m/yyyy h:MM aa', DateAmPm : ['SA', 'CH'], // Folders FoldersTitle : 'Thư mục', FolderLoading : 'Đang tải...', FolderNew : 'Xin chọn tên cho thư mục mới: ', FolderRename : 'Xin chọn tên mới cho thư mục: ', FolderDelete : 'Bạn có chắc muốn xóa thư mục "%1"?', FolderRenaming : ' (Đang đổi tên...)', FolderDeleting : ' (Đang xóa...)', DestinationFolder : 'Destination Folder', // MISSING // Files FileRename : 'Xin nhập tên tập tin mới: ', FileRenameExt : 'Bạn có chắc muốn đổi phần mở rộng? Tập tin có thể sẽ không dùng được.', FileRenaming : 'Đang đổi tên...', FileDelete : 'Bạn có chắc muốn xóa tập tin "%1"?', FilesDelete : 'Are you sure you want to delete %1 files?', // MISSING FilesLoading : 'Đang tải...', FilesEmpty : 'Thư mục trống.', DestinationFile : 'Destination File', // MISSING SkippedFiles : 'List of skipped files:', // MISSING // Basket BasketFolder : 'Thùng rác', BasketClear : 'Dọn thùng rác', BasketRemove : 'Xóa khỏi thùng rác', BasketOpenFolder : 'Mở thư mục cha', BasketTruncateConfirm : 'Bạn có chắc muốn bỏ tất cả tập tin trong rổ?', BasketRemoveConfirm : 'Bạn có chắc muốn bỏ tập tin "%1" khỏi rổ?', BasketRemoveConfirmMultiple : 'Do you really want to remove %1 files from the basket?', // MISSING BasketEmpty : 'Không có tập tin trong rổ, hãy kéo và thả tập tin vào rổ.', BasketCopyFilesHere : 'Chép tập tin từ rổ', BasketMoveFilesHere : 'Chuyển tập tin từ rổ', // Global messages OperationCompletedSuccess : 'Operation completed successfully.', // MISSING OperationCompletedErrors : 'Operation completed with errors.', // MISSING FileError : '%s: %e', // MISSING // Move and Copy files MovedFilesNumber : 'Number of files moved: %s.', // MISSING CopiedFilesNumber : 'Number of files copied: %s.', // MISSING MoveFailedList : 'The following files could not be moved:<br />%s', // MISSING CopyFailedList : 'The following files could not be copied:<br />%s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Tải lên', UploadTip : 'Tải tập tin mới', Refresh : 'Làm tươi', Settings : 'Thiết lập', Help : 'Hướng dẫn', HelpTip : 'Hướng dẫn', // Context Menus Select : 'Chọn', SelectThumbnail : 'Chọn ảnh mẫu', View : 'Xem', Download : 'Tải về', NewSubFolder : 'Tạo thư mục con', Rename : 'Đổi tên', Delete : 'Xóa', DeleteFiles : 'Delete Files', // MISSING CopyDragDrop : 'Sao chép ở đây', MoveDragDrop : 'Di chuyển ở đây', // Dialogs RenameDlgTitle : 'Đổi tên', NewNameDlgTitle : 'Tên mới', FileExistsDlgTitle : 'Tập tin đã tồn tại', SysErrorDlgTitle : 'Lỗi hệ thống', FileOverwrite : 'Ghi đè', FileAutorename : 'Tự đổi tên', ManuallyRename : 'Manually rename', // MISSING // Generic OkBtn : 'OK', CancelBtn : 'Hủy bỏ', CloseBtn : 'Đóng', // Upload Panel UploadTitle : 'Tải tập tin mới', UploadSelectLbl : 'Chọn tập tin tải lên', UploadProgressLbl : '(Đang tải lên, vui lòng chờ...)', UploadBtn : 'Tải tập tin đã chọn', UploadBtnCancel : 'Hủy bỏ', UploadNoFileMsg : 'Xin chọn một tập tin trong máy tính.', UploadNoFolder : 'Xin chọn thư mục trước khi tải lên.', UploadNoPerms : 'Không được phép tải lên.', UploadUnknError : 'Lỗi khi tải tập tin.', UploadExtIncorrect : 'Kiểu tập tin không được chấp nhận trong thư mục này.', // Flash Uploads UploadLabel : 'Tập tin sẽ tải:', UploadTotalFiles : 'Tổng số tập tin:', UploadTotalSize : 'Dung lượng tổng cộng:', UploadSend : 'Tải lên', UploadAddFiles : 'Thêm tập tin', UploadClearFiles : 'Xóa tập tin', UploadCancel : 'Hủy tải', UploadRemove : 'Xóa', UploadRemoveTip : 'Xóa !f', UploadUploaded : 'Đã tải !n%', UploadProcessing : 'Đang xử lí...', // Settings Panel SetTitle : 'Thiết lập', SetView : 'Xem:', SetViewThumb : 'Ảnh mẫu', SetViewList : 'Danh sách', SetDisplay : 'Hiển thị:', SetDisplayName : 'Tên tập tin', SetDisplayDate : 'Ngày', SetDisplaySize : 'Dung lượng', SetSort : 'Sắp xếp:', SetSortName : 'Theo tên', SetSortDate : 'Theo ngày', SetSortSize : 'Theo dung lượng', SetSortExtension : 'Theo phần mở rộng', // Status Bar FilesCountEmpty : '<Thư mục rỗng>', FilesCountOne : '1 tập tin', FilesCountMany : '%1 tập tin', // Size and Speed Kb : '%1 KB', Mb : '%1 MB', Gb : '%1 GB', SizePerSecond : '%1/s', // Connector Error Messages. ErrorUnknown : 'Không thể hoàn tất yêu cầu. (Lỗi %1)', Errors : { 10 : 'Lệnh không hợp lệ.', 11 : 'Kiểu tài nguyên không được chỉ định trong yêu cầu.', 12 : 'Kiểu tài nguyên yêu cầu không hợp lệ.', 102 : 'Tên tập tin hay thư mục không hợp lệ.', 103 : 'Không thể hoàn tất yêu cầu vì giới hạn quyền.', 104 : 'Không thể hoàn tất yêu cầu vì giới hạn quyền của hệ thống tập tin.', 105 : 'Phần mở rộng tập tin không hợp lệ.', 109 : 'Yêu cầu không hợp lệ.', 110 : 'Lỗi không xác định.', 111 : 'It was not possible to complete the request due to resulting file size.', // MISSING 115 : 'Tập tin hoặc thư mục cùng tên đã tồn tại.', 116 : 'Không thấy thư mục. Hãy làm tươi và thử lại.', 117 : 'Không thấy tập tin. Hãy làm tươi và thử lại.', 118 : 'Đường dẫn nguồn và đích giống nhau.', 201 : 'Tập tin cùng tên đã tồn tại. Tập tin vừa tải lên được đổi tên thành "%1".', 202 : 'Tập tin không hợp lệ.', 203 : 'Tập tin không hợp lệ. Dung lượng quá lớn.', 204 : 'Tập tin tải lên bị hỏng.', 205 : 'Không có thư mục tạm để tải tập tin.', 206 : 'Huỷ tải lên vì lí do bảo mật. Tập tin chứa dữ liệu giống HTML.', 207 : 'Tập tin được đổi tên thành "%1".', 300 : 'Di chuyển tập tin thất bại.', 301 : 'Chép tập tin thất bại.', 500 : 'Trình duyệt tập tin bị vô hiệu vì lí do bảo mật. Xin liên hệ quản trị hệ thống và kiểm tra tập tin cấu hình CKFinder.', 501 : 'Chức năng hỗ trợ ảnh mẫu bị vô hiệu.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Không thể để trống tên tập tin.', FileExists : 'Tập tin %s đã tồn tại.', FolderEmpty : 'Không thể để trống tên thư mục.', FolderExists : 'Folder %s already exists.', // MISSING FolderNameExists : 'Folder already exists.', // MISSING FileInvChar : 'Tên tập tin không thể chưa các kí tự: \n\\ / : * ? " < > |', FolderInvChar : 'Tên thư mục không thể chứa các kí tự: \n\\ / : * ? " < > |', PopupBlockView : 'Không thể mở tập tin trong cửa sổ mới. Hãy kiểm tra trình duyệt và tắt chức năng chặn popup trên trang web này.', XmlError : 'Không thể nạp hồi đáp XML từ máy chủ web.', XmlEmpty : 'Không thể nạp hồi đáp XML từ máy chủ web. Dữ liệu rỗng.', XmlRawResponse : 'Hồi đáp thô từ máy chủ: %s' }, // Imageresize plugin Imageresize : { dialogTitle : 'Đổi kích thước %s', sizeTooBig : 'Không thể đặt chiều cao hoặc rộng to hơn kích thước gốc (%size).', resizeSuccess : 'Đổi kích thước ảnh thành công.', thumbnailNew : 'Tạo ảnh mẫu mới', thumbnailSmall : 'Nhỏ (%s)', thumbnailMedium : 'Vừa (%s)', thumbnailLarge : 'Lớn (%s)', newSize : 'Chọn kích thước mới', width : 'Rộng', height : 'Cao', invalidHeight : 'Chiều cao không hợp lệ.', invalidWidth : 'Chiều rộng không hợp lệ.', invalidName : 'Tên tập tin không hợp lệ.', newImage : 'Tạo ảnh mới', noExtensionChange : 'Không thể thay đổi phần mở rộng.', imageSmall : 'Ảnh nguồn quá nhỏ.', contextMenuName : 'Đổi kích thước', lockRatio : 'Khoá tỉ lệ', resetSize : 'Đặt lại kích thước' }, // Fileeditor plugin Fileeditor : { save : 'Lưu', fileOpenError : 'Không thể mở tập tin.', fileSaveSuccess : 'Lưu tập tin thành công.', contextMenuName : 'Sửa', loadingFile : 'Đang tải tập tin, xin chờ...' }, Maximize : { maximize : 'Cực đại hóa', minimize : 'Cực tiểu hóa' }, Gallery : { current : 'Hình thứ {current} trên {total}' }, Zip : { extractHereLabel : 'Extract here', // MISSING extractToLabel : 'Extract to...', // MISSING downloadZipLabel : 'Download as zip', // MISSING compressZipLabel : 'Compress to zip', // MISSING removeAndExtract : 'Remove existing and extract', // MISSING extractAndOverwrite : 'Extract overwriting existing files', // MISSING extractSuccess : 'File extracted successfully.' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Danish * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['da'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, ikke tilgængelig</span>', confirmCancel : 'Nogle af indstillingerne er blevet ændret. Er du sikker på at lukke dialogen?', ok : 'OK', cancel : 'Annuller', confirmationTitle : 'Bekræftelse', messageTitle : 'Information', inputTitle : 'Spørgsmål', undo : 'Fortryd', redo : 'Annuller fortryd', skip : 'Skip', skipAll : 'Skip alle', makeDecision : 'Hvad skal der foretages?', rememberDecision: 'Husk denne indstilling' }, dir : 'ltr', HelpLang : 'en', LangCode : 'da', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'dd-mm-yyyy HH:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Mapper', FolderLoading : 'Indlæser...', FolderNew : 'Skriv navnet på den nye mappe: ', FolderRename : 'Skriv det nye navn på mappen: ', FolderDelete : 'Er du sikker på, at du vil slette mappen "%1" ?', FolderRenaming : ' (Omdøber...)', FolderDeleting : ' (Sletter...)', // Files FileRename : 'Skriv navnet på den nye fil: ', FileRenameExt : 'Er du sikker på, at du vil ændre filtypen? Filen kan muligvis ikke bruges bagefter.', FileRenaming : '(Omdøber...)', FileDelete : 'Er du sikker på, at du vil slette filen "%1" ?', FilesLoading : 'Indlæser...', FilesEmpty : 'Tom mappe', FilesMoved : 'Filen %1 flyttet til %2:%3', FilesCopied : 'Filen %1 kopieret til %2:%3', // Basket BasketFolder : 'Kurv', BasketClear : 'Tøm kurv', BasketRemove : 'Fjern fra kurv', BasketOpenFolder : 'Åben overordnet mappe', BasketTruncateConfirm : 'Er du sikker på at du vil tømme kurven?', BasketRemoveConfirm : 'Er du sikker på at du vil slette filen "%1" fra kurven?', BasketEmpty : 'Ingen filer i kurven, brug musen til at trække filer til kurven.', BasketCopyFilesHere : 'Kopier Filer fra kurven', BasketMoveFilesHere : 'Flyt Filer fra kurven', BasketPasteErrorOther : 'Fil fejl: %e', BasketPasteMoveSuccess : 'Følgende filer blev flyttet: %s', BasketPasteCopySuccess : 'Følgende filer blev kopieret: %s', // Toolbar Buttons (some used elsewhere) Upload : 'Upload', UploadTip : 'Upload ny fil', Refresh : 'Opdatér', Settings : 'Indstillinger', Help : 'Hjælp', HelpTip : 'Hjælp', // Context Menus Select : 'Vælg', SelectThumbnail : 'Vælg thumbnail', View : 'Vis', Download : 'Download', NewSubFolder : 'Ny undermappe', Rename : 'Omdøb', Delete : 'Slet', CopyDragDrop : 'Kopier hertil', MoveDragDrop : 'Flyt hertil', // Dialogs RenameDlgTitle : 'Omdøb', NewNameDlgTitle : 'Nyt navn', FileExistsDlgTitle : 'Filen eksisterer allerede', SysErrorDlgTitle : 'System fejl', FileOverwrite : 'Overskriv', FileAutorename : 'Auto-omdøb', // Generic OkBtn : 'OK', CancelBtn : 'Annullér', CloseBtn : 'Luk', // Upload Panel UploadTitle : 'Upload ny fil', UploadSelectLbl : 'Vælg den fil, som du vil uploade', UploadProgressLbl : '(Uploader, vent venligst...)', UploadBtn : 'Upload filen', UploadBtnCancel : 'Annuller', UploadNoFileMsg : 'Vælg en fil på din computer', UploadNoFolder : 'Venligst vælg en mappe før upload startes.', UploadNoPerms : 'Upload er ikke tilladt.', UploadUnknError : 'Fejl ved upload.', UploadExtIncorrect : 'Denne filtype er ikke tilladt i denne mappe.', // Settings Panel SetTitle : 'Indstillinger', SetView : 'Vis:', SetViewThumb : 'Thumbnails', SetViewList : 'Liste', SetDisplay : 'Thumbnails:', SetDisplayName : 'Filnavn', SetDisplayDate : 'Dato', SetDisplaySize : 'Størrelse', SetSort : 'Sortering:', SetSortName : 'efter filnavn', SetSortDate : 'efter dato', SetSortSize : 'efter størrelse', // Status Bar FilesCountEmpty : '<tom mappe>', FilesCountOne : '1 fil', FilesCountMany : '%1 filer', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'Det var ikke muligt at fuldføre handlingen. (Fejl: %1)', Errors : { 10 : 'Ugyldig handling.', 11 : 'Ressourcetypen blev ikke angivet i anmodningen.', 12 : 'Ressourcetypen er ikke gyldig.', 102 : 'Ugyldig fil eller mappenavn.', 103 : 'Det var ikke muligt at fuldføre handlingen på grund af en begrænsning i rettigheder.', 104 : 'Det var ikke muligt at fuldføre handlingen på grund af en begrænsning i filsystem rettigheder.', 105 : 'Ugyldig filtype.', 109 : 'Ugyldig anmodning.', 110 : 'Ukendt fejl.', 115 : 'En fil eller mappe med det samme navn eksisterer allerede.', 116 : 'Mappen blev ikke fundet. Opdatér listen eller prøv igen.', 117 : 'Filen blev ikke fundet. Opdatér listen eller prøv igen.', 118 : 'Originalplacering og destination er ens', 201 : 'En fil med det samme filnavn eksisterer allerede. Den uploadede fil er blevet omdøbt til "%1"', 202 : 'Ugyldig fil.', 203 : 'Ugyldig fil. Filstørrelsen er for stor.', 204 : 'Den uploadede fil er korrupt.', 205 : 'Der er ikke en midlertidig mappe til upload til rådighed på serveren.', 206 : 'Upload annulleret af sikkerhedsmæssige årsager. Filen indeholder HTML-lignende data.', 207 : 'Den uploadede fil er blevet omdøbt til "%1"', 300 : 'Flytning af fil(er) fejlede.', 301 : 'Kopiering af fil(er) fejlede.', 500 : 'Filbrowseren er deaktiveret af sikkerhedsmæssige årsager. Kontakt systemadministratoren eller kontrollér CKFinders konfigurationsfil.', 501 : 'Understøttelse af thumbnails er deaktiveret.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Filnavnet må ikke være tomt', FileExists : 'Fil %erne eksisterer allerede', FolderEmpty : 'Mappenavnet må ikke være tomt', FileInvChar : 'Filnavnet må ikke indeholde et af følgende tegn: \n\\ / : * ? " < > |', FolderInvChar : 'Mappenavnet må ikke indeholde et af følgende tegn: \n\\ / : * ? " < > |', PopupBlockView : 'Det var ikke muligt at åbne filen i et nyt vindue. Kontrollér konfigurationen i din browser, og deaktivér eventuelle popup-blokkere for denne hjemmeside.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Rediger størrelse %s', sizeTooBig : 'Kan ikke ændre billedets højde eller bredde til en værdi større end dets originale størrelse (%size).', resizeSuccess : 'Størrelsen er nu ændret.', thumbnailNew : 'Opret ny thumbnail', thumbnailSmall : 'Lille (%s)', thumbnailMedium : 'Mellem (%s)', thumbnailLarge : 'Stor (%s)', newSize : 'Rediger størrelse', width : 'Bredde', height : 'Højde', invalidHeight : 'Ugyldig højde.', invalidWidth : 'Ugyldig bredde.', invalidName : 'Ugyldigt filenavn.', newImage : 'Opret nyt billede.', noExtensionChange : 'Filtypen kan ikke ændres.', imageSmall : 'Originalfilen er for lille', contextMenuName : 'Rediger størrelse' }, // Fileeditor plugin Fileeditor : { save : 'Gem', fileOpenError : 'Filen kan ikke åbnes.', fileSaveSuccess : 'Filen er nu gemt.', contextMenuName : 'Rediger', loadingFile : 'Henter fil, vent venligst...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['nb'] = { appTitle : 'CKFinder', // MISSING // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING ok : 'OK', // MISSING cancel : 'Cancel', // MISSING confirmationTitle : 'Confirmation', // MISSING messageTitle : 'Information', // MISSING inputTitle : 'Question', // MISSING undo : 'Undo', // MISSING redo : 'Redo', // MISSING skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', // MISSING HelpLang : 'en', LangCode : 'no', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'dd/mm/yyyy HH:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Mapper', FolderLoading : 'Laster...', FolderNew : 'Skriv inn det nye mappenavnet: ', FolderRename : 'Skriv inn det nye mappenavnet: ', FolderDelete : 'Er du sikker på at du vil slette mappen "%1"?', FolderRenaming : ' (Endrer mappenavn...)', FolderDeleting : ' (Sletter...)', // Files FileRename : 'Skriv inn det nye filnavnet: ', FileRenameExt : 'Er du sikker på at du vil endre filtypen? Filen kan bli ubrukelig', FileRenaming : 'Endrer filnavn...', FileDelete : 'Er du sikker på at du vil slette denne filen "%1"?', FilesLoading : 'Loading...', // MISSING FilesEmpty : 'Empty folder', // MISSING FilesMoved : 'File %1 moved into %2:%3', // MISSING FilesCopied : 'File %1 copied into %2:%3', // MISSING // Basket BasketFolder : 'Basket', // MISSING BasketClear : 'Clear Basket', // MISSING BasketRemove : 'Remove from basket', // MISSING BasketOpenFolder : 'Open parent folder', // MISSING BasketTruncateConfirm : 'Do you really want to remove all files from the basket?', // MISSING BasketRemoveConfirm : 'Do you really want to remove the file "%1" from the basket?', // MISSING BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copy Files from Basket', // MISSING BasketMoveFilesHere : 'Move Files from Basket', // MISSING BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'The following files were moved: %s', // MISSING BasketPasteCopySuccess : 'The following files were copied: %s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Last opp', UploadTip : 'Last opp en ny fil', Refresh : 'Oppdater', Settings : 'Innstillinger', Help : 'Hjelp', HelpTip : 'Hjelp finnes kun på engelsk', // Context Menus Select : 'Velg', SelectThumbnail : 'Velg Miniatyr', View : 'Vis fullversjon', Download : 'Last ned', NewSubFolder : 'Ny Undermappe', Rename : 'Endre navn', Delete : 'Slett', CopyDragDrop : 'Copy file here', // MISSING MoveDragDrop : 'Move file here', // MISSING // Dialogs RenameDlgTitle : 'Rename', // MISSING NewNameDlgTitle : 'New name', // MISSING FileExistsDlgTitle : 'File already exists', // MISSING SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Overwrite', // MISSING FileAutorename : 'Auto-rename', // MISSING // Generic OkBtn : 'OK', CancelBtn : 'Avbryt', CloseBtn : 'Lukk', // Upload Panel UploadTitle : 'Last opp ny fil', UploadSelectLbl : 'Velg filen du vil laste opp', UploadProgressLbl : '(Laster opp filen, vennligst vent...)', UploadBtn : 'Last opp valgt fil', UploadBtnCancel : 'Cancel', // MISSING UploadNoFileMsg : 'Du må velge en fil fra din datamaskin', UploadNoFolder : 'Please select folder before uploading.', // MISSING UploadNoPerms : 'File upload not allowed.', // MISSING UploadUnknError : 'Error sending the file.', // MISSING UploadExtIncorrect : 'File extension not allowed in this folder.', // MISSING // Settings Panel SetTitle : 'Innstillinger', SetView : 'Filvisning:', SetViewThumb : 'Miniatyrbilder', SetViewList : 'Liste', SetDisplay : 'Vis:', SetDisplayName : 'Filnavn', SetDisplayDate : 'Dato', SetDisplaySize : 'Filstørrelse', SetSort : 'Sorter etter:', SetSortName : 'Filnavn', SetSortDate : 'Dato', SetSortSize : 'Størrelse', // Status Bar FilesCountEmpty : '<Tom Mappe>', FilesCountOne : '1 fil', FilesCountMany : '%1 filer', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'Det var ikke mulig å utføre forespørselen. (Feil %1)', Errors : { 10 : 'Ugyldig kommando.', 11 : 'Ressurstypen ble ikke spesifisert i forepørselen.', 12 : 'Ugyldig ressurstype.', 102 : 'Ugyldig fil- eller mappenavn.', 103 : 'Kunne ikke utføre forespørselen pga manglende autorisasjon.', 104 : 'Kunne ikke utføre forespørselen pga manglende tilgang til filsystemet.', 105 : 'Ugyldig filtype.', 109 : 'Ugyldig forespørsel.', 110 : 'Ukjent feil.', 115 : 'Det finnes allerede en fil eller mappe med dette navnet.', 116 : 'Kunne ikke finne mappen. Oppdater vinduet og prøv igjen.', 117 : 'Kunne ikke finne filen. Oppdater vinduet og prøv igjen.', 118 : 'Source and target paths are equal.', // MISSING 201 : 'Det fantes allerede en fil med dette navnet. Den opplastede filens navn har blitt endret til "%1"', 202 : 'Ugyldig fil', 203 : 'Ugyldig fil. Filen er for stor.', 204 : 'Den opplastede filen er korrupt.', 205 : 'Det finnes ingen midlertidig mappe for filopplastinger.', 206 : 'Opplastingen ble avbrutt av sikkerhetshensyn. Filen inneholder HTML-aktig data.', 207 : 'Den opplastede filens navn har blitt endret til "%1"', 300 : 'Moving file(s) failed.', // MISSING 301 : 'Copying file(s) failed.', // MISSING 500 : 'Filvelgeren ikke tilgjengelig av sikkerhetshensyn. Kontakt systemansvarlig og be han sjekke CKFinder\'s konfigurasjonsfil.', 501 : 'Funksjon for minityrbilder er skrudd av.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Filnavnet kan ikke være tomt', FileExists : 'File %s already exists', // MISSING FolderEmpty : 'Mappenavnet kan ikke være tomt', FileInvChar : 'Filnavnet kan ikke inneholde følgende tegn: \n\\ / : * ? " < > |', FolderInvChar : 'Mappenavnet kan ikke inneholde følgende tegn: \n\\ / : * ? " < > |', PopupBlockView : 'Du må skru av popup-blockeren for å se bildet i nytt vindu.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Resize %s', // MISSING sizeTooBig : 'Cannot set image height or width to a value bigger than the original size (%size).', // MISSING resizeSuccess : 'Image resized successfully.', // MISSING thumbnailNew : 'Create new thumbnail', // MISSING thumbnailSmall : 'Small (%s)', // MISSING thumbnailMedium : 'Medium (%s)', // MISSING thumbnailLarge : 'Large (%s)', // MISSING newSize : 'Set new size', // MISSING width : 'Width', // MISSING height : 'Height', // MISSING invalidHeight : 'Invalid height.', // MISSING invalidWidth : 'Invalid width.', // MISSING invalidName : 'Invalid file name.', // MISSING newImage : 'Create new image', // MISSING noExtensionChange : 'The file extension cannot be changed.', // MISSING imageSmall : 'Source image is too small', // MISSING contextMenuName : 'Resize' // MISSING }, // Fileeditor plugin Fileeditor : { save : 'Save', // MISSING fileOpenError : 'Unable to open file.', // MISSING fileSaveSuccess : 'File saved successfully.', // MISSING contextMenuName : 'Edit', // MISSING loadingFile : 'Loading file, please wait...' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Chinese (Taiwan) * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['zh-tw'] = { appTitle : 'CKFinder', // MISSING // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING ok : 'OK', // MISSING cancel : 'Cancel', // MISSING confirmationTitle : 'Confirmation', // MISSING messageTitle : 'Information', // MISSING inputTitle : 'Question', // MISSING undo : 'Undo', // MISSING redo : 'Redo', // MISSING skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', // MISSING HelpLang : 'zh-tw', LangCode : 'zh-tw', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'mm/dd/yyyy HH:MM', DateAmPm : ['上午', '下午'], // Folders FoldersTitle : '目錄', FolderLoading : '載入中...', FolderNew : '請輸入新目錄名稱: ', FolderRename : '請輸入新目錄名稱: ', FolderDelete : '確定刪除 "%1" 這個目錄嗎?', FolderRenaming : ' (修改目錄...)', FolderDeleting : ' (刪除目錄...)', // Files FileRename : '請輸入新檔案名稱: ', FileRenameExt : '確定變更這個檔案的副檔名嗎? 變更後 , 此檔案可能會無法使用 !', FileRenaming : '修改檔案名稱...', FileDelete : '確定要刪除這個檔案 "%1"?', FilesLoading : 'Loading...', // MISSING FilesEmpty : 'Empty folder', // MISSING FilesMoved : 'File %1 moved into %2:%3', // MISSING FilesCopied : 'File %1 copied into %2:%3', // MISSING // Basket BasketFolder : 'Basket', // MISSING BasketClear : 'Clear Basket', // MISSING BasketRemove : 'Remove from basket', // MISSING BasketOpenFolder : 'Open parent folder', // MISSING BasketTruncateConfirm : 'Do you really want to remove all files from the basket?', // MISSING BasketRemoveConfirm : 'Do you really want to remove the file "%1" from the basket?', // MISSING BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copy Files from Basket', // MISSING BasketMoveFilesHere : 'Move Files from Basket', // MISSING BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'The following files were moved: %s', // MISSING BasketPasteCopySuccess : 'The following files were copied: %s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : '上傳檔案', UploadTip : '上傳一個新檔案', Refresh : '重新整理', Settings : '偏好設定', Help : '說明', HelpTip : '說明', // Context Menus Select : '選擇', SelectThumbnail : 'Select Thumbnail', // MISSING View : '瀏覽', Download : '下載', NewSubFolder : '建立新子目錄', Rename : '重新命名', Delete : '刪除', CopyDragDrop : 'Copy file here', // MISSING MoveDragDrop : 'Move file here', // MISSING // Dialogs RenameDlgTitle : 'Rename', // MISSING NewNameDlgTitle : 'New name', // MISSING FileExistsDlgTitle : 'File already exists', // MISSING SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Overwrite', // MISSING FileAutorename : 'Auto-rename', // MISSING // Generic OkBtn : '確定', CancelBtn : '取消', CloseBtn : '關閉', // Upload Panel UploadTitle : '上傳新檔案', UploadSelectLbl : '請選擇要上傳的檔案', UploadProgressLbl : '(檔案上傳中 , 請稍候...)', UploadBtn : '將檔案上傳到伺服器', UploadBtnCancel : 'Cancel', // MISSING UploadNoFileMsg : '請從你的電腦選擇一個檔案', UploadNoFolder : 'Please select folder before uploading.', // MISSING UploadNoPerms : 'File upload not allowed.', // MISSING UploadUnknError : 'Error sending the file.', // MISSING UploadExtIncorrect : 'File extension not allowed in this folder.', // MISSING // Settings Panel SetTitle : '設定', SetView : '瀏覽方式:', SetViewThumb : '縮圖預覽', SetViewList : '清單列表', SetDisplay : '顯示欄位:', SetDisplayName : '檔案名稱', SetDisplayDate : '檔案日期', SetDisplaySize : '檔案大小', SetSort : '排序方式:', SetSortName : '依 檔案名稱', SetSortDate : '依 檔案日期', SetSortSize : '依 檔案大小', // Status Bar FilesCountEmpty : '<此目錄沒有任何檔案>', FilesCountOne : '1 個檔案', FilesCountMany : '%1 個檔案', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : '無法連接到伺服器 ! (錯誤代碼 %1)', Errors : { 10 : '不合法的指令.', 11 : '連接過程中 , 未指定資源形態 !', 12 : '連接過程中出現不合法的資源形態 !', 102 : '不合法的檔案或目錄名稱 !', 103 : '無法連接:可能是使用者權限設定錯誤 !', 104 : '無法連接:可能是伺服器檔案權限設定錯誤 !', 105 : '無法上傳:不合法的副檔名 !', 109 : '不合法的請求 !', 110 : '不明錯誤 !', 115 : '檔案或目錄名稱重複 !', 116 : '找不到目錄 ! 請先重新整理 , 然後再試一次 !', 117 : '找不到檔案 ! 請先重新整理 , 然後再試一次 !', 118 : 'Source and target paths are equal.', // MISSING 201 : '伺服器上已有相同的檔案名稱 ! 您上傳的檔案名稱將會自動更改為 "%1"', 202 : '不合法的檔案 !', 203 : '不合法的檔案 ! 檔案大小超過預設值 !', 204 : '您上傳的檔案已經損毀 !', 205 : '伺服器上沒有預設的暫存目錄 !', 206 : '檔案上傳程序因為安全因素已被系統自動取消 ! 可能是上傳的檔案內容包含 HTML 碼 !', 207 : '您上傳的檔案名稱將會自動更改為 "%1"', 300 : 'Moving file(s) failed.', // MISSING 301 : 'Copying file(s) failed.', // MISSING 500 : '因為安全因素 , 檔案瀏覽器已被停用 ! 請聯絡您的系統管理者並檢查 CKFinder 的設定檔 config.php !', 501 : '縮圖預覽功能已被停用 !' }, // Other Error Messages. ErrorMsg : { FileEmpty : '檔案名稱不能空白 !', FileExists : 'File %s already exists', // MISSING FolderEmpty : '目錄名稱不能空白 !', FileInvChar : '檔案名稱不能包含以下字元: \n\\ / : * ? " < > |', FolderInvChar : '目錄名稱不能包含以下字元: \n\\ / : * ? " < > |', PopupBlockView : '無法在新視窗開啟檔案 ! 請檢查瀏覽器的設定並且針對這個網站 關閉 <封鎖彈跳視窗> 這個功能 !' }, // Imageresize plugin Imageresize : { dialogTitle : 'Resize %s', // MISSING sizeTooBig : 'Cannot set image height or width to a value bigger than the original size (%size).', // MISSING resizeSuccess : 'Image resized successfully.', // MISSING thumbnailNew : 'Create new thumbnail', // MISSING thumbnailSmall : 'Small (%s)', // MISSING thumbnailMedium : 'Medium (%s)', // MISSING thumbnailLarge : 'Large (%s)', // MISSING newSize : 'Set new size', // MISSING width : 'Width', // MISSING height : 'Height', // MISSING invalidHeight : 'Invalid height.', // MISSING invalidWidth : 'Invalid width.', // MISSING invalidName : 'Invalid file name.', // MISSING newImage : 'Create new image', // MISSING noExtensionChange : 'The file extension cannot be changed.', // MISSING imageSmall : 'Source image is too small', // MISSING contextMenuName : 'Resize' // MISSING }, // Fileeditor plugin Fileeditor : { save : 'Save', // MISSING fileOpenError : 'Unable to open file.', // MISSING fileSaveSuccess : 'File saved successfully.', // MISSING contextMenuName : 'Edit', // MISSING loadingFile : 'Loading file, please wait...' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['el'] = { appTitle : 'CKFinder', // MISSING // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING ok : 'OK', // MISSING cancel : 'Cancel', // MISSING confirmationTitle : 'Confirmation', // MISSING messageTitle : 'Information', // MISSING inputTitle : 'Question', // MISSING undo : 'Undo', // MISSING redo : 'Redo', // MISSING skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', // MISSING HelpLang : 'en', LangCode : 'el', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'dd/mm/yyyy HH:MM', DateAmPm : ['ΜΜ', 'ΠΜ'], // Folders FoldersTitle : 'Φάκελοι', FolderLoading : 'Φόρτωση...', FolderNew : 'Παρακαλούμε πληκτρολογήστε την ονομασία του νέου φακέλου: ', FolderRename : 'Παρακαλούμε πληκτρολογήστε την νέα ονομασία του φακέλου: ', FolderDelete : 'Είστε σίγουροι ότι θέλετε να διαγράψετε το φάκελο "%1";', FolderRenaming : ' (Μετονομασία...)', FolderDeleting : ' (Διαγραφή...)', // Files FileRename : 'Παρακαλούμε πληκτρολογήστε την νέα ονομασία του αρχείου: ', FileRenameExt : 'Είστε σίγουροι ότι θέλετε να αλλάξετε την επέκταση του αρχείου; Μετά από αυτή την ενέργεια το αρχείο μπορεί να μην μπορεί να χρησιμοποιηθεί', FileRenaming : 'Μετονομασία...', FileDelete : 'Είστε σίγουροι ότι θέλετε να διαγράψετε το αρχείο "%1"?', FilesLoading : 'Loading...', // MISSING FilesEmpty : 'Empty folder', // MISSING FilesMoved : 'File %1 moved into %2:%3', // MISSING FilesCopied : 'File %1 copied into %2:%3', // MISSING // Basket BasketFolder : 'Basket', // MISSING BasketClear : 'Clear Basket', // MISSING BasketRemove : 'Remove from basket', // MISSING BasketOpenFolder : 'Open parent folder', // MISSING BasketTruncateConfirm : 'Do you really want to remove all files from the basket?', // MISSING BasketRemoveConfirm : 'Do you really want to remove the file "%1" from the basket?', // MISSING BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copy Files from Basket', // MISSING BasketMoveFilesHere : 'Move Files from Basket', // MISSING BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'The following files were moved: %s', // MISSING BasketPasteCopySuccess : 'The following files were copied: %s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Μεταφόρτωση', UploadTip : 'Μεταφόρτωση Νέου Αρχείου', Refresh : 'Ανανέωση', Settings : 'Ρυθμίσεις', Help : 'Βοήθεια', HelpTip : 'Βοήθεια', // Context Menus Select : 'Επιλογή', SelectThumbnail : 'Επιλογή Μικρογραφίας', View : 'Προβολή', Download : 'Λήψη Αρχείου', NewSubFolder : 'Νέος Υποφάκελος', Rename : 'Μετονομασία', Delete : 'Διαγραφή', CopyDragDrop : 'Copy file here', // MISSING MoveDragDrop : 'Move file here', // MISSING // Dialogs RenameDlgTitle : 'Rename', // MISSING NewNameDlgTitle : 'New name', // MISSING FileExistsDlgTitle : 'File already exists', // MISSING SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Overwrite', // MISSING FileAutorename : 'Auto-rename', // MISSING // Generic OkBtn : 'OK', CancelBtn : 'Ακύρωση', CloseBtn : 'Κλείσιμο', // Upload Panel UploadTitle : 'Μεταφόρτωση Νέου Αρχείου', UploadSelectLbl : 'επιλέξτε το αρχείο που θέλετε να μεταφερθεί κάνοντας κλίκ στο κουμπί', UploadProgressLbl : '(Η μεταφόρτωση εκτελείται, παρακαλούμε περιμένετε...)', UploadBtn : 'Μεταφόρτωση Επιλεγμένου Αρχείου', UploadBtnCancel : 'Cancel', // MISSING UploadNoFileMsg : 'Παρακαλούμε επιλέξτε ένα αρχείο από τον υπολογιστή σας', UploadNoFolder : 'Please select folder before uploading.', // MISSING UploadNoPerms : 'File upload not allowed.', // MISSING UploadUnknError : 'Error sending the file.', // MISSING UploadExtIncorrect : 'File extension not allowed in this folder.', // MISSING // Settings Panel SetTitle : 'Ρυθμίσεις', SetView : 'Προβολή:', SetViewThumb : 'Μικρογραφίες', SetViewList : 'Λίστα', SetDisplay : 'Εμφάνιση:', SetDisplayName : 'Όνομα Αρχείου', SetDisplayDate : 'Ημερομηνία', SetDisplaySize : 'Μέγεθος Αρχείου', SetSort : 'Ταξινόμηση:', SetSortName : 'βάσει Όνοματος Αρχείου', SetSortDate : 'βάσει Ημερομήνιας', SetSortSize : 'βάσει Μεγέθους', // Status Bar FilesCountEmpty : '<Κενός Φάκελος>', FilesCountOne : '1 αρχείο', FilesCountMany : '%1 αρχεία', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'Η ενέργεια δεν ήταν δυνατόν να εκτελεστεί. (Σφάλμα %1)', Errors : { 10 : 'Λανθασμένη Εντολή.', 11 : 'Το resource type δεν ήταν δυνατόν να προσδιορίστεί.', 12 : 'Το resource type δεν είναι έγκυρο.', 102 : 'Το όνομα αρχείου ή φακέλου δεν είναι έγκυρο.', 103 : 'Δεν ήταν δυνατή η εκτέλεση της ενέργειας λόγω έλλειψης δικαιωμάτων ασφαλείας.', 104 : 'Δεν ήταν δυνατή η εκτέλεση της ενέργειας λόγω περιορισμών του συστήματος αρχείων.', 105 : 'Λανθασμένη Επέκταση Αρχείου.', 109 : 'Λανθασμένη Ενέργεια.', 110 : 'Άγνωστο Λάθος.', 115 : 'Το αρχείο ή φάκελος υπάρχει ήδη.', 116 : 'Ο φάκελος δεν βρέθηκε. Παρακαλούμε ανανεώστε τη σελίδα και προσπαθήστε ξανά.', 117 : 'Το αρχείο δεν βρέθηκε. Παρακαλούμε ανανεώστε τη σελίδα και προσπαθήστε ξανά.', 118 : 'Source and target paths are equal.', // MISSING 201 : 'Ένα αρχείο με την ίδια ονομασία υπάρχει ήδη. Το μεταφορτωμένο αρχείο μετονομάστηκε σε "%1"', 202 : 'Λανθασμένο Αρχείο', 203 : 'Λανθασμένο Αρχείο. Το μέγεθος του αρχείου είναι πολύ μεγάλο.', 204 : 'Το μεταφορτωμένο αρχείο είναι χαλασμένο.', 205 : 'Δεν υπάρχει προσωρινός φάκελος για να χρησιμοποιηθεί για τις μεταφορτώσεις των αρχείων.', 206 : 'Η μεταφόρτωση ακυρώθηκε για λόγους ασφαλείας. Το αρχείο περιέχει δεδομένα μορφής HTML.', 207 : 'Το μεταφορτωμένο αρχείο μετονομάστηκε σε "%1"', 300 : 'Moving file(s) failed.', // MISSING 301 : 'Copying file(s) failed.', // MISSING 500 : 'Ο πλοηγός αρχείων έχει απενεργοποιηθεί για λόγους ασφαλείας. Παρακαλούμε επικοινωνήστε με τον διαχειριστή της ιστοσελίδας και ελέγξτε το αρχείο ρυθμίσεων του πλοηγού (CKFinder).', 501 : 'Η υποστήριξη των μικρογραφιών έχει απενεργοποιηθεί.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Η ονομασία του αρχείου δεν μπορεί να είναι κενή', FileExists : 'File %s already exists', // MISSING FolderEmpty : 'Η ονομασία του φακέλου δεν μπορεί να είναι κενή', FileInvChar : 'Η ονομασία του αρχείου δεν μπορεί να περιέχει τους ακόλουθους χαρακτήρες: \n\\ / : * ? " < > |', FolderInvChar : 'Η ονομασία του φακέλου δεν μπορεί να περιέχει τους ακόλουθους χαρακτήρες: \n\\ / : * ? " < > |', PopupBlockView : 'Δεν ήταν εφικτό να ανοίξει το αρχείο σε νέο παράθυρο. Παρακαλώ, ελέγξτε τις ρυθμίσεις τους πλοηγού σας και απενεργοποιήστε όλους τους popup blockers για αυτή την ιστοσελίδα.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Resize %s', // MISSING sizeTooBig : 'Cannot set image height or width to a value bigger than the original size (%size).', // MISSING resizeSuccess : 'Image resized successfully.', // MISSING thumbnailNew : 'Create new thumbnail', // MISSING thumbnailSmall : 'Small (%s)', // MISSING thumbnailMedium : 'Medium (%s)', // MISSING thumbnailLarge : 'Large (%s)', // MISSING newSize : 'Set new size', // MISSING width : 'Width', // MISSING height : 'Height', // MISSING invalidHeight : 'Invalid height.', // MISSING invalidWidth : 'Invalid width.', // MISSING invalidName : 'Invalid file name.', // MISSING newImage : 'Create new image', // MISSING noExtensionChange : 'The file extension cannot be changed.', // MISSING imageSmall : 'Source image is too small', // MISSING contextMenuName : 'Resize' // MISSING }, // Fileeditor plugin Fileeditor : { save : 'Save', // MISSING fileOpenError : 'Unable to open file.', // MISSING fileSaveSuccess : 'File saved successfully.', // MISSING contextMenuName : 'Edit', // MISSING loadingFile : 'Loading file, please wait...' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Spanish * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['es'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, no disponible</span>', confirmCancel : 'Algunas opciones se han cambiado\r\n¿Está seguro de querer cerrar el diálogo?', ok : 'Aceptar', cancel : 'Cancelar', confirmationTitle : 'Confirmación', messageTitle : 'Información', inputTitle : 'Pregunta', undo : 'Deshacer', redo : 'Rehacer', skip : 'Omitir', skipAll : 'Omitir todos', makeDecision : '¿Qué acción debe realizarse?', rememberDecision: 'Recordar mi decisión' }, dir : 'ltr', HelpLang : 'es', LangCode : 'es', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'dd/mm/yyyy H:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Carpetas', FolderLoading : 'Cargando...', FolderNew : 'Por favor, escriba el nombre para la nueva carpeta: ', FolderRename : 'Por favor, escriba el nuevo nombre para la carpeta: ', FolderDelete : '¿Está seguro de que quiere borrar la carpeta "%1"?', FolderRenaming : ' (Renombrando...)', FolderDeleting : ' (Borrando...)', // Files FileRename : 'Por favor, escriba el nuevo nombre del fichero: ', FileRenameExt : '¿Está seguro de querer cambiar la extensión del fichero? El fichero puede dejar de ser usable', FileRenaming : 'Renombrando...', FileDelete : '¿Está seguro de que quiere borrar el fichero "%1"?', FilesLoading : 'Cargando...', FilesEmpty : 'Carpeta vacía', FilesMoved : 'Fichero %1 movido a %2:%3', FilesCopied : 'Fichero %1 copiado a %2:%3', // Basket BasketFolder : 'Cesta', BasketClear : 'Vaciar cesta', BasketRemove : 'Quitar de la cesta', BasketOpenFolder : 'Abrir carpeta padre', BasketTruncateConfirm : '¿Está seguro de querer quitar todos los ficheros de la cesta?', BasketRemoveConfirm : '¿Está seguro de querer quitar el fichero "%1" de la cesta?', BasketEmpty : 'No hay ficheros en la cesta, arrastra y suelta algunos.', BasketCopyFilesHere : 'Copiar ficheros de la cesta', BasketMoveFilesHere : 'Mover ficheros de la cesta', BasketPasteErrorOther : 'Fichero %s error: %e', BasketPasteMoveSuccess : 'Los siguientes ficheros han sido movidos: %s', BasketPasteCopySuccess : 'Los siguientes ficheros han sido copiados: %s', // Toolbar Buttons (some used elsewhere) Upload : 'Añadir', UploadTip : 'Añadir nuevo fichero', Refresh : 'Actualizar', Settings : 'Configuración', Help : 'Ayuda', HelpTip : 'Ayuda', // Context Menus Select : 'Seleccionar', SelectThumbnail : 'Seleccionar el icono', View : 'Ver', Download : 'Descargar', NewSubFolder : 'Nueva Subcarpeta', Rename : 'Renombrar', Delete : 'Borrar', CopyDragDrop : 'Copiar fichero aquí', MoveDragDrop : 'Mover fichero aquí', // Dialogs RenameDlgTitle : 'Renombrar', NewNameDlgTitle : 'Nuevo nombre', FileExistsDlgTitle : 'Fichero existente', SysErrorDlgTitle : 'Error de sistema', FileOverwrite : 'Sobreescribir', FileAutorename : 'Auto-renombrar', // Generic OkBtn : 'Aceptar', CancelBtn : 'Cancelar', CloseBtn : 'Cerrar', // Upload Panel UploadTitle : 'Añadir nuevo fichero', UploadSelectLbl : 'Elija el fichero a subir', UploadProgressLbl : '(Subida en progreso, por favor espere...)', UploadBtn : 'Subir el fichero elegido', UploadBtnCancel : 'Cancelar', UploadNoFileMsg : 'Por favor, elija un fichero de su ordenador', UploadNoFolder : 'Por favor, escoja la carpeta antes de iniciar la subida.', UploadNoPerms : 'No puede subir ficheros.', UploadUnknError : 'Error enviando el fichero.', UploadExtIncorrect : 'La extensión del fichero no está permitida en esta carpeta.', // Settings Panel SetTitle : 'Configuración', SetView : 'Vista:', SetViewThumb : 'Iconos', SetViewList : 'Lista', SetDisplay : 'Mostrar:', SetDisplayName : 'Nombre de fichero', SetDisplayDate : 'Fecha', SetDisplaySize : 'Peso del fichero', SetSort : 'Ordenar:', SetSortName : 'por Nombre', SetSortDate : 'por Fecha', SetSortSize : 'por Peso', // Status Bar FilesCountEmpty : '<Carpeta vacía>', FilesCountOne : '1 fichero', FilesCountMany : '%1 ficheros', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'No ha sido posible completar la solicitud. (Error %1)', Errors : { 10 : 'Comando incorrecto.', 11 : 'El tipo de recurso no ha sido especificado en la solicitud.', 12 : 'El tipo de recurso solicitado no es válido.', 102 : 'Nombre de fichero o carpeta no válido.', 103 : 'No se ha podido completar la solicitud debido a las restricciones de autorización.', 104 : 'No ha sido posible completar la solicitud debido a restricciones en el sistema de ficheros.', 105 : 'La extensión del archivo no es válida.', 109 : 'Petición inválida.', 110 : 'Error desconocido.', 115 : 'Ya existe un fichero o carpeta con ese nombre.', 116 : 'No se ha encontrado la carpeta. Por favor, actualice y pruebe de nuevo.', 117 : 'No se ha encontrado el fichero. Por favor, actualice la lista de ficheros y pruebe de nuevo.', 118 : 'Las rutas origen y destino son iguales.', 201 : 'Ya existía un fichero con ese nombre. El fichero subido ha sido renombrado como "%1"', 202 : 'Fichero inválido', 203 : 'Fichero inválido. El peso es demasiado grande.', 204 : 'El fichero subido está corrupto.', 205 : 'La carpeta temporal no está disponible en el servidor para las subidas.', 206 : 'La subida se ha cancelado por razones de seguridad. El fichero contenía código HTML.', 207 : 'El fichero subido ha sido renombrado como "%1"', 300 : 'Ha fallado el mover el(los) fichero(s).', 301 : 'Ha fallado el copiar el(los) fichero(s).', 500 : 'El navegador de archivos está deshabilitado por razones de seguridad. Por favor, contacte con el administrador de su sistema y compruebe el fichero de configuración de CKFinder.', 501 : 'El soporte para iconos está deshabilitado.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'El nombre del fichero no puede estar vacío', FileExists : 'El fichero %s ya existe', FolderEmpty : 'El nombre de la carpeta no puede estar vacío', FileInvChar : 'El nombre del fichero no puede contener ninguno de los caracteres siguientes: \n\\ / : * ? " < > |', FolderInvChar : 'El nombre de la carpeta no puede contener ninguno de los caracteres siguientes: \n\\ / : * ? " < > |', PopupBlockView : 'No ha sido posible abrir el fichero en una nueva ventana. Por favor, configure su navegador y desactive todos los bloqueadores de ventanas para esta página.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Redimensionar %s', sizeTooBig : 'No se puede poner la altura o anchura de la imagen mayor que las dimensiones originales (%size).', resizeSuccess : 'Imagen redimensionada correctamente.', thumbnailNew : 'Crear nueva minuatura', thumbnailSmall : 'Pequeña (%s)', thumbnailMedium : 'Mediana (%s)', thumbnailLarge : 'Grande (%s)', newSize : 'Establecer nuevo tamaño', width : 'Ancho', height : 'Alto', invalidHeight : 'Altura inválida.', invalidWidth : 'Anchura inválida.', invalidName : 'Nombre no válido.', newImage : 'Crear nueva imagen', noExtensionChange : 'La extensión no se puede cambiar.', imageSmall : 'La imagen original es demasiado pequeña', contextMenuName : 'Redimensionar' }, // Fileeditor plugin Fileeditor : { save : 'Guardar', fileOpenError : 'No se puede abrir el fichero.', fileSaveSuccess : 'Fichero guardado correctamente.', contextMenuName : 'Editar', loadingFile : 'Cargando fichero, por favor espere...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Finnish * language. Translated in Finnish 2010-12-15 by Petteri Salmela. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['fi'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, ei käytettävissä</span>', confirmCancel : 'Valintoja on muutettu. Suljetaanko ikkuna kuitenkin?', ok : 'OK', cancel : 'Peru', confirmationTitle : 'Varmistus', messageTitle : 'Ilmoitus', inputTitle : 'Kysymys', undo : 'Peru', redo : 'Tee uudelleen', skip : 'Ohita', skipAll : 'Ohita kaikki', makeDecision : 'Mikä toiminto suoritetaan?', rememberDecision: 'Muista valintani' }, dir : 'ltr', HelpLang : 'fi', LangCode : 'fi', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'yyyy-mm-dd HH:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Kansiot', FolderLoading : 'Lataan...', FolderNew : 'Kirjoita uuden kansion nimi: ', FolderRename : 'Kirjoita uusi nimi kansiolle ', FolderDelete : 'Haluatko varmasti poistaa kansion "%1"?', FolderRenaming : ' (Uudelleennimeää...)', FolderDeleting : ' (Poistaa...)', // Files FileRename : 'Kirjoita uusi tiedostonimi: ', FileRenameExt : 'Haluatko varmasti muuttaa tiedostotarkennetta? Tiedosto voi muuttua käyttökelvottomaksi.', FileRenaming : 'Uudelleennimeää...', FileDelete : 'Haluatko varmasti poistaa tiedoston "%1"?', FilesLoading : 'Lataa...', FilesEmpty : 'Tyhjä kansio.', FilesMoved : 'Tiedosto %1 siirretty nimelle %2:%3', FilesCopied : 'Tiedosto %1 kopioitu nimelle %2:%3', // Basket BasketFolder : 'Kori', BasketClear : 'Tyhjennä kori', BasketRemove : 'Poista korista', BasketOpenFolder : 'Avaa ylemmän tason kansio', BasketTruncateConfirm : 'Haluatko todella poistaa kaikki tiedostot korista?', BasketRemoveConfirm : 'Haluatko todella poistaa tiedoston "%1" korista?', BasketEmpty : 'Korissa ei ole tiedostoja. Lisää raahaamalla.', BasketCopyFilesHere : 'Kopioi tiedostot korista.', BasketMoveFilesHere : 'Siirrä tiedostot korista.', BasketPasteErrorOther : 'Tiedoston %s virhe: %e', BasketPasteMoveSuccess : 'Seuraavat tiedostot siirrettiin: %s', BasketPasteCopySuccess : 'Seuraavat tiedostot kopioitiin: %s', // Toolbar Buttons (some used elsewhere) Upload : 'Lataa palvelimelle', UploadTip : 'Lataa uusi tiedosto palvelimelle', Refresh : 'Päivitä', Settings : 'Asetukset', Help : 'Apua', HelpTip : 'Apua', // Context Menus Select : 'Valitse', SelectThumbnail : 'Valitse esikatselukuva', View : 'Näytä', Download : 'Lataa palvelimelta', NewSubFolder : 'Uusi alikansio', Rename : 'Uudelleennimeä ', Delete : 'Poista', CopyDragDrop : 'Kopioi tiedosto tähän', MoveDragDrop : 'Siirrä tiedosto tähän', // Dialogs RenameDlgTitle : 'Nimeä uudelleen', NewNameDlgTitle : 'Uusi nimi', FileExistsDlgTitle : 'Tiedostonimi on jo olemassa!', SysErrorDlgTitle : 'Järjestelmävirhe', FileOverwrite : 'Ylikirjoita', FileAutorename : 'Nimeä uudelleen automaattisesti', // Generic OkBtn : 'OK', CancelBtn : 'Peru', CloseBtn : 'Sulje', // Upload Panel UploadTitle : 'Lataa uusi tiedosto palvelimelle', UploadSelectLbl : 'Valitse ladattava tiedosto', UploadProgressLbl : '(Lataaminen palvelimelle käynnissä...)', UploadBtn : 'Lataa valittu tiedosto palvelimelle', UploadBtnCancel : 'Peru', UploadNoFileMsg : 'Valitse tiedosto tietokoneeltasi.', UploadNoFolder : 'Valitse kansio ennen palvelimelle lataamista.', UploadNoPerms : 'Tiedoston lataaminen palvelimelle evätty.', UploadUnknError : 'Tiedoston siirrossa tapahtui virhe.', UploadExtIncorrect : 'Tiedostotarkenne ei ole sallittu valitussa kansiossa.', // Settings Panel SetTitle : 'Asetukset', SetView : 'Näkymä:', SetViewThumb : 'Esikatselukuvat', SetViewList : 'Luettelo', SetDisplay : 'Näytä:', SetDisplayName : 'Tiedostonimi', SetDisplayDate : 'Päivämäärä', SetDisplaySize : 'Tiedostokoko', SetSort : 'Lajittele:', SetSortName : 'aakkosjärjestykseen', SetSortDate : 'päivämäärän mukaan', SetSortSize : 'tiedostokoon mukaan', // Status Bar FilesCountEmpty : '<Tyhjä kansio>', FilesCountOne : '1 tiedosto', FilesCountMany : '%1 tiedostoa', // Size and Speed Kb : '%1 kt', KbPerSecond : '%1 kt/s', // Connector Error Messages. ErrorUnknown : 'Pyyntöä ei voitu suorittaa. (Virhe %1)', Errors : { 10 : 'Virheellinen komento.', 11 : 'Pyynnön resurssityyppi on määrittelemättä.', 12 : 'Pyynnön resurssityyppi on virheellinen.', 102 : 'Virheellinen tiedosto- tai kansionimi.', 103 : 'Oikeutesi eivät riitä pyynnön suorittamiseen.', 104 : 'Tiedosto-oikeudet eivät riitä pyynnön suorittamiseen.', 105 : 'Virheellinen tiedostotarkenne.', 109 : 'Virheellinen pyyntö.', 110 : 'Tuntematon virhe.', 115 : 'Samanniminen tiedosto tai kansio on jo olemassa.', 116 : 'Kansiota ei löydy. Yritä uudelleen kansiopäivityksen jälkeen.', 117 : 'Tiedostoa ei löydy. Yritä uudelleen kansiopäivityksen jälkeen.', 118 : 'Lähde- ja kohdekansio on sama!', 201 : 'Samanniminen tiedosto on jo olemassa. Palvelimelle ladattu tiedosto on nimetty: "%1"', 202 : 'Virheellinen tiedosto', 203 : 'Virheellinen tiedosto. Tiedostokoko on liian suuri.', 204 : 'Palvelimelle ladattu tiedosto on vioittunut.', 205 : 'Väliaikaishakemistoa ei ole määritetty palvelimelle lataamista varten.', 206 : 'Palvelimelle lataaminen on peruttu turvallisuussyistä. Tiedosto sisältää HTML-tyylistä dataa.', 207 : 'Palvelimelle ladattu tiedosto on nimetty: "%1"', 300 : 'Tiedostosiirto epäonnistui.', 301 : 'Tiedostokopiointi epäonnistui.', 500 : 'Tiedostoselain on kytketty käytöstä turvallisuussyistä. Pyydä pääkäyttäjää tarkastamaan CKFinderin asetustiedosto.', 501 : 'Esikatselukuvien tuki on kytketty toiminnasta.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Tiedosto on nimettävä!', FileExists : 'Tiedosto %s on jo olemassa', FolderEmpty : 'Kansio on nimettävä!', FileInvChar : 'Tiedostonimi ei voi sisältää seuraavia merkkejä: \n\\ / : * ? " < > |', FolderInvChar : 'Kansionimi ei voi sisältää seuraavia merkkejä: \n\\ / : * ? " < > |', PopupBlockView : 'Tiedostoa ei voitu avata uuteen ikkunaan. Salli selaimesi asetuksissa ponnahdusikkunat tälle sivulle.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Muuta kokoa %s', sizeTooBig : 'Kuvan mittoja ei voi asettaa alkuperäistä suuremmiksi(%size).', resizeSuccess : 'Kuvan koon muuttaminen onnistui.', thumbnailNew : 'Luo uusi esikatselukuva.', thumbnailSmall : 'Pieni (%s)', thumbnailMedium : 'Keskikokoinen (%s)', thumbnailLarge : 'Suuri (%s)', newSize : 'Aseta uusi koko', width : 'Leveys', height : 'Korkeus', invalidHeight : 'Viallinen korkeus.', invalidWidth : 'Viallinen leveys.', invalidName : 'Viallinen tiedostonimi.', newImage : 'Luo uusi kuva', noExtensionChange : 'Tiedostomäärettä ei voi vaihtaa.', imageSmall : 'Lähdekuva on liian pieni', contextMenuName : 'Muuta kokoa' }, // Fileeditor plugin Fileeditor : { save : 'Tallenna', fileOpenError : 'Tiedostoa ei voi avata.', fileSaveSuccess : 'Tiedoston tallennus onnistui.', contextMenuName : 'Muokkaa', loadingFile : 'Tiedostoa ladataan ...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['no'] = { appTitle : 'CKFinder', // MISSING // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING ok : 'OK', // MISSING cancel : 'Cancel', // MISSING confirmationTitle : 'Confirmation', // MISSING messageTitle : 'Information', // MISSING inputTitle : 'Question', // MISSING undo : 'Undo', // MISSING redo : 'Redo', // MISSING skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', // MISSING HelpLang : 'en', LangCode : 'no', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'dd/mm/yyyy HH:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Mapper', FolderLoading : 'Laster...', FolderNew : 'Skriv inn det nye mappenavnet: ', FolderRename : 'Skriv inn det nye mappenavnet: ', FolderDelete : 'Er du sikker på at du vil slette mappen "%1"?', FolderRenaming : ' (Endrer mappenavn...)', FolderDeleting : ' (Sletter...)', // Files FileRename : 'Skriv inn det nye filnavnet: ', FileRenameExt : 'Er du sikker på at du vil endre filtypen? Filen kan bli ubrukelig', FileRenaming : 'Endrer filnavn...', FileDelete : 'Er du sikker på at du vil slette denne filen "%1"?', FilesLoading : 'Loading...', // MISSING FilesEmpty : 'Empty folder', // MISSING FilesMoved : 'File %1 moved into %2:%3', // MISSING FilesCopied : 'File %1 copied into %2:%3', // MISSING // Basket BasketFolder : 'Basket', // MISSING BasketClear : 'Clear Basket', // MISSING BasketRemove : 'Remove from basket', // MISSING BasketOpenFolder : 'Open parent folder', // MISSING BasketTruncateConfirm : 'Do you really want to remove all files from the basket?', // MISSING BasketRemoveConfirm : 'Do you really want to remove the file "%1" from the basket?', // MISSING BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copy Files from Basket', // MISSING BasketMoveFilesHere : 'Move Files from Basket', // MISSING BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'The following files were moved: %s', // MISSING BasketPasteCopySuccess : 'The following files were copied: %s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Last opp', UploadTip : 'Last opp en ny fil', Refresh : 'Oppdater', Settings : 'Innstillinger', Help : 'Hjelp', HelpTip : 'Hjelp finnes kun på engelsk', // Context Menus Select : 'Velg', SelectThumbnail : 'Velg Miniatyr', View : 'Vis fullversjon', Download : 'Last ned', NewSubFolder : 'Ny Undermappe', Rename : 'Endre navn', Delete : 'Slett', CopyDragDrop : 'Copy file here', // MISSING MoveDragDrop : 'Move file here', // MISSING // Dialogs RenameDlgTitle : 'Rename', // MISSING NewNameDlgTitle : 'New name', // MISSING FileExistsDlgTitle : 'File already exists', // MISSING SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Overwrite', // MISSING FileAutorename : 'Auto-rename', // MISSING // Generic OkBtn : 'OK', CancelBtn : 'Avbryt', CloseBtn : 'Lukk', // Upload Panel UploadTitle : 'Last opp ny fil', UploadSelectLbl : 'Velg filen du vil laste opp', UploadProgressLbl : '(Laster opp filen, vennligst vent...)', UploadBtn : 'Last opp valgt fil', UploadBtnCancel : 'Cancel', // MISSING UploadNoFileMsg : 'Du må velge en fil fra din datamaskin', UploadNoFolder : 'Please select folder before uploading.', // MISSING UploadNoPerms : 'File upload not allowed.', // MISSING UploadUnknError : 'Error sending the file.', // MISSING UploadExtIncorrect : 'File extension not allowed in this folder.', // MISSING // Settings Panel SetTitle : 'Innstillinger', SetView : 'Filvisning:', SetViewThumb : 'Miniatyrbilder', SetViewList : 'Liste', SetDisplay : 'Vis:', SetDisplayName : 'Filnavn', SetDisplayDate : 'Dato', SetDisplaySize : 'Filstørrelse', SetSort : 'Sorter etter:', SetSortName : 'Filnavn', SetSortDate : 'Dato', SetSortSize : 'Størrelse', // Status Bar FilesCountEmpty : '<Tom Mappe>', FilesCountOne : '1 fil', FilesCountMany : '%1 filer', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'Det var ikke mulig å utføre forespørselen. (Feil %1)', Errors : { 10 : 'Ugyldig kommando.', 11 : 'Ressurstypen ble ikke spesifisert i forepørselen.', 12 : 'Ugyldig ressurstype.', 102 : 'Ugyldig fil- eller mappenavn.', 103 : 'Kunne ikke utføre forespørselen pga manglende autorisasjon.', 104 : 'Kunne ikke utføre forespørselen pga manglende tilgang til filsystemet.', 105 : 'Ugyldig filtype.', 109 : 'Ugyldig forespørsel.', 110 : 'Ukjent feil.', 115 : 'Det finnes allerede en fil eller mappe med dette navnet.', 116 : 'Kunne ikke finne mappen. Oppdater vinduet og prøv igjen.', 117 : 'Kunne ikke finne filen. Oppdater vinduet og prøv igjen.', 118 : 'Source and target paths are equal.', // MISSING 201 : 'Det fantes allerede en fil med dette navnet. Den opplastede filens navn har blitt endret til "%1"', 202 : 'Ugyldig fil', 203 : 'Ugyldig fil. Filen er for stor.', 204 : 'Den opplastede filen er korrupt.', 205 : 'Det finnes ingen midlertidig mappe for filopplastinger.', 206 : 'Opplastingen ble avbrutt av sikkerhetshensyn. Filen inneholder HTML-aktig data.', 207 : 'Den opplastede filens navn har blitt endret til "%1"', 300 : 'Moving file(s) failed.', // MISSING 301 : 'Copying file(s) failed.', // MISSING 500 : 'Filvelgeren ikke tilgjengelig av sikkerhetshensyn. Kontakt systemansvarlig og be han sjekke CKFinder\'s konfigurasjonsfil.', 501 : 'Funksjon for minityrbilder er skrudd av.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Filnavnet kan ikke være tomt', FileExists : 'File %s already exists', // MISSING FolderEmpty : 'Mappenavnet kan ikke være tomt', FileInvChar : 'Filnavnet kan ikke inneholde følgende tegn: \n\\ / : * ? " < > |', FolderInvChar : 'Mappenavnet kan ikke inneholde følgende tegn: \n\\ / : * ? " < > |', PopupBlockView : 'Du må skru av popup-blockeren for å se bildet i nytt vindu.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Resize %s', // MISSING sizeTooBig : 'Cannot set image height or width to a value bigger than the original size (%size).', // MISSING resizeSuccess : 'Image resized successfully.', // MISSING thumbnailNew : 'Create new thumbnail', // MISSING thumbnailSmall : 'Small (%s)', // MISSING thumbnailMedium : 'Medium (%s)', // MISSING thumbnailLarge : 'Large (%s)', // MISSING newSize : 'Set new size', // MISSING width : 'Width', // MISSING height : 'Height', // MISSING invalidHeight : 'Invalid height.', // MISSING invalidWidth : 'Invalid width.', // MISSING invalidName : 'Invalid file name.', // MISSING newImage : 'Create new image', // MISSING noExtensionChange : 'The file extension cannot be changed.', // MISSING imageSmall : 'Source image is too small', // MISSING contextMenuName : 'Resize' // MISSING }, // Fileeditor plugin Fileeditor : { save : 'Save', // MISSING fileOpenError : 'Unable to open file.', // MISSING fileSaveSuccess : 'File saved successfully.', // MISSING contextMenuName : 'Edit', // MISSING loadingFile : 'Loading file, please wait...' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the English * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['en'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', ok : 'OK', cancel : 'Cancel', confirmationTitle : 'Confirmation', messageTitle : 'Information', inputTitle : 'Question', undo : 'Undo', redo : 'Redo', skip : 'Skip', skipAll : 'Skip all', makeDecision : 'What action should be taken?', rememberDecision: 'Remember my decision' }, dir : 'ltr', HelpLang : 'en', LangCode : 'en', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'm/d/yyyy h:MM aa', DateAmPm : ['AM','PM'], // Folders FoldersTitle : 'Folders', FolderLoading : 'Loading...', FolderNew : 'Please type the new folder name: ', FolderRename : 'Please type the new folder name: ', FolderDelete : 'Are you sure you want to delete the "%1" folder?', FolderRenaming : ' (Renaming...)', FolderDeleting : ' (Deleting...)', // Files FileRename : 'Please type the new file name: ', FileRenameExt : 'Are you sure you want to change the file name extension? The file may become unusable', FileRenaming : 'Renaming...', FileDelete : 'Are you sure you want to delete the file "%1"?', FilesLoading : 'Loading...', FilesEmpty : 'Empty folder', FilesMoved : 'File %1 moved into %2:%3', FilesCopied : 'File %1 copied into %2:%3', // Basket BasketFolder : 'Basket', BasketClear : 'Clear Basket', BasketRemove : 'Remove from basket', BasketOpenFolder : 'Open parent folder', BasketTruncateConfirm : 'Do you really want to remove all files from the basket?', BasketRemoveConfirm : 'Do you really want to remove the file "%1" from the basket?', BasketEmpty : 'No files in the basket, drag\'n\'drop some.', BasketCopyFilesHere : 'Copy Files from Basket', BasketMoveFilesHere : 'Move Files from Basket', BasketPasteErrorOther : 'File %s error: %e', BasketPasteMoveSuccess : 'The following files were moved: %s', BasketPasteCopySuccess : 'The following files were copied: %s', // Toolbar Buttons (some used elsewhere) Upload : 'Upload', UploadTip : 'Upload New File', Refresh : 'Refresh', Settings : 'Settings', Help : 'Help', HelpTip : 'Help', // Context Menus Select : 'Select', SelectThumbnail : 'Select Thumbnail', View : 'View', Download : 'Download', NewSubFolder : 'New Subfolder', Rename : 'Rename', Delete : 'Delete', CopyDragDrop : 'Copy file here', MoveDragDrop : 'Move file here', // Dialogs RenameDlgTitle : 'Rename', NewNameDlgTitle : 'New name', FileExistsDlgTitle : 'File already exists', SysErrorDlgTitle : 'System error', FileOverwrite : 'Overwrite', FileAutorename : 'Auto-rename', // Generic OkBtn : 'OK', CancelBtn : 'Cancel', CloseBtn : 'Close', // Upload Panel UploadTitle : 'Upload New File', UploadSelectLbl : 'Select the file to upload', UploadProgressLbl : '(Upload in progress, please wait...)', UploadBtn : 'Upload Selected File', UploadBtnCancel : 'Cancel', UploadNoFileMsg : 'Please select a file from your computer', UploadNoFolder : 'Please select folder before uploading.', UploadNoPerms : 'File upload not allowed.', UploadUnknError : 'Error sending the file.', UploadExtIncorrect : 'File extension not allowed in this folder.', // Settings Panel SetTitle : 'Settings', SetView : 'View:', SetViewThumb : 'Thumbnails', SetViewList : 'List', SetDisplay : 'Display:', SetDisplayName : 'File Name', SetDisplayDate : 'Date', SetDisplaySize : 'File Size', SetSort : 'Sorting:', SetSortName : 'by File Name', SetSortDate : 'by Date', SetSortSize : 'by Size', // Status Bar FilesCountEmpty : '<Empty Folder>', FilesCountOne : '1 file', FilesCountMany : '%1 files', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'It was not possible to complete the request. (Error %1)', Errors : { 10 : 'Invalid command.', 11 : 'The resource type was not specified in the request.', 12 : 'The requested resource type is not valid.', 102 : 'Invalid file or folder name.', 103 : 'It was not possible to complete the request due to authorization restrictions.', 104 : 'It was not possible to complete the request due to file system permission restrictions.', 105 : 'Invalid file extension.', 109 : 'Invalid request.', 110 : 'Unknown error.', 115 : 'A file or folder with the same name already exists.', 116 : 'Folder not found. Please refresh and try again.', 117 : 'File not found. Please refresh the files list and try again.', 118 : 'Source and target paths are equal.', 201 : 'A file with the same name is already available. The uploaded file has been renamed to "%1"', 202 : 'Invalid file', 203 : 'Invalid file. The file size is too big.', 204 : 'The uploaded file is corrupt.', 205 : 'No temporary folder is available for upload in the server.', 206 : 'Upload cancelled for security reasons. The file contains HTML like data.', 207 : 'The uploaded file has been renamed to "%1"', 300 : 'Moving file(s) failed.', 301 : 'Copying file(s) failed.', 500 : 'The file browser is disabled for security reasons. Please contact your system administrator and check the CKFinder configuration file.', 501 : 'The thumbnails support is disabled.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'The file name cannot be empty', FileExists : 'File %s already exists', FolderEmpty : 'The folder name cannot be empty', FileInvChar : 'The file name cannot contain any of the following characters: \n\\ / : * ? " < > |', FolderInvChar : 'The folder name cannot contain any of the following characters: \n\\ / : * ? " < > |', PopupBlockView : 'It was not possible to open the file in a new window. Please configure your browser and disable all popup blockers for this site.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Resize %s', sizeTooBig : 'Cannot set image height or width to a value bigger than the original size (%size).', resizeSuccess : 'Image resized successfully.', thumbnailNew : 'Create new thumbnail', thumbnailSmall : 'Small (%s)', thumbnailMedium : 'Medium (%s)', thumbnailLarge : 'Large (%s)', newSize : 'Set new size', width : 'Width', height : 'Height', invalidHeight : 'Invalid height.', invalidWidth : 'Invalid width.', invalidName : 'Invalid file name.', newImage : 'Create new image', noExtensionChange : 'The file extension cannot be changed.', imageSmall : 'Source image is too small', contextMenuName : 'Resize' }, // Fileeditor plugin Fileeditor : { save : 'Save', fileOpenError : 'Unable to open file.', fileSaveSuccess : 'File saved successfully.', contextMenuName : 'Edit', loadingFile : 'Loading file, please wait...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Latvian * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['lv'] = { appTitle : 'CKFinder', // MISSING // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING ok : 'OK', // MISSING cancel : 'Cancel', // MISSING confirmationTitle : 'Confirmation', // MISSING messageTitle : 'Information', // MISSING inputTitle : 'Question', // MISSING undo : 'Undo', // MISSING redo : 'Redo', // MISSING skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', // MISSING HelpLang : 'en', LangCode : 'lv', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'dd/mm/yyyy H:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Mapes', FolderLoading : 'Ielādē...', FolderNew : 'Lūdzu ierakstiet mapes nosaukumu: ', FolderRename : 'Lūdzu ierakstiet jauno mapes nosaukumu: ', FolderDelete : 'Vai tiešām vēlaties neatgriezeniski dzēst mapi "%1"?', FolderRenaming : ' (Pārsauc...)', FolderDeleting : ' (Dzēš...)', // Files FileRename : 'Lūdzu ierakstiet jauno faila nosaukumu: ', FileRenameExt : 'Vai tiešām vēlaties mainīt faila paplašinājumu? Fails var palikt nelietojams.', FileRenaming : 'Pārsauc...', FileDelete : 'Vai tiešām vēlaties neatgriezeniski dzēst failu "%1"?', FilesLoading : 'Loading...', // MISSING FilesEmpty : 'Empty folder', // MISSING FilesMoved : 'File %1 moved into %2:%3', // MISSING FilesCopied : 'File %1 copied into %2:%3', // MISSING // Basket BasketFolder : 'Basket', // MISSING BasketClear : 'Clear Basket', // MISSING BasketRemove : 'Remove from basket', // MISSING BasketOpenFolder : 'Open parent folder', // MISSING BasketTruncateConfirm : 'Do you really want to remove all files from the basket?', // MISSING BasketRemoveConfirm : 'Do you really want to remove the file "%1" from the basket?', // MISSING BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copy Files from Basket', // MISSING BasketMoveFilesHere : 'Move Files from Basket', // MISSING BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'The following files were moved: %s', // MISSING BasketPasteCopySuccess : 'The following files were copied: %s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Augšupielādēt', UploadTip : 'Augšupielādēt jaunu failu', Refresh : 'Pārlādēt', Settings : 'Uzstādījumi', Help : 'Palīdzība', HelpTip : 'Palīdzība', // Context Menus Select : 'Izvēlēties', SelectThumbnail : 'Izvēlēties sīkbildi', View : 'Skatīt', Download : 'Lejupielādēt', NewSubFolder : 'Jauna apakšmape', Rename : 'Pārsaukt', Delete : 'Dzēst', CopyDragDrop : 'Copy file here', // MISSING MoveDragDrop : 'Move file here', // MISSING // Dialogs RenameDlgTitle : 'Rename', // MISSING NewNameDlgTitle : 'New name', // MISSING FileExistsDlgTitle : 'File already exists', // MISSING SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Overwrite', // MISSING FileAutorename : 'Auto-rename', // MISSING // Generic OkBtn : 'Labi', CancelBtn : 'Atcelt', CloseBtn : 'Aizvērt', // Upload Panel UploadTitle : 'Jauna faila augšupielādēšana', UploadSelectLbl : 'Izvēlaties failu, ko augšupielādēt', UploadProgressLbl : '(Augšupielādē, lūdzu uzgaidiet...)', UploadBtn : 'Augšupielādēt izvēlēto failu', UploadBtnCancel : 'Cancel', // MISSING UploadNoFileMsg : 'Lūdzu izvēlaties failu no sava datora', UploadNoFolder : 'Please select folder before uploading.', // MISSING UploadNoPerms : 'File upload not allowed.', // MISSING UploadUnknError : 'Error sending the file.', // MISSING UploadExtIncorrect : 'File extension not allowed in this folder.', // MISSING // Settings Panel SetTitle : 'Uzstādījumi', SetView : 'Attēlot:', SetViewThumb : 'Sīkbildes', SetViewList : 'Failu Sarakstu', SetDisplay : 'Rādīt:', SetDisplayName : 'Faila Nosaukumu', SetDisplayDate : 'Datumu', SetDisplaySize : 'Faila Izmēru', SetSort : 'Kārtot:', SetSortName : 'pēc Faila Nosaukuma', SetSortDate : 'pēc Datuma', SetSortSize : 'pēc Izmēra', // Status Bar FilesCountEmpty : '<Tukša mape>', FilesCountOne : '1 fails', FilesCountMany : '%1 faili', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'Nebija iespējams pabeigt pieprasījumu. (Kļūda %1)', Errors : { 10 : 'Nederīga komanda.', 11 : 'Resursa veids netika norādīts pieprasījumā.', 12 : 'Pieprasītais resursa veids nav derīgs.', 102 : 'Nederīgs faila vai mapes nosaukums.', 103 : 'Nav iespējams pabeigt pieprasījumu, autorizācijas aizliegumu dēļ.', 104 : 'Nav iespējams pabeigt pieprasījumu, failu sistēmas atļauju ierobežojumu dēļ.', 105 : 'Neatļauts faila paplašinājums.', 109 : 'Nederīgs pieprasījums.', 110 : 'Nezināma kļūda.', 115 : 'Fails vai mape ar šādu nosaukumu jau pastāv.', 116 : 'Mape nav atrasta. Lūdzu pārlādējiet šo logu un mēģiniet vēlreiz.', 117 : 'Fails nav atrasts. Lūdzu pārlādējiet failu sarakstu un mēģiniet vēlreiz.', 118 : 'Source and target paths are equal.', // MISSING 201 : 'Fails ar šādu nosaukumu jau eksistē. Augšupielādētais fails tika pārsaukts par "%1"', 202 : 'Nederīgs fails', 203 : 'Nederīgs fails. Faila izmērs pārsniedz pieļaujamo.', 204 : 'Augšupielādētais fails ir bojāts.', 205 : 'Neviena pagaidu mape nav pieejama priekš augšupielādēšanas uz servera.', 206 : 'Augšupielāde atcelta drošības apsvērumu dēļ. Fails satur HTML veida datus.', 207 : 'Augšupielādētais fails tika pārsaukts par "%1"', 300 : 'Moving file(s) failed.', // MISSING 301 : 'Copying file(s) failed.', // MISSING 500 : 'Failu pārlūks ir atslēgts drošības apsvērumu dēļ. Lūdzu sazinieties ar šīs sistēmas tehnisko administratoru vai pārbaudiet CKFinder konfigurācijas failu.', 501 : 'Sīkbilžu atbalsts ir atslēgts.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Faila nosaukumā nevar būt tukšums', FileExists : 'File %s already exists', // MISSING FolderEmpty : 'Mapes nosaukumā nevar būt tukšums', FileInvChar : 'Faila nosaukums nedrīkst saturēt nevienu no sekojošajām zīmēm: \n\\ / : * ? " < > |', FolderInvChar : 'Mapes nosaukums nedrīkst saturēt nevienu no sekojošajām zīmēm: \n\\ / : * ? " < > |', PopupBlockView : 'Nav iespējams failu atvērt jaunā logā. Lūdzu veiciet izmaiņas uzstādījumos savai interneta pārlūkprogrammai un izslēdziet visus uznirstošo logu bloķētājus šai adresei.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Resize %s', // MISSING sizeTooBig : 'Cannot set image height or width to a value bigger than the original size (%size).', // MISSING resizeSuccess : 'Image resized successfully.', // MISSING thumbnailNew : 'Create new thumbnail', // MISSING thumbnailSmall : 'Small (%s)', // MISSING thumbnailMedium : 'Medium (%s)', // MISSING thumbnailLarge : 'Large (%s)', // MISSING newSize : 'Set new size', // MISSING width : 'Width', // MISSING height : 'Height', // MISSING invalidHeight : 'Invalid height.', // MISSING invalidWidth : 'Invalid width.', // MISSING invalidName : 'Invalid file name.', // MISSING newImage : 'Create new image', // MISSING noExtensionChange : 'The file extension cannot be changed.', // MISSING imageSmall : 'Source image is too small', // MISSING contextMenuName : 'Resize' // MISSING }, // Fileeditor plugin Fileeditor : { save : 'Save', // MISSING fileOpenError : 'Unable to open file.', // MISSING fileSaveSuccess : 'File saved successfully.', // MISSING contextMenuName : 'Edit', // MISSING loadingFile : 'Loading file, please wait...' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the English * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['he'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, לא נגיש</span>', confirmCancel : 'חקל ממאפיינים שונו. ברצונך לסגור חלון?', ok : 'אישור', cancel : 'ביטול', confirmationTitle : 'אישור', messageTitle : 'מידע', inputTitle : 'שאלה', undo : 'לבטל', redo : 'לעשות שוב', skip : 'דלג', skipAll : 'דלג הכל', makeDecision : 'איזו פעולה לבצע?', rememberDecision: 'זכור החלטתי' }, dir : 'rtl', HelpLang : 'en', LangCode : 'he', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'm/d/yyyy h:MM aa', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'תיקיות', FolderLoading : 'טוען...', FolderNew : 'הקלד שם חדש לתיקיה: ', FolderRename : 'הקלד שם חדש לתיקיה: ', FolderDelete : 'האם ברצונך למחוק תיקיה "%1" ?', FolderRenaming : ' (משנה שם...)', FolderDeleting : ' (מוחק...)', // Files FileRename : 'הקלש שם חדש לקובץ: ', FileRenameExt : 'האם ברוצונך לשנות טיפוס של הקובץ', FileRenaming : 'משנה שם...', FileDelete : 'האם ברצונך למחוק קובץ "%1"?', FilesLoading : 'טוען...', FilesEmpty : 'תיקיה ריקה', FilesMoved : 'קובץ %1 הוזז ל- %2:%3', FilesCopied : 'קובץ %1 הועתק ל- %2:%3', // Basket BasketFolder : 'סל', BasketClear : 'נקה סל', BasketRemove : 'הורד מסל', BasketOpenFolder : 'פתח תיקיית אב', BasketTruncateConfirm : 'האם ברוצונך למחוק את כל הקבצים מסל?', BasketRemoveConfirm : 'האם ברוצונך למחוק את קובץ "%1" מסל?', BasketEmpty : 'אין קבצים בסל, גרור ושחרר משהוא.', BasketCopyFilesHere : 'העתק קבצים מסל', BasketMoveFilesHere : 'הזז קבצים מסל', BasketPasteErrorOther : 'קובץ %s שגיאה: %e', BasketPasteMoveSuccess : 'קבצים הבאים הוזזו: %s', BasketPasteCopySuccess : 'קבצים הבאים הועתקו: %s', // Toolbar Buttons (some used elsewhere) Upload : 'העלאה', UploadTip : 'לעלות קובץ חדש', Refresh : 'רענון', Settings : 'הגדרות', Help : 'עזרה', HelpTip : 'עזרה', // Context Menus Select : 'בחר', SelectThumbnail : 'בחר תמונה קטנה', View : 'צפה', Download : 'הורד', NewSubFolder : 'תת-תיקיה חדשה', Rename : 'שנה שם', Delete : 'מחק', CopyDragDrop : 'העתק קבצים לכאן', MoveDragDrop : 'הזז קבצים לכאן', // Dialogs RenameDlgTitle : 'שנה שם', NewNameDlgTitle : 'שם חדש', FileExistsDlgTitle : 'קובץ כבר קיים', SysErrorDlgTitle : 'שגיעת מערכת', FileOverwrite : 'החלף', FileAutorename : 'אוטומטית לשנות שם', // Generic OkBtn : 'אישור', CancelBtn : 'ביטול', CloseBtn : 'סגור', // Upload Panel UploadTitle : 'העלאת קובץ חדש', UploadSelectLbl : 'בחר קובץ להעלאה', UploadProgressLbl : '(העלאה בתהליך, אנא המתן...)', UploadBtn : 'לעלות קובץ', UploadBtnCancel : 'ביטול', UploadNoFileMsg : 'נא לבחור קובץ מהמחשב שלך', UploadNoFolder : 'נא לבחור תיקיה לפני העלאה.', UploadNoPerms : 'העלאת קובץ אסורה.', UploadUnknError : 'שגיעה בשליחת קובץ.', UploadExtIncorrect : 'סוג קובץ זה לא מאושר בתיקיה זאת.', // Settings Panel SetTitle : 'הגדרות', SetView : 'צפה:', SetViewThumb : 'תמונות קטנות', SetViewList : 'רשימה', SetDisplay : 'תצוגה:', SetDisplayName : 'שם קובץ', SetDisplayDate : 'תאריך', SetDisplaySize : 'גודל קובץ', SetSort : 'מיון:', SetSortName : 'לפי שם', SetSortDate : 'לפי תאריך', SetSortSize : 'לפי גודל', // Status Bar FilesCountEmpty : '<תיקיה ריקה>', FilesCountOne : 'קובץ 1', FilesCountMany : '%1 קבצים', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'בקשה נכשלה. שגיאה. (Error %1)', Errors : { 10 : 'Invalid command.', 11 : 'The resource type was not specified in the request.', 12 : 'The requested resource type is not valid.', 102 : 'Invalid file or folder name.', 103 : 'It was not possible to complete the request due to authorization restrictions.', 104 : 'It was not possible to complete the request due to file system permission restrictions.', 105 : 'Invalid file extension.', 109 : 'Invalid request.', 110 : 'Unknown error.', 115 : 'A file or folder with the same name already exists.', 116 : 'Folder not found. Please refresh and try again.', 117 : 'File not found. Please refresh the files list and try again.', 118 : 'Source and target paths are equal.', 201 : 'A file with the same name is already available. The uploaded file has been renamed to "%1"', 202 : 'Invalid file', 203 : 'Invalid file. The file size is too big.', 204 : 'The uploaded file is corrupt.', 205 : 'No temporary folder is available for upload in the server.', 206 : 'Upload cancelled for security reasons. The file contains HTML like data.', 207 : 'The uploaded file has been renamed to "%1"', 300 : 'Moving file(s) failed.', 301 : 'Copying file(s) failed.', 500 : 'The file browser is disabled for security reasons. Please contact your system administrator and check the CKFinder configuration file.', 501 : 'The thumbnails support is disabled.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'שם קובץ לא יכול להיות ריק', FileExists : 'קובץ %s already exists', FolderEmpty : 'שם תיקיה לא יכול להיות ריק', FileInvChar : 'שם הקובץ לא יכול לכלול תווים הבאים: \n\\ / : * ? " < > |', FolderInvChar : 'שם התיקיה לא יכול לכלול תווים הבאים: \n\\ / : * ? " < > |', PopupBlockView : 'בלתי אפשרי לפתוח קובץ בחלון חדש. נא לבדוק הגדרות דפדפן ולבטל כל החוסמים חלונות קופצות.' }, // Imageresize plugin Imageresize : { dialogTitle : 'שנה גודל %s', sizeTooBig : 'לא יכול לקבוע גובה ורוחב של תמונה יותר גדול מדודל מקורי (%size).', resizeSuccess : 'גודל שונה שהצלחה.', thumbnailNew : 'ליצור תמונה קטנה)טומבנייל(', thumbnailSmall : 'קטן (%s)', thumbnailMedium : 'בינוני (%s)', thumbnailLarge : 'גדול (%s)', newSize : 'קבע גודל חדש', width : 'רוחב', height : 'גובה', invalidHeight : 'גובה לא חוקי.', invalidWidth : 'רוחב לא חוקי.', invalidName : 'שם קובץ לא חוקי.', newImage : 'ליצור תמונה חדשה', noExtensionChange : 'לא ניתן לשנות סוג קובץ.', imageSmall : 'מקור תמונה קטן מדי', contextMenuName : 'שנה גודל' }, // Fileeditor plugin Fileeditor : { save : 'שמור', fileOpenError : 'לא מצליח לפתוח קובץ.', fileSaveSuccess : 'קובץ משמר בהצלחה.', contextMenuName : 'עריכה', loadingFile : 'טוען קובץ, אנא המתן...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Slovenian * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['sl'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, nedostopen</span>', confirmCancel : 'Nekatere opcije so bile spremenjene. Ali res želite zapreti pogovorno okno?', ok : 'Potrdi', cancel : 'Prekliči', confirmationTitle : 'Potrditev', messageTitle : 'Informacija', inputTitle : 'Vprašanje', undo : 'Razveljavi', redo : 'Obnovi', skip : 'Preskoči', skipAll : 'Preskoči vse', makeDecision : 'Katera aktivnost naj se izvede?', rememberDecision: 'Zapomni si mojo izbiro' }, dir : 'ltr', // MISSING HelpLang : 'en', LangCode : 'sl', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'd.m.yyyy H:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Mape', FolderLoading : 'Nalagam...', FolderNew : 'Vnesite ime za novo mapo: ', FolderRename : 'Vnesite ime nove mape: ', FolderDelete : 'Ali ste prepričani, da želite zbrisati mapo "%1"?', FolderRenaming : ' (Preimenujem...)', FolderDeleting : ' (Brišem...)', // Files FileRename : 'Vnesite novo ime datoteke: ', FileRenameExt : 'Ali ste prepričani, da želite spremeniti končnico datoteke? Možno je, da potem datoteka ne bo uporabna.', FileRenaming : 'Preimenujem...', FileDelete : 'Ali ste prepričani, da želite izbrisati datoteko "%1"?', FilesLoading : 'Nalagam...', FilesEmpty : 'Prazna mapa', FilesMoved : 'Datoteka %1 je bila premaknjena v %2:%3', FilesCopied : 'Datoteka %1 je bila kopirana v %2:%3', // Basket BasketFolder : 'Koš', BasketClear : 'Izprazni koš', BasketRemove : 'Odstrani iz koša', BasketOpenFolder : 'Odpri izvorno mapo', BasketTruncateConfirm : 'Ali res želite odstraniti vse datoteke iz koša?', BasketRemoveConfirm : 'Ali res želite odstraniti datoteko "%1" iz koša?', BasketEmpty : 'V košu ni datotek. Lahko jih povlečete in spustite.', BasketCopyFilesHere : 'Kopiraj datoteke iz koša', BasketMoveFilesHere : 'Premakni datoteke iz koša', BasketPasteErrorOther : 'Napaka z datoteko %s: %e', BasketPasteMoveSuccess : 'Seznam premaknjenih datotek: %s', BasketPasteCopySuccess : 'Seznam kopiranih datotek: %s', // Toolbar Buttons (some used elsewhere) Upload : 'Naloži na strežnik', UploadTip : 'Naloži novo datoteko na strežnik', Refresh : 'Osveži', Settings : 'Nastavitve', Help : 'Pomoč', HelpTip : 'Pomoč', // Context Menus Select : 'Izberi', SelectThumbnail : 'Izberi malo sličico (predogled)', View : 'Predogled', Download : 'Prenesi na svoj računalnik', NewSubFolder : 'Nova podmapa', Rename : 'Preimenuj', Delete : 'Zbriši', CopyDragDrop : 'Kopiraj datoteko', MoveDragDrop : 'Premakni datoteko', // Dialogs RenameDlgTitle : 'Preimenuj', NewNameDlgTitle : 'Novo ime', FileExistsDlgTitle : 'Datoteka že obstaja', SysErrorDlgTitle : 'Sistemska napaka', FileOverwrite : 'Prepiši', FileAutorename : 'Avtomatsko preimenuj', // Generic OkBtn : 'Potrdi', CancelBtn : 'Prekliči', CloseBtn : 'Zapri', // Upload Panel UploadTitle : 'Naloži novo datoteko na strežnik', UploadSelectLbl : 'Izberi datoteko za prenos na strežnik', UploadProgressLbl : '(Prenos na strežnik poteka, prosimo počakajte...)', UploadBtn : 'Prenesi izbrano datoteko na strežnik', UploadBtnCancel : 'Prekliči', UploadNoFileMsg : 'Prosimo izberite datoteko iz svojega računalnika za prenos na strežnik', UploadNoFolder : 'Izberite mapo v katero se bo naložilo datoteko!', UploadNoPerms : 'Nalaganje datotek ni dovoljeno.', UploadUnknError : 'Napaka pri pošiljanju datoteke.', UploadExtIncorrect : 'V tej mapi ta vrsta datoteke ni dovoljena.', // Settings Panel SetTitle : 'Nastavitve', SetView : 'Pogled:', SetViewThumb : 'majhne sličice', SetViewList : 'seznam', SetDisplay : 'Prikaz:', SetDisplayName : 'ime datoteke', SetDisplayDate : 'datum', SetDisplaySize : 'velikost datoteke', SetSort : 'Razvrščanje:', SetSortName : 'po imenu datoteke', SetSortDate : 'po datumu', SetSortSize : 'po velikosti', // Status Bar FilesCountEmpty : '<Prazna mapa>', FilesCountOne : '1 datoteka', FilesCountMany : '%1 datotek(e)', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/sek', // Connector Error Messages. ErrorUnknown : 'Prišlo je do napake. (Napaka %1)', Errors : { 10 : 'Napačen ukaz.', 11 : 'V poizvedbi ni bil jasen tip (resource type).', 12 : 'Tip datoteke ni primeren.', 102 : 'Napačno ime mape ali datoteke.', 103 : 'Vašega ukaza se ne da izvesti zaradi težav z avtorizacijo.', 104 : 'Vašega ukaza se ne da izvesti zaradi težav z nastavitvami pravic v datotečnem sistemu.', 105 : 'Napačna končnica datoteke.', 109 : 'Napačna zahteva.', 110 : 'Neznana napaka.', 115 : 'Datoteka ali mapa s tem imenom že obstaja.', 116 : 'Mapa ni najdena. Prosimo osvežite okno in poskusite znova.', 117 : 'Datoteka ni najdena. Prosimo osvežite seznam datotek in poskusite znova.', 118 : 'Začetna in končna pot je ista.', 201 : 'Datoteka z istim imenom že obstaja. Naložena datoteka je bila preimenovana v "%1"', 202 : 'Neprimerna datoteka.', 203 : 'Datoteka je prevelika in zasede preveč prostora.', 204 : 'Naložena datoteka je okvarjena.', 205 : 'Na strežniku ni na voljo začasna mapa za prenos datotek.', 206 : 'Nalaganje je bilo prekinjeno zaradi varnostnih razlogov. Datoteka vsebuje podatke, ki spominjajo na HTML kodo.', 207 : 'Naložena datoteka je bila preimenovana v "%1"', 300 : 'Premikanje datotek(e) ni uspelo.', 301 : 'Kopiranje datotek(e) ni uspelo.', 500 : 'Brskalnik je onemogočen zaradi varnostnih razlogov. Prosimo kontaktirajte upravljalca spletnih strani.', 501 : 'Ni podpore za majhne sličice (predogled).' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Ime datoteke ne more biti prazno', FileExists : 'Datoteka %s že obstaja', FolderEmpty : 'Mapa ne more biti prazna', FileInvChar : 'Ime datoteke ne sme vsebovati naslednjih znakov: \n\\ / : * ? " < > |', FolderInvChar : 'Ime mape ne sme vsebovati naslednjih znakov: \n\\ / : * ? " < > |', PopupBlockView : 'Datoteke ni možno odpreti v novem oknu. Prosimo nastavite svoj brskalnik tako, da bo dopuščal odpiranje oken (popups) oz. izklopite filtre za blokado odpiranja oken.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Spremeni velikost slike %s', sizeTooBig : 'Širina ali višina slike ne moreta biti večji kot je originalna velikost (%size).', resizeSuccess : 'Velikost slike je bila uspešno spremenjena.', thumbnailNew : 'Kreiraj novo majhno sličico', thumbnailSmall : 'majhna (%s)', thumbnailMedium : 'srednja (%s)', thumbnailLarge : 'velika (%s)', newSize : 'Določite novo velikost', width : 'Širina', height : 'Višina', invalidHeight : 'Nepravilna višina.', invalidWidth : 'Nepravilna širina.', invalidName : 'Nepravilno ime datoteke.', newImage : 'Kreiraj novo sliko', noExtensionChange : 'Končnica datoteke se ne more spremeniti.', imageSmall : 'Izvorna slika je premajhna', contextMenuName : 'Spremeni velikost' }, // Fileeditor plugin Fileeditor : { save : 'Shrani', fileOpenError : 'Datoteke ni mogoče odpreti.', fileSaveSuccess : 'Datoteka je bila shranjena.', contextMenuName : 'Uredi', loadingFile : 'Nalaganje datoteke, prosimo počakajte ...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['cs'] = { appTitle : 'CKFinder', // MISSING // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING ok : 'OK', // MISSING cancel : 'Cancel', // MISSING confirmationTitle : 'Confirmation', // MISSING messageTitle : 'Information', // MISSING inputTitle : 'Question', // MISSING undo : 'Undo', // MISSING redo : 'Redo', // MISSING skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', // MISSING HelpLang : 'en', LangCode : 'cs', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'm/d/yyyy h:MM aa', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Složky', FolderLoading : 'Načítání...', FolderNew : 'Zadejte jméno nové složky: ', FolderRename : 'Zadejte nové jméno složky: ', FolderDelete : 'Opravdu chcete smazat složku "%1" ?', FolderRenaming : ' (Přejmenovávám...)', FolderDeleting : ' (Mažu...)', // Files FileRename : 'Zadejte jméno novéhho souboru: ', FileRenameExt : 'Opravdu chcete změnit příponu souboru, může se stát nečitelným', FileRenaming : 'Přejmenovávám...', FileDelete : 'Opravdu chcete smazat soubor "%1"?', FilesLoading : 'Loading...', // MISSING FilesEmpty : 'Empty folder', // MISSING FilesMoved : 'File %1 moved into %2:%3', // MISSING FilesCopied : 'File %1 copied into %2:%3', // MISSING // Basket BasketFolder : 'Basket', // MISSING BasketClear : 'Clear Basket', // MISSING BasketRemove : 'Remove from basket', // MISSING BasketOpenFolder : 'Open parent folder', // MISSING BasketTruncateConfirm : 'Do you really want to remove all files from the basket?', // MISSING BasketRemoveConfirm : 'Do you really want to remove the file "%1" from the basket?', // MISSING BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copy Files from Basket', // MISSING BasketMoveFilesHere : 'Move Files from Basket', // MISSING BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'The following files were moved: %s', // MISSING BasketPasteCopySuccess : 'The following files were copied: %s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Nahrát', UploadTip : 'Nahrát nový soubor', Refresh : 'Načíst znova', Settings : 'Nastavení', Help : 'Pomoc', HelpTip : 'Pomoc', // Context Menus Select : 'Vybrat', SelectThumbnail : 'Vybrat náhled', View : 'Zobrazit', Download : 'Uložit jako', NewSubFolder : 'Nová podsložka', Rename : 'Přejmenovat', Delete : 'Smazat', CopyDragDrop : 'Copy file here', // MISSING MoveDragDrop : 'Move file here', // MISSING // Dialogs RenameDlgTitle : 'Rename', // MISSING NewNameDlgTitle : 'New name', // MISSING FileExistsDlgTitle : 'File already exists', // MISSING SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Overwrite', // MISSING FileAutorename : 'Auto-rename', // MISSING // Generic OkBtn : 'OK', CancelBtn : 'Zrušit', CloseBtn : 'Zavřít', // Upload Panel UploadTitle : 'Nahrát nový soubor', UploadSelectLbl : 'Zvolit soubor k nahrání', UploadProgressLbl : '(Nahrávám, čekejte...)', UploadBtn : 'Nahrát zvolený soubor', UploadBtnCancel : 'Cancel', // MISSING UploadNoFileMsg : 'Vyberte prosím soubor', UploadNoFolder : 'Please select folder before uploading.', // MISSING UploadNoPerms : 'File upload not allowed.', // MISSING UploadUnknError : 'Error sending the file.', // MISSING UploadExtIncorrect : 'File extension not allowed in this folder.', // MISSING // Settings Panel SetTitle : 'Nastavení', SetView : 'Zobrazení:', SetViewThumb : 'Náhledy', SetViewList : 'Seznam', SetDisplay : 'Informace:', SetDisplayName : 'Název', SetDisplayDate : 'Datum', SetDisplaySize : 'Velikost', SetSort : 'Seřazení:', SetSortName : 'Podle jména', SetSortDate : 'Podle data', SetSortSize : 'Podle velikosti', // Status Bar FilesCountEmpty : '<Prázdná složka>', FilesCountOne : '1 soubor', FilesCountMany : '%1 soubor', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'Nebylo možno dokončit příkaz. (Error %1)', Errors : { 10 : 'Neplatný příkaz.', 11 : 'Požadovaný typ prostředku nebyl specifikován v dotazu.', 12 : 'Požadovaný typ prostředku není validní.', 102 : 'Šatné jméno souboru, nebo složky.', 103 : 'Nebylo možné dokončit příkaz kvůli autorizačním omezením.', 104 : 'Nebylo možné dokončit příkaz kvůli omezeným přístupovým právům k souborům.', 105 : 'Špatná přípona souboru.', 109 : 'Neplatný příkaz.', 110 : 'Neznámá chyba.', 115 : 'Již existuje soubor nebo složka se stejným jménem.', 116 : 'Složka nenalezena, prosím obnovte stránku.', 117 : 'Soubor nenalezen, prosím obnovte stránku.', 118 : 'Source and target paths are equal.', // MISSING 201 : 'Již existoval soubor se stejným jménem, nahraný soubor byl přejmenován na "%1"', 202 : 'Špatný soubor', 203 : 'Špatný soubor. Příliš velký.', 204 : 'Nahraný soubor je poškozen.', 205 : 'Na serveru není dostupná dočasná složka.', 206 : 'Nahrávání zrušeno z bezpečnostních důvodů. Soubor obsahuje data podobná HTML.', 207 : 'Nahraný soubor byl přejmenován na "%1"', 300 : 'Moving file(s) failed.', // MISSING 301 : 'Copying file(s) failed.', // MISSING 500 : 'Nahrávání zrušeno z bezpečnostních důvodů. Zdělte to prosím administrátorovi a zkontrolujte nastavení CKFinderu.', 501 : 'Podpora náhledů je vypnuta.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Název souboru nemůže být prázdný', FileExists : 'File %s already exists', // MISSING FolderEmpty : 'Název složky nemůže být prázdný', FileInvChar : 'Název souboru nesmí obsahovat následující znaky: \n\\ / : * ? " < > |', FolderInvChar : 'Název složky nesmí obsahovat následující znaky: \n\\ / : * ? " < > |', PopupBlockView : 'Nebylo možné otevřít soubor do nového okna. Prosím nastavte si prohlížeč aby neblokoval vyskakovací okna.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Resize %s', // MISSING sizeTooBig : 'Cannot set image height or width to a value bigger than the original size (%size).', // MISSING resizeSuccess : 'Image resized successfully.', // MISSING thumbnailNew : 'Create new thumbnail', // MISSING thumbnailSmall : 'Small (%s)', // MISSING thumbnailMedium : 'Medium (%s)', // MISSING thumbnailLarge : 'Large (%s)', // MISSING newSize : 'Set new size', // MISSING width : 'Width', // MISSING height : 'Height', // MISSING invalidHeight : 'Invalid height.', // MISSING invalidWidth : 'Invalid width.', // MISSING invalidName : 'Invalid file name.', // MISSING newImage : 'Create new image', // MISSING noExtensionChange : 'The file extension cannot be changed.', // MISSING imageSmall : 'Source image is too small', // MISSING contextMenuName : 'Resize' // MISSING }, // Fileeditor plugin Fileeditor : { save : 'Save', // MISSING fileOpenError : 'Unable to open file.', // MISSING fileSaveSuccess : 'File saved successfully.', // MISSING contextMenuName : 'Edit', // MISSING loadingFile : 'Loading file, please wait...' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Latin American Spanish * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['es-mx'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, no disponible</span>', confirmCancel : 'Algunas opciones se han cambiado\r\n¿Está seguro de querer cerrar el diálogo?', ok : 'Aceptar', cancel : 'Cancelar', confirmationTitle : 'Confirmación', messageTitle : 'Información', inputTitle : 'Pregunta', undo : 'Deshacer', redo : 'Rehacer', skip : 'Omitir', skipAll : 'Omitir todos', makeDecision : '¿Qué acción debe realizarse?', rememberDecision: 'Recordar mi decisión' }, dir : 'ltr', HelpLang : 'es-mx', LangCode : 'es-mx', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'dd/mm/yyyy H:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Carpetas', FolderLoading : 'Cargando...', FolderNew : 'Por favor, escriba el nombre para la nueva carpeta: ', FolderRename : 'Por favor, escriba el nuevo nombre para la carpeta: ', FolderDelete : '¿Está seguro de que quiere borrar la carpeta "%1"?', FolderRenaming : ' (Renombrando...)', FolderDeleting : ' (Borrando...)', // Files FileRename : 'Por favor, escriba el nuevo nombre del archivo: ', FileRenameExt : '¿Está seguro de querer cambiar la extensión del archivo? El archivo puede dejar de ser usable', FileRenaming : 'Renombrando...', FileDelete : '¿Está seguro de que quiere borrar el archivo "%1"?', FilesLoading : 'Cargando...', FilesEmpty : 'Carpeta vacía', FilesMoved : 'Archivo %1 movido a %2:%3', FilesCopied : 'Archivo %1 copiado a %2:%3', // Basket BasketFolder : 'Cesta', BasketClear : 'Vaciar cesta', BasketRemove : 'Quitar de la cesta', BasketOpenFolder : 'Abrir carpeta padre', BasketTruncateConfirm : '¿Está seguro de querer quitar todos los archivos de la cesta?', BasketRemoveConfirm : '¿Está seguro de querer quitar el archivo "%1" de la cesta?', BasketEmpty : 'No hay archivos en la cesta, arrastra y suelta algunos.', BasketCopyFilesHere : 'Copiar archivos de la cesta', BasketMoveFilesHere : 'Mover archivos de la cesta', BasketPasteErrorOther : 'Fichero %s error: %e', BasketPasteMoveSuccess : 'Los siguientes ficheros han sido movidos: %s', BasketPasteCopySuccess : 'Los siguientes ficheros han sido copiados: %s', // Toolbar Buttons (some used elsewhere) Upload : 'Añadir', UploadTip : 'Añadir nuevo archivo', Refresh : 'Actualizar', Settings : 'Configuración', Help : 'Ayuda', HelpTip : 'Ayuda', // Context Menus Select : 'Seleccionar', SelectThumbnail : 'Seleccionar el icono', View : 'Ver', Download : 'Descargar', NewSubFolder : 'Nueva Subcarpeta', Rename : 'Renombrar', Delete : 'Borrar', CopyDragDrop : 'Copiar archivo aquí', MoveDragDrop : 'Mover archivo aquí', // Dialogs RenameDlgTitle : 'Renombrar', NewNameDlgTitle : 'Nuevo nombre', FileExistsDlgTitle : 'Archivo existente', SysErrorDlgTitle : 'Error de sistema', FileOverwrite : 'Sobreescribir', FileAutorename : 'Auto-renombrar', // Generic OkBtn : 'Aceptar', CancelBtn : 'Cancelar', CloseBtn : 'Cerrar', // Upload Panel UploadTitle : 'Añadir nuevo archivo', UploadSelectLbl : 'Elija el archivo a subir', UploadProgressLbl : '(Subida en progreso, por favor espere...)', UploadBtn : 'Subir el archivo elegido', UploadBtnCancel : 'Cancelar', UploadNoFileMsg : 'Por favor, elija un archivo de su computadora', UploadNoFolder : 'Por favor, escoja la carpeta antes de iniciar la subida.', UploadNoPerms : 'No puede subir archivos.', UploadUnknError : 'Error enviando el archivo.', UploadExtIncorrect : 'La extensión del archivo no está permitida en esta carpeta.', // Settings Panel SetTitle : 'Configuración', SetView : 'Vista:', SetViewThumb : 'Iconos', SetViewList : 'Lista', SetDisplay : 'Mostrar:', SetDisplayName : 'Nombre de archivo', SetDisplayDate : 'Fecha', SetDisplaySize : 'Tamaño del archivo', SetSort : 'Ordenar:', SetSortName : 'por Nombre', SetSortDate : 'por Fecha', SetSortSize : 'por Tamaño', // Status Bar FilesCountEmpty : '<Carpeta vacía>', FilesCountOne : '1 archivo', FilesCountMany : '%1 archivos', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'No ha sido posible completar la solicitud. (Error %1)', Errors : { 10 : 'Comando incorrecto.', 11 : 'El tipo de recurso no ha sido especificado en la solicitud.', 12 : 'El tipo de recurso solicitado no es válido.', 102 : 'Nombre de archivo o carpeta no válido.', 103 : 'No se ha podido completar la solicitud debido a las restricciones de autorización.', 104 : 'No ha sido posible completar la solicitud debido a restricciones en el sistema de archivos.', 105 : 'La extensión del archivo no es válida.', 109 : 'Petición inválida.', 110 : 'Error desconocido.', 115 : 'Ya existe un archivo o carpeta con ese nombre.', 116 : 'No se ha encontrado la carpeta. Por favor, actualice y pruebe de nuevo.', 117 : 'No se ha encontrado el archivo. Por favor, actualice la lista de archivos y pruebe de nuevo.', 118 : 'Las rutas origen y destino son iguales.', 201 : 'Ya existía un archivo con ese nombre. El archivo subido ha sido renombrado como "%1"', 202 : 'Archivo inválido', 203 : 'Archivo inválido. El tamaño es demasiado grande.', 204 : 'El archivo subido está corrupto.', 205 : 'La carpeta temporal no está disponible en el servidor para las subidas.', 206 : 'La subida se ha cancelado por razones de seguridad. El archivo contenía código HTML.', 207 : 'El archivo subido ha sido renombrado como "%1"', 300 : 'Ha fallado el mover el(los) archivo(s).', 301 : 'Ha fallado el copiar el(los) archivo(s).', 500 : 'El navegador de archivos está deshabilitado por razones de seguridad. Por favor, contacte con el administrador de su sistema y compruebe el archivo de configuración de CKFinder.', 501 : 'El soporte para iconos está deshabilitado.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'El nombre del archivo no puede estar vacío', FileExists : 'El archivo %s ya existe', FolderEmpty : 'El nombre de la carpeta no puede estar vacío', FileInvChar : 'El nombre del archivo no puede contener ninguno de los caracteres siguientes: \n\\ / : * ? " < > |', FolderInvChar : 'El nombre de la carpeta no puede contener ninguno de los caracteres siguientes: \n\\ / : * ? " < > |', PopupBlockView : 'No ha sido posible abrir el archivo en una nueva ventana. Por favor, configure su navegador y desactive todos los bloqueadores de ventanas para esta página.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Redimensionar %s', sizeTooBig : 'No se puede poner la altura o anchura de la imagen mayor que las dimensiones originales (%size).', resizeSuccess : 'Imagen redimensionada correctamente.', thumbnailNew : 'Crear nueva minuatura', thumbnailSmall : 'Pequeña (%s)', thumbnailMedium : 'Mediana (%s)', thumbnailLarge : 'Grande (%s)', newSize : 'Establecer nuevo tamaño', width : 'Ancho', height : 'Alto', invalidHeight : 'Altura inválida.', invalidWidth : 'Anchura inválida.', invalidName : 'Nombre no válido.', newImage : 'Crear nueva imagen', noExtensionChange : 'La extensión no se puede cambiar.', imageSmall : 'La imagen original es demasiado pequeña', contextMenuName : 'Redimensionar' }, // Fileeditor plugin Fileeditor : { save : 'Guardar', fileOpenError : 'No se puede abrir el archivo.', fileSaveSuccess : 'Archivo guardado correctamente.', contextMenuName : 'Editar', loadingFile : 'Cargando archivo, por favor espere...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object, for the Portuguese (Brazilian) * language. This is the base file for all translations. */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['pt-br'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Algumas opções foram modificadas. Deseja fechar a janela realmente?', ok : 'OK', cancel : 'Cancelar', confirmationTitle : 'Confirmação', messageTitle : 'Informação', inputTitle : 'Pergunta', undo : 'Desfazer', redo : 'Refazer', skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', HelpLang : 'en', LangCode : 'pt-br', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'dd/mm/yyyy HH:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Pastas', FolderLoading : 'Carregando...', FolderNew : 'Favor informar o nome da nova pasta: ', FolderRename : 'Favor informar o nome da nova pasta: ', FolderDelete : 'Você tem certeza que deseja apagar a pasta "%1"?', FolderRenaming : ' (Renomeando...)', FolderDeleting : ' (Apagando...)', // Files FileRename : 'Favor informar o nome do novo arquivo: ', FileRenameExt : 'Você tem certeza que deseja alterar a extensão do arquivo? O arquivo pode ser danificado', FileRenaming : 'Renomeando...', FileDelete : 'Você tem certeza que deseja apagar o arquivo "%1"?', FilesLoading : 'Carregando...', FilesEmpty : 'Pasta vazia', FilesMoved : 'Arquivo %1 movido para %2:%3', FilesCopied : 'Arquivo %1 copiado em %2:%3', // Basket BasketFolder : 'Cesta', BasketClear : 'Limpa Cesta', BasketRemove : 'Remove da cesta', BasketOpenFolder : 'Abre a pasta original', BasketTruncateConfirm : 'Remover todos os arquivas da cesta?', BasketRemoveConfirm : 'Remover o arquivo "%1" da cesta?', BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copia Arquivos da Cesta', BasketMoveFilesHere : 'Move os Arquivos da Cesta', BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'Os seguintes arquivos foram movidos: %s', BasketPasteCopySuccess : 'Os sequintes arquivos foram copiados: %s', // Toolbar Buttons (some used elsewhere) Upload : 'Enviar arquivo', UploadTip : 'Enviar novo arquivo', Refresh : 'Atualizar', Settings : 'Configurações', Help : 'Ajuda', HelpTip : 'Ajuda', // Context Menus Select : 'Selecionar', SelectThumbnail : 'Selecionar miniatura', View : 'Visualizar', Download : 'Download', NewSubFolder : 'Nova sub-pasta', Rename : 'Renomear', Delete : 'Apagar', CopyDragDrop : 'Copia arquivo aqui', MoveDragDrop : 'Move arquivo aqui', // Dialogs RenameDlgTitle : 'Renomeia', NewNameDlgTitle : 'Novo nome', FileExistsDlgTitle : 'O arquivo já existe', SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Sobrescrever', FileAutorename : 'Renomeia automaticamente', // Generic OkBtn : 'OK', CancelBtn : 'Cancelar', CloseBtn : 'Fechar', // Upload Panel UploadTitle : 'Enviar novo arquivo', UploadSelectLbl : 'Selecione o arquivo para enviar', UploadProgressLbl : '(Enviado arquivo, favor aguardar...)', UploadBtn : 'Enviar arquivo selecionado', UploadBtnCancel : 'Cancelar', UploadNoFileMsg : 'Favor selecionar o arquivo no seu computador', UploadNoFolder : 'Favor selecionar a pasta antes the enviar o arquivo.', UploadNoPerms : 'Não é permitido o envio de arquivos.', UploadUnknError : 'Erro no envio do arquivo.', UploadExtIncorrect : 'A extensão deste arquivo não é permitida nesat pasta.', // Settings Panel SetTitle : 'Configurações', SetView : 'Visualizar:', SetViewThumb : 'Miniaturas', SetViewList : 'Lista', SetDisplay : 'Exibir:', SetDisplayName : 'Arquivo', SetDisplayDate : 'Data', SetDisplaySize : 'Tamanho', SetSort : 'Ordenar:', SetSortName : 'por Nome do arquivo', SetSortDate : 'por Data', SetSortSize : 'por Tamanho', // Status Bar FilesCountEmpty : '<Pasta vazia>', FilesCountOne : '1 arquivo', FilesCountMany : '%1 arquivos', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'Não foi possível completer o seu pedido. (Erro %1)', Errors : { 10 : 'Comando inválido.', 11 : 'O tipo de recurso não foi especificado na solicitação.', 12 : 'O recurso solicitado não é válido.', 102 : 'Nome do arquivo ou pasta inválido.', 103 : 'Não foi possível completar a solicitação por restrições de acesso.', 104 : 'Não foi possível completar a solicitação por restrições de acesso do sistema de arquivos.', 105 : 'Extensão de arquivo inválida.', 109 : 'Solicitação inválida.', 110 : 'Erro desconhecido.', 115 : 'Uma arquivo ou pasta já existe com esse nome.', 116 : 'Pasta não encontrada. Atualize e tente novamente.', 117 : 'Arquivo não encontrado. Atualize a lista de arquivos e tente novamente.', 118 : 'Source and target paths are equal.', // MISSING 201 : 'Um arquivo com o mesmo nome já está disponível. O arquivo enviado foi renomeado para "%1"', 202 : 'Arquivo inválido', 203 : 'Arquivo inválido. O tamanho é muito grande.', 204 : 'O arquivo enviado está corrompido.', 205 : 'Nenhuma pasta temporária para envio está disponível no servidor.', 206 : 'Transmissão cancelada por razões de segurança. O arquivo contem dados HTML.', 207 : 'O arquivo enviado foi renomeado para "%1"', 300 : 'Não foi possível mover o(s) arquivo(s).', 301 : 'Não foi possível copiar o(s) arquivos(s).', 500 : 'A navegação de arquivos está desativada por razões de segurança. Contacte o administrador do sistema.', 501 : 'O suporte a miniaturas está desabilitado.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'O nome do arquivo não pode ser vazio', FileExists : 'O nome %s já é em uso', FolderEmpty : 'O nome da pasta não pode ser vazio', FileInvChar : 'O nome do arquivo não pode conter nenhum desses caracteres: \n\\ / : * ? " < > |', FolderInvChar : 'O nome da pasta não pode conter nenhum desses caracteres: \n\\ / : * ? " < > |', PopupBlockView : 'Não foi possível abrir o arquivo em outra janela. Configure seu navegador e desabilite o bloqueio a popups para esse site.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Redimensionar %s', sizeTooBig : 'Não possível usar dimensões maiores do que as originais (%size).', resizeSuccess : 'Imagem redimensionada corretamente.', thumbnailNew : 'Cria nova anteprima', thumbnailSmall : 'Pequeno (%s)', thumbnailMedium : 'Médio (%s)', thumbnailLarge : 'Grande (%s)', newSize : 'Novas dimensões', width : 'Largura', height : 'Altura', invalidHeight : 'Altura incorreta.', invalidWidth : 'Largura incorreta.', invalidName : 'O nome do arquivo não é válido.', newImage : 'Cria nova imagem', noExtensionChange : 'A extensão do arquivo não pode ser modificada.', imageSmall : 'A imagem original é muito pequena', contextMenuName : 'Redimensionar' }, // Fileeditor plugin Fileeditor : { save : 'Salva', fileOpenError : 'Não é possível abrir o arquivo.', fileSaveSuccess : 'Arquivo salvado corretamente.', contextMenuName : 'Modificar', loadingFile : 'Carregando arquivo. Por favor aguarde...' } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2012, CKSource - Frederico Knabben. All rights reserved. * * The software, this file, and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying, or distributing this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview Defines the {@link CKFinder.lang} object for the Vietnamese * language. */ /** * Contains the dictionary of language entries. * @namespace */ CKFinder.lang['vi'] = { appTitle : 'CKFinder', // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, không khả dụng</span>', confirmCancel : 'Vài tùy chọn đã thay đổi. Bạn có muốn đóng hộp thoại?', ok : 'OK', cancel : 'Hủy', confirmationTitle : 'Xác nhận', messageTitle : 'Thông tin', inputTitle : 'Câu hỏi', undo : 'Hoàn tác', redo : 'Làm lại', skip : 'Bỏ qua', skipAll : 'Bỏ qua tất cả', makeDecision : 'Chọn hành động nào?', rememberDecision: 'Ghi nhớ quyết định này' }, // Language direction, 'ltr' or 'rtl'. dir : 'ltr', HelpLang : 'en', LangCode : 'vi', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'd/m/yyyy h:MM aa', DateAmPm : ['SA', 'CH'], // Folders FoldersTitle : 'Thư mục', FolderLoading : 'Đang tải...', FolderNew : 'Xin chọn tên cho thư mục mới: ', FolderRename : 'Xin chọn tên mới cho thư mục: ', FolderDelete : 'Bạn có chắc muốn xóa thư mục "%1"?', FolderRenaming : ' (Đang đổi tên...)', FolderDeleting : ' (Đang xóa...)', DestinationFolder : 'Destination Folder', // MISSING // Files FileRename : 'Xin nhập tên tập tin mới: ', FileRenameExt : 'Bạn có chắc muốn đổi phần mở rộng? Tập tin có thể sẽ không dùng được.', FileRenaming : 'Đang đổi tên...', FileDelete : 'Bạn có chắc muốn xóa tập tin "%1"?', FilesDelete : 'Are you sure you want to delete %1 files?', // MISSING FilesLoading : 'Đang tải...', FilesEmpty : 'Thư mục trống.', DestinationFile : 'Destination File', // MISSING SkippedFiles : 'List of skipped files:', // MISSING // Basket BasketFolder : 'Rổ', BasketClear : 'Dọn rổ', BasketRemove : 'Xóa khỏi rổ', BasketOpenFolder : 'Mở thư mục cha', BasketTruncateConfirm : 'Bạn có chắc muốn bỏ tất cả tập tin trong rổ?', BasketRemoveConfirm : 'Bạn có chắc muốn bỏ tập tin "%1" khỏi rổ?', BasketRemoveConfirmMultiple : 'Do you really want to remove %1 files from the basket?', // MISSING BasketEmpty : 'Không có tập tin trong rổ, hãy kéo và thả tập tin vào rổ.', BasketCopyFilesHere : 'Chép tập tin từ rổ', BasketMoveFilesHere : 'Chuyển tập tin từ rổ', // Global messages OperationCompletedSuccess : 'Operation completed successfully.', // MISSING OperationCompletedErrors : 'Operation completed with errors.', // MISSING FileError : '%s: %e', // MISSING // Move and Copy files MovedFilesNumber : 'Number of files moved: %s.', // MISSING CopiedFilesNumber : 'Number of files copied: %s.', // MISSING MoveFailedList : 'The following files could not be moved:<br />%s', // MISSING CopyFailedList : 'The following files could not be copied:<br />%s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Tải lên', UploadTip : 'Tải tập tin mới', Refresh : 'Làm tươi', Settings : 'Thiết lập', Help : 'Hướng dẫn', HelpTip : 'Hướng dẫn', // Context Menus Select : 'Chọn', SelectThumbnail : 'Chọn ảnh mẫu', View : 'Xem', Download : 'Tải về', NewSubFolder : 'Tạo thư mục con', Rename : 'Đổi tên', Delete : 'Xóa', DeleteFiles : 'Delete Files', // MISSING CopyDragDrop : 'Sao chép ở đây', MoveDragDrop : 'Di chuyển ở đây', // Dialogs RenameDlgTitle : 'Đổi tên', NewNameDlgTitle : 'Tên mới', FileExistsDlgTitle : 'Tập tin đã tồn tại', SysErrorDlgTitle : 'Lỗi hệ thống', FileOverwrite : 'Ghi đè', FileAutorename : 'Tự đổi tên', ManuallyRename : 'Manually rename', // MISSING // Generic OkBtn : 'OK', CancelBtn : 'Hủy bỏ', CloseBtn : 'Đóng', // Upload Panel UploadTitle : 'Tải tập tin mới', UploadSelectLbl : 'Chọn tập tin tải lên', UploadProgressLbl : '(Đang tải lên, vui lòng chờ...)', UploadBtn : 'Tải tập tin đã chọn', UploadBtnCancel : 'Hủy bỏ', UploadNoFileMsg : 'Xin chọn một tập tin trong máy tính.', UploadNoFolder : 'Xin chọn thư mục trước khi tải lên.', UploadNoPerms : 'Không được phép tải lên.', UploadUnknError : 'Lỗi khi tải tập tin.', UploadExtIncorrect : 'Kiểu tập tin không được chấp nhận trong thư mục này.', // Flash Uploads UploadLabel : 'Tập tin sẽ tải:', UploadTotalFiles : 'Tổng số tập tin:', UploadTotalSize : 'Dung lượng tổng cộng:', UploadSend : 'Tải lên', UploadAddFiles : 'Thêm tập tin', UploadClearFiles : 'Xóa tập tin', UploadCancel : 'Hủy tải', UploadRemove : 'Xóa', UploadRemoveTip : 'Xóa !f', UploadUploaded : 'Đã tải !n%', UploadProcessing : 'Đang xử lí...', // Settings Panel SetTitle : 'Thiết lập', SetView : 'Xem:', SetViewThumb : 'Ảnh mẫu', SetViewList : 'Danh sách', SetDisplay : 'Hiển thị:', SetDisplayName : 'Tên tập tin', SetDisplayDate : 'Ngày', SetDisplaySize : 'Dung lượng', SetSort : 'Sắp xếp:', SetSortName : 'theo tên', SetSortDate : 'theo ngày', SetSortSize : 'theo dung lượng', SetSortExtension : 'theo phần mở rộng', // Status Bar FilesCountEmpty : '<Thư mục rỗng>', FilesCountOne : '1 tập tin', FilesCountMany : '%1 tập tin', // Size and Speed Kb : '%1 KB', Mb : '%1 MB', Gb : '%1 GB', SizePerSecond : '%1/s', // Connector Error Messages. ErrorUnknown : 'Không thể hoàn tất yêu cầu. (Lỗi %1)', Errors : { 10 : 'Lệnh không hợp lệ.', 11 : 'Kiểu tài nguyên không được chỉ định trong yêu cầu.', 12 : 'Kiểu tài nguyên yêu cầu không hợp lệ.', 102 : 'Tên tập tin hay thư mục không hợp lệ.', 103 : 'Không thể hoàn tất yêu cầu vì giới hạn quyền.', 104 : 'Không thể hoàn tất yêu cầu vì giới hạn quyền của hệ thống tập tin.', 105 : 'Phần mở rộng tập tin không hợp lệ.', 109 : 'Yêu cầu không hợp lệ.', 110 : 'Lỗi không xác định.', 111 : 'It was not possible to complete the request due to resulting file size.', // MISSING 115 : 'Tập tin hoặc thư mục cùng tên đã tồn tại.', 116 : 'Không thấy thư mục. Hãy làm tươi và thử lại.', 117 : 'Không thấy tập tin. Hãy làm tươi và thử lại.', 118 : 'Đường dẫn nguồn và đích giống nhau.', 201 : 'Tập tin cùng tên đã tồn tại. Tập tin vừa tải lên được đổi tên thành "%1".', 202 : 'Tập tin không hợp lệ.', 203 : 'Tập tin không hợp lệ. Dung lượng quá lớn.', 204 : 'Tập tin tải lên bị hỏng.', 205 : 'Không có thư mục tạm để tải tập tin.', 206 : 'Huỷ tải lên vì lí do bảo mật. Tập tin chứa dữ liệu giống HTML.', 207 : 'Tập tin được đổi tên thành "%1".', 300 : 'Di chuyển tập tin thất bại.', 301 : 'Chép tập tin thất bại.', 500 : 'Trình duyệt tập tin bị vô hiệu vì lí do bảo mật. Xin liên hệ quản trị hệ thống và kiểm tra tập tin cấu hình CKFinder.', 501 : 'Chức năng hỗ trợ ảnh mẫu bị vô hiệu.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Không thể để trống tên tập tin.', FileExists : 'Tập tin %s đã tồn tại.', FolderEmpty : 'Không thể để trống tên thư mục.', FolderExists : 'Folder %s already exists.', // MISSING FolderNameExists : 'Folder already exists.', // MISSING FileInvChar : 'Tên tập tin không thể chưa các kí tự: \n\\ / : * ? " < > |', FolderInvChar : 'Tên thư mục không thể chứa các kí tự: \n\\ / : * ? " < > |', PopupBlockView : 'Không thể mở tập tin trong cửa sổ mới. Hãy kiểm tra trình duyệt và tắt chức năng chặn popup trên trang web này.', XmlError : 'Không thể nạp hồi đáp XML từ máy chủ web.', XmlEmpty : 'Không thể nạp hồi đáp XML từ máy chủ web. Dữ liệu rỗng.', XmlRawResponse : 'Hồi đáp thô từ máy chủ: %s' }, // Imageresize plugin Imageresize : { dialogTitle : 'Đổi kích thước %s', sizeTooBig : 'Không thể đặt chiều cao hoặc rộng to hơn kích thước gốc (%size).', resizeSuccess : 'Đổi kích thước ảnh thành công.', thumbnailNew : 'Tạo ảnh mẫu mới', thumbnailSmall : 'Nhỏ (%s)', thumbnailMedium : 'Vừa (%s)', thumbnailLarge : 'Lớn (%s)', newSize : 'Chọn kích thước mới', width : 'Rộng', height : 'Cao', invalidHeight : 'Chiều cao không hợp lệ.', invalidWidth : 'Chiều rộng không hợp lệ.', invalidName : 'Tên tập tin không hợp lệ.', newImage : 'Tạo ảnh mới', noExtensionChange : 'Không thể thay đổi phần mở rộng.', imageSmall : 'Ảnh nguồn quá nhỏ.', contextMenuName : 'Đổi kích thước', lockRatio : 'Khoá tỉ lệ', resetSize : 'Đặt lại kích thước' }, // Fileeditor plugin Fileeditor : { save : 'Lưu', fileOpenError : 'Không thể mở tập tin.', fileSaveSuccess : 'Lưu tập tin thành công.', contextMenuName : 'Sửa', loadingFile : 'Đang tải tập tin, xin chờ...' }, Maximize : { maximize : 'Cực đại hóa', minimize : 'Cực tiểu hóa' }, Gallery : { current : 'Hình thứ {current} trên {total}' }, Zip : { extractHereLabel : 'Extract here', // MISSING extractToLabel : 'Extract to...', // MISSING downloadZipLabel : 'Download as zip', // MISSING compressZipLabel : 'Compress to zip', // MISSING removeAndExtract : 'Remove existing and extract', // MISSING extractAndOverwrite : 'Extract overwriting existing files', // MISSING extractSuccess : 'File extracted successfully.' // MISSING } };
JavaScript
/* * CKFinder * ======== * http://ckfinder.com * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. * */ /** * @fileOverview */ /** * Constains the dictionary of language entries. * @namespace */ CKFinder.lang['nn'] = { appTitle : 'CKFinder', // MISSING // Common messages and labels. common : { // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING ok : 'OK', // MISSING cancel : 'Cancel', // MISSING confirmationTitle : 'Confirmation', // MISSING messageTitle : 'Information', // MISSING inputTitle : 'Question', // MISSING undo : 'Undo', // MISSING redo : 'Redo', // MISSING skip : 'Skip', // MISSING skipAll : 'Skip all', // MISSING makeDecision : 'What action should be taken?', // MISSING rememberDecision: 'Remember my decision' // MISSING }, dir : 'ltr', // MISSING HelpLang : 'en', LangCode : 'no', // Date Format // d : Day // dd : Day (padding zero) // m : Month // mm : Month (padding zero) // yy : Year (two digits) // yyyy : Year (four digits) // h : Hour (12 hour clock) // hh : Hour (12 hour clock, padding zero) // H : Hour (24 hour clock) // HH : Hour (24 hour clock, padding zero) // M : Minute // MM : Minute (padding zero) // a : Firt char of AM/PM // aa : AM/PM DateTime : 'dd/mm/yyyy HH:MM', DateAmPm : ['AM', 'PM'], // Folders FoldersTitle : 'Mapper', FolderLoading : 'Laster...', FolderNew : 'Skriv inn det nye mappenavnet: ', FolderRename : 'Skriv inn det nye mappenavnet: ', FolderDelete : 'Er du sikker på at du vil slette mappen "%1"?', FolderRenaming : ' (Endrer mappenavn...)', FolderDeleting : ' (Sletter...)', // Files FileRename : 'Skriv inn det nye filnavnet: ', FileRenameExt : 'Er du sikker på at du vil endre filtypen? Filen kan bli ubrukelig', FileRenaming : 'Endrer filnavn...', FileDelete : 'Er du sikker på at du vil slette denne filen "%1"?', FilesLoading : 'Loading...', // MISSING FilesEmpty : 'Empty folder', // MISSING FilesMoved : 'File %1 moved into %2:%3', // MISSING FilesCopied : 'File %1 copied into %2:%3', // MISSING // Basket BasketFolder : 'Basket', // MISSING BasketClear : 'Clear Basket', // MISSING BasketRemove : 'Remove from basket', // MISSING BasketOpenFolder : 'Open parent folder', // MISSING BasketTruncateConfirm : 'Do you really want to remove all files from the basket?', // MISSING BasketRemoveConfirm : 'Do you really want to remove the file "%1" from the basket?', // MISSING BasketEmpty : 'No files in the basket, drag\'n\'drop some.', // MISSING BasketCopyFilesHere : 'Copy Files from Basket', // MISSING BasketMoveFilesHere : 'Move Files from Basket', // MISSING BasketPasteErrorOther : 'File %s error: %e', // MISSING BasketPasteMoveSuccess : 'The following files were moved: %s', // MISSING BasketPasteCopySuccess : 'The following files were copied: %s', // MISSING // Toolbar Buttons (some used elsewhere) Upload : 'Last opp', UploadTip : 'Last opp en ny fil', Refresh : 'Oppdater', Settings : 'Innstillinger', Help : 'Hjelp', HelpTip : 'Hjelp finnes kun på engelsk', // Context Menus Select : 'Velg', SelectThumbnail : 'Velg Miniatyr', View : 'Vis fullversjon', Download : 'Last ned', NewSubFolder : 'Ny Undermappe', Rename : 'Endre navn', Delete : 'Slett', CopyDragDrop : 'Copy file here', // MISSING MoveDragDrop : 'Move file here', // MISSING // Dialogs RenameDlgTitle : 'Rename', // MISSING NewNameDlgTitle : 'New name', // MISSING FileExistsDlgTitle : 'File already exists', // MISSING SysErrorDlgTitle : 'System error', // MISSING FileOverwrite : 'Overwrite', // MISSING FileAutorename : 'Auto-rename', // MISSING // Generic OkBtn : 'OK', CancelBtn : 'Avbryt', CloseBtn : 'Lukk', // Upload Panel UploadTitle : 'Last opp ny fil', UploadSelectLbl : 'Velg filen du vil laste opp', UploadProgressLbl : '(Laster opp filen, vennligst vent...)', UploadBtn : 'Last opp valgt fil', UploadBtnCancel : 'Cancel', // MISSING UploadNoFileMsg : 'Du må velge en fil fra din datamaskin', UploadNoFolder : 'Please select folder before uploading.', // MISSING UploadNoPerms : 'File upload not allowed.', // MISSING UploadUnknError : 'Error sending the file.', // MISSING UploadExtIncorrect : 'File extension not allowed in this folder.', // MISSING // Settings Panel SetTitle : 'Innstillinger', SetView : 'Filvisning:', SetViewThumb : 'Miniatyrbilder', SetViewList : 'Liste', SetDisplay : 'Vis:', SetDisplayName : 'Filnavn', SetDisplayDate : 'Dato', SetDisplaySize : 'Filstørrelse', SetSort : 'Sorter etter:', SetSortName : 'Filnavn', SetSortDate : 'Dato', SetSortSize : 'Størrelse', // Status Bar FilesCountEmpty : '<Tom Mappe>', FilesCountOne : '1 fil', FilesCountMany : '%1 filer', // Size and Speed Kb : '%1 kB', KbPerSecond : '%1 kB/s', // Connector Error Messages. ErrorUnknown : 'Det var ikke mulig å utføre forespørselen. (Feil %1)', Errors : { 10 : 'Ugyldig kommando.', 11 : 'Ressurstypen ble ikke spesifisert i forepørselen.', 12 : 'Ugyldig ressurstype.', 102 : 'Ugyldig fil- eller mappenavn.', 103 : 'Kunne ikke utføre forespørselen pga manglende autorisasjon.', 104 : 'Kunne ikke utføre forespørselen pga manglende tilgang til filsystemet.', 105 : 'Ugyldig filtype.', 109 : 'Ugyldig forespørsel.', 110 : 'Ukjent feil.', 115 : 'Det finnes allerede en fil eller mappe med dette navnet.', 116 : 'Kunne ikke finne mappen. Oppdater vinduet og prøv igjen.', 117 : 'Kunne ikke finne filen. Oppdater vinduet og prøv igjen.', 118 : 'Source and target paths are equal.', // MISSING 201 : 'Det fantes allerede en fil med dette navnet. Den opplastede filens navn har blitt endret til "%1"', 202 : 'Ugyldig fil', 203 : 'Ugyldig fil. Filen er for stor.', 204 : 'Den opplastede filen er korrupt.', 205 : 'Det finnes ingen midlertidig mappe for filopplastinger.', 206 : 'Opplastingen ble avbrutt av sikkerhetshensyn. Filen inneholder HTML-aktig data.', 207 : 'Den opplastede filens navn har blitt endret til "%1"', 300 : 'Moving file(s) failed.', // MISSING 301 : 'Copying file(s) failed.', // MISSING 500 : 'Filvelgeren ikke tilgjengelig av sikkerhetshensyn. Kontakt systemansvarlig og be han sjekke CKFinder\'s konfigurasjonsfil.', 501 : 'Funksjon for minityrbilder er skrudd av.' }, // Other Error Messages. ErrorMsg : { FileEmpty : 'Filnavnet kan ikke være tomt', FileExists : 'File %s already exists', // MISSING FolderEmpty : 'Mappenavnet kan ikke være tomt', FileInvChar : 'Filnavnet kan ikke inneholde følgende tegn: \n\\ / : * ? " < > |', FolderInvChar : 'Mappenavnet kan ikke inneholde følgende tegn: \n\\ / : * ? " < > |', PopupBlockView : 'Du må skru av popup-blockeren for å se bildet i nytt vindu.' }, // Imageresize plugin Imageresize : { dialogTitle : 'Resize %s', // MISSING sizeTooBig : 'Cannot set image height or width to a value bigger than the original size (%size).', // MISSING resizeSuccess : 'Image resized successfully.', // MISSING thumbnailNew : 'Create new thumbnail', // MISSING thumbnailSmall : 'Small (%s)', // MISSING thumbnailMedium : 'Medium (%s)', // MISSING thumbnailLarge : 'Large (%s)', // MISSING newSize : 'Set new size', // MISSING width : 'Width', // MISSING height : 'Height', // MISSING invalidHeight : 'Invalid height.', // MISSING invalidWidth : 'Invalid width.', // MISSING invalidName : 'Invalid file name.', // MISSING newImage : 'Create new image', // MISSING noExtensionChange : 'The file extension cannot be changed.', // MISSING imageSmall : 'Source image is too small', // MISSING contextMenuName : 'Resize' // MISSING }, // Fileeditor plugin Fileeditor : { save : 'Save', // MISSING fileOpenError : 'Unable to open file.', // MISSING fileSaveSuccess : 'File saved successfully.', // MISSING contextMenuName : 'Edit', // MISSING loadingFile : 'Loading file, please wait...' // MISSING } };
JavaScript
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckfinder.com/license */ CKFinder.customConfig = function( config ) { // Define changes to default configuration here. For example: //config.skin = 'kama'; config.language = 'vi'; };
JavaScript
CKFinder.addPlugin( 'imageresize', { connectorInitialized : function( api, xml ) { var node = xml.selectSingleNode( 'Connector/PluginsInfo/imageresize/@smallThumb' ); if ( node ) CKFinder.config.imageresize_thumbSmall = node.value; node = xml.selectSingleNode( 'Connector/PluginsInfo/imageresize/@mediumThumb' ); if ( node ) CKFinder.config.imageresize_thumbMedium = node.value; node = xml.selectSingleNode( 'Connector/PluginsInfo/imageresize/@largeThumb' ); if ( node ) CKFinder.config.imageresize_thumbLarge = node.value; }, uiReady : function( api ) { var regexExt = /^(.*)\.([^\.]+)$/, regexFileName = /^(.*?)(?:_\d+x\d+)?\.([^\.]+)$/, regexGetSize = /^\s*(\d+)(px)?\s*$/i, regexGetSizeOrEmpty = /(^\s*(\d+)(px)?\s*$)|^$/i, imageDimension = { width : 0, height : 0 }, file, doc; var updateFileName = function( dialog ) { var width = dialog.getValueOf( 'tab1', 'width' ) || 0, height = dialog.getValueOf( 'tab1', 'height' ) || 0, e = dialog.getContentElement('tab1', 'createNewBox'); if ( width && height ) { var matches = file.name.match( regexFileName ); dialog.setValueOf( 'tab1', 'fileName', matches[1] + "_" + width + "x" + height + "." + matches[2]); e.getElement().show(); } else e.getElement().hide(); }; var onSizeChange = function() { var value = this.getValue(), // This = input element. dialog = this.getDialog(), maxWidth = api.config.imagesMaxWidth, maxHeight = api.config.imagesMaxHeight, aMatch = value.match( regexGetSize ), width = imageDimension.width, height = imageDimension.height; if ( aMatch ) value = aMatch[1]; if ( !api.config.imageresize_allowEnlarging ) { if ( width && width < maxWidth ) maxWidth = width; if ( height && height < maxHeight ) maxHeight = height; } if ( maxHeight > 0 && this.id == 'height' && value > maxHeight ) { value = maxHeight; dialog.setValueOf( 'tab1', 'height', value ); } if ( maxWidth > 0 && this.id == 'width' && value > maxWidth ) { value = maxWidth; dialog.setValueOf( 'tab1', 'width', value ); } // Only if ratio is locked if ( dialog.lockRatio && width && height ) { if ( this.id == 'height' ) { if ( value && value != '0' ) value = Math.round( width * ( value / height ) ); if ( !isNaN( value ) ) { // newWidth > maxWidth if ( maxWidth > 0 && value > maxWidth ) { value = maxWidth; newHeight = Math.round( height * ( value / width ) ); dialog.setValueOf( 'tab1', 'height', newHeight ); } dialog.setValueOf( 'tab1', 'width', value ); } } else //this.id = txtWidth. { if ( value && value != '0' ) value = Math.round( height * ( value / width ) ); if ( !isNaN( value ) ) { // newHeight > maxHeight if ( maxHeight > 0 && value > maxHeight ) { value = maxHeight; newWidth = Math.round( width * ( value / height ) ); dialog.setValueOf( 'tab1', 'width', newWidth ); } dialog.setValueOf( 'tab1', 'height', value ); } } } updateFileName( dialog ); }; var resetSize = function( dialog ) { if ( imageDimension.width && imageDimension.height ) { dialog.setValueOf( 'tab1', 'width', imageDimension.width ); dialog.setValueOf( 'tab1', 'height', imageDimension.height ); updateFileName( dialog ); } }; var switchLockRatio = function( dialog, value ) { var doc = dialog.getElement().getDocument(), ratioButton = doc.getById( 'btnLockSizes' ); if ( imageDimension.width && imageDimension.height ) { if ( value == 'check' ) // Check image ratio and original image ratio. { var width = dialog.getValueOf( 'tab1', 'width' ), height = dialog.getValueOf( 'tab1', 'height' ), originalRatio = imageDimension.width * 1000 / imageDimension.height, thisRatio = width * 1000 / height; dialog.lockRatio = false; // Default: unlock ratio if ( !width && !height ) dialog.lockRatio = true; // If someone didn't start typing, lock ratio. else if ( !isNaN( originalRatio ) && !isNaN( thisRatio ) ) { if ( Math.round( originalRatio ) == Math.round( thisRatio ) ) dialog.lockRatio = true; } } else if ( value != undefined ) dialog.lockRatio = value; else dialog.lockRatio = !dialog.lockRatio; } else if ( value != 'check' ) // I can't lock ratio if ratio is unknown. dialog.lockRatio = false; if ( dialog.lockRatio ) ratioButton.removeClass( 'ckf_btn_unlocked' ); else ratioButton.addClass( 'ckf_btn_unlocked' ); return dialog.lockRatio; }; CKFinder.dialog.add( 'resizeDialog', function( api ) { return { title : api.lang.Imageresize.dialogTitle.replace( '%s', api.getSelectedFile().name ), // TODO resizable : CKFINDER.DIALOG_RESIZE_BOTH minWidth : 390, minHeight : 230, onShow : function() { var dialog = this, thumbSmall = CKFinder.config.imageresize_thumbSmall, thumbMedium = CKFinder.config.imageresize_thumbMedium, thumbLarge = CKFinder.config.imageresize_thumbLarge; doc = dialog.getElement().getDocument(); file = api.getSelectedFile(); this.setTitle( api.lang.Imageresize.dialogTitle.replace( '%s', file.name ) ); var previewImg = doc.getById('previewImage'); var sizeSpan = doc.getById('imageSize'); previewImg.setAttribute('src', file.getThumbnailUrl( true )); var updateImgDimension = function( width, height ) { if ( !width || !height ) { sizeSpan.setText( '' ); return; } imageDimension.width = width; imageDimension.height = height; sizeSpan.setText( width + " x " + height + " px" ); CKFinder.tools.setTimeout( function(){ switchLockRatio( dialog, 'check' ); }, 0, dialog ); }; api.connector.sendCommand( "ImageResizeInfo", { fileName : file.name }, function( xml ) { if ( xml.checkError() ) return; var width = xml.selectSingleNode( 'Connector/ImageInfo/@width' ), height = xml.selectSingleNode( 'Connector/ImageInfo/@height' ); if ( width && height ) { width = parseInt( width.value, 10 ); height = parseInt( height.value, 10 ); updateImgDimension( width, height ); var checkThumbs = function( id, size ) { if ( !size ) return; var reThumb = /^(\d+)x(\d+)$/; result = reThumb.exec( size ); var el = dialog.getContentElement( 'tab1', id ); if ( 0 + result[1] > width && 0 + result[2] > height ) { el.disable(); el.getElement().setAttribute('title', api.lang.Imageresize.imageSmall).addClass('cke_disabled'); } else { el.enable(); el.getElement().setAttribute('title', '').removeClass('cke_disabled'); } }; checkThumbs('smallThumb', thumbSmall ); checkThumbs('mediumThumb', thumbMedium ); checkThumbs('largeThumb', thumbLarge ); } }, file.folder.type, file.folder ); if ( !thumbSmall ) dialog.getContentElement('tab1', 'smallThumb').getElement().hide(); if ( !thumbMedium ) dialog.getContentElement('tab1', 'mediumThumb').getElement().hide(); if ( !thumbLarge ) dialog.getContentElement('tab1', 'largeThumb').getElement().hide(); if ( !thumbSmall && !thumbMedium && !thumbLarge ) dialog.getContentElement('tab1', 'thumbsLabel').getElement().hide(); dialog.setValueOf( 'tab1', 'fileName', file.name ); dialog.getContentElement('tab1', 'width').focus(); dialog.getContentElement('tab1', 'fileName').setValue(''); dialog.getContentElement('tab1', 'createNewBox').getElement().hide(); updateImgDimension( 0,0 ); }, onOk : function() { var dialog = this, width = dialog.getValueOf( 'tab1', 'width' ), height = dialog.getValueOf( 'tab1', 'height' ), small = dialog.getValueOf( 'tab1', 'smallThumb' ), medium = dialog.getValueOf( 'tab1', 'mediumThumb' ), large = dialog.getValueOf( 'tab1', 'largeThumb' ), fileName = dialog.getValueOf( 'tab1', 'fileName' ), createNew = dialog.getValueOf( 'tab1', 'createNew' ); if ( width && !height ) { api.openMsgDialog( '', api.lang.Imageresize.invalidHeight ); return false; } else if ( !width && height ) { api.openMsgDialog( '', api.lang.Imageresize.invalidWidth ); return false; } if ( !api.config.imageresize_allowEnlarging && ( parseInt( width, 10 ) > imageDimension.width || parseInt( height, 10 ) > imageDimension.height ) ) { var str = api.lang.Imageresize.sizeTooBig; api.openMsgDialog( '', str.replace( "%size", imageDimension.width + "x" + imageDimension.height ) ); return false; } if ( ( width && height ) || small || medium || large ) { if ( !createNew ) fileName = file.name; api.connector.sendCommandPost( "ImageResize", null, { width : width, height : height, fileName : file.name, newFileName : fileName, overwrite : createNew ? 0 : 1, small : small ? 1 : 0, medium : medium ? 1 : 0, large : large ? 1 : 0 }, function( xml ) { if ( xml.checkError() ) return; api.openMsgDialog( '', api.lang.Imageresize.resizeSuccess ); api.refreshOpenedFolder(); }, file.folder.type, file.folder ); } return undefined; }, contents : [ { id : 'tab1', label : '', title : '', expand : true, padding : 0, elements : [ { type : 'hbox', widths : [ '180px', '280px' ], children: [ { type : 'vbox', children: [ { type : 'html', html : '' + '<style type="text/css">' + 'a.ckf_btn_reset' + '{' + 'float: right;' + 'background-position: 0 -32px;' + 'background-image: url("' + CKFinder.getPluginPath('imageresize') + 'images/mini.gif");' + 'width: 16px;' + 'height: 16px;' + 'background-repeat: no-repeat;' + 'border: 1px none;' + 'font-size: 1px;' + '}' + 'a.ckf_btn_locked,' + 'a.ckf_btn_unlocked' + '{' + 'float: left;' + 'background-position: 0 0;' + 'background-image: url("' + CKFinder.getPluginPath('imageresize') + 'images/mini.gif");' + 'width: 16px;' + 'height: 16px;' + 'background-repeat: no-repeat;' + 'border: none 1px;' + 'font-size: 1px;' + '}' + 'a.ckf_btn_unlocked' + '{' + 'background-position: 0 -16px;' + 'background-image: url("' + CKFinder.getPluginPath('imageresize') + '/images/mini.gif");' + '}' + '.ckf_btn_over' + '{' + 'border: outset 1px;' + 'cursor: pointer;' + 'cursor: hand;' + '}' + '</style>' + '<div style="height:100px;padding:7px">' + '<img id="previewImage" src="" style="margin-bottom:4px;" /><br />' + '<span style="font-size:9px;" id="imageSize"></span>' + '</div>' }, { type : 'html', id : 'thumbsLabel', html : '<strong>' + api.lang.Imageresize.thumbnailNew + '</strong>' }, { type : 'checkbox', id : 'smallThumb', checked : false, label : api.lang.Imageresize.thumbnailSmall.replace( '%s', CKFinder.config.imageresize_thumbSmall ) }, { type : 'checkbox', id : 'mediumThumb', checked : false, label : api.lang.Imageresize.thumbnailMedium.replace( '%s', CKFinder.config.imageresize_thumbMedium ) }, { type : 'checkbox', id : 'largeThumb', checked : false, label : api.lang.Imageresize.thumbnailLarge.replace( '%s', CKFinder.config.imageresize_thumbLarge ) } ] }, { type : 'vbox', children : [ { type : 'html', html : '<strong>' + api.lang.Imageresize.newSize + '</strong>' }, { type : 'hbox', widths : [ '80%', '20%' ], children: [ { type : 'vbox', children: [ { type : 'text', labelLayout : 'horizontal', label : api.lang.Imageresize.width, onKeyUp : onSizeChange, validate: function() { var value = this.getValue(); if ( value ) { var aMatch = value.match( regexGetSize ); if ( !aMatch || parseInt( aMatch[1], 10 ) < 1 ) { api.openMsgDialog( '', api.lang.Imageresize.invalidWidth ); return false; } } return true; }, id : 'width' }, { type : 'text', labelLayout : 'horizontal', label : api.lang.Imageresize.height, onKeyUp : onSizeChange, validate: function() { var value = this.getValue(); if ( value ) { var aMatch = value.match( regexGetSize ); if ( !aMatch || parseInt( aMatch[1], 10 ) < 1 ) { api.openMsgDialog( '', api.lang.Imageresize.invalidHeight ); return false; } } return true; }, id : 'height' } ] }, { type : 'html', onLoad : function() { var doc = this.getElement().getDocument(), dialog = this.getDialog(); // Activate Reset button var resetButton = doc.getById( 'btnResetSize' ), ratioButton = doc.getById( 'btnLockSizes' ); if ( resetButton ) { resetButton.on( 'click', function(evt) { resetSize( this ); evt.data.preventDefault(); }, dialog ); resetButton.on( 'mouseover', function() { this.addClass( 'ckf_btn_over' ); }, resetButton ); resetButton.on( 'mouseout', function() { this.removeClass( 'ckf_btn_over' ); }, resetButton ); } // Activate (Un)LockRatio button if ( ratioButton ) { ratioButton.on( 'click', function(evt) { var locked = switchLockRatio( this ), width = this.getValueOf( 'tab1', 'width' ); if ( imageDimension.width && width ) { var height = imageDimension.height / imageDimension.width * width; if ( !isNaN( height ) ) { this.setValueOf( 'tab1', 'height', Math.round( height ) ); updateFileName( dialog ); } } evt.data.preventDefault(); }, dialog ); ratioButton.on( 'mouseover', function() { this.addClass( 'ckf_btn_over' ); }, ratioButton ); ratioButton.on( 'mouseout', function() { this.removeClass( 'ckf_btn_over' ); }, ratioButton ); } }, html : '<div style="margin-top:4px">'+ '<a href="javascript:void(0)" tabindex="-1" title="Lock ration" class="ckf_btn_locked ckf_btn_unlocked" id="btnLockSizes"></a>' + '<a href="javascript:void(0)" tabindex="-1" title="Reset size" class="ckf_btn_reset" id="btnResetSize"></a>'+ '</div>' } ] }, { type : 'vbox', id : 'createNewBox', hidden : true, children: [ { type : 'checkbox', checked : true, id : 'createNew', label : api.lang.Imageresize.newImage, 'default' : true, onChange : function() { var dialog = this.getDialog(); var filenameInput = dialog.getContentElement('tab1', 'fileName'); if ( filenameInput ) { if (!this.getValue()) filenameInput.getElement().hide(); else filenameInput.getElement().show(); } } }, { type : 'text', label : '', validate : function() { var dialog = this.getDialog(), createNew = dialog.getContentElement('tab1', 'createNew'), value = this.getValue(), matches = value.match( regexExt ); if ( createNew && dialog.getValueOf( 'tab1', 'width' ) && dialog.getValueOf( 'tab1', 'height' ) ) { if ( !value || !matches ) { api.openMsgDialog( '', api.lang.Imageresize.invalidName ); return false; } if ( file.ext != matches[2] ) { api.openMsgDialog( '', api.lang.Imageresize.noExtensionChange ); return false; } } return true; }, id : 'fileName' } ] } ] } ] } ] } ], // TODO http://dev.fckeditor.net/ticket/4750 buttons : [ CKFinder.dialog.okButton, CKFinder.dialog.cancelButton ] }; } ); api.addFileContextMenuOption( { label : api.lang.Imageresize.contextMenuName, command : "resizeImage" } , function( api, file ) { api.openDialog( 'resizeDialog' ); }, function ( file ) { // Disable for files other than images. if ( !file.isImage() || !api.getSelectedFolder().type ) return false; if ( file.folder.acl.fileDelete && file.folder.acl.fileUpload ) return true; else return -1; }); } } );
JavaScript
/* Demonstration of embedding CodeMirror in a bigger application. The * interface defined here is a mess of prompts and confirms, and * should probably not be used in a real project. */ function MirrorFrame(place, options) { this.home = document.createElement("div"); if (place.appendChild) place.appendChild(this.home); else place(this.home); var self = this; function makeButton(name, action) { var button = document.createElement("input"); button.type = "button"; button.value = name; self.home.appendChild(button); button.onclick = function(){self[action].call(self);}; } makeButton("Search", "search"); makeButton("Replace", "replace"); makeButton("Current line", "line"); makeButton("Jump to line", "jump"); makeButton("Insert constructor", "macro"); makeButton("Indent all", "reindent"); this.mirror = new CodeMirror(this.home, options); } MirrorFrame.prototype = { search: function() { var text = prompt("Enter search term:", ""); if (!text) return; var first = true; do { var cursor = this.mirror.getSearchCursor(text, first); first = false; while (cursor.findNext()) { cursor.select(); if (!confirm("Search again?")) return; } } while (confirm("End of document reached. Start over?")); }, replace: function() { // This is a replace-all, but it is possible to implement a // prompting replace. var from = prompt("Enter search string:", ""), to; if (from) to = prompt("What should it be replaced with?", ""); if (to == null) return; var cursor = this.mirror.getSearchCursor(from, false); while (cursor.findNext()) cursor.replace(to); }, jump: function() { var line = prompt("Jump to line:", ""); if (line && !isNaN(Number(line))) this.mirror.jumpToLine(Number(line)); }, line: function() { alert("The cursor is currently at line " + this.mirror.currentLine()); this.mirror.focus(); }, macro: function() { var name = prompt("Name your constructor:", ""); if (name) this.mirror.replaceSelection("function " + name + "() {\n \n}\n\n" + name + ".prototype = {\n \n};\n"); }, reindent: function() { this.mirror.reindent(); } };
JavaScript
var HTMLMixedParser = Editor.Parser = (function() { // tags that trigger seperate parsers var triggers = { "script": "JSParser", "style": "CSSParser" }; function checkDependencies() { var parsers = ['XMLParser']; for (var p in triggers) parsers.push(triggers[p]); for (var i in parsers) { if (!window[parsers[i]]) throw new Error(parsers[i] + " parser must be loaded for HTML mixed mode to work."); } XMLParser.configure({useHTMLKludges: true}); } function parseMixed(stream) { checkDependencies(); var htmlParser = XMLParser.make(stream), localParser = null, inTag = false; var iter = {next: top, copy: copy}; function top() { var token = htmlParser.next(); if (token.content == "<") inTag = true; else if (token.style == "xml-tagname" && inTag === true) inTag = token.content.toLowerCase(); else if (token.content == ">") { if (triggers[inTag]) { var parser = window[triggers[inTag]]; iter.next = local(parser, "</" + inTag); } inTag = false; } return token; } function local(parser, tag) { var baseIndent = htmlParser.indentation(); localParser = parser.make(stream, baseIndent + indentUnit); return function() { if (stream.lookAhead(tag, false, false, true)) { localParser = null; iter.next = top; return top(); } var token = localParser.next(); var lt = token.value.lastIndexOf("<"), sz = Math.min(token.value.length - lt, tag.length); if (lt != -1 && token.value.slice(lt, lt + sz).toLowerCase() == tag.slice(0, sz) && stream.lookAhead(tag.slice(sz), false, false, true)) { stream.push(token.value.slice(lt)); token.value = token.value.slice(0, lt); } if (token.indentation) { var oldIndent = token.indentation; token.indentation = function(chars) { if (chars == "</") return baseIndent; else return oldIndent(chars); }; } return token; }; } function copy() { var _html = htmlParser.copy(), _local = localParser && localParser.copy(), _next = iter.next, _inTag = inTag; return function(_stream) { stream = _stream; htmlParser = _html(_stream); localParser = _local && _local(_stream); iter.next = _next; inTag = _inTag; return iter; }; } return iter; } return { make: parseMixed, electricChars: "{}/:", configure: function(obj) { if (obj.triggers) triggers = obj.triggers; } }; })();
JavaScript
/* Simple parser for CSS */ var CSSParser = Editor.Parser = (function() { var tokenizeCSS = (function() { function normal(source, setState) { var ch = source.next(); if (ch == "@") { source.nextWhileMatches(/\w/); return "css-at"; } else if (ch == "/" && source.equals("*")) { setState(inCComment); return null; } else if (ch == "<" && source.equals("!")) { setState(inSGMLComment); return null; } else if (ch == "=") { return "css-compare"; } else if (source.equals("=") && (ch == "~" || ch == "|")) { source.next(); return "css-compare"; } else if (ch == "\"" || ch == "'") { setState(inString(ch)); return null; } else if (ch == "#") { source.nextWhileMatches(/\w/); return "css-hash"; } else if (ch == "!") { source.nextWhileMatches(/[ \t]/); source.nextWhileMatches(/\w/); return "css-important"; } else if (/\d/.test(ch)) { source.nextWhileMatches(/[\w.%]/); return "css-unit"; } else if (/[,.+>*\/]/.test(ch)) { return "css-select-op"; } else if (/[;{}:\[\]]/.test(ch)) { return "css-punctuation"; } else { source.nextWhileMatches(/[\w\\\-_]/); return "css-identifier"; } } function inCComment(source, setState) { var maybeEnd = false; while (!source.endOfLine()) { var ch = source.next(); if (maybeEnd && ch == "/") { setState(normal); break; } maybeEnd = (ch == "*"); } return "css-comment"; } function inSGMLComment(source, setState) { var dashes = 0; while (!source.endOfLine()) { var ch = source.next(); if (dashes >= 2 && ch == ">") { setState(normal); break; } dashes = (ch == "-") ? dashes + 1 : 0; } return "css-comment"; } function inString(quote) { return function(source, setState) { var escaped = false; while (!source.endOfLine()) { var ch = source.next(); if (ch == quote && !escaped) break; escaped = !escaped && ch == "\\"; } if (!escaped) setState(normal); return "css-string"; }; } return function(source, startState) { return tokenizer(source, startState || normal); }; })(); function indentCSS(inBraces, inRule, base) { return function(nextChars) { if (!inBraces || /^\}/.test(nextChars)) return base; else if (inRule) return base + indentUnit * 2; else return base + indentUnit; }; } // This is a very simplistic parser -- since CSS does not really // nest, it works acceptably well, but some nicer colouroing could // be provided with a more complicated parser. function parseCSS(source, basecolumn) { basecolumn = basecolumn || 0; var tokens = tokenizeCSS(source); var inBraces = false, inRule = false, inDecl = false;; var iter = { next: function() { var token = tokens.next(), style = token.style, content = token.content; if (style == "css-hash") style = token.style = inRule ? "css-colorcode" : "css-identifier"; if (style == "css-identifier") { if (inRule) token.style = "css-value"; else if (!inBraces && !inDecl) token.style = "css-selector"; } if (content == "\n") token.indentation = indentCSS(inBraces, inRule, basecolumn); if (content == "{" && inDecl == "@media") inDecl = false; else if (content == "{") inBraces = true; else if (content == "}") inBraces = inRule = inDecl = false; else if (content == ";") inRule = inDecl = false; else if (inBraces && style != "css-comment" && style != "whitespace") inRule = true; else if (!inBraces && style == "css-at") inDecl = content; return token; }, copy: function() { var _inBraces = inBraces, _inRule = inRule, _tokenState = tokens.state; return function(source) { tokens = tokenizeCSS(source, _tokenState); inBraces = _inBraces; inRule = _inRule; return iter; }; } }; return iter; } return {make: parseCSS, electricChars: "}"}; })();
JavaScript
/* Functionality for finding, storing, and restoring selections * * This does not provide a generic API, just the minimal functionality * required by the CodeMirror system. */ // Namespace object. var select = {}; (function() { select.ie_selection = document.selection && document.selection.createRangeCollection; // Find the 'top-level' (defined as 'a direct child of the node // passed as the top argument') node that the given node is // contained in. Return null if the given node is not inside the top // node. function topLevelNodeAt(node, top) { while (node && node.parentNode != top) node = node.parentNode; return node; } // Find the top-level node that contains the node before this one. function topLevelNodeBefore(node, top) { while (!node.previousSibling && node.parentNode != top) node = node.parentNode; return topLevelNodeAt(node.previousSibling, top); } var fourSpaces = "\u00a0\u00a0\u00a0\u00a0"; select.scrollToNode = function(node, cursor) { if (!node) return; var element = node, body = document.body, html = document.documentElement, atEnd = !element.nextSibling || !element.nextSibling.nextSibling || !element.nextSibling.nextSibling.nextSibling; // In Opera (and recent Webkit versions), BR elements *always* // have a offsetTop property of zero. var compensateHack = 0; while (element && !element.offsetTop) { compensateHack++; element = element.previousSibling; } // atEnd is another kludge for these browsers -- if the cursor is // at the end of the document, and the node doesn't have an // offset, just scroll to the end. if (compensateHack == 0) atEnd = false; // WebKit has a bad habit of (sometimes) happily returning bogus // offsets when the document has just been changed. This seems to // always be 5/5, so we don't use those. if (webkit && element && element.offsetTop == 5 && element.offsetLeft == 5) return; var y = compensateHack * (element ? element.offsetHeight : 0), x = 0, width = (node ? node.offsetWidth : 0), pos = element; while (pos && pos.offsetParent) { y += pos.offsetTop; // Don't count X offset for <br> nodes if (!isBR(pos)) x += pos.offsetLeft; pos = pos.offsetParent; } var scroll_x = body.scrollLeft || html.scrollLeft || 0, scroll_y = body.scrollTop || html.scrollTop || 0, scroll = false, screen_width = window.innerWidth || html.clientWidth || 0; if (cursor || width < screen_width) { if (cursor) { var off = select.offsetInNode(node), size = nodeText(node).length; if (size) x += width * (off / size); } var screen_x = x - scroll_x; if (screen_x < 0 || screen_x > screen_width) { scroll_x = x; scroll = true; } } var screen_y = y - scroll_y; if (screen_y < 0 || atEnd || screen_y > (window.innerHeight || html.clientHeight || 0) - 50) { scroll_y = atEnd ? 1e6 : y; scroll = true; } if (scroll) window.scrollTo(scroll_x, scroll_y); }; select.scrollToCursor = function(container) { select.scrollToNode(select.selectionTopNode(container, true) || container.firstChild, true); }; // Used to prevent restoring a selection when we do not need to. var currentSelection = null; select.snapshotChanged = function() { if (currentSelection) currentSelection.changed = true; }; // Find the 'leaf' node (BR or text) after the given one. function baseNodeAfter(node) { var next = node.nextSibling; if (next) { while (next.firstChild) next = next.firstChild; if (next.nodeType == 3 || isBR(next)) return next; else return baseNodeAfter(next); } else { var parent = node.parentNode; while (parent && !parent.nextSibling) parent = parent.parentNode; return parent && baseNodeAfter(parent); } } // This is called by the code in editor.js whenever it is replacing // a text node. The function sees whether the given oldNode is part // of the current selection, and updates this selection if it is. // Because nodes are often only partially replaced, the length of // the part that gets replaced has to be taken into account -- the // selection might stay in the oldNode if the newNode is smaller // than the selection's offset. The offset argument is needed in // case the selection does move to the new object, and the given // length is not the whole length of the new node (part of it might // have been used to replace another node). select.snapshotReplaceNode = function(from, to, length, offset) { if (!currentSelection) return; function replace(point) { if (from == point.node) { currentSelection.changed = true; if (length && point.offset > length) { point.offset -= length; } else { point.node = to; point.offset += (offset || 0); } } else if (select.ie_selection && point.offset == 0 && point.node == baseNodeAfter(from)) { currentSelection.changed = true; } } replace(currentSelection.start); replace(currentSelection.end); }; select.snapshotMove = function(from, to, distance, relative, ifAtStart) { if (!currentSelection) return; function move(point) { if (from == point.node && (!ifAtStart || point.offset == 0)) { currentSelection.changed = true; point.node = to; if (relative) point.offset = Math.max(0, point.offset + distance); else point.offset = distance; } } move(currentSelection.start); move(currentSelection.end); }; // Most functions are defined in two ways, one for the IE selection // model, one for the W3C one. if (select.ie_selection) { function selRange() { var sel = document.selection; return sel && (sel.createRange || sel.createTextRange)(); } function selectionNode(start) { var range = selRange(); range.collapse(start); function nodeAfter(node) { var found = null; while (!found && node) { found = node.nextSibling; node = node.parentNode; } return nodeAtStartOf(found); } function nodeAtStartOf(node) { while (node && node.firstChild) node = node.firstChild; return {node: node, offset: 0}; } var containing = range.parentElement(); if (!isAncestor(document.body, containing)) return null; if (!containing.firstChild) return nodeAtStartOf(containing); var working = range.duplicate(); working.moveToElementText(containing); working.collapse(true); for (var cur = containing.firstChild; cur; cur = cur.nextSibling) { if (cur.nodeType == 3) { var size = cur.nodeValue.length; working.move("character", size); } else { working.moveToElementText(cur); working.collapse(false); } var dir = range.compareEndPoints("StartToStart", working); if (dir == 0) return nodeAfter(cur); if (dir == 1) continue; if (cur.nodeType != 3) return nodeAtStartOf(cur); working.setEndPoint("StartToEnd", range); return {node: cur, offset: size - working.text.length}; } return nodeAfter(containing); } select.markSelection = function() { currentSelection = null; var sel = document.selection; if (!sel) return; var start = selectionNode(true), end = selectionNode(false); if (!start || !end) return; currentSelection = {start: start, end: end, changed: false}; }; select.selectMarked = function() { if (!currentSelection || !currentSelection.changed) return; function makeRange(point) { var range = document.body.createTextRange(), node = point.node; if (!node) { range.moveToElementText(document.body); range.collapse(false); } else if (node.nodeType == 3) { range.moveToElementText(node.parentNode); var offset = point.offset; while (node.previousSibling) { node = node.previousSibling; offset += (node.innerText || "").length; } range.move("character", offset); } else { range.moveToElementText(node); range.collapse(true); } return range; } var start = makeRange(currentSelection.start), end = makeRange(currentSelection.end); start.setEndPoint("StartToEnd", end); start.select(); }; select.offsetInNode = function(node) { var range = selRange(); if (!range) return 0; var range2 = range.duplicate(); try {range2.moveToElementText(node);} catch(e){return 0;} range.setEndPoint("StartToStart", range2); return range.text.length; }; // Get the top-level node that one end of the cursor is inside or // after. Note that this returns false for 'no cursor', and null // for 'start of document'. select.selectionTopNode = function(container, start) { var range = selRange(); if (!range) return false; var range2 = range.duplicate(); range.collapse(start); var around = range.parentElement(); if (around && isAncestor(container, around)) { // Only use this node if the selection is not at its start. range2.moveToElementText(around); if (range.compareEndPoints("StartToStart", range2) == 1) return topLevelNodeAt(around, container); } // Move the start of a range to the start of a node, // compensating for the fact that you can't call // moveToElementText with text nodes. function moveToNodeStart(range, node) { if (node.nodeType == 3) { var count = 0, cur = node.previousSibling; while (cur && cur.nodeType == 3) { count += cur.nodeValue.length; cur = cur.previousSibling; } if (cur) { try{range.moveToElementText(cur);} catch(e){return false;} range.collapse(false); } else range.moveToElementText(node.parentNode); if (count) range.move("character", count); } else { try{range.moveToElementText(node);} catch(e){return false;} } return true; } // Do a binary search through the container object, comparing // the start of each node to the selection var start = 0, end = container.childNodes.length - 1; while (start < end) { var middle = Math.ceil((end + start) / 2), node = container.childNodes[middle]; if (!node) return false; // Don't ask. IE6 manages this sometimes. if (!moveToNodeStart(range2, node)) return false; if (range.compareEndPoints("StartToStart", range2) == 1) start = middle; else end = middle - 1; } if (start == 0) { var test1 = selRange(), test2 = test1.duplicate(); try { test2.moveToElementText(container); } catch(exception) { return null; } if (test1.compareEndPoints("StartToStart", test2) == 0) return null; } return container.childNodes[start] || null; }; // Place the cursor after this.start. This is only useful when // manually moving the cursor instead of restoring it to its old // position. select.focusAfterNode = function(node, container) { var range = document.body.createTextRange(); range.moveToElementText(node || container); range.collapse(!node); range.select(); }; select.somethingSelected = function() { var range = selRange(); return range && (range.text != ""); }; function insertAtCursor(html) { var range = selRange(); if (range) { range.pasteHTML(html); range.collapse(false); range.select(); } } // Used to normalize the effect of the enter key, since browsers // do widely different things when pressing enter in designMode. select.insertNewlineAtCursor = function() { insertAtCursor("<br>"); }; select.insertTabAtCursor = function() { insertAtCursor(fourSpaces); }; // Get the BR node at the start of the line on which the cursor // currently is, and the offset into the line. Returns null as // node if cursor is on first line. select.cursorPos = function(container, start) { var range = selRange(); if (!range) return null; var topNode = select.selectionTopNode(container, start); while (topNode && !isBR(topNode)) topNode = topNode.previousSibling; var range2 = range.duplicate(); range.collapse(start); if (topNode) { range2.moveToElementText(topNode); range2.collapse(false); } else { // When nothing is selected, we can get all kinds of funky errors here. try { range2.moveToElementText(container); } catch (e) { return null; } range2.collapse(true); } range.setEndPoint("StartToStart", range2); return {node: topNode, offset: range.text.length}; }; select.setCursorPos = function(container, from, to) { function rangeAt(pos) { var range = document.body.createTextRange(); if (!pos.node) { range.moveToElementText(container); range.collapse(true); } else { range.moveToElementText(pos.node); range.collapse(false); } range.move("character", pos.offset); return range; } var range = rangeAt(from); if (to && to != from) range.setEndPoint("EndToEnd", rangeAt(to)); range.select(); } // Some hacks for storing and re-storing the selection when the editor loses and regains focus. select.getBookmark = function (container) { var from = select.cursorPos(container, true), to = select.cursorPos(container, false); if (from && to) return {from: from, to: to}; }; // Restore a stored selection. select.setBookmark = function(container, mark) { if (!mark) return; select.setCursorPos(container, mark.from, mark.to); }; } // W3C model else { // Find the node right at the cursor, not one of its // ancestors with a suitable offset. This goes down the DOM tree // until a 'leaf' is reached (or is it *up* the DOM tree?). function innerNode(node, offset) { while (node.nodeType != 3 && !isBR(node)) { var newNode = node.childNodes[offset] || node.nextSibling; offset = 0; while (!newNode && node.parentNode) { node = node.parentNode; newNode = node.nextSibling; } node = newNode; if (!newNode) break; } return {node: node, offset: offset}; } // Store start and end nodes, and offsets within these, and refer // back to the selection object from those nodes, so that this // object can be updated when the nodes are replaced before the // selection is restored. select.markSelection = function () { var selection = window.getSelection(); if (!selection || selection.rangeCount == 0) return (currentSelection = null); var range = selection.getRangeAt(0); currentSelection = { start: innerNode(range.startContainer, range.startOffset), end: innerNode(range.endContainer, range.endOffset), changed: false }; }; select.selectMarked = function () { var cs = currentSelection; // on webkit-based browsers, it is apparently possible that the // selection gets reset even when a node that is not one of the // endpoints get messed with. the most common situation where // this occurs is when a selection is deleted or overwitten. we // check for that here. function focusIssue() { if (cs.start.node == cs.end.node && cs.start.offset == cs.end.offset) { var selection = window.getSelection(); if (!selection || selection.rangeCount == 0) return true; var range = selection.getRangeAt(0), point = innerNode(range.startContainer, range.startOffset); return cs.start.node != point.node || cs.start.offset != point.offset; } } if (!cs || !(cs.changed || (webkit && focusIssue()))) return; var range = document.createRange(); function setPoint(point, which) { if (point.node) { // Some magic to generalize the setting of the start and end // of a range. if (point.offset == 0) range["set" + which + "Before"](point.node); else range["set" + which](point.node, point.offset); } else { range.setStartAfter(document.body.lastChild || document.body); } } setPoint(cs.end, "End"); setPoint(cs.start, "Start"); selectRange(range); }; // Helper for selecting a range object. function selectRange(range) { var selection = window.getSelection(); if (!selection) return; selection.removeAllRanges(); selection.addRange(range); } function selectionRange() { var selection = window.getSelection(); if (!selection || selection.rangeCount == 0) return false; else return selection.getRangeAt(0); } // Finding the top-level node at the cursor in the W3C is, as you // can see, quite an involved process. select.selectionTopNode = function(container, start) { var range = selectionRange(); if (!range) return false; var node = start ? range.startContainer : range.endContainer; var offset = start ? range.startOffset : range.endOffset; // Work around (yet another) bug in Opera's selection model. if (window.opera && !start && range.endContainer == container && range.endOffset == range.startOffset + 1 && container.childNodes[range.startOffset] && isBR(container.childNodes[range.startOffset])) offset--; // For text nodes, we look at the node itself if the cursor is // inside, or at the node before it if the cursor is at the // start. if (node.nodeType == 3){ if (offset > 0) return topLevelNodeAt(node, container); else return topLevelNodeBefore(node, container); } // Occasionally, browsers will return the HTML node as // selection. If the offset is 0, we take the start of the frame // ('after null'), otherwise, we take the last node. else if (node.nodeName.toUpperCase() == "HTML") { return (offset == 1 ? null : container.lastChild); } // If the given node is our 'container', we just look up the // correct node by using the offset. else if (node == container) { return (offset == 0) ? null : node.childNodes[offset - 1]; } // In any other case, we have a regular node. If the cursor is // at the end of the node, we use the node itself, if it is at // the start, we use the node before it, and in any other // case, we look up the child before the cursor and use that. else { if (offset == node.childNodes.length) return topLevelNodeAt(node, container); else if (offset == 0) return topLevelNodeBefore(node, container); else return topLevelNodeAt(node.childNodes[offset - 1], container); } }; select.focusAfterNode = function(node, container) { var range = document.createRange(); range.setStartBefore(container.firstChild || container); // In Opera, setting the end of a range at the end of a line // (before a BR) will cause the cursor to appear on the next // line, so we set the end inside of the start node when // possible. if (node && !node.firstChild) range.setEndAfter(node); else if (node) range.setEnd(node, node.childNodes.length); else range.setEndBefore(container.firstChild || container); range.collapse(false); selectRange(range); }; select.somethingSelected = function() { var range = selectionRange(); return range && !range.collapsed; }; select.offsetInNode = function(node) { var range = selectionRange(); if (!range) return 0; range = range.cloneRange(); range.setStartBefore(node); return range.toString().length; }; select.insertNodeAtCursor = function(node) { var range = selectionRange(); if (!range) return; range.deleteContents(); range.insertNode(node); webkitLastLineHack(document.body); // work around weirdness where Opera will magically insert a new // BR node when a BR node inside a span is moved around. makes // sure the BR ends up outside of spans. if (window.opera && isBR(node) && isSpan(node.parentNode)) { var next = node.nextSibling, p = node.parentNode, outer = p.parentNode; outer.insertBefore(node, p.nextSibling); var textAfter = ""; for (; next && next.nodeType == 3; next = next.nextSibling) { textAfter += next.nodeValue; removeElement(next); } outer.insertBefore(makePartSpan(textAfter, document), node.nextSibling); } range = document.createRange(); range.selectNode(node); range.collapse(false); selectRange(range); } select.insertNewlineAtCursor = function() { select.insertNodeAtCursor(document.createElement("BR")); }; select.insertTabAtCursor = function() { select.insertNodeAtCursor(document.createTextNode(fourSpaces)); }; select.cursorPos = function(container, start) { var range = selectionRange(); if (!range) return; var topNode = select.selectionTopNode(container, start); while (topNode && !isBR(topNode)) topNode = topNode.previousSibling; range = range.cloneRange(); range.collapse(start); if (topNode) range.setStartAfter(topNode); else range.setStartBefore(container); var text = range.toString(); return {node: topNode, offset: text.length}; }; select.setCursorPos = function(container, from, to) { var range = document.createRange(); function setPoint(node, offset, side) { if (offset == 0 && node && !node.nextSibling) { range["set" + side + "After"](node); return true; } if (!node) node = container.firstChild; else node = node.nextSibling; if (!node) return; if (offset == 0) { range["set" + side + "Before"](node); return true; } var backlog = [] function decompose(node) { if (node.nodeType == 3) backlog.push(node); else forEach(node.childNodes, decompose); } while (true) { while (node && !backlog.length) { decompose(node); node = node.nextSibling; } var cur = backlog.shift(); if (!cur) return false; var length = cur.nodeValue.length; if (length >= offset) { range["set" + side](cur, offset); return true; } offset -= length; } } to = to || from; if (setPoint(to.node, to.offset, "End") && setPoint(from.node, from.offset, "Start")) selectRange(range); }; } })();
JavaScript
/* A few useful utility functions. */ // Capture a method on an object. function method(obj, name) { return function() {obj[name].apply(obj, arguments);}; } // The value used to signal the end of a sequence in iterators. var StopIteration = {toString: function() {return "StopIteration"}}; // Apply a function to each element in a sequence. function forEach(iter, f) { if (iter.next) { try {while (true) f(iter.next());} catch (e) {if (e != StopIteration) throw e;} } else { for (var i = 0; i < iter.length; i++) f(iter[i]); } } // Map a function over a sequence, producing an array of results. function map(iter, f) { var accum = []; forEach(iter, function(val) {accum.push(f(val));}); return accum; } // Create a predicate function that tests a string againsts a given // regular expression. No longer used but might be used by 3rd party // parsers. function matcher(regexp){ return function(value){return regexp.test(value);}; } // Test whether a DOM node has a certain CSS class. function hasClass(element, className) { var classes = element.className; return classes && new RegExp("(^| )" + className + "($| )").test(classes); } function removeClass(element, className) { element.className = element.className.replace(new RegExp(" " + className + "\\b", "g"), ""); return element; } // Insert a DOM node after another node. function insertAfter(newNode, oldNode) { var parent = oldNode.parentNode; parent.insertBefore(newNode, oldNode.nextSibling); return newNode; } function removeElement(node) { if (node.parentNode) node.parentNode.removeChild(node); } function clearElement(node) { while (node.firstChild) node.removeChild(node.firstChild); } // Check whether a node is contained in another one. function isAncestor(node, child) { while (child = child.parentNode) { if (node == child) return true; } return false; } // The non-breaking space character. var nbsp = "\u00a0"; var matching = {"{": "}", "[": "]", "(": ")", "}": "{", "]": "[", ")": "("}; // Standardize a few unportable event properties. function normalizeEvent(event) { if (!event.stopPropagation) { event.stopPropagation = function() {this.cancelBubble = true;}; event.preventDefault = function() {this.returnValue = false;}; } if (!event.stop) { event.stop = function() { this.stopPropagation(); this.preventDefault(); }; } if (event.type == "keypress") { event.code = (event.charCode == null) ? event.keyCode : event.charCode; event.character = String.fromCharCode(event.code); } return event; } // Portably register event handlers. function addEventHandler(node, type, handler, removeFunc) { function wrapHandler(event) { handler(normalizeEvent(event || window.event)); } if (typeof node.addEventListener == "function") { node.addEventListener(type, wrapHandler, false); if (removeFunc) return function() {node.removeEventListener(type, wrapHandler, false);}; } else { node.attachEvent("on" + type, wrapHandler); if (removeFunc) return function() {node.detachEvent("on" + type, wrapHandler);}; } } function nodeText(node) { return node.textContent || node.innerText || node.nodeValue || ""; } function nodeTop(node) { var top = 0; while (node.offsetParent) { top += node.offsetTop; node = node.offsetParent; } return top; } function isBR(node) { var nn = node.nodeName; return nn == "BR" || nn == "br"; } function isSpan(node) { var nn = node.nodeName; return nn == "SPAN" || nn == "span"; }
JavaScript
var SparqlParser = Editor.Parser = (function() { function wordRegexp(words) { return new RegExp("^(?:" + words.join("|") + ")$", "i"); } var ops = wordRegexp(["str", "lang", "langmatches", "datatype", "bound", "sameterm", "isiri", "isuri", "isblank", "isliteral", "union", "a"]); var keywords = wordRegexp(["base", "prefix", "select", "distinct", "reduced", "construct", "describe", "ask", "from", "named", "where", "order", "limit", "offset", "filter", "optional", "graph", "by", "asc", "desc"]); var operatorChars = /[*+\-<>=&|]/; var tokenizeSparql = (function() { function normal(source, setState) { var ch = source.next(); if (ch == "$" || ch == "?") { source.nextWhileMatches(/[\w\d]/); return "sp-var"; } else if (ch == "<" && !source.matches(/[\s\u00a0=]/)) { source.nextWhileMatches(/[^\s\u00a0>]/); if (source.equals(">")) source.next(); return "sp-uri"; } else if (ch == "\"" || ch == "'") { setState(inLiteral(ch)); return null; } else if (/[{}\(\),\.;\[\]]/.test(ch)) { return "sp-punc"; } else if (ch == "#") { while (!source.endOfLine()) source.next(); return "sp-comment"; } else if (operatorChars.test(ch)) { source.nextWhileMatches(operatorChars); return "sp-operator"; } else if (ch == ":") { source.nextWhileMatches(/[\w\d\._\-]/); return "sp-prefixed"; } else { source.nextWhileMatches(/[_\w\d]/); if (source.equals(":")) { source.next(); source.nextWhileMatches(/[\w\d_\-]/); return "sp-prefixed"; } var word = source.get(), type; if (ops.test(word)) type = "sp-operator"; else if (keywords.test(word)) type = "sp-keyword"; else type = "sp-word"; return {style: type, content: word}; } } function inLiteral(quote) { return function(source, setState) { var escaped = false; while (!source.endOfLine()) { var ch = source.next(); if (ch == quote && !escaped) { setState(normal); break; } escaped = !escaped && ch == "\\"; } return "sp-literal"; }; } return function(source, startState) { return tokenizer(source, startState || normal); }; })(); function indentSparql(context) { return function(nextChars) { var firstChar = nextChars && nextChars.charAt(0); if (/[\]\}]/.test(firstChar)) while (context && context.type == "pattern") context = context.prev; var closing = context && firstChar == matching[context.type]; if (!context) return 0; else if (context.type == "pattern") return context.col; else if (context.align) return context.col - (closing ? context.width : 0); else return context.indent + (closing ? 0 : indentUnit); } } function parseSparql(source) { var tokens = tokenizeSparql(source); var context = null, indent = 0, col = 0; function pushContext(type, width) { context = {prev: context, indent: indent, col: col, type: type, width: width}; } function popContext() { context = context.prev; } var iter = { next: function() { var token = tokens.next(), type = token.style, content = token.content, width = token.value.length; if (content == "\n") { token.indentation = indentSparql(context); indent = col = 0; if (context && context.align == null) context.align = false; } else if (type == "whitespace" && col == 0) { indent = width; } else if (type != "sp-comment" && context && context.align == null) { context.align = true; } if (content != "\n") col += width; if (/[\[\{\(]/.test(content)) { pushContext(content, width); } else if (/[\]\}\)]/.test(content)) { while (context && context.type == "pattern") popContext(); if (context && content == matching[context.type]) popContext(); } else if (content == "." && context && context.type == "pattern") { popContext(); } else if ((type == "sp-word" || type == "sp-prefixed" || type == "sp-uri" || type == "sp-var" || type == "sp-literal") && context && /[\{\[]/.test(context.type)) { pushContext("pattern", width); } return token; }, copy: function() { var _context = context, _indent = indent, _col = col, _tokenState = tokens.state; return function(source) { tokens = tokenizeSparql(source, _tokenState); context = _context; indent = _indent; col = _col; return iter; }; } }; return iter; } return {make: parseSparql, electricChars: "}]"}; })();
JavaScript
/* This file defines an XML parser, with a few kludges to make it * useable for HTML. autoSelfClosers defines a set of tag names that * are expected to not have a closing tag, and doNotIndent specifies * the tags inside of which no indentation should happen (see Config * object). These can be disabled by passing the editor an object like * {useHTMLKludges: false} as parserConfig option. */ var XMLParser = Editor.Parser = (function() { var Kludges = { autoSelfClosers: {"br": true, "img": true, "hr": true, "link": true, "input": true, "meta": true, "col": true, "frame": true, "base": true, "area": true}, doNotIndent: {"pre": true, "!cdata": true} }; var NoKludges = {autoSelfClosers: {}, doNotIndent: {"!cdata": true}}; var UseKludges = Kludges; var alignCDATA = false; // Simple stateful tokenizer for XML documents. Returns a // MochiKit-style iterator, with a state property that contains a // function encapsulating the current state. See tokenize.js. var tokenizeXML = (function() { function inText(source, setState) { var ch = source.next(); if (ch == "<") { if (source.equals("!")) { source.next(); if (source.equals("[")) { if (source.lookAhead("[CDATA[", true)) { setState(inBlock("xml-cdata", "]]>")); return null; } else { return "xml-text"; } } else if (source.lookAhead("--", true)) { setState(inBlock("xml-comment", "-->")); return null; } else if (source.lookAhead("DOCTYPE", true)) { source.nextWhileMatches(/[\w\._\-]/); setState(inBlock("xml-doctype", ">")); return "xml-doctype"; } else { return "xml-text"; } } else if (source.equals("?")) { source.next(); source.nextWhileMatches(/[\w\._\-]/); setState(inBlock("xml-processing", "?>")); return "xml-processing"; } else { if (source.equals("/")) source.next(); setState(inTag); return "xml-punctuation"; } } else if (ch == "&") { while (!source.endOfLine()) { if (source.next() == ";") break; } return "xml-entity"; } else { source.nextWhileMatches(/[^&<\n]/); return "xml-text"; } } function inTag(source, setState) { var ch = source.next(); if (ch == ">") { setState(inText); return "xml-punctuation"; } else if (/[?\/]/.test(ch) && source.equals(">")) { source.next(); setState(inText); return "xml-punctuation"; } else if (ch == "=") { return "xml-punctuation"; } else if (/[\'\"]/.test(ch)) { setState(inAttribute(ch)); return null; } else { source.nextWhileMatches(/[^\s\u00a0=<>\"\'\/?]/); return "xml-name"; } } function inAttribute(quote) { return function(source, setState) { while (!source.endOfLine()) { if (source.next() == quote) { setState(inTag); break; } } return "xml-attribute"; }; } function inBlock(style, terminator) { return function(source, setState) { while (!source.endOfLine()) { if (source.lookAhead(terminator, true)) { setState(inText); break; } source.next(); } return style; }; } return function(source, startState) { return tokenizer(source, startState || inText); }; })(); // The parser. The structure of this function largely follows that of // parseJavaScript in parsejavascript.js (there is actually a bit more // shared code than I'd like), but it is quite a bit simpler. function parseXML(source) { var tokens = tokenizeXML(source), token;
JavaScript
/* Tokenizer for JavaScript code */ var tokenizeJavaScript = (function() { // Advance the stream until the given character (not preceded by a // backslash) is encountered, or the end of the line is reached. function nextUntilUnescaped(source, end) { var escaped = false; while (!source.endOfLine()) { var next = source.next(); if (next == end && !escaped) return false; escaped = !escaped && next == "\\"; } return escaped; } // A map of JavaScript's keywords. The a/b/c keyword distinction is // very rough, but it gives the parser enough information to parse // correct code correctly (we don't care that much how we parse // incorrect code). The style information included in these objects // is used by the highlighter to pick the correct CSS style for a // token. var keywords = function(){ function result(type, style){ return {type: type, style: "js-" + style}; } // keywords that take a parenthised expression, and then a // statement (if) var keywordA = result("keyword a", "keyword"); // keywords that take just a statement (else) var keywordB = result("keyword b", "keyword"); // keywords that optionally take an expression, and form a // statement (return) var keywordC = result("keyword c", "keyword"); var operator = result("operator", "keyword"); var atom = result("atom", "atom"); return { "if": keywordA, "while": keywordA, "with": keywordA, "else": keywordB, "do": keywordB, "try": keywordB, "finally": keywordB, "return": keywordC, "break": keywordC, "continue": keywordC, "new": keywordC, "delete": keywordC, "throw": keywordC, "in": operator, "typeof": operator, "instanceof": operator, "var": result("var", "keyword"), "function": result("function", "keyword"), "catch": result("catch", "keyword"), "for": result("for", "keyword"), "switch": result("switch", "keyword"), "case": result("case", "keyword"), "default": result("default", "keyword"), "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom }; }(); // Some helper regexps var isOperatorChar = /[+\-*&%=<>!?|]/; var isHexDigit = /[0-9A-Fa-f]/; var isWordChar = /[\w\$_]/; // Wrapper around jsToken that helps maintain parser state (whether // we are inside of a multi-line comment and whether the next token // could be a regular expression). function jsTokenState(inside, regexp) { return function(source, setState) { var newInside = inside; var type = jsToken(inside, regexp, source, function(c) {newInside = c;}); var newRegexp = type.type == "operator" || type.type == "keyword c" || type.type.match(/^[\[{}\(,;:]$/); if (newRegexp != regexp || newInside != inside) setState(jsTokenState(newInside, newRegexp)); return type; }; } // The token reader, intended to be used by the tokenizer from // tokenize.js (through jsTokenState). Advances the source stream // over a token, and returns an object containing the type and style // of that token. function jsToken(inside, regexp, source, setInside) { function readHexNumber(){ source.next(); // skip the 'x' source.nextWhileMatches(isHexDigit); return {type: "number", style: "js-atom"}; } function readNumber() { source.nextWhileMatches(/[0-9]/); if (source.equals(".")){ source.next(); source.nextWhileMatches(/[0-9]/); } if (source.equals("e") || source.equals("E")){ source.next(); if (source.equals("-")) source.next(); source.nextWhileMatches(/[0-9]/); } return {type: "number", style: "js-atom"}; } // Read a word, look it up in keywords. If not found, it is a // variable, otherwise it is a keyword of the type found. function readWord() { source.nextWhileMatches(isWordChar); var word = source.get(); var known = keywords.hasOwnProperty(word) && keywords.propertyIsEnumerable(word) && keywords[word]; return known ? {type: known.type, style: known.style, content: word} : {type: "variable", style: "js-variable", content: word}; } function readRegexp() { nextUntilUnescaped(source, "/"); source.nextWhileMatches(/[gimy]/); // 'y' is "sticky" option in Mozilla return {type: "regexp", style: "js-string"}; } // Mutli-line comments are tricky. We want to return the newlines // embedded in them as regular newline tokens, and then continue // returning a comment token for every line of the comment. So // some state has to be saved (inside) to indicate whether we are // inside a /* */ sequence. function readMultilineComment(start){ var newInside = "/*"; var maybeEnd = (start == "*"); while (true) { if (source.endOfLine()) break; var next = source.next(); if (next == "/" && maybeEnd){ newInside = null; break; } maybeEnd = (next == "*"); } setInside(newInside); return {type: "comment", style: "js-comment"}; } function readOperator() { source.nextWhileMatches(isOperatorChar); return {type: "operator", style: "js-operator"}; } function readString(quote) { var endBackSlash = nextUntilUnescaped(source, quote); setInside(endBackSlash ? quote : null); return {type: "string", style: "js-string"}; } // Fetch the next token. Dispatches on first character in the // stream, or first two characters when the first is a slash. if (inside == "\"" || inside == "'") return readString(inside); var ch = source.next(); if (inside == "/*") return readMultilineComment(ch); else if (ch == "\"" || ch == "'") return readString(ch); // with punctuation, the type of the token is the symbol itself else if (/[\[\]{}\(\),;\:\.]/.test(ch)) return {type: ch, style: "js-punctuation"}; else if (ch == "0" && (source.equals("x") || source.equals("X"))) return readHexNumber(); else if (/[0-9]/.test(ch)) return readNumber(); else if (ch == "/"){ if (source.equals("*")) { source.next(); return readMultilineComment(ch); } else if (source.equals("/")) { nextUntilUnescaped(source, null); return {type: "comment", style: "js-comment"};} else if (regexp) return readRegexp(); else return readOperator(); } else if (isOperatorChar.test(ch)) return readOperator(); else return readWord(); } // The external interface to the tokenizer. return function(source, startState) { return tokenizer(source, startState || jsTokenState(false, true)); }; })();
JavaScript
// A framework for simple tokenizers. Takes care of newlines and // white-space, and of getting the text from the source stream into // the token object. A state is a function of two arguments -- a // string stream and a setState function. The second can be used to // change the tokenizer's state, and can be ignored for stateless // tokenizers. This function should advance the stream over a token // and return a string or object containing information about the next // token, or null to pass and have the (new) state be called to finish // the token. When a string is given, it is wrapped in a {style, type} // object. In the resulting object, the characters consumed are stored // under the content property. Any whitespace following them is also // automatically consumed, and added to the value property. (Thus, // content is the actual meaningful part of the token, while value // contains all the text it spans.) function tokenizer(source, state) { // Newlines are always a separate token. function isWhiteSpace(ch) { // The messy regexp is because IE's regexp matcher is of the // opinion that non-breaking spaces are no whitespace. return ch != "\n" && /^[\s\u00a0]*$/.test(ch); } var tokenizer = { state: state, take: function(type) { if (typeof(type) == "string") type = {style: type, type: type}; type.content = (type.content || "") + source.get(); if (!/\n$/.test(type.content)) source.nextWhile(isWhiteSpace); type.value = type.content + source.get(); return type; }, next: function () { if (!source.more()) throw StopIteration; var type; if (source.equals("\n")) { source.next(); return this.take("whitespace"); } if (source.applies(isWhiteSpace)) type = "whitespace"; else while (!type) type = this.state(source, function(s) {tokenizer.state = s;}); return this.take(type); } }; return tokenizer; }
JavaScript
/* CodeMirror main module (http://codemirror.net/) * * Implements the CodeMirror constructor and prototype, which take care * of initializing the editor frame, and providing the outside interface. */ // The CodeMirrorConfig object is used to specify a default // configuration. If you specify such an object before loading this // file, the values you put into it will override the defaults given // below. You can also assign to it after loading. var CodeMirrorConfig = window.CodeMirrorConfig || {}; var CodeMirror = (function(){ function setDefaults(object, defaults) { for (var option in defaults) { if (!object.hasOwnProperty(option)) object[option] = defaults[option]; } } function forEach(array, action) { for (var i = 0; i < array.length; i++) action(array[i]); } function createHTMLElement(el) { if (document.createElementNS && document.documentElement.namespaceURI !== null) return document.createElementNS("http://www.w3.org/1999/xhtml", el) else return document.createElement(el) } // These default options can be overridden by passing a set of // options to a specific CodeMirror constructor. See manual.html for // their meaning. setDefaults(CodeMirrorConfig, { stylesheet: [], path: "", parserfile: [], basefiles: ["util.js", "stringstream.js", "select.js", "undo.js", "editor.js", "tokenize.js"], iframeClass: null, passDelay: 200, passTime: 50, lineNumberDelay: 200, lineNumberTime: 50, continuousScanning: false, saveFunction: null, onLoad: null, onChange: null, undoDepth: 50, undoDelay: 800, disableSpellcheck: true, textWrapping: true, readOnly: false, width: "", height: "300px", minHeight: 100, autoMatchParens: false, markParen: null, unmarkParen: null, parserConfig: null, tabMode: "indent", // or "spaces", "default", "shift" enterMode: "indent", // or "keep", "flat" electricChars: true, reindentOnLoad: false, activeTokens: null, onCursorActivity: null, lineNumbers: false, firstLineNumber: 1, onLineNumberClick: null, indentUnit: 2, domain: null, noScriptCaching: false, incrementalLoading: false }); function addLineNumberDiv(container, firstNum) { var nums = createHTMLElement("div"), scroller = createHTMLElement("div"); nums.style.position = "absolute"; nums.style.height = "100%"; if (nums.style.setExpression) { try {nums.style.setExpression("height", "this.previousSibling.offsetHeight + 'px'");} catch(e) {} // Seems to throw 'Not Implemented' on some IE8 versions } nums.style.top = "0px"; nums.style.left = "0px"; nums.style.overflow = "hidden"; container.appendChild(nums); scroller.className = "CodeMirror-line-numbers"; nums.appendChild(scroller); scroller.innerHTML = "<div>" + firstNum + "</div>"; return nums; } function frameHTML(options) { if (typeof options.parserfile == "string") options.parserfile = [options.parserfile]; if (typeof options.basefiles == "string") options.basefiles = [options.basefiles]; if (typeof options.stylesheet == "string") options.stylesheet = [options.stylesheet]; var html = ["<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html><head>"]; // Hack to work around a bunch of IE8-specific problems. html.push("<meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\"/>"); var queryStr = options.noScriptCaching ? "?nocache=" + new Date().getTime().toString(16) : ""; forEach(options.stylesheet, function(file) { html.push("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + file + queryStr + "\"/>"); }); forEach(options.basefiles.concat(options.parserfile), function(file) { if (!/^https?:/.test(file)) file = options.path + file; html.push("<script type=\"text/javascript\" src=\"" + file + queryStr + "\"><" + "/script>"); }); html.push("</head><body style=\"border-width: 0;\" class=\"editbox\" spellcheck=\"" + (options.disableSpellcheck ? "false" : "true") + "\"></body></html>"); return html.join(""); } var internetExplorer = document.selection && window.ActiveXObject && /MSIE/.test(navigator.userAgent); function CodeMirror(place, options) { // Use passed options, if any, to override defaults. this.options = options = options || {}; setDefaults(options, CodeMirrorConfig); // Backward compatibility for deprecated options. if (options.dumbTabs) options.tabMode = "spaces"; else if (options.normalTab) options.tabMode = "default"; if (options.cursorActivity) options.onCursorActivity = options.cursorActivity; var frame = this.frame = createHTMLElement("iframe"); if (options.iframeClass) frame.className = options.iframeClass; frame.frameBorder = 0; frame.style.border = "0"; frame.style.width = '100%'; frame.style.height = '100%'; // display: block occasionally suppresses some Firefox bugs, so we // always add it, redundant as it sounds. frame.style.display = "block"; var div = this.wrapping = createHTMLElement("div"); div.style.position = "relative"; div.className = "CodeMirror-wrapping"; div.style.width = options.width; div.style.height = (options.height == "dynamic") ? options.minHeight + "px" : options.height; // This is used by Editor.reroutePasteEvent var teHack = this.textareaHack = createHTMLElement("textarea"); div.appendChild(teHack); teHack.style.position = "absolute"; teHack.style.left = "-10000px"; teHack.style.width = "10px"; teHack.tabIndex = 100000; // Link back to this object, so that the editor can fetch options // and add a reference to itself. frame.CodeMirror = this; if (options.domain && internetExplorer) { this.html = frameHTML(options); frame.src = "javascript:(function(){document.open();" + (options.domain ? "document.domain=\"" + options.domain + "\";" : "") + "document.write(window.frameElement.CodeMirror.html);document.close();})()"; } else { frame.src = "javascript:;"; } if (place.appendChild) place.appendChild(div); else place(div); div.appendChild(frame); if (options.lineNumbers) this.lineNumbers = addLineNumberDiv(div, options.firstLineNumber); this.win = frame.contentWindow; if (!options.domain || !internetExplorer) { this.win.document.open(); this.win.document.write(frameHTML(options)); this.win.document.close(); } } CodeMirror.prototype = { init: function() { // Deprecated, but still supported. if (this.options.initCallback) this.options.initCallback(this); if (this.options.onLoad) this.options.onLoad(this); if (this.options.lineNumbers) this.activateLineNumbers(); if (this.options.reindentOnLoad) this.reindent(); if (this.options.height == "dynamic") this.setDynamicHeight(); }, getCode: function() {return this.editor.getCode();}, setCode: function(code) {this.editor.importCode(code);}, selection: function() {this.focusIfIE(); return this.editor.selectedText();}, reindent: function() {this.editor.reindent();}, reindentSelection: function() {this.focusIfIE(); this.editor.reindentSelection(null);}, focusIfIE: function() { // in IE, a lot of selection-related functionality only works when the frame is focused if (this.win.select.ie_selection && document.activeElement != this.frame) this.focus(); }, focus: function() { this.win.focus(); if (this.editor.selectionSnapshot) // IE hack this.win.select.setBookmark(this.win.document.body, this.editor.selectionSnapshot); }, replaceSelection: function(text) { this.focus(); this.editor.replaceSelection(text); return true; }, replaceChars: function(text, start, end) { this.editor.replaceChars(text, start, end); }, getSearchCursor: function(string, fromCursor, caseFold) { return this.editor.getSearchCursor(string, fromCursor, caseFold); }, undo: function() {this.editor.history.undo();}, redo: function() {this.editor.history.redo();}, historySize: function() {return this.editor.history.historySize();}, clearHistory: function() {this.editor.history.clear();}, grabKeys: function(callback, filter) {this.editor.grabKeys(callback, filter);}, ungrabKeys: function() {this.editor.ungrabKeys();}, setParser: function(name, parserConfig) {this.editor.setParser(name, parserConfig);}, setSpellcheck: function(on) {this.win.document.body.spellcheck = on;}, setStylesheet: function(names) { if (typeof names === "string") names = [names]; var activeStylesheets = {}; var matchedNames = {}; var links = this.win.document.getElementsByTagName("link"); // Create hashes of active stylesheets and matched names. // This is O(n^2) but n is expected to be very small. for (var x = 0, link; link = links[x]; x++) { if (link.rel.indexOf("stylesheet") !== -1) { for (var y = 0; y < names.length; y++) { var name = names[y]; if (link.href.substring(link.href.length - name.length) === name) { activeStylesheets[link.href] = true; matchedNames[name] = true; } } } } // Activate the selected stylesheets and disable the rest. for (var x = 0, link; link = links[x]; x++) { if (link.rel.indexOf("stylesheet") !== -1) { link.disabled = !(link.href in activeStylesheets); } } // Create any new stylesheets. for (var y = 0; y < names.length; y++) { var name = names[y]; if (!(name in matchedNames)) { var link = this.win.document.createElement("link"); link.rel = "stylesheet"; link.type = "text/css"; link.href = name; this.win.document.getElementsByTagName('head')[0].appendChild(link); } } }, setTextWrapping: function(on) { if (on == this.options.textWrapping) return; this.win.document.body.style.whiteSpace = on ? "" : "nowrap"; this.options.textWrapping = on; if (this.lineNumbers) { this.setLineNumbers(false); this.setLineNumbers(true); } }, setIndentUnit: function(unit) {this.win.indentUnit = unit;}, setUndoDepth: function(depth) {this.editor.history.maxDepth = depth;}, setTabMode: function(mode) {this.options.tabMode = mode;}, setEnterMode: function(mode) {this.options.enterMode = mode;}, setLineNumbers: function(on) { if (on && !this.lineNumbers) { this.lineNumbers = addLineNumberDiv(this.wrapping,this.options.firstLineNumber); this.activateLineNumbers(); } else if (!on && this.lineNumbers) { this.wrapping.removeChild(this.lineNumbers); this.wrapping.style.paddingLeft = ""; this.lineNumbers = null; } }, cursorPosition: function(start) {this.focusIfIE(); return this.editor.cursorPosition(start);}, firstLine: function() {return this.editor.firstLine();}, lastLine: function() {return this.editor.lastLine();}, nextLine: function(line) {return this.editor.nextLine(line);}, prevLine: function(line) {return this.editor.prevLine(line);}, lineContent: function(line) {return this.editor.lineContent(line);}, setLineContent: function(line, content) {this.editor.setLineContent(line, content);}, removeLine: function(line){this.editor.removeLine(line);}, insertIntoLine: function(line, position, content) {this.editor.insertIntoLine(line, position, content);}, selectLines: function(startLine, startOffset, endLine, endOffset) { this.win.focus(); this.editor.selectLines(startLine, startOffset, endLine, endOffset); }, nthLine: function(n) { var line = this.firstLine(); for (; n > 1 && line !== false; n--) line = this.nextLine(line); return line; }, lineNumber: function(line) { var num = 0; while (line !== false) { num++; line = this.prevLine(line); } return num; }, jumpToLine: function(line) { if (typeof line == "number") line = this.nthLine(line); this.selectLines(line, 0); this.win.focus(); }, currentLine: function() { // Deprecated, but still there for backward compatibility return this.lineNumber(this.cursorLine()); }, cursorLine: function() { return this.cursorPosition().line; }, cursorCoords: function(start) {return this.editor.cursorCoords(start);}, activateLineNumbers: function() { var frame = this.frame, win = frame.contentWindow, doc = win.document, body = doc.body, nums = this.lineNumbers, scroller = nums.firstChild, self = this; var barWidth = null; nums.onclick = function(e) { var handler = self.options.onLineNumberClick; if (handler) { var div = (e || window.event).target || (e || window.event).srcElement; var num = div == nums ? NaN : Number(div.innerHTML); if (!isNaN(num)) handler(num, div); } }; function sizeBar() { if (frame.offsetWidth == 0) return; for (var root = frame; root.parentNode; root = root.parentNode){} if (!nums.parentNode || root != document || !win.Editor) { // Clear event handlers (their nodes might already be collected, so try/catch) try{clear();}catch(e){} clearInterval(sizeInterval); return; } if (nums.offsetWidth != barWidth) { barWidth = nums.offsetWidth; frame.parentNode.style.paddingLeft = barWidth + "px"; } } function doScroll() { nums.scrollTop = body.scrollTop || doc.documentElement.scrollTop || 0; } // Cleanup function, registered by nonWrapping and wrapping. var clear = function(){}; sizeBar(); var sizeInterval = setInterval(sizeBar, 500); function ensureEnoughLineNumbers(fill) { var lineHeight = scroller.firstChild.offsetHeight; if (lineHeight == 0) return; var targetHeight = 50 + Math.max(body.offsetHeight, Math.max(frame.offsetHeight, body.scrollHeight || 0)), lastNumber = Math.ceil(targetHeight / lineHeight); for (var i = scroller.childNodes.length; i <= lastNumber; i++) { var div = createHTMLElement("div"); div.appendChild(document.createTextNode(fill ? String(i + self.options.firstLineNumber) : "\u00a0")); scroller.appendChild(div); } } function nonWrapping() { function update() { ensureEnoughLineNumbers(true); doScroll(); } self.updateNumbers = update; var onScroll = win.addEventHandler(win, "scroll", doScroll, true), onResize = win.addEventHandler(win, "resize", update, true); clear = function(){ onScroll(); onResize(); if (self.updateNumbers == update) self.updateNumbers = null; }; update(); } function wrapping() { var node, lineNum, next, pos, changes = [], styleNums = self.options.styleNumbers; function setNum(n, node) { // Does not typically happen (but can, if you mess with the // document during the numbering) if (!lineNum) lineNum = scroller.appendChild(createHTMLElement("div")); if (styleNums) styleNums(lineNum, node, n); // Changes are accumulated, so that the document layout // doesn't have to be recomputed during the pass changes.push(lineNum); changes.push(n); pos = lineNum.offsetHeight + lineNum.offsetTop; lineNum = lineNum.nextSibling; } function commitChanges() { for (var i = 0; i < changes.length; i += 2) changes[i].innerHTML = changes[i + 1]; changes = []; } function work() { if (!scroller.parentNode || scroller.parentNode != self.lineNumbers) return; var endTime = new Date().getTime() + self.options.lineNumberTime; while (node) { setNum(next++, node.previousSibling); for (; node && !win.isBR(node); node = node.nextSibling) { var bott = node.offsetTop + node.offsetHeight; while (scroller.offsetHeight && bott - 3 > pos) { var oldPos = pos; setNum("&nbsp;"); if (pos <= oldPos) break; } } if (node) node = node.nextSibling; if (new Date().getTime() > endTime) { commitChanges(); pending = setTimeout(work, self.options.lineNumberDelay); return; } } while (lineNum) setNum(next++); commitChanges(); doScroll(); } function start(firstTime) { doScroll(); ensureEnoughLineNumbers(firstTime); node = body.firstChild; lineNum = scroller.firstChild; pos = 0; next = self.options.firstLineNumber; work(); } start(true); var pending = null; function update() { if (pending) clearTimeout(pending); if (self.editor.allClean()) start(); else pending = setTimeout(update, 200); } self.updateNumbers = update; var onScroll = win.addEventHandler(win, "scroll", doScroll, true), onResize = win.addEventHandler(win, "resize", update, true); clear = function(){ if (pending) clearTimeout(pending); if (self.updateNumbers == update) self.updateNumbers = null; onScroll(); onResize(); }; } (this.options.textWrapping || this.options.styleNumbers ? wrapping : nonWrapping)(); }, setDynamicHeight: function() { var self = this, activity = self.options.onCursorActivity, win = self.win, body = win.document.body, lineHeight = null, timeout = null, vmargin = 2 * self.frame.offsetTop; body.style.overflowY = "hidden"; win.document.documentElement.style.overflowY = "hidden"; this.frame.scrolling = "no"; function updateHeight() { var trailingLines = 0, node = body.lastChild, computedHeight; while (node && win.isBR(node)) { if (!node.hackBR) trailingLines++; node = node.previousSibling; } if (node) { lineHeight = node.offsetHeight; computedHeight = node.offsetTop + (1 + trailingLines) * lineHeight; } else if (lineHeight) { computedHeight = trailingLines * lineHeight; } if (computedHeight) self.wrapping.style.height = Math.max(vmargin + computedHeight, self.options.minHeight) + "px"; } setTimeout(updateHeight, 300); self.options.onCursorActivity = function(x) { if (activity) activity(x); clearTimeout(timeout); timeout = setTimeout(updateHeight, 100); }; } }; CodeMirror.InvalidLineHandle = {toString: function(){return "CodeMirror.InvalidLineHandle";}}; CodeMirror.replace = function(element) { if (typeof element == "string") element = document.getElementById(element); return function(newElement) { element.parentNode.replaceChild(newElement, element); }; }; CodeMirror.fromTextArea = function(area, options) { if (typeof area == "string") area = document.getElementById(area); options = options || {}; if (area.style.width && options.width == null) options.width = area.style.width; if (area.style.height && options.height == null) options.height = area.style.height; if (options.content == null) options.content = area.value; function updateField() { area.value = mirror.getCode(); } if (area.form) { if (typeof area.form.addEventListener == "function") area.form.addEventListener("submit", updateField, false); else area.form.attachEvent("onsubmit", updateField); var realSubmit = area.form.submit; function wrapSubmit() { updateField(); // Can't use realSubmit.apply because IE6 is too stupid area.form.submit = realSubmit; area.form.submit(); area.form.submit = wrapSubmit; } area.form.submit = wrapSubmit; } function insert(frame) { if (area.nextSibling) area.parentNode.insertBefore(frame, area.nextSibling); else area.parentNode.appendChild(frame); } area.style.display = "none"; var mirror = new CodeMirror(insert, options); mirror.save = updateField; mirror.toTextArea = function() { updateField(); area.parentNode.removeChild(mirror.wrapping); area.style.display = ""; if (area.form) { area.form.submit = realSubmit; if (typeof area.form.removeEventListener == "function") area.form.removeEventListener("submit", updateField, false); else area.form.detachEvent("onsubmit", updateField); } }; return mirror; }; CodeMirror.isProbablySupported = function() { // This is rather awful, but can be useful. var match; if (window.opera) return Number(window.opera.version()) >= 9.52; else if (/Apple Computer, Inc/.test(navigator.vendor) && (match = navigator.userAgent.match(/Version\/(\d+(?:\.\d+)?)\./))) return Number(match[1]) >= 3; else if (document.selection && window.ActiveXObject && (match = navigator.userAgent.match(/MSIE (\d+(?:\.\d*)?)\b/))) return Number(match[1]) >= 6; else if (match = navigator.userAgent.match(/gecko\/(\d{8})/i)) return Number(match[1]) >= 20050901; else if (match = navigator.userAgent.match(/AppleWebKit\/(\d+)/)) return Number(match[1]) >= 525; else return null; }; return CodeMirror; })();
JavaScript
// Minimal framing needed to use CodeMirror-style parsers to highlight // code. Load this along with tokenize.js, stringstream.js, and your // parser. Then call highlightText, passing a string as the first // argument, and as the second argument either a callback function // that will be called with an array of SPAN nodes for every line in // the code, or a DOM node to which to append these spans, and // optionally (not needed if you only loaded one parser) a parser // object. // Stuff from util.js that the parsers are using. var StopIteration = {toString: function() {return "StopIteration"}}; var Editor = {}; var indentUnit = 2; (function(){ function normaliseString(string) { var tab = ""; for (var i = 0; i < indentUnit; i++) tab += " "; string = string.replace(/\t/g, tab).replace(/\u00a0/g, " ").replace(/\r\n?/g, "\n"); var pos = 0, parts = [], lines = string.split("\n"); for (var line = 0; line < lines.length; line++) { if (line != 0) parts.push("\n"); parts.push(lines[line]); } return { next: function() { if (pos < parts.length) return parts[pos++]; else throw StopIteration; } }; } window.highlightText = function(string, callback, parser) { parser = (parser || Editor.Parser).make(stringStream(normaliseString(string))); var line = []; if (callback.nodeType == 1) { var node = callback; callback = function(line) { for (var i = 0; i < line.length; i++) node.appendChild(line[i]); node.appendChild(document.createElement("br")); }; } try { while (true) { var token = parser.next(); if (token.value == "\n") { callback(line); line = []; } else { var span = document.createElement("span"); span.className = token.style; span.appendChild(document.createTextNode(token.value)); line.push(span); } } } catch (e) { if (e != StopIteration) throw e; } if (line.length) callback(line); } })();
JavaScript
/* The Editor object manages the content of the editable frame. It * catches events, colours nodes, and indents lines. This file also * holds some functions for transforming arbitrary DOM structures into * plain sequences of <span> and <br> elements */ var internetExplorer = document.selection && window.ActiveXObject && /MSIE/.test(navigator.userAgent); var webkit = /AppleWebKit/.test(navigator.userAgent); var safari = /Apple Computer, Inc/.test(navigator.vendor); var gecko = navigator.userAgent.match(/gecko\/(\d{8})/i); if (gecko) gecko = Number(gecko[1]); var mac = /Mac/.test(navigator.platform); // TODO this is related to the backspace-at-end-of-line bug. Remove // this if Opera gets their act together, make the version check more // broad if they don't. var brokenOpera = window.opera && /Version\/10.[56]/.test(navigator.userAgent); // TODO remove this once WebKit 533 becomes less common. var slowWebkit = /AppleWebKit\/533/.test(navigator.userAgent); // Make sure a string does not contain two consecutive 'collapseable' // whitespace characters. function makeWhiteSpace(n) { var buffer = [], nb = true; for (; n > 0; n--) { buffer.push((nb || n == 1) ? nbsp : " "); nb ^= true; } return buffer.join(""); } // Create a set of white-space characters that will not be collapsed // by the browser, but will not break text-wrapping either. function fixSpaces(string) { if (string.charAt(0) == " ") string = nbsp + string.slice(1); return string.replace(/\t/g, function() {return makeWhiteSpace(indentUnit);}) .replace(/[ \u00a0]{2,}/g, function(s) {return makeWhiteSpace(s.length);}); } function cleanText(text) { return text.replace(/\u00a0/g, " ").replace(/\u200b/g, ""); } // Create a SPAN node with the expected properties for document part // spans. function makePartSpan(value) { var text = value; if (value.nodeType == 3) text = value.nodeValue; else value = document.createTextNode(text); var span = document.createElement("span"); span.isPart = true; span.appendChild(value); span.currentText = text; return span; } function alwaysZero() {return 0;} // On webkit, when the last BR of the document does not have text // behind it, the cursor can not be put on the line after it. This // makes pressing enter at the end of the document occasionally do // nothing (or at least seem to do nothing). To work around it, this // function makes sure the document ends with a span containing a // zero-width space character. The traverseDOM iterator filters such // character out again, so that the parsers won't see them. This // function is called from a few strategic places to make sure the // zwsp is restored after the highlighting process eats it. var webkitLastLineHack = webkit ? function(container) { var last = container.lastChild; if (!last || !last.hackBR) { var br = document.createElement("br"); br.hackBR = true; container.appendChild(br); } } : function() {}; function asEditorLines(string) { var tab = makeWhiteSpace(indentUnit); return map(string.replace(/\t/g, tab).replace(/\u00a0/g, " ").replace(/\r\n?/g, "\n").split("\n"), fixSpaces); } var Editor = (function(){ // The HTML elements whose content should be suffixed by a newline // when converting them to flat text. var newlineElements = {"P": true, "DIV": true, "LI": true}; // Helper function for traverseDOM. Flattens an arbitrary DOM node // into an array of textnodes and <br> tags. function simplifyDOM(root, atEnd) { var result = []; var leaving = true; function simplifyNode(node, top) { if (node.nodeType == 3) { var text = node.nodeValue = fixSpaces(node.nodeValue.replace(/[\r\u200b]/g, "").replace(/\n/g, " ")); if (text.length) leaving = false; result.push(node); } else if (isBR(node) && node.childNodes.length == 0) { leaving = true; result.push(node); } else { for (var n = node.firstChild; n; n = n.nextSibling) simplifyNode(n); if (!leaving && newlineElements.hasOwnProperty(node.nodeName.toUpperCase())) { leaving = true; if (!atEnd || !top) result.push(document.createElement("br")); } } } simplifyNode(root, true); return result; } // Creates a MochiKit-style iterator that goes over a series of DOM // nodes. The values it yields are strings, the textual content of // the nodes. It makes sure that all nodes up to and including the // one whose text is being yielded have been 'normalized' to be just // <span> and <br> elements. function traverseDOM(start){ var nodeQueue = []; // Create a function that can be used to insert nodes after the // one given as argument. function pointAt(node){ var parent = node.parentNode; var next = node.nextSibling; return function(newnode) { parent.insertBefore(newnode, next); }; } var point = null; // This an Opera-specific hack -- always insert an empty span // between two BRs, because Opera's cursor code gets terribly // confused when the cursor is between two BRs. var afterBR = true; // Insert a normalized node at the current point. If it is a text // node, wrap it in a <span>, and give that span a currentText // property -- this is used to cache the nodeValue, because // directly accessing nodeValue is horribly slow on some browsers. // The dirty property is used by the highlighter to determine // which parts of the document have to be re-highlighted. function insertPart(part){ var text = "\n"; if (part.nodeType == 3) { select.snapshotChanged(); part = makePartSpan(part); text = part.currentText; afterBR = false; } else { if (afterBR && window.opera) point(makePartSpan("")); afterBR = true; } part.dirty = true; nodeQueue.push(part); point(part); return text; } // Extract the text and newlines from a DOM node, insert them into // the document, and return the textual content. Used to replace // non-normalized nodes. function writeNode(node, end) { var simplified = simplifyDOM(node, end); for (var i = 0; i < simplified.length; i++) simplified[i] = insertPart(simplified[i]); return simplified.join(""); } // Check whether a node is a normalized <span> element. function partNode(node){ if (node.isPart && node.childNodes.length == 1 && node.firstChild.nodeType == 3) { var text = node.firstChild.nodeValue; node.dirty = node.dirty || text != node.currentText; node.currentText = text; return !/[\n\t\r]/.test(node.currentText); } return false; } // Advance to next node, return string for current node. function next() { if (!start) throw StopIteration; var node = start; start = node.nextSibling; if (partNode(node)){ nodeQueue.push(node); afterBR = false; return node.currentText; } else if (isBR(node)) { if (afterBR && window.opera) node.parentNode.insertBefore(makePartSpan(""), node); nodeQueue.push(node); afterBR = true; return "\n"; } else { var end = !node.nextSibling; point = pointAt(node); removeElement(node); return writeNode(node, end); } } // MochiKit iterators are objects with a next function that // returns the next value or throws StopIteration when there are // no more values. return {next: next, nodes: nodeQueue}; } // Determine the text size of a processed node. function nodeSize(node) { return isBR(node) ? 1 : node.currentText.length; } // Search backwards through the top-level nodes until the next BR or // the start of the frame. function startOfLine(node) { while (node && !isBR(node)) node = node.previousSibling; return node; } function endOfLine(node, container) { if (!node) node = container.firstChild; else if (isBR(node)) node = node.nextSibling; while (node && !isBR(node)) node = node.nextSibling; return node; } function time() {return new Date().getTime();} // Client interface for searching the content of the editor. Create // these by calling CodeMirror.getSearchCursor. To use, call // findNext on the resulting object -- this returns a boolean // indicating whether anything was found, and can be called again to // skip to the next find. Use the select and replace methods to // actually do something with the found locations. function SearchCursor(editor, pattern, from, caseFold) { this.editor = editor; this.history = editor.history; this.history.commit(); this.valid = !!pattern; this.atOccurrence = false; if (caseFold == undefined) caseFold = typeof pattern == "string" && pattern == pattern.toLowerCase(); function getText(node){ var line = cleanText(editor.history.textAfter(node)); return (caseFold ? line.toLowerCase() : line); } var topPos = {node: null, offset: 0}, self = this; if (from && typeof from == "object" && typeof from.character == "number") { editor.checkLine(from.line); var pos = {node: from.line, offset: from.character}; this.pos = {from: pos, to: pos}; } else if (from) { this.pos = {from: select.cursorPos(editor.container, true) || topPos, to: select.cursorPos(editor.container, false) || topPos}; } else { this.pos = {from: topPos, to: topPos}; } if (typeof pattern != "string") { // Regexp match this.matches = function(reverse, node, offset) { if (reverse) { var line = getText(node).slice(0, offset), match = line.match(pattern), start = 0; while (match) { var ind = line.indexOf(match[0]); start += ind; line = line.slice(ind + 1); var newmatch = line.match(pattern); if (newmatch) match = newmatch; else break; } } else { var line = getText(node).slice(offset), match = line.match(pattern), start = match && offset + line.indexOf(match[0]); } if (match) { self.currentMatch = match; return {from: {node: node, offset: start}, to: {node: node, offset: start + match[0].length}}; } }; return; } if (caseFold) pattern = pattern.toLowerCase(); // Create a matcher function based on the kind of string we have. var target = pattern.split("\n"); this.matches = (target.length == 1) ? // For one-line strings, searching can be done simply by calling // indexOf or lastIndexOf on the current line. function(reverse, node, offset) { var line = getText(node), len = pattern.length, match; if (reverse ? (offset >= len && (match = line.lastIndexOf(pattern, offset - len)) != -1) : (match = line.indexOf(pattern, offset)) != -1) return {from: {node: node, offset: match}, to: {node: node, offset: match + len}}; } : // Multi-line strings require internal iteration over lines, and // some clunky checks to make sure the first match ends at the // end of the line and the last match starts at the start. function(reverse, node, offset) { var idx = (reverse ? target.length - 1 : 0), match = target[idx], line = getText(node); var offsetA = (reverse ? line.indexOf(match) + match.length : line.lastIndexOf(match)); if (reverse ? offsetA >= offset || offsetA != match.length : offsetA <= offset || offsetA != line.length - match.length) return; var pos = node; while (true) { if (reverse && !pos) return; pos = (reverse ? this.history.nodeBefore(pos) : this.history.nodeAfter(pos) ); if (!reverse && !pos) return; line = getText(pos); match = target[reverse ? --idx : ++idx]; if (idx > 0 && idx < target.length - 1) { if (line != match) return; else continue; } var offsetB = (reverse ? line.lastIndexOf(match) : line.indexOf(match) + match.length); if (reverse ? offsetB != line.length - match.length : offsetB != match.length) return; return {from: {node: reverse ? pos : node, offset: reverse ? offsetB : offsetA}, to: {node: reverse ? node : pos, offset: reverse ? offsetA : offsetB}}; } }; } SearchCursor.prototype = { findNext: function() {return this.find(false);}, findPrevious: function() {return this.find(true);}, find: function(reverse) { if (!this.valid) return false; var self = this, pos = reverse ? this.pos.from : this.pos.to, node = pos.node, offset = pos.offset; // Reset the cursor if the current line is no longer in the DOM tree. if (node && !node.parentNode) { node = null; offset = 0; } function savePosAndFail() { var pos = {node: node, offset: offset}; self.pos = {from: pos, to: pos}; self.atOccurrence = false; return false; } while (true) { if (this.pos = this.matches(reverse, node, offset)) { this.atOccurrence = true; return true; } if (reverse) { if (!node) return savePosAndFail(); node = this.history.nodeBefore(node); offset = this.history.textAfter(node).length; } else { var next = this.history.nodeAfter(node); if (!next) { offset = this.history.textAfter(node).length; return savePosAndFail(); } node = next; offset = 0; } } }, select: function() { if (this.atOccurrence) { select.setCursorPos(this.editor.container, this.pos.from, this.pos.to); select.scrollToCursor(this.editor.container); } }, replace: function(string) { if (this.atOccurrence) { var fragments = this.currentMatch; if (fragments) string = string.replace(/\\(\d)/, function(m, i){return fragments[i];}); var end = this.editor.replaceRange(this.pos.from, this.pos.to, string); this.pos.to = end; this.atOccurrence = false; } }, position: function() { if (this.atOccurrence) return {line: this.pos.from.node, character: this.pos.from.offset}; } }; // The Editor object is the main inside-the-iframe interface. function Editor(options) { this.options = options; window.indentUnit = options.indentUnit; var container = this.container = document.body; this.history = new UndoHistory(container, options.undoDepth, options.undoDelay, this); var self = this; if (!Editor.Parser) throw "No parser loaded."; if (options.parserConfig && Editor.Parser.configure) Editor.Parser.configure(options.parserConfig); if (!options.readOnly && !internetExplorer) select.setCursorPos(container, {node: null, offset: 0}); this.dirty = []; this.importCode(options.content || ""); this.history.onChange = options.onChange; if (!options.readOnly) { if (options.continuousScanning !== false) { this.scanner = this.documentScanner(options.passTime); this.delayScanning(); } function setEditable() { // Use contentEditable instead of designMode on IE, since designMode frames // can not run any scripts. It would be nice if we could use contentEditable // everywhere, but it is significantly flakier than designMode on every // single non-IE browser. if (document.body.contentEditable != undefined && internetExplorer) document.body.contentEditable = "true"; else document.designMode = "on"; // Work around issue where you have to click on the actual // body of the document to focus it in IE, making focusing // hard when the document is small. if (internetExplorer && options.height != "dynamic") document.body.style.minHeight = ( window.frameElement.clientHeight - 2 * document.body.offsetTop - 5) + "px"; document.documentElement.style.borderWidth = "0"; if (!options.textWrapping) container.style.whiteSpace = "nowrap"; } // If setting the frame editable fails, try again when the user // focus it (happens when the frame is not visible on // initialisation, in Firefox). try { setEditable(); } catch(e) { var focusEvent = addEventHandler(document, "focus", function() { focusEvent(); setEditable(); }, true); } addEventHandler(document, "keydown", method(this, "keyDown")); addEventHandler(document, "keypress", method(this, "keyPress")); addEventHandler(document, "keyup", method(this, "keyUp")); function cursorActivity() {self.cursorActivity(false);} addEventHandler(internetExplorer ? document.body : window, "mouseup", cursorActivity); addEventHandler(document.body, "cut", cursorActivity); // workaround for a gecko bug [?] where going forward and then // back again breaks designmode (no more cursor) if (gecko) addEventHandler(window, "pagehide", function(){self.unloaded = true;}); addEventHandler(document.body, "paste", function(event) { cursorActivity(); var text = null; try { var clipboardData = event.clipboardData || window.clipboardData; if (clipboardData) text = clipboardData.getData('Text'); } catch(e) {} if (text !== null) { event.stop(); self.replaceSelection(text); select.scrollToCursor(self.container); } }); if (this.options.autoMatchParens) addEventHandler(document.body, "click", method(this, "scheduleParenHighlight")); } else if (!options.textWrapping) { container.style.whiteSpace = "nowrap"; } } function isSafeKey(code) { return (code >= 16 && code <= 18) || // shift, control, alt (code >= 33 && code <= 40); // arrows, home, end } Editor.prototype = { // Import a piece of code into the editor. importCode: function(code) { var lines = asEditorLines(code), chunk = 1000; if (!this.options.incrementalLoading || lines.length < chunk) { this.history.push(null, null, lines); this.history.reset(); } else { var cur = 0, self = this; function addChunk() { var chunklines = lines.slice(cur, cur + chunk); chunklines.push(""); self.history.push(self.history.nodeBefore(null), null, chunklines); self.history.reset(); cur += chunk; if (cur < lines.length) parent.setTimeout(addChunk, 1000); } addChunk(); } }, // Extract the code from the editor. getCode: function() { if (!this.container.firstChild) return ""; var accum = []; select.markSelection(); forEach(traverseDOM(this.container.firstChild), method(accum, "push")); select.selectMarked(); // On webkit, don't count last (empty) line if the webkitLastLineHack BR is present if (webkit && this.container.lastChild.hackBR) accum.pop(); webkitLastLineHack(this.container); return cleanText(accum.join("")); }, checkLine: function(node) { if (node === false || !(node == null || node.parentNode == this.container || node.hackBR)) throw parent.CodeMirror.InvalidLineHandle; }, cursorPosition: function(start) { if (start == null) start = true; var pos = select.cursorPos(this.container, start); if (pos) return {line: pos.node, character: pos.offset}; else return {line: null, character: 0}; }, firstLine: function() { return null; }, lastLine: function() { var last = this.container.lastChild; if (last) last = startOfLine(last); if (last && last.hackBR) last = startOfLine(last.previousSibling); return last; }, nextLine: function(line) { this.checkLine(line); var end = endOfLine(line, this.container); if (!end || end.hackBR) return false; else return end; }, prevLine: function(line) { this.checkLine(line); if (line == null) return false; return startOfLine(line.previousSibling); }, visibleLineCount: function() { var line = this.container.firstChild; while (line && isBR(line)) line = line.nextSibling; // BR heights are unreliable if (!line) return false; var innerHeight = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight); return Math.floor(innerHeight / line.offsetHeight); }, selectLines: function(startLine, startOffset, endLine, endOffset) { this.checkLine(startLine); var start = {node: startLine, offset: startOffset}, end = null; if (endOffset !== undefined) { this.checkLine(endLine); end = {node: endLine, offset: endOffset}; } select.setCursorPos(this.container, start, end); select.scrollToCursor(this.container); }, lineContent: function(line) { var accum = []; for (line = line ? line.nextSibling : this.container.firstChild; line && !isBR(line); line = line.nextSibling) accum.push(nodeText(line)); return cleanText(accum.join("")); }, setLineContent: function(line, content) { this.history.commit(); this.replaceRange({node: line, offset: 0}, {node: line, offset: this.history.textAfter(line).length}, content); this.addDirtyNode(line); this.scheduleHighlight(); }, removeLine: function(line) { var node = line ? line.nextSibling : this.container.firstChild; while (node) { var next = node.nextSibling; removeElement(node); if (isBR(node)) break; node = next; } this.addDirtyNode(line); this.scheduleHighlight(); }, insertIntoLine: function(line, position, content) { var before = null; if (position == "end") { before = endOfLine(line, this.container); } else { for (var cur = line ? line.nextSibling : this.container.firstChild; cur; cur = cur.nextSibling) { if (position == 0) { before = cur; break; } var text = nodeText(cur); if (text.length > position) { before = cur.nextSibling; content = text.slice(0, position) + content + text.slice(position); removeElement(cur); break; } position -= text.length; } } var lines = asEditorLines(content); for (var i = 0; i < lines.length; i++) { if (i > 0) this.container.insertBefore(document.createElement("BR"), before); this.container.insertBefore(makePartSpan(lines[i]), before); } this.addDirtyNode(line); this.scheduleHighlight(); }, // Retrieve the selected text. selectedText: function() { var h = this.history; h.commit(); var start = select.cursorPos(this.container, true), end = select.cursorPos(this.container, false); if (!start || !end) return ""; if (start.node == end.node) return h.textAfter(start.node).slice(start.offset, end.offset); var text = [h.textAfter(start.node).slice(start.offset)]; for (var pos = h.nodeAfter(start.node); pos != end.node; pos = h.nodeAfter(pos)) text.push(h.textAfter(pos)); text.push(h.textAfter(end.node).slice(0, end.offset)); return cleanText(text.join("\n")); }, // Replace the selection with another piece of text. replaceSelection: function(text) { this.history.commit(); var start = select.cursorPos(this.container, true), end = select.cursorPos(this.container, false); if (!start || !end) return; end = this.replaceRange(start, end, text); select.setCursorPos(this.container, end); webkitLastLineHack(this.container); }, cursorCoords: function(start, internal) { var sel = select.cursorPos(this.container, start); if (!sel) return null; var off = sel.offset, node = sel.node, self = this; function measureFromNode(node, xOffset) { var y = -(document.body.scrollTop || document.documentElement.scrollTop || 0), x = -(document.body.scrollLeft || document.documentElement.scrollLeft || 0) + xOffset; forEach([node, internal ? null : window.frameElement], function(n) { while (n) {x += n.offsetLeft; y += n.offsetTop;n = n.offsetParent;} }); return {x: x, y: y, yBot: y + node.offsetHeight}; } function withTempNode(text, f) { var node = document.createElement("SPAN"); node.appendChild(document.createTextNode(text)); try {return f(node);} finally {if (node.parentNode) node.parentNode.removeChild(node);} } while (off) { node = node ? node.nextSibling : this.container.firstChild; var txt = nodeText(node); if (off < txt.length) return withTempNode(txt.substr(0, off), function(tmp) { tmp.style.position = "absolute"; tmp.style.visibility = "hidden"; tmp.className = node.className; self.container.appendChild(tmp); return measureFromNode(node, tmp.offsetWidth); }); off -= txt.length; } if (node && isSpan(node)) return measureFromNode(node, node.offsetWidth); else if (node && node.nextSibling && isSpan(node.nextSibling)) return measureFromNode(node.nextSibling, 0); else return withTempNode("\u200b", function(tmp) { if (node) node.parentNode.insertBefore(tmp, node.nextSibling); else self.container.insertBefore(tmp, self.container.firstChild); return measureFromNode(tmp, 0); }); }, reroutePasteEvent: function() { if (this.capturingPaste || window.opera || (gecko && gecko >= 20101026)) return; this.capturingPaste = true; var te = window.frameElement.CodeMirror.textareaHack; var coords = this.cursorCoords(true, true); te.style.top = coords.y + "px"; if (internetExplorer) { var snapshot = select.getBookmark(this.container); if (snapshot) this.selectionSnapshot = snapshot; } parent.focus(); te.value = ""; te.focus(); var self = this; parent.setTimeout(function() { self.capturingPaste = false; window.focus(); if (self.selectionSnapshot) // IE hack window.select.setBookmark(self.container, self.selectionSnapshot); var text = te.value; if (text) { self.replaceSelection(text); select.scrollToCursor(self.container); } }, 10); }, replaceRange: function(from, to, text) { var lines = asEditorLines(text); lines[0] = this.history.textAfter(from.node).slice(0, from.offset) + lines[0]; var lastLine = lines[lines.length - 1]; lines[lines.length - 1] = lastLine + this.history.textAfter(to.node).slice(to.offset); var end = this.history.nodeAfter(to.node); this.history.push(from.node, end, lines); return {node: this.history.nodeBefore(end), offset: lastLine.length}; }, getSearchCursor: function(string, fromCursor, caseFold) { return new SearchCursor(this, string, fromCursor, caseFold); }, // Re-indent the whole buffer reindent: function() { if (this.container.firstChild) this.indentRegion(null, this.container.lastChild); }, reindentSelection: function(direction) { if (!select.somethingSelected()) { this.indentAtCursor(direction); } else { var start = select.selectionTopNode(this.container, true), end = select.selectionTopNode(this.container, false); if (start === false || end === false) return; this.indentRegion(start, end, direction); } }, grabKeys: function(eventHandler, filter) { this.frozen = eventHandler; this.keyFilter = filter; }, ungrabKeys: function() { this.frozen = "leave"; }, setParser: function(name, parserConfig) { Editor.Parser = window[name]; parserConfig = parserConfig || this.options.parserConfig; if (parserConfig && Editor.Parser.configure) Editor.Parser.configure(parserConfig); if (this.container.firstChild) { forEach(this.container.childNodes, function(n) { if (n.nodeType != 3) n.dirty = true; }); this.addDirtyNode(this.firstChild); this.scheduleHighlight(); } }, // Intercept enter and tab, and assign their new functions. keyDown: function(event) { if (this.frozen == "leave") {this.frozen = null; this.keyFilter = null;} if (this.frozen && (!this.keyFilter || this.keyFilter(event.keyCode, event))) { event.stop(); this.frozen(event); return; } var code = event.keyCode; // Don't scan when the user is typing. this.delayScanning(); // Schedule a paren-highlight event, if configured. if (this.options.autoMatchParens) this.scheduleParenHighlight(); // The various checks for !altKey are there because AltGr sets both // ctrlKey and altKey to true, and should not be recognised as // Control. if (code == 13) { // enter if (event.ctrlKey && !event.altKey) { this.reparseBuffer(); } else { select.insertNewlineAtCursor(); var mode = this.options.enterMode; if (mode != "flat") this.indentAtCursor(mode == "keep" ? "keep" : undefined); select.scrollToCursor(this.container); } event.stop(); } else if (code == 9 && this.options.tabMode != "default" && !event.ctrlKey) { // tab this.handleTab(!event.shiftKey); event.stop(); } else if (code == 32 && event.shiftKey && this.options.tabMode == "default") { // space this.handleTab(true); event.stop(); } else if (code == 36 && !event.shiftKey && !event.ctrlKey) { // home if (this.home()) event.stop(); } else if (code == 35 && !event.shiftKey && !event.ctrlKey) { // end if (this.end()) event.stop(); } // Only in Firefox is the default behavior for PgUp/PgDn correct. else if (code == 33 && !event.shiftKey && !event.ctrlKey && !gecko) { // PgUp if (this.pageUp()) event.stop(); } else if (code == 34 && !event.shiftKey && !event.ctrlKey && !gecko) { // PgDn if (this.pageDown()) event.stop(); } else if ((code == 219 || code == 221) && event.ctrlKey && !event.altKey) { // [, ] this.highlightParens(event.shiftKey, true); event.stop(); } else if (event.metaKey && !event.shiftKey && (code == 37 || code == 39)) { // Meta-left/right var cursor = select.selectionTopNode(this.container); if (cursor === false || !this.container.firstChild) return; if (code == 37) select.focusAfterNode(startOfLine(cursor), this.container); else { var end = endOfLine(cursor, this.container); select.focusAfterNode(end ? end.previousSibling : this.container.lastChild, this.container); } event.stop(); } else if ((event.ctrlKey || event.metaKey) && !event.altKey) { if ((event.shiftKey && code == 90) || code == 89) { // shift-Z, Y select.scrollToNode(this.history.redo()); event.stop(); } else if (code == 90 || (safari && code == 8)) { // Z, backspace select.scrollToNode(this.history.undo()); event.stop(); } else if (code == 83 && this.options.saveFunction) { // S this.options.saveFunction(); event.stop(); } else if (code == 86 && !mac) { // V this.reroutePasteEvent(); } } }, // Check for characters that should re-indent the current line, // and prevent Opera from handling enter and tab anyway. keyPress: function(event) { var electric = this.options.electricChars && Editor.Parser.electricChars, self = this; // Hack for Opera, and Firefox on OS X, in which stopping a // keydown event does not prevent the associated keypress event // from happening, so we have to cancel enter and tab again // here. if ((this.frozen && (!this.keyFilter || this.keyFilter(event.keyCode || event.code, event))) || event.code == 13 || (event.code == 9 && this.options.tabMode != "default") || (event.code == 32 && event.shiftKey && this.options.tabMode == "default")) event.stop(); else if (mac && (event.ctrlKey || event.metaKey) && event.character == "v") { this.reroutePasteEvent(); } else if (electric && electric.indexOf(event.character) != -1) parent.setTimeout(function(){self.indentAtCursor(null);}, 0); // Work around a bug where pressing backspace at the end of a // line, or delete at the start, often causes the cursor to jump // to the start of the line in Opera 10.60. else if (brokenOpera) { if (event.code == 8) { // backspace var sel = select.selectionTopNode(this.container), self = this, next = sel ? sel.nextSibling : this.container.firstChild; if (sel !== false && next && isBR(next)) parent.setTimeout(function(){ if (select.selectionTopNode(self.container) == next) select.focusAfterNode(next.previousSibling, self.container); }, 20); } else if (event.code == 46) { // delete var sel = select.selectionTopNode(this.container), self = this; if (sel && isBR(sel)) { parent.setTimeout(function(){ if (select.selectionTopNode(self.container) != sel) select.focusAfterNode(sel, self.container); }, 20); } } } // In 533.* WebKit versions, when the document is big, typing // something at the end of a line causes the browser to do some // kind of stupid heavy operation, creating delays of several // seconds before the typed characters appear. This very crude // hack inserts a temporary zero-width space after the cursor to // make it not be at the end of the line. else if (slowWebkit) { var sel = select.selectionTopNode(this.container), next = sel ? sel.nextSibling : this.container.firstChild; // Doesn't work on empty lines, for some reason those always // trigger the delay. if (sel && next && isBR(next) && !isBR(sel)) { var cheat = document.createTextNode("\u200b"); this.container.insertBefore(cheat, next); parent.setTimeout(function() { if (cheat.nodeValue == "\u200b") removeElement(cheat); else cheat.nodeValue = cheat.nodeValue.replace("\u200b", ""); }, 20); } } // Magic incantation that works abound a webkit bug when you // can't type on a blank line following a line that's wider than // the window. if (webkit && !this.options.textWrapping) setTimeout(function () { var node = select.selectionTopNode(self.container, true); if (node && node.nodeType == 3 && node.previousSibling && isBR(node.previousSibling) && node.nextSibling && isBR(node.nextSibling)) node.parentNode.replaceChild(document.createElement("BR"), node.previousSibling); }, 50); }, // Mark the node at the cursor dirty when a non-safe key is // released. keyUp: function(event) { this.cursorActivity(isSafeKey(event.keyCode)); }, // Indent the line following a given <br>, or null for the first // line. If given a <br> element, this must have been highlighted // so that it has an indentation method. Returns the whitespace // element that has been modified or created (if any). indentLineAfter: function(start, direction) { function whiteSpaceAfter(node) { var ws = node ? node.nextSibling : self.container.firstChild; if (!ws || !hasClass(ws, "whitespace")) return null; return ws; } // whiteSpace is the whitespace span at the start of the line, // or null if there is no such node. var self = this, whiteSpace = whiteSpaceAfter(start); var newIndent = 0, curIndent = whiteSpace ? whiteSpace.currentText.length : 0; var firstText = whiteSpace ? whiteSpace.nextSibling : (start ? start.nextSibling : this.container.firstChild); if (direction == "keep") { if (start) { var prevWS = whiteSpaceAfter(startOfLine(start.previousSibling)) if (prevWS) newIndent = prevWS.currentText.length; } } else { // Sometimes the start of the line can influence the correct // indentation, so we retrieve it. var nextChars = (start && firstText && firstText.currentText) ? firstText.currentText : ""; // Ask the lexical context for the correct indentation, and // compute how much this differs from the current indentation. if (direction != null && this.options.tabMode == "shift") newIndent = direction ? curIndent + indentUnit : Math.max(0, curIndent - indentUnit) else if (start) newIndent = start.indentation(nextChars, curIndent, direction, firstText); else if (Editor.Parser.firstIndentation) newIndent = Editor.Parser.firstIndentation(nextChars, curIndent, direction, firstText); } var indentDiff = newIndent - curIndent; // If there is too much, this is just a matter of shrinking a span. if (indentDiff < 0) { if (newIndent == 0) { if (firstText) select.snapshotMove(whiteSpace.firstChild, firstText.firstChild || firstText, 0); removeElement(whiteSpace); whiteSpace = null; } else { select.snapshotMove(whiteSpace.firstChild, whiteSpace.firstChild, indentDiff, true); whiteSpace.currentText = makeWhiteSpace(newIndent); whiteSpace.firstChild.nodeValue = whiteSpace.currentText; } } // Not enough... else if (indentDiff > 0) { // If there is whitespace, we grow it. if (whiteSpace) { whiteSpace.currentText = makeWhiteSpace(newIndent); whiteSpace.firstChild.nodeValue = whiteSpace.currentText; select.snapshotMove(whiteSpace.firstChild, whiteSpace.firstChild, indentDiff, true); } // Otherwise, we have to add a new whitespace node. else { whiteSpace = makePartSpan(makeWhiteSpace(newIndent)); whiteSpace.className = "whitespace"; if (start) insertAfter(whiteSpace, start); else this.container.insertBefore(whiteSpace, this.container.firstChild); select.snapshotMove(firstText && (firstText.firstChild || firstText), whiteSpace.firstChild, newIndent, false, true); } } // Make sure cursor ends up after the whitespace else if (whiteSpace) { select.snapshotMove(whiteSpace.firstChild, whiteSpace.firstChild, newIndent, false); } if (indentDiff != 0) this.addDirtyNode(start); }, // Re-highlight the selected part of the document. highlightAtCursor: function() { var pos = select.selectionTopNode(this.container, true); var to = select.selectionTopNode(this.container, false); if (pos === false || to === false) return false; select.markSelection(); if (this.highlight(pos, endOfLine(to, this.container), true, 20) === false) return false; select.selectMarked(); return true; }, // When tab is pressed with text selected, the whole selection is // re-indented, when nothing is selected, the line with the cursor // is re-indented. handleTab: function(direction) { if (this.options.tabMode == "spaces") select.insertTabAtCursor(); else this.reindentSelection(direction); }, // Custom home behaviour that doesn't land the cursor in front of // leading whitespace unless pressed twice. home: function() { var cur = select.selectionTopNode(this.container, true), start = cur; if (cur === false || !(!cur || cur.isPart || isBR(cur)) || !this.container.firstChild) return false; while (cur && !isBR(cur)) cur = cur.previousSibling; var next = cur ? cur.nextSibling : this.container.firstChild; if (next && next != start && next.isPart && hasClass(next, "whitespace")) select.focusAfterNode(next, this.container); else select.focusAfterNode(cur, this.container); select.scrollToCursor(this.container); return true; }, // Some browsers (Opera) don't manage to handle the end key // properly in the face of vertical scrolling. end: function() { var cur = select.selectionTopNode(this.container, true); if (cur === false) return false; cur = endOfLine(cur, this.container); if (!cur) return false; select.focusAfterNode(cur.previousSibling, this.container); select.scrollToCursor(this.container); return true; }, pageUp: function() { var line = this.cursorPosition().line, scrollAmount = this.visibleLineCount(); if (line === false || scrollAmount === false) return false; // Try to keep one line on the screen. scrollAmount -= 2; for (var i = 0; i < scrollAmount; i++) { line = this.prevLine(line); if (line === false) break; } if (i == 0) return false; // Already at first line select.setCursorPos(this.container, {node: line, offset: 0}); select.scrollToCursor(this.container); return true; }, pageDown: function() { var line = this.cursorPosition().line, scrollAmount = this.visibleLineCount(); if (line === false || scrollAmount === false) return false; // Try to move to the last line of the current page. scrollAmount -= 2; for (var i = 0; i < scrollAmount; i++) { var nextLine = this.nextLine(line); if (nextLine === false) break; line = nextLine; } if (i == 0) return false; // Already at last line select.setCursorPos(this.container, {node: line, offset: 0}); select.scrollToCursor(this.container); return true; }, // Delay (or initiate) the next paren highlight event. scheduleParenHighlight: function() { if (this.parenEvent) parent.clearTimeout(this.parenEvent); var self = this; this.parenEvent = parent.setTimeout(function(){self.highlightParens();}, 300); }, // Take the token before the cursor. If it contains a character in // '()[]{}', search for the matching paren/brace/bracket, and // highlight them in green for a moment, or red if no proper match // was found. highlightParens: function(jump, fromKey) { var self = this, mark = this.options.markParen; if (typeof mark == "string") mark = [mark, mark]; // give the relevant nodes a colour. function highlight(node, ok) { if (!node) return; if (!mark) { node.style.fontWeight = "bold"; node.style.color = ok ? "#8F8" : "#F88"; } else if (mark.call) mark(node, ok); else node.className += " " + mark[ok ? 0 : 1]; } function unhighlight(node) { if (!node) return; if (mark && !mark.call) removeClass(removeClass(node, mark[0]), mark[1]); else if (self.options.unmarkParen) self.options.unmarkParen(node); else { node.style.fontWeight = ""; node.style.color = ""; } } if (!fromKey && self.highlighted) { unhighlight(self.highlighted[0]); unhighlight(self.highlighted[1]); } if (!window || !window.parent || !window.select) return; // Clear the event property. if (this.parenEvent) parent.clearTimeout(this.parenEvent); this.parenEvent = null; // Extract a 'paren' from a piece of text. function paren(node) { if (node.currentText) { var match = node.currentText.match(/^[\s\u00a0]*([\(\)\[\]{}])[\s\u00a0]*$/); return match && match[1]; } } // Determine the direction a paren is facing. function forward(ch) { return /[\(\[\{]/.test(ch); } var ch, cursor = select.selectionTopNode(this.container, true); if (!cursor || !this.highlightAtCursor()) return; cursor = select.selectionTopNode(this.container, true); if (!(cursor && ((ch = paren(cursor)) || (cursor = cursor.nextSibling) && (ch = paren(cursor))))) return; // We only look for tokens with the same className. var className = cursor.className, dir = forward(ch), match = matching[ch]; // Since parts of the document might not have been properly // highlighted, and it is hard to know in advance which part we // have to scan, we just try, and when we find dirty nodes we // abort, parse them, and re-try. function tryFindMatch() { var stack = [], ch, ok = true; for (var runner = cursor; runner; runner = dir ? runner.nextSibling : runner.previousSibling) { if (runner.className == className && isSpan(runner) && (ch = paren(runner))) { if (forward(ch) == dir) stack.push(ch); else if (!stack.length) ok = false; else if (stack.pop() != matching[ch]) ok = false; if (!stack.length) break; } else if (runner.dirty || !isSpan(runner) && !isBR(runner)) { return {node: runner, status: "dirty"}; } } return {node: runner, status: runner && ok}; } while (true) { var found = tryFindMatch(); if (found.status == "dirty") { this.highlight(found.node, endOfLine(found.node)); // Needed because in some corner cases a highlight does not // reach a node. found.node.dirty = false; continue; } else { highlight(cursor, found.status); highlight(found.node, found.status); if (fromKey) parent.setTimeout(function() {unhighlight(cursor); unhighlight(found.node);}, 500); else self.highlighted = [cursor, found.node]; if (jump && found.node) select.focusAfterNode(found.node.previousSibling, this.container); break; } } }, // Adjust the amount of whitespace at the start of the line that // the cursor is on so that it is indented properly. indentAtCursor: function(direction) { if (!this.container.firstChild) return; // The line has to have up-to-date lexical information, so we // highlight it first. if (!this.highlightAtCursor()) return; var cursor = select.selectionTopNode(this.container, false); // If we couldn't determine the place of the cursor, // there's nothing to indent. if (cursor === false) return; select.markSelection(); this.indentLineAfter(startOfLine(cursor), direction); select.selectMarked(); }, // Indent all lines whose start falls inside of the current // selection. indentRegion: function(start, end, direction) { var current = (start = startOfLine(start)), before = start && startOfLine(start.previousSibling); if (!isBR(end)) end = endOfLine(end, this.container); this.addDirtyNode(start); do { var next = endOfLine(current, this.container); if (current) this.highlight(before, next, true); this.indentLineAfter(current, direction); before = current; current = next; } while (current != end); select.setCursorPos(this.container, {node: start, offset: 0}, {node: end, offset: 0}); }, // Find the node that the cursor is in, mark it as dirty, and make // sure a highlight pass is scheduled. cursorActivity: function(safe) { // pagehide event hack above if (this.unloaded) { window.document.designMode = "off"; window.document.designMode = "on"; this.unloaded = false; } if (internetExplorer) { this.container.createTextRange().execCommand("unlink"); clearTimeout(this.saveSelectionSnapshot); var self = this; this.saveSelectionSnapshot = setTimeout(function() { var snapshot = select.getBookmark(self.container); if (snapshot) self.selectionSnapshot = snapshot; }, 200); } var activity = this.options.onCursorActivity; if (!safe || activity) { var cursor = select.selectionTopNode(this.container, false); if (cursor === false || !this.container.firstChild) return; cursor = cursor || this.container.firstChild; if (activity) activity(cursor); if (!safe) { this.scheduleHighlight(); this.addDirtyNode(cursor); } } }, reparseBuffer: function() { forEach(this.container.childNodes, function(node) {node.dirty = true;}); if (this.container.firstChild) this.addDirtyNode(this.container.firstChild); }, // Add a node to the set of dirty nodes, if it isn't already in // there. addDirtyNode: function(node) { node = node || this.container.firstChild; if (!node) return; for (var i = 0; i < this.dirty.length; i++) if (this.dirty[i] == node) return; if (node.nodeType != 3) node.dirty = true; this.dirty.push(node); }, allClean: function() { return !this.dirty.length; }, // Cause a highlight pass to happen in options.passDelay // milliseconds. Clear the existing timeout, if one exists. This // way, the passes do not happen while the user is typing, and // should as unobtrusive as possible. scheduleHighlight: function() { // Timeouts are routed through the parent window, because on // some browsers designMode windows do not fire timeouts. var self = this; parent.clearTimeout(this.highlightTimeout); this.highlightTimeout = parent.setTimeout(function(){self.highlightDirty();}, this.options.passDelay); }, // Fetch one dirty node, and remove it from the dirty set. getDirtyNode: function() { while (this.dirty.length > 0) { var found = this.dirty.pop(); // IE8 sometimes throws an unexplainable 'invalid argument' // exception for found.parentNode try { // If the node has been coloured in the meantime, or is no // longer in the document, it should not be returned. while (found && found.parentNode != this.container) found = found.parentNode; if (found && (found.dirty || found.nodeType == 3)) return found; } catch (e) {} } return null; }, // Pick dirty nodes, and highlight them, until options.passTime // milliseconds have gone by. The highlight method will continue // to next lines as long as it finds dirty nodes. It returns // information about the place where it stopped. If there are // dirty nodes left after this function has spent all its lines, // it shedules another highlight to finish the job. highlightDirty: function(force) { // Prevent FF from raising an error when it is firing timeouts // on a page that's no longer loaded. if (!window || !window.parent || !window.select) return false; if (!this.options.readOnly) select.markSelection(); var start, endTime = force ? null : time() + this.options.passTime; while ((time() < endTime || force) && (start = this.getDirtyNode())) { var result = this.highlight(start, endTime); if (result && result.node && result.dirty) this.addDirtyNode(result.node.nextSibling); } if (!this.options.readOnly) select.selectMarked(); if (start) this.scheduleHighlight(); return this.dirty.length == 0; }, // Creates a function that, when called through a timeout, will // continuously re-parse the document. documentScanner: function(passTime) { var self = this, pos = null; return function() { // FF timeout weirdness workaround. if (!window || !window.parent || !window.select) return; // If the current node is no longer in the document... oh // well, we start over. if (pos && pos.parentNode != self.container) pos = null; select.markSelection(); var result = self.highlight(pos, time() + passTime, true); select.selectMarked(); var newPos = result ? (result.node && result.node.nextSibling) : null; pos = (pos == newPos) ? null : newPos; self.delayScanning(); }; }, // Starts the continuous scanning process for this document after // a given interval. delayScanning: function() { if (this.scanner) { parent.clearTimeout(this.documentScan); this.documentScan = parent.setTimeout(this.scanner, this.options.continuousScanning); } }, // The function that does the actual highlighting/colouring (with // help from the parser and the DOM normalizer). Its interface is // rather overcomplicated, because it is used in different // situations: ensuring that a certain line is highlighted, or // highlighting up to X milliseconds starting from a certain // point. The 'from' argument gives the node at which it should // start. If this is null, it will start at the beginning of the // document. When a timestamp is given with the 'target' argument, // it will stop highlighting at that time. If this argument holds // a DOM node, it will highlight until it reaches that node. If at // any time it comes across two 'clean' lines (no dirty nodes), it // will stop, except when 'cleanLines' is true. maxBacktrack is // the maximum number of lines to backtrack to find an existing // parser instance. This is used to give up in situations where a // highlight would take too long and freeze the browser interface. highlight: function(from, target, cleanLines, maxBacktrack){ var container = this.container, self = this, active = this.options.activeTokens; var endTime = (typeof target == "number" ? target : null); if (!container.firstChild) return false; // Backtrack to the first node before from that has a partial // parse stored. while (from && (!from.parserFromHere || from.dirty)) { if (maxBacktrack != null && isBR(from) && (--maxBacktrack) < 0) return false; from = from.previousSibling; } // If we are at the end of the document, do nothing. if (from && !from.nextSibling) return false; // Check whether a part (<span> node) and the corresponding token // match. function correctPart(token, part){ return !part.reduced && part.currentText == token.value && part.className == token.style; } // Shorten the text associated with a part by chopping off // characters from the front. Note that only the currentText // property gets changed. For efficiency reasons, we leave the // nodeValue alone -- we set the reduced flag to indicate that // this part must be replaced. function shortenPart(part, minus){ part.currentText = part.currentText.substring(minus); part.reduced = true; } // Create a part corresponding to a given token. function tokenPart(token){ var part = makePartSpan(token.value); part.className = token.style; return part; } function maybeTouch(node) { if (node) { var old = node.oldNextSibling; if (lineDirty || old === undefined || node.nextSibling != old) self.history.touch(node); node.oldNextSibling = node.nextSibling; } else { var old = self.container.oldFirstChild; if (lineDirty || old === undefined || self.container.firstChild != old) self.history.touch(null); self.container.oldFirstChild = self.container.firstChild; } } // Get the token stream. If from is null, we start with a new // parser from the start of the frame, otherwise a partial parse // is resumed. var traversal = traverseDOM(from ? from.nextSibling : container.firstChild), stream = stringStream(traversal), parsed = from ? from.parserFromHere(stream) : Editor.Parser.make(stream); function surroundedByBRs(node) { return (node.previousSibling == null || isBR(node.previousSibling)) && (node.nextSibling == null || isBR(node.nextSibling)); } // parts is an interface to make it possible to 'delay' fetching // the next DOM node until we are completely done with the one // before it. This is necessary because often the next node is // not yet available when we want to proceed past the current // one. var parts = { current: null, // Fetch current node. get: function(){ if (!this.current) this.current = traversal.nodes.shift(); return this.current; }, // Advance to the next part (do not fetch it yet). next: function(){ this.current = null; }, // Remove the current part from the DOM tree, and move to the // next. remove: function(){ container.removeChild(this.get()); this.current = null; }, // Advance to the next part that is not empty, discarding empty // parts. getNonEmpty: function(){ var part = this.get(); // Allow empty nodes when they are alone on a line, needed // for the FF cursor bug workaround (see select.js, // insertNewlineAtCursor). while (part && isSpan(part) && part.currentText == "") { // Leave empty nodes that are alone on a line alone in // Opera, since that browsers doesn't deal well with // having 2 BRs in a row. if (window.opera && surroundedByBRs(part)) { this.next(); part = this.get(); } else { var old = part; this.remove(); part = this.get(); // Adjust selection information, if any. See select.js for details. select.snapshotMove(old.firstChild, part && (part.firstChild || part), 0); } } return part; } }; var lineDirty = false, prevLineDirty = true, lineNodes = 0; // This forEach loops over the tokens from the parsed stream, and // at the same time uses the parts object to proceed through the // corresponding DOM nodes. forEach(parsed, function(token){ var part = parts.getNonEmpty(); if (token.value == "\n"){ // The idea of the two streams actually staying synchronized // is such a long shot that we explicitly check. if (!isBR(part)) throw "Parser out of sync. Expected BR."; if (part.dirty || !part.indentation) lineDirty = true; maybeTouch(from); from = part; // Every <br> gets a copy of the parser state and a lexical // context assigned to it. The first is used to be able to // later resume parsing from this point, the second is used // for indentation. part.parserFromHere = parsed.copy(); part.indentation = token.indentation || alwaysZero; part.dirty = false; // If the target argument wasn't an integer, go at least // until that node. if (endTime == null && part == target) throw StopIteration; // A clean line with more than one node means we are done. // Throwing a StopIteration is the way to break out of a // MochiKit forEach loop. if ((endTime != null && time() >= endTime) || (!lineDirty && !prevLineDirty && lineNodes > 1 && !cleanLines)) throw StopIteration; prevLineDirty = lineDirty; lineDirty = false; lineNodes = 0; parts.next(); } else { if (!isSpan(part)) throw "Parser out of sync. Expected SPAN."; if (part.dirty) lineDirty = true; lineNodes++; // If the part matches the token, we can leave it alone. if (correctPart(token, part)){ if (active && part.dirty) active(part, token, self); part.dirty = false; parts.next(); } // Otherwise, we have to fix it. else { lineDirty = true; // Insert the correct part. var newPart = tokenPart(token); container.insertBefore(newPart, part); if (active) active(newPart, token, self); var tokensize = token.value.length; var offset = 0; // Eat up parts until the text for this token has been // removed, adjusting the stored selection info (see // select.js) in the process. while (tokensize > 0) { part = parts.get(); var partsize = part.currentText.length; select.snapshotReplaceNode(part.firstChild, newPart.firstChild, tokensize, offset); if (partsize > tokensize){ shortenPart(part, tokensize); tokensize = 0; } else { tokensize -= partsize; offset += partsize; parts.remove(); } } } } }); maybeTouch(from); webkitLastLineHack(this.container); // The function returns some status information that is used by // hightlightDirty to determine whether and where it has to // continue. return {node: parts.getNonEmpty(), dirty: lineDirty}; } }; return Editor; })(); addEventHandler(window, "load", function() { var CodeMirror = window.frameElement.CodeMirror; var e = CodeMirror.editor = new Editor(CodeMirror.options); parent.setTimeout(method(CodeMirror, "init"), 0); });
JavaScript
/* String streams are the things fed to parsers (which can feed them * to a tokenizer if they want). They provide peek and next methods * for looking at the current character (next 'consumes' this * character, peek does not), and a get method for retrieving all the * text that was consumed since the last time get was called. * * An easy mistake to make is to let a StopIteration exception finish * the token stream while there are still characters pending in the * string stream (hitting the end of the buffer while parsing a * token). To make it easier to detect such errors, the stringstreams * throw an exception when this happens. */ // Make a stringstream stream out of an iterator that returns strings. // This is applied to the result of traverseDOM (see codemirror.js), // and the resulting stream is fed to the parser. var stringStream = function(source){ // String that's currently being iterated over. var current = ""; // Position in that string. var pos = 0; // Accumulator for strings that have been iterated over but not // get()-ed yet. var accum = ""; // Make sure there are more characters ready, or throw // StopIteration. function ensureChars() { while (pos == current.length) { accum += current; current = ""; // In case source.next() throws pos = 0; try {current = source.next();} catch (e) { if (e != StopIteration) throw e; else return false; } } return true; } return { // peek: -> character // Return the next character in the stream. peek: function() { if (!ensureChars()) return null; return current.charAt(pos); }, // next: -> character // Get the next character, throw StopIteration if at end, check // for unused content. next: function() { if (!ensureChars()) { if (accum.length > 0) throw "End of stringstream reached without emptying buffer ('" + accum + "')."; else throw StopIteration; } return current.charAt(pos++); }, // get(): -> string // Return the characters iterated over since the last call to // .get(). get: function() { var temp = accum; accum = ""; if (pos > 0){ temp += current.slice(0, pos); current = current.slice(pos); pos = 0; } return temp; }, // Push a string back into the stream. push: function(str) { current = current.slice(0, pos) + str + current.slice(pos); }, lookAhead: function(str, consume, skipSpaces, caseInsensitive) { function cased(str) {return caseInsensitive ? str.toLowerCase() : str;} str = cased(str); var found = false; var _accum = accum, _pos = pos; if (skipSpaces) this.nextWhileMatches(/[\s\u00a0]/); while (true) { var end = pos + str.length, left = current.length - pos; if (end <= current.length) { found = str == cased(current.slice(pos, end)); pos = end; break; } else if (str.slice(0, left) == cased(current.slice(pos))) { accum += current; current = ""; try {current = source.next();} catch (e) {if (e != StopIteration) throw e; break;} pos = 0; str = str.slice(left); } else { break; } } if (!(found && consume)) { current = accum.slice(_accum.length) + current; pos = _pos; accum = _accum; } return found; }, // Wont't match past end of line. lookAheadRegex: function(regex, consume) { if (regex.source.charAt(0) != "^") throw new Error("Regexps passed to lookAheadRegex must start with ^"); // Fetch the rest of the line while (current.indexOf("\n", pos) == -1) { try {current += source.next();} catch (e) {if (e != StopIteration) throw e; break;} } var matched = current.slice(pos).match(regex); if (matched && consume) pos += matched[0].length; return matched; }, // Utils built on top of the above // more: -> boolean // Produce true if the stream isn't empty. more: function() { return this.peek() !== null; }, applies: function(test) { var next = this.peek(); return (next !== null && test(next)); }, nextWhile: function(test) { var next; while ((next = this.peek()) !== null && test(next)) this.next(); }, matches: function(re) { var next = this.peek(); return (next !== null && re.test(next)); }, nextWhileMatches: function(re) { var next; while ((next = this.peek()) !== null && re.test(next)) this.next(); }, equals: function(ch) { return ch === this.peek(); }, endOfLine: function() { var next = this.peek(); return next == null || next == "\n"; } }; };
JavaScript
/** * Storage and control for undo information within a CodeMirror * editor. 'Why on earth is such a complicated mess required for * that?', I hear you ask. The goal, in implementing this, was to make * the complexity of storing and reverting undo information depend * only on the size of the edited or restored content, not on the size * of the whole document. This makes it necessary to use a kind of * 'diff' system, which, when applied to a DOM tree, causes some * complexity and hackery. * * In short, the editor 'touches' BR elements as it parses them, and * the UndoHistory stores these. When nothing is touched in commitDelay * milliseconds, the changes are committed: It goes over all touched * nodes, throws out the ones that did not change since last commit or * are no longer in the document, and assembles the rest into zero or * more 'chains' -- arrays of adjacent lines. Links back to these * chains are added to the BR nodes, while the chain that previously * spanned these nodes is added to the undo history. Undoing a change * means taking such a chain off the undo history, restoring its * content (text is saved per line) and linking it back into the * document. */ // A history object needs to know about the DOM container holding the // document, the maximum amount of undo levels it should store, the // delay (of no input) after which it commits a set of changes, and, // unfortunately, the 'parent' window -- a window that is not in // designMode, and on which setTimeout works in every browser. function UndoHistory(container, maxDepth, commitDelay, editor) { this.container = container; this.maxDepth = maxDepth; this.commitDelay = commitDelay; this.editor = editor; // This line object represents the initial, empty editor. var initial = {text: "", from: null, to: null}; // As the borders between lines are represented by BR elements, the // start of the first line and the end of the last one are // represented by null. Since you can not store any properties // (links to line objects) in null, these properties are used in // those cases. this.first = initial; this.last = initial; // Similarly, a 'historyTouched' property is added to the BR in // front of lines that have already been touched, and 'firstTouched' // is used for the first line. this.firstTouched = false; // History is the set of committed changes, touched is the set of // nodes touched since the last commit. this.history = []; this.redoHistory = []; this.touched = []; this.lostundo = 0; } UndoHistory.prototype = { // Schedule a commit (if no other touches come in for commitDelay // milliseconds). scheduleCommit: function() { var self = this; parent.clearTimeout(this.commitTimeout); this.commitTimeout = parent.setTimeout(function(){self.tryCommit();}, this.commitDelay); }, // Mark a node as touched. Null is a valid argument. touch: function(node) { this.setTouched(node); this.scheduleCommit(); }, // Undo the last change. undo: function() { // Make sure pending changes have been committed. this.commit(); if (this.history.length) { // Take the top diff from the history, apply it, and store its // shadow in the redo history. var item = this.history.pop(); this.redoHistory.push(this.updateTo(item, "applyChain")); this.notifyEnvironment(); return this.chainNode(item); } }, // Redo the last undone change. redo: function() { this.commit(); if (this.redoHistory.length) { // The inverse of undo, basically. var item = this.redoHistory.pop(); this.addUndoLevel(this.updateTo(item, "applyChain")); this.notifyEnvironment(); return this.chainNode(item); } }, clear: function() { this.history = []; this.redoHistory = []; this.lostundo = 0; }, // Ask for the size of the un/redo histories. historySize: function() { return {undo: this.history.length, redo: this.redoHistory.length, lostundo: this.lostundo}; }, // Push a changeset into the document. push: function(from, to, lines) { var chain = []; for (var i = 0; i < lines.length; i++) { var end = (i == lines.length - 1) ? to : document.createElement("br"); chain.push({from: from, to: end, text: cleanText(lines[i])}); from = end; } this.pushChains([chain], from == null && to == null); this.notifyEnvironment(); }, pushChains: function(chains, doNotHighlight) { this.commit(doNotHighlight); this.addUndoLevel(this.updateTo(chains, "applyChain")); this.redoHistory = []; }, // Retrieve a DOM node from a chain (for scrolling to it after undo/redo). chainNode: function(chains) { for (var i = 0; i < chains.length; i++) { var start = chains[i][0], node = start && (start.from || start.to); if (node) return node; } }, // Clear the undo history, make the current document the start // position. reset: function() { this.history = []; this.redoHistory = []; this.lostundo = 0; }, textAfter: function(br) { return this.after(br).text; }, nodeAfter: function(br) { return this.after(br).to; }, nodeBefore: function(br) { return this.before(br).from; }, // Commit unless there are pending dirty nodes. tryCommit: function() { if (!window || !window.parent || !window.UndoHistory) return; // Stop when frame has been unloaded if (this.editor.highlightDirty()) this.commit(true); else this.scheduleCommit(); }, // Check whether the touched nodes hold any changes, if so, commit // them. commit: function(doNotHighlight) { parent.clearTimeout(this.commitTimeout); // Make sure there are no pending dirty nodes. if (!doNotHighlight) this.editor.highlightDirty(true); // Build set of chains. var chains = this.touchedChains(), self = this; if (chains.length) { this.addUndoLevel(this.updateTo(chains, "linkChain")); this.redoHistory = []; this.notifyEnvironment(); } }, // [ end of public interface ] // Update the document with a given set of chains, return its // shadow. updateFunc should be "applyChain" or "linkChain". In the // second case, the chains are taken to correspond the the current // document, and only the state of the line data is updated. In the // first case, the content of the chains is also pushed iinto the // document. updateTo: function(chains, updateFunc) { var shadows = [], dirty = []; for (var i = 0; i < chains.length; i++) { shadows.push(this.shadowChain(chains[i])); dirty.push(this[updateFunc](chains[i])); } if (updateFunc == "applyChain") this.notifyDirty(dirty); return shadows; }, // Notify the editor that some nodes have changed. notifyDirty: function(nodes) { forEach(nodes, method(this.editor, "addDirtyNode")) this.editor.scheduleHighlight(); }, notifyEnvironment: function() { if (this.onChange) this.onChange(this.editor); // Used by the line-wrapping line-numbering code. if (window.frameElement && window.frameElement.CodeMirror.updateNumbers) window.frameElement.CodeMirror.updateNumbers(); }, // Link a chain into the DOM nodes (or the first/last links for null // nodes). linkChain: function(chain) { for (var i = 0; i < chain.length; i++) { var line = chain[i]; if (line.from) line.from.historyAfter = line; else this.first = line; if (line.to) line.to.historyBefore = line; else this.last = line; } }, // Get the line object after/before a given node. after: function(node) { return node ? node.historyAfter : this.first; }, before: function(node) { return node ? node.historyBefore : this.last; }, // Mark a node as touched if it has not already been marked. setTouched: function(node) { if (node) { if (!node.historyTouched) { this.touched.push(node); node.historyTouched = true; } } else { this.firstTouched = true; } }, // Store a new set of undo info, throw away info if there is more of // it than allowed. addUndoLevel: function(diffs) { this.history.push(diffs); if (this.history.length > this.maxDepth) { this.history.shift(); lostundo += 1; } }, // Build chains from a set of touched nodes. touchedChains: function() { var self = this; // The temp system is a crummy hack to speed up determining // whether a (currently touched) node has a line object associated // with it. nullTemp is used to store the object for the first // line, other nodes get it stored in their historyTemp property. var nullTemp = null; function temp(node) {return node ? node.historyTemp : nullTemp;} function setTemp(node, line) { if (node) node.historyTemp = line; else nullTemp = line; } function buildLine(node) { var text = []; for (var cur = node ? node.nextSibling : self.container.firstChild; cur && (!isBR(cur) || cur.hackBR); cur = cur.nextSibling) if (!cur.hackBR && cur.currentText) text.push(cur.currentText); return {from: node, to: cur, text: cleanText(text.join(""))}; } // Filter out unchanged lines and nodes that are no longer in the // document. Build up line objects for remaining nodes. var lines = []; if (self.firstTouched) self.touched.push(null); forEach(self.touched, function(node) { if (node && (node.parentNode != self.container || node.hackBR)) return; if (node) node.historyTouched = false; else self.firstTouched = false; var line = buildLine(node), shadow = self.after(node); if (!shadow || shadow.text != line.text || shadow.to != line.to) { lines.push(line); setTemp(node, line); } }); // Get the BR element after/before the given node. function nextBR(node, dir) { var link = dir + "Sibling", search = node[link]; while (search && !isBR(search)) search = search[link]; return search; } // Assemble line objects into chains by scanning the DOM tree // around them. var chains = []; self.touched = []; forEach(lines, function(line) { // Note that this makes the loop skip line objects that have // been pulled into chains by lines before them. if (!temp(line.from)) return; var chain = [], curNode = line.from, safe = true; // Put any line objects (referred to by temp info) before this // one on the front of the array. while (true) { var curLine = temp(curNode); if (!curLine) { if (safe) break; else curLine = buildLine(curNode); } chain.unshift(curLine); setTemp(curNode, null); if (!curNode) break; safe = self.after(curNode); curNode = nextBR(curNode, "previous"); } curNode = line.to; safe = self.before(line.from); // Add lines after this one at end of array. while (true) { if (!curNode) break; var curLine = temp(curNode); if (!curLine) { if (safe) break; else curLine = buildLine(curNode); } chain.push(curLine); setTemp(curNode, null); safe = self.before(curNode); curNode = nextBR(curNode, "next"); } chains.push(chain); }); return chains; }, // Find the 'shadow' of a given chain by following the links in the // DOM nodes at its start and end. shadowChain: function(chain) { var shadows = [], next = this.after(chain[0].from), end = chain[chain.length - 1].to; while (true) { shadows.push(next); var nextNode = next.to; if (!nextNode || nextNode == end) break; else next = nextNode.historyAfter || this.before(end); // (The this.before(end) is a hack -- FF sometimes removes // properties from BR nodes, in which case the best we can hope // for is to not break.) } return shadows; }, // Update the DOM tree to contain the lines specified in a given // chain, link this chain into the DOM nodes. applyChain: function(chain) { // Some attempt is made to prevent the cursor from jumping // randomly when an undo or redo happens. It still behaves a bit // strange sometimes. var cursor = select.cursorPos(this.container, false), self = this; // Remove all nodes in the DOM tree between from and to (null for // start/end of container). function removeRange(from, to) { var pos = from ? from.nextSibling : self.container.firstChild; while (pos != to) { var temp = pos.nextSibling; removeElement(pos); pos = temp; } } var start = chain[0].from, end = chain[chain.length - 1].to; // Clear the space where this change has to be made. removeRange(start, end); // Insert the content specified by the chain into the DOM tree. for (var i = 0; i < chain.length; i++) { var line = chain[i]; // The start and end of the space are already correct, but BR // tags inside it have to be put back. if (i > 0) self.container.insertBefore(line.from, end); // Add the text. var node = makePartSpan(fixSpaces(line.text)); self.container.insertBefore(node, end); // See if the cursor was on this line. Put it back, adjusting // for changed line length, if it was. if (cursor && cursor.node == line.from) { var cursordiff = 0; var prev = this.after(line.from); if (prev && i == chain.length - 1) { // Only adjust if the cursor is after the unchanged part of // the line. for (var match = 0; match < cursor.offset && line.text.charAt(match) == prev.text.charAt(match); match++){} if (cursor.offset > match) cursordiff = line.text.length - prev.text.length; } select.setCursorPos(this.container, {node: line.from, offset: Math.max(0, cursor.offset + cursordiff)}); } // Cursor was in removed line, this is last new line. else if (cursor && (i == chain.length - 1) && cursor.node && cursor.node.parentNode != this.container) { select.setCursorPos(this.container, {node: line.from, offset: line.text.length}); } } // Anchor the chain in the DOM tree. this.linkChain(chain); return start; } };
JavaScript
/* Parse function for JavaScript. Makes use of the tokenizer from * tokenizejavascript.js. Note that your parsers do not have to be * this complicated -- if you don't want to recognize local variables, * in many languages it is enough to just look for braces, semicolons, * parentheses, etc, and know when you are inside a string or comment. * * See manual.html for more info about the parser interface. */ var JSParser = Editor.Parser = (function() { // Token types that can be considered to be atoms. var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true}; // Setting that can be used to have JSON data indent properly. var json = false; // Constructor for the lexical context objects. function JSLexical(indented, column, type, align, prev, info) { // indentation at start of this line this.indented = indented; // column at which this scope was opened this.column = column; // type of scope ('vardef', 'stat' (statement), 'form' (special form), '[', '{', or '(') this.type = type; // '[', '{', or '(' blocks that have any text after their opening // character are said to be 'aligned' -- any lines below are // indented all the way to the opening character. if (align != null) this.align = align; // Parent scope, if any. this.prev = prev; this.info = info; } // My favourite JavaScript indentation rules. function indentJS(lexical) { return function(firstChars) { var firstChar = firstChars && firstChars.charAt(0), type = lexical.type; var closing = firstChar == type; if (type == "vardef") return lexical.indented + 4; else if (type == "form" && firstChar == "{") return lexical.indented; else if (type == "stat" || type == "form") return lexical.indented + indentUnit; else if (lexical.info == "switch" && !closing) return lexical.indented + (/^(?:case|default)\b/.test(firstChars) ? indentUnit : 2 * indentUnit); else if (lexical.align) return lexical.column - (closing ? 1 : 0); else return lexical.indented + (closing ? 0 : indentUnit); }; } // The parser-iterator-producing function itself. function parseJS(input, basecolumn) { // Wrap the input in a token stream var tokens = tokenizeJavaScript(input); // The parser state. cc is a stack of actions that have to be // performed to finish the current statement. For example we might // know that we still need to find a closing parenthesis and a // semicolon. Actions at the end of the stack go first. It is // initialized with an infinitely looping action that consumes // whole statements. var cc = [json ? expressions : statements]; // Context contains information about the current local scope, the // variables defined in that, and the scopes above it. var context = null; // The lexical scope, used mostly for indentation. var lexical = new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false); // Current column, and the indentation at the start of the current // line. Used to create lexical scope objects. var column = 0; var indented = 0; // Variables which are used by the mark, cont, and pass functions // below to communicate with the driver loop in the 'next' // function. var consume, marked; // The iterator object. var parser = {next: next, copy: copy}; function next(){ // Start by performing any 'lexical' actions (adjusting the // lexical variable), or the operations below will be working // with the wrong lexical state. while(cc[cc.length - 1].lex) cc.pop()(); // Fetch a token. var token = tokens.next(); // Adjust column and indented. if (token.type == "whitespace" && column == 0) indented = token.value.length; column += token.value.length; if (token.content == "\n"){ indented = column = 0; // If the lexical scope's align property is still undefined at // the end of the line, it is an un-aligned scope. if (!("align" in lexical)) lexical.align = false; // Newline tokens get an indentation function associated with // them. token.indentation = indentJS(lexical); } // No more processing for meaningless tokens. if (token.type == "whitespace" || token.type == "comment") return token; // When a meaningful token is found and the lexical scope's // align is undefined, it is an aligned scope. if (!("align" in lexical)) lexical.align = true; // Execute actions until one 'consumes' the token and we can // return it. while(true) { consume = marked = false; // Take and execute the topmost action. cc.pop()(token.type, token.content); if (consume){ // Marked is used to change the style of the current token. if (marked) token.style = marked; // Here we differentiate between local and global variables. else if (token.type == "variable" && inScope(token.content)) token.style = "js-localvariable"; return token; } } } // This makes a copy of the parser state. It stores all the // stateful variables in a closure, and returns a function that // will restore them when called with a new input stream. Note // that the cc array has to be copied, because it is contantly // being modified. Lexical objects are not mutated, and context // objects are not mutated in a harmful way, so they can be shared // between runs of the parser. function copy(){ var _context = context, _lexical = lexical, _cc = cc.concat([]), _tokenState = tokens.state; return function copyParser(input){ context = _context; lexical = _lexical; cc = _cc.concat([]); // copies the array column = indented = 0; tokens = tokenizeJavaScript(input, _tokenState); return parser; }; } // Helper function for pushing a number of actions onto the cc // stack in reverse order. function push(fs){ for (var i = fs.length - 1; i >= 0; i--) cc.push(fs[i]); } // cont and pass are used by the action functions to add other // actions to the stack. cont will cause the current token to be // consumed, pass will leave it for the next action. function cont(){ push(arguments); consume = true; } function pass(){ push(arguments); consume = false; } // Used to change the style of the current token. function mark(style){ marked = style; } // Push a new scope. Will automatically link the current scope. function pushcontext(){ context = {prev: context, vars: {"this": true, "arguments": true}}; } // Pop off the current scope. function popcontext(){ context = context.prev; } // Register a variable in the current scope. function register(varname){ if (context){ mark("js-variabledef"); context.vars[varname] = true; } } // Check whether a variable is defined in the current scope. function inScope(varname){ var cursor = context; while (cursor) { if (cursor.vars[varname]) return true; cursor = cursor.prev; } return false; } // Push a new lexical context of the given type. function pushlex(type, info) { var result = function(){ lexical = new JSLexical(indented, column, type, null, lexical, info) }; result.lex = true; return result; } // Pop off the current lexical context. function poplex(){ if (lexical.type == ")") indented = lexical.indented; lexical = lexical.prev; } poplex.lex = true; // The 'lex' flag on these actions is used by the 'next' function // to know they can (and have to) be ran before moving on to the // next token. // Creates an action that discards tokens until it finds one of // the given type. function expect(wanted){ return function expecting(type){ if (type == wanted) cont(); else if (wanted == ";") pass(); else cont(arguments.callee); }; } // Looks for a statement, and then calls itself. function statements(type){ return pass(statement, statements); } function expressions(type){ return pass(expression, expressions); } // Dispatches various types of statements based on the type of the // current token. function statement(type){ if (type == "var") cont(pushlex("vardef"), vardef1, expect(";"), poplex); else if (type == "keyword a") cont(pushlex("form"), expression, statement, poplex); else if (type == "keyword b") cont(pushlex("form"), statement, poplex); else if (type == "{") cont(pushlex("}"), block, poplex); else if (type == ";") cont(); else if (type == "function") cont(functiondef); else if (type == "for") cont(pushlex("form"), expect("("), pushlex(")"), forspec1, expect(")"), poplex, statement, poplex); else if (type == "variable") cont(pushlex("stat"), maybelabel); else if (type == "switch") cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"), block, poplex, poplex); else if (type == "case") cont(expression, expect(":")); else if (type == "default") cont(expect(":")); else if (type == "catch") cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"), statement, poplex, popcontext); else pass(pushlex("stat"), expression, expect(";"), poplex); } // Dispatch expression types. function expression(type){ if (atomicTypes.hasOwnProperty(type)) cont(maybeoperator); else if (type == "function") cont(functiondef); else if (type == "keyword c") cont(expression); else if (type == "(") cont(pushlex(")"), expression, expect(")"), poplex, maybeoperator); else if (type == "operator") cont(expression); else if (type == "[") cont(pushlex("]"), commasep(expression, "]"), poplex, maybeoperator); else if (type == "{") cont(pushlex("}"), commasep(objprop, "}"), poplex, maybeoperator); else cont(); } // Called for places where operators, function calls, or // subscripts are valid. Will skip on to the next action if none // is found. function maybeoperator(type, value){ if (type == "operator" && /\+\+|--/.test(value)) cont(maybeoperator); else if (type == "operator") cont(expression); else if (type == ";") pass(); else if (type == "(") cont(pushlex(")"), commasep(expression, ")"), poplex, maybeoperator); else if (type == ".") cont(property, maybeoperator); else if (type == "[") cont(pushlex("]"), expression, expect("]"), poplex, maybeoperator); } // When a statement starts with a variable name, it might be a // label. If no colon follows, it's a regular statement. function maybelabel(type){ if (type == ":") cont(poplex, statement); else pass(maybeoperator, expect(";"), poplex); } // Property names need to have their style adjusted -- the // tokenizer thinks they are variables. function property(type){ if (type == "variable") {mark("js-property"); cont();} } // This parses a property and its value in an object literal. function objprop(type){ if (type == "variable") mark("js-property"); if (atomicTypes.hasOwnProperty(type)) cont(expect(":"), expression); } // Parses a comma-separated list of the things that are recognized // by the 'what' argument. function commasep(what, end){ function proceed(type) { if (type == ",") cont(what, proceed); else if (type == end) cont(); else cont(expect(end)); } return function commaSeparated(type) { if (type == end) cont(); else pass(what, proceed); }; } // Look for statements until a closing brace is found. function block(type){ if (type == "}") cont(); else pass(statement, block); } // Variable definitions are split into two actions -- 1 looks for // a name or the end of the definition, 2 looks for an '=' sign or // a comma. function vardef1(type, value){ if (type == "variable"){register(value); cont(vardef2);} else cont(); } function vardef2(type, value){ if (value == "=") cont(expression, vardef2); else if (type == ",") cont(vardef1); } // For loops. function forspec1(type){ if (type == "var") cont(vardef1, forspec2); else if (type == ";") pass(forspec2); else if (type == "variable") cont(formaybein); else pass(forspec2); } function formaybein(type, value){ if (value == "in") cont(expression); else cont(maybeoperator, forspec2); } function forspec2(type, value){ if (type == ";") cont(forspec3); else if (value == "in") cont(expression); else cont(expression, expect(";"), forspec3); } function forspec3(type) { if (type == ")") pass(); else cont(expression); } // A function definition creates a new context, and the variables // in its argument list have to be added to this context. function functiondef(type, value){ if (type == "variable"){register(value); cont(functiondef);} else if (type == "(") cont(pushcontext, commasep(funarg, ")"), statement, popcontext); } function funarg(type, value){ if (type == "variable"){register(value); cont();} } return parser; } return { make: parseJS, electricChars: "{}:", configure: function(obj) { if (obj.json != null) json = obj.json; } }; })();
JavaScript
var DummyParser = Editor.Parser = (function() { function tokenizeDummy(source) { while (!source.endOfLine()) source.next(); return "text"; } function parseDummy(source) { function indentTo(n) {return function() {return n;}} source = tokenizer(source, tokenizeDummy); var space = 0; var iter = { next: function() { var tok = source.next(); if (tok.type == "whitespace") { if (tok.value == "\n") tok.indentation = indentTo(space); else space = tok.value.length; } return tok; }, copy: function() { var _space = space; return function(_source) { space = _space; source = tokenizer(_source, tokenizeDummy); return iter; }; } }; return iter; } return {make: parseDummy}; })();
JavaScript
/* Tokenizer for CSharp code */ var tokenizeCSharp = (function() { // Advance the stream until the given character (not preceded by a // backslash) is encountered, or the end of the line is reached. function nextUntilUnescaped(source, end) { var escaped = false; var next; while (!source.endOfLine()) { var next = source.next(); if (next == end && !escaped) return false; escaped = !escaped && next == "\\"; } return escaped; } // A map of JavaScript's keywords. The a/b/c keyword distinction is // very rough, but it gives the parser enough information to parse // correct code correctly (we don't care that much how we parse // incorrect code). The style information included in these objects // is used by the highlighter to pick the correct CSS style for a // token. var keywords = function(){ function result(type, style){ return {type: type, style: "csharp-" + style}; } // keywords that take a parenthised expression, and then a // statement (if) var keywordA = result("keyword a", "keyword"); // keywords that take just a statement (else) var keywordB = result("keyword b", "keyword"); // keywords that optionally take an expression, and form a // statement (return) var keywordC = result("keyword c", "keyword"); var operator = result("operator", "keyword"); var atom = result("atom", "atom"); // just a keyword with no indentation implications var keywordD = result("keyword d", "keyword"); return { "if": keywordA, "while": keywordA, "with": keywordA, "else": keywordB, "do": keywordB, "try": keywordB, "finally": keywordB, "return": keywordC, "break": keywordC, "continue": keywordC, "new": keywordC, "delete": keywordC, "throw": keywordC, "in": operator, "typeof": operator, "instanceof": operator, "var": result("var", "keyword"), "function": result("function", "keyword"), "catch": result("catch", "keyword"), "for": result("for", "keyword"), "switch": result("switch", "keyword"), "case": result("case", "keyword"), "default": result("default", "keyword"), "true": atom, "false": atom, "null": atom, "class": result("class", "keyword"), "namespace": result("class", "keyword"), "public": keywordD, "private": keywordD, "protected": keywordD, "internal": keywordD, "extern": keywordD, "override": keywordD, "virtual": keywordD, "abstract": keywordD, "static": keywordD, "out": keywordD, "ref": keywordD, "const": keywordD, "foreach": result("for", "keyword"), "using": keywordC, "int": keywordD, "double": keywordD, "long": keywordD, "bool": keywordD, "char": keywordD, "void": keywordD, "string": keywordD, "byte": keywordD, "sbyte": keywordD, "decimal": keywordD, "float": keywordD, "uint": keywordD, "ulong": keywordD, "object": keywordD, "short": keywordD, "ushort": keywordD, "get": keywordD, "set": keywordD, "value": keywordD }; }(); // Some helper regexps var isOperatorChar = /[+\-*&%=<>!?|]/; var isHexDigit = /[0-9A-Fa-f]/; var isWordChar = /[\w\$_]/; // Wrapper around jsToken that helps maintain parser state (whether // we are inside of a multi-line comment and whether the next token // could be a regular expression). function jsTokenState(inside, regexp) { return function(source, setState) { var newInside = inside; var type = jsToken(inside, regexp, source, function(c) {newInside = c;}); var newRegexp = type.type == "operator" || type.type == "keyword c" || type.type.match(/^[\[{}\(,;:]$/); if (newRegexp != regexp || newInside != inside) setState(jsTokenState(newInside, newRegexp)); return type; }; } // The token reader, inteded to be used by the tokenizer from // tokenize.js (through jsTokenState). Advances the source stream // over a token, and returns an object containing the type and style // of that token. function jsToken(inside, regexp, source, setInside) { function readHexNumber(){ source.next(); // skip the 'x' source.nextWhileMatches(isHexDigit); return {type: "number", style: "csharp-atom"}; } function readNumber() { source.nextWhileMatches(/[0-9]/); if (source.equals(".")){ source.next(); source.nextWhileMatches(/[0-9]/); } if (source.equals("e") || source.equals("E")){ source.next(); if (source.equals("-")) source.next(); source.nextWhileMatches(/[0-9]/); } return {type: "number", style: "csharp-atom"}; } // Read a word, look it up in keywords. If not found, it is a // variable, otherwise it is a keyword of the type found. function readWord() { source.nextWhileMatches(isWordChar); var word = source.get(); var known = keywords.hasOwnProperty(word) && keywords.propertyIsEnumerable(word) && keywords[word]; return known ? {type: known.type, style: known.style, content: word} : {type: "variable", style: "csharp-variable", content: word}; } function readRegexp() { nextUntilUnescaped(source, "/"); source.nextWhileMatches(/[gi]/); return {type: "regexp", style: "csharp-string"}; } // Mutli-line comments are tricky. We want to return the newlines // embedded in them as regular newline tokens, and then continue // returning a comment token for every line of the comment. So // some state has to be saved (inside) to indicate whether we are // inside a /* */ sequence. function readMultilineComment(start){ var newInside = "/*"; var maybeEnd = (start == "*"); while (true) { if (source.endOfLine()) break; var next = source.next(); if (next == "/" && maybeEnd){ newInside = null; break; } maybeEnd = (next == "*"); } setInside(newInside); return {type: "comment", style: "csharp-comment"}; } function readOperator() { source.nextWhileMatches(isOperatorChar); return {type: "operator", style: "csharp-operator"}; } function readString(quote) { var endBackSlash = nextUntilUnescaped(source, quote); setInside(endBackSlash ? quote : null); return {type: "string", style: "csharp-string"}; } // Fetch the next token. Dispatches on first character in the // stream, or first two characters when the first is a slash. if (inside == "\"" || inside == "'") return readString(inside); var ch = source.next(); if (inside == "/*") return readMultilineComment(ch); else if (ch == "\"" || ch == "'") return readString(ch); // with punctuation, the type of the token is the symbol itself else if (/[\[\]{}\(\),;\:\.]/.test(ch)) return {type: ch, style: "csharp-punctuation"}; else if (ch == "0" && (source.equals("x") || source.equals("X"))) return readHexNumber(); else if (/[0-9]/.test(ch)) return readNumber(); else if (ch == "/"){ if (source.equals("*")) { source.next(); return readMultilineComment(ch); } else if (source.equals("/")) { nextUntilUnescaped(source, null); return {type: "comment", style: "csharp-comment"};} else if (regexp) return readRegexp(); else return readOperator(); } else if (ch == "#") { // treat c# regions like comments nextUntilUnescaped(source, null); return {type: "comment", style: "csharp-comment"}; } else if (isOperatorChar.test(ch)) return readOperator(); else return readWord(); } // The external interface to the tokenizer. return function(source, startState) { return tokenizer(source, startState || jsTokenState(false, true)); }; })();
JavaScript