Skip to content

Commit

Permalink
Merge pull request #536 from Esri/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
azizaparveen authored Jul 10, 2022
2 parents 3a08b35 + be7a46b commit 5c3b979
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 19 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<!-- Bootstrap TouchSpinner CSS -->
<link rel="stylesheet" type="text/css" href="js/vendor/touch-spinner/jquery.bootstrap-touchspin.min.css" />
<!--Dojo and Esri CSS-->
<link rel="stylesheet" href="https://js.arcgis.com/3.40/dijit/themes/claro/claro.css" />
<link rel="stylesheet" href="https://js.arcgis.com/3.40/esri/css/esri.css" />
<link rel="stylesheet" href="https://js.arcgis.com/3.41/dijit/themes/claro/claro.css" />
<link rel="stylesheet" href="https://js.arcgis.com/3.41/esri/css/esri.css" />
<!-- Load any application specific styles -->
<link rel="stylesheet" href="css/main.css" type="text/css" />
<link rel="stylesheet" href="css/common.css" type="text/css" />
Expand Down Expand Up @@ -113,7 +113,7 @@
<script type="text/javascript" src="js/vendor/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="js/vendor/touch-spinner/jquery.bootstrap-touchspin.min.js"></script>
<script type="text/javascript" src="js/vendor/exif/exif.js"></script>
<script type="text/javascript" src="https://js.arcgis.com/3.40"></script>
<script type="text/javascript" src="https://js.arcgis.com/3.41"></script>
<script type="text/javascript">
require([
"application/bootstrapper"
Expand Down
9 changes: 6 additions & 3 deletions js/widgets/comment-form/comment-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -1021,23 +1021,26 @@ define([

//if loggedInUser info is available and fields are configured then populate it with the user info
if (this.loggedInUser !== null) {
if (this.config.firstNameField && this.config.firstNameField !== "" && currentField.type === "esriFieldTypeString" &&
if (this.config.firstNameField && this.config.firstNameField !== "" &&
currentField.type === "esriFieldTypeString" && this.loggedInUser.firstName &&
fieldname.toLowerCase() === this.config.firstNameField.toLowerCase()) {
if (this.loggedInUser.firstName.length > currentField.length) {
currentField.defaultValue = this.loggedInUser.firstName.slice(0, currentField.length);
} else {
currentField.defaultValue = this.loggedInUser.firstName;
}
}
if (this.config.lastNameField && this.config.lastNameField !== "" && currentField.type === "esriFieldTypeString" &&
if (this.config.lastNameField && this.config.lastNameField !== "" &&
currentField.type === "esriFieldTypeString" && this.loggedInUser.lastName &&
fieldname.toLowerCase() === this.config.lastNameField.toLowerCase()) {
if (this.loggedInUser.lastName.length > currentField.length) {
currentField.defaultValue = this.loggedInUser.lastName.slice(0, currentField.length);
} else {
currentField.defaultValue = this.loggedInUser.lastName;
}
}
if (this.config.emailField && this.config.emailField !== "" && currentField.type === "esriFieldTypeString" &&
if (this.config.emailField && this.config.emailField !== "" &&
currentField.type === "esriFieldTypeString" && this.loggedInUser.email &&
fieldname.toLowerCase() === this.config.emailField.toLowerCase()) {
if (this.loggedInUser.email.length > currentField.length) {
currentField.defaultValue = this.loggedInUser.email.slice(0, currentField.length);
Expand Down
9 changes: 6 additions & 3 deletions js/widgets/geo-form/geo-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -1135,23 +1135,26 @@ define([
}
//if loggedInUser info is available and fields are configured then populate it with the user info
if (this.loggedInUser !== null) {
if (this.config.firstNameField && this.config.firstNameField !== "" && currentField.type === "esriFieldTypeString" &&
if (this.config.firstNameField && this.config.firstNameField !== "" &&
currentField.type === "esriFieldTypeString" && this.loggedInUser.firstName &&
fieldname.toLowerCase() === this.config.firstNameField.toLowerCase()) {
if (this.loggedInUser.firstName.length > currentField.length) {
currentField.defaultValue = this.loggedInUser.firstName.slice(0, currentField.length);
} else {
currentField.defaultValue = this.loggedInUser.firstName;
}
}
if (this.config.lastNameField && this.config.lastNameField !== "" && currentField.type === "esriFieldTypeString" &&
if (this.config.lastNameField && this.config.lastNameField !== "" &&
currentField.type === "esriFieldTypeString" && this.loggedInUser.lastName &&
fieldname.toLowerCase() === this.config.lastNameField.toLowerCase()) {
if (this.loggedInUser.lastName.length > currentField.length) {
currentField.defaultValue = this.loggedInUser.lastName.slice(0, currentField.length);
} else {
currentField.defaultValue = this.loggedInUser.lastName;
}
}
if (this.config.emailField && this.config.emailField !== "" && currentField.type === "esriFieldTypeString" &&
if (this.config.emailField && this.config.emailField !== "" &&
currentField.type === "esriFieldTypeString" && this.loggedInUser.email &&
fieldname.toLowerCase() === this.config.emailField.toLowerCase()) {
if (this.loggedInUser.email.length > currentField.length) {
currentField.defaultValue = this.loggedInUser.email.slice(0, currentField.length);
Expand Down
32 changes: 22 additions & 10 deletions js/widgets/webmap-list/webmap-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,17 +156,29 @@ define([
dl = new DeferredList(requestArray);
dl.then(lang.hitch(this, function (response) {
this._filterWebMaps(response);
// if atleast 1 web-map is available than display it
// if at least 1 web-map is available than display it
if (this.filteredWebMapResponseArr.length > 0) {
//Check if query returns single webmap with single layer
if ((this.filteredWebMapResponseArr.length === 1) && (this.filteredWebMapResponseArr[0][1].itemInfo.itemData.operationalLayers.length === 1)) {
this.singleWebmapFound();
}
this._createMap(this.filteredWebMapResponseArr[0][1].itemInfo.item.id, this.mapDivID).then(lang.hitch(this, function (response) {
this.lastSelectedWebMapExtent = response.map.extent;
this.lastSelectedWebMapItemInfo = response.itemInfo;
this._createWebMapListUI();
}));
//added these timeouts to fix vector base map issue #528
setTimeout(lang.hitch(this, function () {
//Destroy all the map references from webmap list to avoid unnecessary requests
if (this.mapsToBeDestroyed.length > 0) {
for (var i = this.mapsToBeDestroyed.length - 1; i >= 0; i--) {
this.mapsToBeDestroyed[i].destroy();
}
this.mapsToBeDestroyed.length = 0;
}
setTimeout(lang.hitch(this, function () {
//Check if query returns single webmap with single layer
if ((this.filteredWebMapResponseArr.length === 1) && (this.filteredWebMapResponseArr[0][1].itemInfo.itemData.operationalLayers.length === 1)) {
this.singleWebmapFound();
}
this._createMap(this.filteredWebMapResponseArr[0][1].itemInfo.item.id, this.mapDivID).then(lang.hitch(this, function (response) {
this.lastSelectedWebMapExtent = response.map.extent;
this.lastSelectedWebMapItemInfo = response.itemInfo;
this._createWebMapListUI();
}));
}), 2000);
}), 3000);
} else {
// display message if no web-map is available to display
this.noMapsFound();
Expand Down

0 comments on commit 5c3b979

Please sign in to comment.