Changeset - ffbd1808b4c8
[Not reviewed]
default
0 2 0
Marcin Kuzminski - 15 years ago 2010-09-03 18:07:24
marcin@python-works.com
fixed repo switcher,
some css fixups for repo switcher and switch to menu
2 files changed with 22 insertions and 31 deletions:
0 comments (0 inline, 0 general)
pylons_app/public/css/style.css
Show inline comments
 
@@ -403,48 +403,55 @@ div.options a:hover
 
}
 
 
#header #header-inner #quick li a:hover span.icon
 
{
 
    background: url("../../resources/images/colors/blue/quick_l_selected.png") no-repeat top left;
 
    border-left: none;
 
    border-right: 1px solid #464646;
 
}
 
 
#header #header-inner #quick ul
 
{
 
    top: 29px;
 
    right: 0;
 
    margin: 0;
 
    padding: 0;
 
    width: 200px;
 
    display: none;
 
    position: absolute;
 
    background: #FFFFFF;
 
    border: 1px solid #666;
 
    border-top: 1px solid #003367;
 
    z-index: 100;
 
}
 
 
#header #header-inner #quick ul.repo_switcher{
 
    max-height:275px;
 
    overflow-x:hidden;
 
    overflow-y:auto;
 
    white-space:nowrap;
 
}
 
 
#header #header-inner #quick li ul li
 
{
 
    border-bottom: 1px solid #dddddd;   
 
}
 
 
#header #header-inner #quick li ul li.last
 
{
 
    border: none;   
 
}
 
 
#header #header-inner #quick li ul li a
 
{
 
    margin: 0;
 
    padding: 7px 9px 7px 9px;
 
    height: 1%;
 
    width: 182px;
 
    height: auto;
 
    display: block;
 
    float: left;
 
    background: #FFFFFF;
 
    color: #0066CC;
 
    font-weight: normal;
 
}
 
 
@@ -454,48 +461,52 @@ div.options a:hover
 
    padding: 7px 9px 7px 24px;
 
    width: 167px;
 
    background: #FFFFFF url("../../resources/images/plus.png") no-repeat 8px 9px;
 
}
 
 
#header #header-inner #quick li ul li a:hover
 
{
 
    color: #000000;
 
    background: #FFFFFF;
 
}
 
 
#header #header-inner #quick li ul li a.childs:hover
 
{
 
    background: #FFFFFF url("../../resources/images/minus.png") no-repeat 8px 9px;
 
}
 
 
#header #header-inner #quick ul ul 
 
{
 
    top: auto;
 
}   
 
 
#header #header-inner #quick li ul ul 
 
{
 
    right: 200px;
 
    max-height: 275px;
 
    overflow: auto;
 
    overflow-x: hidden;
 
    white-space:nowrap;    
 
}
 
 
#header #header-inner #quick li:hover ul ul, 
 
#header #header-inner #quick li:hover ul ul ul, 
 
#header #header-inner #quick li:hover ul ul ul ul 
 
{
 
    display: none;
 
}
 
 
#header #header-inner #quick li:hover ul, 
 
#header #header-inner #quick li li:hover ul, 
 
#header #header-inner #quick li li li:hover ul, 
 
#header #header-inner #quick li li li li:hover ul
 
{
 
    display: block;
 
}
 
 
 
/*ICONS*/
 
 
#header #header-inner #quick li ul li a.repos,
 
#header #header-inner #quick li ul li a.repos:hover
 
{
 
    background:url("../images/icons/folder_edit.png") no-repeat scroll 4px 9px #FFFFFF;
 
@@ -3400,48 +3411,53 @@ table.code-browser .browser-dir {
 
    text-align: left;
 
    padding-top: 1px;
 
}
 
 
.action_button {
 
    border: 0px;
 
    display: block;
 
}
 
 
.action_button:hover {
 
    border: 0px;
 
    font-style: italic;
 
    cursor: pointer;
 
}
 
 
/* -----------------------------------------------------------
 
    REPO SWITCHER
 
----------------------------------------------------------- */
 
 
#switch_repos{
 
	position: absolute;
 
	height: 25px;
 
	z-index: 1;
 
}
 
#switch_repos select{
 
    min-width:150px;
 
    max-height: 250px;
 
    z-index: 1;
 
}
 
/* -----------------------------------------------------------
 
    BREADCRUMBS
 
----------------------------------------------------------- */
 
 
.breadcrumbs{
 
	border:medium none;
 
	color:#FFFFFF;
 
	float:left;
 
	margin:0;
 
	padding:11px 0 11px 10px;
 
	text-transform:uppercase;
 
    font-weight: bold;
 
    font-size: 14px;
 
}
 
.breadcrumbs a{
 
 color: #FFFFFF;
 
}
 
 
 
/* -----------------------------------------------------------
 
    FLASH MSG
 
----------------------------------------------------------- */
 
.flash_msg ul {
 
    margin: 0;
pylons_app/templates/base/base.html
Show inline comments
 
@@ -64,89 +64,64 @@
 
	</div> 
 
    <!-- END CONTENT -->
 

	
 
	<!-- footer -->
 
	<div id="footer">
 
	    <p>Hg App ${c.hg_app_version} &copy; 2010 by Marcin Kuzminski</p>
 
        <script type="text/javascript">${h.tooltip.activate()}</script>	    
 
	</div>
 
	<!-- end footer -->
 
</body>
 

	
 
</html>
 

	
 
### MAKO DEFS ### 
 
<%def name="page_nav()">
 
	${self.menu()}
 
</%def>
 

	
 
<%def name="menu(current=None)">
 
		<% 
 
		def is_current(selected):
 
			if selected == current:
 
				return h.literal('class="current"')
 
		%>
 
		%if current not in ['home','admin']:
 
           <script type="text/javascript">
 
            YAHOO.util.Event.onDOMReady(function(){
 
                YAHOO.util.Event.addListener('repo_switcher','click',function(){
 
                    if(YAHOO.util.Dom.hasClass('repo_switcher','selected')){
 
                        YAHOO.util.Dom.setStyle('switch_repos','display','none');
 
                        YAHOO.util.Dom.setStyle('repo_switcher','background','');
 
                        YAHOO.util.Dom.removeClass('repo_switcher','selected');
 
                        YAHOO.util.Dom.get('repo_switcher').removeAttribute('style');
 
                    }
 
                    else{
 
                        YAHOO.util.Dom.setStyle('switch_repos','display','');
 
                        YAHOO.util.Dom.addClass('repo_switcher','selected');
 
                    }
 
                    });
 
                YAHOO.util.Event.addListener('repos_list','change',function(e){
 
                    var wa = YAHOO.util.Dom.get('repos_list').value;
 
                    
 
                    var url = "${h.url('summary_home',repo_name='__REPO__')}".replace('__REPO__',wa);
 
                    window.location = url;
 
                })
 
               });
 
            </script>
 
            		
 
		%if current not in ['home','admin']:           		
 
		   ##REGULAR MENU            
 
	        <ul id="quick">
 
				<!-- repo switcher -->
 
				<li>
 
					<a id="repo_switcher" title="${_('Switch repository')}" href="#">
 
                    <span class="icon">
 
                        <img src="/images/icons/database.png" alt="${_('Products')}" />
 
                    </span>
 
                    <span>&darr;</span>					
 
					</a>
 
					<div id="switch_repos" style="display:none;">
 
						<select id="repos_list" size="10">
 
						%for repo in c.repo_switcher_list:
 
							<option value="${repo}">${repo}</option>
 
						%endfor
 
						</select>
 
					</div>			
 
					<ul class="repo_switcher">
 
                        %for repo in c.repo_switcher_list:
 
                            <li>${h.link_to(repo,h.url('summary_home',repo_name=repo))}</li>
 
                        %endfor					
 
					</ul>			
 
				</li>
 
				
 
	            <li ${is_current('summary')}>
 
	               <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=c.repo_name)}">
 
	               <span class="icon">
 
	                   <img src="/images/icons/clipboard_16.png" alt="${_('Summary')}" />
 
	               </span>
 
	               <span>${_('Summary')}</span>                 
 
	               </a>	            
 
	            </li>
 
                <li ${is_current('shortlog')}>
 
                   <a title="${_('Shortlog')}" href="${h.url('shortlog_home',repo_name=c.repo_name)}">
 
                   <span class="icon">
 
                       <img src="/images/icons/application_double.png" alt="${_('Shortlog')}" />
 
                   </span>
 
                   <span>${_('Shortlog')}</span>                 
 
                   </a>             
 
                </li>	            
 
                <li ${is_current('changelog')}>
 
                   <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=c.repo_name)}">
 
                   <span class="icon">
 
                       <img src="/images/icons/time.png" alt="${_('Changelog')}" />
 
                   </span>
 
                   <span>${_('Changelog')}</span>                 
0 comments (0 inline, 0 general)