+ buttons = this._.buttons,\r
+ callNumber = this.formLoadedNumber,\r
+ unloadNumber = this.formUnloadNumber,\r
+ langDir = this._.dialog._.editor.lang.dir,\r
+ langCode = this._.dialog._.editor.langCode;\r
+\r
+ // The callback function for the iframe, but we must call tools.addFunction only once\r
+ // so we store the function number in this.formLoadedNumber\r
+ if (!callNumber)\r
+ {\r
+ callNumber = this.formLoadedNumber = CKEDITOR.tools.addFunction(\r
+ function()\r
+ {\r
+ // Now we can apply the events to the input type=file\r
+ this.fire( 'formLoaded' ) ;\r
+ }, this ) ;\r
+\r
+ // Remove listeners attached to the content of the iframe (the file input)\r
+ unloadNumber = this.formUnloadNumber = CKEDITOR.tools.addFunction(\r
+ function()\r
+ {\r
+ this.getInputElement().clearCustomData();\r
+ }, this ) ;\r
+\r
+ this.getDialog()._.editor.on( 'destroy', function()\r
+ {\r
+ CKEDITOR.tools.removeFunction( callNumber );\r
+ CKEDITOR.tools.removeFunction( unloadNumber );\r
+ } );\r
+ }\r