[Ovirt-devel] [Patch] Various Interface Additions

Hugh O. Brock hbrock at redhat.com
Mon May 12 21:57:51 UTC 2008


On Mon, May 12, 2008 at 05:39:07PM -0400, Mohammed Morsi wrote:
>
>> Give it to me one more time, but without trailing blanks?
>>
>> Also check for lines > 80 chars (outside of the HTML where I think that is probably unenforceable).
>>
>> Thanks,
>> --Hugh
>>   
>
> Removed alot of whitespace, hope this does it. No changes in the .rb files 
> > 80 width.
>
>   -Mo

> diff --git a/wui/src/app/controllers/hardware_controller.rb b/wui/src/app/controllers/hardware_controller.rb
> index cd069c7..a9e66a0 100644
> --- a/wui/src/app/controllers/hardware_controller.rb
> +++ b/wui/src/app/controllers/hardware_controller.rb
> @@ -72,6 +72,7 @@ class HardwareController < ApplicationController
>  
>    def show_hosts
>      show
> +    @hardware_pools = HardwarePool.find :all
>    end
>  
>    def hosts_json
> diff --git a/wui/src/app/views/hardware/show_hosts.rhtml b/wui/src/app/views/hardware/show_hosts.rhtml
> index 79b8ef6..e2ac3f5 100644
> --- a/wui/src/app/views/hardware/show_hosts.rhtml
> +++ b/wui/src/app/views/hardware/show_hosts.rhtml
> @@ -1,8 +1,28 @@
> -<ul class="toolbar_nav">
> +<div id="toolbar_nav">
> +  <ul>
>      <li><a href="<%= url_for :controller => 'host', :action => 'addhost', :hardware_pool_id => @pool %>" rel="facebox[.bolder]"><%= image_tag "icon_addhost.png", :style => "vertical-align:middle;" %>  Add Host</a></li>
> -    <li><a href="#" rel="close"><%= image_tag "icon_move.png", :style => "vertical-align:middle;" %>  Move    <%= image_tag "icon_toolbar_arrow.gif", :style => "vertical-align:middle;" %></a></li>
> -    <li><a href="#" onClick="remove_hosts()"><%= image_tag "icon_delete_white.png", :style => "vertical-align:middle;" %>  Delete</a></li>
> -  </ul>
> +    <li>
> +      <%= image_tag "icon_move.png", :style => "vertical-align:middle;" %>  Move    <%= image_tag "icon_toolbar_arrow.gif", :style => "vertical-align:middle;" %>
> +      <ul>
> +          <% @hardware_pools.each { |hw_pool| %>
> +            <% if @pool.parent_id != hw_pool.id  and @pool.id != hw_pool.id %>
> +              <li onclick="window.location='<%= url_for :controller => :hardware, :action => 'foobar' %>'">
> +                 <%= image_tag "icon_hdwarepool.png", :style=> "vertical-align: middle;" %>
> +            <% else %>
> +              <li style="color: #CCCCCC; cursor: default;">
> +                 <%= image_tag "icon_hdwarepool.png", :style=> "vertical-align: middle;" %>
> +            <% end %>
> +                   <%= hw_pool.name %></a>
> +              </li>
> +          <% } %>
> +          <li style="border-top: 1px solid black; border-bottom: 1px solid black;">
> +             Move to New Resource Group...
> +          </li>
> +      </ul>
> +   </li>
> +   <li><a href="#" onClick="remove_hosts()"><%= image_tag "icon_delete_white.png", :style => "vertical-align:middle;" %>  Delete</a></li>
> + </ul>
> +</div>
>  
>  <script type="text/javascript">
>    function remove_hosts()
> diff --git a/wui/src/app/views/layouts/_header_redux.rhtml b/wui/src/app/views/layouts/_header_redux.rhtml
> index 73453be..752f6a2 100644
> --- a/wui/src/app/views/layouts/_header_redux.rhtml
> +++ b/wui/src/app/views/layouts/_header_redux.rhtml
> @@ -1,11 +1,12 @@
>  <div class="header_logo"><img src="/images/ovirt_logo_redux.png" /></div>
>  
>  <div class="header_info">
> -  <form id="#" action="globalSearch.jspa">
> +  <div id="hi-username">Hi, <%= @user %></div>
> +  <form id="search-form" action="globalSearch.jspa">
>      <input id="textfield_effect" name="q" value="Search" onkeypress="" onfocus="if( this.value == this.defaultValue ) this.value='';" type="text">
> -    <input id="searchbox-button" src="/images/icon_search.png" title="Search" type="image">  |
> -    <input id="searchbox-button" src="/images/icon_help.png" title="Search" type="image">
> +    <input id="searchbox-button" src="<%= image_path "icon_search.png"  %>" title="Search" type="image">  |
>    </form>
> +  <a id="help-link" href="#" ><%= image_tag "icon_help.png" %></a> <!-- FIXME wire link correctly -->
>  </div>
>  
>  <div class="header_menu_wrapper">
> diff --git a/wui/src/app/views/layouts/_side_toolbar.rhtml b/wui/src/app/views/layouts/_side_toolbar.rhtml
> index 003fee4..41eda26 100644
> --- a/wui/src/app/views/layouts/_side_toolbar.rhtml
> +++ b/wui/src/app/views/layouts/_side_toolbar.rhtml
> @@ -1,10 +1,11 @@
> +<% pool = HardwarePool.get_default_pool %>
>  <div class="toolbar" style="float:left;">
> -   <a href="#">
> +   <a href="<%= url_for :controller => :hardware, :action => 'new', :parent_id => pool %>">
>       <img title="Add Hardware Pool" src="/images/icon_add_hardwarepool.png" />
>     </a>
>  </div>
>  <div class="toolbar" style="float:left;">
> -   <a href="#">
> +   <a href="<%= url_for :controller => :resources, :action => 'new', :parent_id => pool %>">
>       <img title="Add Virtual Machine Pool" src="/images/icon_add_vmpool.png" />
>     </a>
>  </div>
> diff --git a/wui/src/app/views/layouts/redux.rhtml b/wui/src/app/views/layouts/redux.rhtml
> index fc19121..27a0e12 100644
> --- a/wui/src/app/views/layouts/redux.rhtml
> +++ b/wui/src/app/views/layouts/redux.rhtml
> @@ -8,6 +8,9 @@
>    <title><%= yield :title -%></title>
>    <%= stylesheet_link_tag 'layout' %>
>    <%= stylesheet_link_tag 'components' %>
> +  <!--[if IE]>
> +    <%= stylesheet_link_tag 'ie' %>
> +  <![endif]-->
>    <%= stylesheet_link_tag '/javascripts/jquery-treeview/ovirt.treeview.css' %>
>    <%= stylesheet_link_tag 'flexigrid/flexigrid.css' %>
>    <%= stylesheet_link_tag 'facebox' %>
> diff --git a/wui/src/public/stylesheets/components.css b/wui/src/public/stylesheets/components.css
> index 42ad64b..02498cd 100644
> --- a/wui/src/public/stylesheets/components.css
> +++ b/wui/src/public/stylesheets/components.css
> @@ -9,10 +9,8 @@
>  }
>  
>  .header_info {
> -  padding: 40px 20px 0px 10px;
> -  margin: 0;
> +  padding: 40px 10px 0px 10px;
>    float: right;
> -  text-align: right;
>    font-size: 100%;
>    color: #B5B5B5;
>  }
> @@ -34,10 +32,76 @@
>  .header_menu {
>    padding: 5px 0 0 10px;
>    margin: 1px;
> -  background: #CCCCCC url(images/bg_menu_big.jpg) repeat-x top;
> +  background: #CCCCCC url(../images/bg_menu_big.jpg) repeat-x top;
>    font-size: 110%;
>    line-height:1.5;
>    height: 26px;
>    width: 216px;
>    border: #FFFFFF solid 1px;
>  }
> +
> +.header_menu_greybox {
> +  padding: 0;
> +  margin: 35px 0 0 0;
> +  float:left;
> +  height: 35px;
> +  width: 230px;
> +  background: #CCCCCC;
> +}
> +
> +#hi-username{
> +  margin-right: 15px;
> +  float: left;
> +}
> +
> +#search-form{
> +  float: left;
> +}
> +
> +#help-link {
> +}
> +
> +/*  ----- Toolbar Navigation --------  */
> +#toolbar_nav {
> +    background: #E5E5E5;
> +    float: left;
> +}
> +#toolbar_nav ul{
> +    list-style-type: none;
> +    margin:0;
> +    padding: 0;
> +}
> +#toolbar_nav li {
> +    margin: 0;
> +    padding: 0 10px 0 10px;
> +    position: relative;
> +    float: left;
> +    line-height: 2.3;
> +    height: 28px;
> +    border-right: 1px solid #5A7A8E;
> +    border-left: 1px solid #93B2C4;
> +    background: #000000 url(../images/bg_toolbarheader.jpg) repeat-x top;
> +}
> +#toolbar_nav li, #toolbar_nav li a {
> +    text-decoration: none;
> +    text-align: center;
> +    color: #FFFFFF;
> +}
> +#toolbar_nav ul ul {
> +    position: absolute;
> +    top: 28px;
> +    left: 0;
> +    width: 100%;
> +    display: none;
> +}
> +#toolbar_nav ul li:hover ul{
> +   display: block;
> +   z-index: 1;
> +}
> +#toolbar_nav ul ul li{
> +   width: 200px;
> +   background: #E5F1FD;
> +   color: #000000;
> +   text-align: left;
> +   cursor: pointer;
> +}
> diff --git a/wui/src/public/stylesheets/ie.css b/wui/src/public/stylesheets/ie.css
> new file mode 100644
> index 0000000..50a1ece
> --- /dev/null
> +++ b/wui/src/public/stylesheets/ie.css
> @@ -0,0 +1 @@
> +/* ie only style here */
> diff --git a/wui/src/public/stylesheets/layout.css b/wui/src/public/stylesheets/layout.css
> index 6622db9..f845a28 100644
> --- a/wui/src/public/stylesheets/layout.css
> +++ b/wui/src/public/stylesheets/layout.css
> @@ -38,7 +38,7 @@ img
>    width: 100%;
>    height: 90px;
>    overflow: hidden;
> -  background:#535353 url(images/bg_header.jpg) repeat-x top;
> +  background:#535353 url(../images/bg_header.jpg) repeat-x top;
>  }
>  
>  .header_image {
> @@ -69,9 +69,9 @@ img
>  #main {
>    padding: 0;
>    margin-left: 0;
> -  position: absolute;    
> +  position: absolute;
>    top: 70px;
> -  left: 230px;
> +  left: 236px;
>    right: 0px;
>    bottom: 0px;
>    overflow: auto;
> @@ -79,27 +79,10 @@ img
>    border-left:#CCCCCC solid 0px;
>  }
>  
> -.header_menu_greybox {
> -  padding: 0;
> -  margin: 35px 0 0 0;
> -  float:left;
> -  height: 35px;
> -  width: 230px;
> -  background: #CCCCCC;
> -}
> -.header_menu {
> -  padding: 5px 0 0 10px;
> -  margin: 1px;
> -  background: #CCCCCC url(images/bg_menu_big.jpg) repeat-x top;
> -  font-size: 110%;
> -  line-height:1.5;
> -  height: 26px;
> -  width: 216px;
> -  border: #FFFFFF solid 1px;
> -}
> -
>  #navigation-tabs{
>    height: 30px;
> +  position: absolute;
> +  top: -30px;
>  }
>  
>  #content-area {
> @@ -115,12 +98,12 @@ img
>  
>  .toolbar {
>    margin: 1px 0 1px 0;
> -  background: #CCCCCC url(images/bg_menu_big.jpg) repeat-x top;
> +  background: #CCCCCC url(../images/bg_menu_big.jpg) repeat-x top;
>    height: 31px;
> -  border-left: #FFFFFF solid 1px; 
> -  border-top: #FFFFFF solid 1px; 
> -  border-bottom: #FFFFFF solid 1px; 
> -  border-right: #B4B4B4 solid 1px; 
> +  border-left: #FFFFFF solid 1px;
> +  border-top: #FFFFFF solid 1px;
> +  border-bottom: #FFFFFF solid 1px;
> +  border-right: #B4B4B4 solid 1px;
>    }
>  
>  .breadcrumb_main {
> @@ -177,7 +160,7 @@ img
>    color: #FFFFFF;
>    font-size: 110%;
>    border-left: 1px solid #93B2C4;
> -  background: #000000 url(images/bg_toolbarheader.jpg) repeat-x top;
> +  background: #000000 url(../images/bg_toolbarheader.jpg) repeat-x top;
>  }
>  
>  
> @@ -210,39 +193,6 @@ img
>  .tab_nav a:hover {color:#FFFFFF; border-bottom: 5px solid #5599B8;}
>  .tab_nav li.current a {color:#FFFFFF; font-weight: bold; height: 24px; line-height:1.6; border-bottom: 5px solid #5599B8;}
>  
> -
> -
> -/*  ----- Toolbar Navigation --------  */
> -.toolbar_nav {
> -	margin:0;
> -	padding: 0;
> -	background: #E5E5E5;
> -	list-style-type: none;
> -	float: left;
> -	}
> -.toolbar_nav li {
> -	margin: 0;
> -	padding: 0;
> -	float: left;
> -}
> -
> -.toolbar_nav a {
> -	float:left;
> -	padding: 0 10px 0 10px;
> -	color: #FFFFFF;
> -	text-decoration: none;
> -	line-height: 2.3;
> -	height: 28px;
> -	text-align: center;
> -	border-right: 1px solid #5A7A8E;
> -	border-left: 1px solid #93B2C4;
> -	background: #000000 url(images/bg_toolbarheader.jpg) repeat-x top; 
> -}
> -.toolbar_nav a:hover {background-position: 0 -28px; border-left: 1px solid #82B6CE;}
> -.toolbar_nav li.current a {background-position: 0 -56px; border-left: 1px solid #5A7A8E; font-weight: bold;}
> -
> -
> -
>  /*  ----- Panel Contents --------  */
>  
>  .panel_summary {

Committed and pushed to the main repo...

--Hugh




More information about the ovirt-devel mailing list