CLICK HERE TO BUY IT TODAY! OR GET IT FREE VIA TRIALPAY  

PHP Demo Application - Source Code

/Framework/Model/Vendor/CkEditor/_source/core/imagecacher.js



/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function()
{
	    var loaded {};
	    var loadImage = function( imagecallback )
	    {
		        var doCallback = function()
		            {
			                img.removeAllListeners();
			                loadedimage ] = 1;
			                callback();
			            };
		        var img = new CKEDITOR.dom.element'img' );
		        img.on'load'doCallback );
		        img.on'error'doCallback );
		        img.setAttribute'src'image );
		    };
	    /**
	     * Load images into the browser cache.
	     * @namespace
	     * @example
	     */
	     CKEDITOR.imageCacher =
	    {
		        /**
		         * Loads one or more images.
		         * @param {Array} images The URLs for the images to be loaded.
		         * @param {Function} callback The function to be called once all images
		         *        are loaded.
		         */
		        load : function( imagescallback )
		        {
			            var pendingCount images.length;
			            var checkPending = function()
			            {
				                if ( --pendingCount === )
				                    callback();
				            };
			            for ( var ;
			 images.length ;
			 i++ )
			            {
				                var image images];
				                if ( loadedimage ] )
				                    checkPending();
				                else
				                    loadImageimagecheckPending );
				            }
			        }
		    };
	})();





PHP Demo Source Code Index