diff --git a/config/defaults.js b/config/defaults.js index 6c918d27..64a2ce38 100755 --- a/config/defaults.js +++ b/config/defaults.js @@ -19,7 +19,7 @@ define({ //Default configuration settings for the application. This is where you'll define things like a bing maps key, //default web map, default app color theme and more. These values can be overwritten by template configuration settings and url parameters. "appid": "", //"73909e939be34d2b931f0765ba3bf4a6", - "webmap": "f5b13dbed07c46cdb783cf361833aa6b", + "webmap": "14ab61d83557477daac4e36fae8c992e", "oauthappid": null, //"AFTKRmv16wj14N3z", //Group templates must support a group url parameter. This will contain the id of the group. //group: "", @@ -28,7 +28,7 @@ define({ "proxyurl": "", "bingKey": "", //Enter the url to your organizations bing maps key if you want to use bing basemaps //Defaults to arcgis.com. Set this value to your portal or organization host name. - "sharinghost": location.protocol + "//" + "www.arcgis.com", + "sharinghost": "www.arcgis.com", // Define alt text for the map that can be read by screen readers "altMapText": null, // by default we'll read the web map snippet // Set splashModal to display a splash screen when the app loads @@ -49,6 +49,7 @@ define({ //Theme defines the background color of the title area and tool dialog //Color defines the text color for the title and details. Note that //both these values must be specified as hex colors. + "customLayout": "default", // default, sidetools, menubar "theme": "#105e78", "color": "#fff", "iconColor": "#fff", @@ -90,7 +91,8 @@ define({ "enabled": true }, { "name": "share", - "enabled": true + "enabled": true, + "embed": false }], //Set the active tool on the toolbar. //Set to "" to display no tools at startup @@ -130,8 +132,5 @@ define({ "center": null, "markerSymbol": "./images/EsriBluePinCircle26.png", "markerSymbolWidth": 26, - "markerSymbolHeight": 26, - //Replace these with your own bitly key - "bitlyLogin": "", - "bitlyKey": "" + "markerSymbolHeight": 26 }); diff --git a/config/templateConfig.js b/config/templateConfig.js index 2c1054b4..9d178e64 100755 --- a/config/templateConfig.js +++ b/config/templateConfig.js @@ -47,8 +47,8 @@ define({ //if you want users to be able to specify lat/lon coordinates that define the map's center or //specify an alternate basemap via a url parameter. "urlItems": [ - "color", "extent", "center", "level", "marker", "feature", "find", "sharedTheme", "sharedThemeItem" + "color", "extent", "center", "level", "marker", "feature", "find", "sharedTheme", "sharedThemeItem", "sharinghost","overwritesharing", "tool_share_embed", "customLayout" ], // For esri hosted environments only. Will automatically create a sharingurl and proxyurl for the application. - esriEnvironment: false + esriEnvironment: true }); diff --git a/css/styles.css b/css/styles.css index 7963a104..5f4cf29a 100644 --- a/css/styles.css +++ b/css/styles.css @@ -1,195 +1,209 @@ /*Phones (520px) Small Tablets (720px)*/ -html, body { - padding: 0; - margin: 0; - height: 100%; - width: 100%; - font-family: Arial, Helvetica, sans-serif; - overflow:hidden; -} -.noscroll{ - overflow: hidden; +html, +body { + padding: 0; + margin: 0; + height: 100%; + width: 100%; + font-family: Arial, Helvetica, sans-serif; + overflow: hidden; +} +.noscroll { + overflow: hidden; } /*Set opacity for fill symbols when searching*/ + g#mapDiv_graphics_layer path { fill-opacity: 0; } .modal-scrollbar { - margin-right: 17px; } - + margin-right: 17px; +} /* Fonts */ -@font-face { - font-family: "HelveticaNeue"; - src: url('../fonts/helveticaneue.eot'); - src: url('../fonts/helveticaneue.eot?#iefix') format('embedded-opentype'), url('../fonts/helveticaneue.woff') format('woff'), url('../fonts/helveticaneue.ttf') format('truetype'), url('../fonts/helveticaneue.svg#HelveticaNeue') format('svg'); - font-style: normal; - font-weight: normal; } @font-face { - font-family: "HelveticaNeueUltraLight "; - src: url('../fonts/helveticaneueultralight.eot'); - src: url('../fonts/helveticaneueultralight.eot?#iefix') format('embedded-opentype'), url('../fonts/helveticaneueultralight.woff') format('woff'), url('../fonts/helveticaneueultralight.ttf') format('truetype'), url('../fonts/helveticaneueultralight.svg#HelveticaNeueUltraLight') format('svg'); - font-style: normal; - font-weight: normal; } - + font-family: "HelveticaNeue"; + src: url('../fonts/helveticaneue.eot'); + src: url('../fonts/helveticaneue.eot?#iefix') format('embedded-opentype'), url('../fonts/helveticaneue.woff') format('woff'), url('../fonts/helveticaneue.ttf') format('truetype'), url('../fonts/helveticaneue.svg#HelveticaNeue') format('svg'); + font-style: normal; + font-weight: normal; +} +@font-face { + font-family: "HelveticaNeueUltraLight "; + src: url('../fonts/helveticaneueultralight.eot'); + src: url('../fonts/helveticaneueultralight.eot?#iefix') format('embedded-opentype'), url('../fonts/helveticaneueultralight.woff') format('woff'), url('../fonts/helveticaneueultralight.ttf') format('truetype'), url('../fonts/helveticaneueultralight.svg#HelveticaNeueUltraLight') format('svg'); + font-style: normal; + font-weight: normal; +} #mapDiv { - position: absolute;; - padding: 0; - margin: 0; - width: 100%; - height: 100%; + position: absolute; + ; + padding: 0; + margin: 0; + width: 100%; + height: 100%; } - .loading-indicator { - /* Loading status */ - display: none; - height: 100%; - width: 100%; - z-index: 500; - position: absolute; - top: 0; - left: 0; - overflow: hidden; - background: #fff; } + /* Loading status */ -.app-loading .loading-indicator, .app-error .loading-indicator { - /* Show this class when loading or error */ - display: block; } + display: none; + height: 100%; + width: 100%; + z-index: 500; + position: absolute; + top: 0; + left: 0; + overflow: hidden; + background: #fff; +} +.app-loading .loading-indicator, +.app-error .loading-indicator { + /* Show this class when loading or error */ + display: block; +} .app-loading .loading-indicator { - /* Loading image */ - background-position: center center; - background-image: url(../images/ajax-loader.gif); - background-repeat: no-repeat; } + /* Loading image */ + background-position: center center; + background-image: url(../images/ajax-loader.gif); + background-repeat: no-repeat; +} .app-error .loading-message { - /* Error status */ - background-position: top center; - background-image: url(../images/error.png); - background-repeat: no-repeat; - padding-top: 60px; - width: 100%; - position: absolute; - z-index: 2; - top: 40%; - left: 0; - text-align: center; + /* Error status */ + + background-position: top center; + background-image: url(../images/error.png); + background-repeat: no-repeat; + padding-top: 60px; + width: 100%; + position: absolute; + z-index: 2; + top: 40%; + left: 0; + text-align: center; } /*Layer List css modifications*/ -.esriLayer{ - background-color: #fff; + +.esriLayer { + background-color: #fff; } .esriLayerList .esriTitle { - background-color: #fff; - border-bottom:none; + background-color: #fff; + border-bottom: none; } - -.esriLayerList .esriContainer{ - border-bottom:1px solid #ccc; - border-top: none !important; - background-color:#fff; +.esriLayerList .esriContainer { + border-bottom: 1px solid #ccc; + border-top: none !important; + background-color: #fff; } -.esriLayerList .esriTitleContainer{ - border-top:1px solid #ccc; +.esriLayerList .esriTitleContainer { + border-top: 1px solid #ccc; } -.esriLayerList .esriList{ - border-top:none; - background-color:#fff; +.esriLayerList .esriList { + border-top: none; + background-color: #fff; } -.esriLayerList .esriToggleButton{ - margin-right:8px; +.esriLayerList .esriToggleButton { + margin-right: 8px; } /*WCAG 2.0 Contrast ratio update*/ /*.esriLayerList .esriScaleInvisible .esriLabel{ color:#767676; }*/ /*Overview Map widget enhancements*/ -.esriOverviewMap .ovwContainer{ - width:300px !important; + +.esriOverviewMap .ovwContainer { + width: 300px !important; } -#pageBody_layers{ - background-color: #fff; +#pageBody_layers { + background-color: #fff; } -#pageBody_overview{ - height:350px !important; +#pageBody_overview { + height: 350px !important; } @media only screen and (min-width: 720px) { - #pageBody_overview { - max-height: 80%; } } - + #pageBody_overview { + max-height: 80%; + } +} /*Editor*/ -.calcite .dijitTextBoxDisabled , .esriAttributeInspector .dijitTextBoxDisabled input{ - background-color: #d3d3d3; - padding:0 !important; + +.calcite .dijitTextBoxDisabled, +.esriAttributeInspector .dijitTextBoxDisabled input { + background-color: #d3d3d3; + padding: 0 !important; } /*Layer list dialog*/ -.layer-menu { - width: 100%; } +.layer-menu { + width: 100%; +} .layer-menu .dijitMenuItem:hover { - background: #d3d3d3; } - + background: #d3d3d3; +} .layer-menu .dijitMenuItemSelected { - background: #d3d3d3; } - + background: #d3d3d3; +} /* Esri Javascript API*/ -.templatePicker { - height: 100%; - padding-top: 30px; - border: none; } +.templatePicker { + height: 100%; + padding-top: 30px; + border: none; +} .esriEditor { - height: 100%; } - + height: 100%; +} .esriEditor .esriDrawingToolbar { - position: absolute; - right: 0; - left: 0; - top: 0; - border-top: none; - border-right: none; - border-left: none; } - .esriEditor .dojoxGridScrollbox{ - top:20px; - } -@media only screen and (min-width: 720px) { - .esriEditor .esriDrawingToolbar { - top: 0; + position: absolute; right: 0; - left: 0; } } - - + left: 0; + top: 0; + border-top: none; + border-right: none; + border-left: none; +} +.esriEditor .dojoxGridScrollbox { + top: 20px; +} +@media only screen and (min-width: 720px) { + .esriEditor .esriDrawingToolbar { + top: 0; + right: 0; + left: 0; + } +} .esriPopupMaximized { - top: 100px !important; } - - -.printTitle{ - width: 265px; - font-size: 12px; - border-width: 1px; - border-color: #CCC; - border-style: solid; - padding: 5px; - margin-bottom: 12px; - display:block; + top: 100px !important; +} +.printTitle { + width: 265px; + font-size: 12px; + border-width: 1px; + border-color: #CCC; + border-style: solid; + padding: 5px; + margin-bottom: 12px; + display: block; } /*Styles for the print dialog checkbox*/ + #pageBody_print .checkbox { - display: inline-block; - cursor: pointer; + display: inline-block; + cursor: pointer; } .esriPrint { - position: absolute; - bottom:5px; - right: 20px; + position: absolute; + bottom: 5px; + right: 20px; } - -.loadPrint{ - padding:0 0.3em; +.loadPrint { + padding: 0 0.3em; text-align: center; vertical-align: middle; - line-height:32px; + line-height: 32px; -webkit-animation-name: rotate; -webkit-animation-duration: 1s; -webkit-animation-iteration-count: infinite; @@ -204,956 +218,893 @@ g#mapDiv_graphics_layer path { animation-timing-function: linear; } @-webkit-keyframes rotate { - from {-webkit-transform: rotate(0deg);} - to {-webkit-transform: rotate(360deg);} + from { + -webkit-transform: rotate(0deg); + } + to { + -webkit-transform: rotate(360deg); + } } - @-moz-keyframes rotate { - from {-moz-transform: rotate(0deg);} - to {-moz-transform: rotate(360deg);} + from { + -moz-transform: rotate(0deg); + } + to { + -moz-transform: rotate(360deg); + } } - @keyframes rotate { - from {transform: rotate(0deg);} - to {transform: rotate(360deg);} + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } } -.esriBookmarks, .esriBookmarkTable, .esriBookmarkLabel{ - width:100%; +.esriBookmarks, +.esriBookmarkTable, +.esriBookmarkLabel { + width: 100%; } -.esriMeasurement .dijitButtonNode{ - padding:0; +.esriMeasurement .dijitButtonNode { + padding: 0; } - .esriMeasurement .areaIcon { - background-image: url(../images/area_measure.png); - background-position: center; - background-repeat: no-repeat; - width: 16px; - height: 16px; } - + background-image: url(../images/area_measure.png); + background-position: center; + background-repeat: no-repeat; + width: 16px; + height: 16px; +} .esriMeasurement .distanceIcon { - background-image: url(../images/dist_measure.png); - background-repeat: no-repeat; - background-position: center; - width: 16px; - height: 16px; } - + background-image: url(../images/dist_measure.png); + background-repeat: no-repeat; + background-position: center; + width: 16px; + height: 16px; +} .esriMeasurement .locationIcon { - background-image: url(../images/dist_point.png); - background-repeat: no-repeat; - background-position: center; - width: 16px; - height: 16px; } - + background-image: url(../images/dist_point.png); + background-repeat: no-repeat; + background-position: center; + width: 16px; + height: 16px; +} .esriMeasurement .esriButtonHover .dijitButtonNode { - background: #a9a9a9; } - + background: #a9a9a9; +} .esriMeasurement .esriButtonChecked .dijitButtonNode { - background: #a9a9a9; - width:28px; - height:28px; + background: #a9a9a9; + width: 28px; + height: 28px; } - .no-touch .esriMeasurement .esriButton .dijitButtonNode:hover { - background: #a9a9a9; } - + background: #a9a9a9; +} .locationIcon { - width: 32px; - height: 32px; } - - -.arcgisSearch{ - border:none; + width: 32px; + height: 32px; +} +.arcgisSearch { + border: none; } .arcgisSearch .searchGroup .searchInput { - /*width: 200px;*/ - padding: 6px 17px 6px 18px; - background-color: transparent; - background-color: rgba(0, 0, 0, 0.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4D000000,endColorstr=#4D000000); - zoom: 1; - color: #fff; + /*width: 200px;*/ + + padding: 6px 17px 6px 18px; + background-color: transparent; + background-color: rgba(0, 0, 0, 0.3); + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr=#4D000000, endColorstr=#4D000000); + zoom: 1; + color: #fff; } -#search_input::-webkit-input-placeholder{ - color: #fff; +#search_input::-webkit-input-placeholder { + color: #fff; } -#search_input.dark::-webkit-input-placeholder{ - color: #000; +#search_input.dark::-webkit-input-placeholder { + color: #000; } -#search_input::-moz-placeholder{ - color: #fff; +#search_input::-moz-placeholder { + color: #fff; } -#search_input.dark::-moz-placeholder{ - color: #000; +#search_input.dark::-moz-placeholder { + color: #000; } -#search_input::-ms-input-placeholder{ - color: #fff; +#search_input::-ms-input-placeholder { + color: #fff; } -#search_input.dark::-ms-input-placeholder{ - color: #000; +#search_input.dark::-ms-input-placeholder { + color: #000; } -@media only screen and (max-width: 400px){ - .arcgisSearch .searchGroup .searchInput{ - /*width:130px;*/ - } +@media only screen and (max-width: 400px) { + .arcgisSearch .searchGroup .searchInput { + /*width:130px;*/ + } } @media only screen and (min-width: 800px) { - .arcgisSearch .searchGroup .searchInput { - display: block; } } - + .arcgisSearch .searchGroup .searchInput { + display: block; + } +} .arcgisSearch .searchClear { - background: none; - background-color: inherit; - color: #a8a8a8; } - + background: none; + background-color: inherit; + color: #a8a8a8; +} .arcgisSearch .searchBtn { - background-color: transparent; - background-color: rgba(0, 0, 0, 0.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4D000000,endColorstr=#4D000000); - color: #fff; } - + background-color: transparent; + background-color: rgba(0, 0, 0, 0.3); + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr=#4D000000, endColorstr=#4D000000); + color: #fff; +} .simpleGeocoder .esriGeocoder { - display: block; - width: 100%; - margin: 0; - border: transparent; - background-color: transparent; - background-color: rgba(0, 0, 0, 0.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4D000000,endColorstr=#4D000000); - zoom: 1; - } - + display: block; + width: 100%; + margin: 0; + border: transparent; + background-color: transparent; + background-color: rgba(0, 0, 0, 0.3); + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr=#4D000000, endColorstr=#4D000000); + zoom: 1; +} .simpleGeocoder .esriGeocoderMenu { - color: #333; } - + color: #333; +} .simpleGeocoder .esriGeocoderResults { - border: transparent; - background-color: transparent; - background-color: rgba(0, 0, 0, 0.6); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000,endColorstr=#99000000); - zoom: 1; } - + border: transparent; + background-color: transparent; + background-color: rgba(0, 0, 0, 0.6); + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000); + zoom: 1; +} .simpleGeocoder .esriGeocoder input { - color: #FFF !important; } - -.simpleGeocoder .esriGeocoderResult:hover, .simpleGeocoder .esriGeocoderResultEven:focus, .simpleGeocoder .esriGeocoderResultOdd:focus { - background-color: transparent; - background-color: rgba(0, 0, 0, 0.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4D000000,endColorstr=#4D000000); - zoom: 1; } - + color: #FFF !important; +} +.simpleGeocoder .esriGeocoderResult:hover, +.simpleGeocoder .esriGeocoderResultEven:focus, +.simpleGeocoder .esriGeocoderResultOdd:focus { + background-color: transparent; + background-color: rgba(0, 0, 0, 0.3); + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr=#4D000000, endColorstr=#4D000000); + zoom: 1; +} .simpleGeocoder .esriGeocoder .esriGeocoderMenuArrow { - background: none; } - + background: none; +} .simpleGeocoder .esriGeocoder .esriGeocoderMenuArrow:before { - content: "\e809"; - width: 16px; - height: 16px; - font-size: 16px; - color: #a8a8a8; - font-family: "tool-icons"; } - + content: "\e809"; + width: 16px; + height: 16px; + font-size: 16px; + color: #a8a8a8; + font-family: "tool-icons"; +} .esriMeasurement .esriMeasurementResultLabel { - text-align: left; - font-weight: 500; } - -.esriControlsBR { - position: absolute; - left: 0px; - bottom: 0px; } - -.logo-med { - position: absolute; - left: 0px; - bottom: 0px; } - -.logo-sm { - position: absolute; - left: 0px; - bottom: 0px; } - -.esriAttribution { - position: absolute; - left: 65px; - bottom: 5px; } - -.esriBasemapGallery { - padding: 20px; + text-align: left; + font-weight: 500; } -.esriBasemapGalleryNode{ - height:105px !important; +.esriBasemapGallery { + padding: 20px; } -.esriBasemapGallerySelectedNode .esriBasemapGalleryThumbnail{ +.esriBasemapGalleryNode { + height: 105px !important; } -.esriBasemapGalleryLabelContainer{ - line-height: 10px; - font-size:10px; +.esriBasemapGallerySelectedNode .esriBasemapGalleryThumbnail {} .esriBasemapGalleryLabelContainer { + line-height: 10px; + font-size: 10px; } .scalebar_bottom-left { - left: 25px; - bottom: 40px; -} -.HomeButton .home{ - width:30px; - height:25px; - /*display:none;*/ - background-color: transparent; - background-image:none; - vertical-align: middle; - text-align: center; - cursor:pointer; - padding: 0px !important; + left: 25px; + bottom: 40px; } -.esriSimpleSlider { - text-align: center; - color: #ffffff; - background-color: transparent; - background-color: rgba(255, 255, 255, 0.8); - cursor: pointer; - border-radius: 0; +.HomeButton .home { + width: 30px; + height: 25px; + + background-color: transparent; + background-image: none; + vertical-align: middle; + text-align: center; + cursor: pointer; + padding: 0px !important; } -.esriSimpleSliderVertical .esriSimpleSliderIncrementButton, .esriSimpleSliderVertical .esriSimpleSliderDecrementButton{ - border-radius: 0; +.esriSimpleSlider { + text-align: center; + color: #ffffff; + background-color: transparent; + background-color: rgba(255, 255, 255, 0.8); + cursor: pointer; + border-radius: 0; } - -@media only screen and (min-width: 760px) { - - .esriSimpleSliderTL{ - top:10px !important; - left:10px !important; - } +.esriSimpleSliderVertical .esriSimpleSliderIncrementButton, +.esriSimpleSliderVertical .esriSimpleSliderDecrementButton { + border-radius: 0; } - -.homeEnabled .esriSimpleSliderIncrementButton, .homeEnabled .esriSimpleSliderDecrementButton, .homeEnabled .HomeButton{ - height:25px; +.homeEnabled .esriSimpleSliderIncrementButton, +.homeEnabled .esriSimpleSliderDecrementButton, +.homeEnabled .HomeButton { + height: 25px; } - .esriSimpleSlider div { - font-size: 14px; - font-family: verdana, helvetica; - font-weight: bold; - -webkit-user-select: none; } - -.esriSimpleSliderTL { - top:auto; - left:auto; - top:80px; - left:0; - border: none; + font-size: 14px; + font-family: verdana, helvetica; + font-weight: bold; + -webkit-user-select: none; +} +.esriSimpleSliderDecrementButton:hover, +.esriSimpleSliderIncrementButton:hover, +.HomeButton .home:hover { + border-radius: 0; + background-color: transparent; + background-color: rgba(0, 0, 0, 0.3); + zoom: 1; } - -.esriSimpleSliderDecrementButton:hover, .esriSimpleSliderIncrementButton:hover, .HomeButton .home:hover { - border-radius: 0; - background-color: transparent; - background-color: rgba(0, 0, 0, 0.3); - zoom: 1; -} - .esriSimpleSliderVertical .esriSimpleSliderIncrementButton { - border: none !important; + border: none !important; } - -.LocateButton .zoomLocateButton:before ,.HomeButton .home:before { +.icon-home, .icon-locate{ + display: block; +} +.icon-home:before, .icon-locate:before{ font-size: 13px; font-family: "tool-icons"; text-align: center; speak: none; - border-radius:0; + border-radius: 0; +} +.HomeButton span.icon-home, .LocateButton span.icon-locate{ + display: block; } -.HomeButton .home:before { +.icon-home:before{ content: "\e800"; + speak:none; } - -.LocateButton .zoomLocateButton:before { +.icon-locate:before{ + speak:none; content: "\e630"; - } -.LocateButton .zoomLocateButton{ - background-image:none; - background-color: rgba(0, 0, 0, 0.3); - color:#fff; - width:30px; - height:30px; - line-height: 30px; - border-radius: 0; - text-align: center; - vertical-align: middle; - font-family: "tool-icons"; - font-size:14px; - padding:0; -} -#locateDiv{ - position: absolute; - z-index: 10; - top:155px; - left:0; - } - .noslider #locateDiv{ - top:80px; - } - .scalebar_bottom-left { - left: 25px; - bottom: 40px; } +} +.LocateButton .zoomLocateButton { + background-image: none; + background-color: rgba(0, 0, 0, 0.3); + color: #fff; + width: 30px; + height: 30px; + line-height: 30px; + border-radius: 0; + text-align: center; + vertical-align: middle; + font-family: "tool-icons"; + font-size: 14px; + padding: 0; +} +.scalebar_bottom-left { + left: 25px; + bottom: 40px; +} img { - border: 0; + border: 0; } .LocateButton .tracking { background-image: none !important; border: solid 1px #fff; } - /* Template */ -.bg { - display: block; } +.bg { + display: block; +} .fc { - font-weight: bold; } - - -#panelContent { - top:90px; - font-family: Helvetica, Arial, sans-serif; - position: absolute; - right: 310px; - max-height:80%; - width: 0px; - display: block; - background-color: transparent; - background-color: rgba(0, 0, 0, 0.5); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#80000000,endColorstr=#80000000); - zoom: 1; } - + font-weight: bold; +} #panelPages { - width: 100%; - height: 100%; - background-color: transparent; - background-color: rgba(255, 0, 0, 0.5); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#80FF0000,endColorstr=#80FF0000); - zoom: 1; } - + width: 100%; + height: 100%; + background-color: transparent; + background-color: rgba(255, 0, 0, 0.5); + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr=#80FF0000, endColorstr=#80FF0000); + zoom: 1; +} .page { - display:block; + display: block; } - -.hide{ - display:none; +.hide { + display: none; } .pageContent { - width: 300px; - display: block; - background-color: transparent; - background-color: white; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFFFFFFF,endColorstr=#FFFFFFFF); - zoom: 1; } - -@media only screen and (min-width: 850px) { - #panelContent{ - top:10px; - } + width: 300px; + display: block; + background-color: transparent; + background-color: white; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr=#FFFFFFFF, endColorstr=#FFFFFFFF); + zoom: 1; } -@media only screen and (min-width: 760px){ - .no-search #panelContent{ - top:10px; - } +#panelContent { + font-family: Helvetica, Arial, sans-serif; + position: absolute; + max-height: 80%; + width: 0px; + display: block; + background-color: transparent; + background-color: rgba(0, 0, 0, 0.5); + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr=#80000000, endColorstr=#80000000); + zoom: 1; } /*Rules for popup when displayed in panel*/ -.panelPopup{ - display: none; -} -.hidden{ - display:none; -} -.popupHeader{ - font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; - font-size:12px; - font-weight: bold; -} -#popupContainer{ - font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; - font-size:12px; - width:100%; - height: 100%; - padding:0 !important; - margin: 0 auto; -} -.esriViewPopup{ - padding:.4em; -} -#popupFooter > .action:before{ - content:"\e800"; - font-family: "popup"; -} -#popupFooter > .action:hover:before{ - color:#6b6b6b; -} -#popupFooter > .action{ - padding: 0 5px; - text-decoration: none; - color: #000; -} -.titlePane{ - height:20px; - line-height: 16px; -} -.esriPopup.light .titlePane, .esriPopup.dark .titlePane{ - font-size: 12px; - line-height: 16px; - height: 30px; - padding: 10px; - border: 0; - border-radius: 3px 3px 0 0; - -webkit-border-radius: 3px 3px 0 0; -} -.esriPopup.light .titlePane .title, .esriPopup.dark .titlePane .title{ - line-height: 16px; -} -.popupTitle{ - width:100%; - padding:10px; - font-size: 12px; - line-height: 16px; -} -.popupButton{ - position: absolute; - text-align: center; - width:16px; - height: 16px; - background:none; - font-size: 12px; - line-height: 16px; - top:10px; - cursor:pointer; - background-color: transparent; - border:none; - overflow:visible; -} -.popupButton:hover{ - /*match out of the box hover color for home and locate*/ - background-color: transparent; - background-color: rgba(102, 102, 102, 0.6); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#E6666666,endColorstr=#E6666666); - zoom: 1; -} -.popupButton.next:before{ - font-family: "popup"; - content:"\e808"; -} -.popupButton.prev{ - right:73px; -} -.popupButton.next{ - right:55px; -} -.popupButton.close{ - right:20px; -} -.popupButton.prev:before{ - font-family: "popup"; - content:"\e809"; -} -.popupButton.close:before{ - font-family: "popup"; - content:"\e806"; -} -.esriPopup .actionsPane .action{ - margin-right:20px; -} -a.action.zoomTo > span{ - margin-left:4px; -} -.actionList > .action:before{ - content:"\e800"; - font-family: "popup"; +.panelPopup { + display: none; } -.actionList > .action:hover:before{ - color:#6b6b6b; +.hidden { + display: none; } -.actionList > .action{ - padding: 0 10px 10px 0; - text-decoration: none; - color: #000; +.popupHeader { + font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size: 12px; + font-weight: bold; } -#pageBody_popup{ - overflow-x:auto !important; - height:auto; +#popupContainer { + font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size: 12px; + width: 100%; + height: 100%; + padding: 0 !important; + margin: 0 auto; + background-color:#fff; +} +.esriViewPopup { + padding: .4em; } #popupFooter{ - padding:4px; + background-color: #fff; } -.popupTitle{ - position: absolute; - left:5px; +#popupFooter > .action:before { + content: "\e800"; + font-family: "popup"; +} +#popupFooter > .action:hover:before { + color: #6b6b6b; +} +#popupFooter > .action { + padding: 0 5px; + text-decoration: none; + color: #000; +} +.titlePane { + height: 20px; + line-height: 16px; +} +.esriPopup.light .titlePane, +.esriPopup.dark .titlePane { + font-size: 12px; + line-height: 16px; + height: 30px; + padding: 10px; + border: 0; + border-radius: 3px 3px 0 0; + -webkit-border-radius: 3px 3px 0 0; +} +.esriPopup.light .titlePane .title, +.esriPopup.dark .titlePane .title { + line-height: 16px; +} +.popupTitle { + width: 100%; + padding: 10px; + font-size: 12px; + line-height: 16px; +} +.popupButton { + position: absolute; + text-align: center; + width: 16px; + height: 16px; + background: none; + font-size: 12px; + line-height: 16px; + top: 10px; + cursor: pointer; + background-color: transparent; + border: none; + overflow: visible; +} +.popupButton:hover { + /*match out of the box hover color for home and locate*/ + + background-color: transparent; + background-color: rgba(102, 102, 102, 0.6); + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr=#E6666666, endColorstr=#E6666666); + zoom: 1; +} +.popupButton.next:before { + font-family: "popup"; + content: "\e808"; +} +.popupButton.prev { + right: 73px; +} +.popupButton.next { + right: 55px; +} +.popupButton.close { + right: 20px; +} +.popupButton.prev:before { + font-family: "popup"; + content: "\e809"; +} +.popupButton.close:before { + font-family: "popup"; + content: "\e806"; } -.popupHeader{ - position: relative; - display: block; - width:100%; - height: 40px; - line-height: 40px; +.esriPopup .actionsPane .action { + margin-right: 20px; +} +a.action.zoomTo > span { + margin-left: 4px; +} +.actionList > .action:before { + content: "\e800"; + font-family: "popup"; +} +.actionList > .action:hover:before { + color: #6b6b6b; +} +.actionList > .action { + padding: 0 10px 10px 0; + text-decoration: none; + color: #000; +} +#pageBody_popup { + overflow-x: auto !important; + height: auto; +} +#popupFooter { + padding: 4px; +} +.popupTitle { + position: absolute; + left: 5px; +} +.popupHeader { + position: relative; + display: block; + width: 100%; + height: 40px; + line-height: 40px; } .pageHeader { - position: relative; - width: 100%; - height: 90px; - text-align: center; - display: block; } - + position: relative; + width: 100%; + height: 90px; + text-align: center; + display: block; +} .pageTitle { - position: absolute; - left: 80px; - width: auto; - height: 90px; - line-height: 45px; - color: #ffffff; - overflow: hidden; + position: absolute; + left: 80px; + width: auto; + height: 90px; + line-height: 45px; + color: #ffffff; + overflow: hidden; } - .pageHeaderImg { - position: absolute; - left: 5px; - margin-left: 0px; - top: 5px; - width: 60px; - height: 60px; - line-height: 50px; - border: 5px solid rgba(0, 0, 0, 0.1); - -webkit-border-radius: 35px; - -moz-border-radius: 35px; - -ms-border-radius: 35px; - border-radius: 35px; } - + position: absolute; + left: 5px; + margin-left: 0px; + top: 5px; + width: 60px; + height: 60px; + line-height: 50px; + border: 5px solid rgba(0, 0, 0, 0.1); + -webkit-border-radius: 35px; + -moz-border-radius: 35px; + -ms-border-radius: 35px; + border-radius: 35px; +} .pageIcon { - vertical-align: middle; - font-size:25px; - text-align: center; + vertical-align: middle; + font-size: 25px; + text-align: center; } - -.pageNav{ - cursor: pointer; - position: absolute; - right:5px; - display: block; - background-color:transparent; - border:none; +.pageNav { + cursor: pointer; + position: absolute; + right: 5px; + display: block; + background-color: transparent; + border: none; } .pageClose { - top: 9px; - } + top: 9px; +} .pageUp { - top: 35px; - } -.pageDown:before, .pageUp:before, .pageClose:before{ - font-family: "tool-icons"; - font-size:12px; - line-height: 14px; - background-color: rgba(0, 0, 0, 0.3); - border-radius: 20px; - padding:4px; + top: 35px; +} +.pageDown:before, +.pageUp:before, +.pageClose:before { + font-family: "tool-icons"; + font-size: 12px; + line-height: 14px; + background-color: rgba(0, 0, 0, 0.3); + border-radius: 20px; + padding: 4px; } .pageDown { - top: 60px; + top: 60px; } -.pageClose:before{ - content:"\e600"; +.pageClose:before { + content: "\e600"; } -.pageUp:before{ - content: "\e682"; +.pageUp:before { + content: "\e682"; } -.pageDown:before{ - content: "\e681"; +.pageDown:before { + content: "\e681"; } -.icons-dark{ - color:#333; +.icons-dark { + color: #333; } .pageBody { - position: relative; - top: 0; - /*display: -moz-box; - display: -webkit-box; - display: box;*/ - display:block; - max-height: 400px; - width:100%; - overflow-x:hidden; - overflow-y:auto; - color: #000000; + position: relative; + top: 0; + display: block; + max-height: 400px; + width: 100%; + overflow-x: hidden; + overflow-y: auto; + color: #000000; } - #pageBody_print { - padding: 10px; - height:120px; + padding: 10px; + height: 120px; } - #pageBody_legend { - padding-top: 20px; + padding-top: 20px; } @media only screen and (max-width: 480px) { - #pageBody_legend { - max-height:250px; - } - .pageBody{ - max-height: 250px; - } + #pageBody_legend { + max-height: 250px; + } + .pageBody { + max-height: 250px; + } } -.legend{ - margin:auto; - max-width: 90%; +.legend { + margin: auto; + max-width: 90%; } - - #pageBody_share { - padding: 5px 20px; - overflow-y: auto; + padding: 5px 20px; + overflow-y: auto; } - .desc { - padding: 10px; } - -#pageBody_details { - padding: 5px; - max-width: 288px; + padding: 10px; } - -#panelTop { - position: fixed; - left: 0px; - top: 0px; - width: 100%; - color: #ffffff; - padding: 0px; - display: block; - overflow: visible; - height: 75px; +#pageBody_details { + padding: 5px; + max-width: 288px; } - @media only screen and (min-width: 760px) { - #panelTop { - width: auto; - left: 44px; - top: 10px; - } - .noslider #panelTop{ - left:10px; - } - #locateDiv{ - left:auto; - left:10px; - top:90px; - } #panelLogo { - margin-left: 5px; - display:block !important; - overflow: hidden; - float: left; - line-height: 45px; - width:45px; - height: 45px; + margin-left: 5px; + display: block !important; + overflow: hidden; + float: left; + line-height: 45px; + width: 45px; + height: 45px; } - #panelLogo img { - vertical-align: middle; - line-height: inherit; - max-width: 45px; - max-height: 45px; + vertical-align: middle; + line-height: inherit; + max-width: 45px; + max-height: 45px; } - - } +} #panelTitle { - height: 45px; - width: 100%; - float: left; - color: #ffffff; - display: block; - border-bottom: 1px solid rgba(255, 255, 255, 0.5); - font-family: "Helvetica Neue", "Arial", sans-serif; - font-weight: normal; + height: 45px; + width: 100%; + float: left; + color: #ffffff; + display: block; + border-bottom: 1px solid rgba(255, 255, 255, 0.5); + font-family: "Helvetica Neue", "Arial", sans-serif; + font-weight: normal; } - #panelLogo { - display: block !important; - width: 45px; - height: 45px; - overflow: hidden; - float: left; - line-height: 45px; - margin-left: 5px; -} - #panelLogo img{ - max-width:45px !important; - max-height:45px !important; + display: block !important; + width: 45px; + height: 45px; + overflow: hidden; + float: left; + line-height: 45px; + margin-left: 5px; } - -#panelText { - z-index: 40; - float: left; - max-width: 196px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - margin-left: 5px; - height:50px; - line-height: 50px; -} -h1, h2{ - margin:0; +#panelLogo img { + max-width: 45px !important; + max-height: 45px !important; } - -#title{ - overflow: hidden; - text-overflow:ellipsis; - height: 30px; - line-height: 30px; - font-size: 1.3em; -} -#subtitle{ - overflow: hidden; - text-overflow:ellipsis; - height: 15px; - line-height: 10px; - font-size: 0.9em; -} -#title.nosubtitle{ - overflow: hidden; - text-overflow:ellipsis; - height: 45px; - line-height: 45px; +#panelText { + z-index: 40; + float: left; + max-width: 196px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + margin-left: 5px; + height: 50px; + line-height: 50px; +} +h1, +h2 { + margin: 0; +} +#title { + overflow: hidden; + text-overflow: ellipsis; + height: 30px; + line-height: 30px; + font-size: 1.3em; +} +#subtitle { + overflow: hidden; + text-overflow: ellipsis; + height: 15px; + line-height: 10px; + font-size: 0.9em; +} +#title.nosubtitle { + overflow: hidden; + text-overflow: ellipsis; + height: 45px; + line-height: 45px; } - @media only screen and (min-width: 720px) { - #panelText { - max-width: 300px; - } + #panelText { + max-width: 300px; + } } - @media only screen and (min-width: 800px) { - #panelText { - max-width: 400px; - } + #panelText { + max-width: 400px; + } } - #panelSearch { - float:right; - margin:7px 4px 10px 4px; + float: right; + margin: 7px 4px 10px 4px; } - @media only screen and (min-width: 720px) { - #panelSearch { - margin: 7px 4px 10px 20px; - float: right; } } - -#panelTools { - position: relative; - left: 0px; - top: 0px; - min-height: 30px; - width: 100%; - display: block; - clear: both; } - -@media only screen and (min-width: 720px) { - #panelTools { - display: block !important; - } } - + #panelSearch { + margin: 7px 4px 10px 20px; + float: right; + } +} #panelMenu { - position: absolute; - top: 10px; - right: 2px; - font-size: 24px; - cursor: pointer; - color: #fff; - display: block; } - + position: absolute; + top: 10px; + right: 2px; + font-size: 24px; + cursor: pointer; + color: #fff; + display: block; +} @media only screen and (min-width: 720px) { - #panelMenu { - display: none; } - } - + #panelMenu { + display: none; + } +} .panelTool { - padding:0; - float: left; - width: 26px; - height: 26px; - text-align: center; - line-height: 26px; - margin:2px 0 2px 0; - border:none; - background-color:transparent; + padding: 0; + float: left; + height: 26px; + text-align: center; + line-height: 26px; + margin: 2px 0 2px 0; + border: none; + background-color: transparent; } .tool { - width: 26px; - height: 26px; - cursor: pointer; + width: 26px; + height: 26px; + cursor: pointer; } #panelHome { - float: left; - width: 26px; - height: 26px; - line-height: 26px; - margin: 2px 0 2px 0; + float: left; + width: 26px; + height: 26px; + line-height: 26px; + margin: 2px 0 2px 0; } - #panelLocate { - float: left; - width: 26px; - height: 26px; - line-height: 26px; - margin: 2px 0 2px 0; + float: left; + width: 26px; + height: 26px; + line-height: 26px; + margin: 2px 0 2px 0; } - /*Added hover to match the out-of-the-box hover for the home and locate buttons*/ -.no-touch .panelTool:hover { - background-color: transparent; - background-color: rgba(102, 102, 102, 0.4); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#E6666666,endColorstr=#E6666666); - zoom: 1; } +.no-touch .panelTool:hover { + background-color: transparent; + background-color: rgba(102, 102, 102, 0.4); + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr=#E6666666, endColorstr=#E6666666); + zoom: 1; +} .panelToolActive { - background-color: transparent; - background-color: rgba(0, 0, 0, 0.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4D000000,endColorstr=#4D000000); - zoom: 1; } - - - + background-color: transparent; + background-color: rgba(0, 0, 0, 0.3); + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr=#4D000000, endColorstr=#4D000000); + zoom: 1; +} /*Share Dialog updates*/ .calcite .icon-container { - margin: 10px 0 10px; - display: none; } - + margin: 10px 0 10px; + display: none; +} @media only screen and (min-width: 720px) { - .calcite .icon-container { - display: block; } } - + .calcite .icon-container { + display: block; + } +} .calcite .map-size-label { - float: left; - font-size: 15px; - margin: 0 5px 0 0; } - + float: left; + font-size: 15px; + margin: 0 5px 0 0; +} .esriRTL .calcite .map-size-label { - float: right; - margin: 0 0 0 5px; } - + float: right; + margin: 0 0 0 5px; +} .calcite .share-dialog-icon { - background-color: transparent; - border:none; - font-size: 24px; - line-height: 24px; - float: left; - color: rgba(0, 0, 0, 0.3); - cursor: pointer; - display: block; } - + background-color: transparent; + border: none; + font-size: 24px; + line-height: 24px; + float: left; + color: rgba(0, 0, 0, 0.3); + cursor: pointer; + display: block; +} .calcite .share-dialog-icon:visited { - color: rgba(0, 0, 0, 0.5); } - + color: rgba(0, 0, 0, 0.5); +} .esriRTL .calcite .share-dialog-icon { - float: right; - margin: 0 0 0 10px; } - + float: right; + margin: 0 0 0 10px; +} .calcite .share-dialog-icon:hover { - color: rgba(0, 0, 0, 0.8); } - + color: rgba(0, 0, 0, 0.8); +} .calcite .share-map-url { - width: 50%; - min-width: 80%; - max-width: 90%; - height: 25px; - font-size: 14px; - color: #777; - border: 1px solid #dcdcdc; - margin: 0 0 10px; } - + width: 50%; + min-width: 80%; + max-width: 90%; + height: 34px; + padding:7px 8px; + font-size: 14px; + color: #777; + border: 1px solid #dcdcdc; + margin: 0 0 10px; +} +.clippy{ + width:13px; + height:13px; + color:#333; +} +.share-btn{ + position: relative; + display: inline-block; + padding: 6px 12px; + font-size: 13px; + font-weight: bold; + line-height: 20px; + color: #333; + white-space: nowrap; + cursor: pointer; + background-color: #eee; + background-image: linear-gradient(#fcfcfc,#eee); + border: 1px solid #d5d5d5; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-appearance: none; +} .calcite .map-size-container { - margin: 0; - padding: 0 0 20px; } - -.calcite .embed-map-size-clear, .calcite .icon-clear { - clear: both; } - + margin: 0; + padding: 0 0 20px; +} +.calcite .embed-map-size-clear, +.calcite .icon-clear { + clear: both; +} .calcite .embed-map-size-dropdown { - float: left; } - + float: left; +} .esriRTL .calcite .embed-map-size-dropdown { - float: right; } - + float: right; +} .calcite .share-dialog-subheader { - font-size: 17px; - display: none; } - + font-size: 17px; + display: none; +} @media only screen and (min-width: 720px) { - .calcite .share-dialog-subheader { - display: block; } } - -.calcite .share-dialog-textarea { - width: auto; - max-width: 90%; - width: 80%; - height: 50px; - font-size: 14px; - color: #777; - border: 1px solid #dcdcdc; - margin: 0 0 10px; } - -.share-dialog-extent{ - height:30px; - line-height: 30px; + .calcite .share-dialog-subheader { + display: block; + } } -input[type=checkbox]{ - font-size:1em; +.calcite .share-dialog-textarea { + width: auto; + max-width: 90%; + width: 80%; + height: 50px; + font-size: 14px; + color: #777; + border: 1px solid #dcdcdc; + margin: 0 0 10px; +} +.share-dialog-extent { + height: 30px; + line-height: 30px; +} +input[type=checkbox] { + font-size: 1em; } - /*Icon Fonts*/ -@font-face { - font-family: 'tool-icons'; - src: url('../fonts/tool-icons.eot?nmi22n'); - src: url('../fonts/tool-icons.eot?nmi22n#iefix') format('embedded-opentype'), url('../fonts/tool-icons.woff?nmi22n') format('woff'), url('../fonts/tool-icons.ttf?nmi22n') format('truetype'), url('../fonts/tool-icons.svg?nmi22n#tool-icons') format('svg'); - font-weight: normal; - font-style: normal; } - -[class^="icon-"]:before, [class*=" icon-"]:before { - font-family: "tool-icons"; - font-style: normal; - font-weight: normal; - speak: none; - display: inline-block; - text-decoration: inherit; - width: 1em; - margin-right: 0.2em; - text-align: center; - /* opacity: .8; */ - /* For safety - reset parent styles, that can break glyph codes*/ - font-variant: normal; - text-transform: none; - /* fix buttons height, for twitter bootstrap */ - line-height: 1em; - /* Animation center compensation - margins should be symmetric */ - /* remove if not needed */ - margin-left: 0.2em; - /* you can be more comfortable with increased icons size */ - /* font-size: 120%; */ - /* Uncomment for 3D effect */ - /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ } -.toolbar-icons{ - font-size:14px; - color:#fff; - line-height: 30px; - vertical-align: middle; -} -.btnText{ - padding: 0 .5em 0 .2em; - font-size: 12px; - line-height: 26px; - vertical-align: middle; - margin: 2px 0 2px 0; +@font-face { + font-family: 'tool-icons'; + src: url('../fonts/tool-icons.eot?nmi22n'); + src: url('../fonts/tool-icons.eot?nmi22n#iefix') format('embedded-opentype'), url('../fonts/tool-icons.woff?nmi22n') format('woff'), url('../fonts/tool-icons.ttf?nmi22n') format('truetype'), url('../fonts/tool-icons.svg?nmi22n#tool-icons') format('svg'); + font-weight: normal; + font-style: normal; +} +[class^="icon-"]:before, +[class*=" icon-"]:before { + font-family: "tool-icons"; + font-style: normal; + font-weight: normal; + speak: none; + display: inline-block; + text-decoration: inherit; + width: 1em; + margin-right: 0.2em; + text-align: center; + /* opacity: .8; */ + /* For safety - reset parent styles, that can break glyph codes*/ + + font-variant: normal; + text-transform: none; + /* fix buttons height, for twitter bootstrap */ + + line-height: 1em; + /* Animation center compensation - margins should be symmetric */ + /* remove if not needed */ + + margin-left: 0.2em; + /* you can be more comfortable with increased icons size */ + /* font-size: 120%; */ + /* Uncomment for 3D effect */ + /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ +} +.toolbar-icons { + font-size: 14px; + color: #fff; + line-height: 30px; + vertical-align: middle; +} +.btnText { + padding: 0 .5em 0 .2em; + font-size: 12px; + line-height: 26px; + vertical-align: middle; + margin: 2px 0 2px 0; } .icon-edit:before { content: "\e61b"; } -.icon-layers:before { - content: "\e633"; -} .icon-basemap:before { content: "\e634"; } @@ -1172,9 +1123,12 @@ input[type=checkbox]{ .icon-map:before { content: "\e652"; } -.icon-legend:before { +.icon-layers:before { content: "\e659"; } +.icon-legend:before { + content: "\e633"; +} .icon-overview:before { content: "\e65f"; } @@ -1232,70 +1186,68 @@ input[type=checkbox]{ /*Styles for the modal dialog (splash screen)*/ #modal { - z-index:2000; - position: fixed; - left: 50%; - top: 50%; - -moz-transform: translate(-50%, -50%); - -webkit-transform: translate(-50%, -50%); - -o-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); - -} -#modalContent{ - overflow-y:auto; - max-height: 300px; + z-index: 2000; + position: fixed; + left: 50%; + top: 50%; + -moz-transform: translate(-50%, -50%); + -webkit-transform: translate(-50%, -50%); + -o-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); +} +#modalContent { + overflow-y: auto; + max-height: 300px; } #modalContent img { - max-width: 100%; - max-height: 40%; - display: block; - margin-left: auto; - margin-right: auto; + max-width: 100%; + max-height: 40%; + display: block; + margin-left: auto; + margin-right: auto; } -#modal.hide{ - top: -50%; - visibility: hidden; - opacity: 0; +#modal.hide { + top: -50%; + visibility: hidden; + opacity: 0; } -#modal .modal-header{ - border-bottom: 1px solid #ccc; +#modal .modal-header { + border-bottom: 1px solid #ccc; } #modal h2 { - margin: 0; - padding-right:8px; - padding-bottom:5px; - margin-right:5px; + margin: 0; + padding-right: 8px; + padding-bottom: 5px; + margin-right: 5px; } -#modal .copy{ - color: #333; - background-color:#fff; +#modal .copy { + color: #333; + background-color: #fff; } -#modal .copy, #modal .modal-header { - padding: 10px; +#modal .copy, +#modal .modal-header { + padding: 10px; } .modal-content { - position: relative; - z-index: 20; -} - -#closeOverlay{ - line-height: normal; - padding: .5em 1em; - font-size: 1em; - font-weight: 600; - border:none; - cursor:pointer; - height:auto; - width: auto; - position: relative; - margin:.5em auto; -} - -.tool-btn{ - text-align: center; - margin:0; - background: transparent; - border: none !important; - cursor:pointer; + position: relative; + z-index: 20; +} +#closeOverlay { + line-height: normal; + padding: .5em 1em; + font-size: 1em; + font-weight: 600; + border: none; + cursor: pointer; + height: auto; + width: auto; + position: relative; + margin: .5em auto; +} +.tool-btn { + text-align: center; + margin: 0; + background: transparent; + border: none !important; + cursor: pointer; } diff --git a/css/theme/default.css b/css/theme/default.css new file mode 100644 index 00000000..12f61a38 --- /dev/null +++ b/css/theme/default.css @@ -0,0 +1,107 @@ +#panelTools { + position: relative; + left: 0px; + top: 0px; + min-height: 30px; + width: 100%; + display: block; + clear: both; +} +.panelTool{ + margin:2px 0 2px 0; + width: 26px; + height:26px; + line-height: 26px; +} +#panelTop { + position: fixed; + left: 0px; + top: 0px; + width: 100%; + color: #ffffff; + padding: 0px; + display: block; + overflow: visible; + height: 75px; +} +.esriSimpleSliderTL { + top: auto; + left: auto; + top: 80px; + left: 0; + border: none; +} +#locateDiv { + position: absolute; + z-index: 10; + top: 155px; + left: 0; +} +.noslider #locateDiv { + top: 80px; +} +#panelContent { + top: 10px; + right: 310px; +} +.panelTool { + height: 26px; +} +@media only screen and (min-width:320px) and (max-device-width:480px){ + #panelContent{ + top: auto !important; + right:0; + left:0; + bottom:0; + width:100%; + z-index: 99; + } + .pageContent{ + width:100%; + } +} +@media only screen and (min-width: 720px) { + .esriSimpleSliderTL { + top: 10px !important; + left: 10px !important; + } + #locateDiv { + left: auto; + left: 10px; + top: 90px; + } + #panelTools { + display: block !important; + } + #panelContent { + top: 90px; + } + #panelTop { + width: auto; + left: 44px; + top: 10px; + } + .no-search #panelContent { + top: 10px; + } +} +.esriControlsBR { + position: absolute; + left: 0px; + bottom: 0px; +} +.logo-med { + position: absolute; + left: 0px; + bottom: 0px; +} +.logo-sm { + position: absolute; + left: 0px; + bottom: 0px; +} +.esriAttribution { + position: absolute; + left: 65px; + bottom: 5px; +} diff --git a/css/theme/menubar.css b/css/theme/menubar.css new file mode 100644 index 00000000..0e7c5093 --- /dev/null +++ b/css/theme/menubar.css @@ -0,0 +1,79 @@ +#panelTop { + position: fixed; + left: 30px; + top: 0; + width: 100%; + color: #ffffff; + padding: 0px; + display: block; + overflow: visible; + height: 75px; + z-index: 40; +} +#panelContent { + top:75px; +} +.noslider #panelTop{ + left:0; +} +#panelTitle{ + border-bottom: none; +} +#panelSearch{ + margin: 7px 34px 10px 4px; +} +.esriSimpleSliderTL { + top:0; + left: 0; + border:none; +} +.arcgisSearch .searchBtn{ + border:none; + border-radius: 0; + -webkit-border-radius:0; +} +.arcgisSearch .searchMenu{ + border-radius: 0; + -webkit-border-radius:0; +} + +.arcgisSearch .searchGroup .searchInput { + border-radius: 0; + -webkit-border-radius: 0; + border:none; +} +.arcgisSearch .searchCollapsed .searchSubmit { + border-radius: 0; + -webkit-border-radius:0; + border:none; +} +#panelTools{ + padding-left:10px; +} +.panelTool { + width: 26px; +} +.pageHeader{ + display:none; +} +#locateDiv { + position: absolute; + bottom:0; + z-index: 30; + left:0; +} +@media only screen and (min-width: 720px) { + + #panelTools { + display: block !important; + } + #panelSearch{ + margin: 7px 4px 10px 6px; + } + #panelTop { + width: auto; + } + .no-search #panelContent { + bottom: 10px; + } +} diff --git a/css/theme/sidetools.css b/css/theme/sidetools.css new file mode 100644 index 00000000..0ebeaeb0 --- /dev/null +++ b/css/theme/sidetools.css @@ -0,0 +1,91 @@ +#panelTools { + position: absolute; + display: block; + width: 30px; + top: 125px; + line-height: normal; +} +#panelTools.labels{ + width: 120px; + top:135px; +} +.panelTool.labels{ + display: block; + height: 45px; + white-space: nowrap; +} +.btnText { + display: inline-block; +} +.panelTool { + float:none; + width:30px; +} +.noslider #panelTools { + top: 50px; +} +.haslocate #panelTools { + top: 155px; +} +.noslider.haslocate #panelTools { + top: 80px; +} +#locateDiv { + position: absolute; + z-index: 10; + top: 125px; + left: 0; +} +#panelTitle { + border-bottom: none; +} +#panelContent { + z-index: 0; +} +#panelTop { + position: fixed; + left: 0px; + top: 0px; + width: 100%; + color: #ffffff; + padding: 0px; + display: block; + overflow: visible; + height: 50px; + z-index: 40; +} +#panelContent { + top: 51px; + right: 300px; +} +@media only screen and (min-width:320px) and (max-device-width:480px){ + #panelContent{ + top: auto !important; + right:0; + left:0; + bottom:0; + width:100%; + z-index: 99; + } + .pageContent{ + width:100%; + } +} +.notools .esriSimpleSliderTL { + top: 75px; +} +.esriSimpleSliderTL { + top: auto; + left: auto; + top: 50px; + left: 0; + border: none; + z-index: 41 !important; +} +.arcgisSearch .searchGroup .searchInput { + border-radius: 0; + -webkit-border-radius: 0; +} +.arcgisSearch .searchCollapsed .searchSubmit { + border-radius: 0; +} diff --git a/images/clippy.svg b/images/clippy.svg new file mode 100644 index 00000000..e1b17035 --- /dev/null +++ b/images/clippy.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/config-themes/default.png b/images/config-themes/default.png new file mode 100644 index 00000000..7d8626f4 Binary files /dev/null and b/images/config-themes/default.png differ diff --git a/images/config-themes/menubar.png b/images/config-themes/menubar.png new file mode 100644 index 00000000..4ff8572d Binary files /dev/null and b/images/config-themes/menubar.png differ diff --git a/images/config-themes/sidetools.png b/images/config-themes/sidetools.png new file mode 100644 index 00000000..b16a3ca0 Binary files /dev/null and b/images/config-themes/sidetools.png differ diff --git a/index.html b/index.html index 75ecab10..2863048d 100644 --- a/index.html +++ b/index.html @@ -1,24 +1,27 @@ - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + +
- -
- +
${_i18n.widgets.ShareDialog.url}
- -
${_i18n.widgets.ShareDialog.embed}
+ + +
- -
-
-
${_i18n.widgets.ShareDialog.size}
-
- +
${_i18n.widgets.ShareDialog.embed}
+ +
+
${_i18n.widgets.ShareDialog.size}
+
+ +
+
-
diff --git a/js/has-config.js b/js/has-config.js index f4390842..99eeccf9 100644 --- a/js/has-config.js +++ b/js/has-config.js @@ -3,244 +3,264 @@ organizes all the conditional checking we have to do for the template in one pla https://dojotoolkit.org/documentation/tutorials/1.8/device_optimized_builds/ http://dante.dojotoolkit.org/hasjs/tests/runTests.html*/ -define(["dojo/has"], function (has) { - var getTool = function (name, config) { - var tool = false; - for (var i = 0; i < config.tools.length; i++) { - if (config.tools[i].name === name) { - tool = config.tools[i].enabled; - break; - } - } - return tool; - }; - - /*App capabilities*/ - has.add("search", function (g) { - var search = g.config.search || false; - //overwrite the default with app settings - if (g.config.hasOwnProperty("tool_search")) { - search = g.config.tool_search; - } - return search; - }); /*Toolbar tools*/ - has.add("basemap", function (g) { - var basemap = getTool("basemap", g.config); - //overwrite the default with app settings - if (g.config.hasOwnProperty("tool_basemap")) { - basemap = g.config.tool_basemap; - } - return basemap; - }); - has.add("bookmarks", function (g) { - var bookmarks = getTool("bookmarks", g.config); - //overwrite the default with app settings - if (g.config.hasOwnProperty("tool_bookmarks")) { - bookmarks = g.config.tool_bookmarks; - } - return bookmarks; - }); - has.add("details", function (g) { - var details = getTool("details", g.config); - //overwrite the default with app settings - if (g.config.hasOwnProperty("tool_details")) { - details = g.config.tool_details; - } - return details; - }); - has.add("edit", function (g) { - var edit = getTool("edit", g.config); - //overwrite the default with app settings - if (g.config.hasOwnProperty("tool_edit")) { - edit = g.config.tool_edit; - } - return edit; - }); - has.add("edit-toolbar", function (g) { - var toolbar = false; - - for (var i = 0; i < g.config.tools.length; i++) { - if (g.config.tools[i].name === "edit") { - toolbar = g.config.tools[i].toolbar; - break; - } - } - //overwrite the default with app settings - if (g.config.hasOwnProperty("tool_edit_toolbar")) { - toolbar = g.config.tool_edit_toolbar; - } - return toolbar; - }); - has.add("scalebar", function (g) { - var scalebar = g.config.scalebar || false; - //overwrite the default with app settings - if (g.config.hasOwnProperty("scalebar")) { - scalebar = g.config.scalebar; - } - return scalebar; - }); - has.add("home", function (g) { - var home = g.config.home || false; - //overwrite the default with app settings - if (g.config.hasOwnProperty("tool_home")) { - home = g.config.tool_home; - } - return home; - }); - has.add("layers", function (g) { - var layers = getTool("layers", g.config); - //overwrite the default with app settings - if (g.config.hasOwnProperty("tool_layers")) { - layers = g.config.tool_layers; - } - return layers; - }); - - has.add("layers-sublayers", function (g) { - var subLayers = false; - for (var i = 0; i < g.config.tools.length; i++) { - if (g.config.tools[i].name === "layers") { - subLayers = g.config.tools[i].sublayers; - break; - } - } - //overwrite the default with app settings - if (g.config.hasOwnProperty("tool_sublayers")) { - subLayers = g.config.tool_sublayers; - } - return subLayers; - }); - has.add("layers-legend", function (g) { - var layerLegend = false; - for (var i = 0; i < g.config.tools.length; i++) { - if (g.config.tools[i].name === "layers") { - layerLegend = g.config.tools[i].legend; - break; - } - } - //overwrite the default with app settings - if (g.config.hasOwnProperty("tool_layerlegend")) { - layerLegend = g.config.tool_layerlegend; - } - return layerLegend; - }); - - has.add("layers-opacity", function (g) { - var opacity = false; - for (var i = 0; i < g.config.tools.length; i++) { - if (g.config.tools[i].name === "layers") { - opacity = g.config.tools[i].opacityslider; - break; - } - } - //overwrite the default with app settings - if (g.config.hasOwnProperty("tool_opacity")) { - opacity = g.config.tool_opacity; - } - return opacity; - }); - - has.add("legend", function (g) { - var legend = getTool("legend", g.config); - //overwrite the default with app settings - if (g.config.hasOwnProperty("tool_legend")) { - legend = g.config.tool_legend; - } - return legend; - }); - - has.add("locate", function (g) { - var location = has("native-gelocation"); - if (location) { - location = g.config.locate || false; - if (g.config.hasOwnProperty("tool_locate")) { - location = g.config.tool_locate; - } - } - return location; - }); - - - has.add("measure", function (g) { - var measure = getTool("measure", g.config); - //overwrite the default with app settings - if (g.config.hasOwnProperty("tool_measure")) { - measure = g.config.tool_measure; - } - return measure; - }); - has.add("overview", function (g) { - var overview = getTool("overview", g.config); - //overwrite the default with app settings - if (g.config.hasOwnProperty("tool_overview")) { - overview = g.config.tool_overview; - } - return overview; - }); - has.add("print", function (g) { - var print = getTool("print", g.config); - //overwrite the default with app settings - if (g.config.hasOwnProperty("tool_print")) { - print = g.config.tool_print; - } - if (print) { - //is there a print service defined? If not set print to false - if (g.config.helperServices.printTask.url === null) { - print = false; - } - } - - return print; - }); - - has.add("print-legend", function (g) { - var printLegend = false; - for (var i = 0; i < g.config.tools.length; i++) { - if (g.config.tools[i].name === "print") { - printLegend = g.config.tools[i].legend; - break; - } - } - //overwrite the default with app settings - if (g.config.hasOwnProperty("tool_print_legend")) { - printLegend = g.config.tool_print_legend; - } - return printLegend; - }); - - has.add("print-layouts", function (g) { - var printLayouts = false; - - for (var i = 0; i < g.config.tools.length; i++) { - if (g.config.tools[i].name === "print") { - printLayouts = g.config.tools[i].layouts; - break; - } - } - //overwrite the default with app settings - if (g.config.hasOwnProperty("tool_print_layouts")) { - printLayouts = g.config.tool_print_layouts; - } - return printLayouts; - }); - - has.add("share", function (g) { - var share = getTool("share", g.config); - //overwrite the default with app settings - if (g.config.hasOwnProperty("tool_share")) { - share = g.config.tool_share; - } - return share; - }); - - /*Geolocation Feature Detection*/ - has.add("native-gelocation", function (g) { - return has("native-navigator") && ("geolocation" in g.navigator); - }); - has.add("native-navigator", function (g) { - return ("navigator" in g); - }); - - - return has; -}); \ No newline at end of file +define(["dojo/has", "esri/lang", "dojo/_base/array"], function(has, esriLang, array) { + var getTool = function(name, config) { + var tool = false; + for (var i = 0; i < config.tools.length; i++) { + if (config.tools[i].name === name) { + tool = config.tools[i].enabled; + break; + } + } + return tool; + }; + + /*App capabilities*/ + has.add("search", function(g) { + var search = g.config.search || false; + //overwrite the default with app settings + if (g.config.hasOwnProperty("tool_search")) { + search = g.config.tool_search; + } + return search; + }); /*Toolbar tools*/ + has.add("basemap", function(g) { + var basemap = getTool("basemap", g.config); + //overwrite the default with app settings + if (g.config.hasOwnProperty("tool_basemap")) { + basemap = g.config.tool_basemap; + } + return basemap; + }); + has.add("bookmarks", function(g) { + var bookmarks = getTool("bookmarks", g.config); + //overwrite the default with app settings + if (g.config.hasOwnProperty("tool_bookmarks")) { + bookmarks = g.config.tool_bookmarks; + } + return bookmarks; + }); + has.add("details", function(g) { + var details = getTool("details", g.config); + //overwrite the default with app settings + if (g.config.hasOwnProperty("tool_details")) { + details = g.config.tool_details; + } + return details; + }); + has.add("edit", function(g) { + var edit = getTool("edit", g.config); + //overwrite the default with app settings + if (g.config.hasOwnProperty("tool_edit")) { + edit = g.config.tool_edit; + } + // Make sure user priv if exists allows edtiing + if (esriLang.isDefined(g.config.userPrivileges)) { + if (array.indexOf(g.config.userPrivileges, "features:user:edit") === -1) { + edit = false; + } + } + return edit; + }); + has.add("edit-toolbar", function(g) { + var toolbar = false; + + for (var i = 0; i < g.config.tools.length; i++) { + if (g.config.tools[i].name === "edit") { + toolbar = g.config.tools[i].toolbar; + break; + } + } + //overwrite the default with app settings + if (g.config.hasOwnProperty("tool_edit_toolbar")) { + toolbar = g.config.tool_edit_toolbar; + } + return toolbar; + }); + has.add("scalebar", function(g) { + var scalebar = g.config.scalebar || false; + //overwrite the default with app settings + if (g.config.hasOwnProperty("scalebar")) { + scalebar = g.config.scalebar; + } + return scalebar; + }); + has.add("home", function(g) { + var home = g.config.home || false; + //overwrite the default with app settings + if (g.config.hasOwnProperty("tool_home")) { + home = g.config.tool_home; + } + return home; + }); + has.add("layers", function(g) { + var layers = getTool("layers", g.config); + //overwrite the default with app settings + if (g.config.hasOwnProperty("tool_layers")) { + layers = g.config.tool_layers; + } + return layers; + }); + + has.add("layers-sublayers", function(g) { + var subLayers = false; + for (var i = 0; i < g.config.tools.length; i++) { + if (g.config.tools[i].name === "layers") { + subLayers = g.config.tools[i].sublayers; + break; + } + } + //overwrite the default with app settings + if (g.config.hasOwnProperty("tool_sublayers")) { + subLayers = g.config.tool_sublayers; + } + return subLayers; + }); + has.add("layers-legend", function(g) { + var layerLegend = false; + for (var i = 0; i < g.config.tools.length; i++) { + if (g.config.tools[i].name === "layers") { + layerLegend = g.config.tools[i].legend; + break; + } + } + //overwrite the default with app settings + if (g.config.hasOwnProperty("tool_layerlegend")) { + layerLegend = g.config.tool_layerlegend; + } + return layerLegend; + }); + + has.add("layers-opacity", function(g) { + var opacity = false; + for (var i = 0; i < g.config.tools.length; i++) { + if (g.config.tools[i].name === "layers") { + opacity = g.config.tools[i].opacityslider; + break; + } + } + //overwrite the default with app settings + if (g.config.hasOwnProperty("tool_opacity")) { + opacity = g.config.tool_opacity; + } + return opacity; + }); + + has.add("legend", function(g) { + var legend = getTool("legend", g.config); + //overwrite the default with app settings + if (g.config.hasOwnProperty("tool_legend")) { + legend = g.config.tool_legend; + } + return legend; + }); + + has.add("locate", function(g) { + var location = has("native-gelocation"); + if (location) { + location = g.config.locate || false; + if (g.config.hasOwnProperty("tool_locate")) { + location = g.config.tool_locate; + } + } + return location; + }); + + + has.add("measure", function(g) { + var measure = getTool("measure", g.config); + //overwrite the default with app settings + if (g.config.hasOwnProperty("tool_measure")) { + measure = g.config.tool_measure; + } + return measure; + }); + has.add("overview", function(g) { + var overview = getTool("overview", g.config); + //overwrite the default with app settings + if (g.config.hasOwnProperty("tool_overview")) { + overview = g.config.tool_overview; + } + return overview; + }); + has.add("print", function(g) { + var print = getTool("print", g.config); + //overwrite the default with app settings + if (g.config.hasOwnProperty("tool_print")) { + print = g.config.tool_print; + } + if (print) { + //is there a print service defined? If not set print to false + if (g.config.helperServices.printTask.url === null) { + print = false; + } + } + + return print; + }); + + has.add("print-legend", function(g) { + var printLegend = false; + for (var i = 0; i < g.config.tools.length; i++) { + if (g.config.tools[i].name === "print") { + printLegend = g.config.tools[i].legend; + break; + } + } + //overwrite the default with app settings + if (g.config.hasOwnProperty("tool_print_legend")) { + printLegend = g.config.tool_print_legend; + } + return printLegend; + }); + + has.add("print-layouts", function(g) { + var printLayouts = false; + + for (var i = 0; i < g.config.tools.length; i++) { + if (g.config.tools[i].name === "print") { + printLayouts = g.config.tools[i].layouts; + break; + } + } + //overwrite the default with app settings + if (g.config.hasOwnProperty("tool_print_layouts")) { + printLayouts = g.config.tool_print_layouts; + } + return printLayouts; + }); + + has.add("share", function(g) { + var share = getTool("share", g.config); + //overwrite the default with app settings + if (g.config.hasOwnProperty("tool_share")) { + share = g.config.tool_share; + } + return share; + }); + has.add("share-embed", function(g) { + var share_embed = false; + + for (var i = 0; i < g.config.tools.length; i++) { + if (g.config.tools[i].name === "share") { + share_embed = g.config.tools[i].embed; + break; + } + } + //overwrite the default with app settings + if (g.config.hasOwnProperty("tool_share_embed")) { + share_embed = g.config.tool_share_embed; + } + return share_embed; + }); + /*Geolocation Feature Detection*/ + has.add("native-gelocation", function(g) { + return has("native-navigator") && ("geolocation" in g.navigator); + }); + has.add("native-navigator", function(g) { + return ("navigator" in g); + }); + + + return has; +}); diff --git a/js/main.js b/js/main.js index 70a30158..7a5718a7 100755 --- a/js/main.js +++ b/js/main.js @@ -63,7 +63,7 @@ define([ "esri/geometry/Extent", "esri/layers/FeatureLayer" -], function( +], function ( ready, JSON, esriBundle, @@ -92,1227 +92,1328 @@ define([ Extent, FeatureLayer ) { - return declare(null, { - config: {}, - color: null, - theme: null, - map: null, - mapExt: null, - editorDiv: null, - editor: null, - editableLayers: null, - focusHandle: null, - blurHandle: null, - timeFormats: ["shortDateShortTime", "shortDateLEShortTime", - "shortDateShortTime24", "shortDateLEShortTime24", - "shortDateLongTime", "shortDateLELongTime", - "shortDateLongTime24", "shortDateLELongTime24" - ], - startup: function(config) { - // Set lang attribute to current locale - document.documentElement.lang = kernel.locale; - - // config will contain application and user defined info for the template such as i18n strings, the web map id - // and application id and any url parameters and any application specific configuration information. - if (config) { - this.config = config; - if (this.config.sharedThemeConfig && this.config.sharedThemeConfig.attributes && this.config.sharedThemeConfig.attributes.theme) { - var sharedTheme = this.config.sharedThemeConfig.attributes; - this.config.logo = sharedTheme.layout.header.component.settings.logoUrl || sharedTheme.theme.logo.small || null; - this.config.color = sharedTheme.theme.text.color; - this.config.theme = sharedTheme.theme.body.bg; - } - this.color = this._setColor(this.config.color); - this.theme = this._setColor(this.config.theme); - this.iconColor = this._setColor(this.config.iconColor); - - // Create and add custom style sheet - if (this.config.customstyle) { - var style = document.createElement("style"); - style.appendChild(document.createTextNode(this.config.customstyle)); - document.head.appendChild(style); - } + return declare(null, { + config: {}, + color: null, + theme: null, + map: null, + mapExt: null, + editorDiv: null, + editor: null, + editableLayers: null, + focusHandle: null, + blurHandle: null, + extentHandle: null, + shareDialog: null, + once: true, + timeFormats: ["shortDateShortTime", "shortDateLEShortTime", + "shortDateShortTime24", "shortDateLEShortTime24", + "shortDateLongTime", "shortDateLELongTime", + "shortDateLongTime24", "shortDateLELongTime24" + ], + startup: function (config) { + // Set lang attribute to current locale + document.documentElement.lang = kernel.locale; + + // config will contain application and user defined info for the template such as i18n strings, the web map id + // and application id and any url parameters and any application specific configuration information. + if (config) { + this.config = config; + if (this.config.sharedThemeConfig && this.config.sharedThemeConfig.attributes && this.config.sharedThemeConfig.attributes.theme) { + var sharedTheme = this.config.sharedThemeConfig.attributes; + this.config.logo = sharedTheme.layout.header.component.settings.logoUrl || sharedTheme.theme.logo.small || null; + this.config.color = sharedTheme.theme.text.color; + this.config.theme = sharedTheme.theme.body.bg; + } + this.color = this._setColor(this.config.color); + this.theme = this._setColor(this.config.theme); + this.iconColor = this._setColor(this.config.iconColor); + + // Apply custom theme css + var customTheme = document.createElement("link"); + customTheme.setAttribute("rel", "stylesheet"); + customTheme.setAttribute("type", "text/css"); + customTheme.setAttribute("href", "css/theme/" + this.config.customLayout + ".css"); + document.head.appendChild(customTheme); + //domClass.add(document.body, this.config.customLayout); + + // Create and add custom style sheet + if (this.config.customstyle) { + var style = document.createElement("style"); + style.appendChild(document.createTextNode(this.config.customstyle)); + document.head.appendChild(style); + } - // document ready - ready(lang.hitch(this, function() { - //supply either the webmap id or, if available, the item info - var itemInfo = this.config.itemInfo || this.config.webmap; - - var mapParams = new MapUrlParams({ - center: this.config.center || null, - extent: this.config.extent || null, - level: this.config.level || null, - marker: this.config.marker || null, - mapSpatialReference: itemInfo.itemData.spatialReference, - defaultMarkerSymbol: this.config.markerSymbol, - defaultMarkerSymbolWidth: this.config.markerSymbolWidth, - defaultMarkerSymbolHeight: this.config.markerSymbolHeight, - geometryService: this.config.helperServices.geometry - .url - }); + // document ready + ready(lang.hitch(this, function () { + //supply either the webmap id or, if available, the item info + var itemInfo = this.config.itemInfo || this.config.webmap; + + var mapParams = new MapUrlParams({ + center: this.config.center || null, + extent: this.config.extent || null, + level: this.config.level || null, + marker: this.config.marker || null, + mapSpatialReference: itemInfo.itemData.spatialReference, + defaultMarkerSymbol: this.config.markerSymbol, + defaultMarkerSymbolWidth: this.config.markerSymbolWidth, + defaultMarkerSymbolHeight: this.config.markerSymbolHeight, + geometryService: this.config.helperServices.geometry + .url + }); - mapParams.processUrlParams().then(lang.hitch(this, - function(urlParams) { - if (!this.config.showSlider) { - urlParams.mapOptions.slider = false; - } - this._createWebMap(itemInfo, urlParams); - }), lang.hitch(this, function(error) { - this.reportError(error); - })); + mapParams.processUrlParams().then(lang.hitch(this, + function (urlParams) { + if (!this.config.showSlider) { + urlParams.mapOptions.slider = false; + } + this._createWebMap(itemInfo, urlParams); + }), lang.hitch(this, function (error) { + this.reportError(error); + })); - })); - } else { - var error = new Error("Main:: Config is not defined"); - this.reportError(error); - } - }, - - reportError: function(error) { - // remove loading class from body - domClass.remove(document.body, "app-loading"); - domClass.add(document.body, "app-error"); - // an error occurred - notify the user. In this example we pull the string from the - // resource.js file located in the nls folder because we've set the application up - // for localization. If you don't need to support multiple languages you can hardcode the - // strings here and comment out the call in index.html to get the localization strings. - // set message - var node = dom.byId("loading_message"); - if (node) { - if (this.config && this.config.i18n) { - node.innerHTML = this.config.i18n.map.error + ": " + error.message; + })); } else { - node.innerHTML = "Unable to create map: " + error.message; + var error = new Error("Main:: Config is not defined"); + this.reportError(error); } - } - }, - // Map is ready - _mapLoaded: function() { - query(".esriSimpleSlider").style("backgroundColor", this.theme.toString()); - - // remove loading class from body - domClass.remove(document.body, "app-loading"); - if (!this.config.popupPanel) { - //on(this.map.infoWindow, "selection-change", lang.hitch(this, this._movePopup)); - on(window, "orientationchange", lang.hitch(this, this._adjustPopupSize)); - this._adjustPopupSize(); - } - - }, - // Create UI - _createUI: function() { - domStyle.set("panelPages", "visibility", "hidden"); - //Add tools to the toolbar. The tools are listed in the defaults.js file - var toolbar = new Toolbar(this.config); - toolbar.startup().then(lang.hitch(this, function() { - - // set map so that it can be repositioned when page is scrolled - toolbar.map = this.map; - - if (this.config.popupPanel) { - require(["application/PopupPanel"], lang.hitch(this, - function(PopupPanel) { - this.map.infoWindow.set("popupWindow", false); - var popupPane = new PopupPanel({ - popup: this.map.infoWindow, - srcNode: "popupContainer", - toolbar: toolbar - }); - popupPane.initPopup(); - })); + }, + + reportError: function (error) { + // remove loading class from body + domClass.remove(document.body, "app-loading"); + domClass.add(document.body, "app-error"); + // an error occurred - notify the user. In this example we pull the string from the + // resource.js file located in the nls folder because we've set the application up + // for localization. If you don't need to support multiple languages you can hardcode the + // strings here and comment out the call in index.html to get the localization strings. + // set message + var node = dom.byId("loading_message"); + if (node) { + if (this.config && this.config.i18n) { + node.innerHTML = this.config.i18n.map.error + ": " + error.message; + } else { + node.innerHTML = "Unable to create map: " + error.message; + } + } + }, + // Map is ready + _mapLoaded: function () { + query(".esriSimpleSlider").style("backgroundColor", this.theme.toString()); + + // remove loading class from body + domClass.remove(document.body, "app-loading"); + if (!this.config.popupPanel) { + //on(this.map.infoWindow, "selection-change", lang.hitch(this, this._movePopup)); + on(window, "orientationchange", lang.hitch(this, this._adjustPopupSize)); + this._adjustPopupSize(); } - var toolList = []; - for (var i = 0; i < this.config.tools.length; i++) { - switch (this.config.tools[i].name) { - case "legend": - toolList.push(this._addLegend(this.config.tools[i], - toolbar, "medium")); - break; - case "bookmarks": - toolList.push(this._addBookmarks(this.config.tools[ - i], toolbar, "medium")); - break; - case "layers": - toolList.push(this._addLayers(this.config.tools[i], - toolbar, "medium")); - break; - case "basemap": - toolList.push(this._addBasemapGallery(this.config.tools[ - i], toolbar, "large")); - break; - case "overview": - toolList.push(this._addOverviewMap(this.config.tools[ - i], toolbar, "medium")); - break; - case "measure": - toolList.push(this._addMeasure(this.config.tools[i], - toolbar, "small")); - break; - case "edit": - toolList.push(this._addEditor(this.config.tools[i], - toolbar, "medium")); - break; - case "print": - toolList.push(this._addPrint(this.config.tools[i], - toolbar, "small")); - break; - case "details": - toolList.push(this._addDetails(this.config.tools[i], - toolbar, "medium")); - break; - case "share": - toolList.push(this._addShare(this.config.tools[i], - toolbar, "medium")); - break; - default: - break; + }, + // Create UI + _createUI: function () { + domStyle.set("panelPages", "visibility", "hidden"); + //Add tools to the toolbar. The tools are listed in the defaults.js file + var toolbar = new Toolbar(this.config); + + + toolbar.startup().then(lang.hitch(this, function () { + + // set map so that it can be repositioned when page is scrolled + toolbar.map = this.map; + + if (this.config.popupPanel) { + require(["application/PopupPanel"], lang.hitch(this, + function (PopupPanel) { + this.map.infoWindow.set("popupWindow", false); + var popupPane = new PopupPanel({ + popup: this.map.infoWindow, + srcNode: "popupContainer", + toolbar: toolbar + }); + popupPane.initPopup(); + })); } - } - all(toolList).then(lang.hitch(this, function(results) { - this._showSplashScreen(toolbar); - //If all the results are false and locate and home are also false we can hide the toolbar - var tools = array.some(results, function(r) { - return r; - }); - //No tools are specified in the configuration so hide the panel and update the title area styles - if (!tools) { - domConstruct.destroy("panelTools"); - domStyle.set("panelContent", "display", - "none"); - domStyle.set("panelTitle", "border-bottom", - "none"); - domStyle.set("panelTop", "height", "75px"); - domStyle.set("panelTitle", "margin-top", - "12px"); - this._updateTheme(); - return; + var toolList = []; + for (var i = 0; i < this.config.tools.length; i++) { + switch (this.config.tools[i].name) { + case "legend": + toolList.push(this._addLegend(this.config.tools[i], + toolbar, "medium")); + break; + case "bookmarks": + toolList.push(this._addBookmarks(this.config.tools[ + i], toolbar, "medium")); + break; + case "layers": + toolList.push(this._addLayers(this.config.tools[i], + toolbar, "medium")); + break; + case "basemap": + toolList.push(this._addBasemapGallery(this.config.tools[ + i], toolbar, "large")); + break; + case "overview": + toolList.push(this._addOverviewMap(this.config.tools[ + i], toolbar, "medium")); + break; + case "measure": + toolList.push(this._addMeasure(this.config.tools[i], + toolbar, "small")); + break; + case "edit": + toolList.push(this._addEditor(this.config.tools[i], + toolbar, "medium")); + break; + case "print": + toolList.push(this._addPrint(this.config.tools[i], + toolbar, "small")); + break; + case "details": + toolList.push(this._addDetails(this.config.tools[i], + toolbar, "medium")); + break; + case "share": + toolList.push(this._addShare(this.config.tools[i], + toolbar, "medium")); + break; + default: + break; + } } - // if no tools are active let's setup support for setting - on(toolbar, "updateTool", lang.hitch(this, - function(name) { - if (name === "measure") { - this._destroyEditor(); - this.map.setInfoWindowOnClick(false); - } else if (name === "edit") { - this._destroyEditor(); - this.map.setInfoWindowOnClick(false); - this._createEditor(); - } else { - //activate the popup and destroy editor if necessary - this._destroyEditor(); - this.map.setInfoWindowOnClick(true); + all(toolList).then(lang.hitch(this, function (results) { + this._showSplashScreen(toolbar); + //If all the results are false and locate and home are also false we can hide the toolbar + var tools = array.some(results, function (r) { + return r; + }); + //No tools are specified in the configuration so hide the panel and update the title area styles + if (!tools) { + domClass.add(document.body, "notools"); + domConstruct.destroy("panelTools"); + domStyle.set("panelContent", "display", + "none"); + domStyle.set("panelTitle", "border-bottom", + "none"); + domStyle.set("panelTop", "height", "75px"); + domStyle.set("panelTitle", "margin-top", + "12px"); + this._updateTheme(); + return; + } + // if no tools are active let's setup support for setting + on(toolbar, "updateTool", lang.hitch(this, this._updateTool)); + domStyle.set("panelPages", "visibility", "visible"); + if (this.config.customLayout === "sidebartools") { + if (toolbar.pTools.children.length && toolbar.pTools.children.length > 0) { + var h = (toolbar.pTools.children.length) * 30; + domStyle.set("panelTools", "height", h + "px"); } + } + //Now that all the tools have been added to the toolbar we can add page naviagation + //to the toolbar panel, update the color theme and set the active tool. + this.updateAriaInfo(); + toolbar.updatePageNavigation(); + this._updateTheme(); + })); + })); + }, + _updateTool: function (name) { + if (name === "measure") { + this._destroyEditor(); + this.map.setInfoWindowOnClick(false); + } else if (name === "edit") { + this._destroyEditor(); + this.map.setInfoWindowOnClick(false); + this._createEditor(); + var pageEdit = dom.byId("page_edit"); + if (pageEdit) { + domClass.remove(pageEdit, "hide"); + } + } else { + //activate the popup and destroy editor if necessary + this._destroyEditor(); + this.map.setInfoWindowOnClick(true); + } - if (has("measure") && name !== - "measure") { - query(".esriMeasurement").forEach( - lang.hitch(this, function(node) { - var m = registry.byId(node.id); - if (m) { - m.clearResult(); - m.setTool("location", false); - m.setTool("area", false); - m.setTool("distance", false); - } - })); + // Shorten the url for copied links. Do + // this once if current view isn't checked + // Do each time extent changes if extent is checked + if (name === "share") { + // clicked on share so setup extent handler + // setup extent change event if the dialog is open and check box is checked. + if (this.shareDialog) { + this.shareDialog.updateUrl(); + // if (this.shareDialog.useExtent) { + // setup extent handler + if (!this.extentHandle) { + this.extentHandle = on.pausable(this.map, "extent-change", lang.hitch(this, function () { + if (this.shareDialog.useExtent) { + this.shareDialog.updateUrl(); + } + })); + } else { + this.extentHandle.resume(); + } + // } + } + } else { + // destroy extent handler + if (this.extentHandle) { + this.extentHandle.pause(); + } + } + if (has("measure") && name !== + "measure") { + query(".esriMeasurement").forEach( + lang.hitch(this, function (node) { + var m = registry.byId(node.id); + if (m) { + m.clearResult(); + m.setTool("location", false); + m.setTool("area", false); + m.setTool("distance", false); } })); - domStyle.set("panelPages", "visibility", - "visible"); - //Now that all the tools have been added to the toolbar we can add page naviagation - //to the toolbar panel, update the color theme and set the active tool. - this.updateAriaInfo(); - toolbar.updatePageNavigation(); - this._updateTheme(); - })); - })); - }, - _setActiveTool: function(toolbar) { - if (!this.config.activeTool || this.config.activeTool === "") { - if (toolbar.pTools && toolbar.pTools.children && toolbar.pTools.children.length && toolbar.pTools.children.length > 0) { - var tool = dom.byId(toolbar.pTools.children[0].id); - domAttr.set(tool, "tabindex", "0"); - this.config.activeTool = tool.name || ""; } - } else if (this.config.activeTool) { - query(".pressed").forEach(function(n) { - focusUtil.focus(n); - }); - toolbar.activateTool(this.config.activeTool); - } - }, - _showSplashScreen: function(toolbar) { - // Setup the modal overlay if enabled - if (this.config.splashModal) { - domClass.add(document.body, "noscroll"); - domClass.remove("modal", "hide"); - domAttr.set("modal", "aria-label", this.config.splashTitle || "Splash Screen"); - // set focus to the dialog - var node = dom.byId("modal"); - focusUtil.focus(node); - - var title = this.config.splashTitle || ""; - var content = this.config.splashContent || ""; - dom.byId("modalTitle").innerHTML = title; - dom.byId("modalContent").innerHTML = content; - - dom.byId("closeOverlay").value = this.config.splashButtonText || this.config.i18n.nav.close; - - // Close button handler for the overlay - on(dom.byId("closeOverlay"), "click", lang.hitch( - this, - function() { - // set focus to active tool if we have one - this._setActiveTool(toolbar); - domClass.remove(document.body, "noscroll"); - domClass.add("modal", "hide"); - })); - this._updateTheme(); - } else { - this._setActiveTool(toolbar); - } - }, - _addBasemapGallery: function(tool, toolbar, panelClass) { - //Add the basemap gallery to the toolbar. - var deferred = new Deferred(); - if (has("basemap")) { - var basemapDiv = toolbar.createTool(tool, panelClass); - var basemap = new BasemapGallery({ - id: "basemapGallery", - bingMapsKey: this.config.orgInfo.bingKey || "", - map: this.map, - showArcGISBasemaps: true, - portalUrl: this.config.sharinghost, - basemapsGroup: this._getBasemapGroup() - }, domConstruct.create("div", {}, basemapDiv)); - basemap.startup(); - deferred.resolve(true); - } else { - deferred.resolve(false); - } - return deferred.promise; - }, - - _addBookmarks: function(tool, toolbar, panelClass) { - //Add the bookmarks tool to the toolbar. Only activated if the webmap contains bookmarks. - var deferred = new Deferred(); - if (this.config.response.itemInfo.itemData.bookmarks) { - //Conditionally load this module since most apps won't have bookmarks - require([ - "application/has-config!bookmarks?esri/dijit/Bookmarks" - ], lang.hitch(this, function(Bookmarks) { - if (!Bookmarks) { - deferred.resolve(false); - return; + if (this.config.customLayout === "default" && this.once) { + this.once = false; + var titlebox = domGeometry.getContentBox(dom.byId("panelTop")); + var mapbox = domGeometry.getContentBox(dom.byId("mapDiv")); + if (mapbox.w && titlebox.w) { + var spacer = mapbox.w - titlebox.w; + if (spacer < 350) { + domStyle.set(dom.byId("panelContent"), "top", "90px"); + } else { + domStyle.set(dom.byId("panelContent"), "top", "10px"); + } + } + } + }, + _setActiveTool: function (toolbar) { + if (!this.config.activeTool || this.config.activeTool === "") { + if (toolbar.pTools && toolbar.pTools.children && toolbar.pTools.children.length && toolbar.pTools.children.length > 0) { + var tool = dom.byId(toolbar.pTools.children[0].id); + domAttr.set(tool, "tabindex", "0"); + this.config.activeTool = tool.name || ""; } - var bookmarkDiv = toolbar.createTool(tool, panelClass); - var bookmarks = new Bookmarks({ + } else if (this.config.activeTool) { + query(".pressed").forEach(function (n) { + focusUtil.focus(n); + }); + toolbar.activateTool(this.config.activeTool); + this._updateTool(this.config.activeTool); + } + }, + _showSplashScreen: function (toolbar) { + // Setup the modal overlay if enabled + if (this.config.splashModal) { + domClass.add(document.body, "noscroll"); + domClass.remove("modal", "hide"); + domAttr.set("modal", "aria-label", this.config.splashTitle || "Splash Screen"); + // set focus to the dialog + var node = dom.byId("modal"); + focusUtil.focus(node); + + var title = this.config.splashTitle || ""; + var content = this.config.splashContent || ""; + dom.byId("modalTitle").innerHTML = title; + dom.byId("modalContent").innerHTML = content; + + dom.byId("closeOverlay").value = this.config.splashButtonText || this.config.i18n.nav.close; + + // Close button handler for the overlay + on(dom.byId("closeOverlay"), "click", lang.hitch( + this, + function () { + // set focus to active tool if we have one + this._setActiveTool(toolbar); + domClass.remove(document.body, "noscroll"); + domClass.add("modal", "hide"); + })); + this._updateTheme(); + } else { + this._setActiveTool(toolbar); + } + }, + _addBasemapGallery: function (tool, toolbar, panelClass) { + //Add the basemap gallery to the toolbar. + var deferred = new Deferred(); + if (has("basemap")) { + var basemapDiv = toolbar.createTool(tool, panelClass); + var basemap = new BasemapGallery({ + id: "basemapGallery", + bingMapsKey: this.config.orgInfo.bingKey || "", map: this.map, - bookmarks: this.config.response.itemInfo.itemData - .bookmarks - }, domConstruct.create("div", {}, bookmarkDiv)); - bookmarks.startup(); - + showArcGISBasemaps: true, + portalUrl: this.config.sharinghost, + basemapsGroup: this._getBasemapGroup() + }, domConstruct.create("div", {}, basemapDiv)); + basemap.startup(); deferred.resolve(true); + } else { + deferred.resolve(false); + } + return deferred.promise; + }, + + _addBookmarks: function (tool, toolbar, panelClass) { + //Add the bookmarks tool to the toolbar. Only activated if the webmap contains bookmarks. + var deferred = new Deferred(); + if (this.config.response.itemInfo.itemData.bookmarks) { + //Conditionally load this module since most apps won't have bookmarks + require([ + "application/has-config!bookmarks?esri/dijit/Bookmarks" + ], lang.hitch(this, function (Bookmarks) { + if (!Bookmarks) { + deferred.resolve(false); + return; + } + var bookmarkDiv = toolbar.createTool(tool, panelClass); + var bookmarks = new Bookmarks({ + map: this.map, + bookmarks: this.config.response.itemInfo.itemData + .bookmarks + }, domConstruct.create("div", {}, bookmarkDiv)); + bookmarks.startup(); - })); - - } else { - deferred.resolve(false); - } + deferred.resolve(true); - return deferred.promise; - }, - _addDetails: function(tool, toolbar, panelClass) { - //Add the default map description panel - var deferred = new Deferred(); - if (has("details")) { - var description = this.config.description || this.config.response - .itemInfo.item.description || this.config.response.itemInfo - .item.snippet; - if (description) { - var descLength = description.length; - //Change the panel class based on the string length - if (descLength < 200) { - panelClass = "small"; - } else if (descLength < 400) { - panelClass = "medium"; - } else { - panelClass = "large"; - } - var altDesc = esriLang.stripTags(description); - var detailDiv = toolbar.createTool(tool, panelClass); - domAttr.set(detailDiv, "aria-label", altDesc); - detailDiv.innerHTML = "
" + - description + "
"; - } - deferred.resolve(true); - } else { - deferred.resolve(false); - } + })); - return deferred.promise; - - }, - _addEditor: function(tool, toolbar, panelClass) { - //Add the editor widget to the toolbar if the web map contains editable layers - var deferred = new Deferred(); - this.editableLayers = this._getEditableLayers(this.config.response - .itemInfo.itemData.operationalLayers); - if (has("edit") && this.editableLayers.length > 0) { - if (this.editableLayers.length > 0) { - this.editorDiv = toolbar.createTool(tool, panelClass); - return this._createEditor(); } else { - console.log("No Editable Layers"); deferred.resolve(false); } - } else { - deferred.resolve(false); - } - return deferred.promise; - }, - _createEditor: function() { - var deferred = new Deferred(); - //Dynamically load since many apps won't have editable layers - require([ - "application/has-config!edit?esri/dijit/editing/Editor" - ], lang.hitch(this, function(Editor) { - if (!Editor) { - deferred.resolve(false); - return; - } - //add field infos if necessary. Field infos will contain hints if defined in the popup and hide fields where visible is set - //to false. The popup logic takes care of this for the info window but not the edit window. - array.forEach(this.editableLayers, lang.hitch(this, - function(layer) { - if (layer.featureLayer && layer.featureLayer.infoTemplate && - layer.featureLayer.infoTemplate.info && layer - .featureLayer.infoTemplate.info.fieldInfos) { - //only display visible fields - var fields = layer.featureLayer.infoTemplate.info - .fieldInfos; - var fieldInfos = []; - array.forEach(fields, lang.hitch(this, - function(field) { - //added support for editing date and time - if (field.format && field.format.dateFormat && - array.indexOf(this.timeFormats, - field.format.dateFormat) > -1) { - field.format = { - time: true - }; - } - //Only add visible fields - if (field.visible) { - fieldInfos.push(field); - } - })); - layer.fieldInfos = fieldInfos; + return deferred.promise; + }, + _addDetails: function (tool, toolbar, panelClass) { + //Add the default map description panel + var deferred = new Deferred(); + if (has("details")) { + var description = this.config.description || this.config.response + .itemInfo.item.description || this.config.response.itemInfo + .item.snippet; + if (description) { + var descLength = description.length; + //Change the panel class based on the string length + if (descLength < 200) { + panelClass = "small"; + } else if (descLength < 400) { + panelClass = "medium"; + } else { + panelClass = "large"; } - })); - var settings = { - map: this.map, - layerInfos: this.editableLayers, - toolbarVisible: has("edit-toolbar") - }; - this.map.enableSnapping(); - //show the editor panel so layers render in the widget correctly. - domClass.remove(dom.byId("page_edit"), "hide"); - this.editor = new Editor({ - settings: settings - }, domConstruct.create("div", {}, this.editorDiv)); - this.editor.on("load", lang.hitch(this, function() { - // hide the panel - domClass.add(dom.byId("page_edit"), "hide"); - deferred.resolve(true); - }), function(error) { - domClass.add(dom.byId("page_edit"), "hide"); + var altDesc = esriLang.stripTags(description); + var detailDiv = toolbar.createTool(tool, panelClass); + domAttr.set(detailDiv, "aria-label", altDesc); + detailDiv.innerHTML = "
" + + description + "
"; + } deferred.resolve(true); - }); - this.editor.startup(); - })); - return deferred.promise; - }, - _destroyEditor: function() { - if (this.editor) { - this.editor.destroy(); - this.editor = null; - } - }, - _addLayers: function(tool, toolbar, panelClass) { - //Toggle layer visibility if web map has operational layers - var deferred = new Deferred(); - var layers = this.config.response.itemInfo.itemData.operationalLayers; - - if (layers.length === 0) { - deferred.resolve(false); - } else { - if (has("layers")) { - //Use small panel class if layer layer is less than 5 - if (layers.length < 5) { - panelClass = "small"; - } else if (layers.length < 15) { - panelClass = "medium"; + } else { + deferred.resolve(false); + } + + return deferred.promise; + + }, + _addEditor: function (tool, toolbar, panelClass) { + //Add the editor widget to the toolbar if the web map contains editable layers + var deferred = new Deferred(); + this.editableLayers = this._getEditableLayers(this.config.response + .itemInfo.itemData.operationalLayers); + if (has("edit") && this.editableLayers.length > 0) { + if (this.editableLayers.length > 0) { + this.editorDiv = toolbar.createTool(tool, panelClass); + return this._createEditor(); } else { - panelClass = "large"; + console.log("No Editable Layers"); + deferred.resolve(false); } - var layersDiv = toolbar.createTool(tool, panelClass); + } else { + deferred.resolve(false); + } + return deferred.promise; + }, + _createEditor: function () { + var deferred = new Deferred(); + //Dynamically load since many apps won't have editable layers + require([ + "application/has-config!edit?esri/dijit/editing/Editor" + ], lang.hitch(this, function (Editor) { + if (!Editor) { + deferred.resolve(false); + return; + } + //add field infos if necessary. Field infos will contain hints if defined in the popup and hide fields where visible is set + //to false. The popup logic takes care of this for the info window but not the edit window. + array.forEach(this.editableLayers, lang.hitch(this, + function (layer) { + if (layer.featureLayer && layer.featureLayer.infoTemplate && + layer.featureLayer.infoTemplate.info && layer + .featureLayer.infoTemplate.info.fieldInfos) { + //only display visible fields + var fields = layer.featureLayer.infoTemplate.info + .fieldInfos; + var fieldInfos = []; + array.forEach(fields, lang.hitch(this, + function (field) { + //added support for editing date and time + if (field.format && field.format.dateFormat && + array.indexOf(this.timeFormats, + field.format.dateFormat) > -1) { + field.format = { + time: true + }; + } + //Only add visible fields + if (field.visible) { + fieldInfos.push(field); + } + })); - var toc = new LayerList({ + layer.fieldInfos = fieldInfos; + } + })); + var settings = { map: this.map, - showSubLayers: has("layers-sublayers"), - subLayers: has("layers-sublayers"), - showLegend: has("layers-legend"), - showOpacitySlider: has("layers-opacity"), - layers: arcgisUtils.getLayerList(this.config.response) - }, domConstruct.create("div", {}, layersDiv)); - - toc.startup(); - - toc.on("toggle", lang.hitch(this, function() { - var legend = registry.byId("mapLegend"); - if (legend) { - legend.refresh(); + layerInfos: this.editableLayers, + toolbarVisible: has("edit-toolbar") + }; + this.map.enableSnapping(); + //show the editor panel so layers render in the widget correctly. + var editNode = dom.byId("page_edit"); + if (editNode) { + domClass.remove(dom.byId("page_edit"), "hide"); + } + this.editor = new Editor({ + settings: settings + }, domConstruct.create("div", {}, this.editorDiv)); + this.editor.on("load", lang.hitch(this, function () { + // hide the panel + if (editNode) { + domClass.add(editNode, "hide"); } - })); - deferred.resolve(true); + deferred.resolve(true); + }), function (error) { + if (editNode) { + domClass.add(editNode, "hide"); + } + deferred.resolve(true); + }); + this.editor.startup(); + })); + return deferred.promise; + }, + _destroyEditor: function () { + if (this.editor) { + this.editor.destroy(); + this.editor = null; + } + }, + _addLayers: function (tool, toolbar, panelClass) { + //Toggle layer visibility if web map has operational layers + var deferred = new Deferred(); + var layers = this.config.response.itemInfo.itemData.operationalLayers; + + if (layers.length === 0) { + deferred.resolve(false); } else { + if (has("layers")) { + //Use small panel class if layer layer is less than 5 + if (layers.length < 5) { + panelClass = "small"; + } else if (layers.length < 15) { + panelClass = "medium"; + } else { + panelClass = "large"; + } + var layersDiv = toolbar.createTool(tool, panelClass); + + var toc = new LayerList({ + map: this.map, + showSubLayers: has("layers-sublayers"), + subLayers: has("layers-sublayers"), + showLegend: has("layers-legend"), + showOpacitySlider: has("layers-opacity"), + layers: arcgisUtils.getLayerList(this.config.response) + }, domConstruct.create("div", {}, layersDiv)); + + toc.startup(); + + toc.on("toggle", lang.hitch(this, function () { + var legend = registry.byId("mapLegend"); + if (legend) { + legend.refresh(); + } + })); + deferred.resolve(true); + } else { + deferred.resolve(false); + } + } + return deferred.promise; + }, + _addLegend: function (tool, toolbar, panelClass) { + //Add the legend tool to the toolbar. Only activated if the web map has operational layers. + var deferred = new Deferred(); + var layers = arcgisUtils.getLegendLayers(this.config.response); + if (layers.length === 0) { deferred.resolve(false); + } else { + if (has("legend")) { + var legendDiv = toolbar.createTool(tool, panelClass); + domAttr.set(legendDiv, "tabindex", 0); + var legend = new Legend({ + map: this.map, + id: "mapLegend", + layerInfos: layers + }, domConstruct.create("div", {}, legendDiv)); + + domClass.add(legend.domNode, "legend"); + legend.startup(); + + deferred.resolve(true); + + } else { + deferred.resolve(false); + } } - } - return deferred.promise; - }, - _addLegend: function(tool, toolbar, panelClass) { - //Add the legend tool to the toolbar. Only activated if the web map has operational layers. - var deferred = new Deferred(); - var layers = arcgisUtils.getLegendLayers(this.config.response); - if (layers.length === 0) { - deferred.resolve(false); - } else { - if (has("legend")) { - var legendDiv = toolbar.createTool(tool, panelClass); - domAttr.set(legendDiv, "tabindex", 0); - var legend = new Legend({ + return deferred.promise; + }, + _addMeasure: function (tool, toolbar, panelClass) { + //Add the measure widget to the toolbar. + var deferred = new Deferred(); + if (has("measure")) { + + var measureDiv = toolbar.createTool(tool, panelClass); + domAttr.set(measureDiv, "tabindex", "0"); + var areaUnit = (this.config.units === "metric") ? + "esriSquareKilometers" : "esriSquareMiles"; + var lengthUnit = (this.config.units === "metric") ? + "esriKilometers" : "esriMiles"; + + var measure = new Measurement({ map: this.map, - id: "mapLegend", - layerInfos: layers - }, domConstruct.create("div", {}, legendDiv)); + defaultAreaUnit: areaUnit, + defaultLengthUnit: lengthUnit + }, domConstruct.create("div", {}, measureDiv)); - domClass.add(legend.domNode, "legend"); - legend.startup(); + measure.startup(); + query(".esriMeasurement .dijitButtonNode").forEach( + function (node) { + domAttr.set(node, "tabindex", "0"); + domAttr.set(node, "role", "button"); + }); + query( + ".esriMeasurement .dijitButtonNode .dijitButtonContents") + .forEach(function (node) { + domAttr.set(node, "tabindex", "-1"); + }); deferred.resolve(true); - } else { deferred.resolve(false); } - } - return deferred.promise; - }, - _addMeasure: function(tool, toolbar, panelClass) { - //Add the measure widget to the toolbar. - var deferred = new Deferred(); - if (has("measure")) { - - var measureDiv = toolbar.createTool(tool, panelClass); - domAttr.set(measureDiv, "tabindex", "0"); - var areaUnit = (this.config.units === "metric") ? - "esriSquareKilometers" : "esriSquareMiles"; - var lengthUnit = (this.config.units === "metric") ? - "esriKilometers" : "esriMiles"; - - var measure = new Measurement({ - map: this.map, - defaultAreaUnit: areaUnit, - defaultLengthUnit: lengthUnit - }, domConstruct.create("div", {}, measureDiv)); - - measure.startup(); - - query(".esriMeasurement .dijitButtonNode").forEach( - function(node) { - domAttr.set(node, "tabindex", "0"); - domAttr.set(node, "role", "button"); - }); - query( - ".esriMeasurement .dijitButtonNode .dijitButtonContents") - .forEach(function(node) { - domAttr.set(node, "tabindex", "-1"); - }); - deferred.resolve(true); - } else { - deferred.resolve(false); - } - return deferred.promise; - }, - _addOverviewMap: function(tool, toolbar, panelClass) { - //Add the overview map to the toolbar - var deferred = new Deferred(); - - if (has("overview")) { - var ovMapDiv = toolbar.createTool(tool, panelClass); - domStyle.set(ovMapDiv, { - "height": "100%", - "width": "100%" - }); - domAttr.set("pageBody_overview", "tabindex", "-1"); - - on.once(dom.byId("panelTool_overview"), "focus", lang.hitch( - this, - function() { - var ovMap = new OverviewMap({ - id: "overviewMap", - map: this.map, - height: "auto" - }, domConstruct.create("div", {}, ovMapDiv)); - ovMap.startup(); + return deferred.promise; + }, + _addOverviewMap: function (tool, toolbar, panelClass) { + //Add the overview map to the toolbar + var deferred = new Deferred(); + + if (has("overview")) { + var ovMapDiv = toolbar.createTool(tool, panelClass); + domStyle.set(ovMapDiv, { + "height": "100%", + "width": "100%" + }); + domAttr.set("pageBody_overview", "tabindex", "-1"); - query(".ovwHighlight").forEach(function(node) { - domAttr.set(node, "tabindex", "0"); - domAttr.set(node, "aria-label", this.config.i18n.map.overviewDetails); - }); - })); - on(this.map, "layer-add", lang.hitch(this, function(args) { - //delete and re-create the overview map if the basemap gallery changes - if (args.layer.hasOwnProperty( + on.once(dom.byId("panelTool_overview"), "focus", lang.hitch( + this, + function () { + var ovMap = new OverviewMap({ + id: "overviewMap", + map: this.map, + height: "auto" + }, domConstruct.create("div", {}, ovMapDiv)); + ovMap.startup(); + + query(".ovwHighlight").forEach(function (node) { + domAttr.set(node, "tabindex", "0"); + domAttr.set(node, "aria-label", this.config.i18n.map.overviewDetails); + }); + })); + on(this.map, "layer-add", lang.hitch(this, function (args) { + //delete and re-create the overview map if the basemap gallery changes + if (args.layer.hasOwnProperty( "_basemapGalleryLayerType") && args.layer._basemapGalleryLayerType === - "basemap") { - var ov = registry.byId("overviewMap"); - if (ov) { - ov.destroy(); - } - on.once(dom.byId("panelTool_overview"), "focus", - lang.hitch(this, function() { - var ovMap = new OverviewMap({ - id: "overviewMap", - map: this.map, - //height: panelHeight, - visible: false - }, domConstruct.create("div", {}, - ovMapDiv)); - - ovMap.startup(); - })); - - } - })); - deferred.resolve(true); - } else { - deferred.resolve(false); - } + "basemap") { + var ov = registry.byId("overviewMap"); + if (ov) { + ov.destroy(); + } + on.once(dom.byId("panelTool_overview"), "focus", + lang.hitch(this, function () { + var ovMap = new OverviewMap({ + id: "overviewMap", + map: this.map, + //height: panelHeight, + visible: false + }, domConstruct.create("div", {}, + ovMapDiv)); + + ovMap.startup(); + })); - return deferred.promise; - }, - _addPrint: function(tool, toolbar, panelClass) { - //Add the print widget to the toolbar - var deferred = new Deferred(); - require(["application/has-config!print?application/PrintConfig", - "application/has-config!print?esri/dijit/Print" - ], lang.hitch(this, function(PrintConfig, Print) { - if (!PrintConfig || !Print) { + } + })); + deferred.resolve(true); + } else { deferred.resolve(false); - return; } - var printDiv = toolbar.createTool(tool, panelClass); - var format = null; - array.forEach(this.config.tools, function(tool) { - if (tool.name === "print") { - format = tool.format; + + return deferred.promise; + }, + _addPrint: function (tool, toolbar, panelClass) { + //Add the print widget to the toolbar + var deferred = new Deferred(); + require(["application/has-config!print?application/PrintConfig", + "application/has-config!print?esri/dijit/Print" + ], lang.hitch(this, function (PrintConfig, Print) { + if (!PrintConfig || !Print) { + deferred.resolve(false); + return; } - }); - if (this.config.hasOwnProperty("tool_print_format")) { - format = this.config.tool_print_format; - } - var layoutOptions = { - "titleText": this.config.title, - "scalebarUnit": this.config.units, - "legendLayers": [] - }; - var printOptions = { - legendLayers: this.config.response, - layouts: has("print-layouts"), - format: format.toLowerCase() || null, - printTaskUrl: this.config.helperServices.printTask.url, - printi18n: this.config.i18n.tools.print, - layoutOptions: layoutOptions - }; - if (this.config.helperServices.printTask && this.config + var printDiv = toolbar.createTool(tool, panelClass); + var format = null; + array.forEach(this.config.tools, function (tool) { + if (tool.name === "print") { + format = tool.format; + } + }); + if (this.config.hasOwnProperty("tool_print_format")) { + format = this.config.tool_print_format; + } + var layoutOptions = { + "titleText": this.config.title, + "scalebarUnit": this.config.units, + "legendLayers": [] + }; + var printOptions = { + legendLayers: this.config.response, + layouts: has("print-layouts"), + format: format.toLowerCase() || null, + printTaskUrl: this.config.helperServices.printTask.url, + printi18n: this.config.i18n.tools.print, + layoutOptions: layoutOptions + }; + if (this.config.helperServices.printTask && this.config .helperServices.printTask.templates) { - printOptions.templates = this.config.helperServices.printTask - .templates; - } - var printConfig = new PrintConfig(printOptions); - printConfig.createPrintOptions().then(lang.hitch(this, - function(results) { - var templates = results.templates; - var legendLayers = results.legendLayers; - - //add a text box so users can enter a custom title - var titleNode = domConstruct.create("input", { - id: "print_title", - className: "printTitle", - tabindex: "0", - role: "textbox", - type: "text", - "aria-label": this.config.i18n.tools.print - .titlePrompt, - placeholder: this.config.i18n.tools.print - .titlePrompt - }, domConstruct.create("div")); - - domConstruct.place(titleNode, printDiv); - if (has("print-legend")) { - var legendNode = domConstruct.create("input", { - id: "legend_ck", - role: "checkbox", + printOptions.templates = this.config.helperServices.printTask + .templates; + } + var printConfig = new PrintConfig(printOptions); + printConfig.createPrintOptions().then(lang.hitch(this, + function (results) { + var templates = results.templates; + var legendLayers = results.legendLayers; + + //add a text box so users can enter a custom title + var titleNode = domConstruct.create("input", { + id: "print_title", + className: "printTitle", tabindex: "0", - className: "checkbox", - type: "checkbox", - checked: false - }, domConstruct.create("div", { - "class": "checkbox" - })); + role: "textbox", + type: "text", + "aria-label": this.config.i18n.tools.print + .titlePrompt, + placeholder: this.config.i18n.tools.print + .titlePrompt + }, domConstruct.create("div")); - var labelNode = domConstruct.create("label", { - "for": "legend_ck", - "className": "checkbox", - "innerHTML": " " + this.config.i18n.tools + domConstruct.place(titleNode, printDiv); + if (has("print-legend")) { + var legendNode = domConstruct.create("input", { + id: "legend_ck", + role: "checkbox", + tabindex: "0", + className: "checkbox", + type: "checkbox", + checked: false + }, domConstruct.create("div", { + "class": "checkbox" + })); + + var labelNode = domConstruct.create("label", { + "for": "legend_ck", + "className": "checkbox", + "innerHTML": " " + this.config.i18n.tools .print.legend - }, domConstruct.create("div")); - domConstruct.place(legendNode, printDiv); - domConstruct.place(labelNode, printDiv); - - on(legendNode, "change", lang.hitch(this, - function(arg) { - if (legendNode.checked && - legendLayers.length > 0) { - layoutOptions.legendLayers = legendLayers; - } else { - layoutOptions.legendLayers = []; + }, domConstruct.create("div")); + domConstruct.place(legendNode, printDiv); + domConstruct.place(labelNode, printDiv); + + on(legendNode, "change", lang.hitch(this, + function (arg) { + if (legendNode.checked && + legendLayers.length > 0) { + layoutOptions.legendLayers = legendLayers; + } else { + layoutOptions.legendLayers = []; + } + array.forEach(this.print.templates, + lang.hitch(this, function ( + template) { + template.layoutOptions = layoutOptions; + })); + })); + + } else { + domStyle.set("pageBody_print", "height", + "90px"); + } + var printOptions = { + map: this.map, + id: "printButton", + url: this.config.helperServices.printTask.url + }; + if (templates) { + printOptions.templates = templates; + } + // Add a loading indicator to the Printing label + esriBundle.widgets.print.NLS_printing = esriBundle.widgets.print.NLS_printing + + " "; + this.print = new Print(printOptions, + domConstruct.create("div")); + + domConstruct.place(this.print.printDomNode, printDiv, "last"); + + this.print.on("print-start", lang.hitch(this, + function () { + var printBox = dom.byId("print_title"); + if (printBox.value) { + array.forEach(this.print.templates, + lang.hitch(this, function ( + template) { + template.layoutOptions.titleText = printBox.value; + })); } - array.forEach(this.print.templates, - lang.hitch(this, function( - template) { - template.layoutOptions = layoutOptions; - })); })); - } else { - domStyle.set("pageBody_print", "height", - "90px"); - } - var printOptions = { - map: this.map, - id: "printButton", - url: this.config.helperServices.printTask.url - }; - if (templates) { - printOptions.templates = templates; - } - // Add a loading indicator to the Printing label - esriBundle.widgets.print.NLS_printing = esriBundle.widgets.print.NLS_printing + - " "; - this.print = new Print(printOptions, - domConstruct.create("div")); - - domConstruct.place(this.print.printDomNode, printDiv, "last"); - - this.print.on("print-start", lang.hitch(this, - function() { - var printBox = dom.byId("print_title"); - if (printBox.value) { - array.forEach(this.print.templates, - lang.hitch(this, function( - template) { - template.layoutOptions.titleText = printBox.value; - })); - } - })); + this.print.startup(); + })); + deferred.resolve(true); + return; - this.print.startup(); - })); - deferred.resolve(true); - return; - - })); - return deferred.promise; - }, - _addShare: function(tool, toolbar, panelClass) { - //Add share links for facebook, twitter and direct linking. - //Add the measure widget to the toolbar. - var deferred = new Deferred(); - - if (has("share")) { - - var shareDiv = toolbar.createTool(tool, panelClass); - - var shareDialog = new ShareDialog({ - bitlyLogin: this.config.bitlyLogin, - bitlyKey: this.config.bitlyKey, - map: this.map, - image: this.config.sharinghost + + })); + return deferred.promise; + }, + _addShare: function (tool, toolbar, panelClass) { + //Add share links for facebook, twitter and direct linking. + //Add the measure widget to the toolbar. + var deferred = new Deferred(); + + if (has("share")) { + var shareDiv = toolbar.createTool(tool, panelClass); + + this.shareDialog = new ShareDialog({ + bitlyLogin: this.config.bitlyLogin, + bitlyKey: this.config.bitlyKey, + map: this.map, + embedVisible: has("share-embed"), + image: this.config.sharinghost + "/sharing/rest/content/items/" + this.config.response .itemInfo.item.id + "/info/" + this.config.response.itemInfo .thumbnail, - title: this.config.title, - summary: this.config.response.itemInfo.item.snippet || + title: this.config.title, + summary: this.config.response.itemInfo.item.snippet || "" - }, shareDiv); - domClass.add(shareDialog.domNode, "pageBody"); - shareDialog.startup(); - - deferred.resolve(true); - } else { - deferred.resolve(false); - } + }, shareDiv); + domClass.add(this.shareDialog.domNode, "pageBody"); + this.shareDialog.startup(); + deferred.resolve(true); + } else { + deferred.resolve(false); + } - return deferred.promise; - }, - _getEditableLayers: function(layers) { - var layerInfos = []; - array.forEach(layers, lang.hitch(this, function(layer) { + return deferred.promise; - if (layer && layer.layerObject) { - var eLayer = layer.layerObject; - if (eLayer instanceof FeatureLayer && eLayer.isEditable()) { - layerInfos.push({ - "featureLayer": eLayer - }); + }, + _getEditableLayers: function (layers) { + var layerInfos = []; + array.forEach(layers, lang.hitch(this, function (layer) { + if (layer && layer.layerObject) { + var eLayer = layer.layerObject; + if (eLayer instanceof FeatureLayer && eLayer.isEditable()) { + layerInfos.push({ + "featureLayer": eLayer + }); + } } - } - })); - return layerInfos; - }, - - - _getBasemapGroup: function() { - //Get the id or owner and title for an organizations custom basemap group. - var basemapGroup = null; - if (this.config.basemapgroup && this.config.basemapgroup.title && - this.config.basemapgroup.owner) { - basemapGroup = { - "owner": this.config.basemapgroup.owner, - "title": this.config.basemapgroup.title - }; - } else if (this.config.basemapgroup && this.config.basemapgroup + })); + return layerInfos; + }, + + + _getBasemapGroup: function () { + //Get the id or owner and title for an organizations custom basemap group. + var basemapGroup = null; + if (this.config.basemapgroup && this.config.basemapgroup.title && + this.config.basemapgroup.owner) { + basemapGroup = { + "owner": this.config.basemapgroup.owner, + "title": this.config.basemapgroup.title + }; + } else if (this.config.basemapgroup && this.config.basemapgroup .id) { - basemapGroup = { - "id": this.config.basemapgroup.id - }; - } - return basemapGroup; - }, - - _createMapUI: function() { - // Add map specific widgets like the Home and locate buttons. Also add the geocoder. - if (this.config.showSlider) { - // Don't show home if slider isn't enabled - var home = new HomeButton({ - map: this.map - }, domConstruct.create("div", {}, query( - ".esriSimpleSliderIncrementButton")[0], "after")); - home.startup(); - query(".esriSimpleSlider").addClass("homeEnabled"); - } else { - domClass.add(document.body, "noslider"); - } + basemapGroup = { + "id": this.config.basemapgroup.id + }; + } + return basemapGroup; + }, + + _createMapUI: function () { + // Add map specific widgets like the Home and locate buttons. Also add the geocoder. + if (this.config.showSlider) { + // Don't show home if slider isn't enabled + var home = new HomeButton({ + map: this.map + }, domConstruct.create("div", { + }, query( + ".esriSimpleSliderIncrementButton")[0], "after")); + home.startup(); + query(".home span").forEach(function (node) { + domAttr.set(node, { + "aria-hidden": "true", + "role": "presentation" + }); + domConstruct.create("span", { + className: "icon-home", + "aria-label": esriBundle.widgets.homeButton.home.title || "Default map view" + }, node, "after"); + }); + query(".esriSimpleSlider").addClass("homeEnabled"); + } else { + domClass.add(document.body, "noslider"); + } - require(["application/has-config!scalebar?esri/dijit/Scalebar"], - lang.hitch(this, function(Scalebar) { - if (!Scalebar) { - return; - } - var scalebar = new Scalebar({ + require(["application/has-config!scalebar?esri/dijit/Scalebar"], + lang.hitch(this, function (Scalebar) { + if (!Scalebar) { + return; + } + var scalebar = new Scalebar({ + map: this.map, + scalebarUnit: this.config.units + }); + + })); + if (has("locate")) { + var geoLocate = new LocateButton({ map: this.map, - scalebarUnit: this.config.units + useTracking: this.config.locate_track + }, "locateDiv"); + geoLocate.startup(); + query(".LocateButton .zoomLocateButton").addClass("bg"); + query(".zoomLocateButton span").forEach(function (node) { + domAttr.set(node, { + "aria-hidden": "true", + "role": "presentation" + }); + domConstruct.create("span", { + className: "icon-locate", + "aria-label": esriBundle.widgets.locateButton.locate.title || "Find my location" + }, node, "after"); }); - })); - if (has("locate")) { - var geoLocate = new LocateButton({ - map: this.map, - useTracking: this.config.locate_track - }, "locateDiv"); - geoLocate.startup(); - query(".LocateButton .zoomLocateButton").addClass("bg"); - } - //Add the location search widget - require(["application/has-config!search?esri/dijit/Search", - "application/has-config!search?esri/tasks/locator" - ], lang.hitch(this, function(Search, Locator) { - if (!Search && !Locator) { - //add class so we know we don't have to hide title since search isn't visible - domClass.add(document.body, "no-search"); - domClass.add("panelTop", "no-search"); - return; + domClass.add(document.body, "haslocate"); } - var searchOptions = { - map: this.map, - useMapExtent: this.config.searchExtent, - itemData: this.config.response.itemInfo.itemData - }; - - if (this.config.searchConfig) { - searchOptions.applicationConfiguredSources = this.config - .searchConfig.sources || []; - } else { - var configuredSearchLayers = (this.config.searchLayers instanceof Array) ? - this.config.searchLayers : JSON.parse(this.config.searchLayers); - searchOptions.configuredSearchLayers = configuredSearchLayers; - searchOptions.geocoders = this.config.locationSearch ? - this.config.helperServices.geocode : []; - } - var searchSources = new SearchSources(searchOptions); - var createdOptions = searchSources.createOptions(); - if (this.config.searchConfig !== null && this.config.searchConfig !== - undefined) { - if (this.config.searchConfig.activeSourceIndex !== - null && this.config.searchConfig.activeSourceIndex !== - undefined) { - createdOptions.activeSourceIndex = this.config.searchConfig - .activeSourceIndex; - } - createdOptions.enableSearchingAll = false; - if (this.config.searchConfig && this.config.searchConfig.enableSearchingAll && this.config.searchConfig.enableSearchingAll === true) { - createdOptions.enableSearchingAll = true; + //Add the location search widget + require(["application/has-config!search?esri/dijit/Search", + "application/has-config!search?esri/tasks/locator" + ], lang.hitch(this, function (Search, Locator) { + if (!Search && !Locator) { + //add class so we know we don't have to hide title since search isn't visible + domClass.add(document.body, "no-search"); + domClass.add("panelTop", "no-search"); + return; } - } - var search = new Search(createdOptions, domConstruct.create( - "div", { - id: "search" - }, "mapDiv")); - if (this.map.width && this.map.width < 600) { - this._enableButtonMode(search); - } + var searchOptions = { + map: this.map, + useMapExtent: this.config.searchExtent, + itemData: this.config.response.itemInfo.itemData + }; - on(this.map, "resize", lang.hitch(this, function(r) { - if (r && r.width) { - if (r.width < 600) { - this._enableButtonMode(search); - } else { - this._disableButtonMode(search); + if (this.config.searchConfig) { + searchOptions.applicationConfiguredSources = this.config + .searchConfig.sources || []; + } else { + var configuredSearchLayers = (this.config.searchLayers instanceof Array) ? + this.config.searchLayers : JSON.parse(this.config.searchLayers); + searchOptions.configuredSearchLayers = configuredSearchLayers; + searchOptions.geocoders = this.config.locationSearch ? + this.config.helperServices.geocode : []; + } + var searchSources = new SearchSources(searchOptions); + var createdOptions = searchSources.createOptions(); + if (this.config.searchConfig !== null && this.config.searchConfig !== + undefined) { + if (this.config.searchConfig.activeSourceIndex !== + null && this.config.searchConfig.activeSourceIndex !== + undefined) { + createdOptions.activeSourceIndex = this.config.searchConfig + .activeSourceIndex; + } + createdOptions.enableSearchingAll = false; + if (this.config.searchConfig && this.config.searchConfig.enableSearchingAll && this.config.searchConfig.enableSearchingAll === true) { + createdOptions.enableSearchingAll = true; } } - })); + var search = new Search(createdOptions, domConstruct.create( + "div", { + id: "search" + }, "mapDiv")); + if (this.map.width && this.map.width < 600) { + this._enableButtonMode(search); + } - search.on("select-result", lang.hitch(this, function() { - - //if edit tool is enabled we'll have to delete/create - //so info window behaves correctly. - on.once(this.map.infoWindow, "hide", lang.hitch( - this, - function() { - search.clearGraphics(); - if (this.editor) { - this._destroyEditor(); - this._createEditor(); + on(this.map, "resize", lang.hitch(this, function (r) { + if (r && r.width) { + if (r.width < 600) { + this._enableButtonMode(search); + } else { + this._disableButtonMode(search); } - })); + } + })); - })); - search.startup(); + search.on("select-result", lang.hitch(this, function () { + + //if edit tool is enabled we'll have to delete/create + //so info window behaves correctly. + on.once(this.map.infoWindow, "hide", lang.hitch( + this, + function () { + search.clearGraphics(); + if (this.editor) { + this._destroyEditor(); + this._createEditor(); + } + })); - if (search && search.domNode) { - domConstruct.place(search.domNode, "panelGeocoder"); - } - // update the search placeholder text color and dropdown - // to match the icon text - if (this.config.icons === "black") { - query(".arcgisSearch .searchIcon").style("color", - "#000"); - domClass.add(dom.byId("search_input"), "dark"); - } + })); + search.startup(); - })); - - //Feature Search or find (if no search widget) - if ( (this.config.find || (this.config.customUrlLayer.id !== - null && this.config.customUrlLayer.fields.length > 0 && - this.config.customUrlParam !== null)) ) { - require(["esri/dijit/Search"], lang.hitch(this, function( - Search) { - var source = null, - value = null, - searchLayer = null; - - var urlObject = urlUtils.urlToObject(document.location - .href); - urlObject.query = urlObject.query || {}; - urlObject.query = esriLang.stripTags(urlObject.query); - var customUrl = null; - for (var prop in urlObject.query) { - if (urlObject.query.hasOwnProperty(prop)) { - if (prop.toUpperCase() === this.config.customUrlParam + if (search && search.domNode) { + domConstruct.place(search.domNode, "panelGeocoder"); + } + // update the search placeholder text color and dropdown + // to match the icon text + if (this.config.icons === "black") { + query(".arcgisSearch .searchIcon").style("color", + "#000"); + domClass.add(dom.byId("search_input"), "dark"); + } + })); + + //Feature Search or find (if no search widget) + if ((this.config.find || (this.config.customUrlLayer.id !== + null && this.config.customUrlLayer.fields.length > 0 && + this.config.customUrlParam !== null))) { + require(["esri/dijit/Search"], lang.hitch(this, function ( + Search) { + var source = null, + value = null, + searchLayer = null; + + var urlObject = urlUtils.urlToObject(document.location + .href); + urlObject.query = urlObject.query || {}; + urlObject.query = esriLang.stripTags(urlObject.query); + var customUrl = null; + for (var prop in urlObject.query) { + if (urlObject.query.hasOwnProperty(prop)) { + if (prop.toUpperCase() === this.config.customUrlParam .toUpperCase()) { - customUrl = prop; + customUrl = prop; + } } } - } - //Support find or custom url param - if (this.config.find) { - value = decodeURIComponent(this.config.find); - } else if (customUrl) { - - value = urlObject.query[customUrl]; - searchLayer = this.map.getLayer(this.config.customUrlLayer - .id); - if (searchLayer) { - - var searchFields = this.config.customUrlLayer.fields[ - 0].fields; - source = { - exactMatch: true, - outFields: ["*"], - featureLayer: searchLayer, - displayField: searchFields[0], - searchFields: searchFields - }; + //Support find or custom url param + if (this.config.find) { + value = decodeURIComponent(this.config.find); + } else if (customUrl) { + + value = urlObject.query[customUrl]; + searchLayer = this.map.getLayer(this.config.customUrlLayer + .id); + if (searchLayer) { + var searchFields = this.config.customUrlLayer.fields[0].fields; + source = { + exactMatch: true, + outFields: ["*"], + featureLayer: searchLayer, + displayField: searchFields[0], + searchFields: searchFields + }; + } } - } - var urlSearch = new Search({ - map: this.map - }); + var urlSearch = new Search({ + map: this.map + }); - if (source) { - urlSearch.set("sources", [source]); - } - urlSearch.on("load", lang.hitch(this, function() { - urlSearch.search(value).then(lang.hitch(this, - function() { - on.once(this.map.infoWindow, "hide", - lang.hitch(this, function() { - //urlSearch.clear(); - urlSearch.destroy(); - if (this.editor) { - this._destroyEditor(); - this._createEditor(); - } - })); - })); - })); - urlSearch.startup(); + if (source) { + urlSearch.set("sources", [source]); + } + urlSearch.on("load", lang.hitch(this, function () { + urlSearch.search(value).then(lang.hitch(this, + function () { + on.once(this.map.infoWindow, "hide", + lang.hitch(this, function () { + //urlSearch.clear(); + urlSearch.destroy(); + if (this.editor) { + this._destroyEditor(); + this._createEditor(); + } + })); + })); + })); + urlSearch.startup(); + })); + } + //create the tools + this._createUI(); + + }, + _enableButtonMode: function (search) { + search.set("enableButtonMode", true); + search.set("expanded", false); + if (!this.blurHandle) { + this.blurHandle = on.pausable(search, "blur", function () { + domClass.remove(dom.byId("panelText"), "hide"); + }); + } else { + this.blurHandle.resume(); + } + if (!this.focusHandle) { + this.focusHandle = on.pausable(search, "focus", function () { + domClass.add(dom.byId("panelText"), "hide"); + }); + } else { + this.focusHandle.resume(); + } + }, + _disableButtonMode: function (search) { + search.set("enableButtonMode", false); + if (this.blurHandle) { + this.blurHandle.pause(); + } + if (this.focusHandle) { + this.focusHandle.pause(); + } + }, + _setColor: function (value) { + var colorValue = null, rgb; + if (!value) { + colorValue = new Color("transparent"); + } else { + rgb = Color.fromHex(value).toRgb(); + if (has("ie") == 8) { + colorValue = value; + } else { + rgb.push(0.9); + colorValue = Color.fromArray(rgb); + } + } + return colorValue; + }, + _updateTheme: function () { + //Update the app to use the configured color scheme + // Set the icons (slider +/-, search etc to match icon color ) + query(".esriSimpleSlider").style("color", this.iconColor.toString()); + query(".icon-color").style("color", this.iconColor.toString()); + query(".LocateButton .zoomLocateButton").style("color", this.iconColor.toString()); + query(".searchIcon").style("color", this.iconColor.toString()); + query(".pageNav").style("color", this.iconColor.toString()); + + //Set the background color using the configured theme value + query(".bg").style("backgroundColor", this.theme.toString()); + query(".esriPopup .pointer").style("backgroundColor", this.theme + .toString()); + query(".esriPopup .titlePane").style("backgroundColor", this.theme + .toString()); + + + //Set the font color using the configured color value + query(".fc").style("color", this.color.toString()); + query(".esriPopup .titlePane").style("color", this.color.toString()); + query(".esriPopup .titleButton").style("color", this.color.toString()); + + }, + _adjustPopupSize: function () { + //Set the popup size to be half the widget and .35% of the map height + if (!this.map) { + return; + } + var box = domGeometry.getContentBox(this.map.container); + + var width = 270, + height = 300, + newWidth = Math.round(box.w * 0.50), + newHeight = Math.round(box.h * 0.35); + if (newWidth < width) { + width = newWidth; + } + if (newHeight < height) { + height = newHeight; + } + this.map.infoWindow.resize(width, height); + on(this.map.infoWindow, "show", lang.hitch(this, function () { + domClass.add(document.body, "noscroll"); })); - } - //create the tools - this._createUI(); - - }, - _enableButtonMode: function(search) { - search.set("enableButtonMode", true); - search.set("expanded", false); - if (!this.blurHandle) { - this.blurHandle = on.pausable(search, "blur", function() { - domClass.remove(dom.byId("panelText"), "hide"); - }); - } else { - this.blurHandle.resume(); - } - if (!this.focusHandle) { - this.focusHandle = on.pausable(search, "focus", function() { - domClass.add(dom.byId("panelText"), "hide"); - }); - } else { - this.focusHandle.resume(); - } - }, - _disableButtonMode: function(search) { - search.set("enableButtonMode", false); - if (this.blurHandle) { - this.blurHandle.pause(); - } - if (this.focusHandle) { - this.focusHandle.pause(); - } - }, - _setColor: function(color) { - //Convert the string color from the config file to rgba if supported. - var rgb = Color.fromHex(color).toRgb(); - var outputColor = null; - if (has("ie") < 9) { - outputColor = color; - } else { - //rgba supported so add - rgb.push(0.9); - outputColor = Color.fromArray(rgb); - - } - return outputColor; - }, - _updateTheme: function() { - //Update the app to use the configured color scheme - // Set the icons (slider +/-, search etc to match icon color ) - query(".esriSimpleSlider").style("color", this.iconColor.toString()); - query(".icon-color").style("color", this.iconColor.toString()); - query(".LocateButton .zoomLocateButton").style("color", this.iconColor.toString()); - query(".searchIcon").style("color", this.iconColor.toString()); - query(".pageNav").style("color", this.iconColor.toString()); - - //Set the background color using the configured theme value - query(".bg").style("backgroundColor", this.theme.toString()); - query(".esriPopup .pointer").style("backgroundColor", this.theme - .toString()); - query(".esriPopup .titlePane").style("backgroundColor", this.theme - .toString()); - - - //Set the font color using the configured color value - query(".fc").style("color", this.color.toString()); - query(".esriPopup .titlePane").style("color", this.color.toString()); - query(".esriPopup .titleButton").style("color", this.color.toString()); - - }, - _adjustPopupSize: function() { - - //Set the popup size to be half the widget and .35% of the map height - if (!this.map) { - return; - } - - var box = domGeometry.getContentBox(this.map.container); - - var width = 270, - height = 300, - newWidth = Math.round(box.w * 0.50), - newHeight = Math.round(box.h * 0.35); - if (newWidth < width) { - width = newWidth; - } - if (newHeight < height) { - height = newHeight; - } - this.map.infoWindow.resize(width, height); - on(this.map.infoWindow, "show", lang.hitch(this, function() { - domClass.add(document.body, "noscroll"); - })); - on(this.map.infoWindow, "hide", lang.hitch(this, function() { - domClass.remove(document.body, "noscroll"); - })); - - }, - _createWebMap: function(itemInfo, params) { - - window.config = this.config; - // create a map based on the input web map id - arcgisUtils.createMap(itemInfo, "mapDiv", { - mapOptions: params.mapOptions || {}, - editable: has("edit"), - //is the app editable - usePopupManager: true, - layerMixins: this.config.layerMixins, - bingMapsKey: this.config.orgInfo.bingKey || "" - }).then(lang.hitch(this, function(response) { - - this.map = response.map; - domClass.add(this.map.infoWindow.domNode, "light"); - - if (params.markerGraphic) { - // Add a marker graphic with an optional info window if - // one was specified via the marker url parameter - require(["esri/layers/GraphicsLayer"], lang.hitch( - this, - function(GraphicsLayer) { - var markerLayer = new GraphicsLayer(); - - this.map.addLayer(markerLayer); - markerLayer.add(params.markerGraphic); - - if (params.markerGraphic.infoTemplate) { - this.map.infoWindow.setFeatures([params.markerGraphic]); - this.map.infoWindow.show(params.markerGraphic - .geometry); + on(this.map.infoWindow, "hide", lang.hitch(this, function () { + domClass.remove(document.body, "noscroll"); + })); + }, + _createWebMap: function (itemInfo, params) { + + window.config = this.config; + // create a map based on the input web map id + arcgisUtils.createMap(itemInfo, "mapDiv", { + mapOptions: params.mapOptions || {}, + editable: has("edit"), + //is the app editable + usePopupManager: true, + layerMixins: this.config.layerMixins, + bingMapsKey: this.config.orgInfo.bingKey || "" + }).then(lang.hitch(this, function (response) { + + this.map = response.map; + domClass.add(this.map.infoWindow.domNode, "light"); + if (this.config.customLayout === "default") { + on(window, "resize", lang.hitch(this, function () { + var titlebox = domGeometry.getContentBox(dom.byId("panelTop")); + var mapbox = domGeometry.getContentBox(dom.byId("mapDiv")); + if (mapbox.w && titlebox.w) { + var spacer = mapbox.w - titlebox.w; + if (spacer < 350) { + domStyle.set(dom.byId("panelContent"), "top", "90px"); + } else { + domStyle.set(dom.byId("panelContent"), "top", "10px"); + } } })); - } + } + if (params.markerGraphic) { + // Add a marker graphic with an optional info window if + // one was specified via the marker url parameter + require(["esri/layers/GraphicsLayer"], lang.hitch( + this, + function (GraphicsLayer) { + var markerLayer = new GraphicsLayer(); + + this.map.addLayer(markerLayer); + markerLayer.add(params.markerGraphic); + + if (params.markerGraphic.infoTemplate) { + this.map.infoWindow.setFeatures([params.markerGraphic]); + this.map.infoWindow.show(params.markerGraphic + .geometry); + } + })); - this._updateTheme(); + } - //Add a logo if provided - if (this.config.logo) { - domConstruct.create("div", { - id: "panelLogo", - innerHTML: "" - }, dom.byId("panelTitle"), "first"); - domClass.add("panelTop", "largerTitle"); - } + }, dom.byId("panelTitle"), "first"); + domClass.add("panelTop", "largerTitle"); + } - //Set the application title - this.map = response.map; - //Set the title - use the config value if provided. - var title; - if (this.config.title === null || this.config.title === - "") { - title = response.itemInfo.item.title; - } else { - title = this.config.title; - } - // Set the default map summary as the default alt text - // Can be configured using the config panel in order - // to provide text that will be read by screen readers. - var altText = response.itemInfo.item.snippet || response.itemInfo.item.title; - domAttr.set(this.map.container, "aria-label", this.config + //Set the application title + this.map = response.map; + //Set the title - use the config value if provided. + var title; + if (this.config.title === null || this.config.title === + "") { + title = response.itemInfo.item.title; + } else { + title = this.config.title; + } + // Set the default map summary as the default alt text + // Can be configured using the config panel in order + // to provide text that will be read by screen readers. + var altText = response.itemInfo.item.snippet || response.itemInfo.item.title; + domAttr.set(this.map.container, "aria-label", this.config .altMapText || esriLang.stripTags(altText)); - domAttr.set(this.map.container, "tabindex", "0"); + domAttr.set(this.map.container, "tabindex", "0"); - this.config.title = title; - document.title = esriLang.stripTags(title); - dom.byId("title").innerHTML = title; - dom.byId("title")["aria-label"] = title; + this.config.title = title; + document.title = esriLang.stripTags(title); + dom.byId("title").innerHTML = title; + dom.byId("title")["aria-label"] = title; - //Set subtitle if provided - if (this.config.subtitle) { - dom.byId("subtitle").innerHTML = this.config.subtitle; - dom.byId("subtitle")["aria-label"] = this.config.subtitle; - } else { - domStyle.set("subtitle", "display", "none"); - domClass.add("title", "nosubtitle"); - } + //Set subtitle if provided + if (this.config.subtitle) { + dom.byId("subtitle").innerHTML = this.config.subtitle; + dom.byId("subtitle")["aria-label"] = this.config.subtitle; + } else { + domStyle.set("subtitle", "display", "none"); + domClass.add("title", "nosubtitle"); + } - this.config.response = response; + this.config.response = response; - this._createMapUI(); - // make sure map is loaded - if (this.map.loaded) { - // do something with the map - this._mapLoaded(); - } else { - on.once(this.map, "load", lang.hitch(this, function() { + this._createMapUI(); + // make sure map is loaded + if (this.map.loaded) { // do something with the map this._mapLoaded(); - })); - } - }), this.reportError); - }, - updateAriaInfo: function() { - // update tab index and aria roles for slider buttons - // Popup Accessiblity updates - query(".titleButton").forEach(function(node) { - domAttr.set(node, "role", "button"); - domAttr.set(node, "tabindex", "0"); - }); - query(".titlePane div.title").forEach(function(node) { - domAttr.set(node, "tabindex", "0"); - }); - } + } else { + on.once(this.map, "load", lang.hitch(this, function () { + // do something with the map + this._mapLoaded(); + })); + } + }), this.reportError); + }, + updateAriaInfo: function () { + // update tab index and aria roles for slider buttons + // Popup Accessiblity updates + query(".titleButton").forEach(function (node) { + domAttr.set(node, "role", "button"); + domAttr.set(node, "tabindex", "0"); + }); + query(".titlePane div.title").forEach(function (node) { + domAttr.set(node, "tabindex", "0"); + }); + } + }); }); -}); diff --git a/js/nls/ShareDialog.js b/js/nls/ShareDialog.js index 1859f6dc..6d8b6ef5 100644 --- a/js/nls/ShareDialog.js +++ b/js/nls/ShareDialog.js @@ -1,21 +1,24 @@ define({ - root: ({ - widgets: { - ShareDialog: { - title: "Share", - heading: "Share this map", - url: "Map Link", - embed: "Embed Map", - extent: "Share current map extent", - size: "Size (width/height):", - facebookTooltip: "Facebook", - twitterTooltip: "Twitter", - gplusTooltip: "Google Plus", - emailTooltip: "Email" - } - } - }), + root: ({ + widgets: { + ShareDialog: { + title: "Share", + heading: "Share this map", + url: "Map Link", + embed: "Embed Map", + extent: "Share current map view", + size: "Size (width/height):", + facebookTooltip: "Facebook", + twitterTooltip: "Twitter", + gplusTooltip: "Google Plus", + emailTooltip: "Email", + copy: "Copy short url to clipboard", + copied: "Copied" + } + } + }), "ar": 1, + "bs": 1, "cs": 1, "da": 1, "de": 1, @@ -25,7 +28,9 @@ define({ "fi": 1, "fr": 1, "he": 1, - "hr": 1, + "hi": 1, + "hr": 1, + "id": 1, "it": 1, "ja": 1, "ko": 1, @@ -44,6 +49,6 @@ define({ "tr": 1, "vi": 1, "zh-cn": 1, - "zh-hk": 1, - "zh-tw": 1 + "zh-hk": 1, + "zh-tw": 1 }); diff --git a/js/nls/ar/ShareDialog.js b/js/nls/ar/ShareDialog.js index 80713fe3..395afa89 100644 --- a/js/nls/ar/ShareDialog.js +++ b/js/nls/ar/ShareDialog.js @@ -5,12 +5,14 @@ define({ "heading": "مشاركة هذه الخريطة", "url": "رابط الخريطة", "embed": "تضمين الخريطة", - "extent": "مشاركة نطاق الخريطة الحالي", + "extent": "مشاركة عرض الخريطة الحالي", "size": "الحجم (الاتساع/الارتفاع):", - "facebookTooltip": "Facebook", - "twitterTooltip": "Twitter", + "facebookTooltip": "فيس بوك", + "twitterTooltip": "تويتر", "gplusTooltip": "Google Plus", - "emailTooltip": "البريد الإلكتروني" + "emailTooltip": "البريد الإلكتروني", + "copy": "نسخ عنوان url قصير إلى الحافظة", + "copied": "تم النسخ" } } }); \ No newline at end of file diff --git a/js/nls/bs/ShareDialog.js b/js/nls/bs/ShareDialog.js new file mode 100644 index 00000000..51f81f01 --- /dev/null +++ b/js/nls/bs/ShareDialog.js @@ -0,0 +1,18 @@ +define({ + "widgets": { + "ShareDialog": { + "title": "Podijeli", + "heading": "Podijeli kartu", + "url": "Poveznica karte", + "embed": "Ugradi kartu", + "extent": "Podijeli trenutačni prikaz karte", + "size": "Veličina (širina/visina):", + "facebookTooltip": "Facebook", + "twitterTooltip": "Twitter", + "gplusTooltip": "Google Plus", + "emailTooltip": "E-pošta", + "copy": "Kopiraj kratki url u međuspremnik", + "copied": "Kopirano" + } + } +}); \ No newline at end of file diff --git a/js/nls/bs/resources.js b/js/nls/bs/resources.js new file mode 100644 index 00000000..ce5a5dc0 --- /dev/null +++ b/js/nls/bs/resources.js @@ -0,0 +1,69 @@ +/*global define */ +/* + | Copyright 2014 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. + */ +define({ + "map": { + "error": "Nije moguće stvoriti kartu", + "overviewDetails": "Pregledna karta prikazuje trenutačni obuhvat karte unutar konteksta većeg područja." + }, + "nav": { + "next": "Sljedeće", + "previous": "Prethodno", + "close": "Zatvori" + }, + "tools": { + "search": { + "error": "Nije pronađena lokacija", + "notWhatYouWanted": "Niste ovo tražili?", + "selectAnother": "Odaberi drugu lokaciju", + "currentLocation": "Trenutačna lokacija", + "title": "Lokacija" + }, + "print": { + "layouts": { + "label1": "Pejzaž", + "label2": "Okomito", + "label3": "Pejzaž", + "label4": "Okomito" + }, + "legend": "Dodaj legendu u izlaz", + "title": "Naziv", + "titlePrompt": "Dodaj prilagođeni naslov" + }, + "share": { + "extent": "Upotrijebi trenutačni obuhvat karte", + "label": "Podijeli kartu", + "link": "Poveznica karte", + "facebook": "Facebook", + "twitter": "Twitter" + } + }, + "tooltips": { + "home": "Zadani obuhvat", + "locate": "Pronađi moju lokaciju", + "legend": "Legenda", + "bookmarks": "Knjižne oznake", + "layers": "Slojevi", + "basemap": "Galerija kartografskih podloga", + "overview": "Pregledna karta", + "measure": "Izmjeri", + "edit": "Uredi", + "time": "Vrijeme", + "print": "Ispis", + "details": "Pojedinosti", + "share": "Odabrani izgled" + } +}); \ No newline at end of file diff --git a/js/nls/cs/ShareDialog.js b/js/nls/cs/ShareDialog.js index 0815103a..33c6e515 100644 --- a/js/nls/cs/ShareDialog.js +++ b/js/nls/cs/ShareDialog.js @@ -2,15 +2,17 @@ define({ "widgets": { "ShareDialog": { "title": "Sdílet", - "heading": "Sdílet tuto mapu", + "heading": "Sdílejte tuto mapu", "url": "Odkaz na mapu", "embed": "Vložit mapu", - "extent": "Sdílet současný rozsah mapy", + "extent": "Sdílet aktuální zobrazení mapy", "size": "Velikost (šířka/výška):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "E-mail" + "emailTooltip": "E-mail", + "copy": "Zkopírovat krátkou URL do schránky", + "copied": "Zkopírováno" } } }); \ No newline at end of file diff --git a/js/nls/da/ShareDialog.js b/js/nls/da/ShareDialog.js index 33e477d0..6eb159da 100644 --- a/js/nls/da/ShareDialog.js +++ b/js/nls/da/ShareDialog.js @@ -1,16 +1,18 @@ define({ "widgets": { "ShareDialog": { - "title": "Del", + "title": "Opdatér", "heading": "Del dette kort", "url": "Kort-link", "embed": "Integrér kort", - "extent": "Del aktuelt kortområde", + "extent": "Del den aktuelle kortvisning", "size": "Størrelse (bredde/højde):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "E-mail" + "emailTooltip": "E-mail", + "copy": "Kopiér kort url til Udklipsholder", + "copied": "Kopieret" } } }); \ No newline at end of file diff --git a/js/nls/de/ShareDialog.js b/js/nls/de/ShareDialog.js index 30330342..b0b8da37 100644 --- a/js/nls/de/ShareDialog.js +++ b/js/nls/de/ShareDialog.js @@ -5,12 +5,14 @@ define({ "heading": "Diese Karte freigeben", "url": "Karten-Link", "embed": "Karte einbetten", - "extent": "Aktuelle Kartenausdehnung freigeben", + "extent": "Aktuelle Kartenansicht freigeben", "size": "Größe (Breite/Höhe):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "E-Mail" + "emailTooltip": "E-Mail", + "copy": "Kurz-URL in die Zwischenablage kopieren", + "copied": "Kopiert" } } }); \ No newline at end of file diff --git a/js/nls/el/ShareDialog.js b/js/nls/el/ShareDialog.js index 5a4961d5..5cd0ba22 100644 --- a/js/nls/el/ShareDialog.js +++ b/js/nls/el/ShareDialog.js @@ -5,12 +5,14 @@ define({ "heading": "Κοινοποίηση αυτού του χάρτη", "url": "Σύνδεσμος χάρτη", "embed": "Ενσωμάτωση χάρτη", - "extent": "Κοινοποίηση τρέχουσας έκτασης χάρτη", + "extent": "Κοινοποίηση τρέχουσας προβολής χάρτη", "size": "Μέγεθος (πλάτος/ύψος):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "Email" + "emailTooltip": "Email", + "copy": "Αντιγραφή σύντομου url στο πρόχειρο", + "copied": "Αντιγράφηκε" } } }); \ No newline at end of file diff --git a/js/nls/es/ShareDialog.js b/js/nls/es/ShareDialog.js index 7ac0b2cb..38b55307 100644 --- a/js/nls/es/ShareDialog.js +++ b/js/nls/es/ShareDialog.js @@ -5,12 +5,14 @@ define({ "heading": "Compartir este mapa", "url": "Enlace del mapa", "embed": "Integrar mapa", - "extent": "Compartir la extensión del mapa actual", + "extent": "Compartir vista de mapa actual", "size": "Tamaño (ancho/alto):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "Correo electrónico" + "emailTooltip": "Correo Electrónico", + "copy": "Copiar dirección URL corta en el portapapeles", + "copied": "Copiada" } } }); \ No newline at end of file diff --git a/js/nls/et/ShareDialog.js b/js/nls/et/ShareDialog.js index 87aec00e..19362c29 100644 --- a/js/nls/et/ShareDialog.js +++ b/js/nls/et/ShareDialog.js @@ -5,12 +5,14 @@ define({ "heading": "Jaga seda kaarti", "url": "Kaardi link", "embed": "Lisa kaart", - "extent": "Jaga praeguse kaardi kuvaulatust", + "extent": "Jaga praegust kaardivaadet", "size": "Suurus (laius/kõrgus):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "e-mail" + "emailTooltip": "e-mail", + "copy": "Kopeeri lühike URL lõikelauale", + "copied": "Kopeeritud" } } }); \ No newline at end of file diff --git a/js/nls/fi/ShareDialog.js b/js/nls/fi/ShareDialog.js index 41020df2..8dcd0653 100644 --- a/js/nls/fi/ShareDialog.js +++ b/js/nls/fi/ShareDialog.js @@ -5,12 +5,14 @@ define({ "heading": "Jaa tämä kartta", "url": "Karttalinkki", "embed": "Upota kartta", - "extent": "Jaa nykyisen kartan laajuus", + "extent": "Jaa nykyinen karttanäkymä", "size": "Koko (leveys/korkeus):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "Sähköposti" + "emailTooltip": "Sähköposti", + "copy": "Kopioi lyhyt URL leikepöydälle", + "copied": "Kopioitu" } } }); \ No newline at end of file diff --git a/js/nls/fr/ShareDialog.js b/js/nls/fr/ShareDialog.js index 20f41554..7e464d25 100644 --- a/js/nls/fr/ShareDialog.js +++ b/js/nls/fr/ShareDialog.js @@ -4,13 +4,15 @@ define({ "title": "Partager", "heading": "Partager cette carte", "url": "Lien de la carte", - "embed": "Intégrer la carte", - "extent": "Partager l'étendue actuelle de la carte", - "size": "Taille (largeur/hauteur) :", + "embed": "Incorporer la carte", + "extent": "Partager la vue cartographique courante", + "size": "Taille (largeur/hauteur):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "Adresse électronique" + "emailTooltip": "Courrier électronique", + "copy": "Copier une URL courte dans le Presse-papiers", + "copied": "Copiée" } } }); \ No newline at end of file diff --git a/js/nls/he/ShareDialog.js b/js/nls/he/ShareDialog.js index 45086af8..951f00da 100644 --- a/js/nls/he/ShareDialog.js +++ b/js/nls/he/ShareDialog.js @@ -5,12 +5,14 @@ define({ "heading": "שתף מפה זו", "url": "קישור למפה", "embed": "הטמע את המפה", - "extent": "שתף את תיחום המפה הנוכחי", + "extent": "שתף תצוגת מפה נוכחית", "size": "גודל (רוחב/גובה):", "facebookTooltip": "פייסבוק", "twitterTooltip": "טוויטר", "gplusTooltip": "Google Plus", - "emailTooltip": "שלח בדוא\"ל" + "emailTooltip": "דוא\"ל", + "copy": "העתק כתובת URL קצרה ללוח", + "copied": "הועתק" } } }); \ No newline at end of file diff --git a/js/nls/hi/ShareDialog.js b/js/nls/hi/ShareDialog.js new file mode 100644 index 00000000..eda3e44a --- /dev/null +++ b/js/nls/hi/ShareDialog.js @@ -0,0 +1,18 @@ +define({ + "widgets": { + "ShareDialog": { + "title": "साझा करें", + "heading": "इस मानचित्र को साझा करें", + "url": "मानचित्र लिंक", + "embed": "मानचित्र संबद्ध करें", + "extent": "मानचित्र की वर्तमान दृश्य साझा करें", + "size": "आकार (चौड़ाई/ऊंचाई):", + "facebookTooltip": "Facebook", + "twitterTooltip": "Twitter", + "gplusTooltip": "Google Plus", + "emailTooltip": "ईमेल", + "copy": "लघु url क्लिपबोर्ड पर कॉपी करें", + "copied": "प्रतिलिपि बन गई है" + } + } +}); \ No newline at end of file diff --git a/js/nls/hi/resources.js b/js/nls/hi/resources.js new file mode 100644 index 00000000..b9655b87 --- /dev/null +++ b/js/nls/hi/resources.js @@ -0,0 +1,69 @@ +/*global define */ +/* + | Copyright 2014 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. + */ +define({ + "map": { + "error": "मानचित्र बनाने में अक्षम", + "overviewDetails": "संक्षिप्त मानचित्र बड़े क्षेत्र के संदर्भ में मानचित्र की वर्तमान सीमा दर्शाता है।" + }, + "nav": { + "next": "अगला", + "previous": "पिछला", + "close": "बंद करें" + }, + "tools": { + "search": { + "error": "स्थान नहीं मिल सका", + "notWhatYouWanted": "वह नहीं है जो आपने चाहा?", + "selectAnother": "अन्य स्थान चुनें", + "currentLocation": "वर्तमान स्थान", + "title": "स्थान" + }, + "print": { + "layouts": { + "label1": "लैंडस्केप", + "label2": "पोर्ट्रेट", + "label3": "लैंडस्केप", + "label4": "पोर्ट्रेट" + }, + "legend": "आउटपुट में लीजेंड जोड़ें", + "title": "शीर्षक", + "titlePrompt": "कस्टम शीर्षक जोड़ें" + }, + "share": { + "extent": "वर्तमान मानचित्र सीमा का प्रयोग करें", + "label": "इस मानचित्र को साझा करें", + "link": "मानचित्र लिंक", + "facebook": "Facebook", + "twitter": "Twitter" + } + }, + "tooltips": { + "home": "डिफ़ॉल्ट सीमा", + "locate": "मेरे स्थान का पता लगाएं", + "legend": "लीजेंड", + "bookmarks": "बुकमार्क्स", + "layers": "लेयर्स", + "basemap": "बेसमैप गैलरी", + "overview": "संक्षिप्त मानचित्र", + "measure": "माप", + "edit": "संपादित करें", + "time": "समय", + "print": "प्रिंट करें", + "details": "विवरण", + "share": "साझा करें" + } +}); \ No newline at end of file diff --git a/js/nls/hr/ShareDialog.js b/js/nls/hr/ShareDialog.js index 24d3889f..51f81f01 100644 --- a/js/nls/hr/ShareDialog.js +++ b/js/nls/hr/ShareDialog.js @@ -5,12 +5,14 @@ define({ "heading": "Podijeli kartu", "url": "Poveznica karte", "embed": "Ugradi kartu", - "extent": "Podijeli trenutačni obuhvat karte", + "extent": "Podijeli trenutačni prikaz karte", "size": "Veličina (širina/visina):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "E-pošta" + "emailTooltip": "E-pošta", + "copy": "Kopiraj kratki url u međuspremnik", + "copied": "Kopirano" } } }); \ No newline at end of file diff --git a/js/nls/id/ShareDialog.js b/js/nls/id/ShareDialog.js new file mode 100644 index 00000000..67e31ca0 --- /dev/null +++ b/js/nls/id/ShareDialog.js @@ -0,0 +1,18 @@ +define({ + "widgets": { + "ShareDialog": { + "title": "Bagikan", + "heading": "Bagikan peta ini", + "url": "Tautan Peta", + "embed": "Sematkan Peta", + "extent": "Bagikan tampilan peta saat ini", + "size": "Ukuran (lebar/tinggi):", + "facebookTooltip": "Facebook", + "twitterTooltip": "Twitter", + "gplusTooltip": "Google Plus", + "emailTooltip": "Email", + "copy": "Salin url pendek ke clipboard", + "copied": "Tersalin" + } + } +}); \ No newline at end of file diff --git a/js/nls/id/resources.js b/js/nls/id/resources.js new file mode 100644 index 00000000..9ebd36fe --- /dev/null +++ b/js/nls/id/resources.js @@ -0,0 +1,69 @@ +/*global define */ +/* + | Copyright 2014 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. + */ +define({ + "map": { + "error": "Tidak dapat membuat peta", + "overviewDetails": "Inset peta menampilkan jangkauan peta saat ini dalam konteks area yang lebih besar." + }, + "nav": { + "next": "Berikutnya", + "previous": "Sebelumnya", + "close": "Tutup" + }, + "tools": { + "search": { + "error": "Lokasi tidak dapat ditemukan", + "notWhatYouWanted": "Bukan yang Anda inginkan?", + "selectAnother": "Pilih lokasi lain", + "currentLocation": "Lokasi Saat ini", + "title": "Lokasi" + }, + "print": { + "layouts": { + "label1": "Lanskap", + "label2": "Potret", + "label3": "Lanskap", + "label4": "Potret" + }, + "legend": "Tambah legenda ke output", + "title": "Judul", + "titlePrompt": "Tambah judul kustom" + }, + "share": { + "extent": "Gunakan jangkauan peta saat ini", + "label": "Bagikan peta ini", + "link": "Tautan Peta", + "facebook": "Facebook", + "twitter": "Twitter" + } + }, + "tooltips": { + "home": "Jangkauan default", + "locate": "Temukan lokasi saya", + "legend": "Legenda", + "bookmarks": "Penanda Lokasi", + "layers": "Layer", + "basemap": "Galeri peta dasar", + "overview": "Inset peta", + "measure": "Ukur", + "edit": "Edit", + "time": "Waktu", + "print": "Cetak", + "details": "Detail", + "share": "Bagikan" + } +}); \ No newline at end of file diff --git a/js/nls/it/ShareDialog.js b/js/nls/it/ShareDialog.js index 8a0563e6..459820f2 100644 --- a/js/nls/it/ShareDialog.js +++ b/js/nls/it/ShareDialog.js @@ -5,12 +5,14 @@ define({ "heading": "Condividi la mappa", "url": "Collegamento a mappa", "embed": "Incorpora mappa", - "extent": "Condividi estensione mappa corrente", + "extent": "Condividi vista mappa corrente", "size": "Dimensioni (larghezza/altezza):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "E-mail" + "emailTooltip": "E-mail", + "copy": "Copia URL breve negli Appunti", + "copied": "Copiato" } } }); \ No newline at end of file diff --git a/js/nls/ja/ShareDialog.js b/js/nls/ja/ShareDialog.js index a64d2eed..417843a2 100644 --- a/js/nls/ja/ShareDialog.js +++ b/js/nls/ja/ShareDialog.js @@ -5,12 +5,14 @@ define({ "heading": "このマップを共有", "url": "マップ リンク", "embed": "マップの埋め込み", - "extent": "現在のマップ表示範囲の共有", + "extent": "現在のマップ ビューを共有", "size": "サイズ (幅/高さ):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google+", - "emailTooltip": "電子メール" + "emailTooltip": "電子メール", + "copy": "短縮 URL をクリップボードにコピー", + "copied": "コピーしました" } } }); \ No newline at end of file diff --git a/js/nls/ko/ShareDialog.js b/js/nls/ko/ShareDialog.js index 7e99f8fe..b468d7bd 100644 --- a/js/nls/ko/ShareDialog.js +++ b/js/nls/ko/ShareDialog.js @@ -4,13 +4,15 @@ define({ "title": "공유", "heading": "이 맵 공유", "url": "맵 링크", - "embed": "맵 포함", - "extent": "현재 맵 범위 공유", + "embed": "맵 임베드", + "extent": "현재 맵 뷰 공유", "size": "크기(너비/높이):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "이메일" + "emailTooltip": "이메일", + "copy": "간단한 URL을 클립보드에 복사", + "copied": "복사됨" } } }); \ No newline at end of file diff --git a/js/nls/lt/ShareDialog.js b/js/nls/lt/ShareDialog.js index d4d3a4f0..22dea158 100644 --- a/js/nls/lt/ShareDialog.js +++ b/js/nls/lt/ShareDialog.js @@ -5,12 +5,14 @@ define({ "heading": "Bendrinti šį žemėlapį", "url": "Žemėlapio nuoroda", "embed": "Įterpti žemėlapį", - "extent": "Bendrinti esamo žemėlapio aprėptį", + "extent": "Bendrinti esamo žemėlapio vaizdą", "size": "Dydis (plotis / aukštis):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "El. paštas" + "emailTooltip": "El. paštas", + "copy": "Nukopijuoti URL į mainų sritį", + "copied": "Nukopijuota" } } }); \ No newline at end of file diff --git a/js/nls/lv/ShareDialog.js b/js/nls/lv/ShareDialog.js index 4f5310ef..5a1e8947 100644 --- a/js/nls/lv/ShareDialog.js +++ b/js/nls/lv/ShareDialog.js @@ -1,16 +1,18 @@ define({ "widgets": { "ShareDialog": { - "title": "Kopīgot", + "title": "Koplietot", "heading": "Koplietot šo karti", "url": "Kartes saite", "embed": "Iedarināt karti", - "extent": "Koplietot pašreizējo kartes pārklājumu", - "size": "Izmēri (platums/augstums):", + "extent": "Koplietot pašreizējo kartes skatu", + "size": "Izmērs (platums/augstums):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "E-pasts" + "emailTooltip": "E-pasts", + "copy": "Kopēt īso url starpliktuvē", + "copied": "Nokopēts" } } }); \ No newline at end of file diff --git a/js/nls/nb/ShareDialog.js b/js/nls/nb/ShareDialog.js index b2fdaec2..bfddc096 100644 --- a/js/nls/nb/ShareDialog.js +++ b/js/nls/nb/ShareDialog.js @@ -5,12 +5,14 @@ define({ "heading": "Del dette kartet", "url": "Kartkobling", "embed": "Bygg inn kart", - "extent": "Del gjeldende kartutstrekning", + "extent": "Del gjeldende kartvisning", "size": "Størrelse (bredde/høyde):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "E-post" + "emailTooltip": "E-post", + "copy": "Kopier kort URL til utklippstavlen", + "copied": "Kopiert" } } }); \ No newline at end of file diff --git a/js/nls/nl/ShareDialog.js b/js/nls/nl/ShareDialog.js index 4001dc8a..b6fee61b 100644 --- a/js/nls/nl/ShareDialog.js +++ b/js/nls/nl/ShareDialog.js @@ -5,12 +5,14 @@ define({ "heading": "Deze kaart delen", "url": "Kaartkoppeling", "embed": "Kaart inbedden", - "extent": "Huidige kaartextent delen", + "extent": "Huidige kaartweergave delen", "size": "Grootte (breedte/hoogte):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "E-mail" + "emailTooltip": "E-mail", + "copy": "Korte URL naar klembord kopiëren", + "copied": "Gekopieerd" } } }); \ No newline at end of file diff --git a/js/nls/pl/ShareDialog.js b/js/nls/pl/ShareDialog.js index c6190d78..54354d88 100644 --- a/js/nls/pl/ShareDialog.js +++ b/js/nls/pl/ShareDialog.js @@ -1,16 +1,18 @@ define({ "widgets": { "ShareDialog": { - "title": "Udostępnij", + "title": "Udostępnianie", "heading": "Udostępnij tę mapę", - "url": "Łącze mapy", + "url": "Łącze do mapy", "embed": "Osadź mapę", - "extent": "Udostępnij bieżący zasięg mapy", + "extent": "Udostępnij bieżący widok mapy", "size": "Rozmiar (szerokość/wysokość):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "Email" + "emailTooltip": "Adres e-mail", + "copy": "Kopiuj skrócony adres URL do schowka", + "copied": "Skopiowane" } } }); \ No newline at end of file diff --git a/js/nls/pt-BR/ShareDialog.js b/js/nls/pt-BR/ShareDialog.js index 25c4e812..dba0b237 100644 --- a/js/nls/pt-BR/ShareDialog.js +++ b/js/nls/pt-BR/ShareDialog.js @@ -5,12 +5,14 @@ define({ "heading": "Compartilhar este mapa", "url": "Link do Mapa", "embed": "Mapa Embutido", - "extent": "Compartilhar extensão do mapa atual", + "extent": "Compartilhar visualização de mapa atual", "size": "Tamanho (largura/altura):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "E-mail" + "emailTooltip": "E-mail", + "copy": "Copiar URL curta na área de transferência", + "copied": "Copiado" } } }); \ No newline at end of file diff --git a/js/nls/pt-PT/ShareDialog.js b/js/nls/pt-PT/ShareDialog.js index 112e2255..fb0518fa 100644 --- a/js/nls/pt-PT/ShareDialog.js +++ b/js/nls/pt-PT/ShareDialog.js @@ -3,14 +3,16 @@ define({ "ShareDialog": { "title": "Partilhar", "heading": "Partilhar este mapa", - "url": "Ligação de Mapa", - "embed": "Integrar Mapa", - "extent": "Partilhar a atual extensão do mapa", + "url": "Ligação do Mapa", + "embed": "Incorporar Mapa", + "extent": "Partilhar atual vista de mapa", "size": "Tamanho (largura/altura):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "Correio Eletrónico" + "emailTooltip": "Correio Eletrónico", + "copy": "Copiar url curto para a área de transferência", + "copied": "Copiado" } } }); \ No newline at end of file diff --git a/js/nls/resources.js b/js/nls/resources.js index 68f5a267..1c15b33b 100755 --- a/js/nls/resources.js +++ b/js/nls/resources.js @@ -69,6 +69,7 @@ define({ } }), "ar": 1, + "bs": 1, "cs": 1, "da": 1, "de": 1, @@ -78,7 +79,9 @@ define({ "fi": 1, "fr": 1, "he": 1, - "hr": 1, + "hi": 1, + "hr": 1, + "id": 1, "it": 1, "ja": 1, "ko": 1, @@ -97,6 +100,6 @@ define({ "tr": 1, "vi": 1, "zh-cn": 1, - "zh-hk": 1, - "zh-tw": 1 + "zh-hk": 1, + "zh-tw": 1 }); diff --git a/js/nls/ro/ShareDialog.js b/js/nls/ro/ShareDialog.js index ed124569..3573b020 100644 --- a/js/nls/ro/ShareDialog.js +++ b/js/nls/ro/ShareDialog.js @@ -2,15 +2,17 @@ define({ "widgets": { "ShareDialog": { "title": "Partajare", - "heading": "Se partajează această hartă", + "heading": "Partajare această hartă", "url": "Link către hartă", "embed": "Încorporare hartă", - "extent": "Partajare extindere curentă a hărţii", + "extent": "Partajare vizualizare curentă de hartă", "size": "Dimensiune (lăţime/înălţime):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "E-mail" + "emailTooltip": "E-mail", + "copy": "Copiere URL scurt în clipboard", + "copied": "Copiat" } } }); \ No newline at end of file diff --git a/js/nls/ru/ShareDialog.js b/js/nls/ru/ShareDialog.js index 91e7e0a2..3af86ac2 100644 --- a/js/nls/ru/ShareDialog.js +++ b/js/nls/ru/ShareDialog.js @@ -2,15 +2,17 @@ define({ "widgets": { "ShareDialog": { "title": "Опубликовать", - "heading": "Опубликовать эту карту", + "heading": "Общий доступ к карте", "url": "Ссылка на карту", - "embed": "Внедрить карту", - "extent": "Опубликовать текущий экстент карты", + "embed": "Встроить карту", + "extent": "Общий доступ к текущему виду карты", "size": "Размер (ширина/высота):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "Email" + "emailTooltip": "Электронная почта", + "copy": "Копировать краткий url-адрес в буфер обмена", + "copied": "Скопировано" } } }); \ No newline at end of file diff --git a/js/nls/sr/ShareDialog.js b/js/nls/sr/ShareDialog.js index 949327ac..7d2b60ff 100644 --- a/js/nls/sr/ShareDialog.js +++ b/js/nls/sr/ShareDialog.js @@ -5,12 +5,14 @@ define({ "heading": "Podeli ovu mapu", "url": "Link ka mapi", "embed": "Ugradi mapu", - "extent": "Podeli trenutni obuhvat mape", + "extent": "Podeli trenutni prikaz mape", "size": "Veličina (širina/visina):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "E-pošta" + "emailTooltip": "E-Pošta", + "copy": "Kopiraj skraćenu URL adresu u ostavu", + "copied": "Kopirano" } } }); \ No newline at end of file diff --git a/js/nls/sv/ShareDialog.js b/js/nls/sv/ShareDialog.js index cd396822..90dbb037 100644 --- a/js/nls/sv/ShareDialog.js +++ b/js/nls/sv/ShareDialog.js @@ -5,12 +5,14 @@ define({ "heading": "Dela den här kartan", "url": "Kartlänk", "embed": "Bädda in karta", - "extent": "Dela aktuell kartutbredning", + "extent": "Dela aktuell kartvy", "size": "Storlek (bredd/höjd):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "E-post" + "emailTooltip": "E-post", + "copy": "Kopiera kort URL till Urklipp", + "copied": "Kopierad" } } }); \ No newline at end of file diff --git a/js/nls/th/ShareDialog.js b/js/nls/th/ShareDialog.js index cc6f680a..ce48092e 100644 --- a/js/nls/th/ShareDialog.js +++ b/js/nls/th/ShareDialog.js @@ -5,12 +5,14 @@ define({ "heading": "แชร์แผนที่นี้", "url": "เชื่อมโยงแผนที่", "embed": "ผูกติดกับแผนที่", - "extent": "แชร์ขอบเขตแผนที่ปัจจุบัน", + "extent": "แชร์แมพวิวปัจจุบัน", "size": "ขนาด (กว้าง/สูง):", "facebookTooltip": "เฟซบุ๊ค", "twitterTooltip": "ทวิตเตอร์", "gplusTooltip": "กูเกิ้ลพลัส", - "emailTooltip": "อีเมล์" + "emailTooltip": "อีเมล์", + "copy": "คัดลอก URL ย่อไปที่คลิปบอร์ด", + "copied": "คัดลอก" } } }); \ No newline at end of file diff --git a/js/nls/tr/ShareDialog.js b/js/nls/tr/ShareDialog.js index 646796a6..88821fdc 100644 --- a/js/nls/tr/ShareDialog.js +++ b/js/nls/tr/ShareDialog.js @@ -5,12 +5,14 @@ define({ "heading": "Bu haritayı paylaş", "url": "Harita Bağlantısı", "embed": "Haritayı Ekle", - "extent": "Geçerli harita uzantısını paylaş", + "extent": "Geçerli harita görünümünü paylaş", "size": "Boyut (genişlik/yükseklik):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "E-posta" + "emailTooltip": "E-posta", + "copy": "Kısa url’yi panoya kopyala", + "copied": "Kopyalandı" } } }); \ No newline at end of file diff --git a/js/nls/vi/ShareDialog.js b/js/nls/vi/ShareDialog.js index a572c58c..60c88ed8 100644 --- a/js/nls/vi/ShareDialog.js +++ b/js/nls/vi/ShareDialog.js @@ -5,12 +5,14 @@ define({ "heading": "Chia sẻ bản đồ này", "url": "Liên kết Bản đồ", "embed": "Nhúng Bản đồ", - "extent": "Chia sẻ phạm vi bản đồ hiện tại", + "extent": "Chia sẻ chế độ xem bản đồ hiện tại", "size": "Kích thước (chiều rộng/chiều cao):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "Email" + "emailTooltip": "Email", + "copy": "Sao chép url ngắn sang bộ nhớ tạm", + "copied": "Đã sao chép" } } }); \ No newline at end of file diff --git a/js/nls/zh-CN/ShareDialog.js b/js/nls/zh-CN/ShareDialog.js index d0b73f30..de16ae4f 100644 --- a/js/nls/zh-CN/ShareDialog.js +++ b/js/nls/zh-CN/ShareDialog.js @@ -5,12 +5,14 @@ define({ "heading": "共享此地图", "url": "地图链接", "embed": "嵌入地图", - "extent": "共享当前地图范围", - "size": "大小(宽度/高度):", + "extent": "共享当前地图视图", + "size": "大小(宽度/高度):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", - "gplusTooltip": "Google Plus", - "emailTooltip": "电子邮件" + "gplusTooltip": "Google +", + "emailTooltip": "电子邮件", + "copy": "复制短 URL 到剪贴板", + "copied": "已复制" } } }); \ No newline at end of file diff --git a/js/nls/zh-hk/ShareDialog.js b/js/nls/zh-hk/ShareDialog.js index ee927f80..6881d942 100644 --- a/js/nls/zh-hk/ShareDialog.js +++ b/js/nls/zh-hk/ShareDialog.js @@ -1,16 +1,18 @@ define({ "widgets": { "ShareDialog": { - "title": "共用", + "title": "分享", "heading": "共用此地圖", "url": "地圖連結", "embed": "嵌入地圖", - "extent": "共用目前地圖範圍", + "extent": "分享目前地圖範圍", "size": "大小(寬度/高度):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "電子郵件" + "emailTooltip": "電子郵件", + "copy": "將簡短的 url 複製到剪貼簿", + "copied": "已複製" } } }); \ No newline at end of file diff --git a/js/nls/zh-tw/ShareDialog.js b/js/nls/zh-tw/ShareDialog.js index ee927f80..6881d942 100644 --- a/js/nls/zh-tw/ShareDialog.js +++ b/js/nls/zh-tw/ShareDialog.js @@ -1,16 +1,18 @@ define({ "widgets": { "ShareDialog": { - "title": "共用", + "title": "分享", "heading": "共用此地圖", "url": "地圖連結", "embed": "嵌入地圖", - "extent": "共用目前地圖範圍", + "extent": "分享目前地圖範圍", "size": "大小(寬度/高度):", "facebookTooltip": "Facebook", "twitterTooltip": "Twitter", "gplusTooltip": "Google Plus", - "emailTooltip": "電子郵件" + "emailTooltip": "電子郵件", + "copy": "將簡短的 url 複製到剪貼簿", + "copied": "已複製" } } }); \ No newline at end of file diff --git a/js/template.js b/js/template.js index 13bf0351..ae31dcf9 100644 --- a/js/template.js +++ b/js/template.js @@ -240,7 +240,8 @@ define([ }, _initializeApplication: function() { // If this app is hosted on an Esri environment. - if (this.templateConfig.esriEnvironment) { + var overwrite = this.config.overwritesharing || false; + if (this.templateConfig.esriEnvironment && !overwrite) { var appLocation, instance; // Check to see if the app is hosted or a portal. If the app is hosted or a portal set the @@ -257,7 +258,10 @@ define([ this.config.sharinghost = location.protocol + "//" + location.host + instance; this.config.proxyurl = location.protocol + "//" + location.host + instance + "/sharing/proxy"; } + }else{ + this.config.sharinghost= location.protocol + "//" + this.config.sharinghost; } + console.log("Sharinghost", this.config.sharinghost); arcgisUtils.arcgisUrl = this.config.sharinghost + "/sharing/rest/content/items"; // Define the proxy url for the app if (this.config.proxyurl) { @@ -564,6 +568,7 @@ define([ // are any custom roles defined in the organization? if (response.user && esriLang.isDefined(response.user.roleId)) { if (response.user.privileges) { + console.log(response.user.privileges); cfg.userPrivileges = response.user.privileges; } } diff --git a/js/toolbar.js b/js/toolbar.js index 9699f88e..77c1202c 100644 --- a/js/toolbar.js +++ b/js/toolbar.js @@ -53,19 +53,12 @@ define(["dojo/Evented", "dojo/_base/declare", "dojo/_base/window", } event.preventDefault(); } - /*if (event.keyCode === keys.LEFT_ARROW || event.keyCode === - keys.RIGHT_ARROW) { - this.map.disableKeyboardNavigation(); - event.preventDefault(); - (event.keyCode === keys.LEFT_ARROW) ? this._showPreviousPage(title) : this._showNextPage(title); - }*/ } })); on(this.pTools, "keyup", lang.hitch(this, function() { if (!this.map.isKeyboardNavigation) { this.map.enableKeyboardNavigation(); } - })); this.pMenu = dom.byId("panelMenu"); @@ -91,7 +84,6 @@ define(["dojo/Evented", "dojo/_base/declare", "dojo/_base/window", } var pTool = domConstruct.create("button", { className: "panelTool", - // tabindex: "-1", role: "button", name: name, title: this.config.i18n.tooltips[name] || name, @@ -100,6 +92,8 @@ define(["dojo/Evented", "dojo/_base/declare", "dojo/_base/window", }, this.pTools); if (this.config.toolbarLabels) { domStyle.set(pTool, "width", "auto"); + domClass.add(pTool, "labels"); + domClass.add("panelTools", "labels"); } query(".icon-color").style("color", this.config.iconColor); if (pressed) { diff --git a/resources/configurationPanel.js b/resources/configurationPanel.js index 1d688712..e30585fa 100755 --- a/resources/configurationPanel.js +++ b/resources/configurationPanel.js @@ -1,334 +1,361 @@ { - "displayType": "tabs", - "configurationSettings": [{ - "category": "Map", - "fields": [{ - "type": "webmap" - }, { - "type": "appproxies" - }] - }, { - "category": "General", - "fields": [{ - "placeHolder": "Defaults to web map title", - "label": "Title:", - "fieldName": "title", - "type": "string", - "tooltip": "Defaults to web map title" - }, { - "placeHolder": "Optional subtitle text", - "label": "SubTitle:", - "fieldName": "subtitle", - "type": "string", - "tooltip": "Optional subtitle text" - }, { - "label": "Title logo:", - "fieldName": "logo", - "type": "string", - "tooltip": "Defaults to sample logo" - }, { - "type": "string", - "fieldName": "description", - "label": "Details", - "placeHolder": "Defaults to web map description.", - "tooltip": "Enter content for the details panel", - "stringFieldOption": "richtext" - }, { - "type": "boolean", - "fieldName": "popupPanel", - "label": "Show popup content panel instead of popup window" - },{ - "type": "boolean", - "fieldName": "scalebar", - "label": "Display scalebar on map" - },{ - "type": "paragraph", - "value": "Optionally add a Locate button to the map. Note that the Locate button is only available if site is using https" - },{ - "type": "boolean", - "fieldName": "locate", - "label": "Display locate button on map", - "tooltip": "Display locate button" - }, { - "type": "boolean", - "fieldName": "locate_track", - "label": "Enable tracking of users location" - }] - }, { - "category": "Theme", - "fields": [{ - "type": "color", - "fieldName": "theme", - "tooltip": "Color theme to use", - "label": "Color Theme:" - }, { - "type": "color", - "fieldName": "color", - "tooltip": "Title bar text color", - "label": "Title Color:" - }, { - "type": "color", - "fieldName": "iconColor", - "tooltip": "Icon color", - "label": "Icon color:" - }, { - "type": "paragraph", - "value": "Use the Custom css option to paste css that overwrites rules in the app." - }, { - "type": "string", - "fieldName": "customstyle", - "tooltip": "Custom css", - "label": "Custom css" - }] - }, { - "category": "Splash Screen", - "fields": [{ - "type": "boolean", - "fieldName": "splashModal", - "tooltip": "Enable Splash Screen", - "label": "Splash Screen" - }, { - "type": "string", - "fieldName": "splashTitle", - "label": "Splash screen title", - "tooltip": "Define splash screen title" - }, { - "type": "string", - "fieldName": "splashContent", - "label": "Splash screen content text", - "tooltip": "Define splash screen content", - "stringFieldOption": "richtext" - }, { - "type": "string", - "fieldName": "splashButtonText", - "label": "Define custom button text", - "tooltip": "Define button text" - }] - },{ - "category": "Accessibility", - "fields":[{ - "type": "paragraph", - "value": "The primary purpose of alternative map text is to be read by screen readers to allow the content and function of the map to be accessible to users with visual or certain cognitive disabilities. For more information see this article on Alt Text. " - },{ - "type":"string", - "stringFieldOption": "richtext", - "label": "Alternate Map Text", - "tooltip": "Define text that will be read by screen reader", - "fieldName":"altMapText" - },{ - "type": "boolean", - "fieldName": "toolbarLabels", - "label": "Add toolbar labels", - "tooltip": "Add text next to toolbar icon" - }] - },{ - "category": "Toolbar", - "fields": [{ - "type": "string", - "fieldName": "activeTool", - "tooltip": "Active Tool", - "label": "Specify active tool at app startup:", - "options": [{ - "label": "None", - "value": "" - }, { - "label": "Bookmarks", - "value": "bookmarks" - }, { - "label": "Basemap", - "value": "basemap" - }, { - "label": "Details", - "value": "details" - }, { - "label": "Edit", - "value": "edit" - }, { - "label": "Layers", - "value": "layers" - }, { - "label": "Legend", - "value": "legend" - }, { - "label": "Measure", - "value": "measure" - }, { - "label": "Overview", - "value": "overview" - }, { - "label": "Print", - "value": "print" - }, { - "label": "Share", - "value": "share" - }] - }, { - "type": "paragraph", - "value": "Enable tools for the app toolbar. Note that if the web map doesn't support the enabled capability the tool will not appear. For example if the map doesn't have bookmarks then the bookmark tool won't appear on the toolbar even if it is checked." - }, { - "type": "boolean", - "fieldName": "tool_basemap", - "label": "Basemap Gallery" - }, { - "type": "boolean", - "fieldName": "tool_bookmarks", - "label": "Bookmarks" - }, { - "type": "boolean", - "fieldName": "tool_legend", - "label": "Legend" - }, { - "type": "boolean", - "fieldName": "tool_details", - "label": "Map Details" - }, { - "type": "boolean", - "fieldName": "tool_measure", - "label": "Measure Tool" - }, { - "type": "boolean", - "fieldName": "tool_overview", - "label": "Overview Map" - }, { - "type": "boolean", - "fieldName": "tool_share", - "label": "Share Tools" - }, { - "type": "paragraph", - "value": "The Layer List widget displays a list of layers in the map. The layers visibility can be toggled on and off. Optionally you can include sub layers a legend and opacity slider as part of the Layer List widget." - }, { - "type": "boolean", - "fieldName": "tool_layers", - "label": "Layer List" - }, { - "type": "boolean", - "fieldName": "tool_sublayers", - "label": "Include sublayers in Layer List" - }, { - "type": "boolean", - "fieldName": "tool_layerlegend", - "label": "Include legend in Layer List" - }, { - "type": "boolean", - "fieldName": "tool_opacity", - "label": "Include opacity slider in Layer List" - }, { - "type": "paragraph", - "value": "Display the Editor tool and optionally add a toolbar that provides additional editing capabilities including cut, merge and reshape." - }, { - "type": "boolean", - "fieldName": "tool_edit", - "label": "Display Editor" - }, { - "type": "boolean", - "fieldName": "tool_edit_toolbar", - "label": "Add Toolbar to Editor" - }] - }, { - "category": "Print", - "fields": [{ - "type": "paragraph", - "value": "Display the print tool and optionally display a legend on the print page and all the print layouts associated with the print service used by the template." - }, { - "type": "boolean", - "fieldName": "tool_print", - "label": "Print Tool" - }, { - "type": "boolean", - "fieldName": "tool_print_layouts", - "label": "Display all Layout Options" - }, { - "type": "paragraph", - "value": "Specify the print format. Check your print service to see a list of valid values. The following values are valid for the default print service: PDF, PNG32, PNG8, JPG, GIF, EPS, SVG, SVGZ" - }, { - "placeHolder": "Default value is PDF", - "label": "Format:", - "fieldName": "tool_print_format", - "type": "string", - "tooltip": "Defaults to PDF" - }, { - "type": "boolean", - "fieldName": "tool_print_legend", - "label": "Add Legend to Output" - }] - }, { - "category": "Search", - "fields": [{ - "type": "paragraph", - "value": "Enable search to allow users to find a location or data in the map. Configure the search settings to refine the experience in your app by setting the default search resource, placeholder text, etc." - }, { - "type": "boolean", - "fieldName": "tool_search", - "label": "Enable search tool" - }, { - "type": "search", - "fieldName": "searchConfig", - "label": "Configure Search" - }] - }, { - "category": "Custom URL Parameter", - "fields": [{ - "type": "paragraph", - "value": "Setup the app to support a custom url parameter. For example if your map contains a feature layer with parcel information and you'd like to be able to find parcels using a url parameter you can use this section to do so. Select a layer and search field then define the name of a custom param. Once you've defined these values you can append the custom search to your application url using the custom parameter name you define. For example, if I set the custom param value to parcels a custom url would look like this index.html?parcel=3045" - }, { - "placeHolder": "i.e. parcels", - "label": "URL param name:", - "fieldName": "customUrlParam", - "type": "string", - "tooltip": "Custom URL param name" - }, { - "type": "layerAndFieldSelector", - "fieldName": "customUrlLayer", - "label": "Layer to search for custom url param value", - "tooltip": "Url param search layer", - "fields": [{ - "multipleSelection": false, - "fieldName": "urlField", - "label": "URL param search field", - "tooltip": "URL param search field" - }], - "layerOptions": { - "supportedTypes": [ - "FeatureLayer" - ], - "geometryTypes": [ - "esriGeometryPoint", - "esriGeometryLine", - "esriGeometryPolyline", - "esriGeometryPolygon" - ] - } - }] - }], - "values": { - "logo": "images/logo.png", - "color": "#fff", - "theme": "#105e78", - "iconColor":"#fff", - "activeTool": "", - "scalebar": false, - "splashModal": false, - "toolbarLabels": false, - "tool_print": true, - "tool_print_layouts": false, - "tool_print_legend": false, - "tool_share": true, - "tool_overview": false, - "tool_measure": false, - "tool_details": true, - "tool_legend": false, - "tool_layers": true, - "tool_sublayers": true, - "tool_opacity": true, - "tool_layerlegend": true, - "locate": false, - "locate_track": false, - "tool_edit": false, - "tool_edit_toolbar": false, - "tool_bookmarks": true, - "tool_basemap": true, - "tool_search": true, - "locationSearch": true, - "popupPanel": false - } + "displayType": "tabs", + "configurationSettings": [{ + "category": "App", + "fields": [{ + "type": "webmap" + }, { + "type": "appproxies" + }, { + "placeHolder": "Defaults to web map title", + "label": "Title:", + "fieldName": "title", + "type": "string", + "tooltip": "Defaults to web map title" + }, { + "placeHolder": "Optional subtitle text", + "label": "Subtitle:", + "fieldName": "subtitle", + "type": "string", + "tooltip": "Optional subtitle text" + }, { + "label": "Title logo:", + "fieldName": "logo", + "type": "string", + "sharedThemeProperty": "logo.small", + "tooltip": "Defaults to sample logo" + }, { + "type": "subcategory", + "label": "Accessibility Options" + }, { + "type": "paragraph", + "value": "The primary purpose of alternative map text is to be read by screen readers to allow the content and function of the map to be accessible to users with visual or certain cognitive disabilities. For more information see this article on Alt Text. " + }, { + "type": "string", + "stringFieldOption": "richtext", + "label": "Alternate Map Text", + "tooltip": "Define text that will be read by screen reader", + "fieldName": "altMapText" + }, { + "type": "boolean", + "fieldName": "toolbarLabels", + "label": "Add toolbar labels", + "tooltip": "Add text next to toolbar icon" + }] + }, { + "category": "General", + "fields": [{ + "type": "string", + "fieldName": "description", + "label": "Details", + "placeHolder": "Defaults to web map description.", + "tooltip": "Enter content for the details panel", + "stringFieldOption": "richtext" + }, { + "type": "subcategory", + "label": "Additional options" + }, { + "type": "conditional", + "fieldName": "splashModal", + "tooltip": "Enable Splash Screen", + "label": "Splash Screen", + "condition": false, + "items": [{ + "type": "string", + "fieldName": "splashTitle", + "label": "Splash screen title", + "tooltip": "Define splash screen title" + }, { + "type": "string", + "fieldName": "splashContent", + "label": "Splash screen content text", + "tooltip": "Define splash screen content", + "stringFieldOption": "richtext" + }, { + "type": "string", + "fieldName": "splashButtonText", + "label": "Define custom button text", + "tooltip": "Define button text" + }] + }, { + "type": "boolean", + "fieldName": "popupPanel", + "label": "Show popup content panel instead of popup window" + }, { + "type": "boolean", + "fieldName": "scalebar", + "label": "Display scalebar on map" + }, { + "type": "paragraph", + "value": "Optionally add a Locate button to the map. Note that the Locate button is only available if site is using https" + }, { + "type": "conditional", + "fieldName": "locate", + "label": "Display locate button on map", + "tooltip": "Display locate button", + "condition": false, + "items": [{ + "type": "boolean", + "fieldName": "locate_track", + "label": "Enable tracking of users location" + }] + }] + }, { + "category": "Theme", + "fields": [{ + "type": "radio", + "fieldName": "customLayout", + "label": "Custom Layout", + "items": [{ + "label": "Default", + "value": "default", + "checked": true + }, { + "label": "Tool sidebar", + "value": "sidetools" + }, { + "label": "Menu bar", + "value": "menubar" + }] + }, { + "type": "color", + "fieldName": "theme", + "tooltip": "Color theme to use", + "label": "Color Theme:", + "sharedThemeProperty": "header.background" + }, { + "type": "color", + "fieldName": "color", + "tooltip": "Title bar text color", + "label": "Title Color:", + "sharedThemeProperty": "header.text" + }, { + "type": "color", + "fieldName": "iconColor", + "tooltip": "Icon color", + "label": "Icon color:", + "sharedThemeProperty": "button.text" + }, { + "type": "paragraph", + "value": "Use the Custom css option to paste css that overwrites rules in the app." + }, { + "type": "string", + "fieldName": "customstyle", + "tooltip": "Custom css", + "label": "Custom css" + }] + }, { + "category": "Tools", + "fields": [{ + "type": "string", + "fieldName": "activeTool", + "tooltip": "Active Tool", + "label": "Specify active tool at app startup:", + "options": [{ + "label": "None", + "value": "" + }, { + "label": "Bookmarks", + "value": "bookmarks" + }, { + "label": "Basemap", + "value": "basemap" + }, { + "label": "Details", + "value": "details" + }, { + "label": "Edit", + "value": "edit" + }, { + "label": "Layers", + "value": "layers" + }, { + "label": "Legend", + "value": "legend" + }, { + "label": "Measure", + "value": "measure" + }, { + "label": "Overview", + "value": "overview" + }, { + "label": "Print", + "value": "print" + }, { + "label": "Share", + "value": "share" + }] + }, { + "type": "paragraph", + "value": "Enable tools for the app toolbar.

Note: if the web map doesn't support the enabled capability the tool will not appear. For example if the map doesn't have bookmarks then the bookmark tool won't appear on the toolbar even if it is checked." + }, { + "type": "boolean", + "fieldName": "tool_basemap", + "label": "Basemap Gallery" + }, { + "type": "boolean", + "fieldName": "tool_bookmarks", + "label": "Bookmarks" + }, { + "type": "boolean", + "fieldName": "tool_legend", + "label": "Legend" + }, { + "type": "boolean", + "fieldName": "tool_details", + "label": "Map Details" + }, { + "type": "boolean", + "fieldName": "tool_measure", + "label": "Measure Tool" + }, { + "type": "boolean", + "fieldName": "tool_overview", + "label": "Overview Map" + }, { + "type": "conditional", + "condition": false, + "fieldName": "tool_share", + "label": "Share Tools", + "items": [{ + "type": "boolean", + "fieldName": "tool_share_embed", + "label": "Add embed option to share dialog" + }] + }, { + "type": "paragraph", + "value": "The Layer List widget displays a list of layers in the map. The layers visibility can be toggled on and off. Optionally you can include sub layers a legend and opacity slider as part of the Layer List widget." + }, { + "type": "conditional", + "condition": false, + "fieldName": "tool_layers", + "label": "Display layer list", + "items": [{ + "type": "boolean", + "fieldName": "tool_sublayers", + "label": "Include sublayers in Layer List" + }, { + "type": "boolean", + "fieldName": "tool_layerlegend", + "label": "Include legend in Layer List" + }, { + "type": "boolean", + "fieldName": "tool_opacity", + "label": "Include opacity slider in Layer List" + }] + }, { + "type": "paragraph", + "value": "Display the Editor tool and optionally add a toolbar that provides additional editing capabilities including cut, merge and reshape." + }, { + "type": "conditional", + "condition": false, + "fieldName": "tool_edit", + "label": "Display Editor", + "items": [{ + "type": "boolean", + "fieldName": "tool_edit_toolbar", + "label": "Add Toolbar to Editor" + }] + }, { + "type": "paragraph", + "value": "Display the print tool and optionally display a legend on the print page and all the print layouts associated with the print service used by the template." + }, { + "type": "conditional", + "condition": false, + "fieldName": "tool_print", + "label": "Print Tool", + "items": [{ + "type": "boolean", + "fieldName": "tool_print_layouts", + "label": "Display all Layout Options" + }, { + "type": "paragraph", + "value": "Specify the print format. Check your print service to see a list of valid values. The following values are valid for the default print service: PDF, PNG32, PNG8, JPG, GIF, EPS, SVG, SVGZ" + }, { + "placeHolder": "Default value is PDF", + "label": "Format:", + "fieldName": "tool_print_format", + "type": "string", + "tooltip": "Defaults to PDF" + }, { + "type": "boolean", + "fieldName": "tool_print_legend", + "label": "Add Legend to Output" + }] + }] + }, { + "category": "Search", + "fields": [{ + "type": "paragraph", + "value": "Enable search to allow users to find a location or data in the map. Configure the search settings to refine the experience in your app by setting the default search resource, placeholder text, etc." + }, { + "type": "conditional", + "condition": false, + "fieldName": "tool_search", + "label": "Enable search tool", + "items": [{ + "type": "search", + "fieldName": "searchConfig", + "label": "Configure Search" + }] + }] + }, { + "category": "Custom URL Parameter", + "fields": [{ + "type": "paragraph", + "value": "Setup the app to support a custom url parameter. For example if your map contains a feature layer with parcel information and you'd like to be able to find parcels using a url parameter you can use this section to do so. Select a layer and search field then define the name of a custom param. Once you've defined these values you can append the custom search to your application url using the custom parameter name you define. For example, if I set the custom param value to parcels a custom url would look like this index.html?parcel=3045" + }, { + "placeHolder": "i.e. parcels", + "label": "URL param name:", + "fieldName": "customUrlParam", + "type": "string", + "tooltip": "Custom URL param name" + }, { + "type": "layerAndFieldSelector", + "fieldName": "customUrlLayer", + "label": "Layer to search for custom url param value", + "tooltip": "Url param search layer", + "fields": [{ + "multipleSelection": false, + "fieldName": "urlField", + "label": "URL param search field", + "tooltip": "URL param search field" + }], + "layerOptions": { + "supportedTypes": ["FeatureLayer"], + "geometryTypes": ["esriGeometryPoint", "esriGeometryLine", "esriGeometryPolyline", "esriGeometryPolygon"] + } + }] + }], + "values": { + "color": "#fff", + "theme": "#105e78", + "iconColor": "#fff", + "activeTool": "", + "scalebar": false, + "splashModal": false, + "toolbarLabels": false, + "tool_print": true, + "tool_print_layouts": false, + "tool_print_legend": false, + "tool_share": true, + "tool_share_embed": false, + "tool_overview": false, + "tool_measure": false, + "tool_details": true, + "tool_legend": false, + "tool_layers": true, + "tool_sublayers": true, + "tool_opacity": true, + "tool_layerlegend": true, + "locate": false, + "locate_track": false, + "tool_edit": false, + "tool_edit_toolbar": false, + "tool_bookmarks": true, + "tool_basemap": true, + "tool_search": true, + "locationSearch": true, + "popupPanel": false + } }