├── .gitignore ├── Dnn Mvc Module.vsix ├── Dnn Spa Module.vsix ├── LICENSE ├── README.md └── src ├── DnnMvcModule ├── App_LocalResources │ ├── Item.resx │ └── Settings.resx ├── BuildScripts │ ├── MSBuild.Community.Tasks.Targets │ ├── MSBuild.Community.Tasks.dll │ └── ModulePackage.targets ├── Components │ ├── FeatureController.cs │ └── ItemManager.cs ├── Controllers │ ├── ItemController.cs │ └── SettingsController.cs ├── DnnMvcModule.csproj ├── DnnMvcModule.dnn ├── Documentation │ ├── Documentation.css │ └── Documentation.html ├── License.txt ├── Models │ ├── Item.cs │ └── Settings.cs ├── Properties │ └── AssemblyInfo.cs ├── Providers │ └── DataProviders │ │ └── SqlDataProvider │ │ ├── 00.00.01.SqlDataProvider │ │ └── Uninstall.SqlDataProvider ├── ReleaseNotes.txt ├── RouteConfig.cs ├── Views │ ├── Item │ │ ├── .vscode │ │ │ └── settings.json │ │ ├── Edit.cshtml │ │ └── Index.cshtml │ ├── Settings │ │ └── Settings.cshtml │ ├── Shared │ │ └── _Layout.cshtml │ └── _ViewStart.cshtml ├── Web.Debug.config ├── Web.Release.config ├── Web.config ├── install │ ├── DnnMvcModule_00.00.01_Install.zip │ └── DnnMvcModule_00.00.01_Source.zip ├── module.css └── packages.config ├── DnnMvcSpaModule.sln ├── DnnSpaModule ├── .build │ ├── MSBuild.Community.Tasks.dll │ └── MSBuild.Community.Tasks.targets ├── .gitattributes ├── .gitignore ├── App_LocalResources │ ├── Edit.resx │ ├── Settings.resx │ └── View.resx ├── Build.proj ├── BuildScripts │ ├── MSBuild.Community.Tasks.Targets │ ├── MSBuild.Community.Tasks.dll │ └── ModulePackage.targets ├── Components │ ├── FeatureController.cs │ ├── IItemRepository.cs │ ├── Item.cs │ └── ItemRepository.cs ├── DNNSPAModuleModuleBase.cs ├── DNNSPAModuleModuleSettingsBase.cs ├── DnnSpaModule.csproj ├── DnnSpaModule.dnn ├── Documentation │ ├── Documentation.css │ └── Documentation.html ├── Edit.html ├── License.txt ├── Properties │ └── AssemblyInfo.cs ├── Providers │ └── DataProviders │ │ └── SqlDataProvider │ │ ├── 00.00.01.SqlDataProvider │ │ └── Uninstall.SqlDataProvider ├── ReleaseNotes.txt ├── Scripts │ ├── ItemEdit.js │ ├── ItemView.js │ └── QuickSettings.js ├── Services │ ├── ItemController.cs │ ├── ServiceRouteMapper.cs │ ├── UserController.cs │ └── ViewModels │ │ ├── ItemViewModel.cs │ │ └── UserViewModel.cs ├── Settings.html ├── View.html ├── install │ ├── DnnSpaModule_00.00.01_Install.zip │ └── DnnSpaModule_00.00.01_Source.zip ├── module.css └── packages.config └── vsix ├── DnnMvcModule ├── DnnMvcModule.sln └── DnnMvcModule │ ├── DnnMvcModule.csproj │ ├── License.txt │ ├── Properties │ └── AssemblyInfo.cs │ ├── Web │ └── Dnn │ │ └── Dnn Mvc Module.zip │ ├── __TemplateIcon.ico │ ├── index.html │ ├── source.extension.vsixmanifest │ └── stylesheet.css └── DnnSpaModule ├── DnnMvcModule ├── DnnSpaModule.csproj ├── License.txt ├── Properties │ └── AssemblyInfo.cs ├── Web │ └── Dnn │ │ └── Dnn Spa Module.zip ├── __TemplateIcon.ico ├── index.html ├── source.extension.vsixmanifest └── stylesheet.css └── DnnSpaModule.sln /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | build/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studo 2015 cache/options directory 26 | .vs/ 27 | 28 | # MSTest test Results 29 | [Tt]est[Rr]esult*/ 30 | [Bb]uild[Ll]og.* 31 | 32 | # NUNIT 33 | *.VisualState.xml 34 | TestResult.xml 35 | 36 | # Build Results of an ATL Project 37 | [Dd]ebugPS/ 38 | [Rr]eleasePS/ 39 | dlldata.c 40 | 41 | *_i.c 42 | *_p.c 43 | *_i.h 44 | *.ilk 45 | *.meta 46 | *.obj 47 | *.pch 48 | *.pdb 49 | *.pgc 50 | *.pgd 51 | *.rsp 52 | *.sbr 53 | *.tlb 54 | *.tli 55 | *.tlh 56 | *.tmp 57 | *.tmp_proj 58 | *.log 59 | *.vspscc 60 | *.vssscc 61 | .builds 62 | *.pidb 63 | *.svclog 64 | *.scc 65 | 66 | # Chutzpah Test files 67 | _Chutzpah* 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | *.cachefile 76 | 77 | # Visual Studio profiler 78 | *.psess 79 | *.vsp 80 | *.vspx 81 | 82 | # TFS 2012 Local Workspace 83 | $tf/ 84 | 85 | # Guidance Automation Toolkit 86 | *.gpState 87 | 88 | # ReSharper is a .NET coding add-in 89 | _ReSharper*/ 90 | *.[Rr]e[Ss]harper 91 | *.DotSettings.user 92 | 93 | # JustCode is a .NET coding addin-in 94 | .JustCode 95 | 96 | # TeamCity is a build add-in 97 | _TeamCity* 98 | 99 | # DotCover is a Code Coverage Tool 100 | *.dotCover 101 | 102 | # NCrunch 103 | _NCrunch_* 104 | .*crunch*.local.xml 105 | 106 | # MightyMoose 107 | *.mm.* 108 | AutoTest.Net/ 109 | 110 | # Web workbench (sass) 111 | .sass-cache/ 112 | 113 | # Installshield output folder 114 | [Ee]xpress/ 115 | 116 | # DocProject is a documentation generator add-in 117 | DocProject/buildhelp/ 118 | DocProject/Help/*.HxT 119 | DocProject/Help/*.HxC 120 | DocProject/Help/*.hhc 121 | DocProject/Help/*.hhk 122 | DocProject/Help/*.hhp 123 | DocProject/Help/Html2 124 | DocProject/Help/html 125 | 126 | # Click-Once directory 127 | publish/ 128 | 129 | # Publish Web Output 130 | *.[Pp]ublish.xml 131 | *.azurePubxml 132 | # TODO: Comment the next line if you want to checkin your web deploy settings 133 | # but database connection strings (with potential passwords) will be unencrypted 134 | *.pubxml 135 | *.publishproj 136 | 137 | # NuGet Packages 138 | *.nupkg 139 | # The packages folder can be ignored because of Package Restore 140 | **/packages/* 141 | # except build/, which is used as an MSBuild target. 142 | !**/packages/build/ 143 | # Uncomment if necessary however generally it will be regenerated when needed 144 | #!**/packages/repositories.config 145 | 146 | # Windows Azure Build Output 147 | csx/ 148 | *.build.csdef 149 | 150 | # Windows Store app package directory 151 | AppPackages/ 152 | 153 | # Others 154 | *.[Cc]ache 155 | ClientBin/ 156 | [Ss]tyle[Cc]op.* 157 | ~$* 158 | *~ 159 | *.dbmdl 160 | *.dbproj.schemaview 161 | *.pfx 162 | *.publishsettings 163 | node_modules/ 164 | bower_components/ 165 | 166 | # RIA/Silverlight projects 167 | Generated_Code/ 168 | 169 | # Backup & report files from converting an old project file 170 | # to a newer Visual Studio version. Backup files are not needed, 171 | # because we have git ;-) 172 | _UpgradeReport_Files/ 173 | Backup*/ 174 | UpgradeLog*.XML 175 | UpgradeLog*.htm 176 | 177 | # SQL Server files 178 | *.mdf 179 | *.ldf 180 | 181 | # Business Intelligence projects 182 | *.rdl.data 183 | *.bim.layout 184 | *.bim_*.settings 185 | 186 | # Microsoft Fakes 187 | FakesAssemblies/ 188 | 189 | # Node.js Tools for Visual Studio 190 | .ntvs_analysis.dat 191 | 192 | # Visual Studio 6 build log 193 | *.plg 194 | 195 | # Visual Studio 6 workspace options file 196 | *.opt 197 | 198 | -------------------------------------------------------------------------------- /Dnn Mvc Module.vsix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnnsoftware/DNN.Templates/c3181a2d1cd0e4ed8d358c523e5b08897ee6e070/Dnn Mvc Module.vsix -------------------------------------------------------------------------------- /Dnn Spa Module.vsix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnnsoftware/DNN.Templates/c3181a2d1cd0e4ed8d358c523e5b08897ee6e070/Dnn Spa Module.vsix -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2002-2017 DNN Software (http://www.dnnsoftware.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DNN8Templates 2 | Quick and easy to use Module and Theme (skin) Development templates for DotNetNuke 8.0.0+ and Visual Studio 2015. 3 | 4 |

Installation

