summaryrefslogtreecommitdiffstats
path: root/settings/js/apps.js
diff options
context:
space:
mode:
authorraghunayyar <me@iraghu.com>2013-01-31 11:52:56 +0530
committerraghunayyar <me@iraghu.com>2013-01-31 11:52:56 +0530
commitb978cc8b288d3e05b6eb83b04215402665ed128b (patch)
tree92a819732b02155663698d72e7abe3084213bdc7 /settings/js/apps.js
parent0dfbd53a6efdc1cb37c36c6bf64fd4eb8f8206d7 (diff)
downloadnextcloud-server-b978cc8b288d3e05b6eb83b04215402665ed128b.tar.gz
nextcloud-server-b978cc8b288d3e05b6eb83b04215402665ed128b.zip
Shorter, Cleaner JS in apps.js
Diffstat (limited to 'settings/js/apps.js')
-rw-r--r--settings/js/apps.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/settings/js/apps.js b/settings/js/apps.js
index ec0de8e4da5..83a3f3c7dcc 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -109,16 +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 img =$('<img></img>');
+ var li=$('<li></li>').attr({class: 'enabled-app'});
li.attr('data-id', entry.id);
- li.attr('class', 'enabled-app');
- img.attr('src', entry.icon);
- img.attr('class', 'icon');
- li.append(img);
- var a=$('<a></a>');
+ 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);
}