I'm not sure if I missed this, but are there installation instructions available for this widget?
Using WAB 2.2, I downloaded the latest version of the widget and unzipped it to \client\stemapp\widgets\eSearch then added it to client\stemapp\config.json
The steps for installing 90% of all widget is to unzip to the stemapp/widgets folder, restart WAB and then use the WAB UI to add the widget to the app (no manual adding to the config.json).
I have one quick question. I was trying to disable the search results popup by checking the "Disable search results popup" option. But I can still see the popup when clicking on the results. I also tried to uncheck "Add Result as Operational Layer" and "Show in Attribute Table Widget" under the search. And this time, I got a blank popup. Is there a way to remove the popup completely?
Thank you,
Lesi
Popup shown after disabling it --
Popup shown after unchecking the show in attribute table and add as operational layer --
I look to me like you have popups enable for that layer in the Web Map.
It also looks like I have an issue with "Disable search results popup" when a user chooses to not add the search results as an operational layer. If you add the lresults as an operational layer then this option works fine.
I do have popup enabled for the layer used in the search. I want to disable the search result popup so that users don't need to flip through pages of popups to find the information they are looking for. And I only select a handful of attributes to be displayed in the results tab so that each feature returned doesn't occupy a lot of space. The current configuration is adding the search results as an operational layer and disabling the search results popup. But when I click on the highlighted polygons on the map, I can still see the search results popup. Did I miss something small here?
The current configuration is adding the search results as an operational layer and disabling the search results popup. But when I click on the highlighted polygons on the map, I can still see the search results popup
I am not seeing this on my end. If I "Add Result as Operational Layer" and "Disable search results popup" then no popup from the eSearch is diplayed when clicking on the feature, only the features configured popup diaplays.
Now as I mentioned in my last reply if I DON'T choose "Add Result as Operational Layer" and still choose "Disable search results popup" then the blank popup like you show in your second screenshot is displayed.
You're right. I think my widget.js file may have corrupted somehow. After doing a fresh reinstall of the widget, everything works smoothly as expected! Thank you for your awesome work!!
Is it possible to have an apostrophe in the Alias of a Link when configuring the search results? I would like for the Alias to be "alias": "Bird's Eye", in the Config json. When I tried this, the tool tip shows up with only the word Bird. I'm assuming the single quote messes things up in the config??
Can I get a refresher here? I want to use the "Enable export search url" option. I briefly used it in the past, but didn't write down anywhere what the full URL should look like. The specific layer is the fourth item in my eSearch list (or the [3] position). I know the URL will be something like "https://mydomain/name/?esearch=value" but I can't remember how to factor in the item or layer number to get it to work. Can you help?
I had a little help to figure this out, but got it...I used the HTML escape code “Bird's Eye”. Now my apostrophe shows up in the tool tip for the link.
I have a search layer with multiple search aliases setup. Except for one of the aliases, the results returned zoom to the correct extent, show the result records, and shows the basemap (Esri Imagery). However, one of the aliases for some reason when returning results zooms to a blank extent and while the pop-ups still show the result record icons do not. If I click the Default Extent the extent changes and shows basemap and the record results in my area of interest. If I click on a record in the AT, the extent changes to zoom to that record and shows the icon and basemap. All other search aliases for that layer are working correctly. I've removed and readded the alias with no luck. Below is are the
Is the image below the type of browser web console log you were looking for? I'm seeing this same error for Search Aliases that are working correctly too. There were an X and Y field in the Feature Class but were hidden in the MXD used to publish the service. I just deleted those fields thinking perhaps they were somehow related to the error messages below but am still seeing the issue.
Found that the issue had nothing to do with your amazing eSearch widget at all! The issue was that some of the records didn't have a spatial location hence the error code with X and Y values having null values or NaN as shown in the web console error above. The search aliases that were functioning correctly weren't querying the records without spatial locations. I def queried out those records without a correct Shape value and now everything is working correctly. A good lesson to always check data first.
I hope this wasn't asked here before.. I had trouble finding an answer to that problem.
I have the eSearch widget setup and works perfectly, only that I have 2 tabs showing - By Shape and Results... the other tabs are hidden even though they aren't marked as disabled.
I tried to download it again and replaced the libraries in both locations -
Program Files\ArcGIS\WebAppBuilderForArcGIS\server\apps\17\widgets
Program Files\ArcGIS\WebAppBuilderForArcGIS\client\stemapp\widgets
cleared cookies and cache as well and its still doesn't show up...
Look at the Program Files\ArcGIS\WebAppBuilderForArcGIS\server\apps\17\configs\eSearch\Enhanced Search Widget_Config.json and look for disabledtabs array.
If you do not have "Spatial Search Layer" checked fro any layers in the eSearch then this tab will automatically hide. The same goes for the by Value tab if you have not setup any attribute queries in the eSearch this tab will automatically hide.
I did find a small bug tho. In your 3 layers example, there is one example that shows a query with an empty value field. There are 3 types to choose from, predefined, unique and value. Your example shows an empty value but when I try to create a query with an empty value (for the user to enter instead of me), it gives an error that this field value is required.
It is not a bug, you just need to understand the configuration settings. If you have a expression value set as required then you will not be able to have a blank entry.
Robert, thanks so much for your work on the ESW...it's awesome! I've used it for years. I am trying to send the JSON of the selected features to a PHP page to process it in oracle. I've got to the point of adding a menu item in the result menu just need to know how I can get the list as a string and send that JSON via URL instead of download. This could be even just a string of parcel numbers sent in the URL. Thanks!
Well your FeatureAction has access to the featureSet and layer in the onExecute function, so you would just loop though the featureSet and get the parcel number attribute and add it to your string for use in your url.
first, thanks for all your work with the eSearch Widget. I am currently working on an configuration of it with a good amount of layers. I did most of the configuration in the config file itself. There are layers, where i have to use all fields every time. So i decided to try this:
...
"fields": { "all": true },
...
Then i did a search by value and it gave me a error, because the query request sends:
outFields=*,OBJECTID
Took a look into Widget.js and found around line 2163 this:
if (this.config.layers[layerIndex].fields.all) { fields[0] = "*"; } else { for (var i = 0, len = this.config.layers[layerIndex].fields.field.length; i < len; i++) { fields = this.config.layers[layerIndex].fields.field.name; } }
if (!this.config.layers[layerIndex].existObjectId &&
The layer has a OBJECTID field and it seams it was found.
But "existObjectId" is always false. So OBJECTID will be added to the query outFields every time and the error comes up every time i do a search by value.
Do i have to add anything else into the config file for this kind of layer or is this a bug?
Thanks for letting me know about this issue. The reason you are seeing this is that you are manually configuring the layers (which is more error prone and harder then using the UI to do that). When using the UI it would handle this properly. I will have to adjust the widget code to handle people manually setting the all fields for the next version.
Just throwing a couple crazy ideas out there for your consideration... For graphical searches, I think it would be nice to have the option to choose a default graphical search tool, and have that tool enabled when the Graphic Search Tab gets opened. Probably 99% of the time with my app, people are selecting features by point, so I would have that chosen and enabled by default.
Also, for the global configuration settings that apply to all searches, such as "Auto zoom to search results" and "Disable search results popup", it would be useful sometimes to have these options set on an individual search layer basis.
I am trying to create a custom edit widget using attribute inspector but looking to stop applyedits as I am trying to save all edits in array which can be further downloaded as CSV file (nothing saves in database, application will be access by hundreds of users at same time, thats why using this method of feature service on attribute inspector), how I can make applyedits stop/override or anyother method for same.
I have not mention applyedits anywhere in my progarm, its getting called from init.js
I have been looking long and hard to increase the size of the widget panel. I am not able to locate where exactly can i change the width and height of the widget panel.
I have been using WAB since the beginning and I can not remember the original Search widget allowing you to search any layer in the map (I may have forgotten though). I can not say that I would have any desire to attempt to determine some search for any map layer automatically. How would you know which field to search on? You as the application developer need to spend the time to define searches, visible fields, links, sorts, and other parameters before hand.
Yes a separate GDB controlled table in a blob field. So if you are using ArcMap to add attachments to a feature then yes that is what I am shooting to support but if you are talking a user defined and populated blob field then no.
I tested 5 themes using eight of your Custom Widgets on the latest release of the Development Edition of the Web AppBuilder (Version 2.3, January 2017).
Enhanced Search Widget 2.2.1, Version 63
Enhanced Basemap Gallery Widget 2.1, Version 12
Identify Widget 2.1, Version 24
Elevation Profile Widget 2.1, Version 10
Map Progress Indicator Widget 2.1, Version 7
Enhanced Bookmark Widget 2.1, Version 5
Enhanced Locate Widget 2.1, Version 10
Popup Panel Widget 2.1.1, Version 11
Surprisingly, this 2.3 update of the Web AppBuilder did not break any of your Custom Widgets. They are all working like a charm.
All I did was go into the manifest.json file of each of your Custom Widgets, and change:
Thanks for the feedback and the issue report. The identify widget when using the Dart theme needs another css rule to override the dart theme. Add this rule to the css/style.css
I've been busy on other projects, but finally got the chance to update eSearch in my app to version 2.2.1. I LOVE the new features that you added!! The default activated graphic tool and global overrides are great. They work perfectly, and it's little things like this that add a lot of polish to a project! Thank you for the additions, and also for how quickly you did it!!
Is there anyway possible for the search boxes in the esearch to give suggestions to the record your looking for as you type? Like the default search bar in WAB.
';
}
}
}
catch(e){
}
}
}
if (newSub.getAttribute("slang").toLowerCase() != code_l.toLowerCase()) {
if (trLabelsHtml != "") {
var labelSname = "";
if(labelEle[i].querySelector("ul li:nth-child(1)").getAttribute("aria-hidden")){
labelSname = labelEle[i].querySelector("ul li:nth-child(1)").outerHTML;
}
labelEle[i].innerHTML = "";
labelEle[i].innerHTML = labelSname + trLabelsHtml;
}
}
}
}
}
catch(e){
}
}
}
/* V 2.0:3 = Store not translated reply id */
if(lingoRSXML.snapshotLength == 0){
if($scope.falseReplyID == "") {
$scope.falseReplyID = value;
}
}
/* Get translated Body of Replies/Comments */
var lingoRBXML = doc.evaluate(lingoRBExp, doc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for(var i=0;i 0) {
var attachDiv = rootElement.querySelector('div.lia-quilt-row-main').querySelector('div.custom-attachments');
if (attachDiv) {
attachDiv = attachDiv.outerHTML;
}
else if(rootElement.querySelector('div.lia-quilt-row-main').querySelectorAll('#attachments').length > 0){
if ("TkbArticlePage" == "BlogArticlePage") {
attachDiv = rootElement.querySelector('div.lia-quilt-row-main .lia-message-body-content').querySelector('#attachments');
if (attachDiv) {
attachDiv = attachDiv.outerHTML;
}
else{
attachDiv = "";
}
}else{
attachDiv = rootElement.querySelector('div.lia-quilt-row-main').querySelector('#attachments').outerHTML;
}
}
else {
attachDiv = "";
}
/* Feedback Div */
var feedbackDiv = "";
var feedbackDivs = rootElement.querySelector('div.lia-quilt-row-main').querySelectorAll('div.lia-panel-feedback-banner-safe');
if (feedbackDivs.length > 0) {
for (var k = 0; k < feedbackDivs.length; k++) {
feedbackDiv = feedbackDiv + feedbackDivs[k].outerHTML;
}
}
}
else {
var attachDiv = rootElement.querySelector('div.lia-message-body-content').querySelector('div.Attachments.preview-attachments');
if (attachDiv) {
attachDiv = attachDiv.outerHTML;
} else {
attachDiv = "";
}
/* Everyone tags links */
if (document.querySelectorAll("div.TagList").length > 0){
var everyoneTagslink = document.querySelector('div.lia-quilt-row-main').querySelector(".MessageTagsTaplet .TagList");
if ((everyoneTagslink != null)||(everyoneTagslink != undefined)){
everyoneTagslink = everyoneTagslink.outerHTML;
}
else{
everyoneTagslink = "";
}
}
/* Feedback Div */
var feedbackDiv = "";
var feedbackDivs = rootElement.querySelector('div.lia-message-body-content').querySelectorAll('div.lia-panel-feedback-banner-safe');
if (feedbackDivs.length > 0) {
for (var m = 0; m < feedbackDivs.length; m++) {
feedbackDiv = feedbackDiv + feedbackDivs[m].outerHTML;
}
}
}
}
} catch (e) {
}
if (body_L == "") {
/* V 2.0:7 Replacing translated video data with source video data */
var newBodyVideoData = newBody.querySelectorAll('div[class*="video-embed"]');
angular.forEach($scope.videoData[value], function (sourceVideoElement, index) {
if (index <= (newBodyVideoData.length - 1)) {
newBodyVideoData[index].outerHTML = sourceVideoElement.outerHTML
}
});
/* V 2.0:7 = Replacing translated image data with source data */
var newBodyImageData = newBody.querySelectorAll('[class*="lia-image"]');
angular.forEach($scope.imageData[value], function (sourceImgElement, index) {
if (index <= (newBodyImageData.length - 1)) {
newBodyImageData[index].outerHTML = sourceImgElement.outerHTML;
}
});
/* V 2.0:7 = Replacing translated pre tag data with source data */
var newBodyPreTagData = newBody.querySelectorAll('pre');
angular.forEach($scope.preTagData[value], function (sourcePreTagElement, index) {
if (index <= (newBodyPreTagData.length - 1)) {
newBodyPreTagData[index].outerHTML = sourcePreTagElement.outerHTML;
}
});
}
var copyBodySubject = false;
if (body_L == "") {
copyBodySubject = true;
body_L = newBody.innerHTML;
}
/* This code is written as part of video fix by iTalent */
/* try{
var iframeHTMLText = body_L;
var searchIframeText = "<IFRAME";
var foundiFrameTag;
if (iframeHTMLText.indexOf(searchIframeText) > -1) {
foundiFrameTag = decodeHTMLEntities(iframeHTMLText);
foundiFrameTag = foundiFrameTag.split('src="')[1];
body_L = foundiFrameTag;
}
}
catch(e){
} */
/* This code is placed to remove the extra meta tag adding in the UI*/
try{
body_L = body_L.replace('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />','');
}
catch(e){
}
/** We should not replace the source content if user profile language and selected target language matches with source language **/
if(showTrContent) {
var compiled = false;
rootElement.querySelectorAll('div.lia-message-body-content')[0].innerHTML = null
if("TkbArticlePage"=="IdeaPage"){
// var customAttachDiv = '';
rootElement.querySelectorAll('div.lia-message-body-content')[0].innerHTML = body_L + feedbackDiv ;
$compile(rootElement.querySelectorAll('div.lia-message-body-content')[0])($scope);
compiled = true;
/* Attach atttach div */
// document.querySelector("div.translation-attachments-"+value).innerHTML = attachDiv;
rootElement.querySelectorAll('div.lia-message-body-content')[0].insertAdjacentHTML('afterend',attachDiv);
if(rootElement.querySelectorAll('div.lia-quilt-idea-message .lia-message-body .lia-attachments-message').length > 1){
rootElement.querySelectorAll('div.lia-quilt-idea-message .lia-message-body .lia-attachments-message')[1].remove();
}
} else {
if("TkbArticlePage"=="TkbArticlePage"){
rootElement.querySelectorAll('div.lia-message-body-content')[0].innerHTML = body_L + feedbackDiv ;
}else{
rootElement.querySelectorAll('div.lia-message-body-content')[0].innerHTML = body_L + feedbackDiv + attachDiv;
compiled = true;
}
}
/* Destroy and recreate OOyala player videos to restore the videos in target languages which is written by iTalent as part of iTrack LILICON-79 */ /* Destroy and recreate OOyala player videos */
try{
// $scope.videoData[value][0].querySelector("div").getAttribute("id");
for(var vidIndex=0; vidIndex<$scope.videoData[value].length; vidIndex++){
if( $scope.videoData[value][vidIndex].querySelector("div") != null){
var containerId = LITHIUM.OOYALA.players[$scope.videoData[value][vidIndex].querySelector("div").getAttribute("id")].containerId;
videoId = LITHIUM.OOYALA.players[$scope.videoData[value][vidIndex].querySelector("div").getAttribute("id")].videoId;
/** Get the Video object */
vid = OO.Player.create(containerId,videoId);
/** Destroy the video **/
vid.destroy();
/** recreate in the same position */
var vid = OO.Player.create(containerId,videoId);
}
}
}
catch(e){
}
try{
for(var vidIndex=0; vidIndex<($scope.videoData[value].length); vidIndex++){
if($scope.videoData[value][vidIndex].querySelector('video-js') != null){
var data_id = $scope.videoData[value][vidIndex].querySelector('video-js').getAttribute('data-video-id');
var data_account = $scope.videoData[value][vidIndex].querySelector('video-js').getAttribute('data-account');
var data_palyer = $scope.videoData[value][vidIndex].querySelector('video-js').getAttribute('data-player');
var div = document.createElement('div');
div.id = "brightcove";
div.class = "brightcove-player";
div.innerHTML =
'(view in my videos)'
var data = div.getElementsByClassName("video-js");
var script = document.createElement('script');
script.src = "https://players.brightcove.net/" + data_account + "/" + data_palyer + "_default/index.min.js";
for(var i=0;i< data.length;i++){
videodata.push(data[i]);
}
}
}
for(var i=0;i< videodata.length;i++){
document.getElementsByClassName('lia-vid-container')[i].innerHTML = videodata[i].outerHTML;
document.body.appendChild(script);
}
}
catch(e){
}
if(!compiled){
/* Re compile html */
$compile(rootElement.querySelectorAll('div.lia-message-body-content')[0])($scope);
}
}
if (code_l.toLowerCase() != newBody.getAttribute("slang").toLowerCase()) {
/* Adding Translation flag */
var tr_obj = $filter('filter')($scope.sourceLangList, function (obj_l) {
return obj_l.code.toLowerCase() === newBody.getAttribute("slang").toLowerCase()
});
if (tr_obj.length > 0) {
tr_text = "Esri may utilize third parties to translate your data and/or imagery to facilitate communication across different languages.".replace(/lilicon-trans-text/g, tr_obj[0].title);
try {
if ($scope.wootMessages[$rootScope.profLang] != undefined) {
tr_text = $scope.wootMessages[$rootScope.profLang].replace(/lilicon-trans-text/g, tr_obj[0].title);
}
} catch (e) {
}
} else {
//tr_text = "This message was translated for your convenience!";
tr_text = "Esri may utilize third parties to translate your data and/or imagery to facilitate communication across different languages.";
}
try {
if (!document.getElementById("tr-msz-" + value)) {
var tr_para = document.createElement("P");
tr_para.setAttribute("id", "tr-msz-" + value);
tr_para.setAttribute("class", "tr-msz");
tr_para.style.textAlign = 'justify';
var tr_fTag = document.createElement("IMG");
tr_fTag.setAttribute("class", "tFlag");
tr_fTag.setAttribute("src", "/html/assets/langTrFlag.PNG");
tr_fTag.style.marginRight = "5px";
tr_fTag.style.height = "14px";
tr_para.appendChild(tr_fTag);
var tr_textNode = document.createTextNode(tr_text);
tr_para.appendChild(tr_textNode);
/* Woot message only for multi source */
if(rootElement.querySelector(".lia-quilt-forum-message")){
rootElement.querySelector(".lia-quilt-forum-message").appendChild(tr_para);
} else if(rootElement.querySelector(".lia-message-view-blog-topic-message")) {
rootElement.querySelector(".lia-message-view-blog-topic-message").appendChild(tr_para);
} else if(rootElement.querySelector(".lia-quilt-blog-reply-message")){
rootElement.querySelector(".lia-quilt-blog-reply-message").appendChild(tr_para);
} else if(rootElement.querySelector(".lia-quilt-tkb-message")){
rootElement.querySelector(".lia-quilt-tkb-message").appendChild(tr_para);
} else if(rootElement.querySelector(".lia-quilt-tkb-reply-message")){
rootElement.querySelector(".lia-quilt-tkb-reply-message").insertBefore(tr_para,rootElement.querySelector(".lia-quilt-row.lia-quilt-row-footer"));
} else if(rootElement.querySelector(".lia-quilt-idea-message")){
rootElement.querySelector(".lia-quilt-idea-message").appendChild(tr_para);
} else if(rootElement.querySelector('.lia-quilt-occasion-message')){
rootElement.querySelector('.lia-quilt-occasion-message').appendChild(tr_para);
}
else {
if (rootElement.querySelectorAll('div.lia-quilt-row-footer').length > 0) {
rootElement.querySelectorAll('div.lia-quilt-row-footer')[0].appendChild(tr_para);
} else {
rootElement.querySelectorAll('div.lia-quilt-column-message-footer')[0].appendChild(tr_para);
}
}
}
} catch (e) {
}
}
} else {
/* Do not display button for same language */
// syncList.remove(value);
var index = $scope.syncList.indexOf(value);
if (index > -1) {
$scope.syncList.splice(index, 1);
}
}
}
}
});
});
/* V 1.1:2 = Reply Sync button for multi source translation */
} catch(e){
console.log(e);
}
};
if((rContent != undefined) && (rContent != "")) {
drawCanvas(decodeURIComponent(rContent));
/** Update variable with selected language code **/
$scope.previousSelCode = code_l;
}
};
/**
* @function manageTranslation
* @description Managess the translation of given language for the thread
* @param {string} langCode - Language Code
* @param {string} tid - Thread ID
*/
$scope.manageTranslation = function (langCode, tid) {
//debugger;
$scope.showTrText = false;
/* V 2.0:5 = actualStatus variable introduced to indicate detailed connector status on UI. This variable holds the actual translation percentage */
$scope.transPercent = "";
$scope.actualStatus = "";
if (tid != "") {
var bulkTranslation = lithiumPlugin.bulkTranslation(langCode, tid);
bulkTranslation.then(function (trContent) {
if(trContent.body != "") {
$scope.showPreview(trContent.body, $scope.mszList, langCode);
if(langCode != "en-US") {
$scope.showTrText = true;
}
}
if((trContent.status != "NA") && trContent.status != null) {
// $scope.transPercent = String(trContent.status);
$scope.actualStatus = String(trContent.status);
} else {
// $rootScope.errorMsg = "Translation is in progress. Please check again a few minutes."
$rootScope.errorMsg = "Translation is in progress. Please retry in a few minutes."
}
$scope.workbench = trContent.wb;
/* V 2.0:4 = Trigger uncalled or delayed callbacks (documnet uploaded/translation completed from lithium).*/
if(trContent.callback == 'true') {
var trCompletCallback = lithiumPlugin.trCompletCallback(langCode, trContent.docID);
trCompletCallback.then(function (callback){
// $rootScope.errorMsg = "Downloading Translated content in " + langCode + " now. Please check again in a few minutes."
$rootScope.errorMsg = "Uploading content to translate. Please check again in a few minutes."
});
} else if (trContent.callback == 'upload') {
var trCompletUpload = lithiumPlugin.trCompletUpload(langCode, trContent.docID);
trCompletUpload.then(function (callback) {
//$rootScope.errorMsg = "Uploading content to translate. Please check again in a few minutes."
$rootScope.errorMsg = "Uploading content to translate. Please check again in a few minutes."
});
} else if ("many" == "one") {
$scope.updateOOS();
} else if("SmartConx" == "SmartConx"){
if ("many" == "many"){
$scope.updateOOS();
}
}else if ((trContent.status != null) && trContent.status.includes("100")) {
/* If everything fine then only check Out of Sync status */
$scope.updateOOS();
} else {
/* If translation perccent is less than 100 then show the percentage on UI */
$scope.transPercent = $scope.actualStatus;
}
});
}
}
/**
* @function selectThisLang
* @description Called on select dropdown.
* @param {string} lang - Language code
*
*/
$scope.selectThisLang = function (lang, anonymousFlag) {
/* 1.4:3 Update Analytics on language selection */
try {
setTimeout(()=>{
lingoThreadLangSelected(lang, '910880');
console.log("Language",lang);
},5000)
} catch (e) {
console.log(e);
}
/** Display Translated content **/
var getTranslation = lithiumPlugin.getTranslation(lang, "910880");
getTranslation.then(function (trContent) {
if (trContent.body != "") {
$scope.showPreview(trContent.body, $scope.mszList, lang);
} else {
//$rootScope.errorMsg = "Translation is in progress. Please check again in a few minutes."
$rootScope.errorMsg = "Translation is in progress. Please retry in a few minutes."
}
});
};
var decodeEntities = (function() {
// this prevents any overhead from creating the object each time
var element = document.createElement('div');
function decodeHTMLEntities (str) {
if(str && typeof str === 'string') {
// strip script/html tags
str = str.replace(/