You need to log in before you can comment on or make changes to this bug.
The scale widget does not implement the WIDGETCLASS parameter using which you can use css to change the appearance of the widget. Maybe there are more widgets that would need this parameter but don't use it? The only one I have encountered so far is the Scale widget. Also it would be nice to have a KeyPress event on the Scale widget as an enhancement. Here is the code I use: in drawPublish: <INPUT OnKeyPress=\"KeyPressed(event)\" ... In GetJavascriptFunctions: $szJsFunctionName = "KeyPressed"; $szFunction = <<<EOT /** * {$szJsFunctionName} * called to register and even when the map extents chnages (JSAPI) */ function {$szJsFunctionName}(e) { if (!e) var e = window.event; var code = e.keyCode; if (code == 13) { document.forms[0].UPDATE_MAP.value = "1"; document.forms[0].submit(); return; } } EOT; $aReturn[$szJsFunctionName] = $szFunction;
Agreed on the widget class. Also, it should implement WIDGETSTYLE as per other widgets. Please proceed and implement both at your leisure. Re the keypress event, I like this idea but I don't want this to be something that will always be there. Please implement as a new attribute (SUBMITONKEYPRESS="[true|false]" (name?), but the default can be true. Instead of document.forms[0], please use {$this->mszHTMLForm} because widgets can now be part of any arbitrary form on a page ... use of document.forms[0] is deprecated and in fact dangerous, and needs to be removed from any existing code that still uses it (and there is some, I'm sure). Are there any other widgets that could benefit from this handy piece of code?
*** Bug 30 has been marked as a duplicate of this bug. ***
Code is now in CVS (revision 1.3 of Scale.widget.php).