5 | You can directly install the .VSIX file by double click on it. 6 | 7 | In order to create a new module follow these steps: 8 | 9 | 1. Open visual studio. 10 | 2. Click on File -> New -> Project 11 | 3. Click on Visual C# -> Dnn. 12 | 4. Select the template to use, Enter the module name and click Ok. 13 | 5. You are ready to build your own Mvc/Spa module in Dnn. 14 | 15 | After you build in Release Mode the installable packages (source/install) can be found in the INSTALL folder now, within your module's folder, not the packages folder anymore 16 | -------------------------------------------------------------------------------- /src/DnnMvcModule/App_LocalResources/Item.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | Add New Item 122 | 123 | 124 | DnnMvcModule Item Basic Settings 125 | 126 | 127 | Cancel 128 | 129 | 130 | Collapse All 131 | 132 | 133 | Delete 134 | 135 | 136 | Edit 137 | 138 | 139 | Expand All 140 | 141 | 142 | Assigned User 143 | 144 | 145 | Description 146 | 147 | 148 | Name 149 | 150 | 151 | Save 152 | 153 | -------------------------------------------------------------------------------- /src/DnnMvcModule/App_LocalResources/Settings.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | DnnMvcModule Item Basic Settings 122 | 123 | 124 | DnnMvcModule Settings 125 | 126 | 127 | Put your value for Setting 1 here. 128 | 129 | 130 | Setting One 131 | 132 | 133 | Put your value for Setting 2 here. 134 | 135 | 136 | Setting Two 137 | 138 | -------------------------------------------------------------------------------- /src/DnnMvcModule/BuildScripts/MSBuild.Community.Tasks.Targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildProjectDirectory)\BuildScripts 5 | $(MSBuildProjectDirectory)\..\..\bin 6 | $(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.dll 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /src/DnnMvcModule/BuildScripts/MSBuild.Community.Tasks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnnsoftware/DNN.Templates/c3181a2d1cd0e4ed8d358c523e5b08897ee6e070/src/DnnMvcModule/BuildScripts/MSBuild.Community.Tasks.dll -------------------------------------------------------------------------------- /src/DnnMvcModule/BuildScripts/ModulePackage.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /src/DnnMvcModule/Components/FeatureController.cs: -------------------------------------------------------------------------------- 1 | /* 2 | ' Copyright (c) 2015 Christoc.com 3 | ' All rights reserved. 4 | ' 5 | ' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 6 | ' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 7 | ' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 8 | ' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9 | ' DEALINGS IN THE SOFTWARE. 10 | ' 11 | */ 12 | 13 | using System.Collections.Generic; 14 | //using System.Xml; 15 | using DotNetNuke.Entities.Modules; 16 | using DotNetNuke.Services.Search; 17 | 18 | namespace Dnn.Modules.DnnMvcModule.Components 19 | { 20 | 21 | /// ----------------------------------------------------------------------------- 22 | /// 23 | /// The Controller class for DnnMvcModule 24 | /// 25 | /// The FeatureController class is defined as the BusinessController in the manifest file (.dnn) 26 | /// DotNetNuke will poll this class to find out which Interfaces the class implements. 27 | /// 28 | /// The IPortable interface is used to import/export content from a DNN module 29 | /// 30 | /// The ISearchable interface is used by DNN to index the content of a module 31 | /// 32 | /// The IUpgradeable interface allows module developers to execute code during the upgrade 33 | /// process for a module. 34 | /// 35 | /// Below you will find stubbed out implementations of each, uncomment and populate with your own data 36 | /// 37 | /// ----------------------------------------------------------------------------- 38 | 39 | //uncomment the interfaces to add the support. 40 | public class FeatureController //: IPortable, ISearchable, IUpgradeable 41 | { 42 | 43 | 44 | #region Optional Interfaces 45 | 46 | /// ----------------------------------------------------------------------------- 47 | /// 48 | /// ExportModule implements the IPortable ExportModule Interface 49 | /// 50 | /// The Id of the module to be exported 51 | /// ----------------------------------------------------------------------------- 52 | //public string ExportModule(int ModuleID) 53 | //{ 54 | //string strXML = ""; 55 | 56 | //List colDnnMvcModules = GetDnnMvcModules(ModuleID); 57 | //if (colDnnMvcModules.Count != 0) 58 | //{ 59 | // strXML += ""; 60 | 61 | // foreach (DnnMvcModuleInfo objDnnMvcModule in colDnnMvcModules) 62 | // { 63 | // strXML += ""; 64 | // strXML += "" + DotNetNuke.Common.Utilities.XmlUtils.XMLEncode(objDnnMvcModule.Content) + ""; 65 | // strXML += ""; 66 | // } 67 | // strXML += ""; 68 | //} 69 | 70 | //return strXML; 71 | 72 | // throw new System.NotImplementedException("The method or operation is not implemented."); 73 | //} 74 | 75 | /// ----------------------------------------------------------------------------- 76 | /// 77 | /// ImportModule implements the IPortable ImportModule Interface 78 | /// 79 | /// The Id of the module to be imported 80 | /// The content to be imported 81 | /// The version of the module to be imported 82 | /// The Id of the user performing the import 83 | /// ----------------------------------------------------------------------------- 84 | //public void ImportModule(int ModuleID, string Content, string Version, int UserID) 85 | //{ 86 | //XmlNode xmlDnnMvcModules = DotNetNuke.Common.Globals.GetContent(Content, "DnnMvcModules"); 87 | //foreach (XmlNode xmlDnnMvcModule in xmlDnnMvcModules.SelectNodes("DnnMvcModule")) 88 | //{ 89 | // DnnMvcModuleInfo objDnnMvcModule = new DnnMvcModuleInfo(); 90 | // objDnnMvcModule.ModuleId = ModuleID; 91 | // objDnnMvcModule.Content = xmlDnnMvcModule.SelectSingleNode("content").InnerText; 92 | // objDnnMvcModule.CreatedByUser = UserID; 93 | // AddDnnMvcModule(objDnnMvcModule); 94 | //} 95 | 96 | // throw new System.NotImplementedException("The method or operation is not implemented."); 97 | //} 98 | 99 | /// ----------------------------------------------------------------------------- 100 | /// 101 | /// GetSearchItems implements the ISearchable Interface 102 | /// 103 | /// The ModuleInfo for the module to be Indexed 104 | /// ----------------------------------------------------------------------------- 105 | //public DotNetNuke.Services.Search.SearchItemInfoCollection GetSearchItems(DotNetNuke.Entities.Modules.ModuleInfo ModInfo) 106 | //{ 107 | //SearchItemInfoCollection SearchItemCollection = new SearchItemInfoCollection(); 108 | 109 | //List colDnnMvcModules = GetDnnMvcModules(ModInfo.ModuleID); 110 | 111 | //foreach (DnnMvcModuleInfo objDnnMvcModule in colDnnMvcModules) 112 | //{ 113 | // SearchItemInfo SearchItem = new SearchItemInfo(ModInfo.ModuleTitle, objDnnMvcModule.Content, objDnnMvcModule.CreatedByUser, objDnnMvcModule.CreatedDate, ModInfo.ModuleID, objDnnMvcModule.ItemId.ToString(), objDnnMvcModule.Content, "ItemId=" + objDnnMvcModule.ItemId.ToString()); 114 | // SearchItemCollection.Add(SearchItem); 115 | //} 116 | 117 | //return SearchItemCollection; 118 | 119 | // throw new System.NotImplementedException("The method or operation is not implemented."); 120 | //} 121 | 122 | /// ----------------------------------------------------------------------------- 123 | /// 124 | /// UpgradeModule implements the IUpgradeable Interface 125 | /// 126 | /// The current version of the module 127 | /// ----------------------------------------------------------------------------- 128 | //public string UpgradeModule(string Version) 129 | //{ 130 | // throw new System.NotImplementedException("The method or operation is not implemented."); 131 | //} 132 | 133 | #endregion 134 | 135 | } 136 | 137 | } 138 | -------------------------------------------------------------------------------- /src/DnnMvcModule/Components/ItemManager.cs: -------------------------------------------------------------------------------- 1 | /* 2 | ' Copyright (c) 2015 Christoc.com 3 | ' All rights reserved. 4 | ' 5 | ' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 6 | ' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 7 | ' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 8 | ' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9 | ' DEALINGS IN THE SOFTWARE. 10 | ' 11 | */ 12 | using System.Collections.Generic; 13 | using DotNetNuke.Data; 14 | using DotNetNuke.Framework; 15 | using Dnn.Modules.DnnMvcModule.Models; 16 | 17 | namespace Dnn.Modules.DnnMvcModule.Components 18 | { 19 | interface IItemManager 20 | { 21 | void CreateItem(Item t); 22 | void DeleteItem(int itemId, int moduleId); 23 | void DeleteItem(Item t); 24 | IEnumerable GetItems(int moduleId); 25 | Item GetItem(int itemId, int moduleId); 26 | void UpdateItem(Item t); 27 | } 28 | 29 | class ItemManager: ServiceLocator, IItemManager 30 | { 31 | public void CreateItem(Item t) 32 | { 33 | using (IDataContext ctx = DataContext.Instance()) 34 | { 35 | var rep = ctx.GetRepository(); 36 | rep.Insert(t); 37 | } 38 | } 39 | 40 | public void DeleteItem(int itemId, int moduleId) 41 | { 42 | var t = GetItem(itemId, moduleId); 43 | DeleteItem(t); 44 | } 45 | 46 | public void DeleteItem(Item t) 47 | { 48 | using (IDataContext ctx = DataContext.Instance()) 49 | { 50 | var rep = ctx.GetRepository(); 51 | rep.Delete(t); 52 | } 53 | } 54 | 55 | public IEnumerable GetItems(int moduleId) 56 | { 57 | IEnumerable t; 58 | using (IDataContext ctx = DataContext.Instance()) 59 | { 60 | var rep = ctx.GetRepository(); 61 | t = rep.Get(moduleId); 62 | } 63 | return t; 64 | } 65 | 66 | public Item GetItem(int itemId, int moduleId) 67 | { 68 | Item t; 69 | using (IDataContext ctx = DataContext.Instance()) 70 | { 71 | var rep = ctx.GetRepository(); 72 | t = rep.GetById(itemId, moduleId); 73 | } 74 | return t; 75 | } 76 | 77 | public void UpdateItem(Item t) 78 | { 79 | using (IDataContext ctx = DataContext.Instance()) 80 | { 81 | var rep = ctx.GetRepository(); 82 | rep.Update(t); 83 | } 84 | } 85 | 86 | protected override System.Func GetFactory() 87 | { 88 | return () => new ItemManager(); 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/DnnMvcModule/Controllers/ItemController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Web.Mvc; 4 | using Dnn.Modules.DnnMvcModule.Components; 5 | using Dnn.Modules.DnnMvcModule.Models; 6 | using DotNetNuke.Web.Mvc.Framework.Controllers; 7 | using DotNetNuke.Web.Mvc.Framework.ActionFilters; 8 | using DotNetNuke.Entities.Users; 9 | using DotNetNuke.Framework.JavaScriptLibraries; 10 | 11 | namespace Dnn.Modules.DnnMvcModule.Controllers 12 | { 13 | [DnnHandleError] 14 | public class ItemController : DnnController 15 | { 16 | 17 | public ActionResult Delete(int itemId) 18 | { 19 | ItemManager.Instance.DeleteItem(itemId, ModuleContext.ModuleId); 20 | return RedirectToDefaultRoute(); 21 | } 22 | 23 | public ActionResult Edit(int itemId = -1) 24 | { 25 | DotNetNuke.Framework.JavaScriptLibraries.JavaScript.RequestRegistration(CommonJs.DnnPlugins); 26 | 27 | var userlist = UserController.GetUsers(PortalSettings.PortalId); 28 | var users = from user in userlist.Cast().ToList() 29 | select new SelectListItem { Text = user.DisplayName, Value = user.UserID.ToString() }; 30 | 31 | ViewBag.Users = users; 32 | 33 | var item = (itemId == -1) 34 | ? new Item { ModuleId = ModuleContext.ModuleId } 35 | : ItemManager.Instance.GetItem(itemId, ModuleContext.ModuleId); 36 | 37 | return View(item); 38 | } 39 | 40 | [HttpPost] 41 | [DotNetNuke.Web.Mvc.Framework.ActionFilters.ValidateAntiForgeryToken] 42 | public ActionResult Edit(Item item) 43 | { 44 | if (item.ItemId == -1) 45 | { 46 | item.CreatedByUserId = User.UserID; 47 | item.CreatedOnDate = DateTime.UtcNow; 48 | item.LastModifiedByUserId = User.UserID; 49 | item.LastModifiedOnDate = DateTime.UtcNow; 50 | 51 | ItemManager.Instance.CreateItem(item); 52 | } 53 | else 54 | { 55 | var existingItem = ItemManager.Instance.GetItem(item.ItemId, item.ModuleId); 56 | existingItem.LastModifiedByUserId = User.UserID; 57 | existingItem.LastModifiedOnDate = DateTime.UtcNow; 58 | existingItem.ItemName = item.ItemName; 59 | existingItem.ItemDescription = item.ItemDescription; 60 | existingItem.AssignedUserId = item.AssignedUserId; 61 | 62 | ItemManager.Instance.UpdateItem(existingItem); 63 | } 64 | 65 | return RedirectToDefaultRoute(); 66 | } 67 | 68 | [ModuleAction(ControlKey = "Edit", TitleKey = "AddItem")] 69 | public ActionResult Index() 70 | { 71 | var items = ItemManager.Instance.GetItems(ModuleContext.ModuleId); 72 | return View(items); 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/DnnMvcModule/Controllers/SettingsController.cs: -------------------------------------------------------------------------------- 1 | using DotNetNuke.Web.Mvc.Framework.Controllers; 2 | using DotNetNuke.Collections; 3 | using System.Web.Mvc; 4 | using DotNetNuke.Security; 5 | using DotNetNuke.Web.Mvc.Framework.ActionFilters; 6 | 7 | namespace Dnn.Modules.DnnMvcModule.Controllers 8 | { 9 | [DnnModuleAuthorize(AccessLevel = SecurityAccessLevel.Edit)] 10 | [DnnHandleError] 11 | public class SettingsController : DnnController 12 | { 13 | /// 14 | /// 15 | /// 16 | /// 17 | [HttpGet] 18 | public ActionResult Settings() 19 | { 20 | var settings = new Models.Settings(); 21 | settings.Setting1 = ModuleContext.Configuration.ModuleSettings.GetValueOrDefault("DnnMvcModule_Setting1", false); 22 | settings.Setting2 = ModuleContext.Configuration.ModuleSettings.GetValueOrDefault("DnnMvcModule_Setting2", System.DateTime.Now); 23 | 24 | return View(settings); 25 | } 26 | 27 | /// 28 | /// 29 | /// 30 | /// 31 | /// 32 | [HttpPost] 33 | [ValidateInput(false)] 34 | [DotNetNuke.Web.Mvc.Framework.ActionFilters.ValidateAntiForgeryToken] 35 | public ActionResult Settings(Models.Settings settings) 36 | { 37 | ModuleContext.Configuration.ModuleSettings["DnnMvcModule_Setting1"] = settings.Setting1.ToString(); 38 | ModuleContext.Configuration.ModuleSettings["DnnMvcModule_Setting2"] = settings.Setting2.ToUniversalTime().ToString("u"); 39 | 40 | return RedirectToDefaultRoute(); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /src/DnnMvcModule/DnnMvcModule.dnn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | DnnMvcModule 5 | DNN DnnMvcModule module 6 | ~/Icons/Sigma/Software_32X32_Standard.png 7 | 8 | Christoc.com 9 | Christoc.com 10 | http://www.christoc.com 11 | modules@christoc.com 12 | 13 | 14 | 15 | 16 | 08.00.00 17 | 18 | 19 | 20 | 21 | DesktopModules\MVC\DnnMvcModule 22 | 27 | 32 | 33 | 34 | 35 | 36 | DesktopModules/MVC/DnnMvcModule 37 | 38 | Resources.zip 39 | 40 | 41 | 42 | 43 | 44 | DnnMvcModule 45 | DnnMvcModule 46 | Dnn.Modules.DnnMvcModule.Components.FeatureController 47 | 48 | 49 | 50 | DnnMvcModule 51 | 0 52 | 53 | 54 | 55 | Dnn.Modules.DnnMvcModule.Controllers/Item/Index.mvc 56 | False 57 | 58 | View 59 | 60 | 61 | 0 62 | 63 | 64 | Edit 65 | Dnn.Modules.DnnMvcModule.Controllers/Item/Edit.mvc 66 | False 67 | Edit Content 68 | Edit 69 | 70 | 71 | 0 72 | True 73 | 74 | 75 | Settings 76 | Dnn.Modules.DnnMvcModule.Controllers/Settings/Settings.mvc 77 | False 78 | DnnMvcModule Settings 79 | Edit 80 | 81 | 82 | 0 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | DnnMvcModule.dll 93 | bin 94 | 95 | 96 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /src/DnnMvcModule/Documentation/Documentation.css: -------------------------------------------------------------------------------- 1 | 2 | Body, A 3 | { 4 | font-family: Verdana, Arial, Helvetica, Sans Serif; 5 | font-size: 10pt; 6 | font-weight: normal; 7 | color: black; 8 | } 9 | 10 | Body 11 | { 12 | background-color: white; 13 | margin-left:25px; 14 | } 15 | 16 | H1 17 | { 18 | font-size: 2.0em; 19 | font-weight: bold; 20 | color: #75808A; 21 | text-decoration: underline; 22 | } 23 | 24 | H2 { 25 | font-size: 1.6em; 26 | font-weight: bold; 27 | color: #75808A; 28 | } 29 | 30 | H3 { 31 | font-size: 1.4em; 32 | font-weight: bold; 33 | color: #75808A; 34 | } 35 | 36 | H4 { 37 | font-size: 1.2em; 38 | font-weight: bold; 39 | color: #75808A; 40 | } 41 | 42 | H5 { 43 | font-size: 1.1em; 44 | font-weight: bold; 45 | color: #75808A; 46 | } 47 | 48 | H6 { 49 | font-size: 1.0em; 50 | font-weight: bold; 51 | color: #75808A; 52 | } 53 | 54 | A:link { 55 | font-size: 1.0em; 56 | text-decoration: underline; 57 | color: #0000cc; 58 | } 59 | 60 | A:visited { 61 | font-size: 1.0em; 62 | text-decoration: underline; 63 | color: #0000cc; 64 | } 65 | 66 | A:active { 67 | font-size: 1.0em; 68 | text-decoration: underline; 69 | color: #0000cc; 70 | } 71 | 72 | A:hover { 73 | font-size: 1.0em; 74 | text-decoration: underline; 75 | color: #cc0000; 76 | } 77 | 78 | HR { 79 | color: dimgrey; 80 | height:1pt; 81 | text-align:left 82 | } 83 | -------------------------------------------------------------------------------- /src/DnnMvcModule/Documentation/Documentation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Christoc.com Template 5 | 6 | 7 | 8 |
9 |

Christoc.com DnnMvcModule Module

10 |
11 |

* Important *

12 |

13 | When creating a project using this template, you should have named your project 14 | simply "ModuleName", not "Christoc.comModuleName". If you didn't do this, the 15 | easiest thing to do is close the solution, delete the folder from your DesktopModules 16 | folder, then create a new project. 17 |

18 |

19 | Due to limitations in the templating capabilities of Visual Studio, you will need 20 | to make some minor changes, and double check a few things, before you package this module. 21 |

22 |
    23 |
  1. 24 | Open up IIS Manager (start>run>INETMGR), go to your DNNDEV.ME website and make sure that DesktopModules is NOT a Virtual Directory/Application, if so, remove that. 25 |
  2. 26 |
  3. 27 | If you change the TARGET framework for the project, remove the WEB.CONFIG file that Visual Studio will add to your project. 28 |
  4. 29 |
  5. BEFORE checking the 30 | module into your source control environment check the following.
  6. 31 |
  7. Edit the Project properties by double-clicking on the Properties folder in Solution 32 | Explorer
  8. 33 |
  9. On the Web tab: 34 |
      35 |
    1. Under 'Start Action', make sure to set your Start URL to the correct site (ex: http://dnndev.me/).
    2. 36 |
    3. Under 'Servers', make sure to "Use IIS Web Server" with a project url of http://dnndev.me/desktopmodules/DnnMvcModule 37 | and an Override application root URL of http://dnndev.me/
    4. 38 |
    39 |
  10. 40 |
41 | 42 |

DotNetNuke Module Development Tutorials 43 |

44 | 45 | 49 | 50 |

Steps after your project is setup.

51 |
    52 |
  1. To Build and Package your Module you need to change to Release mode and then 53 | simply choose Build from the Build menu. The MSBuild scripts will do the packaging 54 | process for you. The packaging process creates an INSTALL and a SOURCE package in 55 | the INSTALL folder within your desktopmodule/modulename folder.
  2. 56 |
  3. Installing your module in your development DotNetNuke instance is easy.Take the 57 | INSTALL ZIP file that is created in the INSTALL folder, upload that using the Host/Extensions 58 | page, Installation Wizard. Using the INSTALL ZIP file will overwrite the files already in this folder, 59 | but that shouldn't cause any problems as long as you install a recent build.
  4. 60 |
  5. After you've done a release for your module (typically deploying to an environment 61 | outside of your development environment) you should change the Version number, you 62 | need to do this in two places, the assemblyinfo file, and the .DNN manifest file. 63 | Next time you build the module in release mode you will get a new package (using 64 | the version number) created.
  6. 65 |
  7. For more information visit our DotNetNuke Consulting page.
  8. 66 |
67 |

68 | After you are finished reading this Documentation you can delete the Documentation directory 69 | from your project. 70 |

71 |
72 |
73 |
74 | 75 | 76 | -------------------------------------------------------------------------------- /src/DnnMvcModule/License.txt: -------------------------------------------------------------------------------- 1 | 
2 |

License

3 |

4 | Christoc.com http://www.christoc.com
5 | Copyright (c) 2015
6 | by Christoc.com
7 |

8 |

9 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 10 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation 11 | the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 12 | to permit persons to whom the Software is furnished to do so, subject to the following conditions: 13 |

14 |

15 | The above copyright notice and this permission notice shall be included in all copies or substantial portions 16 | of the Software. 17 |

18 |

19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 |

21 |
-------------------------------------------------------------------------------- /src/DnnMvcModule/Models/Item.cs: -------------------------------------------------------------------------------- 1 | /* 2 | ' Copyright (c) 2015 Christoc.com 3 | ' All rights reserved. 4 | ' 5 | ' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 6 | ' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 7 | ' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 8 | ' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9 | ' DEALINGS IN THE SOFTWARE. 10 | ' 11 | */ 12 | 13 | using System; 14 | using System.Web.Caching; 15 | using DotNetNuke.Common.Utilities; 16 | using DotNetNuke.ComponentModel.DataAnnotations; 17 | using DotNetNuke.Entities.Content; 18 | 19 | namespace Dnn.Modules.DnnMvcModule.Models 20 | { 21 | [TableName("DnnMvcModule_Items")] 22 | //setup the primary key for table 23 | [PrimaryKey("ItemId", AutoIncrement = true)] 24 | //configure caching using PetaPoco 25 | [Cacheable("Items", CacheItemPriority.Default, 20)] 26 | //scope the objects to the ModuleId of a module on a page (or copy of a module on a page) 27 | [Scope("ModuleId")] 28 | public class Item 29 | { 30 | /// 31 | /// The ID of your object with the name of the ItemName 32 | /// 33 | public int ItemId { get; set; } = -1; 34 | /// 35 | /// A string with the name of the ItemName 36 | /// 37 | public string ItemName { get; set; } 38 | 39 | /// 40 | /// A string with the description of the object 41 | /// 42 | public string ItemDescription { get; set; } 43 | 44 | /// 45 | /// An integer with the user id of the assigned user for the object 46 | /// 47 | public int AssignedUserId { get; set; } 48 | 49 | /// 50 | /// The ModuleId of where the object was created and gets displayed 51 | /// 52 | public int ModuleId { get; set; } 53 | 54 | /// 55 | /// An integer for the user id of the user who created the object 56 | /// 57 | public int CreatedByUserId { get; set; } = -1; 58 | 59 | /// 60 | /// An integer for the user id of the user who last updated the object 61 | /// 62 | public int LastModifiedByUserId { get; set; } = -1; 63 | 64 | /// 65 | /// The date the object was created 66 | /// 67 | public DateTime CreatedOnDate { get; set; } = DateTime.UtcNow; 68 | 69 | /// 70 | /// The date the object was updated 71 | /// 72 | public DateTime LastModifiedOnDate { get; set; } = DateTime.UtcNow; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/DnnMvcModule/Models/Settings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace Dnn.Modules.DnnMvcModule.Models 7 | { 8 | public class Settings 9 | { 10 | public bool Setting1 { get; set; } 11 | public DateTime Setting2 { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/DnnMvcModule/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("DnnMvcModule")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("DnnMvcModule")] 12 | [assembly: AssemblyCopyright("Copyright © 2015")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("5ef01dd5-84a1-49f3-9232-067440288455")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Revision and Build Numbers 32 | // by using the '*' as shown below: 33 | [assembly: AssemblyVersion("00.00.01.*")] 34 | [assembly: AssemblyFileVersion("00.00.01.*")] 35 | -------------------------------------------------------------------------------- /src/DnnMvcModule/Providers/DataProviders/SqlDataProvider/00.00.01.SqlDataProvider: -------------------------------------------------------------------------------- 1 | /************************************************************/ 2 | /***** SqlDataProvider *****/ 3 | /***** *****/ 4 | /***** *****/ 5 | /***** Note: To manually execute this script you must *****/ 6 | /***** perform a search and replace operation *****/ 7 | /***** for {databaseOwner} and {objectQualifier} *****/ 8 | /***** *****/ 9 | /************************************************************/ 10 | 11 | IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'{databaseOwner}[{objectQualifier}DnnMvcModule_Items]') AND type in (N'U')) 12 | DROP TABLE {databaseOwner}[{objectQualifier}DnnMvcModule_Items] 13 | GO 14 | 15 | CREATE TABLE {databaseOwner}{objectQualifier}DnnMvcModule_Items 16 | ( 17 | ItemId int NOT NULL IDENTITY (1, 1), 18 | ItemName nvarchar(MAX) NOT NULL, 19 | ItemDescription nvarchar(MAX) NOT NULL, 20 | AssignedUserId int NULL, 21 | ModuleId int NOT NULL, 22 | CreatedOnDate datetime NOT NULL, 23 | CreatedByUserId int NOT NULL, 24 | LastModifiedOnDate datetime NOT NULL, 25 | LastModifiedByUserId int NOT NULL 26 | ) ON [PRIMARY] 27 | TEXTIMAGE_ON [PRIMARY] 28 | GO 29 | 30 | 31 | ALTER TABLE {databaseOwner}{objectQualifier}DnnMvcModule_Items ADD CONSTRAINT 32 | PK_{objectQualifier}DnnMvcModule_Items PRIMARY KEY CLUSTERED 33 | ( 34 | ItemId 35 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 36 | 37 | GO 38 | 39 | 40 | /************************************************************/ 41 | /***** SqlDataProvider *****/ 42 | /************************************************************/ -------------------------------------------------------------------------------- /src/DnnMvcModule/Providers/DataProviders/SqlDataProvider/Uninstall.SqlDataProvider: -------------------------------------------------------------------------------- 1 | IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'{databaseOwner}[{objectQualifier}DnnMvcModule_Items]') AND type in (N'U')) 2 | DROP TABLE {databaseOwner}[{objectQualifier}DnnMvcModule_Items] 3 | GO 4 | -------------------------------------------------------------------------------- /src/DnnMvcModule/ReleaseNotes.txt: -------------------------------------------------------------------------------- 1 | 

DnnMvcModule

2 |

3 | Christoc.com
4 | modules@christoc.com
5 | http://www.christoc.com
6 |

7 |
8 |
9 |

About the DnnMvcModule

10 |

11 | Version CHANGEME

12 |

13 |

Description about version.

14 | 15 |

Bug Fixes

16 |
    17 |
  • List
  • 18 |
  • of
  • 19 |
  • bug
  • 20 |
  • fixes
  • 21 |
22 | 23 |
-------------------------------------------------------------------------------- /src/DnnMvcModule/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | /* 2 | ' Copyright (c) $year$ $ownername$ 3 | ' All rights reserved. 4 | ' 5 | ' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 6 | ' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 7 | ' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 8 | ' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9 | ' DEALINGS IN THE SOFTWARE. 10 | ' 11 | */ 12 | using DotNetNuke.Web.Mvc.Routing; 13 | 14 | namespace Dnn.Modules.DnnMvcModule 15 | { 16 | public class RouteConfig : IMvcRouteMapper 17 | { 18 | public void RegisterRoutes(IMapRoute mapRouteManager) 19 | { 20 | mapRouteManager.MapRoute("Dnn.Modules.DnnMvcModule", "Dnn.Modules.DnnMvcModule", "{controller}/{action}", new[] 21 | {"Dnn.Modules.DnnMvcModule.Controllers"}); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/DnnMvcModule/Views/Item/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | } -------------------------------------------------------------------------------- /src/DnnMvcModule/Views/Item/Edit.cshtml: -------------------------------------------------------------------------------- 1 | @model Dnn.Modules.DnnMvcModule.Models.Item 2 | 3 | @using DotNetNuke.Web.Mvc.Helpers 4 | 5 |
6 |
7 | 8 | 9 |

10 | @Dnn.LocalizeString("BasicSettings") 11 |

12 |
13 |
14 |
15 | @Html.TextBoxFor(m => m.ItemName) 16 |
17 |
18 |
19 | @Html.TextArea("itemDescription", Model.ItemDescription) 20 |
21 |
22 |
23 | @Html.DropDownListFor(m => m.AssignedUserId, (IEnumerable)ViewBag.Users, "Choose...") 24 |
25 | @Html.HiddenFor(m => m.ModuleId) 26 |
27 |
28 | 29 | @Dnn.LocalizeString("Cancel") 30 |
31 | 32 | -------------------------------------------------------------------------------- /src/DnnMvcModule/Views/Item/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | 3 |
4 | @if (Model.Count() == 0) 5 | { 6 |

No items defined.

7 | } 8 | else 9 | { 10 | 28 | } 29 |
-------------------------------------------------------------------------------- /src/DnnMvcModule/Views/Settings/Settings.cshtml: -------------------------------------------------------------------------------- 1 | @model Dnn.Modules.DnnMvcModule.Models.Settings 2 | 3 | @using DotNetNuke.Web.Mvc.Helpers 4 | 5 |

@Dnn.LocalizeString("BasicSettings")

6 |
7 |
8 |
9 | @Html.LabelFor(m => Model.Setting1, new { @class = "col-md-2 control-label" }) 10 |
11 | @Html.CheckBoxFor(m => Model.Setting1) 12 |
13 |
14 |
15 | @Html.LabelFor(m => Model.Setting2, new { @class = "col-md-2 control-label" }) 16 |
17 | @Html.TextBoxFor(m => Model.Setting2) 18 |
19 |
20 | -------------------------------------------------------------------------------- /src/DnnMvcModule/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 
2 | @RenderBody() 3 |
4 | 5 | -------------------------------------------------------------------------------- /src/DnnMvcModule/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/DesktopModules/MVC/DnnMvcModule/Views/Shared/_Layout.cshtml"; 3 | } 4 | 5 | -------------------------------------------------------------------------------- /src/DnnMvcModule/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /src/DnnMvcModule/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /src/DnnMvcModule/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/DnnMvcModule/install/DnnMvcModule_00.00.01_Install.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnnsoftware/DNN.Templates/c3181a2d1cd0e4ed8d358c523e5b08897ee6e070/src/DnnMvcModule/install/DnnMvcModule_00.00.01_Install.zip -------------------------------------------------------------------------------- /src/DnnMvcModule/install/DnnMvcModule_00.00.01_Source.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnnsoftware/DNN.Templates/c3181a2d1cd0e4ed8d358c523e5b08897ee6e070/src/DnnMvcModule/install/DnnMvcModule_00.00.01_Source.zip -------------------------------------------------------------------------------- /src/DnnMvcModule/module.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnnsoftware/DNN.Templates/c3181a2d1cd0e4ed8d358c523e5b08897ee6e070/src/DnnMvcModule/module.css -------------------------------------------------------------------------------- /src/DnnMvcModule/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/DnnMvcSpaModule.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.23107.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DnnSpaModule", "DnnSpaModule\DnnSpaModule.csproj", "{7D61A32C-0F21-453F-A981-BD8E5A3A5304}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".build", "DnnSpaModule\.build", "{8ACA4ED2-6BF0-4856-B722-8858E1FC4468}" 9 | ProjectSection(SolutionItems) = preProject 10 | Build.proj = Build.proj 11 | .build\MSBuild.Community.Tasks.dll = .build\MSBuild.Community.Tasks.dll 12 | .build\MSBuild.Community.Tasks.targets = .build\MSBuild.Community.Tasks.targets 13 | EndProjectSection 14 | EndProject 15 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DnnMvcModule", "DnnMvcModule\DnnMvcModule.csproj", "{4130D773-4930-4C21-9BCF-0C5244F585D0}" 16 | EndProject 17 | Global 18 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 19 | Debug|Any CPU = Debug|Any CPU 20 | Release|Any CPU = Release|Any CPU 21 | EndGlobalSection 22 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 23 | {7D61A32C-0F21-453F-A981-BD8E5A3A5304}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 24 | {7D61A32C-0F21-453F-A981-BD8E5A3A5304}.Debug|Any CPU.Build.0 = Debug|Any CPU 25 | {7D61A32C-0F21-453F-A981-BD8E5A3A5304}.Release|Any CPU.ActiveCfg = Release|Any CPU 26 | {7D61A32C-0F21-453F-A981-BD8E5A3A5304}.Release|Any CPU.Build.0 = Release|Any CPU 27 | {4130D773-4930-4C21-9BCF-0C5244F585D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 28 | {4130D773-4930-4C21-9BCF-0C5244F585D0}.Debug|Any CPU.Build.0 = Debug|Any CPU 29 | {4130D773-4930-4C21-9BCF-0C5244F585D0}.Release|Any CPU.ActiveCfg = Release|Any CPU 30 | {4130D773-4930-4C21-9BCF-0C5244F585D0}.Release|Any CPU.Build.0 = Release|Any CPU 31 | EndGlobalSection 32 | GlobalSection(SolutionProperties) = preSolution 33 | HideSolutionNode = FALSE 34 | EndGlobalSection 35 | EndGlobal 36 | -------------------------------------------------------------------------------- /src/DnnSpaModule/.build/MSBuild.Community.Tasks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnnsoftware/DNN.Templates/c3181a2d1cd0e4ed8d358c523e5b08897ee6e070/src/DnnSpaModule/.build/MSBuild.Community.Tasks.dll -------------------------------------------------------------------------------- /src/DnnSpaModule/.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /src/DnnSpaModule/.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | build/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | 28 | # MSTest test Results 29 | [Tt]est[Rr]esult*/ 30 | [Bb]uild[Ll]og.* 31 | 32 | # NUNIT 33 | *.VisualState.xml 34 | TestResult.xml 35 | 36 | # Build Results of an ATL Project 37 | [Dd]ebugPS/ 38 | [Rr]eleasePS/ 39 | dlldata.c 40 | 41 | # DNX 42 | project.lock.json 43 | artifacts/ 44 | 45 | *_i.c 46 | *_p.c 47 | *_i.h 48 | *.ilk 49 | *.meta 50 | *.obj 51 | *.pch 52 | *.pdb 53 | *.pgc 54 | *.pgd 55 | *.rsp 56 | *.sbr 57 | *.tlb 58 | *.tli 59 | *.tlh 60 | *.tmp 61 | *.tmp_proj 62 | *.log 63 | *.vspscc 64 | *.vssscc 65 | .builds 66 | *.pidb 67 | *.svclog 68 | *.scc 69 | 70 | # Chutzpah Test files 71 | _Chutzpah* 72 | 73 | # Visual C++ cache files 74 | ipch/ 75 | *.aps 76 | *.ncb 77 | *.opensdf 78 | *.sdf 79 | *.cachefile 80 | 81 | # Visual Studio profiler 82 | *.psess 83 | *.vsp 84 | *.vspx 85 | 86 | # TFS 2012 Local Workspace 87 | $tf/ 88 | 89 | # Guidance Automation Toolkit 90 | *.gpState 91 | 92 | # ReSharper is a .NET coding add-in 93 | _ReSharper*/ 94 | *.[Rr]e[Ss]harper 95 | *.DotSettings.user 96 | 97 | # JustCode is a .NET coding add-in 98 | .JustCode 99 | 100 | # TeamCity is a build add-in 101 | _TeamCity* 102 | 103 | # DotCover is a Code Coverage Tool 104 | *.dotCover 105 | 106 | # NCrunch 107 | _NCrunch_* 108 | .*crunch*.local.xml 109 | 110 | # MightyMoose 111 | *.mm.* 112 | AutoTest.Net/ 113 | 114 | # Web workbench (sass) 115 | .sass-cache/ 116 | 117 | # Installshield output folder 118 | [Ee]xpress/ 119 | 120 | # DocProject is a documentation generator add-in 121 | DocProject/buildhelp/ 122 | DocProject/Help/*.HxT 123 | DocProject/Help/*.HxC 124 | DocProject/Help/*.hhc 125 | DocProject/Help/*.hhk 126 | DocProject/Help/*.hhp 127 | DocProject/Help/Html2 128 | DocProject/Help/html 129 | 130 | # Click-Once directory 131 | publish/ 132 | 133 | # Publish Web Output 134 | *.[Pp]ublish.xml 135 | *.azurePubxml 136 | ## TODO: Comment the next line if you want to checkin your 137 | ## web deploy settings but do note that will include unencrypted 138 | ## passwords 139 | #*.pubxml 140 | 141 | *.publishproj 142 | 143 | # NuGet Packages 144 | *.nupkg 145 | # The packages folder can be ignored because of Package Restore 146 | **/packages/* 147 | # except build/, which is used as an MSBuild target. 148 | !**/packages/build/ 149 | # Uncomment if necessary however generally it will be regenerated when needed 150 | #!**/packages/repositories.config 151 | 152 | # Windows Azure Build Output 153 | csx/ 154 | *.build.csdef 155 | 156 | # Windows Store app package directory 157 | AppPackages/ 158 | 159 | # Visual Studio cache files 160 | # files ending in .cache can be ignored 161 | *.[Cc]ache 162 | # but keep track of directories ending in .cache 163 | !*.[Cc]ache/ 164 | 165 | # Others 166 | ClientBin/ 167 | [Ss]tyle[Cc]op.* 168 | ~$* 169 | *~ 170 | *.dbmdl 171 | *.dbproj.schemaview 172 | *.pfx 173 | *.publishsettings 174 | node_modules/ 175 | orleans.codegen.cs 176 | 177 | # RIA/Silverlight projects 178 | Generated_Code/ 179 | 180 | # Backup & report files from converting an old project file 181 | # to a newer Visual Studio version. Backup files are not needed, 182 | # because we have git ;-) 183 | _UpgradeReport_Files/ 184 | Backup*/ 185 | UpgradeLog*.XML 186 | UpgradeLog*.htm 187 | 188 | # SQL Server files 189 | *.mdf 190 | *.ldf 191 | 192 | # Business Intelligence projects 193 | *.rdl.data 194 | *.bim.layout 195 | *.bim_*.settings 196 | 197 | # Microsoft Fakes 198 | FakesAssemblies/ 199 | 200 | # Node.js Tools for Visual Studio 201 | .ntvs_analysis.dat 202 | 203 | # Visual Studio 6 build log 204 | *.plg 205 | 206 | # Visual Studio 6 workspace options file 207 | *.opt 208 | 209 | # LightSwitch generated files 210 | GeneratedArtifacts/ 211 | _Pvt_Extensions/ 212 | ModelManifest.xml 213 | -------------------------------------------------------------------------------- /src/DnnSpaModule/App_LocalResources/Edit.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | Cancel 122 | 123 | 124 | Save 125 | 126 | 127 | Edit Control for DnnSpaModule 128 | 129 | 130 | Choose a user to assign this object to. 131 | 132 | 133 | Assigned User 134 | 135 | 136 | Enter a Description for your Item 137 | 138 | 139 | Description 140 | 141 | 142 | Enter the Name for your Item 143 | 144 | 145 | Name 146 | 147 | 148 | DnnSpaModule Item Basic Settings 149 | 150 | 151 | Expand All 152 | 153 | -------------------------------------------------------------------------------- /src/DnnSpaModule/App_LocalResources/Settings.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | This is a sample quick settings page. Edit the Settings.html and QuickSettings.js to create/edit your own settings. 122 | 123 | -------------------------------------------------------------------------------- /src/DnnSpaModule/App_LocalResources/View.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | Basic DnnSpaModule Settings 122 | 123 | 124 | Collapse All 125 | 126 | 127 | Are you sure you want to delete this Item 128 | 129 | 130 | Delete 131 | 132 | 133 | Edit 134 | 135 | 136 | Add Item 137 | 138 | -------------------------------------------------------------------------------- /src/DnnSpaModule/Build.proj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(MSBuildProjectDirectory)\.build 5 | 6 | 7 | 8 | 9 | 10 | 11 | 1.0.0.0 12 | 1.0.0.0 13 | 1.0.0.0 14 | 15 | 16 | 17 | 18 | 1.0.0.0 19 | $(BUILD_NUMBER) 20 | $(BUILD_NUMBER) 21 | 22 | 23 | 24 | Release 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 35 | 36 | 37 | 38 | 39 | 40 | 48 | 49 | 50 | 51 | 52 | 53 | Configuration=$(BuildConfiguration) 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/DnnSpaModule/BuildScripts/MSBuild.Community.Tasks.Targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildProjectDirectory)\BuildScripts 5 | $(MSBuildProjectDirectory)\..\..\bin 6 | $(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.dll 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /src/DnnSpaModule/BuildScripts/MSBuild.Community.Tasks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnnsoftware/DNN.Templates/c3181a2d1cd0e4ed8d358c523e5b08897ee6e070/src/DnnSpaModule/BuildScripts/MSBuild.Community.Tasks.dll -------------------------------------------------------------------------------- /src/DnnSpaModule/BuildScripts/ModulePackage.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /src/DnnSpaModule/Components/FeatureController.cs: -------------------------------------------------------------------------------- 1 | /* 2 | ' Copyright (c) 2015 Christoc.com 3 | ' All rights reserved. 4 | ' 5 | ' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 6 | ' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 7 | ' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 8 | ' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9 | ' DEALINGS IN THE SOFTWARE. 10 | ' 11 | */ 12 | 13 | using System.Collections.Generic; 14 | //using System.Xml; 15 | using DotNetNuke.Entities.Modules; 16 | using DotNetNuke.Services.Search; 17 | 18 | namespace Dnn.Modules.DnnSpaModule.Components 19 | { 20 | 21 | /// ----------------------------------------------------------------------------- 22 | /// 23 | /// The Controller class for DnnSpaModule 24 | /// 25 | /// The FeatureController class is defined as the BusinessController in the manifest file (.dnn) 26 | /// DotNetNuke will poll this class to find out which Interfaces the class implements. 27 | /// 28 | /// The IPortable interface is used to import/export content from a DNN module 29 | /// 30 | /// The ISearchable interface is used by DNN to index the content of a module 31 | /// 32 | /// The IUpgradeable interface allows module developers to execute code during the upgrade 33 | /// process for a module. 34 | /// 35 | /// Below you will find stubbed out implementations of each, uncomment and populate with your own data 36 | /// 37 | /// ----------------------------------------------------------------------------- 38 | 39 | //uncomment the interfaces to add the support. 40 | public class FeatureController //: IPortable, ISearchable, IUpgradeable 41 | { 42 | 43 | 44 | #region Optional Interfaces 45 | 46 | /// ----------------------------------------------------------------------------- 47 | /// 48 | /// ExportModule implements the IPortable ExportModule Interface 49 | /// 50 | /// The Id of the module to be exported 51 | /// ----------------------------------------------------------------------------- 52 | //public string ExportModule(int ModuleID) 53 | //{ 54 | //string strXML = ""; 55 | 56 | //List colDnnSpaModules = GetDnnSpaModules(ModuleID); 57 | //if (colDnnSpaModules.Count != 0) 58 | //{ 59 | // strXML += ""; 60 | 61 | // foreach (DnnSpaModuleInfo objDnnSpaModule in colDnnSpaModules) 62 | // { 63 | // strXML += ""; 64 | // strXML += "" + DotNetNuke.Common.Utilities.XmlUtils.XMLEncode(objDnnSpaModule.Content) + ""; 65 | // strXML += ""; 66 | // } 67 | // strXML += ""; 68 | //} 69 | 70 | //return strXML; 71 | 72 | // throw new System.NotImplementedException("The method or operation is not implemented."); 73 | //} 74 | 75 | /// ----------------------------------------------------------------------------- 76 | /// 77 | /// ImportModule implements the IPortable ImportModule Interface 78 | /// 79 | /// The Id of the module to be imported 80 | /// The content to be imported 81 | /// The version of the module to be imported 82 | /// The Id of the user performing the import 83 | /// ----------------------------------------------------------------------------- 84 | //public void ImportModule(int ModuleID, string Content, string Version, int UserID) 85 | //{ 86 | //XmlNode xmlDnnSpaModules = DotNetNuke.Common.Globals.GetContent(Content, "DnnSpaModules"); 87 | //foreach (XmlNode xmlDnnSpaModule in xmlDnnSpaModules.SelectNodes("DnnSpaModule")) 88 | //{ 89 | // DnnSpaModuleInfo objDnnSpaModule = new DnnSpaModuleInfo(); 90 | // objDnnSpaModule.ModuleId = ModuleID; 91 | // objDnnSpaModule.Content = xmlDnnSpaModule.SelectSingleNode("content").InnerText; 92 | // objDnnSpaModule.CreatedByUser = UserID; 93 | // AddDnnSpaModule(objDnnSpaModule); 94 | //} 95 | 96 | // throw new System.NotImplementedException("The method or operation is not implemented."); 97 | //} 98 | 99 | /// ----------------------------------------------------------------------------- 100 | /// 101 | /// GetSearchItems implements the ISearchable Interface 102 | /// 103 | /// The ModuleInfo for the module to be Indexed 104 | /// ----------------------------------------------------------------------------- 105 | //public DotNetNuke.Services.Search.SearchItemInfoCollection GetSearchItems(DotNetNuke.Entities.Modules.ModuleInfo ModInfo) 106 | //{ 107 | //SearchItemInfoCollection SearchItemCollection = new SearchItemInfoCollection(); 108 | 109 | //List colDnnSpaModules = GetDnnSpaModules(ModInfo.ModuleID); 110 | 111 | //foreach (DnnSpaModuleInfo objDnnSpaModule in colDnnSpaModules) 112 | //{ 113 | // SearchItemInfo SearchItem = new SearchItemInfo(ModInfo.ModuleTitle, objDnnSpaModule.Content, objDnnSpaModule.CreatedByUser, objDnnSpaModule.CreatedDate, ModInfo.ModuleID, objDnnSpaModule.ItemId.ToString(), objDnnSpaModule.Content, "ItemId=" + objDnnSpaModule.ItemId.ToString()); 114 | // SearchItemCollection.Add(SearchItem); 115 | //} 116 | 117 | //return SearchItemCollection; 118 | 119 | // throw new System.NotImplementedException("The method or operation is not implemented."); 120 | //} 121 | 122 | /// ----------------------------------------------------------------------------- 123 | /// 124 | /// UpgradeModule implements the IUpgradeable Interface 125 | /// 126 | /// The current version of the module 127 | /// ----------------------------------------------------------------------------- 128 | //public string UpgradeModule(string Version) 129 | //{ 130 | // throw new System.NotImplementedException("The method or operation is not implemented."); 131 | //} 132 | 133 | #endregion 134 | 135 | } 136 | 137 | } 138 | -------------------------------------------------------------------------------- /src/DnnSpaModule/Components/IItemRepository.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using DotNetNuke.Collections; 3 | 4 | namespace Dnn.Modules.DnnSpaModule.Components 5 | { 6 | public interface IItemRepository 7 | { 8 | 9 | int AddItem(Item t); 10 | 11 | void DeleteItem(int itemId, int moduleId); 12 | 13 | void DeleteItem(Item t); 14 | 15 | Item GetItem(int itemId, int moduleId); 16 | 17 | IQueryable GetItems(int moduleId); 18 | 19 | IPagedList GetItems(string searchTerm, int moduleId, int pageIndex, int pageSize); 20 | 21 | void UpdateItem(Item t); 22 | } 23 | } -------------------------------------------------------------------------------- /src/DnnSpaModule/Components/Item.cs: -------------------------------------------------------------------------------- 1 | /* 2 | ' Copyright (c) 2015 Christoc.com 3 | ' All rights reserved. 4 | ' 5 | ' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 6 | ' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 7 | ' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 8 | ' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9 | ' DEALINGS IN THE SOFTWARE. 10 | ' 11 | */ 12 | 13 | using System; 14 | using System.Web.Caching; 15 | using DotNetNuke.Common.Utilities; 16 | using DotNetNuke.ComponentModel.DataAnnotations; 17 | using DotNetNuke.Entities.Content; 18 | 19 | namespace Dnn.Modules.DnnSpaModule.Components 20 | { 21 | [TableName("DnnSpaModule_Items")] 22 | //setup the primary key for table 23 | [PrimaryKey("ItemId", AutoIncrement = true)] 24 | //configure caching using PetaPoco 25 | [Cacheable("Items", CacheItemPriority.Default, 20)] 26 | //scope the objects to the ModuleId of a module on a page (or copy of a module on a page) 27 | [Scope("ModuleId")] 28 | public class Item 29 | { 30 | /// 31 | /// The ID of your object with the name of the ItemName 32 | /// 33 | public int ItemId { get; set; } 34 | /// 35 | /// A string with the name of the ItemName 36 | /// 37 | public string ItemName { get; set; } 38 | 39 | /// 40 | /// A string with the description of the object 41 | /// 42 | public string ItemDescription { get; set; } 43 | 44 | /// 45 | /// An integer with the user id of the assigned user for the object 46 | /// 47 | public int AssignedUserId { get; set; } 48 | 49 | /// 50 | /// The ModuleId of where the object was created and gets displayed 51 | /// 52 | public int ModuleId { get; set; } 53 | 54 | /// 55 | /// An integer for the user id of the user who created the object 56 | /// 57 | public int CreatedByUserId { get; set; } 58 | 59 | /// 60 | /// An integer for the user id of the user who last updated the object 61 | /// 62 | public int LastModifiedByUserId { get; set; } 63 | 64 | /// 65 | /// The date the object was created 66 | /// 67 | public DateTime CreatedOnDate { get; set; } 68 | 69 | /// 70 | /// The date the object was updated 71 | /// 72 | public DateTime LastModifiedOnDate { get; set; } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/DnnSpaModule/Components/ItemRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using DotNetNuke.Collections; 6 | using DotNetNuke.Common; 7 | using DotNetNuke.Data; 8 | using DotNetNuke.Framework; 9 | 10 | namespace Dnn.Modules.DnnSpaModule.Components 11 | { 12 | public class ItemRepository : ServiceLocator, IItemRepository 13 | { 14 | 15 | protected override Func GetFactory() 16 | { 17 | return () => new ItemRepository(); 18 | } 19 | 20 | public int AddItem(Item t) 21 | { 22 | Requires.NotNull(t); 23 | Requires.PropertyNotNegative(t, "ModuleId"); 24 | 25 | using (IDataContext ctx = DataContext.Instance()) 26 | { 27 | var rep = ctx.GetRepository(); 28 | rep.Insert(t); 29 | } 30 | return t.ItemId; 31 | } 32 | 33 | public void DeleteItem(Item t) 34 | { 35 | Requires.NotNull(t); 36 | Requires.PropertyNotNegative(t, "ItemId"); 37 | 38 | using (IDataContext ctx = DataContext.Instance()) 39 | { 40 | var rep = ctx.GetRepository(); 41 | rep.Delete(t); 42 | } 43 | } 44 | 45 | public void DeleteItem(int itemId, int moduleId) 46 | { 47 | Requires.NotNegative("itemId", itemId); 48 | Requires.NotNegative("moduleId", moduleId); 49 | 50 | var t = GetItem(itemId, moduleId); 51 | DeleteItem(t); 52 | } 53 | 54 | public Item GetItem(int itemId, int moduleId) 55 | { 56 | Requires.NotNegative("itemId", itemId); 57 | Requires.NotNegative("moduleId", moduleId); 58 | 59 | Item t; 60 | using (IDataContext ctx = DataContext.Instance()) 61 | { 62 | var rep = ctx.GetRepository(); 63 | t = rep.GetById(itemId, moduleId); 64 | } 65 | return t; 66 | } 67 | 68 | public IQueryable GetItems(int moduleId) 69 | { 70 | Requires.NotNegative("moduleId", moduleId); 71 | 72 | IQueryable t = null; 73 | 74 | using (IDataContext ctx = DataContext.Instance()) 75 | { 76 | var rep = ctx.GetRepository(); 77 | 78 | t = rep.Get(moduleId).AsQueryable(); 79 | } 80 | 81 | return t; 82 | } 83 | 84 | public IPagedList GetItems(string searchTerm, int moduleId, int pageIndex, int pageSize) 85 | { 86 | Requires.NotNegative("moduleId", moduleId); 87 | 88 | var t = GetItems(moduleId).Where(c => c.ItemName.Contains(searchTerm) 89 | || c.ItemDescription.Contains(searchTerm)); 90 | 91 | 92 | return new PagedList(t, pageIndex, pageSize); 93 | } 94 | 95 | public void UpdateItem(Item t) 96 | { 97 | Requires.NotNull(t); 98 | Requires.PropertyNotNegative(t, "ItemId"); 99 | 100 | using (IDataContext ctx = DataContext.Instance()) 101 | { 102 | var rep = ctx.GetRepository(); 103 | rep.Update(t); 104 | } 105 | } 106 | } 107 | } -------------------------------------------------------------------------------- /src/DnnSpaModule/DNNSPAModuleModuleBase.cs: -------------------------------------------------------------------------------- 1 | /* 2 | ' Copyright (c) 2015 Christoc.com 3 | ' All rights reserved. 4 | ' 5 | ' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 6 | ' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 7 | ' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 8 | ' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9 | ' DEALINGS IN THE SOFTWARE. 10 | ' 11 | */ 12 | 13 | using System; 14 | using DotNetNuke.Entities.Modules; 15 | 16 | namespace Dnn.Modules.DnnSpaModule 17 | { 18 | public class DnnSpaModuleModuleBase : PortalModuleBase 19 | { 20 | public int ItemId 21 | { 22 | get 23 | { 24 | var qs = Request.QueryString["tid"]; 25 | if (qs != null) 26 | return Convert.ToInt32(qs); 27 | return -1; 28 | } 29 | 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/DnnSpaModule/DNNSPAModuleModuleSettingsBase.cs: -------------------------------------------------------------------------------- 1 | /* 2 | ' Copyright (c) 2015 Christoc.com 3 | ' All rights reserved. 4 | ' 5 | ' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 6 | ' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 7 | ' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 8 | ' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9 | ' DEALINGS IN THE SOFTWARE. 10 | ' 11 | */ 12 | 13 | using DotNetNuke.Entities.Modules; 14 | 15 | namespace Dnn.Modules.DnnSpaModule 16 | { 17 | public class DnnSpaModuleModuleSettingsBase : ModuleSettingsBase 18 | { 19 | } 20 | } -------------------------------------------------------------------------------- /src/DnnSpaModule/DnnSpaModule.dnn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | DnnSpaModule 5 | Christoc.com DnnSpaModule module 6 | ~/Icons/Sigma/Software_32X32_Standard.png 7 | 8 | Christoc.com 9 | Christoc.com 10 | http://www.christoc.com 11 | modules@christoc.com 12 | 13 | 14 | 15 | 16 | 08.00.00 17 | 18 | 19 | 20 | 21 | DesktopModules\DnnSpaModule 22 | 27 | 32 | 33 | 34 | 35 | 36 | DesktopModules/DnnSpaModule 37 | 38 | Resources.zip 39 | 40 | 41 | 42 | 43 | 44 | DnnSpaModule 45 | DnnSpaModule 46 | Dnn.Modules.DnnSpaModule.Components.FeatureController 47 | 48 | 49 | 50 | DnnSpaModule 51 | 0 52 | 53 | 54 | 55 | DesktopModules/DnnSpaModule/View.html 56 | False 57 | 58 | View 59 | 60 | 61 | 0 62 | 63 | 64 | Edit 65 | DesktopModules/DnnSpaModule/Edit.html 66 | False 67 | Edit Content 68 | Edit 69 | 70 | 71 | 0 72 | True 73 | 74 | 75 | QuickSettings 76 | DesktopModules/DnnSpaModule/Settings.html 77 | False 78 | DnnSpaModule Settings 79 | Edit 80 | 81 | 82 | 0 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | DnnSpaModule.dll 93 | bin 94 | 95 | 96 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /src/DnnSpaModule/Documentation/Documentation.css: -------------------------------------------------------------------------------- 1 | 2 | Body, A 3 | { 4 | font-family: Verdana, Arial, Helvetica, Sans Serif; 5 | font-size: 10pt; 6 | font-weight: normal; 7 | color: black; 8 | } 9 | 10 | Body 11 | { 12 | background-color: white; 13 | margin-left:25px; 14 | } 15 | 16 | H1 17 | { 18 | font-size: 2.0em; 19 | font-weight: bold; 20 | color: #75808A; 21 | text-decoration: underline; 22 | } 23 | 24 | H2 { 25 | font-size: 1.6em; 26 | font-weight: bold; 27 | color: #75808A; 28 | } 29 | 30 | H3 { 31 | font-size: 1.4em; 32 | font-weight: bold; 33 | color: #75808A; 34 | } 35 | 36 | H4 { 37 | font-size: 1.2em; 38 | font-weight: bold; 39 | color: #75808A; 40 | } 41 | 42 | H5 { 43 | font-size: 1.1em; 44 | font-weight: bold; 45 | color: #75808A; 46 | } 47 | 48 | H6 { 49 | font-size: 1.0em; 50 | font-weight: bold; 51 | color: #75808A; 52 | } 53 | 54 | A:link { 55 | font-size: 1.0em; 56 | text-decoration: underline; 57 | color: #0000cc; 58 | } 59 | 60 | A:visited { 61 | font-size: 1.0em; 62 | text-decoration: underline; 63 | color: #0000cc; 64 | } 65 | 66 | A:active { 67 | font-size: 1.0em; 68 | text-decoration: underline; 69 | color: #0000cc; 70 | } 71 | 72 | A:hover { 73 | font-size: 1.0em; 74 | text-decoration: underline; 75 | color: #cc0000; 76 | } 77 | 78 | HR { 79 | color: dimgrey; 80 | height:1pt; 81 | text-align:left 82 | } 83 | -------------------------------------------------------------------------------- /src/DnnSpaModule/Documentation/Documentation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Christoc.com Template 5 | 6 | 7 | 8 |
9 |

Christoc.com DnnSpaModule Module

10 |
11 |

* Important *

12 |

13 | When creating a project using this template, you should have named your project 14 | simply "ModuleName", not "Christoc.comModuleName". If you didn't do this, the 15 | easiest thing to do is close the solution, delete the folder from your DesktopModules 16 | folder, then create a new project. 17 |

18 |

19 | Due to limitations in the templating capabilities of Visual Studio, you will need 20 | to make some minor changes, and double check a few things, before you package this module. 21 |

22 |
    23 |
  1. 24 | Open up IIS Manager (start>run>INETMGR), go to your DNNDEV.ME website and make sure that DesktopModules is NOT a Virtual Directory/Application, if so, remove that. 25 |
  2. 26 |
  3. 27 | If you change the TARGET framework for the project, remove the WEB.CONFIG file that Visual Studio will add to your project. 28 |
  4. 29 |
  5. BEFORE checking the 30 | module into your source control environment check the following.
  6. 31 |
  7. Edit the Project properties by double-clicking on the Properties folder in Solution 32 | Explorer
  8. 33 |
  9. On the Web tab: 34 |
      35 |
    1. Under 'Start Action', make sure to set your Start URL to the correct site (ex: http://dnndev.me/).
    2. 36 |
    3. Under 'Servers', make sure to "Use IIS Web Server" with a project url of http://dnndev.me/desktopmodules/DnnSpaModule 37 | and an Override application root URL of http://dnndev.me/
    4. 38 |
    39 |
  10. 40 |
41 | 42 |

DotNetNuke Module Development Tutorials 43 |

44 | 45 | 49 | 50 |

Steps after your project is setup.

51 |
    52 |
  1. To Build and Package your Module you need to change to Release mode and then 53 | simply choose Build from the Build menu. The MSBuild scripts will do the packaging 54 | process for you. The packaging process creates an INSTALL and a SOURCE package in 55 | the INSTALL folder within your desktopmodule/modulename folder.
  2. 56 |
  3. Installing your module in your development DotNetNuke instance is easy.Take the 57 | INSTALL ZIP file that is created in the INSTALL folder, upload that using the Host/Extensions 58 | page, Installation Wizard. Using the INSTALL ZIP file will overwrite the files already in this folder, 59 | but that shouldn't cause any problems as long as you install a recent build.
  4. 60 |
  5. After you've done a release for your module (typically deploying to an environment 61 | outside of your development environment) you should change the Version number, you 62 | need to do this in two places, the assemblyinfo file, and the .DNN manifest file. 63 | Next time you build the module in release mode you will get a new package (using 64 | the version number) created.
  6. 65 |
  7. For more information visit our DotNetNuke Consulting page.
  8. 66 |
67 |

68 | After you are finished reading this Documentation you can delete the Documentation directory 69 | from your project. 70 |

71 |
72 |
73 |
74 | 75 | 76 | -------------------------------------------------------------------------------- /src/DnnSpaModule/Edit.html: -------------------------------------------------------------------------------- 1 | [JavaScript:{ jsname: "JQuery" }] 2 | [JavaScript:{ jsname: "Knockout" }] 3 | [JavaScript:{ path: "~/Resources/Shared/scripts/dnn.jquery.js"}] 4 | [JavaScript:{ path: "~/Resources/Shared/Scripts/jquery/jquery.hoverIntent.min.js"}] 5 | [JavaScript:{ path: "~/DesktopModules/DnnSpaModule/scripts/ItemEdit.js"}] 6 | 7 |
8 |
9 | 10 | 11 |

12 | [Resx:{key:"BasicSettings"}] 13 |

14 |
15 |
16 |
17 | 18 |
19 |
20 |
21 | 22 |
23 |
24 |
25 | 30 |
31 |
32 |
33 | [Resx:{key:"btnSubmit"}] 34 | [Resx:{key:"btnCancel"}] 35 |
36 | 37 | -------------------------------------------------------------------------------- /src/DnnSpaModule/License.txt: -------------------------------------------------------------------------------- 1 | 
2 |

License

3 |

4 | Christoc.com http://www.christoc.com
5 | Copyright (c) 2015
6 | by Christoc.com
7 |

8 |

9 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 10 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation 11 | the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 12 | to permit persons to whom the Software is furnished to do so, subject to the following conditions: 13 |

14 |

15 | The above copyright notice and this permission notice shall be included in all copies or substantial portions 16 | of the Software. 17 |

18 |

19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 |

21 |
-------------------------------------------------------------------------------- /src/DnnSpaModule/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("DnnSpaModule")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("DnnSpaModule")] 12 | [assembly: AssemblyCopyright("Copyright © 2015")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("5ef01dd5-84a1-49f3-9232-067440288455")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Revision and Build Numbers 32 | // by using the '*' as shown below: 33 | [assembly: AssemblyVersion("00.00.01.*")] 34 | [assembly: AssemblyFileVersion("00.00.01.*")] 35 | -------------------------------------------------------------------------------- /src/DnnSpaModule/Providers/DataProviders/SqlDataProvider/00.00.01.SqlDataProvider: -------------------------------------------------------------------------------- 1 | /************************************************************/ 2 | /***** SqlDataProvider *****/ 3 | /***** *****/ 4 | /***** *****/ 5 | /***** Note: To manually execute this script you must *****/ 6 | /***** perform a search and replace operation *****/ 7 | /***** for {databaseOwner} and {objectQualifier} *****/ 8 | /***** *****/ 9 | /************************************************************/ 10 | 11 | IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'{databaseOwner}[{objectQualifier}DnnSpaModule_Items]') AND type in (N'U')) 12 | DROP TABLE {databaseOwner}[{objectQualifier}DnnSpaModule_Items] 13 | GO 14 | 15 | CREATE TABLE {databaseOwner}{objectQualifier}DnnSpaModule_Items 16 | ( 17 | ItemId int NOT NULL IDENTITY (1, 1), 18 | ItemName nvarchar(MAX) NOT NULL, 19 | ItemDescription nvarchar(MAX) NOT NULL, 20 | AssignedUserId int NULL, 21 | ModuleId int NOT NULL, 22 | CreatedOnDate datetime NOT NULL, 23 | CreatedByUserId int NOT NULL, 24 | LastModifiedOnDate datetime NOT NULL, 25 | LastModifiedByUserId int NOT NULL 26 | ) ON [PRIMARY] 27 | TEXTIMAGE_ON [PRIMARY] 28 | GO 29 | 30 | 31 | ALTER TABLE {databaseOwner}{objectQualifier}DnnSpaModule_Items ADD CONSTRAINT 32 | PK_{objectQualifier}DnnSpaModule_Items PRIMARY KEY CLUSTERED 33 | ( 34 | ItemId 35 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 36 | 37 | GO 38 | 39 | 40 | /************************************************************/ 41 | /***** SqlDataProvider *****/ 42 | /************************************************************/ -------------------------------------------------------------------------------- /src/DnnSpaModule/Providers/DataProviders/SqlDataProvider/Uninstall.SqlDataProvider: -------------------------------------------------------------------------------- 1 | IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'{databaseOwner}[{objectQualifier}DnnSpaModule_Items]') AND type in (N'U')) 2 | DROP TABLE {databaseOwner}[{objectQualifier}DnnSpaModule_Items] 3 | GO 4 | -------------------------------------------------------------------------------- /src/DnnSpaModule/ReleaseNotes.txt: -------------------------------------------------------------------------------- 1 | 

DnnSpaModule

2 |

3 | Christoc.com
4 | modules@christoc.com
5 | http://www.christoc.com
6 |

7 |
8 |
9 |

About the DnnSpaModule

10 |

11 | Version CHANGEME

12 |

13 |

Description about version.

14 | 15 |

Bug Fixes

16 |
    17 |
  • List
  • 18 |
  • of
  • 19 |
  • bug
  • 20 |
  • fixes
  • 21 |
22 | 23 |
-------------------------------------------------------------------------------- /src/DnnSpaModule/Scripts/ItemEdit.js: -------------------------------------------------------------------------------- 1 | var dnnspamodule = dnnspamodule || {}; 2 | 3 | dnnspamodule.itemViewModel = function (moduleId, resx) { 4 | var service = { 5 | path: "DnnSpaModule", 6 | framework: $.ServicesFramework(moduleId) 7 | } 8 | service.baseUrl = service.framework.getServiceRoot(service.path) + "Item/"; 9 | 10 | var id = ko.observable(-1); 11 | var name = ko.observable(''); 12 | var description = ko.observable(''); 13 | var assignedUser = ko.observable(-1); 14 | var userList = ko.observableArray([]); 15 | var isLoading = ko.observable(false); 16 | 17 | var init = function () { 18 | var qs = getQueryStrings(); 19 | var itemId = qs["tid"]; 20 | if (itemId) { 21 | getItem(itemId); 22 | } 23 | getUserList(); 24 | }; 25 | 26 | var getQueryStrings = function () { 27 | var assoc = {}; 28 | var decode = function (s) { return decodeURIComponent(s.replace(/\+/g, " ")); }; 29 | var queryString = location.search.substring(1); 30 | var keyValues = queryString.split('&'); 31 | 32 | for (var i = 0; i < keyValues.length; i++) { 33 | var key = keyValues[i].split('='); 34 | if (key.length > 1) { 35 | assoc[decode(key[0])] = decode(key[1]); 36 | } 37 | } 38 | 39 | return addRewriteQueryString(assoc, decode); 40 | }; 41 | 42 | var addRewriteQueryString = function (hash, decode) { 43 | var path = location.pathname; 44 | var queryString = path.substring(path.search('/ctl/') + 1); 45 | var keyValues = queryString.split('/'); 46 | 47 | for (var i = 0; i < keyValues.length; i += 2) { 48 | hash[decode(keyValues[i])] = decode(keyValues[i + 1]) 49 | } 50 | 51 | return hash; 52 | }; 53 | 54 | var getItem = function (itemId) { 55 | isLoading(true); 56 | 57 | var restUrl = service.baseUrl + itemId; 58 | var jqXHR = $.ajax({ 59 | url: restUrl, 60 | beforeSend: service.framework.setModuleHeaders, 61 | dataType: "json" 62 | }).done(function (data) { 63 | if (data) { 64 | load(data); 65 | } 66 | else { 67 | clear(); 68 | } 69 | }).always(function (data) { 70 | isLoading(false); 71 | }); 72 | }; 73 | 74 | var getUserList = function () { 75 | isLoading(true); 76 | 77 | // need to calculate a different Url for User service 78 | var restUrl = service.framework.getServiceRoot(service.path) + "User/"; 79 | var jqXHR = $.ajax({ 80 | url: restUrl, 81 | beforeSend: service.framework.setModuleHeaders, 82 | dataType: "json", 83 | async: false 84 | }).done(function (data) { 85 | if (data) { 86 | loadUsers(data); 87 | } 88 | else { 89 | clear(); 90 | } 91 | }).always(function (data) { 92 | isLoading(false); 93 | }); 94 | }; 95 | 96 | var load = function (data) { 97 | id(data.id) 98 | name(data.name); 99 | assignedUser(data.assignedUser); 100 | description(data.description); 101 | }; 102 | 103 | var save = function () { 104 | isLoading(true); 105 | var item = { 106 | id: id(), 107 | name: name(), 108 | description: description(), 109 | assignedUser: assignedUser() 110 | }; 111 | var ajaxMethod = "POST"; 112 | var restUrl = service.baseUrl; 113 | 114 | if (item.id > 0) { 115 | // ajaxMethod = "PATCH"; 116 | restUrl += item.id; 117 | } 118 | var jqXHR = $.ajax({ 119 | method: ajaxMethod, 120 | url: restUrl, 121 | contentType: "application/json; charset=UTF-8", 122 | data: JSON.stringify(item), 123 | beforeSend: service.framework.setModuleHeaders, 124 | dataType: "json" 125 | }).done(function (data) { 126 | console.log(data); 127 | dnnModal.closePopUp(); 128 | }).always(function (data) { 129 | isLoading(false); 130 | }); 131 | }; 132 | 133 | var loadUsers = function (data) { 134 | userList.removeAll(); 135 | var underlyingArray = userList(); 136 | for (var i = 0; i < data.length; i++) { 137 | var result = data[i]; 138 | var user = new dnnspamodule.user(result.id, result.name); 139 | underlyingArray.push(user); 140 | } 141 | userList.valueHasMutated(); 142 | }; 143 | 144 | var clear = function () { 145 | id(''); 146 | name(''); 147 | description(''); 148 | assignedUser(-1); 149 | }; 150 | 151 | var cancel = function () { 152 | dnnModal.closePopUp(false); 153 | }; 154 | 155 | return { 156 | id: id, 157 | name: name, 158 | description: description, 159 | assignedUser: assignedUser, 160 | userList: userList, 161 | cancel: cancel, 162 | load: load, 163 | save: save, 164 | init: init, 165 | isLoading: isLoading 166 | }; 167 | } 168 | 169 | dnnspamodule.user = function (id, name) { 170 | this.id = id; 171 | this.name = name; 172 | } -------------------------------------------------------------------------------- /src/DnnSpaModule/Scripts/ItemView.js: -------------------------------------------------------------------------------- 1 | var dnnspamodule = dnnspamodule || {}; 2 | 3 | dnnspamodule.itemListViewModel = function (moduleId, resx) { 4 | var service = { 5 | path: "DnnSpaModule", 6 | framework: $.ServicesFramework(moduleId) 7 | } 8 | service.baseUrl = service.framework.getServiceRoot(service.path) + "Item/"; 9 | 10 | var isLoading = ko.observable(false); 11 | var itemList = ko.observableArray([]); 12 | var editMode = ko.computed(function () { 13 | return itemList().length > 0 && itemList()[0].editUrl().length > 0; 14 | }); 15 | 16 | var init = function () { 17 | getItemList(); 18 | }; 19 | 20 | var getItemList = function () { 21 | isLoading(true); 22 | var jqXHR = $.ajax({ 23 | url: service.baseUrl, 24 | beforeSend: service.framework.setModuleHeaders, 25 | dataType: "json" 26 | }).done(function (data) { 27 | if (data) { 28 | load(data); 29 | } 30 | else { 31 | // No data to load 32 | itemList.removeAll(); 33 | } 34 | }).always(function (data) { 35 | isLoading(false); 36 | }); 37 | }; 38 | 39 | var deleteItem = function (item) { 40 | isLoading(true); 41 | var restUrl = service.baseUrl + item.id(); 42 | var jqXHR = $.ajax({ 43 | method: "DELETE", 44 | url: restUrl, 45 | beforeSend: service.framework.setModuleHeaders 46 | }).done(function () { 47 | console.log("Deleted: " + item.id()); 48 | itemList.remove(item); 49 | }).fail(function () { 50 | console.log("Error"); 51 | }).always(function (data) { 52 | console.log("finished"); 53 | isLoading(false); 54 | }); 55 | }; 56 | 57 | var load = function (data) { 58 | itemList.removeAll(); 59 | var underlyingArray = itemList(); 60 | for (var i = 0; i < data.length; i++) { 61 | var result = data[i]; 62 | var item = new dnnspamodule.itemViewModel(); 63 | item.load(result); 64 | underlyingArray.push(item); 65 | } 66 | itemList.valueHasMutated(); 67 | }; 68 | 69 | var alertSample = function () { 70 | alert("Hello World!"); 71 | }; 72 | 73 | return { 74 | init: init, 75 | load: load, 76 | itemList: itemList, 77 | getItemList: getItemList, 78 | deleteItem: deleteItem, 79 | editMode: editMode, 80 | isLoading: isLoading, 81 | alert: alertSample 82 | } 83 | }; 84 | 85 | dnnspamodule.itemViewModel = function () { 86 | var id = ko.observable(''); 87 | var name = ko.observable(''); 88 | var description = ko.observable(''); 89 | var assignedUser = ko.observable(-1); 90 | var editUrl = ko.observable(''); 91 | 92 | var load = function (data) { 93 | id(data.id) 94 | name(data.name); 95 | assignedUser(data.assignedUserId); 96 | description(data.description); 97 | editUrl(data.editUrl); 98 | }; 99 | 100 | return { 101 | id: id, 102 | name: name, 103 | description: description, 104 | editUrl: editUrl, 105 | load: load 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/DnnSpaModule/Scripts/QuickSettings.js: -------------------------------------------------------------------------------- 1 | var dnnspamodule = dnnspamodule || {}; 2 | 3 | dnnspamodule.quickSettings = function(root, moduleId) { 4 | 5 | // Setup your settings service endpoint 6 | /* 7 | var service = { 8 | path: "DnnSpaModule", 9 | framework: $.ServicesFramework(moduleId) 10 | } 11 | service.baseUrl = service.framework.getServiceRoot(service.path) + "Settings/"; 12 | */ 13 | 14 | var SaveSettings = function () { 15 | alert("Save Settings"); 16 | var deferred = $.Deferred(); 17 | return deferred.promise(); 18 | }; 19 | 20 | var CancelSettings = function () { 21 | var deferred = $.Deferred(); 22 | deferred.resolve(); 23 | return deferred.promise(); 24 | }; 25 | 26 | var LoadSettings = function () { 27 | }; 28 | 29 | var init = function () { 30 | // Wire up the default save and cancel buttons 31 | $(root).dnnQuickSettings({ 32 | moduleId: moduleId, 33 | onSave: SaveSettings, 34 | onCancel: CancelSettings 35 | }); 36 | LoadSettings(); 37 | } 38 | 39 | return { 40 | init: init 41 | } 42 | }; -------------------------------------------------------------------------------- /src/DnnSpaModule/Services/ItemController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Net.Http; 4 | using System.Web.Http; 5 | using Dnn.Modules.DnnSpaModule.Components; 6 | using Dnn.Modules.DnnSpaModule.Services.ViewModels; 7 | using DotNetNuke.Common; 8 | using DotNetNuke.Web.Api; 9 | using DotNetNuke.Security; 10 | using System.Threading; 11 | using DotNetNuke.UI.Modules; 12 | using DotNetNuke.Common.Utilities; 13 | using System.Collections.Generic; 14 | using Newtonsoft.Json.Linq; 15 | 16 | namespace Dnn.Modules.DnnSpaModule.Services 17 | { 18 | [SupportedModules("DnnSpaModule")] 19 | [DnnModuleAuthorize(AccessLevel = SecurityAccessLevel.View)] 20 | public class ItemController : DnnApiController 21 | { 22 | private readonly IItemRepository _repository; 23 | 24 | public ItemController(IItemRepository repository) 25 | { 26 | Requires.NotNull(repository); 27 | 28 | this._repository = repository; 29 | } 30 | 31 | public ItemController() : this(ItemRepository.Instance) { } 32 | 33 | public HttpResponseMessage Delete(int itemId) 34 | { 35 | var item = _repository.GetItem(itemId, ActiveModule.ModuleID); 36 | 37 | _repository.DeleteItem(item); 38 | 39 | return Request.CreateResponse(System.Net.HttpStatusCode.NoContent); 40 | } 41 | 42 | public HttpResponseMessage Get(int itemId) 43 | { 44 | var item = new ItemViewModel(_repository.GetItem(itemId, ActiveModule.ModuleID)); 45 | 46 | return Request.CreateResponse(item); 47 | } 48 | 49 | public HttpResponseMessage GetList() 50 | { 51 | List items; 52 | 53 | if (Globals.IsEditMode()) 54 | { 55 | items = _repository.GetItems(ActiveModule.ModuleID) 56 | .Select(item => new ItemViewModel(item, GetEditUrl(item.ItemId))) 57 | .ToList(); 58 | } 59 | else 60 | { 61 | items = _repository.GetItems(ActiveModule.ModuleID) 62 | .Select(item => new ItemViewModel(item, "")) 63 | .ToList(); 64 | } 65 | 66 | return Request.CreateResponse(items); 67 | } 68 | 69 | protected string GetEditUrl(int id) 70 | { 71 | string editUrl = Globals.NavigateURL("Edit", string.Format("mid={0}", ActiveModule.ModuleID), string.Format("tid={0}", id)); 72 | 73 | if (PortalSettings.EnablePopUps) 74 | { 75 | editUrl = UrlUtils.PopUpUrl(editUrl, PortalSettings, false, false, 550, 950); 76 | } 77 | return editUrl; 78 | } 79 | 80 | [HttpPost] 81 | [ValidateAntiForgeryToken] 82 | public HttpResponseMessage Upsert(ItemViewModel item) 83 | { 84 | if (item.Id > 0) 85 | { 86 | var t = Update(item); 87 | return Request.CreateResponse(System.Net.HttpStatusCode.NoContent); 88 | } 89 | else 90 | { 91 | var t = Create(item); 92 | return Request.CreateResponse(t.ItemId); 93 | } 94 | 95 | } 96 | 97 | private Item Create(ItemViewModel item) 98 | { 99 | Item t = new Item 100 | { 101 | ItemName = item.Name, 102 | ItemDescription = item.Description, 103 | AssignedUserId = item.AssignedUser, 104 | ModuleId = ActiveModule.ModuleID, 105 | CreatedByUserId = UserInfo.UserID, 106 | LastModifiedByUserId = UserInfo.UserID, 107 | CreatedOnDate = DateTime.UtcNow, 108 | LastModifiedOnDate = DateTime.UtcNow 109 | }; 110 | _repository.AddItem(t); 111 | 112 | return t; 113 | } 114 | 115 | private Item Update(ItemViewModel item) 116 | { 117 | 118 | var t = _repository.GetItem(item.Id, ActiveModule.ModuleID); 119 | if (t != null) 120 | { 121 | t.ItemName = item.Name; 122 | t.ItemDescription = item.Description; 123 | t.AssignedUserId = item.AssignedUser; 124 | t.LastModifiedByUserId = UserInfo.UserID; 125 | t.LastModifiedOnDate = DateTime.UtcNow; 126 | } 127 | _repository.UpdateItem(t); 128 | 129 | return t; 130 | } 131 | } 132 | } -------------------------------------------------------------------------------- /src/DnnSpaModule/Services/ServiceRouteMapper.cs: -------------------------------------------------------------------------------- 1 |  2 | using DotNetNuke.Web.Api; 3 | using System.Web.Http; 4 | 5 | namespace Dnn.Modules.DnnSpaModule.Services 6 | { 7 | 8 | /// 9 | /// The ServiceRouteMapper tells the DNN Web API Framework what routes this module uses 10 | /// 11 | public class ServiceRouteMapper : IServiceRouteMapper 12 | { 13 | /// 14 | /// RegisterRoutes is used to register the module's routes 15 | /// 16 | /// 17 | public void RegisterRoutes(IMapRoute mapRouteManager) 18 | { 19 | mapRouteManager.MapHttpRoute( 20 | moduleFolderName:"DnnSpaModule", 21 | routeName: "default", 22 | url: "{controller}/{itemId}", 23 | defaults: new { itemId = RouteParameter.Optional }, 24 | namespaces: new[] { "Dnn.Modules.DnnSpaModule.Services" }); 25 | } 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /src/DnnSpaModule/Services/UserController.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Net.Http; 3 | using System.Collections.Generic; 4 | using Dnn.Modules.DnnSpaModule.Services.ViewModels; 5 | using DotNetNuke.Web.Api; 6 | using DotNetNuke.Security; 7 | using DotNetNuke.Entities.Users; 8 | 9 | namespace Dnn.Modules.DnnSpaModule.Services 10 | { 11 | [SupportedModules("DnnSpaModule")] 12 | [DnnModuleAuthorize(AccessLevel = SecurityAccessLevel.Edit)] 13 | public class UserController : DnnApiController 14 | { 15 | public UserController() { } 16 | 17 | public HttpResponseMessage GetList() 18 | { 19 | 20 | var userlist = DotNetNuke.Entities.Users.UserController.GetUsers(this.PortalSettings.PortalId); 21 | var users = userlist.Cast().ToList() 22 | .Select(user => new UserViewModel(user)) 23 | .ToList(); 24 | 25 | return Request.CreateResponse(users); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/DnnSpaModule/Services/ViewModels/ItemViewModel.cs: -------------------------------------------------------------------------------- 1 | using Dnn.Modules.DnnSpaModule.Components; 2 | using Newtonsoft.Json; 3 | 4 | namespace Dnn.Modules.DnnSpaModule.Services.ViewModels 5 | { 6 | [JsonObject(MemberSerialization.OptIn)] 7 | public class ItemViewModel 8 | { 9 | public ItemViewModel(Item t) 10 | { 11 | Id = t.ItemId; 12 | Name = t.ItemName; 13 | Description = t.ItemDescription; 14 | AssignedUser = t.AssignedUserId; 15 | } 16 | 17 | public ItemViewModel(Item t, string editUrl) 18 | { 19 | Id = t.ItemId; 20 | Name = t.ItemName; 21 | Description = t.ItemDescription; 22 | EditUrl = editUrl; 23 | } 24 | 25 | 26 | public ItemViewModel() { } 27 | 28 | [JsonProperty("id")] 29 | public int Id { get; set; } 30 | 31 | [JsonProperty("name")] 32 | public string Name { get; set; } 33 | 34 | [JsonProperty("description")] 35 | public string Description { get; set; } 36 | 37 | [JsonProperty("assignedUser")] 38 | public int AssignedUser { get; set; } 39 | 40 | [JsonProperty("editUrl")] 41 | public string EditUrl { get; } 42 | } 43 | } -------------------------------------------------------------------------------- /src/DnnSpaModule/Services/ViewModels/UserViewModel.cs: -------------------------------------------------------------------------------- 1 | using DotNetNuke.Entities.Users; 2 | using Newtonsoft.Json; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Web; 7 | 8 | namespace Dnn.Modules.DnnSpaModule.Services.ViewModels 9 | { 10 | [JsonObject(MemberSerialization.OptIn)] 11 | public class UserViewModel 12 | { 13 | public UserViewModel(UserInfo t) 14 | { 15 | Id = t.UserID; 16 | Name = t.DisplayName; 17 | } 18 | 19 | public UserViewModel() { } 20 | 21 | [JsonProperty("id")] 22 | public int Id { get; set; } 23 | 24 | [JsonProperty("name")] 25 | public string Name { get; set; } 26 | } 27 | } -------------------------------------------------------------------------------- /src/DnnSpaModule/Settings.html: -------------------------------------------------------------------------------- 1 | [JavaScript:{ jsname: "JQuery" }] 2 | [JavaScript:{ jsname: "Knockout" }] 3 | [JavaScript:{ path: "~/Resources/Shared/scripts/dnn.jquery.js"}] 4 | [JavaScript:{ path: "~/DesktopModules/DnnSpaModule/scripts/QuickSettings.js"}] 5 | 6 |
7 |
8 | [Resx:{key:"SettingsInfo"}] 9 |
10 |
11 | 19 | -------------------------------------------------------------------------------- /src/DnnSpaModule/View.html: -------------------------------------------------------------------------------- 1 | [JavaScript:{ jsname: "JQuery" }] 2 | [JavaScript:{ jsname: "Knockout" }] 3 | [JavaScript:{ path: "~/Resources/Shared/scripts/dnn.jquery.js"}] 4 | [JavaScript:{ path: "~/DesktopModules/DnnSpaModule/scripts/ItemView.js"}] 5 | 6 | [ModuleAction:{ controlKey : "Edit", 7 | securityAccessLevel : "Edit", 8 | titleKey: "EditModule", 9 | localResourceFile: "~/DesktopModules/DnnSpaModule/App_LocalResources/View.resx" 10 | }] 11 | 12 |
13 | 23 |
24 | 25 | -------------------------------------------------------------------------------- /src/DnnSpaModule/install/DnnSpaModule_00.00.01_Install.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnnsoftware/DNN.Templates/c3181a2d1cd0e4ed8d358c523e5b08897ee6e070/src/DnnSpaModule/install/DnnSpaModule_00.00.01_Install.zip -------------------------------------------------------------------------------- /src/DnnSpaModule/install/DnnSpaModule_00.00.01_Source.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnnsoftware/DNN.Templates/c3181a2d1cd0e4ed8d358c523e5b08897ee6e070/src/DnnSpaModule/install/DnnSpaModule_00.00.01_Source.zip -------------------------------------------------------------------------------- /src/DnnSpaModule/module.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnnsoftware/DNN.Templates/c3181a2d1cd0e4ed8d358c523e5b08897ee6e070/src/DnnSpaModule/module.css -------------------------------------------------------------------------------- /src/DnnSpaModule/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/vsix/DnnMvcModule/DnnMvcModule.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DnnMvcModule", "DnnMvcModule\DnnMvcModule.csproj", "{1542A01F-8A6B-4F10-912E-5514935BBE20}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {1542A01F-8A6B-4F10-912E-5514935BBE20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {1542A01F-8A6B-4F10-912E-5514935BBE20}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {1542A01F-8A6B-4F10-912E-5514935BBE20}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {1542A01F-8A6B-4F10-912E-5514935BBE20}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /src/vsix/DnnMvcModule/DnnMvcModule/DnnMvcModule.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | Debug 10 | AnyCPU 11 | 2.0 12 | {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 13 | {1542A01F-8A6B-4F10-912E-5514935BBE20} 14 | Library 15 | Properties 16 | DnnMvcModule 17 | Dnn Mvc Module 18 | v4.5 19 | false 20 | true 21 | false 22 | false 23 | false 24 | false 25 | 26 | 27 | true 28 | full 29 | false 30 | bin\Debug\ 31 | DEBUG;TRACE 32 | prompt 33 | 4 34 | False 35 | 36 | 37 | pdbonly 38 | true 39 | bin\Release\ 40 | TRACE 41 | prompt 42 | 4 43 | 44 | 45 | 46 | 47 | 48 | 49 | Always 50 | true 51 | 52 | 53 | Always 54 | true 55 | 56 | 57 | Designer 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | Always 66 | true 67 | 68 | 69 | 70 | 71 | 78 | -------------------------------------------------------------------------------- /src/vsix/DnnMvcModule/DnnMvcModule/License.txt: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 2 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation 3 | the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 4 | to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions 7 | of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /src/vsix/DnnMvcModule/DnnMvcModule/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("DnnMvcModule")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("DnnMvcModule")] 13 | [assembly: AssemblyCopyright("")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Build and Revision Numbers 30 | // by using the '*' as shown below: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /src/vsix/DnnMvcModule/DnnMvcModule/Web/Dnn/Dnn Mvc Module.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnnsoftware/DNN.Templates/c3181a2d1cd0e4ed8d358c523e5b08897ee6e070/src/vsix/DnnMvcModule/DnnMvcModule/Web/Dnn/Dnn Mvc Module.zip -------------------------------------------------------------------------------- /src/vsix/DnnMvcModule/DnnMvcModule/__TemplateIcon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnnsoftware/DNN.Templates/c3181a2d1cd0e4ed8d358c523e5b08897ee6e070/src/vsix/DnnMvcModule/DnnMvcModule/__TemplateIcon.ico -------------------------------------------------------------------------------- /src/vsix/DnnMvcModule/DnnMvcModule/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | Getting Started 9 | 10 | 11 | 12 |
13 | 17 | 18 |
19 |
20 |

Creating a Visual Studio Extension

21 | 22 |

This VSIX project enables developers to take advantage of the extensibility APIs in the Visual Studio 2015 IDE Software Development Kit. The solution contains a VSIX project that packages the extension into a VSIX file. This file is used to install an extension for Visual Studio.

23 |

To add new features to the extension:

24 | 25 |
    26 |
  1. Right-click the project node in Solution Explorer and select Add>New Item.
  2. 27 |
  3. In the Add New Item dialog box, expand the Extensibility node under Visual C# or Visual Basic.
  4. 28 |
  5. Choose from the available Item templates: Visual Studio Package, Editor Items (Classifier, Margin, Text Adornment, Viewport Adornment), Commands, Tool Window, etc., and then click Add.
  6. 29 |
30 | 31 |

The files for the template that you selected are added to the project. You can start adding functionality to your item template, press F5 to run the project, or add another Item template.

32 | 33 |

To run the project, press F5. Visual Studio will:

34 | 35 |
    36 |
  • Build the extension from the VSIX project.
  • 37 |
  • Create the VSIX package from the VSIX project.
  • 38 |
  • When debugging, start an experimental instance of Visual Studio with the VSIX package installed.
  • 39 |
40 | 41 |

In the experimental instance of Visual Studio you can test out the functionality of your extension without affecting your Visual Studio installation.

42 | 43 |
44 |
45 | 46 |

Visual Studio Extensibility Resources

47 | 48 |

Check out the VS Extensibility Dev Center, the extensibility samples, and the extensibility documentation to learn more about building extensions.

49 | 50 |

Community Extensions

51 | 52 |

Here you can see other extensions that the Visual Studio Community has developed

53 | 54 | 80 |

Give us feedback

81 |

UserVoice

82 |
83 |
84 |
85 | 86 | 87 | -------------------------------------------------------------------------------- /src/vsix/DnnMvcModule/DnnMvcModule/source.extension.vsixmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dnn Mvc Module 6 | A Visual Studio template for DNN 8 Module Development using the new MVC module type 7 | https://github.com/dnnsoftware/DNN.Templates 8 | License.txt 9 | __TemplateIcon.ico 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/vsix/DnnMvcModule/DnnMvcModule/stylesheet.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | border: 0; 5 | color: #1E1E1E; 6 | font-size: 13px; 7 | font-family: "Segoe UI", Helvetica, Arial, sans-serif; 8 | line-height: 1.45; 9 | word-wrap: break-word; 10 | } 11 | 12 | /* General & 'Reset' Stuff */ 13 | 14 | 15 | .container { 16 | width: 980px; 17 | margin: 0 auto; 18 | } 19 | 20 | section { 21 | display: block; 22 | margin: 0; 23 | } 24 | 25 | h1, h2, h3, h4, h5, h6 { 26 | margin: 0; 27 | } 28 | 29 | /* Header,
30 | header - container 31 | h1 - project name 32 | h2 - project description 33 | */ 34 | 35 | #header { 36 | color: #FFF; 37 | background: #68217a; 38 | position:relative; 39 | } 40 | #hangcloud { 41 | width: 190px; 42 | height: 160px; 43 | background: url("../images/bannerart03.png"); 44 | position: absolute; 45 | top: 0; 46 | right: -30px; 47 | } 48 | h1, h2 { 49 | font-family: "Segoe UI Light", "Segoe UI", Helvetica, Arial, sans-serif; 50 | line-height: 1; 51 | margin: 0 18px;; 52 | padding: 0; 53 | } 54 | #header h1 { 55 | font-size: 3.4em; 56 | padding-top: 18px; 57 | font-weight: normal; 58 | margin-left: 15px; 59 | } 60 | 61 | #header h2 { 62 | font-size: 1.5em; 63 | margin-top: 10px; 64 | padding-bottom: 18px; 65 | font-weight: normal; 66 | } 67 | 68 | 69 | #main_content { 70 | width: 100%; 71 | display: flex; 72 | flex-direction: row; 73 | } 74 | 75 | 76 | h1, h2, h3, h4, h5, h6 { 77 | font-weight: bolder; 78 | } 79 | 80 | #main_content h1 { 81 | font-size: 1.8em; 82 | margin-top: 34px; 83 | } 84 | 85 | #main_content h1:first-child { 86 | margin-top: 30px; 87 | } 88 | 89 | #main_content h2 { 90 | font-size: 1.8em; 91 | } 92 | p, ul { 93 | margin: 11px 18px; 94 | } 95 | 96 | #main_content a { 97 | color: #06C; 98 | text-decoration: none; 99 | } 100 | ul { 101 | margin-top: 13px; 102 | margin-left: 18px; 103 | padding-left: 0; 104 | } 105 | ul li { 106 | margin-left: 18px; 107 | padding-left: 0; 108 | } 109 | #lpanel { 110 | width: 620px; 111 | float: left; 112 | } 113 | #rpanel ul { 114 | list-style-type: none; 115 | } 116 | #rpanel ul li { 117 | line-height: 1.8em; 118 | } 119 | #rpanel { 120 | background: #e7e7e7; 121 | width: 360px; 122 | } 123 | -------------------------------------------------------------------------------- /src/vsix/DnnSpaModule/DnnMvcModule/DnnSpaModule.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | Debug 10 | AnyCPU 11 | 2.0 12 | {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 13 | {1542A01F-8A6B-4F10-912E-5514935BBE20} 14 | Library 15 | Properties 16 | DnnSpaModule 17 | Dnn Spa Module 18 | v4.5 19 | false 20 | true 21 | false 22 | false 23 | false 24 | false 25 | 26 | 27 | true 28 | full 29 | false 30 | bin\Debug\ 31 | DEBUG;TRACE 32 | prompt 33 | 4 34 | False 35 | 36 | 37 | pdbonly 38 | true 39 | bin\Release\ 40 | TRACE 41 | prompt 42 | 4 43 | 44 | 45 | 46 | 47 | 48 | 49 | Always 50 | true 51 | 52 | 53 | Always 54 | true 55 | 56 | 57 | Designer 58 | 59 | 60 | 61 | 62 | 63 | 64 | Always 65 | true 66 | 67 | 68 | 69 | 70 | 71 | 78 | -------------------------------------------------------------------------------- /src/vsix/DnnSpaModule/DnnMvcModule/License.txt: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 2 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation 3 | the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 4 | to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions 7 | of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /src/vsix/DnnSpaModule/DnnMvcModule/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("DnnSpaModule")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("DnnSpaModule")] 13 | [assembly: AssemblyCopyright("")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Build and Revision Numbers 30 | // by using the '*' as shown below: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /src/vsix/DnnSpaModule/DnnMvcModule/Web/Dnn/Dnn Spa Module.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnnsoftware/DNN.Templates/c3181a2d1cd0e4ed8d358c523e5b08897ee6e070/src/vsix/DnnSpaModule/DnnMvcModule/Web/Dnn/Dnn Spa Module.zip -------------------------------------------------------------------------------- /src/vsix/DnnSpaModule/DnnMvcModule/__TemplateIcon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnnsoftware/DNN.Templates/c3181a2d1cd0e4ed8d358c523e5b08897ee6e070/src/vsix/DnnSpaModule/DnnMvcModule/__TemplateIcon.ico -------------------------------------------------------------------------------- /src/vsix/DnnSpaModule/DnnMvcModule/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | Getting Started 9 | 10 | 11 | 12 |
13 | 17 | 18 |
19 |
20 |

Creating a Visual Studio Extension

21 | 22 |

This VSIX project enables developers to take advantage of the extensibility APIs in the Visual Studio 2015 IDE Software Development Kit. The solution contains a VSIX project that packages the extension into a VSIX file. This file is used to install an extension for Visual Studio.

23 |

To add new features to the extension:

24 | 25 |
    26 |
  1. Right-click the project node in Solution Explorer and select Add>New Item.
  2. 27 |
  3. In the Add New Item dialog box, expand the Extensibility node under Visual C# or Visual Basic.
  4. 28 |
  5. Choose from the available Item templates: Visual Studio Package, Editor Items (Classifier, Margin, Text Adornment, Viewport Adornment), Commands, Tool Window, etc., and then click Add.
  6. 29 |
30 | 31 |

The files for the template that you selected are added to the project. You can start adding functionality to your item template, press F5 to run the project, or add another Item template.

32 | 33 |

To run the project, press F5. Visual Studio will:

34 | 35 |
    36 |
  • Build the extension from the VSIX project.
  • 37 |
  • Create the VSIX package from the VSIX project.
  • 38 |
  • When debugging, start an experimental instance of Visual Studio with the VSIX package installed.
  • 39 |
40 | 41 |

In the experimental instance of Visual Studio you can test out the functionality of your extension without affecting your Visual Studio installation.

42 | 43 |
44 |
45 | 46 |

Visual Studio Extensibility Resources

47 | 48 |

Check out the VS Extensibility Dev Center, the extensibility samples, and the extensibility documentation to learn more about building extensions.

49 | 50 |

Community Extensions

51 | 52 |

Here you can see other extensions that the Visual Studio Community has developed

53 | 54 | 80 |

Give us feedback

81 |

UserVoice

82 |
83 |
84 |
85 | 86 | 87 | -------------------------------------------------------------------------------- /src/vsix/DnnSpaModule/DnnMvcModule/source.extension.vsixmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dnn Spa Module 6 | A Visual Studio template for DNN 8 Module Development using the new Spa module type 7 | https://github.com/dnnsoftware/DNN.Templates 8 | License.txt 9 | __TemplateIcon.ico 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/vsix/DnnSpaModule/DnnMvcModule/stylesheet.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | border: 0; 5 | color: #1E1E1E; 6 | font-size: 13px; 7 | font-family: "Segoe UI", Helvetica, Arial, sans-serif; 8 | line-height: 1.45; 9 | word-wrap: break-word; 10 | } 11 | 12 | /* General & 'Reset' Stuff */ 13 | 14 | 15 | .container { 16 | width: 980px; 17 | margin: 0 auto; 18 | } 19 | 20 | section { 21 | display: block; 22 | margin: 0; 23 | } 24 | 25 | h1, h2, h3, h4, h5, h6 { 26 | margin: 0; 27 | } 28 | 29 | /* Header,
30 | header - container 31 | h1 - project name 32 | h2 - project description 33 | */ 34 | 35 | #header { 36 | color: #FFF; 37 | background: #68217a; 38 | position:relative; 39 | } 40 | #hangcloud { 41 | width: 190px; 42 | height: 160px; 43 | background: url("../images/bannerart03.png"); 44 | position: absolute; 45 | top: 0; 46 | right: -30px; 47 | } 48 | h1, h2 { 49 | font-family: "Segoe UI Light", "Segoe UI", Helvetica, Arial, sans-serif; 50 | line-height: 1; 51 | margin: 0 18px;; 52 | padding: 0; 53 | } 54 | #header h1 { 55 | font-size: 3.4em; 56 | padding-top: 18px; 57 | font-weight: normal; 58 | margin-left: 15px; 59 | } 60 | 61 | #header h2 { 62 | font-size: 1.5em; 63 | margin-top: 10px; 64 | padding-bottom: 18px; 65 | font-weight: normal; 66 | } 67 | 68 | 69 | #main_content { 70 | width: 100%; 71 | display: flex; 72 | flex-direction: row; 73 | } 74 | 75 | 76 | h1, h2, h3, h4, h5, h6 { 77 | font-weight: bolder; 78 | } 79 | 80 | #main_content h1 { 81 | font-size: 1.8em; 82 | margin-top: 34px; 83 | } 84 | 85 | #main_content h1:first-child { 86 | margin-top: 30px; 87 | } 88 | 89 | #main_content h2 { 90 | font-size: 1.8em; 91 | } 92 | p, ul { 93 | margin: 11px 18px; 94 | } 95 | 96 | #main_content a { 97 | color: #06C; 98 | text-decoration: none; 99 | } 100 | ul { 101 | margin-top: 13px; 102 | margin-left: 18px; 103 | padding-left: 0; 104 | } 105 | ul li { 106 | margin-left: 18px; 107 | padding-left: 0; 108 | } 109 | #lpanel { 110 | width: 620px; 111 | float: left; 112 | } 113 | #rpanel ul { 114 | list-style-type: none; 115 | } 116 | #rpanel ul li { 117 | line-height: 1.8em; 118 | } 119 | #rpanel { 120 | background: #e7e7e7; 121 | width: 360px; 122 | } 123 | -------------------------------------------------------------------------------- /src/vsix/DnnSpaModule/DnnSpaModule.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DnnSpaModule", "DnnMvcModule\DnnSpaModule.csproj", "{1542A01F-8A6B-4F10-912E-5514935BBE20}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {1542A01F-8A6B-4F10-912E-5514935BBE20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {1542A01F-8A6B-4F10-912E-5514935BBE20}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {1542A01F-8A6B-4F10-912E-5514935BBE20}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {1542A01F-8A6B-4F10-912E-5514935BBE20}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | --------------------------------------------------------------------------------