Explorar o código

Fixed minor bug in shortcut creator

tobychui %!s(int64=4) %!d(string=hai) anos
pai
achega
7f3bb4cf39
Modificáronse 1 ficheiros con 5 adicións e 2 borrados
  1. 5 2
      web/SystemAO/desktop/shortcutCreator.html

+ 5 - 2
web/SystemAO/desktop/shortcutCreator.html

@@ -207,8 +207,11 @@
             var moduleInfo =  JSON.parse(decodeURIComponent($("#moduleList").val()));
             var moduleInfo =  JSON.parse(decodeURIComponent($("#moduleList").val()));
             //Use the startup path for embeded > fw > default
             //Use the startup path for embeded > fw > default
             var moduleIcon = moduleInfo.IconPath;
             var moduleIcon = moduleInfo.IconPath;
-            if (imageExists("../../" + moduleIcon.replace("small_icon","desktop_icon"))){
-                moduleIcon = moduleIcon.replace("small_icon","desktop_icon");
+            var moduleIconDir = moduleIcon.split("/");
+            moduleIconDir.pop();
+            moduleIconDir.join("/");
+            if (imageExists("../../" + moduleIconDir + "desktop_icon.png")){
+                moduleIcon = moduleIconDir + "desktop_icon.png";
             }
             }
             generateShortcutFile("module",moduleInfo.Name, moduleInfo.Name, moduleIcon);
             generateShortcutFile("module",moduleInfo.Name, moduleInfo.Name, moduleIcon);
             $(".stageTwo").slideUp();
             $(".stageTwo").slideUp();