Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeTschudi committed Oct 19, 2015
2 parents 7a4348a + 9264b42 commit 043fc84
Show file tree
Hide file tree
Showing 24 changed files with 1,195 additions and 885 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ __*

# AGOL only
readme.html

# Compiled
*.pyc
1 change: 1 addition & 0 deletions .idea/inspectionProfiles/Project_Default.xml

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

56 changes: 27 additions & 29 deletions .idea/workspace.xml

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

Binary file modified PhotoSurvey.tbx
Binary file not shown.
67 changes: 67 additions & 0 deletions Survey Configurations/DamageAssessmentSurvey.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
[DOMAINS]

Domain1 = YesNoMaybe
Domain2 = StructureDamage
Domain3 = ResComm
Domain4 = RoadDamage
Domain5 =

[DOMAIN_VALUES]

Domain1 = {"Yes": "Yes", "No": "No", "Maybe": "Maybe"}
Domain2 = {"Destroyed": "Destroyed", "Major": "Major", "Minor": "Minor", "Affected": "Affected", "N/A": "N/A"}
Domain3 = {"Residential": "Residential", "Commercial": "Commercial", "N/A": "N/A"}
Domain4 = {"Passable": "Passable", "Partially blocked": "Partially blocked", "Not passable": "Not passable"}
Domain5 =

[FIELDS]

Field1 = STRUCTDMG
Field2 = STRUCTDMGEXT
Field3 = RESCOM
Field4 = ROADDMG
Field5 = ROADDMGEXT
Field6 = SPECIAL
Field7 =
Field8 =
Field9 =
Field10 =

[FIELDS_ALIAS]

Field1 = Structure Damage
Field2 = Structure Damage Extent
Field3 = Residential-Commercial
Field4 = Road Damage
Field5 = Road Damage Extent
Field6 = Special Concerns
Field7 =
Field8 =
Field9 =
Field10 =

[FIELD_DOMAIN]

Field1 = YesNoMaybe
Field2 = StructureDamage
Field3 = ResComm
Field4 = YesNoMaybe
Field5 = RoadDamage
Field6 = YesNoMaybe
Field7 =
Field8 =
Field9 =
Field10 =

[VALUE_REQUIRED]

Field1 = NON_NULLABLE
Field2 = NULLABLE
Field3 = NULLABLE
Field4 = NON_NULLABLE
Field5 = NULLABLE
Field6 = NULLABLE
Field7 =
Field8 =
Field9 =
Field10 =
59 changes: 59 additions & 0 deletions Validation
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import arcpy
class ToolValidator(object):
"""Class for validating a tool's parameter values and controlling
the behavior of the tool's dialog."""

def __init__(self):
"""Setup arcpy and the list of tool parameters."""
self.params = arcpy.GetParameterInfo()

def initializeParameters(self):
"""Refine the properties of a tool's parameters. This method is
called when the tool is opened."""
return

def updateParameters(self):
"""Modify the values and properties of parameters before internal
validation is performed. This method is called whenever a parameter
has been changed."""

if self.params[0].value == 'Single Camera':

self.params[1].enabled = 1
self.params[2].enabled = 0
self.params[3].enabled = 0
self.params[4].enabled = 0
self.params[6].enabled = 0
self.params[7].enabled = 0


else:
self.params[1].enabled = 0
self.params[2].enabled = 1
self.params[3].enabled = 1
self.params[4].enabled = 1
self.params[6].enabled = 1
self.params[7].enabled = 1

return

def updateMessages(self):
"""Modify the messages created by internal validation for each tool
parameter. This method is called after internal validation."""

if self.params[0].value == 'Single Camera':

self.params[1].setErrorMessage("Photo folder required")
self.params[5].setErrorMessage("Staging Geodatabase required")
self.params[8].setErrorMessage("Survey question file required")

else:

self.params[2].setErrorMessage("Passenger side photos required")
self.params[3].setErrorMessage("Driver side photos required")
self.params[5].setErrorMessage("Staging Geodatabase required")
self.params[6].setErrorMessage("Parcel (polygon) feature class required")
self.params[7].setErrorMessage("Parcel Identification field required")
self.params[8].setErrorMessage("Survey question file required")

return
Binary file modified images/sprites.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/sprites_src/gp-29.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/sprites_src/question-sign.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/sprites_src/star.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 19 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,27 @@
<html lang="en">
<head>
<meta charset="utf-8">
<!--
| Copyright 2015 Esri
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
-->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="fragment" content="!">
<title>Photo Survey</title>

<!-- Bootstrap styles -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">

<!-- Custom styles -->
<link href="js/lib/bootstrap.min.css" rel="stylesheet">
<link href="styles.css" rel="stylesheet">
</head>
<!--[if lt IE 9]><body class="unsupportedIE"><![endif]-->
Expand Down Expand Up @@ -45,11 +57,11 @@ <h2 class="screenreaderInfo">Photo gallery</h2>

<!-- Left and right controls -->
<a id="leftCarouselCtl" class="left carousel-control carousel-control-heartTL" href="#carousel" role="button" data-slide="prev">
<span id="previousImageBtn" class="carousel-arrow sprites left-arrow" aria-hidden="true"></span>
<span id="previousImageBtn" class="carousel-arrow carousel-arrow-left sprites left-arrow" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a id="rightCarouselCtl" class="right carousel-control carousel-control-heartTL" href="#carousel" role="button" data-slide="next">
<span id="nextImageBtn" class="carousel-arrow sprites right-arrow" aria-hidden="true"></span>
<span id="nextImageBtn" class="carousel-arrow carousel-arrow-right sprites right-arrow" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
Expand All @@ -62,7 +74,7 @@ <h2 class="screenreaderInfo">Photo gallery</h2>
<div id="sidebarContent" class="sidebarContent fillHeight col-sm-3 col-md-3 repad">
<h2 class="screenreaderInfo">User information</h2>
<button id="helpButton" aria-label="help" role="button"
class="glyphicon glyphicon-question-sign pull-right help-icon iconButton"
class="glyphicon pull-right help-icon iconButton sprites question-sign"
data-toggle="modal" data-target="#additionalInfoPanel"></button>
<div class="dropdown">
<span class="lg-a" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span id="name"></span>
Expand Down
Loading

0 comments on commit 043fc84

Please sign in to comment.