Mercurial > kallithea
changeset 1423:241a5167c4e0 beta
Added quick menu for each repo in main page.
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 10 Jul 2011 13:07:35 +0200 |
parents | e69da281e235 |
children | ac0c4e600426 |
files | rhodecode/public/css/style.css rhodecode/public/images/horizontal-indicator.png rhodecode/public/images/vertical-indicator.png rhodecode/templates/base/base.html rhodecode/templates/base/root.html rhodecode/templates/index_base.html |
diffstat | 6 files changed, 75 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/public/css/style.css Sat Jul 09 20:22:52 2011 +0200 +++ b/rhodecode/public/css/style.css Sun Jul 10 13:07:35 2011 +0200 @@ -370,7 +370,6 @@ background:url("../images/quick_l_selected.png") no-repeat top left; } - #header #header-inner #quick ul { top:29px; right:0; @@ -562,6 +561,33 @@ padding:12px 9px 7px 24px; } + +.quick_repo_menu{ + background: #FFF url("../images/vertical-indicator.png") 6px 9px no-repeat !important; + cursor: pointer; +} +.quick_repo_menu.active{ + background: #FFF url("../images/horizontal-indicator.png") 4px 9px no-repeat !important; + cursor: pointer; +} +.quick_repo_menu .menu_items{ + margin-top:6px; + position: absolute; + background-color:#FFF; + padding: 4px; + background: none repeat scroll 0 0 #FFFFFF; + border-color: #003367 #666666 #666666; + border-right: 1px solid #666666; + border-style: solid; + border-width: 1px; +} +.quick_repo_menu .menu_items .icon img{ + margin-bottom:-2px; +} +.quick_repo_menu .menu_items.hidden{ + display: none; +} + #content #left { left:0; width:280px;
--- a/rhodecode/templates/base/base.html Sat Jul 09 20:22:52 2011 +0200 +++ b/rhodecode/templates/base/base.html Sun Jul 10 13:07:35 2011 +0200 @@ -169,7 +169,6 @@ } if (req){ for (n in nodes){ - console.log(n); if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) { obsolete.push(nodes[n]); }
--- a/rhodecode/templates/base/root.html Sat Jul 09 20:22:52 2011 +0200 +++ b/rhodecode/templates/base/root.html Sun Jul 10 13:07:35 2011 +0200 @@ -116,7 +116,19 @@ YUE.preventDefault(e); }); - tooltip_activate() + tooltip_activate(); + + YUE.on(YUQ('.quick_repo_menu'),'click',function(e){ + var menu = e.currentTarget.firstElementChild; + if(YUD.hasClass(menu,'hidden')){ + YUD.addClass(e.currentTarget,'active'); + YUD.removeClass(menu,'hidden'); + }else{ + YUD.removeClass(e.currentTarget,'active'); + YUD.addClass(menu,'hidden'); + } + }) + }) </script>
--- a/rhodecode/templates/index_base.html Sat Jul 09 20:22:52 2011 +0200 +++ b/rhodecode/templates/index_base.html Sun Jul 10 13:07:35 2011 +0200 @@ -66,6 +66,7 @@ <table> <thead> <tr> + <th class="left"></th> <th class="left">${get_sort(_('Name'))}</th> <th class="left">${get_sort(_('Description'))}</th> <th class="left">${get_sort(_('Last change'))}</th> @@ -78,22 +79,48 @@ <tbody> %for cnt,repo in enumerate(c.repos_list): <tr class="parity${cnt%2}"> + <td class="quick_repo_menu inactive"> + <ul class="menu_items hidden"> + <li> + <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=repo['name'])}"> + <span class="icon"> + <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" /> + </span> + <span>${_('Summary')}</span> + </a> + </li> + <li> + <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=repo['name'])}"> + <span class="icon"> + <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" /> + </span> + <span>${_('Changelog')}</span> + </a> + </li> + <li> + <a title="${_('Files')}" href="${h.url('files_home',repo_name=repo['name'])}"> + <span class="icon"> + <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" /> + </span> + <span>${_('Files')}</span> + </a> + </li> + </ul> + </td> <td> + ## TYPE OF REPO <div style="white-space: nowrap"> - ## TYPE OF REPO %if repo['dbrepo']['repo_type'] =='hg': - <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url("/images/icons/hgicon.png")}"/> + <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> %elif repo['dbrepo']['repo_type'] =='git': - <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url("/images/icons/giticon.png")}"/> - %else: - + <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> %endif ##PRIVATE/PUBLIC %if repo['dbrepo']['private']: - <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url("/images/icons/lock.png")}"/> + <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/> %else: - <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url("/images/icons/lock_open.png")}"/> + <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/> %endif ##NAME @@ -103,7 +130,7 @@ <a href="${h.url('summary_home',repo_name=repo['dbrepo_fork']['repo_name'])}"> <img class="icon" alt="${_('fork')}" title="${_('Fork of')} ${repo['dbrepo_fork']['repo_name']}" - src="${h.url("/images/icons/arrow_divide.png")}"/></a> + src="${h.url('/images/icons/arrow_divide.png')}"/></a> %endif </div> </td>