/* Translated messages */var fileSizeName = ['b','Kb','Mb','Gb','Tb','Eb'],messages = {rootPathName: 'Root',ajaxLoadingText: 'Loading...',moveToUpDirText: 'Up',delNonEmptyFolderPromt: 'Remove not empty folder %1?',delFileObjPromt: 'Remove %1?',enterNewDirNameStr: 'Enter name of new directory',defaultNewDirNameStr: 'New Folder',enterNewNameWoExtPromt: 'Enter new name of %1:\n(file extension is add automatic)',operationFailedStr: 'Operation failed. Error code is %1.',ajaxIsReguire: 'This script reguire browser that support the AJAX tehnology!',noChange: 'No change!',/* Context Menu */newDirTitle: 'Create folder',openTitle: 'Open',browseTitle: 'Browse',copyTitle: 'Copy',cutTitle: 'Cut',pastTitle: 'Paste',deleteTitle: 'Delete',renameTitle: 'Rename',reloadDirTitle: 'Reload curent directory',fileNameTitle: 'File name',fileSizeTitle: 'File size',fileDateTitle: 'File date',dateTitle: 'Date',sizeTitle: 'Size',imageSizeTitle: 'Image size',viewTitle: 'View',thumbnailTitle: 'Thumbnail',listTitle: 'List',tableTitle: 'Table',searchTitle: 'Search',enterSearchTitle: 'Enter part of file name:',sortTitle: 'Sort',sortByNameTitle: 'By name',sortBySizeTitle: 'By size',sortByDateTitle: 'By date',uploadTitle: 'Upload',cancelTitle: 'Cancel',writeProtectTitle: 'Directory is write protected!',addFieldTitle: 'Add more field',delFieldTitle: 'Delete field',selectFirstFileTitle: 'Select first file',allowExtTitle: 'Allowed extension',maxUploadSizeTitle: 'Max upload size (total/file)',pathTitle: 'Path'},user_context_items = [/* Arrays with the image tools context menu items objects */{text: 'Edit', /* The display item text */handle: openImgTools, /* Handle of function to extcute when the item click */cssClass: '', /* css class of icons, empty or not set to disable */showOn: 2, /* Show on 0 - on files and folders, 1 - on folders, 2 - on files, 3 - on free spaces */disableOnPaste: 0, /* Disable item if can`t paste the file or folder */disableOnFileOp: 1, /* Disable item if can`t some file operation */disabled: !true, /* Dont show item */defaultItem: 0 /* Show item as default (bold text), dont use in users items */}],imgLibConf = {idName: 'imgLib', /* Main id */reqURL: '/assets/ckeditor/plugins/imglib/imglib.php',bindKeys: '1',enableUpload: 1,uploadPath: 'http://r-voyage.com.ua/userfiles/',allowedExt: ['gif', 'png', 'jpeg', 'jpg', 'bmp'],maxUploadSize: 2097152,maxUploadFileSize: 2097152,maxFileNameLen: 25,enableBrowseSubdir: true,enableFileOperation: true,enableCreateDir: true,enableRename: true,enableDelete: true,thumbnailDir: 'thmb',onSelect: imgLibManager.onSelect,onDblSelect: imgLibManager.select,onDeselect: imgLibManager.onDeselect,viewType: 'thumbnail',messages: messages,contextMenuItems: user_context_items};/* Image Tools */var img_src = '';function getImgToolsData() {return {src: img_src,action: 'imgtools.php',srcArg: 'src',dstArg: 'dst',previewArg: 'preview',resizeArg: 'resize',cropArg: 'crop',rotateArg: 'rotate',flipArg: 'flip',loadingIndicator: '../img/loading.gif',msg: { /* Messages strings */errorLoadData: 'Error loading data!',cropImageWait: 'Crop image. Please wait.',resizeImageWait: 'Resize image. Please wait.',rotateFlipImageWait: 'Rotate/Flip image. Please wait.',loadingPreview: 'Loading preview....',errorPrefix: 'Error: ',loading: 'Loading....',labels: [{id: 'resize_content_tab', prop:'Resize image'},{id: 'crop_content_tab', prop: 'Crop image'},{id: 'rotate_content_tab', prop: 'Rotate/Flip image'},{id: 'close_button', prop: 'Close'},{id: 'size_label', prop: 'Size'},{id: 'apply_resize', prop: {value: 'Apply', title: 'Save changes'}},{id: 'reset_resize', prop: {value: 'Reset', title: 'Reset to original size'}},{id: 'save_prop_label', prop: 'Save proportions'},{id: 'width_label', prop: {innerHTML: 'Width', title: 'Width'}},{id: 'height_label', prop: {innerHTML: 'Height', title: 'Height'}},{id: 'crop_sel_from_label', prop: {innerHTML: 'Selected area: from'}},{id: 'crop_sel_to_label', prop: 'to'},{id: 'apply_crop', prop: {value: 'Apply crop'}},{id: 'rotate_label', prop: 'Rotate'},{id: 'rotate_ccw_label', prop: {innerHTML: '90° CCW', title: 'Rotate 90 degrees counterclockwise'}},{id: 'rotate_cw_label', prop: {innerHTML: '90° CW', title: 'Rotate 90 degrees clockwise'}},{id: 'flip_label', prop: 'Flip'},{id: 'flip_h_label', prop: {innerHTML: 'horisontal', title: 'horisontal'}},{id: 'flip_v_label', prop: {innerHTML: 'vertical', title: 'vertical'}},{id: 'reset_rotate_flip', prop: {value: 'Reset'}},{id: 'apply_rotate_flip', prop: {value: 'Apply'}},{id: 'cor_label', prop: 'Image Tools for'}]}};};function openImgTools() {var url = 'imgtools/index.html',selElement = imgLib.getSelectedItem();if (selElement) {var ext_prop = imgLib.getItemInfo(selElement.type, selElement.index),path = '/' + imgLib.getDirContent().path.join('/');if (path !== '/') {path += '/';}if (selElement.type == 2) {img_src = getURIEncPath(HTMLDecode(imgLibConf.uploadPath + path + ext_prop.name));var imgToolsWindow = window.open( url,'imgtools', 'width=750, height=500, location=0, status=no, toolbar=no, menubar=no, scrollbars=yes, resizable=yes');}}}imgLib.init(imgLibConf);/* Translate page labels */addEvent(window, 'load', function () {translateLabels([{id: 'select_file_label', prop:'Selected file'},{id: 'select', prop: 'Select'},{id: 'cancel', prop: 'Cancel'}]);});