Index: _source/core/config.js =================================================================== --- _source/core/config.js (revision 3673) +++ _source/core/config.js (working copy) @@ -149,9 +149,7 @@ * @example * config.plugins = 'basicstyles,button,htmldataprocessor,toolbar,wysiwygarea'; */ - - plugins : 'about,basicstyles,blockquote,button,clipboard,colorbutton,contextmenu,elementspath,enterkey,entities,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,maximize,newpage,pagebreak,pastefromword,pastetext,preview,print,removeformat,resize,save,scayt,smiley,showblocks,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc', - + plugins : 'about,basicstyles,blockquote,button,clipboard,colorbutton,contextmenu,elementspath,enterkey,entities,filebrowser,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,maximize,newpage,pagebreak,pastefromword,pastetext,popup,preview,print,removeformat,save,smiley,showblocks,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc', /** * List of additional plugins to be loaded. This is a tool setting which * makes it easier to add new plugins, whithout having to touch and Index: _source/lang/en.js =================================================================== --- _source/lang/en.js (revision 3673) +++ _source/lang/en.js (working copy) @@ -545,6 +545,13 @@ panelTitle3 : 'Object Styles' }, + filebrowser : + { + browserNotConfigured : 'Unable to open file browser due to missing configuration settings', + fileNotSelected : 'Please select a file from your computer', + uploaderNotConfigured : 'Unable to upload file due to missing configuration settings' + }, + format : { label : 'Format', Index: _source/plugins/dialog/plugin.js =================================================================== --- _source/plugins/dialog/plugin.js (revision 3673) +++ _source/plugins/dialog/plugin.js (working copy) @@ -871,6 +871,17 @@ }, /** + * Gets the name of the dialog. + * @returns {String} The name of this dialog. + * @example + * var dialogName = dialogObj.getName(); + */ + getName : function() + { + return this._.name; + }, + + /** * Gets a dialog UI element object from a dialog page. * @param {String} pageId id of dialog page. * @param {String} elementId id of UI element. @@ -2177,6 +2188,29 @@ }, /** + * Gets the name of the parent tab of this element. + * @returns {String} The name of selected tab. + * @example + * focus : function() + * { + * this.getParentTab(); + * // do something else. + * } + */ + getParentTab : function() + { + var element = this.getInputElement(), + cursor = element, + tabId; + while ( ( cursor = cursor.getParent() ) && cursor.$.className.search( 'cke_dialog_page_contents' ) == -1 ) + { /*jsl:pass*/ } + + tabId = cursor.getAttribute( 'name' ); + + return tabId; + }, + + /** * Puts the focus to the UI object. Switches tabs if the UI object isn't in the active tab page. * @returns {CKEDITOR.dialog.uiElement} The current UI element. * @example Index: _source/plugins/dialogui/plugin.js =================================================================== --- _source/plugins/dialogui/plugin.js (revision 3673) +++ _source/plugins/dialogui/plugin.js (working copy) @@ -654,12 +654,16 @@ this.validate = elementDefinition.validate; var myDefinition = CKEDITOR.tools.extend( {}, elementDefinition ); + var onClick = myDefinition.onClick; myDefinition.className = ( myDefinition.className ? myDefinition.className + ' ' : '' ) + 'cke_dialog_ui_button'; myDefinition.onClick = function( evt ) { var target = elementDefinition[ 'for' ]; // [ pageId, elementId ] - dialog.getContentElement( target[0], target[1] ).submit(); - this.disable(); + if ( !onClick || onClick.call( this, evt ) !== false ) + { + dialog.getContentElement( target[0], target[1] ).submit(); + this.disable(); + } }; dialog.on( 'load', function() @@ -1197,12 +1201,22 @@ }, /** + * Get the action assigned to the form. + * @returns {String} The value of the action. + * @example + */ + getAction : function( action ) + { + return this.getInputElement().getParent().$.action; + }, + + /** * Redraws the file input and resets the file path in the file input. * The redraw logic is necessary because non-IE browsers tend to clear * the <iframe> containing the file input after closing the dialog. * @example */ - reset : function() + reset : function( action ) { var frameElement = CKEDITOR.document.getById( this._.frameId ), frameDocument = frameElement.getFrameDocument(), @@ -1219,7 +1233,7 @@ frameDocument.$.write( [ '