mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-11-24 08:46:48 +08:00
Incremental work on Gulp centralization.
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -172,6 +172,7 @@ profiling/
|
||||
src/Orchard.Web/Modules-temp/*
|
||||
src/Backup/*
|
||||
src/packages/*
|
||||
src/node_modules
|
||||
src/UpgradeLog.*
|
||||
*.itrace.csdef
|
||||
*.build.csdef
|
||||
@@ -183,9 +184,6 @@ src/Orchard.Web/Orchard.Web.Publish.xml
|
||||
src/TestResults/*
|
||||
src/Orchard.Web/Properties/PublishProfiles
|
||||
src/Orchard.Azure/Orchard.Azure.CloudService/Staging/
|
||||
src/Orchard.Web/Modules/Orchard.Azure.MediaServices/node_modules
|
||||
src/Orchard.Web/Modules/Orchard.Layouts/node_modules
|
||||
src/Orchard.Web/Modules/Orchard.DynamicForms/node_modules
|
||||
|
||||
#enable all /lib artifacts
|
||||
!lib/*/*.*
|
||||
|
||||
139
src/Gulpfile.js
Normal file
139
src/Gulpfile.js
Normal file
@@ -0,0 +1,139 @@
|
||||
/*
|
||||
* This gulpfile enables compilation of the LESS files in this project.
|
||||
*
|
||||
* To use this file you will need to:
|
||||
* - Install Node.js on your machine
|
||||
* - Run "npm install" in this folder (either via command line or a Visual Studio extension) to install dependency packages from package.json
|
||||
*
|
||||
* NOTE: If you install the Task Runner Explorer extension in Visual Studio the tasks in this
|
||||
* gulpfile will execute automatically on VS events for a more integrated/automated workflow. That's the
|
||||
* purpose of the <binding> comment element at the top.
|
||||
*/
|
||||
|
||||
var glob = require("glob"),
|
||||
path = require("path-posix"),
|
||||
merge = require("merge-stream"),
|
||||
gulpif = require("gulp-if"),
|
||||
gulp = require("gulp"),
|
||||
newer = require("gulp-newer"),
|
||||
plumber = require("gulp-plumber"),
|
||||
sourcemaps = require("gulp-sourcemaps"),
|
||||
less = require("gulp-less"),
|
||||
autoprefixer = require("gulp-autoprefixer"),
|
||||
minify = require("gulp-minify-css"),
|
||||
typescript = require("gulp-typescript"),
|
||||
uglify = require("gulp-uglify"),
|
||||
rename = require("gulp-rename"),
|
||||
concat = require("gulp-concat"),
|
||||
header = require("gulp-header")
|
||||
|
||||
/*
|
||||
** GULP TASKS
|
||||
*/
|
||||
|
||||
gulp.task("build", function () {
|
||||
var assetGroupTasks = getAssetGroups().map(createAssetGroupTask);
|
||||
return merge(assetGroupTasks);
|
||||
});
|
||||
|
||||
gulp.task("watch", function () {
|
||||
getAssetGroups().forEach(function (assetGroup) {
|
||||
gulp.watch(assetGroup.inputPaths, function (event) {
|
||||
console.log("Asset file '" + event.path + "' was " + event.type + ", rebuilding output '" + assetGroup.outputPath + "'.");
|
||||
var task = createAssetGroupTask(assetGroup);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
/*
|
||||
** ASSET GROUPS
|
||||
*/
|
||||
|
||||
function getAssetGroups() {
|
||||
var assetManifestPaths = glob.sync("Orchard.Web/{Core,Modules,Themes}/*/Assets.json");
|
||||
var assetGroups = [];
|
||||
assetManifestPaths.forEach(function (assetManifestPath) {
|
||||
var assetManifest = require("./" + assetManifestPath);
|
||||
assetManifest.forEach(function (assetGroup) {
|
||||
resolveAssetGroupPaths(assetGroup, assetManifestPath);
|
||||
assetGroups.push(assetGroup);
|
||||
});
|
||||
});
|
||||
return assetGroups;
|
||||
}
|
||||
|
||||
function resolveAssetGroupPaths(assetGroup, assetManifestPath) {
|
||||
assetGroup.basePath = path.dirname(assetManifestPath);
|
||||
assetGroup.inputPaths = assetGroup.inputs.map(function (inputPath) {
|
||||
return path.join(assetGroup.basePath, inputPath);
|
||||
});
|
||||
assetGroup.outputPath = path.join(assetGroup.basePath, assetGroup.output);
|
||||
assetGroup.outputDir = path.dirname(assetGroup.outputPath);
|
||||
assetGroup.outputFileName = path.basename(assetGroup.output);
|
||||
}
|
||||
|
||||
function createAssetGroupTask(assetGroup) {
|
||||
var outputExt = path.extname(assetGroup.output).toLowerCase();
|
||||
switch (outputExt) {
|
||||
case ".css":
|
||||
return buildCssGroup(assetGroup);
|
||||
case ".js":
|
||||
return buildJsGroup(assetGroup);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** PROCESSING PIPELINES
|
||||
*/
|
||||
|
||||
function buildCssGroup(assetGroup) {
|
||||
return gulp.src(assetGroup.inputPaths)
|
||||
//.pipe(newer(assetGroup.outputPath))
|
||||
.pipe(plumber())
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(gulpif("*.less", less()))
|
||||
.pipe(concat(assetGroup.outputFileName))
|
||||
.pipe(autoprefixer({ browsers: ["last 2 versions"] }))
|
||||
//.pipe(header(
|
||||
// "/*\n" +
|
||||
// "** NOTE: This file is generated by Gulp compilation and should not be edited directly!\n" +
|
||||
// "** Any changes made directly to this file will be overwritten next time the Gulp compilation runs.\n" +
|
||||
// "** For more information, see the Readme.txt file in the Gulp solution folder.\n" +
|
||||
// "*/\n\n"))
|
||||
.pipe(sourcemaps.write())
|
||||
.pipe(gulp.dest(assetGroup.outputDir))
|
||||
.pipe(minify())
|
||||
.pipe(rename({
|
||||
suffix: ".min"
|
||||
}))
|
||||
.pipe(gulp.dest(assetGroup.outputDir));
|
||||
}
|
||||
|
||||
function buildJsGroup(assetGroup) {
|
||||
return gulp.src(assetGroup.inputPaths)
|
||||
//.pipe(newer(assetGroup.outputPath))
|
||||
.pipe(plumber())
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(gulpif("*.ts", typescript({
|
||||
declaration: false,
|
||||
noImplicitAny: true,
|
||||
noEmitOnError: true,
|
||||
sortOutput: true,
|
||||
}).js))
|
||||
.pipe(concat(assetGroup.outputFileName))
|
||||
//.pipe(header(
|
||||
// "/*\n" +
|
||||
// "** NOTE: This file is generated by Gulp compilation and should not be edited directly!\n" +
|
||||
// "** Any changes made directly to this file will be overwritten next time the Gulp compilation runs.\n" +
|
||||
// "** For more information, see the Readme.txt file in the Gulp solution folder.\n" +
|
||||
// "*/\n\n"))
|
||||
.pipe(sourcemaps.write())
|
||||
.pipe(gulp.dest(assetGroup.outputDir))
|
||||
.pipe(uglify())
|
||||
.pipe(rename({
|
||||
suffix: ".min"
|
||||
}))
|
||||
.pipe(gulp.dest(assetGroup.outputDir));
|
||||
}
|
||||
|
||||
// TEST: Errors, startup, VS2013
|
||||
@@ -156,7 +156,7 @@
|
||||
<Compile Include="Helpers\FileSizeFormatProvider.cs" />
|
||||
<Compile Include="Infrastructure\Assets\AssetDriver.cs" />
|
||||
<Compile Include="Helpers\NamespaceHelper.cs" />
|
||||
<Content Include="gulpfile.js" />
|
||||
<None Include="gulpfile.js%24" />
|
||||
<Content Include="Images\Loader1.GIF" />
|
||||
<Content Include="Images\Thumbnail-Placeholder2.png" />
|
||||
<Content Include="Images\Thumbnail-Placeholder1.png" />
|
||||
|
||||
18
src/Orchard.Web/Modules/Orchard.DynamicForms/Assets.json
Normal file
18
src/Orchard.Web/Modules/Orchard.DynamicForms/Assets.json
Normal file
@@ -0,0 +1,18 @@
|
||||
[
|
||||
{
|
||||
"inputs": [ "Assets/JavaScript/Lib/**/*.js" ],
|
||||
"output": "Scripts/Lib.js"
|
||||
},
|
||||
{
|
||||
"inputs": [ "Assets/JavaScript/LayoutEditor/**/*.js", "Assets/TypeScript/TypeScript1.ts" ],
|
||||
"output": "Scripts/LayoutEditor.js"
|
||||
},
|
||||
{
|
||||
"inputs": [ "Assets/CSS/DynamicForms.css", "Assets/Less/StyleSheet1.less" ],
|
||||
"output": "Styles/DynamicForms.css"
|
||||
},
|
||||
{
|
||||
"inputs": [ "Assets/CSS/DynamicForms-Admin.css" ],
|
||||
"output": "Styles/DynamicForms-Admin.css"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,5 @@
|
||||
@somecolor: #b6ff00;
|
||||
|
||||
body {
|
||||
background-color: @somecolor;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
module MyModule {
|
||||
export class MyClass {
|
||||
someMethod() {
|
||||
console.log("Some message");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -79,34 +79,28 @@
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="gulpfile.js" />
|
||||
<None Include="Assets\CSS\DynamicForms-Admin.css" />
|
||||
<None Include="Assets\CSS\DynamicForms.css" />
|
||||
<Content Include="Scripts\LayoutEditor.js" />
|
||||
<Content Include="Scripts\LayoutEditor.min.js" />
|
||||
<Content Include="Scripts\LayoutEditor\Directives\Fieldset.js" />
|
||||
<Content Include="Scripts\LayoutEditor\Directives\Form.js" />
|
||||
<Content Include="Scripts\LayoutEditor\Models\Fieldset.js" />
|
||||
<Content Include="Scripts\LayoutEditor\Models\Form.js" />
|
||||
<None Include="Assets\JavaScript\LayoutEditor\Directives\Fieldset.js" />
|
||||
<None Include="Assets\JavaScript\LayoutEditor\Directives\Form.js" />
|
||||
<None Include="Assets\JavaScript\LayoutEditor\Models\Fieldset.js" />
|
||||
<None Include="Assets\JavaScript\LayoutEditor\Models\Form.js" />
|
||||
<Content Include="Scripts\Lib.js" />
|
||||
<Content Include="Scripts\Lib.min.js" />
|
||||
<Content Include="Scripts\Lib\jquery.validate.js" />
|
||||
<Content Include="Scripts\Lib\jquery.validate.min.js">
|
||||
<DependentUpon>jquery.validate.js</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="Scripts\Lib\jquery.validate.unobtrusive.additional.js" />
|
||||
<Content Include="Scripts\Lib\jquery.validate.unobtrusive.js" />
|
||||
<Content Include="Scripts\Lib\jquery.validate.unobtrusive.min.js">
|
||||
<DependentUpon>jquery.validate.unobtrusive.js</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="Styles\forms-admin.min.css" />
|
||||
<Content Include="Styles\forms.css" />
|
||||
<Content Include="Styles\forms-admin.css" />
|
||||
<Content Include="Styles\forms.min.css" />
|
||||
<None Include="Assets\JavaScript\Lib\jquery.validate.js" />
|
||||
<None Include="Assets\JavaScript\Lib\jquery.validate.unobtrusive.additional.js" />
|
||||
<None Include="Assets\JavaScript\Lib\jquery.validate.unobtrusive.js" />
|
||||
<Content Include="Styles\DynamicForms-Admin.css" />
|
||||
<Content Include="Styles\DynamicForms-Admin.min.css" />
|
||||
<Content Include="Styles\DynamicForms.css" />
|
||||
<Content Include="Styles\DynamicForms.min.css" />
|
||||
<Content Include="Styles\menu.dynamicforms-admin.css" />
|
||||
<Content Include="Styles\menu.dynamicforms-admin.min.css" />
|
||||
<Content Include="Styles\menu.dynamicforms.png" />
|
||||
<Content Include="Styles\workflows-activity-dynamic-form-validating.css" />
|
||||
<Content Include="Styles\workflows-activity-dynamic-form-submitted.css" />
|
||||
<Content Include="Styles\workflows-activity-add-model-error.css" />
|
||||
<Content Include="Styles\workflows-activity-dynamic-form-submitted.css" />
|
||||
<Content Include="Styles\workflows-activity-dynamic-form-validating.css" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Scripts\Web.config" />
|
||||
<Content Include="Styles\Web.config" />
|
||||
@@ -458,16 +452,6 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Elements\ReCaptcha.Design.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Scripts\Lib\jquery.validate.min.js.map">
|
||||
<DependentUpon>jquery.validate.min.js</DependentUpon>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Scripts\Lib\jquery.validate.unobtrusive.min.js.map">
|
||||
<DependentUpon>jquery.validate.unobtrusive.min.js</DependentUpon>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\LayoutEditor.Template.Form.cshtml" />
|
||||
</ItemGroup>
|
||||
@@ -513,20 +497,27 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Views\LayoutEditor.Template.Fieldset.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="package.json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Elements\Button.Design.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Elements\Label.Design.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Assets.json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Assets\Less\StyleSheet1.less" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Assets\TypeScript\TypeScript1.ts" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets')" />
|
||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace Orchard.DynamicForms {
|
||||
public class ResourceManifest : IResourceManifestProvider {
|
||||
public void BuildManifests(ResourceManifestBuilder builder) {
|
||||
var manifest = builder.Add();
|
||||
manifest.DefineStyle("DynamicForms.FormElements").SetUrl("forms-admin.min.css", "forms-admin.css");
|
||||
manifest.DefineStyle("DynamicForms.FormElements").SetUrl("DynamicForms-Admin.min.css", "DynamicForms-Admin.css");
|
||||
manifest.DefineScript("DynamicForms.FormElements").SetUrl("LayoutEditor.min.js", "LayoutEditor.js").SetDependencies("Layouts.LayoutEditor");
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
var LayoutEditor;!function(e,t){t.Fieldset=function(n,i,o,r,l,d,a,c,s,h,m){t.Element.call(this,"Fieldset",n,i,o,r,l),t.Container.call(this,["Grid","Content"],m);var u=this;this.isContainable=!0,this.dropTargetClass="layout-common-holder",this.contentType=a,this.contentTypeLabel=c,this.contentTypeClass=s,this.legend=d||"",this.hasEditor=h,this.toObject=function(){var e=this.elementToObject();return e.legend=this.legend,e.children=this.childrenToObject(),e};var p=this.getEditorObject;this.getEditorObject=function(){var t=p();return e.extend(t,{Legend:this.legend})},this.setChildren=function(e){this.children=e,_(this.children).each(function(e){e.parent=u})},this.applyElementEditorModel=function(e){this.legend=e.legend},this.setChildren(m)},t.Fieldset.from=function(e){return new t.Fieldset(e.data,e.htmlId,e.htmlClass,e.htmlStyle,e.isTemplated,e.legend,e.contentType,e.contentTypeLabel,e.contentTypeClass,e.hasEditor,t.childrenFrom(e.children))},t.registerFactory("Fieldset",function(e){return t.Fieldset.from(e)})}(jQuery,LayoutEditor||(LayoutEditor={}));var LayoutEditor;!function(e,t){t.Form=function(n,i,o,r,l,d,a,c,s,h,m,u){t.Element.call(this,"Form",n,i,o,r,l),t.Container.call(this,["Grid","Content"],u);var p=this;this.isContainable=!0,this.dropTargetClass="layout-common-holder",this.contentType=c,this.contentTypeLabel=s,this.contentTypeClass=h,this.name=d||"Untitled",this.formBindingContentType=a,this.hasEditor=m,this.toObject=function(){var e=this.elementToObject();return e.name=this.name,e.formBindingContentType=this.formBindingContentType,e.children=this.childrenToObject(),e};var f=this.getEditorObject;this.getEditorObject=function(){var t=f();return e.extend(t,{FormName:this.name,FormBindingContentType:this.formBindingContentType})},this.setChildren=function(e){this.children=e,_(this.children).each(function(e){e.setParent(p)})},this.onDescendantAdded=function(t){var n=t.getEditorObject;t.getEditorObject=function(){var t=n();return e.extend(t,{FormBindingContentType:p.formBindingContentType})}},this.applyElementEditorModel=function(e){this.name=e.name,this.formBindingContentType=e.formBindingContentType},this.setChildren(u)},t.Form.from=function(e){return new t.Form(e.data,e.htmlId,e.htmlClass,e.htmlStyle,e.isTemplated,e.name,e.formBindingContentType,e.contentType,e.contentTypeLabel,e.contentTypeClass,e.hasEditor,t.childrenFrom(e.children))},t.registerFactory("Form",function(e){return t.Form.from(e)})}(jQuery,LayoutEditor||(LayoutEditor={})),angular.module("LayoutEditor").directive("orcLayoutFieldset",["$compile","scopeConfigurator","environment",function(e,t,n){return{restrict:"E",scope:{element:"="},controller:["$scope","$element",function(e,n){t.configureForElement(e,n),t.configureForContainer(e,n),e.sortableOptions.axis="y",e.edit=function(){e.$root.editElement(e.element).then(function(t){t.cancel||e.$apply(function(){e.element.data=decodeURIComponent(t.element.data),e.element.applyElementEditorModel(t.elementEditorModel)})})}}],templateUrl:n.templateUrl("Fieldset"),replace:!0}}]),angular.module("LayoutEditor").directive("orcLayoutForm",["$compile","scopeConfigurator","environment",function(e,t,n){return{restrict:"E",scope:{element:"="},controller:["$scope","$element",function(e,n){t.configureForElement(e,n),t.configureForContainer(e,n),e.sortableOptions.axis="y",e.edit=function(){e.$root.editElement(e.element).then(function(t){t.cancel||e.$apply(function(){e.element.data=decodeURIComponent(t.element.data),e.element.applyElementEditorModel(t.elementEditorModel)})})}}],templateUrl:n.templateUrl("Form"),replace:!0}}]);
|
||||
angular.module("LayoutEditor").directive("orcLayoutFieldset",["$compile","scopeConfigurator","environment",function(e,t,n){return{restrict:"E",scope:{element:"="},controller:["$scope","$element",function(e,n){t.configureForElement(e,n),t.configureForContainer(e,n),e.sortableOptions.axis="y",e.edit=function(){e.$root.editElement(e.element).then(function(t){t.cancel||e.$apply(function(){e.element.data=decodeURIComponent(t.element.data),e.element.applyElementEditorModel(t.elementEditorModel)})})}}],templateUrl:n.templateUrl("Fieldset"),replace:!0}}]),angular.module("LayoutEditor").directive("orcLayoutForm",["$compile","scopeConfigurator","environment",function(e,t,n){return{restrict:"E",scope:{element:"="},controller:["$scope","$element",function(e,n){t.configureForElement(e,n),t.configureForContainer(e,n),e.sortableOptions.axis="y",e.edit=function(){e.$root.editElement(e.element).then(function(t){t.cancel||e.$apply(function(){e.element.data=decodeURIComponent(t.element.data),e.element.applyElementEditorModel(t.elementEditorModel)})})}}],templateUrl:n.templateUrl("Form"),replace:!0}}]);var LayoutEditor;!function(e,t){t.Fieldset=function(n,o,i,r,l,d,a,s,c,m,h){t.Element.call(this,"Fieldset",n,o,i,r,l),t.Container.call(this,["Grid","Content"],h);var u=this;this.isContainable=!0,this.dropTargetClass="layout-common-holder",this.contentType=a,this.contentTypeLabel=s,this.contentTypeClass=c,this.legend=d||"",this.hasEditor=m,this.toObject=function(){var e=this.elementToObject();return e.legend=this.legend,e.children=this.childrenToObject(),e};var p=this.getEditorObject;this.getEditorObject=function(){var t=p();return e.extend(t,{Legend:this.legend})},this.setChildren=function(e){this.children=e,_(this.children).each(function(e){e.parent=u})},this.applyElementEditorModel=function(e){this.legend=e.legend},this.setChildren(h)},t.Fieldset.from=function(e){return new t.Fieldset(e.data,e.htmlId,e.htmlClass,e.htmlStyle,e.isTemplated,e.legend,e.contentType,e.contentTypeLabel,e.contentTypeClass,e.hasEditor,t.childrenFrom(e.children))},t.registerFactory("Fieldset",function(e){return t.Fieldset.from(e)})}(jQuery,LayoutEditor||(LayoutEditor={}));var LayoutEditor;!function(e,t){t.Form=function(n,o,i,r,l,d,a,s,c,m,h,u){t.Element.call(this,"Form",n,o,i,r,l),t.Container.call(this,["Grid","Content"],u);var p=this;this.isContainable=!0,this.dropTargetClass="layout-common-holder",this.contentType=s,this.contentTypeLabel=c,this.contentTypeClass=m,this.name=d||"Untitled",this.formBindingContentType=a,this.hasEditor=h,this.toObject=function(){var e=this.elementToObject();return e.name=this.name,e.formBindingContentType=this.formBindingContentType,e.children=this.childrenToObject(),e};var y=this.getEditorObject;this.getEditorObject=function(){var t=y();return e.extend(t,{FormName:this.name,FormBindingContentType:this.formBindingContentType})},this.setChildren=function(e){this.children=e,_(this.children).each(function(e){e.setParent(p)})},this.onDescendantAdded=function(t){var n=t.getEditorObject;t.getEditorObject=function(){var t=n();return e.extend(t,{FormBindingContentType:p.formBindingContentType})}},this.applyElementEditorModel=function(e){this.name=e.name,this.formBindingContentType=e.formBindingContentType},this.setChildren(u)},t.Form.from=function(e){return new t.Form(e.data,e.htmlId,e.htmlClass,e.htmlStyle,e.isTemplated,e.name,e.formBindingContentType,e.contentType,e.contentTypeLabel,e.contentTypeClass,e.hasEditor,t.childrenFrom(e.children))},t.registerFactory("Form",function(e){return t.Form.from(e)})}(jQuery,LayoutEditor||(LayoutEditor={}));var MyModule;!function(e){var t=function(){function e(){}return e.prototype.someMethod=function(){console.log("Some message")},e}();e.MyClass=t}(MyModule||(MyModule={}));
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,12 @@
|
||||
.layout-editor .layout-content > .layout-element-wrapper .layout-content-markup > .form-field-element input[type="text"],
|
||||
.layout-editor .layout-content > .layout-element-wrapper .layout-content-markup > .form-field-element input[type="password"],
|
||||
.layout-editor .layout-content > .layout-element-wrapper .layout-content-markup > .form-field-element input[type="email"],
|
||||
.layout-editor .layout-content > .layout-element-wrapper .layout-content-markup > .form-field-element input[type="tel"],
|
||||
.layout-editor .layout-content > .layout-element-wrapper .layout-content-markup > .form-field-element textarea {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.layout-editor .layout-content > .layout-element-wrapper .layout-content-markup > .form-field-element.form-field-element-enumeration ol {
|
||||
list-style: none;
|
||||
}
|
||||
/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR5bmFtaWNGb3Jtcy1BZG1pbi5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7O0lBS0EsWUFBQTtDQUNBOztBQUVBO0lBQ0EsaUJBQUE7Q0FDQSIsImZpbGUiOiJEeW5hbWljRm9ybXMtQWRtaW4uY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmxheW91dC1lZGl0b3IgLmxheW91dC1jb250ZW50ID4gLmxheW91dC1lbGVtZW50LXdyYXBwZXIgLmxheW91dC1jb250ZW50LW1hcmt1cCA+IC5mb3JtLWZpZWxkLWVsZW1lbnQgaW5wdXRbdHlwZT1cInRleHRcIl0sXHJcbi5sYXlvdXQtZWRpdG9yIC5sYXlvdXQtY29udGVudCA+IC5sYXlvdXQtZWxlbWVudC13cmFwcGVyIC5sYXlvdXQtY29udGVudC1tYXJrdXAgPiAuZm9ybS1maWVsZC1lbGVtZW50IGlucHV0W3R5cGU9XCJwYXNzd29yZFwiXSxcclxuLmxheW91dC1lZGl0b3IgLmxheW91dC1jb250ZW50ID4gLmxheW91dC1lbGVtZW50LXdyYXBwZXIgLmxheW91dC1jb250ZW50LW1hcmt1cCA+IC5mb3JtLWZpZWxkLWVsZW1lbnQgaW5wdXRbdHlwZT1cImVtYWlsXCJdLFxyXG4ubGF5b3V0LWVkaXRvciAubGF5b3V0LWNvbnRlbnQgPiAubGF5b3V0LWVsZW1lbnQtd3JhcHBlciAubGF5b3V0LWNvbnRlbnQtbWFya3VwID4gLmZvcm0tZmllbGQtZWxlbWVudCBpbnB1dFt0eXBlPVwidGVsXCJdLFxyXG4ubGF5b3V0LWVkaXRvciAubGF5b3V0LWNvbnRlbnQgPiAubGF5b3V0LWVsZW1lbnQtd3JhcHBlciAubGF5b3V0LWNvbnRlbnQtbWFya3VwID4gLmZvcm0tZmllbGQtZWxlbWVudCB0ZXh0YXJlYSB7XHJcbiAgICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxuLmxheW91dC1lZGl0b3IgLmxheW91dC1jb250ZW50ID4gLmxheW91dC1lbGVtZW50LXdyYXBwZXIgLmxheW91dC1jb250ZW50LW1hcmt1cCA+IC5mb3JtLWZpZWxkLWVsZW1lbnQuZm9ybS1maWVsZC1lbGVtZW50LWVudW1lcmF0aW9uIG9sIHtcclxuICAgIGxpc3Qtc3R5bGU6IG5vbmU7XHJcbn0iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0= */
|
||||
@@ -0,0 +1,30 @@
|
||||
/* Forms
|
||||
***************************************************************/
|
||||
.dynamic-form input[type='text'],
|
||||
.dynamic-form input.text,
|
||||
.dynamic-form textarea.text {
|
||||
width: 99%;
|
||||
line-height: 1.5em;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
|
||||
/* Validation
|
||||
***************************************************************/
|
||||
.input-validation-error, input.text.input-validation-error {
|
||||
border:1px solid #990808;
|
||||
}
|
||||
|
||||
.field-validation-error {
|
||||
color: #990808;
|
||||
}
|
||||
|
||||
/* Elements
|
||||
***************************************************************/
|
||||
.form-field-element {
|
||||
margin: 0.8em 0 0 0;
|
||||
}
|
||||
body {
|
||||
background-color: #b6ff00;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR5bmFtaWNGb3Jtcy5jc3MiLCJTdHlsZVNoZWV0MS5sZXNzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO2dFQUNBO0FBQ0E7OztJQUdBLFdBQUE7SUFDQSxtQkFBQTtJQUNBLHFCQUFBO0NBQ0E7O0FBRUE7Z0VBQ0E7QUFDQTtLQUNBLHlCQUFBO0NBQ0E7O0FBRUE7S0FDQSxlQUFBO0NBQ0E7O0FBRUE7Z0VBQ0E7QUFDQTtJQUNBLG9CQUFBO0NBQ0E7QUN0QkE7RUFDSSwwQkFBQTtDRHdCSCIsImZpbGUiOiJEeW5hbWljRm9ybXMuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLyogRm9ybXNcbioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbi5keW5hbWljLWZvcm0gaW5wdXRbdHlwZT0ndGV4dCddLFxuLmR5bmFtaWMtZm9ybSBpbnB1dC50ZXh0LFxuLmR5bmFtaWMtZm9ybSB0ZXh0YXJlYS50ZXh0IHtcbiAgICB3aWR0aDogOTklO1xuICAgIGxpbmUtaGVpZ2h0OiAxLjVlbTtcbiAgICBtYXJnaW4tYm90dG9tOiAwLjhlbTtcbn1cblxuLyogVmFsaWRhdGlvblxuKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuLmlucHV0LXZhbGlkYXRpb24tZXJyb3IsIGlucHV0LnRleHQuaW5wdXQtdmFsaWRhdGlvbi1lcnJvciB7XG4gICAgIGJvcmRlcjoxcHggc29saWQgIzk5MDgwODtcbn1cblxuLmZpZWxkLXZhbGlkYXRpb24tZXJyb3Ige1xuICAgICBjb2xvcjogIzk5MDgwODtcbn1cblxuLyogRWxlbWVudHNcbioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbi5mb3JtLWZpZWxkLWVsZW1lbnQge1xuICAgIG1hcmdpbjogMC44ZW0gMCAwIDA7XG59IiwiQHNvbWVjb2xvcjogI2I2ZmYwMDtcclxuXHJcbmJvZHkge1xyXG4gICAgYmFja2dyb3VuZC1jb2xvcjogQHNvbWVjb2xvcjtcclxufVxyXG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0= */
|
||||
@@ -1 +1 @@
|
||||
.dynamic-form input.text,.dynamic-form input[type=text],.dynamic-form textarea.text{width:99%;line-height:1.5em;margin-bottom:.8em}.input-validation-error,input.text.input-validation-error{border:1px solid #990808}.field-validation-error{color:#990808}.form-field-element{margin:.8em 0 0}
|
||||
.dynamic-form input.text,.dynamic-form input[type=text],.dynamic-form textarea.text{width:99%;line-height:1.5em;margin-bottom:.8em}.input-validation-error,input.text.input-validation-error{border:1px solid #990808}.field-validation-error{color:#990808}.form-field-element{margin:.8em 0 0}body{background-color:#b6ff00}
|
||||
@@ -1 +0,0 @@
|
||||
.navicon-form-submissions{background-image:url(menu.dynamicforms.png)!important}.navicon-form-submissions:hover{background-position:0 -30px!important}
|
||||
@@ -2,7 +2,7 @@
|
||||
@using Orchard.DynamicForms.Elements
|
||||
@using Orchard.Layouts.Helpers
|
||||
@{
|
||||
Style.Include("forms.css", "forms.min.css");
|
||||
Style.Include("DynamicForms.css", "DynamicForms.min.css");
|
||||
}
|
||||
@{
|
||||
var contentItem = (ContentItem) Model.ContentItem;
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
/// <binding BeforeBuild='build' ProjectOpened='watch' />
|
||||
|
||||
/*
|
||||
* This gulpfile provides an automated build pipeline for client-side assets in this project.
|
||||
*
|
||||
* To use this file you will need to:
|
||||
* - Install Node.js on your machine
|
||||
* - Run "npm install" in this folder (either via command line or a Visual Studio extension) to install dependency packages from package.json
|
||||
*
|
||||
* NOTE: If you install the Task Runner Explorer extension in Visual Studio the tasks in this
|
||||
* gulpfile will execute automatically on VS events for a more integrated/automated workflow. That's the
|
||||
* purpose of the <binding> comment element at the top.
|
||||
*/
|
||||
|
||||
var gulp = require("gulp"),
|
||||
newer = require("gulp-newer"),
|
||||
minify = require("gulp-minify-css"),
|
||||
uglify = require("gulp-uglify"),
|
||||
rename = require("gulp-rename"),
|
||||
concat = require("gulp-concat"),
|
||||
sourcemaps = require("gulp-sourcemaps"),
|
||||
merge = require("merge-stream");
|
||||
|
||||
/*
|
||||
* General tasks.
|
||||
*/
|
||||
|
||||
gulp.task("build", ["buildCss", "buildJs"], function () {
|
||||
});
|
||||
|
||||
gulp.task("watch", ["watchCss", "watchJs"], function () {
|
||||
});
|
||||
|
||||
/*
|
||||
* LESS/CSS compilation tasks.
|
||||
*/
|
||||
|
||||
var srcCss = [
|
||||
"Styles/forms-admin.css",
|
||||
"Styles/forms.css",
|
||||
"Styles/menu.dynamicforms-admin.css"
|
||||
];
|
||||
|
||||
gulp.task("buildCss", function () {
|
||||
return gulp.src(srcCss)
|
||||
.pipe(minify())
|
||||
.pipe(rename({
|
||||
suffix: ".min"
|
||||
}))
|
||||
.pipe(gulp.dest("Styles"));
|
||||
});
|
||||
|
||||
gulp.task("watchCss", function () {
|
||||
var watcher = gulp.watch(srcCss, ["buildCss"]);
|
||||
watcher.on("change", function (event) {
|
||||
console.log("CSS file " + event.path + " was " + event.type + ", running the 'buildCss' task...");
|
||||
});
|
||||
});
|
||||
|
||||
/*
|
||||
* JavaScript compilation tasks.
|
||||
*/
|
||||
|
||||
var srcJsLib = [
|
||||
"Scripts/Lib/jquery.validate.js",
|
||||
"Scripts/Lib/jquery.validate.unobtrusive.js",
|
||||
"Scripts/Lib/jquery.validate.unobtrusive.additional.js"
|
||||
];
|
||||
|
||||
var srcJsLayoutEditor = [
|
||||
"Scripts/LayoutEditor/Models/*.js",
|
||||
"Scripts/LayoutEditor/Directives/*.js"
|
||||
];
|
||||
|
||||
gulp.task("buildJs", function () {
|
||||
return merge([
|
||||
jsPipelineFrom(gulp.src(srcJsLib), "Scripts", "Lib.js"),
|
||||
jsPipelineFrom(gulp.src(srcJsLayoutEditor), "Scripts", "LayoutEditor.js")
|
||||
]);
|
||||
});
|
||||
|
||||
gulp.task("watchJs", function () {
|
||||
var watcher = gulp.watch([srcJsLib, srcJsLayoutEditor], ["buildJs"]);
|
||||
watcher.on("change", function (event) {
|
||||
console.log("JavaScript file " + event.path + " was " + event.type + ", running the 'buildJs' task...");
|
||||
});
|
||||
});
|
||||
|
||||
function jsPipelineFrom(inputStream, outputFolder, outputFile) {
|
||||
return inputStream
|
||||
.pipe(newer(outputFolder + "/" + outputFile))
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(concat(outputFile))
|
||||
.pipe(sourcemaps.write())
|
||||
.pipe(gulp.dest(outputFolder))
|
||||
.pipe(uglify())
|
||||
.pipe(rename({
|
||||
suffix: ".min"
|
||||
}))
|
||||
.pipe(gulp.dest(outputFolder));
|
||||
}
|
||||
@@ -80,7 +80,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Default.html" />
|
||||
<Content Include="gulpfile.js" />
|
||||
<None Include="gulpfile.js%24" />
|
||||
<Content Include="Images\azure.png" />
|
||||
<Content Include="Images\illustration.jpg" />
|
||||
<Content Include="Images\logo.svg" />
|
||||
@@ -524,7 +524,7 @@
|
||||
<Content Include="Views\Elements\Projection.Design.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="package.json" />
|
||||
<None Include="package.json%24" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Styles\Lib\FontAwesome\animated.less" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.31101.0
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}"
|
||||
EndProject
|
||||
@@ -261,6 +261,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
||||
WebEssentials-Settings.json = WebEssentials-Settings.json
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Gulp", "Gulp", "{90EBEE36-B5CD-42A8-A21B-76270E2C5D24}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
Gulpfile.js = Gulpfile.js
|
||||
Package.json = Package.json
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
CodeCoverage|Any CPU = CodeCoverage|Any CPU
|
||||
@@ -1146,5 +1152,6 @@ Global
|
||||
{2C5EB8B3-A313-413D-BAA0-5C21D2A6EC6E} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{6BD8B2FA-F2E3-4AC8-A4C3-2925A653889A} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{82190F52-2901-46D6-8A4C-34649959483F} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{90EBEE36-B5CD-42A8-A21B-76270E2C5D24} = {DF3909B0-1DDD-4D8A-9919-56FC438E25E2}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@@ -271,8 +271,8 @@ namespace Orchard.Data.Migration.Interpreters {
|
||||
var builder = new StringBuilder();
|
||||
|
||||
builder.Append("alter table ")
|
||||
+ .Append(_dialectLazy.Value.QuoteForTableName(PrefixTableName(command.SrcTable)))
|
||||
+ .Append(_dialectLazy.Value.GetDropForeignKeyConstraintString(PrefixTableName(command.Name)));
|
||||
.Append(_dialectLazy.Value.QuoteForTableName(PrefixTableName(command.SrcTable)))
|
||||
.Append(_dialectLazy.Value.GetDropForeignKeyConstraintString(PrefixTableName(command.Name)));
|
||||
_sqlStatements.Add(builder.ToString());
|
||||
|
||||
RunPendingStatements();
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"glob": "^5.0.14",
|
||||
"path-posix": "^1.0.0",
|
||||
"merge-stream": "^0.1.8",
|
||||
"gulp-if": "^1.2.5",
|
||||
"gulp": "^3.8.11",
|
||||
"gulp-newer": "^0.5.0",
|
||||
"gulp-plumber": "^1.0.0",
|
||||
"gulp-sourcemaps": "^1.5.2",
|
||||
"gulp-less": "^3.0.3",
|
||||
"gulp-autoprefixer": "^2.2.0",
|
||||
"gulp-minify-css": "^1.1.1",
|
||||
"gulp-typescript": "^2.8.0",
|
||||
"gulp-uglify": "^1.2.0",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-concat": "^2.5.2",
|
||||
"merge-stream": "^0.1.7",
|
||||
"del": "^1.1.1"
|
||||
"gulp-header": "^1.2.2"
|
||||
},
|
||||
"dependencies": { }
|
||||
}
|
||||
Reference in New Issue
Block a user