You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by sv...@apache.org on 2019/05/15 21:24:44 UTC

[wicket] 04/16: WICKET-6667 JS removed Wicket.Browser.isOpera()

This is an automated email from the ASF dual-hosted git repository.

svenmeier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit e36509cf09433966fdb99f5ca25a7e04c62ce498
Author: Sven Meier <sv...@apache.org>
AuthorDate: Mon May 6 14:40:22 2019 +0200

    WICKET-6667 JS removed Wicket.Browser.isOpera()
    
    was used in MultiFileUploadField.js and modal.js for obscure reasons
---
 .../java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js     | 9 ---------
 .../wicket/markup/html/form/upload/MultiFileUploadField.js       | 5 -----
 .../apache/wicket/extensions/ajax/markup/html/modal/res/modal.js | 9 +--------
 3 files changed, 1 insertion(+), 22 deletions(-)

diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
index 79337d9..dc52310 100644
--- a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
+++ b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
@@ -2485,15 +2485,6 @@
 				return wb._isChrome;
 			},
 
-			_isOpera: null,
-			isOpera: function () {
-				var wb = Wicket.Browser;
-				if (wb._isOpera === null) {
-					wb._isOpera = !Wicket.Browser.isSafari() && typeof(window.opera) !== "undefined";
-				}
-				return wb._isOpera;
-			},
-
 			_isIE: null,
 			isIE: function () {
 				var wb = Wicket.Browser;
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/MultiFileUploadField.js b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/MultiFileUploadField.js
index 114f37c..aa46600 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/MultiFileUploadField.js
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/MultiFileUploadField.js
@@ -71,11 +71,6 @@ function MultiSelector( eprefix, list_target, max, useMultipleAttr, del_label ){
 
 			if (this.useMultipleAttr) {
 				element.multiple = this.useMultipleAttr;
-				if (Wicket.Browser.isOpera()) {
-					// in Opera 12.02, changing 'multiple' this way does not update the field
-					element.type = 'button';
-					element.type = 'file';
-				}
 			}
 
 			// Element name -- what number am I?
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
index 2b476bb..2b2eddf 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
@@ -488,14 +488,7 @@
 				this.update = window.setInterval(Wicket.bind(this.updateTitle, this), 100);
 			}
 
-			// opera seems to have problem accessing contentWindow here
-			if (Wicket.Browser.isOpera()) {
-				this.content.onload = Wicket.bind(function() {
-					this.content.contentWindow.name = this.settings.iframeName;
-				}, this);
-			} else {
-				this.content.contentWindow.name = this.settings.iframeName;
-			}
+			this.content.contentWindow.name = this.settings.iframeName;
 
 			try
 			{