// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://@sbaseurl@/jsapi/jsapi/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.

//>>built
require({cache:{"url:widgets/ObliqueViewer/setting/FormatFields/FormatFieldsSettings.html":'\x3cdiv data-dojo-attach-point\x3d"_formatFieldsContainer"\x3e\r\n    \x3ctable class\x3d"esriObliqueViewerSettingsContainerTable"\x3e\r\n        \x3ctr\x3e\r\n            \x3ctd\x3e\r\n                \x3cfieldset class\x3d"esriObliqueViewerFieldFormat"\x3e\r\n\r\n                    \x3cdiv class\x3d"format formatNumber"\x3e\r\n                        \x3cselect data-dojo-attach-point\x3d"_formatNumberSelect" class\x3d"esriObliqueViewerFieldFormatSelect formatNumber formatter format"\r\n                            data-dojo-type\x3d"dijit.form.Select"\x3e\r\n                            \x3coption value\x3d\'0\' selected\x3d"selected"\x3e0 ${_i18n.decimalPlaces}\x3c/option\x3e\r\n                            \x3coption value\x3d\'1\'\x3e1 ${_i18n.decimalPlace}\x3c/option\x3e\r\n                            \x3coption value\x3d\'2\'\x3e2 ${_i18n.decimalPlaces}\x3c/option\x3e\r\n                            \x3coption value\x3d\'3\'\x3e3 ${_i18n.decimalPlaces}\x3c/option\x3e\r\n                            \x3coption value\x3d\'4\'\x3e4 ${_i18n.decimalPlaces}\x3c/option\x3e\r\n                            \x3coption value\x3d\'5\'\x3e5 ${_i18n.decimalPlaces}\x3c/option\x3e\r\n                            \x3coption value\x3d\'6\'\x3e6 ${_i18n.decimalPlaces}\x3c/option\x3e\r\n                            \x3coption value\x3d\'7\'\x3e7 ${_i18n.decimalPlaces}\x3c/option\x3e\r\n                            \x3coption value\x3d\'8\'\x3e8 ${_i18n.decimalPlaces}\x3c/option\x3e\r\n                        \x3c/select\x3e\r\n                        \x3cbr /\x3e\r\n                    \x3c/div\x3e\r\n                    \x3cdiv class\x3d"formatNumber formatter formatInteger format"\x3e\r\n                        \x3clabel class\x3d"checkbox"\x3e\r\n                            \x3cinput data-dojo-attach-point\x3d"_formatNumberCheck" data-dojo-type\x3d"dijit.form.CheckBox" /\x3e\x26nbsp;${_i18n.separator}\x3c/label\x3e\r\n                    \x3c/div\x3e\r\n                    \x3cdiv class\x3d"esriObliqueViewerFormatDate format"\x3e\r\n                        \x3cselect data-dojo-attach-point\x3d"_formatDateSelect" class\x3d"esriObliqueViewerFieldFormatSelect formatter"\r\n                            data-dojo-type\x3d"dijit.form.Select"\x3e\r\n                            \x3coption value\x3d"shortDate" selected\x3d"selected"\x3e12/21/1997\x3c/option\x3e\r\n                            \x3coption value\x3d"shortDateLE" selected\x3d"selected"\x3e21/12/1997\x3c/option\x3e\r\n                            \x3coption value\x3d"longMonthDayYear"\x3eDecember 21, 1997\x3c/option\x3e\r\n                            \x3coption value\x3d"dayShortMonthYear"\x3e21 Dec 1997\x3c/option\x3e\r\n                            \x3coption value\x3d"longDate"\x3eSunday, December 21, 1997\x3c/option\x3e\r\n                            \x3coption value\x3d"longMonthYear"\x3eDecember 1997\x3c/option\x3e\r\n                            \x3coption value\x3d"shortMonthYear"\x3eDec 1997\x3c/option\x3e\r\n                            \x3coption value\x3d"year"\x3e1997\x3c/option\x3e\r\n                        \x3c/select\x3e\r\n                        \x3cdiv class\x3d"formatTime hide"\x3e\r\n                            \x3clabel data-dojo-attach-point\x3d"timeCheckboxLbl" class\x3d"timeCheckbox disabled"\x3e\r\n                                \x3cinput data-dojo-attach-point\x3d"_formatTimeCheck" data-dojo-type\x3d"dijit.form.CheckBox" /\x3e\x26nbsp;${_i18n.showTime}\x3c/label\x3e\r\n                            \x3cbr /\x3e\r\n                            \x3cselect data-dojo-attach-point\x3d"_formatTimeSelect" class\x3d"esriObliqueViewerFieldFormatSelect formatter hide"\r\n                                data-dojo-type\x3d"dijit.form.Select"\x3e\r\n                                \x3coption value\x3d"ShortTime" selected\x3d"selected"\x3e6:00 PM\x3c/option\x3e\r\n                                \x3coption value\x3d"LongTime"\x3e6:00:00 PM\x3c/option\x3e\r\n                                \x3coption value\x3d"ShortTime24"\x3e18:00\x3c/option\x3e\r\n                                \x3coption value\x3d"LongTime24"\x3e18:00:00\x3c/option\x3e\r\n                            \x3c/select\x3e\r\n                        \x3c/div\x3e\r\n                    \x3c/div\x3e\r\n                \x3c/fieldset\x3e\r\n            \x3c/td\x3e\r\n        \x3c/tr\x3e\r\n    \x3c/table\x3e\r\n\x3c/div\x3e'}});
define("dojo/_base/declare dojo/_base/lang dojo/query dojo/json dojo/dom-class dojo/text!./FormatFieldsSettings.html dojo/i18n!../nls/strings dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin esri/domUtils".split(" "),function(k,e,d,h,f,m,n,p,q,r,g){return k([p,q,r],{templateString:m,widgetsInTemplate:!0,_supportsTime:{shortDate:!0,shortDateLE:!0},constructor:function(a){k.safeMixin(this,a);this._i18n=n},show:function(){this.loadSettings();this.startup()},_getFormatter:function(){var a=
this.fieldValue,c=a.type;d(".formatTime").addClass("settingsHidden");d(".esriObliqueViewerFieldFormat, .legendTitle, .format").forEach(function(b){g.hide(b)});if(a=a.format)(a=h.parse(a))&&(c in this.obliqueViewer.esriDataType.decimal||c in this.obliqueViewer.esriDataType.integer)?(c in this.obliqueViewer.esriDataType.decimal&&this._formatNumberSelect.set("value",a.places,!1),this._formatNumberCheck.set("value",a.digitSeparator,!1),c in this.obliqueViewer.esriDataType.decimal?d(".esriObliqueViewerFieldFormat, .legendTitle, .formatNumber").forEach(function(b){if(b=
g.getNode(b))b.style.display="table"}):d(".esriObliqueViewerFieldFormat, .legendTitle, .formatInteger").forEach(function(b){g.show(b)})):a&&c in this.obliqueViewer.esriDataType.date?(d(".formatTime").removeClass("settingsHidden"),d(".esriObliqueViewerFieldFormat, .legendTitle, .esriObliqueViewerFormatDate").forEach(function(b){g.show(b)}),-1<a.dateFormat.indexOf("LETime")||-1<a.dateFormat.indexOf("LEShortTime")||-1<a.dateFormat.indexOf("LELongTime")?(this._formatDateSelect.set("value","shortDateLE",
!1),this._formatTimeCheck.set("checked",!0),this._formatTimeSelect.set("value",a.dateFormat.split("shortDateLE")[1],!1),this._enableUpdateTime(!0)):-1<a.dateFormat.indexOf("Time")?(this._formatDateSelect.set("value","shortDate",!1),this._formatTimeCheck.set("checked",!0),this._formatTimeSelect.set("value",a.dateFormat.split("shortDate")[1],!1),this._enableUpdateTime(!0)):(this._formatDateSelect.set("value",a.dateFormat,!1),this._enableUpdateTime(a.dateFormat in this._supportsTime))):d(".esriObliqueViewerFieldFormat, .legendTitle").forEach(function(b){g.hide(b)})},
_setFormatter:function(a,c){var b=h.parse(this.fieldValue.format);d(".formatTime").addClass("settingsHidden");if("dateFormat"===a){c=c||this._formatDateSelect.get("value");var l=c in this._supportsTime,t=l&&this._formatTimeCheck.get("checked")?this._formatTimeSelect.get("value"):"";d(".formatTime").removeClass("settingsHidden");this._enableUpdateTime(l);b[a]=c+t}else b[a]="places"===a?parseInt(c,10):c;this.fieldValue.format=h.stringify(b);this.obliqueViewer.updateFieldFormat()},_enableUpdateTime:function(a){this._formatTimeCheck.set("disabled",
!a);f[a?"remove":"add"](this._formatTimeSelect.domNode,"settingsHidden");f[a?"remove":"add"](this.timeCheckboxLbl,"disabled");a||this._formatTimeCheck.set("checked",!1)},_setFormatHandles:function(){this._formatDateSelect.on("change",e.hitch(this,"_setFormatter","dateFormat"));this._formatTimeSelect.on("change",e.hitch(this,"_setFormatter","dateFormat",null));this._formatNumberSelect.on("change",e.hitch(this,"_setFormatter","places"));this._formatNumberCheck.on("change",e.hitch(this,"_setFormatter",
"digitSeparator"));this._formatTimeCheck.on("change",e.hitch(this,function(){var a=this._formatTimeCheck.get("checked");f[a?"remove":"add"](this._formatTimeSelect.domNode,"settingsHidden");this._setFormatter("dateFormat")}))},loadSettings:function(){this.obliqueViewer.selectedField?(f.remove(this._formatFieldsContainer,"settingsHidden"),this.fieldValue=this.obliqueViewer.selectedField,this._setFormatHandles(),this._getFormatter()):f.add(this._formatFieldsContainer,"settingsHidden")},_saveSettings:function(){},
_handleOKButtonClick:function(){this._saveSettings();this.dialog.hide()},hide:function(){this.dialog.hide()}})});