From a8d255bf1a5654c95cb429f291e3da0d51dc8d16 Mon Sep 17 00:00:00 2001
From: Andreas Gohr <andi@splitbrain.org>
Date: Fri, 16 Jun 2006 13:36:00 +0200
Subject: [PATCH] JavaScript fixes for media manger on IE

Fixes the display of the checkbox options

darcs-hash:20060616113600-7ad00-000ca791e8c3d9045bda06af9e149f2e2321a8bd.gz
---
 lib/scripts/media.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/scripts/media.js b/lib/scripts/media.js
index f164519ed..f76c528b3 100644
--- a/lib/scripts/media.js
+++ b/lib/scripts/media.js
@@ -74,9 +74,10 @@ media = {
             kobox.id   = 'media__keepopen';
             if(DokuCookie.getValue('keepopen')){
                 kobox.checked  = true;
+                kobox.defaultChecked = true; //IE wants this
                 media.keepopen = true;
             }
-            addEvent(kobox,'change',function(event){ return media.togglekeepopen(event,this); });
+            addEvent(kobox,'click',function(event){ return media.togglekeepopen(event,this); });
 
             var kolbl  = document.createElement('label');
             kolbl.htmlFor   = 'media__keepopen';
@@ -95,9 +96,10 @@ media = {
         hdbox.id   = 'media__hide';
         if(DokuCookie.getValue('hide')){
             hdbox.checked = true;
+            hdbox.defaultChecked = true; //IE wants this
             media.hide    = true;
         }
-        addEvent(hdbox,'change',function(event){ return media.togglehide(event,this); });
+        addEvent(hdbox,'click',function(event){ return media.togglehide(event,this); });
 
         var hdlbl  = document.createElement('label');
         hdlbl.htmlFor   = 'media__hide';
-- 
GitLab