Merge pull request #1359 from raghunayyar/navigation

No Image Repetition on Enabling Apps in Navigation Bar
This commit is contained in:
Jan-Christoph Borchardt 2013-01-31 05:01:20 -08:00
commit c801b86bc2
2 changed files with 10 additions and 4 deletions

View File

@ -193,6 +193,11 @@ fieldset.warning legend { color:#b94a48 !important; }
#navigation a:hover, #navigation a:focus { opacity:.8; }
#navigation a.active { opacity:1; }
#navigation .icon { display:block; width:32px; height:32px; margin:0 16px 0; }
#navigation .enabled-app:hover, #navigation .enabled-app:focus { opacity:1; }
#navigation .enabled-app img { opacity:0.3; cursor:pointer;}
#navigation .enabled-app a {padding:4px 0 4px; }
#navigation .enabled-app:hover a, #navigation .enabled-app:focus a {opacity:0.8; }
#navigation .enabled-app:hover img, #navigation .enabled-app:focus img {opacity:0.8; }
#navigation li:first-child a { padding-top:16px; }
#settings { float:right; margin-top:7px; color:#bbb; text-shadow:0 -1px 0 #000; }
#expand { padding:15px; cursor:pointer; font-weight:bold; }
@ -204,6 +209,7 @@ fieldset.warning legend { color:#b94a48 !important; }
#expanddiv a img { margin-bottom:-3px; }
#expanddiv a:hover, #expanddiv a:focus, #expanddiv a:active { opacity:1; }
/* VARIOUS REUSABLE SELECTORS */
.hidden { display:none; }
.bold { font-weight:bold; }

View File

@ -109,12 +109,12 @@ OC.Settings.Apps = OC.Settings.Apps || {
var container = $('#apps');
if(container.children('li[data-id="'+entry.id+'"]').length === 0){
var li=$('<li></li>');
var li=$('<li></li>').attr({class: 'enabled-app'});
li.attr('data-id', entry.id);
var a=$('<a></a>');
a.attr('style', 'background-image: url('+entry.icon+')');
var img= $('<img></img>').attr({ src: entry.icon, class:'icon'});
li.append(img);
var a=$('<a></a>').attr('href', entry.href);
a.text(entry.name);
a.attr('href', entry.href);
li.append(a);
container.append(li);
}