Skip to content

Commit 9c80a8d

Browse files
committed
4.3 updates
1 parent 0a0170e commit 9c80a8d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1272
-1160
lines changed

config/templateConfig.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ define({
4747
//if you want users to be able to specify lat/lon coordinates that define the map's center or
4848
//specify an alternate basemap via a url parameter.
4949
"urlItems": [
50-
"color","extent", "center", "level", "marker", "feature", "find" // example param. ?theme=<my theme>
50+
"color", "extent", "center", "level", "marker", "feature", "find", "sharedTheme", "sharedThemeItem"
5151
],
5252
// For esri hosted environments only. Will automatically create a sharingurl and proxyurl for the application.
5353
esriEnvironment: false
54-
});
54+
});

css/styles.css

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,16 @@ g#mapDiv_graphics_layer path {
146146
position: absolute;
147147
right: 0;
148148
left: 0;
149-
top: 10px;
149+
top: 0;
150150
border-top: none;
151151
border-right: none;
152152
border-left: none; }
153-
153+
.esriEditor .dojoxGridScrollbox{
154+
top:20px;
155+
}
154156
@media only screen and (min-width: 720px) {
155157
.esriEditor .esriDrawingToolbar {
156-
top: 10px;
158+
top: 0;
157159
right: 0;
158160
left: 0; } }
159161

