Commit a8329a1c authored by Caitlin Dickinson's avatar Caitlin Dickinson
Browse files

Initial Commit

parents
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/JavaScriptWorkingGroup.iml" filepath="$PROJECT_DIR$/.idea/JavaScriptWorkingGroup.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="48d96818-eb35-42f7-b915-7526a88d4402" name="Default Changelist" comment="" />
<ignored path="$PROJECT_DIR$/.tmp/" />
<ignored path="$PROJECT_DIR$/temp/" />
<ignored path="$PROJECT_DIR$/tmp/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FUSProjectUsageTrigger">
<session id="781527946">
<usages-collector id="statistics.lifecycle.project">
<counts>
<entry key="project.closed" value="1" />
<entry key="project.open.time.2" value="1" />
<entry key="project.opened" value="1" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.open">
<counts>
<entry key="css" value="1" />
<entry key="html" value="9" />
<entry key="js" value="2" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.open">
<counts>
<entry key="CSS" value="1" />
<entry key="HTML" value="9" />
<entry key="JavaScript" value="2" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.edit">
<counts>
<entry key="css" value="14" />
<entry key="html" value="1279" />
<entry key="js" value="627" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.edit">
<counts>
<entry key="CSS" value="14" />
<entry key="HTML" value="1279" />
<entry key="JavaScript" value="627" />
</counts>
</usages-collector>
</session>
</component>
<component name="FileEditorManager">
<leaf>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/composite_views.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-7">
<caret line="149" column="29" selection-start-line="149" selection-start-column="29" selection-end-line="149" selection-end-column="29" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/test2.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="450">
<caret line="146" selection-start-line="146" selection-end-line="146" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/test3.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="183">
<caret line="162" selection-start-line="162" selection-end-line="184" selection-end-column="19" />
<folding>
<element signature="e#2166#2237#0" />
<element signature="e#2306#2330#0" />
<element signature="e#2433#2496#0" />
<element signature="e#2508#2533#0" />
<element signature="e#2637#2774#0" />
<element signature="e#2922#3084#0" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/sharedAir.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="6" column="1" lean-forward="true" selection-start-line="6" selection-start-column="1" selection-end-line="6" selection-end-column="1" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/sharedAir.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="435">
<caret line="29" column="7" lean-forward="true" selection-start-line="29" selection-start-column="7" selection-end-line="29" selection-end-column="7" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/sharedAir.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150">
<caret line="10" column="14" lean-forward="true" selection-start-line="10" selection-start-column="14" selection-end-line="10" selection-end-column="14" />
<folding>
<element signature="e#941#965#0" />
<element signature="e#1072#1141#0" />
<element signature="e#1155#1180#0" />
<element signature="e#1288#1439#0" />
<element signature="e#1591#1767#0" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/scratch.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150">
<caret line="10" column="16" lean-forward="true" selection-start-line="10" selection-start-column="16" selection-end-line="10" selection-end-column="16" />
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/sandbox_example.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="270">
<caret line="18" column="5" lean-forward="true" selection-start-line="13" selection-start-column="4" selection-end-line="18" selection-end-column="5" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/index.html">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret selection-end-line="205" />
<folding>
<element signature="e#2166#2237#0" />
<element signature="e#2306#2330#0" />
<element signature="e#2433#2496#0" />
<element signature="e#2508#2533#0" />
<element signature="e#2637#2774#0" />
<element signature="e#2922#3084#0" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="CSS File" />
<option value="HTML File" />
<option value="JavaScript File" />
</list>
</option>
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>mainView</find>
<find>highlight</find>
</findStrings>
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/index.html" />
<option value="$PROJECT_DIR$/composite_views.html" />
<option value="$PROJECT_DIR$/composite.html" />
<option value="$PROJECT_DIR$/test.html" />
<option value="$PROJECT_DIR$/test2.html" />
<option value="$PROJECT_DIR$/test3.html" />
<option value="$PROJECT_DIR$/sandbox_example.html" />
<option value="$PROJECT_DIR$/sharedAir.js" />
<option value="$PROJECT_DIR$/sharedAir.html" />
<option value="$PROJECT_DIR$/sharedAir.css" />
<option value="$PROJECT_DIR$/scratch.js" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="9" />
<option name="y" value="52" />
<option name="width" value="1416" />
<option name="height" value="1010" />
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="JavaScriptWorkingGroup" type="b2602c69:ProjectViewProjectNode" />
<item name="JavaScriptWorkingGroup" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="DefaultHtmlFileTemplate" value="HTML File" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="list.type.of.created.stylesheet" value="CSS" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="settings.editor.selected.configurable" value="preferences.sourceCode.HTML" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$" />
</key>
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="48d96818-eb35-42f7-b915-7526a88d4402" name="Default Changelist" comment="" />
<created>1584563621435</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1584563621435</updated>
<workItem from="1584563623596" duration="10821000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="10821000" />
</component>
<component name="ToolWindowManager">
<frame x="9" y="52" width="1416" height="1010" extended-state="0" />
<layout>
<window_info id="Favorites" side_tool="true" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.29677418" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Docker" show_stripe_button="false" />
<window_info anchor="bottom" id="Version Control" show_stripe_button="false" />
<window_info anchor="bottom" id="Terminal" />
<window_info anchor="bottom" id="Event Log" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/composite.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="276">
<caret line="145" selection-start-line="145" selection-end-line="145" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="336">
<caret line="145" column="12" selection-start-line="145" selection-start-column="12" selection-end-line="145" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test2.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="450">
<caret line="146" selection-start-line="146" selection-end-line="146" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/index.html">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret selection-end-line="205" />
<folding>
<element signature="e#2166#2237#0" />
<element signature="e#2306#2330#0" />
<element signature="e#2433#2496#0" />
<element signature="e#2508#2533#0" />
<element signature="e#2637#2774#0" />
<element signature="e#2922#3084#0" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test3.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="183">
<caret line="162" selection-start-line="162" selection-end-line="184" selection-end-column="19" />
<folding>
<element signature="e#2166#2237#0" />
<element signature="e#2306#2330#0" />
<element signature="e#2433#2496#0" />
<element signature="e#2508#2533#0" />
<element signature="e#2637#2774#0" />
<element signature="e#2922#3084#0" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/composite_views.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-7">
<caret line="149" column="29" selection-start-line="149" selection-start-column="29" selection-end-line="149" selection-end-column="29" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/sandbox_example.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="270">
<caret line="18" column="5" lean-forward="true" selection-start-line="13" selection-start-column="4" selection-end-line="18" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scratch.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150">
<caret line="10" column="16" lean-forward="true" selection-start-line="10" selection-start-column="16" selection-end-line="10" selection-end-column="16" />
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/sharedAir.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="6" column="1" lean-forward="true" selection-start-line="6" selection-start-column="1" selection-end-line="6" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/sharedAir.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="435">
<caret line="29" column="7" lean-forward="true" selection-start-line="29" selection-start-column="7" selection-end-line="29" selection-end-column="7" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/sharedAir.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150">
<caret line="10" column="14" lean-forward="true" selection-start-line="10" selection-start-column="14" selection-end-line="10" selection-end-column="14" />
<folding>
<element signature="e#941#965#0" />
<element signature="e#1072#1141#0" />
<element signature="e#1155#1180#0" />
<element signature="e#1288#1439#0" />
<element signature="e#1591#1767#0" />
</folding>
</state>
</provider>
</entry>
</component>
</project>
\ No newline at end of file
html,
body {
padding: 0px;
margin: 0px;
height: 100%;
width: 100%;
}
.action {
color: blue;
cursor: pointer;
text-decoration: underline;
}
#anonymous-view {
display: block;
position: absolute;
left: 50%;
transform: translate(-50%, 0);
padding: 10px;
margin: 0px;
height: 100%;
width: 100%;
text-align: center;
}
#authenticated-view {
display: none;
padding: 0px;
margin: 0px;
height: 100%;
width: 100%;
}
#title-view {
position: absolute;
padding: 10px;
left: 50%;
transform: translate(-50%, 0);
background-color: white;
opacity: 0.6;
z-index: 2;
}
#username {
font-weight: bold;
}
#mainViewDiv {
position: relative;
z-index: 1;
padding: 0px;
margin: 0px;
height: 100%;
width: 100%;
}
#akViewDiv {
padding: 0;
margin: 0;
height: 255px;
width: 300px;
background-color: rgba(255,255,255,0.8)
}
#hiViewDiv {
padding: 0;
margin: 0;
height: 135px;
width: 200px;
background-color: rgba(255,255,255,0.8)
}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>SharedAir</title>
<link rel="stylesheet" href="sharedAir.css">
<link rel="stylesheet" href="https://js.arcgis.com/4.14/esri/themes/light/main.css" />
<script src="https://js.arcgis.com/4.14/"></script>
<script src="sharedAir.js"></script>
</head>
<body>
<div id="anonymous-view">
<span id="sign-in" class="action">Sign In</span>
</div>
<div id="authenticated-view">
<div id="title-view">
<span id="username"></span>&nbsp;&nbsp;-&nbsp;
<span id="sign-out" class="action">Sign Out</span>
</div>
<div id="mainViewDiv"></div>
<div id="akViewDiv" class="esri-widget"></div>
<div id="hiViewDiv" class="esri-widget"></div>
</div>
</div>
</body>
</html>
\ No newline at end of file
require([
"esri/portal/Portal",
"esri/identity/OAuthInfo",
"esri/identity/IdentityManager",
"esri/Map",
"esri/views/MapView",
"esri/layers/FeatureLayer",
"dojo/dom-style",
"dojo/dom-attr",
"dojo/on",
"dojo/dom"
], function(
Portal,
OAuthInfo,
identityManager,
Map,
MapView,
FeatureLayer,
domStyle,
domAttr,
on,
dom
) {
// Set Portal URL.
const portalUrl = "https://umich.maps.arcgis.com/sharing"
// Set App ID for the ArcGIS Online item associated with this app.
// Each user will need their own app ID
const oAuthInfo = new OAuthInfo({
appId: 'hxlrAtw9pmxp6sCi',
popup: false
});
identityManager.registerOAuthInfos([oAuthInfo]);
// Process login action.
// Listen for clicks on the sign-in link
on(dom.byId("sign-in"), "click", function() {
identityManager.getCredential(portalUrl);
});
// Process logout action.
// Listen for clicks on the sign-out link
on(dom.byId("sign-out"), "click", function() {
identityManager.destroyCredentials();
// Reset page to initial state.
window.location.reload();
});
// When login is successful, swap div in view and display content.
identityManager.checkSignInStatus(portalUrl).then(function() {
dom.byId('anonymous-view').style.display = 'none';
dom.byId('authenticated-view').style.display = 'block'
displayView();
});
// Display content.
function displayView() {
const portal = new Portal();
// Once the portal has loaded successfully, then the user is signed in.
portal.load().then(function() {
console.log("start")
// Display username of logged in user.
dom.byId("username").innerHTML = portal.user.username;
// Popup template for Yale state level data.
const popupTemplate = {
title:"{GeoType}: {NAME}",
content: [
{
type:"fields",
fieldInfos: [