From b978cc8b288d3e05b6eb83b04215402665ed128b Mon Sep 17 00:00:00 2001 From: raghunayyar Date: Thu, 31 Jan 2013 11:52:56 +0530 Subject: [PATCH] Shorter, Cleaner JS in apps.js --- settings/js/apps.js | 12 ++++-------- 1 file 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=$('
  • '); - var img =$(''); + var 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=$(''); + var img= $('').attr({ src: entry.icon, class:'icon'}); + li.append(img); + var a=$('').attr('href', entry.href); a.text(entry.name); - a.attr('href', entry.href); li.append(a); container.append(li); } -- 2.39.5