@@ -588,6 +590,22 @@ img {
588590
text-decoration: none;
589591
color: #000;
590592
}
593+
.titlePane{
594+
height:20px;
595+
line-height: 16px;
596+
}
597+
.esriPopup.light .titlePane, .esriPopup.dark .titlePane{
598+
font-size: 12px;
599+
line-height: 16px;
600+
height: 30px;
601+
padding: 10px;
602+
border: 0;
603+
border-radius: 3px 3px 0 0;
604+
-webkit-border-radius: 3px 3px 0 0;
605+
}
606+
.esriPopup.light .titlePane .title, .esriPopup.dark .titlePane .title{
607+
line-height: 16px;
608+
}
591609
.popupTitle{
592610
width:100%;
593611
padding:10px;
@@ -606,6 +624,7 @@ img {
606624
cursor:pointer;
607625
background-color: transparent;
608626
border:none;
627+
overflow:visible;
609628
}
610629
.popupButton:hover{
611630
/*match out of the box hover color for home and locate*/
@@ -985,7 +1004,7 @@ h1, h2{
9851004
/*Added hover to match the out-of-the-box hover for the home and locate buttons*/
9861005
.no-touch .panelTool:hover {
9871006
background-color: transparent;
988-
background-color: rgba(102, 102, 102, 0.9);
1007+
background-color: rgba(102, 102, 102, 0.4);
9891008
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#E6666666,endColorstr=#E6666666);
9901009
zoom: 1; }
9911010

index.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
<meta charset="utf-8">
77
<meta name="fragment" content="!">
88
<!-- Responsive -->
9-
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
9+
<meta name="viewport" content="width=device-width", initial-scale=1>
1010
<meta name="mobile-web-app-capable" content="yes">
1111
<meta name="apple-mobile-web-app-capable" content="yes">
1212
<meta name="apple-mobile-web-app-status-bar-style" content="default">
1313
<!-- End Responsive -->
14-
<link rel="stylesheet" href="//js.arcgis.com/3.17/esri/themes/calcite/dijit/calcite.css">
14+
<link rel="stylesheet" href="//js.arcgis.com/3.18/esri/themes/calcite/dijit/calcite.css">
1515

16-
<link rel="stylesheet" href="//js.arcgis.com/3.17/esri/css/esri.css">
16+
<link rel="stylesheet" href="//js.arcgis.com/3.18/esri/css/esri.css">
1717
<!-- Load any application specific styles -->
1818
<link rel="stylesheet" href="css/styles.css">
1919
</head>
@@ -34,7 +34,7 @@
3434
<header class="fc" id="panelText" role="banner">
3535
<hgroup>
3636
<h1 id="title"></h1>
37-
<h2 id="subtitle"</h2>
37+
<h2 id="subtitle"></h2>
3838
</hgroup>
3939
</header>
4040
<div role="search" id="panelSearch">
@@ -66,14 +66,14 @@ <h2 id="subtitle"</h2>
6666
</div>
6767
</div>
6868
<!--Modal Splash Screen-->
69-
<div id="modal" class="hide dialog-modal" role="dialog" tabindex="-1">
69+
<div id="modal" class="hide dialog-modal" aria-labelledby="modalTitle" aria-describedby="modalContent" role="dialog" tabindex="-1">
7070
<div class="modal-content">
7171
<header class="modal-header bg fc" >
72-
<h2 id="modalTitle" class="dialog-modal" tabindex="0"></h2>
72+
<h2 id="modalTitle" class="dialog-modal"></h2>
7373
</header>
7474
<div class="copy">
75-
<div id="modalContent" class="dialog-modal" tabindex="0" ></div>
76-
<input id="closeOverlay" class="dialog-modal bg fc" type="button" tabindex="0"/>
75+
<div id="modalContent" class="dialog-modal"></div>
76+
<input id="closeOverlay" class="dialog-modal bg fc" type="button"/>
7777
</div>
7878
</div>
7979
</div>
@@ -107,7 +107,7 @@ <h2 id="modalTitle" class="dialog-modal" tabindex="0"></h2>
107107
return (false);
108108
}
109109
</script>
110-
<script type="text/javascript" src="//js.arcgis.com/3.17/"></script>
110+
<script type="text/javascript" src="//js.arcgis.com/3.18/"></script>
111111
<script type="text/javascript">
112112
require([
113113
"config/templateConfig",

js/SearchSources.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ define(["dojo/_base/declare", "dojo/_base/lang", "dojo/_base/array", "dojo/_base
159159
});
160160
}
161161
// Set default search fields if not specified
162-
if (source.searchFields.length === 0) {
162+
if (source.searchFields && source.searchFields.length === 0) {
163163
if (featureLayer && featureLayer.displayField) {
164164
source.searchFields = [featureLayer.displayField];
165165
}

js/main.js

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ define([
116116
// and application id and any url parameters and any application specific configuration information.
117117
if (config) {
118118
this.config = config;
119+
if (this.config.sharedThemeConfig && this.config.sharedThemeConfig.attributes && this.config.sharedThemeConfig.attributes.theme) {
120+
var sharedTheme = this.config.sharedThemeConfig.attributes;
121+
this.config.logo = sharedTheme.layout.header.component.settings.logoUrl || sharedTheme.theme.logo.small || null;
122+
this.config.color = sharedTheme.theme.text.color;
123+
this.config.theme = sharedTheme.theme.body.bg;
124+
}
119125
this.color = this._setColor(this.config.color);
120126
this.theme = this._setColor(this.config.theme);
121127
this.iconColor = this._setColor(this.config.iconColor);
@@ -288,7 +294,6 @@ define([
288294
}
289295

290296
// if no tools are active let's setup support for setting
291-
//this._setActiveTool(toolbar);
292297
on(toolbar, "updateTool", lang.hitch(this,
293298
function(name) {
294299
if (name === "measure") {
@@ -318,7 +323,6 @@ define([
318323
}));
319324
}
320325
}));
321-
322326
domStyle.set("panelPages", "visibility",
323327
"visible");
324328
//Now that all the tools have been added to the toolbar we can add page naviagation
@@ -346,7 +350,6 @@ define([
346350
_showSplashScreen: function(toolbar) {
347351
// Setup the modal overlay if enabled
348352
if (this.config.splashModal) {
349-
350353
domClass.add(document.body, "noscroll");
351354
domClass.remove("modal", "hide");
352355
domAttr.set("modal", "aria-label", this.config.splashTitle || "Splash Screen");
@@ -393,7 +396,6 @@ define([
393396
} else {
394397
deferred.resolve(false);
395398
}
396-
397399
return deferred.promise;
398400
},
399401

@@ -459,7 +461,6 @@ define([
459461

460462
},
461463
_addEditor: function(tool, toolbar, panelClass) {
462-
463464
//Add the editor widget to the toolbar if the web map contains editable layers
464465
var deferred = new Deferred();
465466
this.editableLayers = this._getEditableLayers(this.config.response
@@ -475,7 +476,6 @@ define([
475476
} else {
476477
deferred.resolve(false);
477478
}
478-
479479
return deferred.promise;
480480
},
481481
_createEditor: function() {
@@ -488,7 +488,6 @@ define([
488488
deferred.resolve(false);
489489
return;
490490
}
491-
492491
//add field infos if necessary. Field infos will contain hints if defined in the popup and hide fields where visible is set
493492
//to false. The popup logic takes care of this for the info window but not the edit window.
494493
array.forEach(this.editableLayers, lang.hitch(this,
@@ -502,7 +501,6 @@ define([
502501
var fieldInfos = [];
503502
array.forEach(fields, lang.hitch(this,
504503
function(field) {
505-
506504
//added support for editing date and time
507505
if (field.format && field.format.dateFormat &&
508506
array.indexOf(this.timeFormats,
@@ -511,10 +509,10 @@ define([
511509
time: true
512510
};
513511
}
514-
//Add all editable fields even if not visible.
515-
//if (field.visible) {
516-
fieldInfos.push(field);
517-
//}
512+
//Only add visible fields
513+
if (field.visible) {
514+
fieldInfos.push(field);
515+
}
518516
}));
519517

520518
layer.fieldInfos = fieldInfos;
@@ -526,29 +524,32 @@ define([
526524
toolbarVisible: has("edit-toolbar")
527525
};
528526
this.map.enableSnapping();
527+
//show the editor panel so layers render in the widget correctly.
528+
domClass.remove(dom.byId("page_edit"), "hide");
529529
this.editor = new Editor({
530530
settings: settings
531531
}, domConstruct.create("div", {}, this.editorDiv));
532-
533-
532+
this.editor.on("load", lang.hitch(this, function() {
533+
// hide the panel
534+
domClass.add(dom.byId("page_edit"), "hide");
535+
deferred.resolve(true);
536+
}), function(error) {
537+
domClass.add(dom.byId("page_edit"), "hide");
538+
deferred.resolve(true);
539+
});
534540
this.editor.startup();
535-
deferred.resolve(true);
536-
537541
}));
538542
return deferred.promise;
539-
540543
},
541544
_destroyEditor: function() {
542545
if (this.editor) {
543546
this.editor.destroy();
544547
this.editor = null;
545548
}
546-
547549
},
548550
_addLayers: function(tool, toolbar, panelClass) {
549551
//Toggle layer visibility if web map has operational layers
550552
var deferred = new Deferred();
551-
552553
var layers = this.config.response.itemInfo.itemData.operationalLayers;
553554

554555
if (layers.length === 0) {
@@ -616,7 +617,6 @@ define([
616617
}
617618
return deferred.promise;
618619
},
619-
620620
_addMeasure: function(tool, toolbar, panelClass) {
621621
//Add the measure widget to the toolbar.
622622
var deferred = new Deferred();
@@ -675,6 +675,7 @@ define([
675675
height: "auto"
676676
}, domConstruct.create("div", {}, ovMapDiv));
677677
ovMap.startup();
678+
678679
query(".ovwHighlight").forEach(function(node) {
679680
domAttr.set(node, "tabindex", "0");
680681
domAttr.set(node, "aria-label", this.config.i18n.map.overviewDetails);
@@ -984,12 +985,10 @@ define([
984985
createdOptions.activeSourceIndex = this.config.searchConfig
985986
.activeSourceIndex;
986987
}
987-
console.log(this.config)
988988
createdOptions.enableSearchingAll = false;
989-
if(this.config.searchConfig && this.config.searchConfig.enableSearchingAll && this.config.searchConfig.enableSearchingAll == true){
989+
if (this.config.searchConfig && this.config.searchConfig.enableSearchingAll && this.config.searchConfig.enableSearchingAll === true) {
990990
createdOptions.enableSearchingAll = true;
991991
}
992-
console.log(createdOptions.enableSearchingAll)
993992
}
994993
var search = new Search(createdOptions, domConstruct.create(
995994
"div", {
@@ -1176,7 +1175,7 @@ define([
11761175
//Set the font color using the configured color value
11771176
query(".fc").style("color", this.color.toString());
11781177
query(".esriPopup .titlePane").style("color", this.color.toString());
1179-
query(".esriPopup. .titleButton").style("color", this.color.toString());
1178+
query(".esriPopup .titleButton").style("color", this.color.toString());
11801179

11811180
},
11821181
_adjustPopupSize: function() {
@@ -1221,6 +1220,7 @@ define([
12211220
}).then(lang.hitch(this, function(response) {
12221221

12231222
this.map = response.map;
1223+
domClass.add(this.map.infoWindow.domNode, "light");
12241224

12251225
if (params.markerGraphic) {
12261226
// Add a marker graphic with an optional info window if

js/nls/ShareDialog.js

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,35 @@ define({
1515
}
1616
}
1717
}),
18-
"ar": 1,
19-
"cs": 1,
20-
"da": 1,
21-
"de": 1,
22-
"el": 1,
23-
"es": 1,
24-
"et": 1,
25-
"fi": 1,
26-
"fr": 1,
27-
"he": 1,
28-
"it": 1,
29-
"ja": 1,
30-
"ko": 1,
31-
"lt": 1,
32-
"lv": 1,
33-
"nl": 1,
34-
"nb": 1,
35-
"pl": 1,
36-
"pt-br": 1,
37-
"pt-pt": 1,
38-
"ro": 1,
39-
"ru": 1,
40-
"sv": 1,
41-
"tr": 1,
42-
"th": 1,
43-
"vi": 1,
44-
"zh-cn": 1,
45-
"zh-hk": 1,
46-
"zh-tw": 1
18+
"ar": 1,
19+
"cs": 1,
20+
"da": 1,
21+
"de": 1,
22+
"el": 1,
23+
"es": 1,
24+
"et": 1,
25+
"fi": 1,
26+
"fr": 1,
27+
"he": 1,
28+
"hr": 1,
29+
"it": 1,
30+
"ja": 1,
31+
"ko": 1,
32+
"lt": 1,
33+
"lv": 1,
34+
"nl": 1,
35+
"nb": 1,
36+
"pl": 1,
37+
"pt-br": 1,
38+
"pt-pt": 1,
39+
"ro": 1,
40+
"ru": 1,
41+
"sr": 1,
42+
"sv": 1,
43+
"th": 1,
44+
"tr": 1,
45+
"vi": 1,
46+
"zh-cn": 1,
47+
"zh-hk": 1,
48+
"zh-tw": 1
4749
});

0 commit comments

Comments
 (0)