>From d9883da19b6907be49ee0cd0fef8962b34499587 Mon Sep 17 00:00:00 2001
From: Tomas Sedovic <tsedovic@redhat.com>
Date: Wed, 26 May 2010 17:47:19 +0200
Subject: [PATCH aggregator 1/2] Disable unused JavaScript code.

---
 src/app/views/layouts/aggregator.haml        |   39 --------------------------
 src/app/views/layouts/tabs-and-content.rhtml |    7 ++--
 2 files changed, 3 insertions(+), 43 deletions(-)

diff --git a/src/app/views/layouts/aggregator.haml b/src/app/views/layouts/aggregator.haml
index 9b62dd3..159f385 100644
--- a/src/app/views/layouts/aggregator.haml
+++ b/src/app/views/layouts/aggregator.haml
@@ -10,53 +10,16 @@
     = stylesheet_link_tag 'dcloud'
     /[if IE]
       = stylesheet_link_tag 'ie'
-    = stylesheet_link_tag '/javascripts/jquery-treeview/ovirt.treeview.css'
-    = stylesheet_link_tag 'flexigrid/flexigrid.css'
     = stylesheet_link_tag 'facebox'
-    = stylesheet_link_tag 'jquery.jgrowl.css'
-    = stylesheet_link_tag 'ovirt-tree/tree'
     = stylesheet_link_tag 'jquery.ui-1.8.1/jquery-ui-1.8.1.custom.css'
     = stylesheet_link_tag 'jquery-datatables/demo_table_jui.css'
 
     = javascript_include_tag "jquery-1.4.2.min.js"
-    = javascript_include_tag "jquery-treeview/jquery.treeview.js"
-    = javascript_include_tag "jquery-treeview/jquery.treeview.async.js"
-    = javascript_include_tag "flexigrid.js"
     = javascript_include_tag "facebox.js"
-    = javascript_include_tag "jquery.livequery.min.js"
-    = javascript_include_tag "jquery.form.js"
-    = javascript_include_tag "jquery.jgrowl.js"
     = javascript_include_tag "jquery.ui-1.8.1/jquery-ui-1.8.1.custom.min.js"
     = javascript_include_tag "jquery-datatables/media/js/jquery.dataTables.min.js"
     = javascript_include_tag "jquery-datatables/plugins/setFilteringDelay.js"
 
-    /ovirt-specific functions defined here
-    = javascript_include_tag "ovirt.js"
-    :javascript
-      var $tabs, selected_tab;
-      $(document).ready(function(){
-         $.ajaxSetup({error: function(xhr) {$.jGrowl(xhr.status + ' ' + xhr.statusText);}});
-            $('a[rel*=facebox]').livequery(function(){$(this).facebox();},function(){});
-            $('.dialog_tab_nav a').livequery(function(){
-                $(this).bind('click', function(){
-                    $('.dialog_tab_nav li').removeClass('current');
-                    $(this).parent().addClass('current');
-                    $.ajax({
-                        url: $(this).attr('href'),
-                        type: 'GET',
-                        data: {ajax:true},
-                        dataType: 'html',
-                        success: function(data) {
-                          var wrapped_data = $(data).find('div').filter('[id=dialog-content-area]');
-                          var my_parent = $(this).parent();
-                          $('#dialog-content-area').html($(data));
-                          $('#facebox').css('left', $(window).width() / 2 - ($('#facebox table').width() / 2));
-                        },
-                        error: function(xhr) {$.jGrowl(xhr.status + ' ' + xhr.statusText);}
-                    });
-                    return false;})},function(){});
-                    $('ul.instance_action_list li:first-child').addClass('first');
-      });
     = yield :scripts
   %body
     #header
@@ -64,8 +27,6 @@
     #side
       = render :partial => '/layouts/main_nav' unless @current_user.nil?
     #tabs-and-content-container
-      #navigation-tabs(style="position:absolute; top:40px; left:250px;")
-        = render :partial => '/layouts/navigation_tabs'
       #main
         #content_area
           = render :partial => '/layouts/notification'
diff --git a/src/app/views/layouts/tabs-and-content.rhtml b/src/app/views/layouts/tabs-and-content.rhtml
index 9d61e21..82e6ea1 100644
--- a/src/app/views/layouts/tabs-and-content.rhtml
+++ b/src/app/views/layouts/tabs-and-content.rhtml
@@ -1,10 +1,9 @@
-
 <div id="side-toolbar" class="header_menu_wrapper">
   <%= render :partial => '/layouts/side_toolbar' %>
 </div>
-<div id="navigation-tabs" style="position:absolute; top:40px; left:231px;">
- <%= render :partial => '/layouts/navigation_tabs' %>
-</div> 
+<div id="side">
+  <%= render :partial => '/layouts/main_nav' %>
+</div>
 <div id="main">
   <div id="content_area">
    <div id="help-div">
-- 
1.6.6.1

