Author: vip
Date: Thu Feb 12 10:26:19 2009
New Revision: 10120

Modified:
   livecd/kde4/html/template.html
Log:
- move loadContent into the array-class monster


Modified: livecd/kde4/html/template.html
==============================================================================
--- livecd/kde4/html/template.html      (original)
+++ livecd/kde4/html/template.html      Thu Feb 12 10:26:19 2009
@@ -26,11 +26,19 @@
                                elements[i].onclick = this.changeCurrent;
                        }
                },
+       
+               loadContent: function(id)
+               {
+                       var content = document.getElementById("feature");
+                       try{
+                               content.innerHTML = 
document.getElementById(id).innerHTML;
+                       }catch (e){}
+               },
 
                changeCurrent: function()
                {
-                       var tabs = document.getElementById("feature_menu");
-                       var elements = tabs.getElementsByTagName("a");
+                       var tabslist = document.getElementById("feature_menu");
+                       var elements = tabslist.getElementsByTagName("a");
                 
                        for( var i = 0; i < elements.length; i++ )
                        {
@@ -42,23 +50,15 @@
                        this.setAttribute("class", "current");
                        this.setAttribute("className", "current");
 
-                       loadContent(this.getAttribute("content"));
+                       tabs.loadContent(this.getAttribute("content"));
                        return;
                }
        };
        
-       function loadContent(id)
-       {
-               var content = document.getElementById("feature");
-               try{
-                       content.innerHTML = 
document.getElementById(id).innerHTML;
-               }catch (e){}
-       }
-       
        function initTabs()
        {
                tabs.init();
-               loadContent("feature-1");
+               tabs.loadContent("feature-1");
        }
        -->
        </script>
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to