Shorter, Cleaner JS in apps.js
This commit is contained in:
parent
0dfbd53a6e
commit
b978cc8b28
|
@ -109,16 +109,12 @@ OC.Settings.Apps = OC.Settings.Apps || {
|
||||||
var container = $('#apps');
|
var container = $('#apps');
|
||||||
|
|
||||||
if(container.children('li[data-id="'+entry.id+'"]').length === 0){
|
if(container.children('li[data-id="'+entry.id+'"]').length === 0){
|
||||||
var li=$('<li></li>');
|
var li=$('<li></li>').attr({class: 'enabled-app'});
|
||||||
var img =$('<img></img>');
|
|
||||||
li.attr('data-id', entry.id);
|
li.attr('data-id', entry.id);
|
||||||
li.attr('class', 'enabled-app');
|
var img= $('<img></img>').attr({ src: entry.icon, class:'icon'});
|
||||||
img.attr('src', entry.icon);
|
|
||||||
img.attr('class', 'icon');
|
|
||||||
li.append(img);
|
li.append(img);
|
||||||
var a=$('<a></a>');
|
var a=$('<a></a>').attr('href', entry.href);
|
||||||
a.text(entry.name);
|
a.text(entry.name);
|
||||||
a.attr('href', entry.href);
|
|
||||||
li.append(a);
|
li.append(a);
|
||||||
container.append(li);
|
container.append(li);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue