sventon subversion web client - http://www.sventon.org
[show recent changes]
 
  Help
HEAD
Rev: 24753 - http://anonsvn.icesoft.org/repo / icefaces2 / scratchpads / patches / SF9769 / icefaces / core / src / main / javascript / application.js
Unified Diff View - application.js
/icefaces2/scratchpads/patches/SF9769/icefaces/core/src/main/javascript/application.js @ revision 24752
/icefaces2/scratchpads/patches/SF9769/icefaces/core/src/main/javascript/application.js @ revision 24753
@@ -244,13 +244,12 @@         namespace.setupBridge = function(setupID, viewID, windowID, configuration) { -          var container = document.getElementById(setupID).parentNode; -          container.configuration = configuration; -          container.configuration.viewID = viewID; -          namespace.window = windowID; -// onBeforeUnload(window, disposeWindow(viewID)); -      }; - +            var container = document.getElementById(setupID).parentNode; +            container.configuration = configuration; +            container.configuration.viewID = viewID; +            namespace.window = windowID; +            onBeforeUnload(window, disposeWindow(viewID)); +        };         namespace.setupPush = function(viewID) {             ice.push.register([viewID], retrieveUpdate(viewID)); @@ -307,6 +306,10 @@                 } else {                     eType = ev.type;                 } +    if (0 == eType.indexOf("on")) { +                    //strip "on" from front of event name +                    eType = eType.substr(2); +                }                 var e = $event(ev, f);                 var element = triggeredBy(e); @@ -326,9 +329,12 @@                 var isText = ( (elementType == "text") ||                         (elementType == "password") ||                         (elementType == "textarea") ); -                if (isText && (eType == "click")) { -                    //click events should not trigger text box submit -                    return; +                if (isText) { +                    if ((eType == "click") || (eType == "blur")) { +                        //click events should not trigger text box submit +                        //blur events are mostly redundant with change events +                        return; +                    }                 }                 if ("select-one" == elementType) { @@ -345,9 +351,11 @@             }             if (f.addEventListener) { +    //events for most browsers                 f.addEventListener('blur', submitForm, true);                 f.addEventListener('change', submitForm, true);             } else { +    //events for IE                 f.attachEvent('onfocusout', submitForm);                 f.attachEvent('onclick', submitForm);             }


feed icon

sventon 2.5.1