You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2010/08/03 11:01:06 UTC

svn commit: r981784 - in /myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard: msie/script/tobago.js msie_6_0/script/tobago.js

Author: lofwyr
Date: Tue Aug  3 09:01:06 2010
New Revision: 981784

URL: http://svn.apache.org/viewvc?rev=981784&view=rev
Log:
move ie 6.0 code to its own file

Added:
    myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/msie_6_0/script/tobago.js
      - copied, changed from r981476, myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/msie/script/tobago.js
Modified:
    myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/msie/script/tobago.js

Modified: myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/msie/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/msie/script/tobago.js?rev=981784&r1=981783&r2=981784&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/msie/script/tobago.js (original)
+++ myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/msie/script/tobago.js Tue Aug  3 09:01:06 2010
@@ -15,53 +15,10 @@
  * limitations under the License.
  */
 
-Tobago.loadPngFix = function() {
-  if (this.getBrowser().type == "msie" && this.getBrowser().version <= 6) {
-    var images = document.images;
-    for (var i = 0; i < images.length; i++) {
-      Tobago.fixPngAlpha(images[i]);
-    }
-  }
-};
-
-Tobago.fixPngAlpha = function(element) {
-  if (element.fixPngAlphaApplied != "applied") {
-    element.fixPngAlphaApplied = "applied";
-    if (this.getBrowser().type == "msie"
-        && this.getBrowser().version <= 6
-        && element.src.toLowerCase().match(/.*png/)
-        && Tobago.isActiveXEnabled()) {
-      Tobago.addEventListener(element, 'propertychange', Tobago.propertyChange);
-      Tobago.fixImage(element);
-    }
-  }
-};
-
-Tobago.isActiveXEnabled = function () {
-  try {
-    new ActiveXObject("Shell.UIHelper");
-  } catch(e) {
-    return false;
-  }
-  return true;
-};
-
-Tobago.propertyChange = function() {
-  if (event.propertyName != "src") {
-    return;
-  }
-  // if not set to blank (to avoid endless loop)
-  if (! new RegExp(Tobago.pngFixBlankImage).test(event.srcElement.src)) {
-    Tobago.fixImage(event.srcElement);
-  }
-};
-
-Tobago.fixImage = function(element) {
-  element.runtimeStyle.backgroundImage = "none";
-  element.runtimeStyle.filter
-      = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + element.src + "', sizingMethod='scale')";
-  element.src = Tobago.pngFixBlankImage;
-};
+/*
+ * theme: standard
+ * agent: msie
+ */
 
 /* TOBAGO-789 */
 Tobago.fixSelectionOnFocusIn = function() {

Copied: myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/msie_6_0/script/tobago.js (from r981476, myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/msie/script/tobago.js)
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/msie_6_0/script/tobago.js?p2=myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/msie_6_0/script/tobago.js&p1=myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/msie/script/tobago.js&r1=981476&r2=981784&rev=981784&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/msie/script/tobago.js (original)
+++ myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/msie_6_0/script/tobago.js Tue Aug  3 09:01:06 2010
@@ -15,8 +15,14 @@
  * limitations under the License.
  */
 
+/*
+ * theme: standard
+ * agent: msie_6_0
+ */
+
 Tobago.loadPngFix = function() {
   if (this.getBrowser().type == "msie" && this.getBrowser().version <= 6) {
+    // fix png images
     var images = document.images;
     for (var i = 0; i < images.length; i++) {
       Tobago.fixPngAlpha(images[i]);
@@ -62,27 +68,3 @@ Tobago.fixImage = function(element) {
       = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + element.src + "', sizingMethod='scale')";
   element.src = Tobago.pngFixBlankImage;
 };
-
-/* TOBAGO-789 */
-Tobago.fixSelectionOnFocusIn = function() {
-  try {
-    var src = window.event.srcElement;
-    if (src) {
-      src.tmpIndex = src.selectedIndex;
-    }
-  } catch (e) {
-    // ignore
-  }
-};
-
-/* TOBAGO-789 */
-Tobago.fixSelectionOnFocus = function() {
-  try {
-    var src = window.event.srcElement;
-    if (src) {
-      src.selectedIndex = src.tmpIndex;
-    }
-  } catch (e) {
-    // ignore
-  }
-};