Added: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/i18n/elrte.zh_CN.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/i18n/elrte.zh_CN.js?rev=1178141&view=auto ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/i18n/elrte.zh_CN.js (added) +++ ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/i18n/elrte.zh_CN.js Sun Oct 2 08:06:49 2011 @@ -0,0 +1,189 @@ +/** + * Simplified Chinese translation + * @author Lee Chenhwa <[hidden email]> + * @version 2010-11-01 + */ +(function($) { +elRTE.prototype.i18Messages.zh_CN = { + '_translator' : 'Lee Chenhwa <[hidden email]>', + '_translation' : 'Simplified Chinese translation', + 'Editor' : 'ç¼è¾å¨', + 'Source' : 'æºä»£ç ', + // Panel Name + 'Copy/Pase' : 'å¤å¶/ç²è´´', + 'Undo/Redo' : 'åæ¶/éå', + 'Text styles' : 'æåæ ·å¼', + 'Colors' : 'é¢è²', + 'Alignment' : '对é½', + 'Indent/Outdent' : '缩è¿/缩å', + 'Text format' : 'æåæ ¼å¼', + 'Lists' : 'åå', + 'Misc elements' : 'å ¶ä»å ç´ ', + 'Links' : 'é¾æ¥', + 'Images' : 'å¾ç', + 'Media' : 'å¤åªä½', + 'Tables' : 'è¡¨æ ¼', + 'File manager (elFinder)' : 'æ件管ç(elFinder)', + // button names + 'Save' : 'ä¿å', + 'Copy' : 'å¤å¶', + 'Cut' : 'åªå', + 'Paste' : 'ç²è´´', + 'Paste only text' : 'ç²è´´ä¸ºçº¯æå', + 'Paste formatted text' : 'ç²è´´ä¸ºå·²æ ¼å¼åæå', + 'Clean format' : 'æ¸ é¤æ ¼å¼', + 'Undo last action' : 'åæ¶ä¸ä¸ä¸ªå¨ä½', + 'Redo previous action' : 'éåä¸ä¸ä¸ªå¨ä½', + 'Bold' : 'ç²ä½', + 'Italic' : 'æä½', + 'Underline' : 'ä¸å线', + 'Strikethrough' : 'å é¤çº¿', + 'Superscript' : 'ä¸æ ', + 'Subscript' : 'ä¸æ ', + 'Align left' : 'é å·¦', + 'Ailgn right' : 'é å³', + 'Align center' : 'å± ä¸', + 'Align full' : 'å·¦å³å¯¹é½', + 'Font color' : 'æåé¢è²', + 'Background color' : 'èæ¯é¢è²', + 'Indent' : 'å¢å¤§ç¼©è¿', + 'Outdent' : 'åå°ç¼©è¿', + 'Format' : 'æ ¼å¼', + 'Font size' : 'åä½å¤§å°', + 'Font' : 'åä½', + 'Ordered list' : 'ç¼å·', + 'Unordered list' : '项ç®ç¼å·', + 'Horizontal rule' : '水平线', + 'Blockquote' : 'å¼ç¨', + 'Block element (DIV)' : 'åºå (DIV)', + 'Link' : 'é¾æ¥', + 'Delete link' : 'å é¤é¾æ¥', + 'Bookmark' : '书ç¾(éç¹)', + 'Flash' : 'Flashåªä½', + 'Image' : 'å¾ç', + 'Table' : 'è¡¨æ ¼', + 'Delete table' : 'å é¤è¡¨æ ¼', + 'Insert row before' : 'ä¸æ¹å¢å ä¸è¡', + 'Insert row after' : 'ä¸æ¹å¢å ä¸è¡', + 'Delete row' : 'å é¤å', + 'Insert column before' : '左边å¢å ä¸å', + 'Insert column after' : 'å³è¾¹å¢å ä¸å', + 'Delete column' : 'å é¤å', + 'Merge table cells' : 'åå¹¶è¡¨æ ¼åå ', + 'Split table cell' : 'åå²è¡¨æ ¼åå ', + 'Toggle display document structure' : 'æ¾ç¤ºæ件ç»ææ è®°', + 'Table cell properties' : 'è¡¨æ ¼åå å±æ§', + 'Table properties' : 'è¡¨æ ¼å±æ§', + 'Toggle full screen mode' : 'åæ¢ä¸ºå ¨å±å¹', + 'Open file manager' : 'æå¼æ件管ç', + 'Non breakable space' : 'ç©ºæ ¼', + 'Smiley' : 'ç¬è¸', + 'Page break' : 'æ¢é¡µç¬¦', + 'Stop element floating' : 'åæ¢å ç´ æµ®å¨å±æ§', + // dialogs + 'Warning' : 'è¦å', + 'Properies' : 'å±æ§', + 'Popup' : 'å¼¹åºæ¡', + 'Advanced' : 'é«çº§', + 'Events' : 'äºä»¶', + 'Width' : '宽度', + 'Height' : 'é«åº¦', + 'Left' : 'é å·¦', + 'Center' : 'å± ä¸', + 'Right' : 'é å³', + 'Border' : 'è¾¹æ¡', + 'Background' : 'èæ¯', + 'Css class' : 'CSSç±»å«', + 'Css style' : 'CSSæ ·å¼', + 'No' : 'ä¸è®¾ç½®', + 'Title' : 'æ é¢', + 'Script direction' : 'æåæ¹å', + 'Language' : 'è¯è¨', + 'Charset' : 'å符ç¼ç ', + 'Not set' : 'ä¸è®¾å®', + 'Left to right' : 'ä»å·¦è³å³', + 'Right to left' : 'ä»å³è³å·¦', + 'In this window' : 'å¨æ¬çªå£', + 'In new window (_blank)' : 'å¨æ°çªå£ (_blank)', + 'In new parent window (_parent)' : 'å¨ç¶çªå£ (_parent)', + 'In top frame (_top)' : 'å¨é¡¶å± (_top)', + 'URL' : 'ç½å', + 'Open in' : 'æå¼å°', + // copy + 'This operation is disabled in your browser on security reason. Use shortcut instead.' : 'åºäºå®å ¨èèï¼æ¤å¨ä½æ æ³å¨æµè§å¨ä¸è¿è¡ï¼è¯·ç´æ¥æ Ctrl+V è¯è¯ã', + // format + 'Heading 1' : 'æ é¢ 1', + 'Heading 2' : 'æ é¢ 2', + 'Heading 3' : 'æ é¢ 3', + 'Heading 4' : 'æ é¢ 4', + 'Heading 5' : 'æ é¢ 5', + 'Heading 6' : 'æ é¢ 6', + 'Paragraph' : '段è½', + 'Address' : 'å°å', + 'Preformatted' : 'é¢æ ¼å¼åç', + // font size + 'Small (8pt)' : 'æå° (8pt)', + 'Small (10px)' : 'æ´å° (10px)', + 'Small (12pt)' : 'å° (12pt)', + 'Normal (14pt)' : 'ä¸ (14pt)', + 'Large (18pt)' : '大 (18pt)', + 'Large (24pt)' : 'æ´å¤§ (24pt)', + 'Large (36pt)' : 'æ大 (36pt)', + // bookmark + 'Bookmark name' : '书ç¾å称', + 'Select bookmark' : 'éæ©ä¹¦ç¾', + // link + 'Link URL' : 'é¾æ¥å°å', + 'Target' : 'ç®æ ', + 'Open link in popup window' : 'å¨å¼¹åºçªå£ä¸æå¼', + 'Window name' : 'çªå£å称', + 'Window size' : 'çªå£å°ºå¯¸', + 'Window position' : 'çªå£ä½ç½®', + 'Location bar' : 'å°åæ ', + 'Menu bar' : 'èåæ ', + 'Toolbar' : 'å·¥å ·æ ', + 'Scrollbars' : 'æ»å¨æ¡', + 'Status bar' : 'ç¶ææ ', + 'Resizable' : 'å¯å¦è°æ´å°ºå¯¸', + 'Depedent' : 'ç¸å ³', + 'Add return false' : 'éå return false ', + 'Target MIME type' : 'ç®æ çMIMEç±»å', + 'Relationship page to target (rel)' : 'å ³è页å°ç®æ (rel)', + 'Relationship target to page (rev)' : 'å ³èç®æ å°é¡µ (rev)', + 'Tab index' : 'Tabé®é¡ºåº', + 'Access key' : '访é®é®', + // image + 'Size' : '尺寸', + 'Preview' : 'é¢è§', + 'Margins' : 'è¾¹ç', + 'Alt text' : 'æ示æå', + 'Image URL' : 'å¾çç½å', + // table + 'Spacing' : 'è¡¨æ ¼é´è· (Spacing)', + 'Padding' : 'è¡¨æ ¼è¾¹è· (Padding)', + 'Rows' : 'è¡', + 'Columns' : 'å', + 'Groups' : 'ç»', + 'Cells' : 'åå æ ¼', + 'Caption' : 'æ é¢', + 'Inner borders' : 'è¾¹æ¡', + // table cell + 'Table cell type' : 'åå æ ¼ç±»å', + 'Data' : 'æ°æ®', + 'Header' : 'æ é¢', + 'Justify' : '对é½', + 'Paddings' : 'è¾¹è·', + 'Apply to' : 'åºç¨å°', + 'Current cell' : 'å½ååå æ ¼', + 'All cells in row' : 'æ¬è¡ææåå æ ¼', + 'All cells in column' : 'æ¬åææåå æ ¼', + 'All cells in table' : 'æ¬è¡¨ææåå æ ¼', + // about + 'About this software' : 'å ³äºæ¬è½¯ä»¶', + 'About elRTE' : 'å ³äºelRTE', + 'Version' : 'çæ¬', + 'Licence' : '许å¯è¯' + + +} +})(jQuery); Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/i18n/elrte.zh_CN.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/i18n/elrte.zh_CN.js ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/i18n/elrte.zh_CN.js ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/i18n/elrte.zh_TW.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/i18n/elrte.zh_TW.js?rev=1178141&view=auto ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/i18n/elrte.zh_TW.js (added) +++ ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/i18n/elrte.zh_TW.js Sun Oct 2 08:06:49 2011 @@ -0,0 +1,212 @@ +/* + * Traditional Chinese translation + * @author T.C. Chou <[hidden email]> + * @version 2010-12-11 + * @author Tad <[hidden email]> + * @version 2010-09-18 + */ +(function($) { +elRTE.prototype.i18Messages.zh_TW = { + '_translator' : 'Tad <[hidden email]><br>T.C. Chou <[hidden email]>', + '_translation' : 'Traditional Chinese translation', + 'Editor' : '編輯', + 'Source' : 'åå§ç¢¼', + // panels names + 'Copy/Pase' : 'è¤è£½/è²¼ä¸', + 'Undo/Redo' : '復å/éå', + 'Text styles' : 'æå樣å¼', + 'Colors' : 'é¡è²', + 'Alignment' : 'å°é½', + 'Indent/Outdent' : '縮æ/å¸æ', + 'Text format' : 'æåæ ¼å¼', + 'Lists' : 'æ¸ å®', + 'Misc elements' : 'å ¶ä»å 件', + 'Links' : 'é£çµ', + 'Images' : 'åæª', + 'Media' : 'å¤åªé«', + 'Tables' : 'è¡¨æ ¼', + 'File manager (elFinder)' : 'æªæ¡ç®¡ç', + // buttons names + 'About this software' : 'éæ¼æ¤è»é«', + 'Save' : 'å²å', + 'Copy' : 'è¤è£½', + 'Cut' : 'åªä¸', + 'Paste' : 'è²¼ä¸', + 'Paste only text' : 'è²¼ä¸ç´æå', + 'Paste formatted text' : 'è²¼ä¸æ ¼å¼åæå', + 'Clean format' : 'æ¸ é¤æ ¼å¼', + 'Undo last action' : '復åæå¾ä¸ååä½', + 'Redo previous action' : 'éåä¸ä¸ååä½', + 'Bold' : 'ç²é«', + 'Italic' : 'æé«', + 'Underline' : 'åºç·', + 'Strikethrough' : 'åªé¤ç·', + 'Superscript' : 'ä¸æ¨', + 'Subscript' : 'ä¸æ¨', + 'Align left' : 'é å·¦', + 'Ailgn right' : 'é å³', + 'Align center' : 'ç½®ä¸', + 'Align full' : 'å·¦å³å°é½', + 'Font color' : 'æåé¡è²', + 'Background color' : 'èæ¯é¡è²', + 'Indent' : '縮æ', + 'Outdent' : 'å¸æ', + 'Format' : 'æ ¼å¼', + 'Font size' : 'åå大å°', + 'Font' : 'åå', + 'Ordered list' : 'ç·¨è', + 'Unordered list' : 'é ç®ç¬¦è', + 'Horizontal rule' : 'æ°´å¹³ç·', + 'Blockquote' : 'å¼ç¨', + 'Block element (DIV)' : 'ååå 件 (DIV)', + 'Link' : 'é£çµ', + 'Delete link' : '移é¤é£çµ', + 'Bookmark' : 'æ¸ç±¤', + 'Image' : 'æå', + 'Table' : 'è¡¨æ ¼', + 'Delete table' : 'åªé¤è¡¨æ ¼', + 'Insert row before' : 'ä¸æ¹æ°å¢ä¸å', + 'Insert row after' : 'ä¸æ¹æ°å¢ä¸å', + 'Delete row' : 'åªé¤å', + 'Insert column before' : 'å·¦éæ°å¢ä¸æ¬', + 'Insert column after' : 'å³éæ°å¢ä¸æ¬', + 'Delete column' : 'åªé¤æ¬', + 'Merge table cells' : 'åä½µå²åæ ¼', + 'Split table cell' : 'åå²å²åæ ¼', + 'Toggle display document structure' : 'åæ顯示æ件çµæ§', + 'Table cell properties' : 'è¡¨æ ¼å²åæ ¼å±¬æ§', + 'Table properties' : 'è¡¨æ ¼å±¬æ§', + 'Toggle full screen mode' : 'åæçºå ¨è¢å¹', + 'Open file manager' : 'éåæªæ¡ç®¡ç', + 'Non breakable space' : 'ä¸æ·è¡ç©ºç½', + 'Stop element floating' : 'åæ¢å 件浮å屬æ§', + // dialogs + 'Warning' : 'è¦å', + 'Properies' : '屬æ§', + 'Popup' : 'è·³åºæ¡', + 'Advanced' : 'é²é', + 'Events' : 'äºä»¶', + 'Width' : '寬度', + 'Height' : 'é«åº¦', + 'Left' : 'é å·¦', + 'Center' : 'ç½®ä¸', + 'Right' : 'é å³', + 'Border' : 'éæ¡', + 'Background' : 'èæ¯', + 'Css class' : 'CSSé¡å¥', + 'Css style' : 'CSS樣å¼', + 'No' : 'ä¸è¨ç½®', + 'Title' : 'æ¨é¡', + 'Script direction' : 'èªè¨æ¹å', + 'Language' : 'èªè¨', + 'Charset' : 'åå 編碼', + 'Not set' : 'ä¸è¨å®', + 'Left to right' : 'å·¦è³å³', + 'Right to left' : 'å³å°å·¦', + 'In this window' : 'å¨æ¤è¦çª', + 'In new window (_blank)' : 'å¨æ°è¦çª (_blank)', + 'In new parent window (_parent)' : 'å¨ç¶è¦çª (_parent)', + 'In top frame (_top)' : 'è·³åºæ¡æ¶ (_top)', + 'URL' : '網å', + 'Open in' : 'éåè³', + 'Open file manger' : 'éåæªæ¡ç®¡çå¡', + // copy + 'This operation is disabled in your browser on security reason. Use shortcut instead.' : 'æ¤åä½è¢«ä½ çç覽å¨åºæ¼å®å ¨çç±æç¦æ¢ï¼è«ç´æ¥ç¨å¿«æ·éµã', + // format + 'Heading 1' : 'æ¨é¡ 1', + 'Heading 2' : 'æ¨é¡ 2', + 'Heading 3' : 'æ¨é¡ 3', + 'Heading 4' : 'æ¨é¡ 4', + 'Heading 5' : 'æ¨é¡ 5', + 'Heading 6' : 'æ¨é¡ 6', + 'Paragraph' : '段è½', + 'Address' : 'ä½å', + 'Preformatted' : 'åºå®æ ¼å¼', + // font size + 'Small (8pt)' : 'æ¥µå° (8pt)', + 'Small (10px)' : 'æ´å° (10px)', + 'Small (12pt)' : 'å° (12pt)', + 'Normal (14pt)' : 'ä¸ (14pt)', + 'Large (18pt)' : '大 (18pt)', + 'Large (24pt)' : 'æ´å¤§ (24pt)', + 'Large (36pt)' : '極大 (36pt)', + // bookmark + 'Bookmark name' : 'æ¸ç±¤å稱', + // link + 'Link URL' : 'é£çµä½å', + 'Target' : 'ç®æ¨', + 'Select bookmark' : 'é¸ææ¸ç±¤', + 'Open link in popup window' : 'å¨è·³åºè¦çªä¸éå', + 'Window name' : 'è¦çªå稱', + 'Window size' : 'è¦çªå°ºå¯¸', + 'Window position' : 'è¦çªä½ç½®', + 'Location bar' : 'ä½åå', + 'Menu bar' : 'é¸å®å', + 'Toolbar' : 'å·¥å ·å', + 'Scrollbars' : 'æ²è»¸', + 'Status bar' : 'çæ å', + 'Resizable' : 'å¯å¦èª¿æ´å°ºå¯¸', + 'Depedent' : 'ç¸é (Netscape)', + 'Add return false' : 'å å ¥å³åfalse (return false)', + 'Target MIME type' : 'ç®æ¨ç©çMIMEé¡å', + 'Relationship page to target (rel)' : 'å®ç¾©é£çµçèµ·é»æ件èç®æ¨æ件ä¹éçéä¿ (rel)', + 'Relationship target to page (rev)' : 'å®ç¾©é£çµçèµ·é»æ件èç®æ¨æ件ä¹éçååéä¿ (rev)', + 'Tab index' : 'å®ä½ç´¢å¼', + 'Access key' : 'å¿«ééµ', + // image + 'Size' : '尺寸', + 'Preview' : 'é 覽', + 'Margins' : 'éç', + 'Alt text' : 'æ示æå', + 'Image URL' : 'åæªç¶²å', + // table + 'Spacing' : 'å²åæ ¼éè· (Spacing)', + 'Padding' : 'å²åæ ¼å §è· (Padding)', + 'Rows' : 'å', + 'Columns' : 'æ¬', + 'Groups' : 'å²åæ ¼ç¾¤çµ', + 'Cells' : 'å²åæ ¼', + 'Caption' : 'è¡¨æ ¼æ¨é¡', + 'Inner borders' : 'æ¡ç·', + // table cell + 'Table cell type' : 'è¡¨æ ¼å²åæ ¼åæ ', + 'Data' : 'è³æ', + 'Header' : 'æ¨é¡', + 'Justify' : 'ææ´é½', + 'Paddings' : 'å §è·', + 'Apply to' : 'é©ç¨æ¼', + 'Current cell' : 'ç®åå²åæ ¼', + 'All cells in row' : 'ååææå²åæ ¼', + 'All cells in column' : 'åæ¬ææå²åæ ¼', + 'All cells in table' : 'è¡¨æ ¼ææå²åæ ¼', + // about + 'About elRTE' : 'éæ¼ elRTE', + 'Version' : 'çæ¬', + 'Licence' : '許å¯è', + 'elRTE is an open-source JavaScript based WYSIWYG HTML-editor.' : 'elRTE æ¯ä¸åéæ¾æºç¢¼ JavaScript çºåºç¤çæè¦å³æå¾ HTML 編輯å¨ã', + 'Main goal of the editor - simplify work with text and formating (HTML) on sites, blogs, forums and other online services.' : 'æ¤ç·¨è¼¯å¨ä¸»è¦ç®æ¨ - ç°¡å網ç«, é¨è½æ ¼, è«å£å許å¤ç·ä¸æåå¨æåèçèç·¨æ (HTML) çå·¥ä½ã', + 'You can use it in any commercial or non-commercial projects.' : 'ä½ å¯ç¨æ¼ä»»ä½åæ¥æè éåæ¥å°æ¡ä¸ã', + 'Authors' : 'ä½è ', + 'Chief developer' : '主åéç¼è ', + 'Developer, tech support' : 'éç¼è , æè¡æ¯æ´', + 'Developer' : 'éç¼è ', + 'Interface designer' : 'ä»é¢è¨è¨å¸«', + 'Spanish localization' : '西ççç¿»è¯', + 'Czech localization' : 'æ·å ç¿»è¯', + 'Japanese localization' : 'æ¥æç¿»è¯', + 'Latvian localization' : 'æè«ç¶äºç¿»è¯', + 'German localization' : 'å¾·æç¿»è¯', + 'Ukranian localization' : 'çå èç¿»è¯', + 'Persian (farsi) localization' : 'æ³¢æ¯ç¿»è¯', + 'Arabic localization' : 'é¿æ伯翻è¯', + 'RTL support' : 'RTL æ¯æ´', + 'French localization' : 'æ³æç¿»è¯', + 'Dutch localization' : 'è·èç¿»è¯', + 'Hungarian localization' : 'åçå©ç¿»è¯', + 'Polish localization' : 'æ³¢èç¿»è¯', + 'Italian localization' : '義大å©ç¿»è¯', + 'Traditional Chinese localization' : 'ä¸æç¿»è¯', + 'For more information about this software visit the' : 'æ´å¤éæ¼æ¤è»é«çè³è¨è«æ訪', + 'elRTE website' : 'elRTE 網ç«' +} +})(jQuery); Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/i18n/elrte.zh_TW.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/i18n/elrte.zh_TW.js ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/i18n/elrte.zh_TW.js ------------------------------------------------------------------------------ svn:mime-type = text/plain Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/ ------------------------------------------------------------------------------ bugtraq:number = true Added: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/about.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/about.js?rev=1178141&view=auto ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/about.js (added) +++ ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/about.js Sun Oct 2 08:06:49 2011 @@ -0,0 +1,54 @@ +(function($) { + elRTE.prototype.ui.prototype.buttons.about = function(rte, name) { + + this.constructor.prototype.constructor.call(this, rte, name); + this.active = true; + this.command = function() { + var opts, d, txt; + + opts = { + rtl : rte.rtl, + submit : function(e, d) { d.close(); }, + dialog : { + width : 560, + title : this.rte.i18n('About this software'), + buttons : { + Ok : function() { $(this).dialog('destroy'); } + } + } + } + + txt = '<div class="elrte-logo"></div><h3>'+this.rte.i18n('About elRTE')+'</h3><br clear="all"/>' + +'<div class="elrte-ver">'+this.rte.i18n('Version')+': '+this.rte.version+' ('+this.rte.build+')</div>' + +'<div class="elrte-ver">jQuery: '+$('<div/>').jquery+'</div>' + +'<div class="elrte-ver">jQueryUI: '+$.ui.version+'</div>' + +'<div class="elrte-ver">'+this.rte.i18n('Licence')+': BSD Licence</div>' + +'<p>' + +this.rte.i18n('elRTE is an open-source JavaScript based WYSIWYG HTML-editor.')+'<br/>' + +this.rte.i18n('Main goal of the editor - simplify work with text and formating (HTML) on sites, blogs, forums and other online services.')+'<br/>' + +this.rte.i18n('You can use it in any commercial or non-commercial projects.') + +'</p>' + +'<h4>'+this.rte.i18n('Authors')+'</h4>' + +'<table class="elrte-authors">' + +'<tr><td>Dmitry (dio) Levashov <[hidden email]></td><td>'+this.rte.i18n('Chief developer')+'</td></tr>' + +'<tr><td>Troex Nevelin <[hidden email]></td><td>'+this.rte.i18n('Developer, tech support')+'</td></tr>' + +'<tr><td>Valentin Razumnyh <[hidden email]></td><td>'+this.rte.i18n('Interface designer')+'</td></tr>' + +'<tr><td>Tawfek Daghistani <[hidden email]></td><td>'+this.rte.i18n('RTL support')+'</td></tr>' + +(this.rte.options.lang != 'en' ? '<tr><td>'+this.rte.i18n('_translator')+'</td><td>'+this.rte.i18n('_translation')+'</td></tr>' : '') + +'</table>' + +'<div class="elrte-copy">Copyright © 2009-2011, <a href="http://www.std42.ru">Studio 42</a></div>' + +'<div class="elrte-copy">'+this.rte.i18n('For more information about this software visit the')+' <a href="http://elrte.org">'+this.rte.i18n('elRTE website')+'.</a></div>' + +'<div class="elrte-copy">Twitter: <a href="http://twitter.com/elrte_elfinder">elrte_elfinder</a></div>'; + + d = new elDialogForm(opts); + d.append(txt); + d.open(); + } + + this.update = function() { + this.domElem.removeClass('disabled'); + } + + } + +})(jQuery); Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/about.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/about.js ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/about.js ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/anchor.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/anchor.js?rev=1178141&view=auto ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/anchor.js (added) +++ ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/anchor.js Sun Oct 2 08:06:49 2011 @@ -0,0 +1,62 @@ +/** + * @class кнопка - Ðакладка (оÑкÑÑÐ²Ð°ÐµÑ Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¾Ðµ окно) + * + * @param elRTE rte обÑекÑ-ÑедакÑÐ¾Ñ + * @param String name название кнопки + * + * @author: Dmitry Levashov (dio) [hidden email] + **/ +(function($) { +elRTE.prototype.ui.prototype.buttons.anchor = function(rte, name) { + this.constructor.prototype.constructor.call(this, rte, name); + this.input = $('<input type="text" />').attr('name', 'anchor').attr('size', '16') + var self = this; + + this.command = function() { + var opts = { + rtl : this.rte.rtl, + submit : function(e, d) { e.stopPropagation(); e.preventDefault(); d.close(); self.set(); }, + dialog : { + title : this.rte.i18n('Bookmark') + } + } + + + this.anchor = this.rte.dom.selfOrParentAnchor(this.rte.selection.getEnd()) || rte.dom.create('a'); + !this.rte.selection.collapsed() && this.rte.selection.collapse(false); + this.input.val($(this.anchor).addClass('elrte-anchor').attr('name')); + this.rte.selection.saveIERange(); + var d = new elDialogForm(opts); + d.append([this.rte.i18n('Bookmark name'), this.input], null, true).open(); + setTimeout(function() { self.input.focus()}, 20); + } + + this.update = function() { + var n = this.rte.selection.getNode(); + if (this.rte.dom.selfOrParentLink(n)) { + this.domElem.addClass('disabled'); + } else if (this.rte.dom.selfOrParentAnchor(n)) { + this.domElem.removeClass('disabled').addClass('active'); + } else { + this.domElem.removeClass('disabled').removeClass('active'); + } + } + + this.set = function() { + var n = $.trim(this.input.val()); + + if (n) { + this.rte.history.add(); + if (!this.anchor.parentNode) { + this.rte.selection.insertHtml('<a name="'+n+'" title="'+this.rte.i18n('Bookmark')+': '+n+'" class="elrte-anchor"></a>'); + } else { + this.anchor.name = n; + this.anchor.title = this.rte.i18n('Bookmark')+': '+n; + } + } else if (this.anchor.parentNode) { + this.rte.history.add(); + this.anchor.parentNode.removeChild(this.anchor); + } + } +} +})(jQuery); Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/anchor.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/anchor.js ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/anchor.js ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/blockquote.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/blockquote.js?rev=1178141&view=auto ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/blockquote.js (added) +++ ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/blockquote.js Sun Oct 2 08:06:49 2011 @@ -0,0 +1,40 @@ +/** + * @class кнопка - ЦиÑаÑа + * ÐÑли вÑделение ÑÑ Ð»Ð¾Ð¿Ð½ÑÑо и Ð½Ð°Ñ Ð¾Ð´Ð¸ÑÑÑ Ð²Ð½ÑÑÑи ÑиÑаÑÑ - она ÑдалÑеÑÑÑ + * ÐовÑе ÑиÑаÑÑ ÑоздаÑÑÑÑ ÑолÑко из неÑÑ Ð»Ð¾Ð¿Ð½ÑÑого вÑÐ´ÐµÐ»ÐµÐ½Ð¸Ñ + * + * @param elRTE rte обÑекÑ-ÑедакÑÐ¾Ñ + * @param String name название кнопки + * + * @author: Dmitry Levashov (dio) [hidden email] + * @copyright: Studio 42, http://www.std42.ru + **/ +(function($) { +elRTE.prototype.ui.prototype.buttons.blockquote = function(rte, name) { + this.constructor.prototype.constructor.call(this, rte, name); + + this.command = function() { + var n, nodes; + this.rte.history.add(); + if (this.rte.selection.collapsed() && (n = this.rte.dom.selfOrParent(this.rte.selection.getNode(), /^BLOCKQUOTE$/))) { + $(n).replaceWith($(n).html()); + } else { + nodes = this.rte.selection.selected({wrap : 'all', tag : 'blockquote'}); + nodes.length && this.rte.selection.select(nodes[0], nodes[nodes.length-1]); + } + this.rte.ui.update(true); + } + + this.update = function() { + if (this.rte.selection.collapsed()) { + if (this.rte.dom.selfOrParent(this.rte.selection.getNode(), /^BLOCKQUOTE$/)) { + this.domElem.removeClass('disabled').addClass('active'); + } else { + this.domElem.addClass('disabled').removeClass('active'); + } + } else { + this.domElem.removeClass('disabled active'); + } + } +} +})(jQuery); Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/blockquote.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/blockquote.js ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/blockquote.js ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/copy.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/copy.js?rev=1178141&view=auto ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/copy.js (added) +++ ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/copy.js Sun Oct 2 08:06:49 2011 @@ -0,0 +1,46 @@ +/** + * @class кнопки "копиÑоваÑÑ/вÑÑезаÑÑ/вÑÑавиÑÑ" + * в firefox показÑÐ²Ð°ÐµÑ Ð¿Ñедложение нажаÑÑ Ctl+c, в оÑÑалÑнÑÑ - копиÑÑÐµÑ + * + * @param elRTE rte обÑекÑ-ÑедакÑÐ¾Ñ + * @param String name название кнопки + * + * @author: Dmitry Levashov (dio) [hidden email] + * @copyright: Studio 42, http://www.std42.ru + **/ +(function($) { +elRTE.prototype.ui.prototype.buttons.copy = function(rte, name) { + this.constructor.prototype.constructor.call(this, rte, name); + + this.command = function() { + + if (this.rte.browser.mozilla) { + try { + this.rte.doc.execCommand(this.name, false, null); + } catch (e) { + var s = ' Ctl + C'; + if (this.name == 'cut') { + s = ' Ctl + X'; + } else if (this.name == 'paste') { + s = ' Ctl + V'; + } + var opts = { + dialog : { + title : this.rte.i18n('Warning'), + buttons : { Ok : function() { $(this).dialog('close'); } } + } + } + + var d = new elDialogForm(opts); + d.append(this.rte.i18n('This operation is disabled in your browser on security reason. Use shortcut instead.')+': '+s).open(); + } + } else { + this.constructor.prototype.command.call(this); + } + } +} + +elRTE.prototype.ui.prototype.buttons.cut = elRTE.prototype.ui.prototype.buttons.copy; +elRTE.prototype.ui.prototype.buttons.paste = elRTE.prototype.ui.prototype.buttons.copy; + +})(jQuery); \ No newline at end of file Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/copy.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/copy.js ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/copy.js ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/css.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/css.js?rev=1178141&view=auto ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/css.js (added) +++ ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/css.js Sun Oct 2 08:06:49 2011 @@ -0,0 +1,61 @@ +(function($) { + + elRTE.prototype.ui.prototype.buttons.css = function(rte, name) { + var self = this; + this.constructor.prototype.constructor.call(this, rte, name); + this.cssStyle = $('<input type="text" size="42" name="style" />'); + this.cssClass = $('<input type="text" size="42" name="class" />'); + this.elementID = $('<input type="text" size="42" name="id" />'); + + this.command = function() { + var n = this.node(), opts; + this.rte.selection.saveIERange(); + if (n) { + var opts = { + + submit : function(e, d) { e.stopPropagation(); e.preventDefault(); d.close(); self.set(); }, + dialog : { + title : this.rte.i18n('Style'), + width : 450, + resizable : true, + modal : true + } + } + this.cssStyle.val($(n).attr('style')); + this.cssClass.val($(n).attr('class')); + this.elementID.val($(n).attr('id')); + var d = new elDialogForm(opts); + d.append([this.rte.i18n('Css style'), this.cssStyle], null, true) + d.append([this.rte.i18n('Css class'), this.cssClass], null, true) + d.append([this.rte.i18n('ID'), this.elementID], null, true) + d.open(); + setTimeout(function() { self.cssStyle.focus() }, 20) + } + } + + this.set = function() { + var n = this.node(); + this.rte.selection.restoreIERange(); + if (n) { + $(n).attr('style', this.cssStyle.val()); + $(n).attr('class', this.cssClass.val()); + $(n).attr('id', this.elementID.val()); + this.rte.ui.update(); + } + } + + this.node = function() { + var n = this.rte.selection.getNode(); + if (n.nodeType == 3) { + n = n.parentNode; + } + return n.nodeType == 1 && n.nodeName != 'BODY' ? n : null; + } + + this.update = function() { + this.domElem.toggleClass('disabled', this.node()?false:true); + } + + } + +})(jQuery); Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/css.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/css.js ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/css.js ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/direction.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/direction.js?rev=1178141&view=auto ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/direction.js (added) +++ ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/direction.js Sun Oct 2 08:06:49 2011 @@ -0,0 +1,93 @@ + +(function($) { + /** + * @class button - right to left direction (not work yet with text nodes in body) + * + * @param elRTE rte обÑекÑ-ÑедакÑÐ¾Ñ + * @param String name название кнопки + * + * @author: Dmitry Levashov (dio) [hidden email] + * Copyright: Studio 42, http://www.std42.ru + **/ + elRTE.prototype.ui.prototype.buttons.rtl = function(rte, name) { + this.constructor.prototype.constructor.call(this, rte, name); + var self = this; + + this.command = function() { + var n = this.rte.selection.getNode(), self = this; + if ($(n).attr('dir') == 'rtl' || $(n).parents('[dir="rtl"]').length || $(n).find('[dir="rtl"]').length) { + $(n).removeAttr('dir'); + $(n).parents('[dir="rtl"]').removeAttr('dir'); + $(n).find('[dir="rtl"]').removeAttr('dir'); + } else { + if (this.rte.dom.is(n, 'textNodes') && this.rte.dom.is(n, 'block')) { + $(n).attr('dir', 'rtl'); + } else { + $.each(this.rte.dom.parents(n, 'textNodes'), function(i, n) { + if (self.rte.dom.is(n, 'block')) { + $(n).attr('dir', 'rtl'); + return false; + } + }); + } + } + this.rte.ui.update(); + } + + this.update = function() { + var n = this.rte.selection.getNode(); + this.domElem.removeClass('disabled'); + if ($(n).attr('dir') == 'rtl' || $(n).parents('[dir="rtl"]').length || $(n).find('[dir="rtl"]').length) { + this.domElem.addClass('active'); + } else { + this.domElem.removeClass('active'); + } + } + } + + /** + * @class button - left to right direction (not work yet with text nodes in body) + * + * @param elRTE rte обÑекÑ-ÑедакÑÐ¾Ñ + * @param String name название кнопки + * + * @author: Dmitry Levashov (dio) [hidden email] + * Copyright: Studio 42, http://www.std42.ru + **/ + elRTE.prototype.ui.prototype.buttons.ltr = function(rte, name) { + this.constructor.prototype.constructor.call(this, rte, name); + var self = this; + + this.command = function() { + var n = this.rte.selection.getNode(), self = this; + if ($(n).attr('dir') == 'ltr' || $(n).parents('[dir="ltr"]').length || $(n).find('[dir="ltr"]').length) { + $(n).removeAttr('dir'); + $(n).parents('[dir="ltr"]').removeAttr('dir'); + $(n).find('[dir="ltr"]').removeAttr('dir'); + } else { + if (this.rte.dom.is(n, 'textNodes') && this.rte.dom.is(n, 'block')) { + $(n).attr('dir', 'ltr'); + } else { + $.each(this.rte.dom.parents(n, 'textNodes'), function(i, n) { + if (self.rte.dom.is(n, 'block')) { + $(n).attr('dir', 'ltr'); + return false; + } + }); + } + } + this.rte.ui.update(); + } + + this.update = function() { + var n = this.rte.selection.getNode(); + this.domElem.removeClass('disabled'); + if ($(n).attr('dir') == 'ltr' || $(n).parents('[dir="ltr"]').length || $(n).find('[dir="ltr"]').length) { + this.domElem.addClass('active'); + } else { + this.domElem.removeClass('active'); + } + } + } + +})(jQuery); \ No newline at end of file Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/direction.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/direction.js ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/direction.js ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/div.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/div.js?rev=1178141&view=auto ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/div.js (added) +++ ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/div.js Sun Oct 2 08:06:49 2011 @@ -0,0 +1,44 @@ +/** + * @class кнопка - DIV + * ÐÑли вÑделение ÑÑ Ð»Ð¾Ð¿Ð½ÑÑо и Ð½Ð°Ñ Ð¾Ð´Ð¸ÑÑÑ Ð²Ð½ÑÑÑи div'a - он ÑдалÑеÑÑÑ + * ÐовÑе div'Ñ ÑоздаÑÑÑÑ ÑолÑко из неÑÑ Ð»Ð¾Ð¿Ð½ÑÑого вÑÐ´ÐµÐ»ÐµÐ½Ð¸Ñ + * + * @param elRTE rte обÑекÑ-ÑедакÑÐ¾Ñ + * @param String name название кнопки + * + * @author: Dmitry Levashov (dio) [hidden email] + * copyright: Studio 42, http://www.std42.ru + **/ +(function($) { +elRTE.prototype.ui.prototype.buttons.div = function(rte, name) { + this.constructor.prototype.constructor.call(this, rte, name); + + this.command = function() { + var n, nodes; + this.rte.history.add(); + + if (this.rte.selection.collapsed()) { + n = this.rte.dom.selfOrParent(this.rte.selection.getNode(), /^DIV$/); + if (n) { + $(n).replaceWith($(n).html()); + } + } else { + nodes = this.rte.selection.selected({wrap : 'all', tag : 'div'}); + nodes.length && this.rte.selection.select(nodes[0], nodes[nodes.length-1]); + } + this.rte.ui.update(true); + } + + this.update = function() { + if (this.rte.selection.collapsed()) { + if (this.rte.dom.selfOrParent(this.rte.selection.getNode(), /^DIV$/)) { + this.domElem.removeClass('disabled').addClass('active'); + } else { + this.domElem.addClass('disabled active'); + } + } else { + this.domElem.removeClass('disabled active'); + } + } +} +})(jQuery); Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/div.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/div.js ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/div.js ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/docstructure.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/docstructure.js?rev=1178141&view=auto ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/docstructure.js (added) +++ ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/docstructure.js Sun Oct 2 08:06:49 2011 @@ -0,0 +1,24 @@ +/** + * @class кнопка - ÐклÑÑение/вÑклÑÑение показа ÑÑÑÑкÑÑÑÑ Ð´Ð¾ÐºÑменÑа + * + * @param elRTE rte обÑекÑ-ÑедакÑÐ¾Ñ + * @param String name название кнопки + * + * @author: Dmitry Levashov (dio) [hidden email] + * @copyright: Studio 42, http://www.std42.ru + **/ +(function($) { +elRTE.prototype.ui.prototype.buttons.docstructure = function(rte, name) { + this.constructor.prototype.constructor.call(this, rte, name); + + this.command = function() { + this.domElem.toggleClass('active'); + $(this.rte.doc.body).toggleClass('el-rte-structure'); + } + this.command(); + + this.update = function() { + this.domElem.removeClass('disabled'); + } +} +})(jQuery); Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/docstructure.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/docstructure.js ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/docstructure.js ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/elfinder.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/elfinder.js?rev=1178141&view=auto ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/elfinder.js (added) +++ ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/elfinder.js Sun Oct 2 08:06:49 2011 @@ -0,0 +1,39 @@ +/** + * @class button - open elfinder window (not needed for image or link buttons).Used in ELDORADO.CMS for easy file manipulations. + * + * @param elRTE rte обÑекÑ-ÑедакÑÐ¾Ñ + * @param String name название кнопки + * + * @author: Dmitry Levashov (dio) [hidden email] + * @copyright: Studio 42, http://www.std42.ru + **/ +(function($) { +elRTE.prototype.ui.prototype.buttons.elfinder = function(rte, name) { + this.constructor.prototype.constructor.call(this, rte, name); + var self = this, + rte = this.rte; + this.command = function() { + if (self.rte.options.fmAllow && typeof(self.rte.options.fmOpen) == 'function') { + self.rte.options.fmOpen( function(url) { + var name = decodeURIComponent(url.split('/').pop().replace(/\+/g, " ")); + + if (rte.selection.collapsed()) { + rte.selection.insertHtml('<a href="'+url+'" >'+name+'</a>'); + } else { + rte.doc.execCommand('createLink', false, url); + } + + } ); + } + } + + this.update = function() { + if (self.rte.options.fmAllow && typeof(self.rte.options.fmOpen) == 'function') { + this.domElem.removeClass('disabled'); + } else { + this.domElem.addClass('disabled'); + } + } +} + +})(jQuery); Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/elfinder.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/elfinder.js ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/elfinder.js ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/flash.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/flash.js?rev=1178141&view=auto ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/flash.js (added) +++ ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/flash.js Sun Oct 2 08:06:49 2011 @@ -0,0 +1,341 @@ +(function($) { + + elRTE.prototype.ui.prototype.buttons.flash = function(rte, name) { + this.constructor.prototype.constructor.call(this, rte, name); + var self = this; + this.swf = null; + this.placeholder = null; + this.src = { + url : $('<input type="text" name="url" />').css('width', '99%'), + type : $('<select name="type"/>') + .append('<option value="application/x-shockwave-flash">Flash</option>') + .append('<option value="video/quicktime">Quicktime movie</option>') + .append('<option value="application/x-mplayer2">Windows media</option>'), + width : $('<input type="text" />').attr('size', 5).css('text-align', 'right'), + height : $('<input type="text" />').attr('size', 5).css('text-align', 'right'), + wmode : $('<select />') + .append($('<option />').val('').text(this.rte.i18n('Not set', 'dialogs'))) + .append($('<option />').val('transparent').text(this.rte.i18n('Transparent'))), + align : $('<select />') + .append($('<option />').val('').text(this.rte.i18n('Not set', 'dialogs'))) + .append($('<option />').val('left' ).text(this.rte.i18n('Left'))) + .append($('<option />').val('right' ).text(this.rte.i18n('Right'))) + .append($('<option />').val('top' ).text(this.rte.i18n('Top'))) + .append($('<option />').val('text-top' ).text(this.rte.i18n('Text top'))) + .append($('<option />').val('middle' ).text(this.rte.i18n('middle'))) + .append($('<option />').val('baseline' ).text(this.rte.i18n('Baseline'))) + .append($('<option />').val('bottom' ).text(this.rte.i18n('Bottom'))) + .append($('<option />').val('text-bottom').text(this.rte.i18n('Text bottom'))), + margin : $('<div />') + } + + this.command = function() { + + var n = this.rte.selection.getEnd(), opts, url='', w='', h='', f, a, d, mid, o, wm; + this.rte.selection.saveIERange(); + this.src.margin.elPaddingInput({ type : 'margin' }); + this.placeholder = null; + this.swf = null; + if ($(n).hasClass('elrte-media') && (mid = $(n).attr('rel')) && this.rte.filter.scripts[mid]) { + this.placeholder = $(n); + o = this.rte.filter.scripts[mid]; + url = ''; + if (o.embed && o.embed.src) { + url = o.embed.src; + } + if (o.params && o.params.length) { + l = o.params.length; + while (l--) { + if (o.params[l].name == 'src' || o.params[l].name == 'movie') { + url = o.params[l].value; + } + } + } + + if (o.embed) { + w = o.embed.width||parseInt(o.embed.style.width)||''; + h = o.embed.height||parseInt(o.embed.style.height)||''; + wm = o.embed.wmode||''; + } else if (o.obj) { + w = o.obj.width||parseInt(o.obj.style.width)||''; + h = o.obj.height||parseInt(o.obj.style.height)||''; + wm = o.obj.wmode||''; + } + + if (o.obj) { + f = o.obj.style['float']||''; + a = o.obj.style['vertical-align']||''; + } else if (o.embed) { + f = o.embed.style['float']||''; + a = o.embed.style['vertical-align']||''; + } + this.src.margin.val(n); + this.src.type.val(o.embed ? o.embed.type : ''); + } + if ($(n).hasClass('elrte-swf-placeholder')) { + this.placeholder = $(n); + url = $(n).attr('rel'); + w = parseInt($(n).css('width'))||''; + h = parseInt($(n).css('height'))||''; + f = $(n).css('float'); + a = $(n).css('vertical-align'); + this.src.margin.val(n); + this.src.wmode.val($(n).attr('wmode')); + } + this.src.url.val(url); + this.src.width.val(w); + this.src.height.val(h); + this.src.align.val(f||a); + this.src.wmode.val(wm); + + + + + var opts = { + rtl : this.rte.rtl, + submit : function(e, d) { e.stopPropagation(); e.preventDefault(); self.set(); d.close(); }, + dialog : { + width : 580, + position : 'top', + title : this.rte.i18n('Flash') + } + } + var d = new elDialogForm(opts); + + if (this.rte.options.fmAllow && this.rte.options.fmOpen) { + var src = $('<span />').append(this.src.url.css('width', '85%')) + .append( + $('<span />').addClass('ui-state-default ui-corner-all') + .css({'float' : 'right', 'margin-right' : '3px'}) + .attr('title', self.rte.i18n('Open file manger')) + .append($('<span />').addClass('ui-icon ui-icon-folder-open')) + .click( function() { + self.rte.options.fmOpen( function(url) { self.src.url.val(url).change(); } ); + }) + .hover(function() {$(this).addClass('ui-state-hover')}, function() { $(this).removeClass('ui-state-hover')}) + ); + } else { + var src = this.src.url; + } + + d.append([this.rte.i18n('URL'), src], null, true); + d.append([this.rte.i18n('Type'), this.src.type], null, true); + d.append([this.rte.i18n('Size'), $('<span />').append(this.src.width).append(' x ').append(this.src.height).append(' px')], null, true) + d.append([this.rte.i18n('Wmode'), this.src.wmode], null, true); + d.append([this.rte.i18n('Alignment'), this.src.align], null, true); + d.append([this.rte.i18n('Margins'), this.src.margin], null, true); + + + + d.open(); + // setTimeout( function() {self.src.url.focus()}, 100) + + + var fs = $('<fieldset />').append($('<legend />').text(this.rte.i18n('Preview'))) + d.append(fs, 'main'); + var frame = document.createElement('iframe'); + $(frame).attr('src', '#').addClass('el-rte-preview').appendTo(fs); + html = this.rte.options.doctype+'<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style="padding:0;margin:0;font-size:9px"> Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin</body></html>'; + frame.contentWindow.document.open(); + frame.contentWindow.document.write(html); + frame.contentWindow.document.close(); + this.frame = frame.contentWindow.document; + this.preview = $(frame.contentWindow.document.body); + + this.src.type.change(function() { + self.src.url.change(); + }); + + this.src.width.change(function() { + if (self.swf) { + var w = parseInt($(this).val())||''; + $(this).val(w); + self.swf.css('width', w); + self.swf.children('embed').css('width', w); + } else { + $(this).val(''); + } + }); + + this.src.height.change(function() { + if (self.swf) { + var h = parseInt($(this).val())||''; + $(this).val(h); + self.swf.css('height', h); + self.swf.children('embed').css('height', h); + } else { + $(this).val(''); + } + }); + + this.src.wmode.change(function() { + if (self.swf) { + var wm = $(this).val(); + if (wm) { + self.swf.attr('wmode', wm); + self.swf.children('embed').attr('wmode', wm); + } else { + self.swf.removeAttr('wmode'); + self.swf.children('embed').removeAttr('wmode'); + } + } + }); + + this.src.align.change(function() { + var v = $(this).val(), f = v=='left' || v=='right'; + if (self.swf) { + self.swf.css({ + 'float' : f ? v : '', + 'vertical-align' : f ? '' : v + }); + } else { + $(this).val(''); + } + }); + + this.src.margin.change(function() { + if (self.swf) { + var m = self.src.margin.val(); + if (m.css) { + self.swf.css('margin', m.css); + } else { + self.swf.css('margin-top', m.top); + self.swf.css('margin-right', m.right); + self.swf.css('margin-bottom', m.bottom); + self.swf.css('margin-left', m.left); + } + } + }); + + this.src.url.change(function() { + var url = self.rte.utils.absoluteURL($(this).val()), i, swf; + if (url) { + i = self.rte.utils.mediaInfo(self.src.type.val()); + if (!i) { + i = self.rte.util.mediaInfo('application/x-shockwave-flash'); + } + swf = '<object classid="'+i.classid+'" codebase="'+i.codebase+'"><param name="src" value="'+url+'" /><embed quality="high" src="'+url+'" type="'+i.type+'"></object>'; + self.preview.children('object').remove().end().prepend(swf); + self.swf = self.preview.children('object').eq(0); + } else if (self.swf){ + self.swf.remove(); + self.swf = null; + } + self.src.width.trigger('change'); + self.src.height.trigger('change'); + self.src.align.trigger('change'); + + }).trigger('change'); + }; + + this.set = function() { + self.swf = null + var url = this.rte.utils.absoluteURL(this.src.url.val()), + w = parseInt(this.src.width.val()) || '', + h = parseInt(this.src.height.val()) || '', + wm = this.src.wmode.val(), + a = this.src.align.val(), + f = a == 'left' || a == 'right' ? a : '', + mid = this.placeholder ? this.placeholder.attr('rel') : '', o, _o, c, + m = this.src.margin.val(), margin; + + + + if (!url) { + if (this.placeholder) { + this.placeholder.remove(); + delete this.rte.filter.scripts[mid]; + } + } else { + i = self.rte.utils.mediaInfo(self.src.type.val()); + if (!i) { + i = self.rte.util.mediaInfo('application/x-shockwave-flash'); + } + c = this.rte.filter.videoHostRegExp.test(url) ? url.replace(this.rte.filter.videoHostRegExp, "$2") : i.type.replace(/^\w+\/(.+)/, "$1"); + + o = { + obj : { + classid : i.classid[0], + codebase : i.codebase, + style : {} + }, + params :[ { name : 'src', value : url } ], + embed :{ + src : url, + type : i.type, + quality : 'high', + wmode : wm, + style : {} + } + }; + + if (w) { + o.obj.width = w; + o.embed.width = w; + } + if (h) { + o.obj.height = h; + o.embed.height = h; + } + if (f) { + o.obj.style['float'] = f; + } else if (a) { + o.obj.style['vertical-align'] = a; + } + + if (m.css) { + margin = { margin : m.css }; + } else { + margin = { + 'margin-top' : m.top, + 'margin-right' : m.right, + 'margin-bottom' : m.bottom, + 'margin-left' : m.left + }; + } + + o.obj.style = $.extend({}, o.obj.style, margin); + + if (this.placeholder && mid) { + _o = this.rte.filter.scripts[mid]||{}; + + o = $.extend(true, _o, o); + delete o.obj.style.width; + delete o.obj.style.height; + delete o.embed.style.width; + delete o.embed.style.height; + this.rte.filter.scripts[mid] = o; + this.placeholder.removeAttr('class'); + } else { + var id = 'media'+Math.random().toString().substring(2); + this.rte.filter.scripts[id] = o; + this.placeholder = $(this.rte.dom.create('img')).attr('rel', id).attr('src', this.rte.filter.url+'pixel.gif'); + var ins = true; + } + this.placeholder.attr('title', this.rte.utils.encode(url)).attr('width', w||150).attr('height', h||100).addClass('elrte-protected elrte-media elrte-media-'+c).css(o.obj.style); + if (f) { + this.placeholder.css('float', f).css('vertical-align', ''); + } else if (a) { + this.placeholder.css('float', '').css('vertical-align', a); + } else { + this.placeholder.css('float', '').css('vertical-align', ''); + } + + if (ins) { + this.rte.window.focus(); + this.rte.selection.restoreIERange(); + this.rte.selection.insertNode(this.placeholder.get(0)); + } + } + } + + this.update = function() { + this.domElem.removeClass('disabled'); + var n = this.rte.selection.getNode(); + this.domElem.toggleClass('active', n && n.nodeName == 'IMG' && $(n).hasClass('elrte-media')) + + } + + + } +})(jQuery); \ No newline at end of file Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/flash.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/flash.js ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/flash.js ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/fontname.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/fontname.js?rev=1178141&view=auto ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/fontname.js (added) +++ ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/fontname.js Sun Oct 2 08:06:49 2011 @@ -0,0 +1,64 @@ +/** + * @class drop-down menu - font-family for selected text + * + * @param elRTE rte обÑекÑ-ÑедакÑÐ¾Ñ + * @param String name название кнопки + * + * @author: Dmitry Levashov (dio) [hidden email] + * @copyright: Studio 42, http://www.std42.ru + **/ +(function($) { +elRTE.prototype.ui.prototype.buttons.fontname = function(rte, name) { + this.constructor.prototype.constructor.call(this, rte, name); + var self = this; + var opts = { + tpl : '<span style="font-family:%val">%label</span>', + select : function(v) { self.set(v); }, + src : { + '' : this.rte.i18n('Font'), + 'andale mono,sans-serif' : 'Andale Mono', + 'arial,helvetica,sans-serif' : 'Arial', + 'arial black,gadget,sans-serif' : 'Arial Black', + 'book antiqua,palatino,sans-serif' : 'Book Antiqua', + 'comic sans ms,cursive' : 'Comic Sans MS', + 'courier new,courier,monospace' : 'Courier New', + 'georgia,palatino,serif' : 'Georgia', + 'helvetica,sans-serif' : 'Helvetica', + 'impact,sans-serif' : 'Impact', + 'lucida console,monaco,monospace' : 'Lucida console', + 'lucida sans unicode,lucida grande,sans-serif' : 'Lucida grande', + 'tahoma,sans-serif' : 'Tahoma', + 'times new roman,times,serif' : 'Times New Roman', + 'trebuchet ms,lucida grande,verdana,sans-serif' : 'Trebuchet MS', + 'verdana,geneva,sans-serif' : 'Verdana' + } + } + + this.select = this.domElem.elSelect(opts); + + this.command = function() { + } + + this.set = function(size) { + this.rte.history.add(); + var nodes = this.rte.selection.selected({filter : 'textContainsNodes'}); + $.each(nodes, function() { + $this = /^(THEAD|TFOOT|TBODY|COL|COLGROUP|TR)$/.test(this.nodeName) ? $(this).find('td,th') : $(this); + $(this).css('font-family', size).find('[style]').css('font-family', ''); + }); + this.rte.ui.update(); + } + + this.update = function() { + this.domElem.removeClass('disabled'); + var n = this.rte.selection.getNode(); + if (n.nodeType != 1) { + n = n.parentNode; + } + var v = $(n).css('font-family'); + v = v ? v.toString().toLowerCase().replace(/,\s+/g, ',').replace(/'|"/g, '') : ''; + this.select.val(opts.src[v] ? v : ''); + } +} + +})(jQuery); \ No newline at end of file Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/fontname.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/fontname.js ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/fontname.js ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/fontsize.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/fontsize.js?rev=1178141&view=auto ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/fontsize.js (added) +++ ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/fontsize.js Sun Oct 2 08:06:49 2011 @@ -0,0 +1,52 @@ +/** + * @class drop-down menu - font size for selected text + * + * @param elRTE rte обÑекÑ-ÑедакÑÐ¾Ñ + * @param String name название кнопки + * + * @author: Dmitry Levashov (dio) [hidden email] + * @copyright: Studio 42, http://www.std42.ru + **/ +(function($) { +elRTE.prototype.ui.prototype.buttons.fontsize = function(rte, name) { + this.constructor.prototype.constructor.call(this, rte, name); + var self = this; + var opts = { + labelTpl : '%label', + tpl : '<span style="font-size:%val;line-height:1.2em">%label</span>', + select : function(v) { self.set(v); }, + src : { + '' : this.rte.i18n('Font size'), + 'xx-small' : this.rte.i18n('Small (8pt)'), + 'x-small' : this.rte.i18n('Small (10px)'), + 'small' : this.rte.i18n('Small (12pt)'), + 'medium' : this.rte.i18n('Normal (14pt)'), + 'large' : this.rte.i18n('Large (18pt)'), + 'x-large' : this.rte.i18n('Large (24pt)'), + 'xx-large' : this.rte.i18n('Large (36pt)') + } + } + + this.select = this.domElem.elSelect(opts); + + this.command = function() { + } + + this.set = function(size) { + this.rte.history.add(); + var nodes = this.rte.selection.selected({filter : 'textContainsNodes'}); + $.each(nodes, function() { + $this = /^(THEAD|TFOOT|TBODY|COL|COLGROUP|TR)$/.test(this.nodeName) ? $(this).find('td,th') : $(this); + $this.css('font-size', size).find("[style]").css('font-size', ''); + }); + this.rte.ui.update(); + } + + this.update = function() { + this.domElem.removeClass('disabled'); + var n = this.rte.selection.getNode(); + this.select.val((m = this.rte.dom.attr(n, 'style').match(/font-size:\s*([^;]+)/i)) ? m[1] : ''); + } +} + +})(jQuery); \ No newline at end of file Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/fontsize.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/fontsize.js ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/fontsize.js ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/forecolor.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/forecolor.js?rev=1178141&view=auto ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/forecolor.js (added) +++ ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/forecolor.js Sun Oct 2 08:06:49 2011 @@ -0,0 +1,56 @@ +/** + * @class color pallete for text color and background + * + * @param elRTE rte обÑекÑ-ÑедакÑÐ¾Ñ + * @param String name название кнопки + * + * @author: Dmitry Levashov (dio) [hidden email] + * @copyright: Studio 42, http://www.std42.ru + **/ +(function($) { +elRTE.prototype.ui.prototype.buttons.forecolor = function(rte, name) { + var self = this; + this.constructor.prototype.constructor.call(this, rte, name); + var opts = { + 'class' : '', + palettePosition : 'outer', + color : this.defaultColor, + update : function(c) { self.indicator.css('background-color', c); }, + change : function(c) { self.set(c) } + } + + this.defaultColor = this.name == 'forecolor' ? '#000000' : '#ffffff'; + this.picker = this.domElem.elColorPicker(opts); + this.indicator = $('<div />').addClass('color-indicator').prependTo(this.domElem); + + this.command = function() { + } + + this.set = function(c) { + if (!this.rte.selection.collapsed()) { + this.rte.history.add(); + var nodes = this.rte.selection.selected({collapse : false, wrap : 'text'}), + css = this.name == 'forecolor' ? 'color' : 'background-color'; + $.each(nodes, function() { + if (/^(THEAD|TBODY|TFOOT|TR)$/.test(this.nodeName)) { + $(this).find('td,th').each(function() { + $(this).css(css, c).find('*').css(css, ''); + }) + } else { + $(this).css(css, c).find('*').css(css, ''); + } + }); + this.rte.ui.update(true); + } + } + + this.update = function() { + this.domElem.removeClass('disabled'); + var n = this.rte.selection.getNode(); + this.picker.val(this.rte.utils.rgb2hex($(n.nodeType != 1 ? n.parentNode : n).css(this.name == 'forecolor' ? 'color' : 'background-color'))||this.defaultColor) + } +} + +elRTE.prototype.ui.prototype.buttons.hilitecolor = elRTE.prototype.ui.prototype.buttons.forecolor; + +})(jQuery); \ No newline at end of file Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/forecolor.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/forecolor.js ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/forecolor.js ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/formatblock.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/formatblock.js?rev=1178141&view=auto ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/formatblock.js (added) +++ ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/formatblock.js Sun Oct 2 08:06:49 2011 @@ -0,0 +1,107 @@ +/** + * @class drop-down menu - formatting text block + * + * @param elRTE rte обÑекÑ-ÑедакÑÐ¾Ñ + * @param String name название кнопки + * + * @author: Dmitry Levashov (dio) [hidden email] + * @copyright: Studio 42, http://www.std42.ru + **/ +(function($) { +elRTE.prototype.ui.prototype.buttons.formatblock = function(rte, name) { + this.constructor.prototype.constructor.call(this, rte, name); + + var cmd = this.rte.browser.msie + ? function(v) { self.val = v; self.constructor.prototype.command.call(self); } + : function(v) { self.ieCommand(v); } + var self = this; + var opts = { + labelTpl : '%label', + tpls : {'' : '%label'}, + select : function(v) { self.formatBlock(v); }, + src : { + 'span' : this.rte.i18n('Format'), + 'h1' : this.rte.i18n('Heading 1'), + 'h2' : this.rte.i18n('Heading 2'), + 'h3' : this.rte.i18n('Heading 3'), + 'h4' : this.rte.i18n('Heading 4'), + 'h5' : this.rte.i18n('Heading 5'), + 'h6' : this.rte.i18n('Heading 6'), + 'p' : this.rte.i18n('Paragraph'), + 'address' : this.rte.i18n('Address'), + 'pre' : this.rte.i18n('Preformatted'), + 'div' : this.rte.i18n('Normal (DIV)') + } + } + + this.select = this.domElem.elSelect(opts); + + this.command = function() { + + } + + this.formatBlock = function(v) { + + function format(n, tag) { + + function replaceChilds(p) { + $(p).find('h1,h2,h3,h4,h5,h6,p,address,pre').each(function() { + $(this).replaceWith($(this).html()); + }); + return p; + } + + if (/^(LI|DT|DD|TD|TH|CAPTION)$/.test(n.nodeName)) { + !self.rte.dom.isEmpty(n) && self.rte.dom.wrapContents(replaceChilds(n), tag); + } else if (/^(UL|OL|DL|TABLE)$/.test(n.nodeName)) { + self.rte.dom.wrap(n, tag); + } else { + !self.rte.dom.isEmpty(n) && $(replaceChilds(n)).replaceWith( $(self.rte.dom.create(tag)).html($(n).html())); + } + + } + this.rte.history.add(); + + var tag = v.toUpperCase(), + i, n, $n, + c = this.rte.selection.collapsed(), + bm = this.rte.selection.getBookmark(), + nodes = this.rte.selection.selected({ + collapsed : true, + blocks : true, + filter : 'textContainsNodes', + wrap : 'inline', + tag : 'span' + }) + l = nodes.length, + s = $(nodes[0]).prev(), + e = $(nodes[nodes.length-1]).next(); + + while (l--) { + n = nodes[l]; + $n = $(n); + if (tag == 'DIV' || tag == 'SPAN') { + if (/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)) { + $n.replaceWith($(this.rte.dom.create('div')).html($n.html()||'')); + } + } else { + if (/^(THEAD|TBODY|TFOOT|TR)$/.test(n.nodeName)) { + $n.find('td,th').each(function() { format(this, tag); }); + } else if (n.nodeName != tag) { + format(n, tag); + } + } + } + + this.rte.selection.moveToBookmark(bm); + + this.rte.ui.update(true); + } + + this.update = function() { + this.domElem.removeClass('disabled'); + var n = this.rte.dom.selfOrParent(this.rte.selection.getNode(), /^(H[1-6]|P|ADDRESS|PRE)$/); + this.select.val(n ? n.nodeName.toLowerCase() : 'span'); + } +} +})(jQuery); Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/formatblock.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/formatblock.js ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/formatblock.js ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/fullscreen.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/fullscreen.js?rev=1178141&view=auto ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/fullscreen.js (added) +++ ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/fullscreen.js Sun Oct 2 08:06:49 2011 @@ -0,0 +1,87 @@ +/** + * @class button - switch to fullscreen mode and back + * + * @param elRTE rte обÑекÑ-ÑедакÑÐ¾Ñ + * @param String name название кнопки + * + * @author: Dmitry Levashov (dio) [hidden email] + * @copyright: Studio 42, http://www.std42.ru + **/ +(function($) { +elRTE.prototype.ui.prototype.buttons.fullscreen = function(rte, name) { + var self = this; + this.constructor.prototype.constructor.call(this, rte, name); + this.active = true; + this.editor = rte.editor; + this.wz = rte.workzone; + this.height = 0; + this.delta = 0; + this._class = 'el-fullscreen'; + + setTimeout(function() { + self.height = self.wz.height(); + self.delta = self.editor.outerHeight()-self.height; + }, 50); + + + /** + * Update editor height on window resize in fullscreen view + * + **/ + function resize() { + self.wz.height($(window).height()-self.delta); + self.rte.updateHeight(); + } + + this.command = function() { + var w = $(window), + e = this.editor, + p = e.parents().filter(function(i, n) { return !/^(html|body)$/i.test(n.nodeName) && $(n).css('position') == 'relative'; }), + wz = this.wz, + c = this._class, + f = e.hasClass(c), + rte = this.rte, + s = this.rte.selection, + m = $.browser.mozilla, + b, h; + + function save() { + if (m) { + b = s.getBookmark(); + } + } + + function restore() { + if (m) { + self.wz.children().toggle(); + self.rte.source.focus(); + self.wz.children().toggle(); + s.moveToBookmark(b); + } + } + + save(); + p.css('position', f ? 'relative' : 'static'); + + if (f) { + e.removeClass(c); + wz.height(this.height); + w.unbind('resize', resize); + this.domElem.removeClass('active'); + } else { + e.addClass(c).removeAttr('style'); + wz.height(w.height() - this.delta).css('width', '100%'); + w.bind('resize', resize); + this.domElem.addClass('active'); + } + rte.updateHeight(); + rte.resizable(f); + restore(); + + } + + this.update = function() { + this.domElem.removeClass('disabled'); + } +} +})(jQuery); Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/fullscreen.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/fullscreen.js ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/fullscreen.js ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/horizontalrule.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/horizontalrule.js?rev=1178141&view=auto ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/horizontalrule.js (added) +++ ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/horizontalrule.js Sun Oct 2 08:06:49 2011 @@ -0,0 +1,101 @@ +/** + * @class button - horizontal rule (open dialog window) + * + * @param elRTE rte обÑекÑ-ÑедакÑÐ¾Ñ + * @param String name название кнопки + * + * @author: Dmitry Levashov (dio) [hidden email] + * @copyright: Studio 42, http://www.std42.ru + **/ +(function($) { +elRTE.prototype.ui.prototype.buttons.horizontalrule = function(rte, name) { + this.constructor.prototype.constructor.call(this, rte, name); + var self = this; + this.src = { + width : $('<input type="text" />').attr({'name' : 'width', 'size' : 4}).css('text-align', 'right'), + wunit : $('<select />').attr('name', 'wunit') + .append($('<option />').val('%').text('%')) + .append($('<option />').val('px').text('px')) + .val('%'), + height : $('<input type="text" />').attr({'name' : 'height', 'size' : 4}).css('text-align', 'right'), + bg : $('<div />'), + border : $('<div />'), + 'class' : $('<input type="text" />').css('width', '100%'), + style : $('<input type="text" />').css('width', '100%') + } + + this.command = function() { + this.src.bg.elColorPicker({palettePosition : 'outer', 'class' : 'el-colorpicker ui-icon ui-icon-pencil'}); + + var n = this.rte.selection.getEnd(); + this.hr = n.nodeName == 'HR' ? $(n) : $(rte.doc.createElement('hr')).css({width : '100%', height : '1px'}); + this.src.border.elBorderSelect({styleHeight : 73, value : this.hr}); + + var _w = this.hr.css('width') || this.hr.attr('width'); + this.src.width.val(parseInt(_w) || 100); + this.src.wunit.val(_w.indexOf('px') != -1 ? 'px' : '%'); + + this.src.height.val( this.rte.utils.toPixels(this.hr.css('height') || this.hr.attr('height')) || 1) ; + + this.src.bg.val(this.rte.utils.color2Hex(this.hr.css('background-color'))); + this.src['class'].val(this.rte.dom.attr(this.hr, 'class')); + this.src.style.val(this.rte.dom.attr(this.hr, 'style')); + + var opts = { + rtl : this.rte.rtl, + submit : function(e, d) { e.stopPropagation(); e.preventDefault(); self.set(); d.close(); }, + dialog : { + title : this.rte.i18n('Horizontal rule') + } + } + + var d = new elDialogForm(opts); + d.append([this.rte.i18n('Width'), $('<span />').append(this.src.width).append(this.src.wunit) ], null, true) + .append([this.rte.i18n('Height'), $('<span />').append(this.src.height).append(' px')], null, true) + .append([this.rte.i18n('Border'), this.src.border], null, true) + .append([this.rte.i18n('Background'), this.src.bg], null, true) + .append([this.rte.i18n('Css class'), this.src['class']], null, true) + .append([this.rte.i18n('Css style'), this.src.style], null, true) + .open(); + } + + this.update = function() { + this.domElem.removeClass('disabled'); + if (this.rte.selection.getEnd().nodeName == 'HR') { + this.domElem.addClass('active'); + } else { + this.domElem.removeClass('active'); + } + } + + this.set = function() { + this.rte.history.add(); + !this.hr.parentNode && this.rte.selection.insertNode(this.hr.get(0)); + var attr = { + noshade : true, + style : this.src.style.val() + } + var b = this.src.border.val(); + var css = { + width : (parseInt(this.src.width.val()) || 100)+this.src.wunit.val(), + height : parseInt(this.src.height.val()) || 1, + 'background-color' : this.src.bg.val(), + border : b.width && b.style ? b.width+' '+b.style+' '+b.color : '' + } + + this.hr.removeAttr('class') + .removeAttr('style') + .removeAttr('width') + .removeAttr('height') + .removeAttr('align') + .attr(attr) + .css(css); + + if (this.src['class'].val()) { + this.hr.attr('class', this.src['class'].val()); + } + this.rte.ui.update() + } + +} +})(jQuery); Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/horizontalrule.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/horizontalrule.js ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte/js/ui/horizontalrule.js ------------------------------------------------------------------------------ svn:mime-type = text/plain |
Free forum by Nabble | Edit this page |