[dokuwiki] Re: Need JS help with summary enforcement

I've made a little progress, may have found a Dokuwiki bug, and have questions.

First, the possible Dokuwiki bug:

>     if(summary_input.value == '' && minoredit_input.value != 1)
>         btn_save.disabled = true;
>     else
>         btn_save.disabled = false;

Dokuwiki compresses the else statement to "elsebtnsave.disalbed=false;" -- 
there's no space between "else" and "btn_save".  To get past this this, I added 
curly braces.

Next problem, on Opera, it appears that my handlers will run, but only once.  
After that, the handlers revert back to Dokuwikis handlers (in this case, 
summaryCheck()).  I know this because I removed my call to summaryCheck(), and 
yet still summaryCheck() gets called -- despite my having overriden those 
handlers!

I tried adding this to my main.php after the js.php inclusion, instead of 
setting up from within refreshPage():

  addInitEvent(function(){ installSummaryEnforcement(); });

But this did nothing, as far as I could tell.

On Firefox, I can't seem to disable a form button via JS.

But surprise!  Everything is working perfectly on Safari!  How's that 
possible?!  These browsers are really do things differently.

Any clues?  Thanks!

~joe
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: