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
 
@@ -379,147 +379,158 @@ div.options a:hover
 
#header #header-inner #quick li span.icon
 
{
 
    top: 0;
 
    left: 0;
 
    padding: 8px 8px 4px 8px;
 
    background: url("../../resources/images/colors/blue/quick_l.png") no-repeat top left;
 
    border-left: none;
 
    border-right: 1px solid #2e5c89;
 
}
 
 
#header #header-inner #quick li a:hover
 
{
 
    background: #4e4e4e url("../../resources/images/colors/blue/quick_l_selected.png") no-repeat top left;
 
}
 
 
#header #header-inner #quick li a:hover span
 
{
 
    background: url("../../resources/images/colors/blue/quick_r_selected.png") no-repeat top right;
 
    border-left: 1px solid #545454;
 
}
 
 
#header #header-inner #quick li a:hover span.normal
 
{
 
    border: none;   
 
}
 
 
#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;
 
}
 
 
#header #header-inner #quick li ul li a.childs
 
{
 
    margin: 0;
 
    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;
 
    margin:0;
 
    padding:12px 9px 7px 24px;
 
    width:167px;
 
 
}
 
#header #header-inner #quick li ul li a.users,
 
#header #header-inner #quick li ul li a.users:hover
 
{
 
    background: #FFFFFF url("../images/icons/user_edit.png") no-repeat 4px 9px;
 
    margin:0;
 
    padding:12px 9px 7px 24px;
 
    width:167px;    
 
}
 
#header #header-inner #quick li ul li a.settings,
 
#header #header-inner #quick li ul li a.settings:hover
 
{
 
    background: #FFFFFF url("../images/icons/cog.png") no-repeat 4px 9px;
 
    margin:0;
 
    padding:12px 9px 7px 24px;
 
    width:167px;        
 
}
 
 
#header #header-inner #quick li ul li a.permissions,
 
#header #header-inner #quick li ul li a.permissions:hover
 
@@ -3376,96 +3387,101 @@ table.code-browser .browser-dir {
 
    padding-top: 1px;
 
    text-align: left;
 
}
 
 
.rss_icon {
 
    background: url("/images/icons/rss_16.png") no-repeat scroll 3px;
 
    height: 16px;
 
    padding-left: 20px;
 
    padding-top: 1px;
 
    text-align: left;
 
}
 
 
.atom_icon {
 
    background: url("/images/icons/atom.png") no-repeat scroll 3px;
 
    height: 16px;
 
    padding-left: 20px;
 
    padding-top: 1px;
 
    text-align: left;
 
}
 
 
.archive_icon {
 
    background: url("/images/icons/compress.png") no-repeat scroll 3px;
 
    height: 16px;
 
    padding-left: 20px;
 
    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;
 
    padding: 0px 0px 10px 0px;
 
}
 
 
.error_msg {
 
    background-color: #FFCFCF;
 
    background-image: url("/images/icons/error_msg.png");
 
    border: 1px solid #FF9595;
 
    color: #CC3300;
 
}
 
 
.warning_msg {
 
    background-color: #FFFBCC;
 
    background-image: url("/images/icons/warning_msg.png");
 
    border: 1px solid #FFF35E;
 
    color: #C69E00;
 
}
 
 
.success_msg {
 
    background-color: #D5FFCF;
 
    background-image: url("/images/icons/success_msg.png");
 
    border: 1px solid #97FF88;
 
    color: #009900;
 
}
 
pylons_app/templates/base/base.html
Show inline comments
 
@@ -40,137 +40,112 @@
 
            <!-- quick menu -->
 
            ${self.page_nav()}
 
            <!-- end quick -->
 
            <div class="corner tl"></div>
 
            <div class="corner tr"></div>
 
        </div>
 
    </div>     
 
    <!-- end header -->
 
    
 
	<!-- CONTENT -->
 
	<div id="content"> 
 
        <div class="flash_msg">
 
            <% messages = h.flash.pop_messages() %>
 
            % if messages:
 
            <ul id="flash-messages">
 
                % for message in messages:
 
                <li class="${message.category}_msg">${message}</li>
 
                % endfor
 
            </ul>
 
            % endif
 
        </div>	    
 
	    <div id="main"> 
 
	        ${next.main()}
 
	    </div>
 
	</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>                 
 
                   </a>             
 
                </li>   	
 
                
 
                <li ${is_current('switch_to')}>
 
                   <a title="${_('Switch to')}" href="#">
 
                   <span class="icon">
 
                       <img src="/images/icons/arrow_switch.png" alt="${_('Switch to')}" />
 
                   </span>
 
                   <span>${_('Switch to')}</span>                 
 
                   </a>    
 
                    <ul>
 
                        <li>
 
                            ${h.link_to(_('branches'),h.url('branches_home',repo_name=c.repo_name),class_='branches childs')}
 
                            <ul>
 
						        %for cnt,branch in enumerate(c.repository_branches.items()):
 
						            <li>${h.link_to('%s - %s' % (branch[0],branch[1]),h.url('files_home',repo_name=c.repo_name,revision=branch[1]))}</li>
 
						        %endfor
 
                            </ul>                        
 
                        </li>
 
                        <li>
 
                            ${h.link_to(_('tags'),h.url('tags_home',repo_name=c.repo_name),class_='tags childs')}
 
                            <ul>
 
                                %for cnt,tag in enumerate(c.repository_tags.items()):
 
                                 <li>${h.link_to('%s - %s' % (tag[0],tag[1]),h.url('files_home',repo_name=c.repo_name,revision=tag[1]))}</li>
0 comments (0 inline, 0 general)