Skip to content

Commit

Permalink
Merge branch 'feature/init-vue' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	OpenContent/js/ckeditor/plugins/dnnpages/plugin.js
  • Loading branch information
sachatrauwaen committed May 29, 2019
2 parents 059ed05 + 00ec54d commit 33d7252
Show file tree
Hide file tree
Showing 66 changed files with 14,764 additions and 1,825 deletions.
15 changes: 9 additions & 6 deletions OpenContent/App_LocalResources/EditData.ascx.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,19 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="DataType.Text" xml:space="preserve">
<value>Type of data</value>
</data>
<data name="Versions.Text" xml:space="preserve">
<value>Versions</value>
</data>
<data name="cmdImport.Text" xml:space="preserve">
<value>Import Demo Data</value>
</data>
<data name="cmdRestApi.Text" xml:space="preserve">
<value>Rest Api Doc</value>
</data>
<data name="cmdSaveDefault.Text" xml:space="preserve">
<value>Save to file As default</value>
</data>
<data name="DataType.Text" xml:space="preserve">
<value>Type of data</value>
</data>
<data name="Versions.Text" xml:space="preserve">
<value>Versions</value>
</data>
</root>
3 changes: 3 additions & 0 deletions OpenContent/App_LocalResources/EditGlobalSettings.ascx.resx
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,7 @@
<data name="lLoadGlyphicons.Text" xml:space="preserve">
<value>Load Glyphicons on Edit Form (for bootstrap 4)</value>
</data>
<data name="lCompositeCss.Text" xml:space="preserve">
<value>Composite &amp; Minify Template Css (require DNN 8 or greater)</value>
</data>
</root>
9 changes: 9 additions & 0 deletions OpenContent/App_LocalResources/View.ascx.resx
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,13 @@
<data name="CloneModule.Action" xml:space="preserve">
<value>Clone Module</value>
</data>
<data name="Create.Text" xml:space="preserve">
<value>Create</value>
</data>
<data name="CretateHelp.Text" xml:space="preserve">
<value>Start by creating a new template based on one available from the web.</value>
</data>
<data name="Advanced.Text" xml:space="preserve">
<value>Advanced...</value>
</data>
</root>
21 changes: 17 additions & 4 deletions OpenContent/Components/Alpaca/AlpacaEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,17 @@ private void RegisterFields(bool bootstrap)
}
if (allFields || fieldTypes.Contains("ckeditor") || fieldTypes.Contains("mlckeditor"))
{
ClientResourceManager.RegisterScript(Page, "~/DesktopModules/OpenContent/js/CKEditor/ckeditor.js", FileOrder.Js.DefaultPriority);
//ClientResourceManager.RegisterScript(Page, "~/DesktopModules/OpenContent/js/CKEditor/ckeditor.js", FileOrder.Js.DefaultPriority);

ClientScriptManager cs = Page.ClientScript;
Type csType = GetType();
const string CsName = "CKEdScript";
if (!cs.IsClientScriptIncludeRegistered(csType, CsName))
{
cs.RegisterClientScriptInclude(
csType, CsName, Page.ResolveUrl("~/DesktopModules/OpenContent/js/CKEditor/ckeditor.js"));
}

DotNetNuke.UI.Utilities.ClientAPI.RegisterClientVariable(Page, "PortalId", PortalId.ToString(), true);
/*
var CKDNNporid = new HiddenField();
Expand All @@ -205,9 +215,12 @@ private void RegisterFields(bool bootstrap)
}
if (allFields || fieldTypes.Contains("icon"))
{
ClientResourceManager.RegisterScript(Page, "~/DesktopModules/OpenContent/js/fontIconPicker/jquery.fonticonpicker.min.js", FileOrder.Js.DefaultPriority, "DnnPageHeaderProvider");
ClientResourceManager.RegisterStyleSheet(Page, "~/DesktopModules/OpenContent/js/fontIconPicker/css/jquery.fonticonpicker.min.css", FileOrder.Css.DefaultPriority);
ClientResourceManager.RegisterStyleSheet(Page, "~/DesktopModules/OpenContent/js/fontIconPicker/themes/grey-theme/jquery.fonticonpicker.grey.min.css", FileOrder.Css.DefaultPriority);
ClientResourceManager.RegisterScript(Page, "~/DesktopModules/OpenContent/js/fontIconPicker/js/jquery.fonticonpicker.js", FileOrder.Js.DefaultPriority, "DnnPageHeaderProvider");
ClientResourceManager.RegisterStyleSheet(Page, "~/DesktopModules/OpenContent/js/fontIconPicker/css/base/jquery.fonticonpicker.min.css", FileOrder.Css.DefaultPriority);
//if (bootstrap)
// ClientResourceManager.RegisterStyleSheet(Page, "~/DesktopModules/OpenContent/js/fontIconPicker/css/themes/bootstrap-theme/jquery.fonticonpicker.bootstrap.min.css", FileOrder.Css.DefaultPriority);
//else
ClientResourceManager.RegisterStyleSheet(Page, "~/DesktopModules/OpenContent/js/fontIconPicker/css/themes/grey-theme/jquery.fonticonpicker.grey.min.css", FileOrder.Css.DefaultPriority);
ClientResourceManager.RegisterStyleSheet(Page, "~/DesktopModules/OpenContent/css/glyphicons/glyphicons.css", FileOrder.Css.DefaultPriority + 1);
}
if (allFields || fieldTypes.Contains("summernote") || fieldTypes.Contains("mlsummernote"))
Expand Down
8 changes: 8 additions & 0 deletions OpenContent/Components/Common/Utils.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Web;

namespace Satrabel.OpenContent.Components
{
Expand All @@ -14,6 +15,13 @@ public static string RemoveQueryParams(this string url)
return url;
}

public static string GetFullUrl(HttpRequest request, string relativeUrl)
{
return String.Format("{0}://{1}{2}",
request.Url.Scheme,
request.Url.Authority,
VirtualPathUtility.ToAbsolute(relativeUrl));
}

#endregion

Expand Down
11 changes: 11 additions & 0 deletions OpenContent/Components/Handlebars/HandlebarsEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public void Compile(string source)
RegisterReplaceHelper(hbs);
RegisterReplaceNewlineHelper(hbs);
RegisterTemplateHelper(hbs);
RegisterRawHelper(hbs);
_template = hbs.Compile(source);
}
catch (Exception ex)
Expand Down Expand Up @@ -124,6 +125,7 @@ private static void RegisterHelpers(IHandlebars hbs)
RegisterReplaceHelper(hbs);
RegisterReplaceNewlineHelper(hbs);
RegisterTemplateHelper(hbs);
RegisterRawHelper(hbs);
}

private static void RegisterTruncateWordsHelper(HandlebarsDotNet.IHandlebars hbs)
Expand Down Expand Up @@ -435,6 +437,15 @@ private static void RegisterHandlebarsHelper(HandlebarsDotNet.IHandlebars hbs)
writer.WriteSafeString("</script>");
});
}

private static void RegisterRawHelper(HandlebarsDotNet.IHandlebars hbs)
{
hbs.RegisterHelper("raw", (writer, options, context, parameters) => {
options.Template(writer, null);
});

}

private void RegisterRegisterScriptHelper(HandlebarsDotNet.IHandlebars hbs, Page page, string sourceFolder)
{
hbs.RegisterHelper("registerscript", (writer, context, parameters) =>
Expand Down
Loading

0 comments on commit 33d7252

Please sign in to comment.