/*\r
-Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.\r
For licensing, see LICENSE.html or http://ckeditor.com/license\r
*/\r
\r
\r
CKEDITOR.plugins.add( 'forms',\r
{\r
+ requires : [ 'dialog' ],\r
init : function( editor )\r
{\r
var lang = editor.lang;\r
\r
if ( CKEDITOR.env.ie )\r
{\r
- CKEDITOR.dom.element.prototype.hasAttribute = function( name )\r
- {\r
- var $attr = this.$.attributes.getNamedItem( name );\r
-\r
- if ( this.getName() == 'input' )\r
+ CKEDITOR.dom.element.prototype.hasAttribute = CKEDITOR.tools.override( CKEDITOR.dom.element.prototype.hasAttribute,\r
+ function( original )\r
{\r
- switch ( name )\r
- {\r
- case 'class' :\r
- return this.$.className.length > 0;\r
- case 'checked' :\r
- return !!this.$.checked;\r
- case 'value' :\r
- var type = this.getAttribute( 'type' );\r
- return type == 'checkbox' || type == 'radio' ? this.$.value != 'on' : this.$.value;\r
- }\r
- }\r
+ return function( name )\r
+ {\r
+ var $attr = this.$.attributes.getNamedItem( name );\r
+\r
+ if ( this.getName() == 'input' )\r
+ {\r
+ switch ( name )\r
+ {\r
+ case 'class' :\r
+ return this.$.className.length > 0;\r
+ case 'checked' :\r
+ return !!this.$.checked;\r
+ case 'value' :\r
+ var type = this.getAttribute( 'type' );\r
+ return type == 'checkbox' || type == 'radio' ? this.$.value != 'on' : this.$.value;\r
+ }\r
+ }\r
\r
- return !!( $attr && $attr.specified );\r
- };\r
+ return original.apply( this, arguments );\r
+ };\r
+ });\r
}\r