X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fforms%2Fplugin.js;h=cd3831ca657da2d2c8b5c60ce3616e6f5442977d;hb=3fe9cac293e090ea459a3ee10d78cbe9e1dd0e03;hp=3be5c3b6606936a5cb16f76a19112d433f09deea;hpb=48b1db88210b4160dce439c6e3e32e14af8c106b;p=ckeditor.git diff --git a/_source/plugins/forms/plugin.js b/_source/plugins/forms/plugin.js index 3be5c3b..cd3831c 100644 --- a/_source/plugins/forms/plugin.js +++ b/_source/plugins/forms/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -9,6 +9,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license CKEDITOR.plugins.add( 'forms', { + requires : [ 'dialog' ], init : function( editor ) { var lang = editor.lang; @@ -261,24 +262,28 @@ CKEDITOR.plugins.add( 'forms', if ( CKEDITOR.env.ie ) { - CKEDITOR.dom.element.prototype.hasAttribute = function( name ) - { - var $attr = this.$.attributes.getNamedItem( name ); - - if ( this.getName() == 'input' ) + CKEDITOR.dom.element.prototype.hasAttribute = CKEDITOR.tools.override( CKEDITOR.dom.element.prototype.hasAttribute, + function( original ) { - switch ( name ) - { - case 'class' : - return this.$.className.length > 0; - case 'checked' : - return !!this.$.checked; - case 'value' : - var type = this.getAttribute( 'type' ); - return type == 'checkbox' || type == 'radio' ? this.$.value != 'on' : this.$.value; - } - } + return function( name ) + { + var $attr = this.$.attributes.getNamedItem( name ); + + if ( this.getName() == 'input' ) + { + switch ( name ) + { + case 'class' : + return this.$.className.length > 0; + case 'checked' : + return !!this.$.checked; + case 'value' : + var type = this.getAttribute( 'type' ); + return type == 'checkbox' || type == 'radio' ? this.$.value != 'on' : this.$.value; + } + } - return !!( $attr && $attr.specified ); - }; + return original.apply( this, arguments ); + }; + }); }