Skip to content

Commit

Permalink
Added OE_WildfireRiskLegend module
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Rempel committed Jul 6, 2022
1 parent fee2bea commit 18060e3
Show file tree
Hide file tree
Showing 24 changed files with 446 additions and 53 deletions.
46 changes: 42 additions & 4 deletions AMD_Modules/AMD_Modules.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props')" />
<Import Project="..\packages\Microsoft.TypeScript.MSBuild.4.6.4\build\Microsoft.TypeScript.MSBuild.props" Condition="Exists('..\packages\Microsoft.TypeScript.MSBuild.4.6.4\build\Microsoft.TypeScript.MSBuild.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<ProjectGuid>{F1A10E10-48FF-47E3-8E58-E66700C01CC0}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<OutputPath>bin</OutputPath>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
Expand All @@ -18,7 +18,9 @@
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<Use64BitIISExpress />
<TypeScriptToolsVersion>3.7</TypeScriptToolsVersion>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<ItemGroup>
<Service Include="{4A0DDDB5-7A95-4FBF-97CC-616D07737A77}" />
Expand Down Expand Up @@ -103,6 +105,12 @@
<Content Include="src\OE_SearchToWorkflow\OE_SearchToWorkflowView.html" />
<Content Include="src\OE_ShowHideMeasurementLabels\README.txt" />
<Content Include="src\OE_Utility\readme.txt" />
<Content Include="src\OE_WildfireRiskLegend\CSS\OE_WildfireRiskLegendModule.css" />
<Content Include="src\OE_WildfireRiskLegend\OE_WildfireRiskLegendModule.js" />
<Content Include="src\OE_WildfireRiskLegend\OE_WildfireRiskLegendView.html" />
<Content Include="src\OE_WildfireRiskLegend\OE_WildfireRiskLegendView.js" />
<Content Include="src\OE_WildfireRiskLegend\OE_WildfireRiskLegendViewModel.js" />
<Content Include="src\OE_WildfireRiskLegend\readme.txt" />
<Content Include="src\OE_Wildfire\Language.json" />
<Content Include="src\OE_SageGrouseDevSiting\Language.json" />
<Content Include="src\OE_SageGrouseConsPln\Language.json" />
Expand Down Expand Up @@ -135,11 +143,23 @@
<Content Include="src\OE_ConvertGeometry\Language.json" />
<Content Include="src\OE_Aquaculture\Language.json" />
<Content Include="src\OE_Hopscotch\Language.json" />
<None Include="packages.config" />
<None Include="src\OE_Aquaculture\CSS\calcite.dijit.css.old" />
<None Include="src\OE_Aquaculture\CSS\calcite.esri.css.old" />
<Content Include="src\OE_Imagery\Language.json" />
<Content Include="src\OE_WildfireRiskLegend\Language.json" />
<Content Include="src\OE_WildfireRiskLegend\OE_WildfireRiskLegendModule.js.map" />
<Content Include="src\OE_WildfireRiskLegend\OE_WildfireRiskLegendView.js.map" />
<Content Include="src\OE_WildfireRiskLegend\OE_WildfireRiskLegendViewModel.js.map" />
<None Include="src\Template\Language.json" />
<None Include="src\Template\TemplateView.html" />
<Content Include="web.config" />
<None Include="web.Debug.config">
<DependentUpon>web.config</DependentUpon>
</None>
<None Include="web.Release.config">
<DependentUpon>web.config</DependentUpon>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="src\OE_ConvertGeometry\OE_ConvertGeometryModule.ts" />
Expand Down Expand Up @@ -186,6 +206,9 @@
<TypeScriptCompile Include="src\OE_Search\OE_SearchProvider.ts" />
<Content Include="src\OE_ShowHideMeasurementLabels\OE_ShowHideMeasurementLabelsModule.ts" />
<TypeScriptCompile Include="src\OE_Utility\OE_UtilityModule.ts" />
<TypeScriptCompile Include="src\OE_WildfireRiskLegend\OE_WildfireRiskLegendModule.ts" />
<TypeScriptCompile Include="src\OE_WildfireRiskLegend\OE_WildfireRiskLegendView.ts" />
<TypeScriptCompile Include="src\OE_WildfireRiskLegend\OE_WildfireRiskLegendViewModel.ts" />
<TypeScriptCompile Include="src\OE_Wildfire\OE_WildfireModule.ts" />
<TypeScriptCompile Include="src\OE_Wildfire\OE_Wildfire_DynamicFormViewModel.ts" />
<TypeScriptCompile Include="src\OE_Wildfire\OE_Wildfire_DynamicFormView.ts" />
Expand Down Expand Up @@ -213,6 +236,14 @@
<ItemGroup>
<Folder Include="src\OE_Search\CSS\" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">12.0</VisualStudioVersion>
</PropertyGroup>
Expand Down Expand Up @@ -260,7 +291,6 @@
<TypeScriptRemoveComments>true</TypeScriptRemoveComments>
<TypeScriptSourceMap>false</TypeScriptSourceMap>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets')" />
<PropertyGroup>
<PostBuildEvent>call cd "$(SolutionDir)AMD_Modules"
call "$(SolutionDir)AMD_Modules\post_build_modules.bat"</PostBuildEvent>
Expand All @@ -269,4 +299,12 @@ call "$(SolutionDir)AMD_Modules\post_build_modules.bat"</PostBuildEvent>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.TypeScript.MSBuild.4.6.4\build\Microsoft.TypeScript.MSBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.TypeScript.MSBuild.4.6.4\build\Microsoft.TypeScript.MSBuild.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.TypeScript.MSBuild.4.6.4\build\Microsoft.TypeScript.MSBuild.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.TypeScript.MSBuild.4.6.4\build\Microsoft.TypeScript.MSBuild.targets'))" />
</Target>
<Import Project="..\packages\Microsoft.TypeScript.MSBuild.4.6.4\build\Microsoft.TypeScript.MSBuild.targets" Condition="Exists('..\packages\Microsoft.TypeScript.MSBuild.4.6.4\build\Microsoft.TypeScript.MSBuild.targets')" />
</Project>
63 changes: 35 additions & 28 deletions AMD_Modules/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions AMD_Modules/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.TypeScript.MSBuild" version="4.6.4" targetFramework="net48" developmentDependency="true" />
</packages>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
.region .view.TemplateModuleView.active {
margin: 0;
}*/

