Changeset 12435 for trunk/sources/HeuristicLab.Services.WebApp/3.3/Configs
- Timestamp:
- 06/12/15 14:59:54 (10 years ago)
- Location:
- trunk/sources/HeuristicLab.Services.WebApp/3.3/Configs
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Services.WebApp/3.3/Configs/BundleConfig.cs
r12428 r12435 1 using System.Collections.Generic; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System.Collections.Generic; 2 23 using System.IO; 3 using System.Linq;4 using System.Web;5 24 using System.Web.Optimization; 6 25 7 26 namespace HeuristicLab.Services.WebApp.Configs { 8 27 public class BundleConfig { 28 9 29 public static void RegisterBundles(BundleCollection bundles) { 10 30 bundles.IgnoreList.Clear(); … … 61 81 "~/WebApp/app.css" 62 82 )); 63 AddOrUpdateWebAppBundle(); 83 84 bundles.Add(new ScriptBundle("~/Bundles/WebApp/Main").Include( 85 "~/WebApp/main.js" 86 )); 87 88 bundles.Add(new ScriptBundle("~/Bundles/WebApp/Shared") 89 .IncludeDirectory("~/WebApp/shared/services", "*.js", true) 90 .IncludeDirectory("~/WebApp/shared/directives", "*.js", true) 91 .IncludeDirectory("~/WebApp/shared/menu", "*.js", true) 92 ); 64 93 } 65 94 66 public static void AddOrUpdateWebAppBundle() { 67 var jsBundle = BundleTable.Bundles.GetBundleFor("~/Bundles/WebApp/js"); 68 if (jsBundle != null) { 69 BundleTable.Bundles.Remove(jsBundle); 95 public static IEnumerable<string> GetWebAppScripts() { 96 var jsFiles = new List<string> { 97 "WebApp/helper.js", 98 "WebApp/app.js" 99 }; 100 PluginManager pluginManager = PluginManager.Instance; 101 foreach (var plugin in pluginManager.GetPlugins()) { 102 if (File.Exists(string.Format(@"{0}\{1}\{1}.js", PluginManager.PluginsDirectory, plugin.Name))) { 103 jsFiles.Add(string.Format("WebApp/plugins/{0}/{0}.js", plugin.Name)); 104 } 70 105 } 71 var jsFiles = new List<string> { 72 "~/WebApp/helper.js", 73 "~/WebApp/app.js" 74 }; 75 var directories = Directory.GetDirectories(string.Format(@"{0}WebApp\plugins", HttpRuntime.AppDomainAppPath)); 76 jsFiles.AddRange(directories.Select(Path.GetFileName).Select(directory => string.Format("~/WebApp/plugins/{0}/{0}.js", directory))); 77 jsFiles.Add("~/WebApp/main.js"); 78 jsBundle = new ScriptBundle("~/Bundles/WebApp/js"); 79 jsBundle.Include(jsFiles.ToArray()); 80 jsBundle.IncludeDirectory("~/WebApp/shared/", "*.js", true); 81 BundleTable.Bundles.Add(jsBundle); 106 jsFiles.Add("WebApp/main.js"); 107 return jsFiles; 82 108 } 83 109 } -
trunk/sources/HeuristicLab.Services.WebApp/3.3/Configs/FilterConfig.cs
r12428 r12435 1 using System.Web.Mvc; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System.Web.Mvc; 2 23 3 24 namespace HeuristicLab.Services.WebApp.Configs { -
trunk/sources/HeuristicLab.Services.WebApp/3.3/Configs/RouteConfig.cs
r12428 r12435 1 using System.Web.Mvc; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System.Web.Mvc; 2 23 using System.Web.Routing; 3 24 -
trunk/sources/HeuristicLab.Services.WebApp/3.3/Configs/WebApiConfig.cs
r12428 r12435 1 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 2 22 using System.Net.Http.Formatting; 3 23 using System.Web.Http;
Note: See TracChangeset
for help on using the changeset viewer.