Fixed multiply small issues mainly related to php5.3.
[fa-stable.git] / js / inserts.js
index d6597578866b1826861c02236341f03782d90879..a17519ef36a2298134f7b305c72a042dab62e0f0 100644 (file)
@@ -228,6 +228,7 @@ var inserts = {
            // this shows divs for js enabled browsers only
            e.style.display = 'block';
        },
+
        'button': function(e) {
                e.onclick = function(){ return validate(e); }
        },
@@ -302,6 +303,16 @@ var inserts = {
                        return false;
                }
        },
+       'a.repopts_link':       function(l) {
+               l.onclick = function() {
+                   save_focus(this);
+                   var replinks = document.getElementsBySelector('a.repopts_link');
+                               for(var i in replinks)
+                                       replinks[i].style.fontWeight = replinks[i]==this ? 'bold' : 'normal';
+                       JsHttpRequest.request(this, null);
+                       return false;
+               }
+       },
        'a': function(e) { // traverse menu
                e.onkeydown = function(ev) { 
                        ev = ev||window.event;
@@ -324,13 +335,14 @@ var inserts = {
                                        ev.returnValue = false;
                                        return false;
                                }
+                               window.location = e.href;
                        }
        },
        'ul.ajaxtabs':  function(ul) {
            var ulist=ul.getElementsByTagName("li");
            for (var x=0; x<ulist.length; x++){ //loop through each LI e
                var tab=ulist[x].getElementsByTagName("button")[0];
-               if(tab.onclick==undefined) {
+//             if(tab.onclick==undefined) {
 // ?  var modifiedurl=ulistlink.getAttribute("href").replace(/^http:\/\/[^\/]+\//i, "http://"+window.location.hostname+"/")
                    var url = tab.form.action
                    tab.onclick=function(){
@@ -338,8 +350,9 @@ var inserts = {
                        return false;
                    }
                }
-           }
+//         }
        }
+
 /*     'tr.editrow': function(e) {
                        e.onkeydown = function(ev) { 
                        ev = ev||window.event;
@@ -456,7 +469,7 @@ function setHotKeys() {
                if (_hotkeys.alt==true) {
                        if (key == 18) {
                                _hotkeys.alt = false;
-                               if (_hotkeys.focus>=0) {
+                               if (_hotkeys.focus >= 0) {
                                        var link = _hotkeys.list[_hotkeys.focus];
                                        if(link.onclick) 
                                                link.onclick();