public/ckeditor/4.4dev/plugins/dialog/plugin.js
function( array, newItem, nextSiblingId, recurse, nullIfNotFound ) {
			if ( nextSiblingId ) {
				for ( var i = 0, item;
				( item = array[ i ] ); i++ ) {
					if ( item.id == nextSiblingId ) {
						array.splice( i, 0, newItem );
						return newItem;
					}

					if ( recurse && item[ recurse ] ) {
						var retval = addById( item[ recurse ], newItem, nextSiblingId, recurse, true );
						if ( retval )
							return retval;
					}
				}

				if ( nullIfNotFound )
					return null;
			}

			array.push( newItem );
			return newItem;
		}
function( array, newItem, nextSiblingId, recurse, nullIfNotFound ) {
			if ( nextSiblingId ) {
				for ( var i = 0, item;
				( item = array[ i ] ); i++ ) {
					if ( item.id == nextSiblingId ) {
						array.splice( i, 0, newItem );
						return newItem;
					}

					if ( recurse && item[ recurse ] ) {
						var retval = addById( item[ recurse ], newItem, nextSiblingId, recurse, true );
						if ( retval )
							return retval;
					}
				}

				if ( nullIfNotFound )
					return null;
			}

			array.push( newItem );
			return newItem;
		}
function ( array , newItem , nextSiblingId , recurse , nullIfNotFound ) { if ( nextSiblingId ) { for ( var i = 0 , item ; ( item = array [ i ] ) ; i ++ ) { if ( item . id == nextSiblingId ) { array . splice ( i , 0 , newItem ) ; return newItem ; } if ( recurse && item [ recurse ] ) { var retval = addById ( item [ recurse ] , newItem , nextSiblingId , recurse , true ) ; if ( retval ) return retval ; } } if ( nullIfNotFound ) return null ; } array . push ( newItem ) ; return newItem ; }
Tool function used to add an item into an array.
Tool function used to add an item into an array .