Changeset 2128
- Timestamp:
- 2008-06-24 17:59:21 (7 months ago)
- Location:
- CKEditor/branches/prototype
- Files:
-
- 7 added
- 1 removed
- 21 modified
-
ckeditor_basic.js (modified) (1 diff)
-
ckeditor.js (modified) (1 diff)
-
_dev/jslint (added)
-
_dev/jslint/lint.bat (added)
-
_dev/jslint/lint.conf (added)
-
_dev/jslint/lint.sh (added)
-
_dev/_thirdparty/jsl (added)
-
_dev/_thirdparty/jsl/jsl (added)
-
_dev/_thirdparty/jsl/jsl.exe (added)
-
_samples/sample01.html (modified) (1 diff)
-
_samples/sample02.html (modified) (1 diff)
-
_samples/sample.js (modified) (1 diff)
-
_source/core/ajax.js (modified) (2 diffs)
-
_source/core/ckeditor_base.js (modified) (1 diff)
-
_source/core/ckeditor_basic.js (modified) (1 diff)
-
_source/core/dom/element.js (modified) (2 diffs)
-
_source/core/editor.js (modified) (1 diff)
-
_source/core/event.js (modified) (1 diff)
-
_source/core/loader.js (modified) (1 diff)
-
_source/core/resourcemanager.js (modified) (2 diffs)
-
_source/core/scriptloader.js (modified) (3 diffs)
-
_source/core/test.js (modified) (1 diff)
-
_source/core/tools.js (modified) (1 diff)
-
_source/tests/core/editor.html (modified) (3 diffs)
-
_source/tests/core/scriptloader.html (modified) (2 diffs)
-
_source/tests/core/tools.html (modified) (1 diff)
-
_source/tests/_template.html (deleted)
-
_source/tests/test.js (modified) (2 diffs)
-
_source/tests/yuitest.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/branches/prototype/ckeditor_basic.js
r2117 r2128 21 21 22 22 // Compressed version of core/ckeditor_base.js. See original for instructions. 23 /*jsl:ignore*/ 23 24 if (!window.CKEDITOR){window.CKEDITOR=(function(){return {_:{},status:'unloaded',basePath:(function(){var A='';var B=document.getElementsByTagName('script');for (var i=0;i<B.length;i++){var C=B[i].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?.js(?:\?.*)?$/i);if (C){A=C[1];break;}};if (A.indexOf('://')==-1){if (A.indexOf('/')==0) A=location.href.match(/^.*?:\/\/[^\/]*/)[0]+A;else A=location.href.match(/^[^\?]*\//)[0]+A;};return A;})()};})();}; 25 /*jsl:end*/ 24 26 25 27 // Set the script name to be loaded by the loader. -
CKEditor/branches/prototype/ckeditor.js
r2117 r2128 21 21 22 22 // Compressed version of core/ckeditor_base.js. See original for instructions. 23 /*jsl:ignore*/ 23 24 if (!window.CKEDITOR){window.CKEDITOR=(function(){return {_:{},status:'unloaded',basePath:(function(){var A='';var B=document.getElementsByTagName('script');for (var i=0;i<B.length;i++){var C=B[i].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?.js(?:\?.*)?$/i);if (C){A=C[1];break;}};if (A.indexOf('://')==-1){if (A.indexOf('/')==0) A=location.href.match(/^.*?:\/\/[^\/]*/)[0]+A;else A=location.href.match(/^[^\?]*\//)[0]+A;};return A;})()};})();}; 25 /*jsl:end*/ 24 26 25 27 if ( CKEDITOR.loader ) -
CKEditor/branches/prototype/_samples/sample01.html
r2117 r2128 45 45 <div id="code"> 46 46 <pre> 47 <p> 47 <form action=""> 48 <p> 48 49 <label for="editor1"> 49 Editor 1:</label><br />50 Editor 1:</label><br /> 50 51 <textarea id="editor1" name="editor1" class="ckeditor" rows="10" cols="80"><p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p></textarea> 51 </p>52 <p>52 </p> 53 <p> 53 54 <label for="editor2"> 54 Editor 2:</label><br />55 Editor 2:</label><br /> 55 56 <textarea id="editor2" name="editor2" class="ckeditor" rows="10" cols="80"><p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p></textarea> 56 </p>57 <p>57 </p> 58 <p> 58 59 <input type="submit" value="Submit" /> 59 </p> 60 </p> 61 </form> 60 62 </pre> 61 63 </div> -
CKEditor/branches/prototype/_samples/sample02.html
r2083 r2128 53 53 <div id="code"> 54 54 <pre> 55 TODO 55 <form action=""> 56 <p> 57 <label for="editor1"> 58 Editor 1:</label><br /> 59 <textarea name="editor1" rows="10" cols="80"><p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p></textarea> 60 <script type="text/javascript"> 61 //<![CDATA[ 62 63 CKEDITOR.replace( 'editor1' ); 64 65 //]]> 66 </script> 67 </p> 68 <p> 69 <input type="submit" value="Submit" /> 70 </p> 71 </form> 56 72 </pre> 57 73 </div> -
CKEditor/branches/prototype/_samples/sample.js
r2083 r2128 98 98 var alsoBrowsers = ''; 99 99 100 for ( key in env )100 for ( var key in env ) 101 101 { 102 102 if ( browsers[ key ] ) -
CKEditor/branches/prototype/_source/core/ajax.js
r2083 r2128 49 49 50 50 return ( xhr.readyState == 4 && 51 ( ( xhr.status >= 200 && xhr.status < 300 ) 52 || xhr.status == 30453 || xhr.status == 054 ||xhr.status == 1223 ) );51 ( ( xhr.status >= 200 && xhr.status < 300 ) || 52 xhr.status == 304 || 53 xhr.status === 0 || 54 xhr.status == 1223 ) ); 55 55 }; 56 56 … … 103 103 104 104 return /** @lends CKEDITOR.ajax */ { 105 105 106 106 /** 107 107 * Loads data from an URL as plain text. -
CKEditor/branches/prototype/_source/core/ckeditor_base.js
r2117 r2128 99 99 { 100 100 // Absolute path. 101 if ( path.indexOf( '/' ) == 0 )101 if ( path.indexOf( '/' ) === 0 ) 102 102 path = location.href.match( /^.*?:\/\/[^\/]*/ )[0] + path; 103 103 // Relative path. -
CKEditor/branches/prototype/_source/core/ckeditor_basic.js
r2098 r2128 91 91 92 92 if ( !textarea ) 93 {94 93 throw '[CKEDITOR.replace] The <textarea> with id or name "' + elementOrIdOrName + '" was not found.'; 95 return;96 }97 94 } 98 95 -
CKEditor/branches/prototype/_source/core/dom/element.js
r2117 r2128 54 54 temp.innerHTML = html; 55 55 return new CKEDITOR.dom.element( temp.firstChild ); 56 } 56 }; 57 57 58 58 CKEDITOR.dom.element.prototype = … … 76 76 { 77 77 element.$.parentNode.insertBefore( this.$, element.$ ); 78 },79 80 insertHtmlAfter : function( html )81 {82 var temp = new CKEDITOR.dom.element( 'div' );83 temp.setHtml( html );84 85 docFrag.innerHTML = html;86 87 78 }, 88 79 -
CKEditor/branches/prototype/_source/core/editor.js
r2117 r2128 124 124 // Basic config class to inherit the default settings from CKEDITOR.config. 125 125 var config = function() 126 {} 126 {}; 127 127 config.prototype = CKEDITOR.config; 128 128 -
CKEditor/branches/prototype/_source/core/event.js
r2117 r2128 48 48 this.name = eventName; 49 49 this.listeners = []; 50 } 50 }; 51 51 52 52 eventEntry.prototype = -
CKEditor/branches/prototype/_source/core/loader.js
r2100 r2128 83 83 { 84 84 // Absolute path. 85 if ( path.indexOf( '/' ) == 0 )85 if ( path.indexOf( '/' ) === 0 ) 86 86 path = location.href.match( /^.*?:\/\/[^\/]*/ )[0] + path; 87 87 // Relative path. -
CKEditor/branches/prototype/_source/core/resourcemanager.js
r2117 r2128 82 82 83 83 // Nothing to load, just call the callback. 84 if ( total == 0)84 if ( !total ) 85 85 { 86 86 callback.call( scope || window, names ); … … 104 104 for ( var i = 0 ; i < names.length ; i++ ) 105 105 { 106 varname = names[ i ];106 name = names[ i ]; 107 107 108 108 // If not loaded already. -
CKEditor/branches/prototype/_source/core/scriptloader.js
r2098 r2128 59 59 callback.call( scope || CKEDITOR, true ); 60 60 } 61 } 61 }; 62 62 } 63 63 else … … 66 66 { 67 67 callback.call( scope || CKEDITOR, true ); 68 } 68 }; 69 69 70 70 // FIXME: Opera and Safari will not fire onerror. … … 73 73 { 74 74 callback.call( scope || CKEDITOR, false ); 75 } 75 }; 76 76 } 77 77 } -
CKEditor/branches/prototype/_source/core/test.js
r2083 r2128 19 19 * == END LICENSE == 20 20 */ 21 22 /*jsl:import ../tests/yuitest.js*/ 21 23 22 24 /** -
CKEditor/branches/prototype/_source/core/tools.js
r2098 r2128 121 121 for ( var value, i = 0 ; 122 122 i < length && ( ( value = object[i] ) || 1) && callback.call( scope, value, i ) !== false ; i++ ) 123 { }123 { /*jsl:pass*/ } 124 124 } 125 125 }, -
CKEditor/branches/prototype/_source/tests/core/editor.html
r2091 r2128 38 38 { 39 39 // Pass in-page settings to the instance. 40 CKEDITOR.replace( 'editor2', { test1 : 'ball', theme : 'test_theme' } );40 CKEDITOR.replace( 'editor2', { test1 : 'ball', baseHref : 'test' } ); 41 41 42 42 var config = CKEDITOR.instances.editor2.config; 43 43 44 44 assert.areSame( 'ball', config.test1, '"test1" doesn\'t match' ); 45 assert.areSame( 'test _theme', config.theme, '"theme" doesn\'t match' );45 assert.areSame( 'test', config.baseHref, '"baseHref" doesn\'t match' ); 46 46 47 47 // All other settings must match CKEDITOR.config. 48 48 for ( var prop in CKEDITOR.config ) 49 49 { 50 if ( prop != 'test1' && prop != ' theme' )50 if ( prop != 'test1' && prop != 'baseHref' ) 51 51 assert.areSame( CKEDITOR.config[ prop ], config[ prop ], '"' + prop + '" doesn\'t match' ); 52 52 } … … 70 70 assert.areSame( 'Ok', config.test_custom2, '"test_custom1" doesn\'t match' ); 71 71 assert.areSame( 'ball', config.test1, '"test1" doesn\'t match' ); 72 assert.areSame( 'test _theme', config.theme, '"theme" doesn\'t match' );72 assert.areSame( 'test', config.baseHref, '"baseHref" doesn\'t match' ); 73 73 74 74 // All other settings must match CKEDITOR.config. 75 75 for ( var prop in CKEDITOR.config ) 76 76 { 77 if ( prop != 'customConfig' && prop != 'test_custom1' && prop != 'test_custom2' && prop != 'test1' && prop != ' theme' )77 if ( prop != 'customConfig' && prop != 'test_custom1' && prop != 'test_custom2' && prop != 'test1' && prop != 'baseHref' ) 78 78 assert.areSame( CKEDITOR.config[ prop ], config[ prop ], '"' + prop + '" doesn\'t match' ); 79 79 } … … 84 84 85 85 // Pass in-page settings to the instance. 86 CKEDITOR.replace( 'editor3', { customConfig : '_editor/custom_config_1.js', test1 : 'ball', theme : 'test_theme' } );86 CKEDITOR.replace( 'editor3', { customConfig : '_editor/custom_config_1.js', test1 : 'ball', baseHref : 'test' } ); 87 87 88 88 this.wait(); -
CKEditor/branches/prototype/_source/tests/core/scriptloader.html
r2083 r2128 19 19 CKEDITOR.scriptLoader.loadCode( 'var test="Testing!";' ); 20 20 21 /*jsl:ignore*/ 21 22 assert.areEqual( 'Testing!', test ); 23 /*jsl:end*/ 22 24 }, 23 25 … … 29 31 testCase.resume( function() 30 32 { 33 /*jsl:ignore*/ 31 34 assert.areSame( 'Test!', testVar ); 35 /*jsl:end*/ 32 36 } ); 33 37 }; -
CKEditor/branches/prototype/_source/tests/core/tools.html
r2083 r2128 45 45 prop4 : fakeObj, 46 46 prop5 : fakeArray 47 } 47 }; 48 48 49 49 CKEDITOR.tools.extend( target, -
CKEditor/branches/prototype/_source/tests/test.js
r2090 r2128 19 19 * == END LICENSE == 20 20 */ 21 22 /*jsl:import yuitest.js*/ 21 23 22 24 // Inject the YUI Test files into the page. … … 85 87 86 88 runner.run(); 87 } 89 }; 88 90 })(); -
CKEditor/branches/prototype/_source/tests/yuitest.js
r2092 r2128 1 /* 1 /*jsl:ignoreall*/ 2 /* 2 3 Copyright (c) 2008, Yahoo! Inc. All rights reserved. 3 4 Code licensed under the BSD License: