Merge pull request #499 from sbwalker/master
Added support for module resource management
This commit is contained in:
@ -20,6 +20,26 @@
|
||||
}
|
||||
|
||||
@code {
|
||||
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Edit;
|
||||
|
||||
public override string Title => "Edit Html/Text";
|
||||
|
||||
public override List<Resource> Resources
|
||||
{
|
||||
get
|
||||
{
|
||||
List<Resource> resources = new List<Resource>();
|
||||
resources.Add(new Resource { ResourceType = ResourceType.Stylesheet, Url = ModulePath() + "Module.css", Integrity = "", CrossOrigin = "" });
|
||||
// the following resources should be declared in the RichTextEditor component however the framework currently only supports resource management for modules and themes
|
||||
resources.Add(new Resource { ResourceType = ResourceType.Stylesheet, Url = "css/quill/quill1.3.6.bubble.css", Integrity = "", CrossOrigin = "" });
|
||||
resources.Add(new Resource { ResourceType = ResourceType.Stylesheet, Url = "css/quill/quill1.3.6.snow.css", Integrity = "", CrossOrigin = "" });
|
||||
resources.Add(new Resource { ResourceType = ResourceType.Script, Url = "js/quill1.3.6.min.js", Integrity = "", CrossOrigin = "" });
|
||||
resources.Add(new Resource { ResourceType = ResourceType.Script, Url = "js/quill-blot-formatter.min.js", Integrity = "", CrossOrigin = "" });
|
||||
resources.Add(new Resource { ResourceType = ResourceType.Script, Url = "js/quill-interop.js", Integrity = "", CrossOrigin = "" });
|
||||
return resources;
|
||||
}
|
||||
}
|
||||
|
||||
private RichTextEditor RichTextEditorHtml;
|
||||
private string _content = null;
|
||||
private string _createdby;
|
||||
@ -27,10 +47,6 @@
|
||||
private string _modifiedby;
|
||||
private DateTime _modifiedon;
|
||||
|
||||
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Edit;
|
||||
|
||||
public override string Title => "Edit Html/Text";
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
try
|
||||
|
@ -11,6 +11,16 @@
|
||||
}
|
||||
|
||||
@code {
|
||||
public override List<Resource> Resources
|
||||
{
|
||||
get
|
||||
{
|
||||
List<Resource> resources = new List<Resource>();
|
||||
resources.Add(new Resource { ResourceType = ResourceType.Stylesheet, Url = ModulePath() + "Module.css", Integrity = "", CrossOrigin = "" });
|
||||
return resources;
|
||||
}
|
||||
}
|
||||
|
||||
private string content = "";
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
|
@ -6,6 +6,7 @@ using Oqtane.Services;
|
||||
using System;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.UI;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Oqtane.Modules
|
||||
{
|
||||
@ -37,6 +38,9 @@ namespace Oqtane.Modules
|
||||
|
||||
public virtual bool UseAdminContainer { get { return true; } }
|
||||
|
||||
public virtual List<Resource> Resources { get; set; }
|
||||
|
||||
|
||||
// path method
|
||||
|
||||
public string ModulePath()
|
||||
|
Reference in New Issue
Block a user