return function(){ this.foreach( fn ); return this; };\r
})(),\r
\r
+\r
+ /**\r
+ * Calls the {@link CKEDITOR.dialog.definition.uiElement#setup} method of each of the UI elements, with the arguments passed through it.\r
+ * It is usually being called when the dialog is opened, to put the initial value inside the field.\r
+ * @example\r
+ * dialogObj.setupContent();\r
+ * @example\r
+ * var timestamp = ( new Date() ).valueOf();\r
+ * dialogObj.setupContent( timestamp );\r
+ */\r
setupContent : function()\r
{\r
var args = arguments;\r
});\r
},\r
\r
+ /**\r
+ * Calls the {@link CKEDITOR.dialog.definition.uiElement#commit} method of each of the UI elements, with the arguments passed through it.\r
+ * It is usually being called when the user confirms the dialog, to process the values.\r
+ * @example\r
+ * dialogObj.commitContent();\r
+ * @example\r
+ * var timestamp = ( new Date() ).valueOf();\r
+ * dialogObj.commitContent( timestamp );\r
+ */\r
commitContent : function()\r
{\r
var args = arguments;\r
* @param {String} pageId id of dialog page.\r
* @param {String} elementId id of UI element.\r
* @example\r
+ * dialogObj.getContentElement( 'tabId', 'elementId' ).setValue( 'Example' );\r
* @returns {CKEDITOR.ui.dialog.uiElement} The dialog UI element.\r
*/\r
getContentElement : function( pageId, elementId )\r
* @param {String} pageId id of dialog page.\r
* @param {String} elementId id of UI element.\r
* @example\r
+ * alert( dialogObj.getValueOf( 'tabId', 'elementId' ) );\r
* @returns {Object} The value of the UI element.\r
*/\r
getValueOf : function( pageId, elementId )\r
* @param {String} elementId id of the UI element.\r
* @param {Object} value The new value of the UI element.\r
* @example\r
+ * dialogObj.setValueOf( 'tabId', 'elementId', 'Example' );\r
*/\r
setValueOf : function( pageId, elementId, value )\r
{\r
var covers = {},\r
currentCover;\r
\r
+ function cancelEvent( ev )\r
+ {\r
+ ev.data.preventDefault(1);\r
+ }\r
+\r
function showCover( editor )\r
{\r
var win = CKEDITOR.document.getWindow();\r
coverElement = CKEDITOR.dom.element.createFromHtml( html.join( '' ) );\r
coverElement.setOpacity( backgroundCoverOpacity != undefined ? backgroundCoverOpacity : 0.5 );\r
\r
+ coverElement.on( 'keydown', cancelEvent );\r
+ coverElement.on( 'keypress', cancelEvent );\r
+ coverElement.on( 'keyup', cancelEvent );\r
+\r
coverElement.appendTo( CKEDITOR.document.getBody() );\r
covers[ coverKey ] = coverElement;\r
}\r