@@ -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
0 commit comments