.wildfire-legend-view {
position: absolute;
z-index: 100;
width: 80px;
right: 3px;
background: white;
color: black;
padding: 6px;
border: 1px solid #333;
margin-top: 75px;
margin-right: 2px;
}

.wildfire-legend-view:hover {
cursor: pointer;
}

@media only screen and (max-width: 600px) {
.wildfire-legend-view {
margin-top: 3px;
}
}
4 changes: 4 additions & 0 deletions AMD_Modules/src/OE_WildfireRiskLegend/Language.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"language-hello-world-greeting": "Hello, world.",
"language-hello-world-initialized": "Hello world! Template module initialized."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
exports.__esModule = true;
/// <reference path="./../../_Definitions/Essentials.AMD.d.ts" />
/// <reference path="./../../_Definitions/Framework.AMD.d.ts" />
/// <reference path="./../../_Definitions/Framework.UI.AMD.d.ts" />
/// <reference path="./../../_Definitions/Mapping.Infrastructure.AMD.d.ts" />
var ModuleBase_1 = require("geocortex/framework/application/ModuleBase");
var OE_WildfireRiskLegendModule = /** @class */ (function (_super) {
__extends(OE_WildfireRiskLegendModule, _super);
function OE_WildfireRiskLegendModule(app, lib) {
return _super.call(this, app, lib) || this;
}
OE_WildfireRiskLegendModule.prototype.initialize = function (config) {
alert(this.app.getResource(this.libraryId, "language-hello-world-initialized"));
};
return OE_WildfireRiskLegendModule;
}(ModuleBase_1.ModuleBase));
exports.OE_WildfireRiskLegendModule = OE_WildfireRiskLegendModule;

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/// <reference path="./../../_Definitions/Essentials.AMD.d.ts" />
/// <reference path="./../../_Definitions/Framework.AMD.d.ts" />
/// <reference path="./../../_Definitions/Framework.UI.AMD.d.ts" />
/// <reference path="./../../_Definitions/Mapping.Infrastructure.AMD.d.ts" />
import { ModuleBase } from "geocortex/framework/application/ModuleBase";
import { ViewerApplication } from "geocortex/infrastructure/Viewer";

export class OE_WildfireRiskLegendModule extends ModuleBase {

app: ViewerApplication;

constructor(app: ViewerApplication, lib: string) {
super(app, lib);
}

initialize(config: any): void {
//alert(this.app.getResource(this.libraryId, "language-hello-world-initialized"));
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div data-binding="{@event-onclick:toggleWildfireLegend}" class="wildfire-legend-view" title="Toggle Wildfire Risk Classification Legend">
<h4>Wildfire Risk</h4>
<div data-binding="{@visible:showLegend}">
<hr />
<img src="https://tools.oregonexplorer.info/OE_HtmlViewer/Resources/Images/Custom/wildfire2022_risk_legend.png" alt="Wildfire Risk Legend" />
</div>
</div>
32 changes: 32 additions & 0 deletions AMD_Modules/src/OE_WildfireRiskLegend/OE_WildfireRiskLegendView.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions AMD_Modules/src/OE_WildfireRiskLegend/OE_WildfireRiskLegendView.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/// <reference path="./../../_Definitions/Essentials.AMD.d.ts" />
/// <reference path="./../../_Definitions/Framework.AMD.d.ts" />
/// <reference path="./../../_Definitions/Framework.UI.AMD.d.ts" />
/// <reference path="./../../_Definitions/Mapping.Infrastructure.AMD.d.ts" />
import { ViewBase } from "geocortex/framework/ui/ViewBase";
import { ViewerApplication } from "geocortex/infrastructure/Viewer";
import { OE_WildfireRiskLegendViewModel } from './OE_WildfireRiskLegendViewModel';

export class OE_WildfireRiskLegendView extends ViewBase {

app: ViewerApplication;
viewModel: OE_WildfireRiskLegendViewModel;

constructor(app: ViewerApplication, lib: string) {
super(app, lib);
}

toggleWildfireLegend = function (_event: any, _element: any, _context: any) {
console.log('toggling!', this.viewModel);
this.viewModel.showLegend.set(!this.viewModel.showLegend.get());
return true;
};
}
Loading

0 comments on commit 18060e3

Please sign in to comment.