]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add fallback for svg app icons
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>
Fri, 28 Jun 2013 20:10:40 +0000 (23:10 +0300)
committerVictor Dubiniuk <victor.dubiniuk@gmail.com>
Mon, 1 Jul 2013 20:11:54 +0000 (23:11 +0300)
settings/js/apps.js

index caf47c343fb962088c88689bd924dcd0b4c00d37..346598a7651623a0be0ae6befc231b527a1865fc 100644 (file)
@@ -147,12 +147,16 @@ OC.Settings.Apps = OC.Settings.Apps || {
                                                li.attr('data-id', entry.id);
                                                var img= $('<img class="icon"/>').attr({ src: entry.icon});
                                                var a=$('<a></a>').attr('href', entry.href);
-                                               var filename=$('<span></span>')
+                                               var filename=$('<span></span>');
                                                filename.text(entry.name);
                                                a.prepend(filename);
                                                a.prepend(img);
                                                li.append(a);
                                                container.append(li);
+                                               if (entry.icon.match(/\.svg$/i)) {
+                                                       $(img).addClass('svg');
+                                                       replaceSVG();
+                                               }
                                        }
                                }
                        }