Hi Robert, I'm trying to move the folder eSearch to another path into the folder widgets (uri:"widgets/myWidgets/eSearch/Widget"), but I got problem with the file './List'. It file don't load because the uri is wrong (widgets/eSearch/List). Anothers widgets working fine. Could you please help me with It?
Hi Robert, On initial testing I thought the new version of the widget worked great. It worked when I deleted all the pre-configured layers that came with the widget except one. However when I add my own layer and delete all the pre-configured layers, it gives me a blank dropdown as shown in the picture when I click the launch button on Webappbuilder IDE. When I click on the eSearch widget inside the IDE, it sometimes works and shows results correctly as shown in screenshot and sometimes does not work and looks like when you click the launch button. When you click the launch button and click clear fields button, you see results like shown in the screenshot. Also I have attached the screenshot of the widget configuration screen.I thought my webappbuilder installation or eSearch widget installation got corrupted but I have been able to reproduce the issue when I downloaded a fresh installation of the webappbuilder and the eSearch widget. I am using the latest version of the webappbuilder.
Been using this widget for some time now and love it, but having a issue with it since i upgraded to 2.4. I loaded the new eSearch posted and i can not switch search layers. I noticed this is how it is on the live preview site also.
I am not sure if this is a service or search widget issue, but I recently republished a web service to a new location on our server and when I point the esearch widget to this new url my Unique value searches never populate the pull down menu, it seems to just spin finding the records. I just downloaded the newest one and started from scratch and still get the same error. The old service works just fine and when comparing the new and old services I do not see any difference. Any ideas? Thanks.
Thanks for the response. Here is the console error, it looks like the query is launching over and over trying to populate the pull down menu. I have not changed the code manually so not sure what the syntax error would be.
I am trying to make a big upgrade from WAB v 1.2 with Enhanced Search v 1.1.6 to WAB v 2.4 and Enhanced Search v 2.4.0.2. My question is should I be able to somehow upgrade or import my eSearch config settings without having to manually re-create some 15 query layers? First few tries to use my old config file have not worked. This might be wishful thinking.
1.1.6 to 2.4.0.2 is a big jump and may be pushing it. You can try though. Here is what I would do. Add the eSearch to WAB 2.4 and open the widget setting dialog and make a simple change like changing a layers name (on the default layers that are listed). Save the app and open the apps configs/eSearch/folder and paste your old eSearch config.json in there and delete the other one. Now make sure that your 1.1.6 version json is named config_eSearch.json. Restart WAB and open the widgets settings dialog and make sure your old 1.1.6 json layers are still there. That's it.
It looks like you are getting 26000 unique records processed and then it is finding a ">" character in your fields data. Can you verify that your layers field data does not contain special characters.
This same thing is happening on all three fields in this layer in which I created pull-downs. Here is the test url that should be visible to the outside. The fields that are experiencing this issue are under Surveys and are Surveyor Name, Business, and Township/Range. The other weird thing is that I have not changed the data or data source between the working and non-working versions, the only thing that changed is where I published the service along with a new service url.
There seems to be issue with your service. I get a "The requested URL was rejected. Please consult with your administrator." when trying to access the rest url for the services/Surveyor/SurveyMonumentWAB/MapServer/2 url.
Unfortunately our server team has blocked browser access to these urls outside of our network. We have to view them on a test server which is internal only. Here is the json result from the query. I am not sure what special characters to be looking for that would be causing a problem. Does this help?
I seem to have a small bug with the Results Menu. Upon first display, the menu text does not display correctly. See the attached image. Any suggestions? It seems to correct itself after one use. Also, I do not see the issue on Roberts "Live Preview" using the same Chrome browser.
I seem to have a small bug with the Results Menu. Upon first display, the menu text does not display correctly. See the attached image. Any suggestions? It seems to correct itself after one use. Also, I do not see the issue on Roberts "Live Preview" using the same Chrome browser.
I downloaded on 5/12/17. The older enhancements text file notes 2.3. It might just be 2.4 without the incremental update. I cant find the version/read-me off hand.
Okay, thanks. I might have downloaded just before the incremental release. I assume I will need to replace the widget folder and reconfigure the expressions to update the widget. That is not too difficult at all though. Thank you very much for the prompt responses!
Once you replace the eSearch widget folder that is all you will have to do since the config_eSearch.json file is maintained in a seperate folder you will not loose your widget configuration.
I downloaded the widget linked on this page, replaced the eSearch widget, saved and published my app, but the widget version did not change to 2.4.0.2 and the Results menu issue still exists. I am not sure what could be wrong, it seems pretty straight-forward. Devon
Hmm... Are you replacing the eSearch folder in the widgets folder on your web server? I sounds like you have replaced the eSearch widget in the stemapp folder in your WAB Dev and you did not replace the eSearch widget in the actual app that you are downloading. A bit of explaination on how WAB works the stemapp is the template of the app that you build when you create a new app. When you create a new app WAB copies the widgets and jimu core files into the new app folder (i.e. [install dir]\server\apps\[app#]). this only happen when the app is created. So updating the stemapp widgets will only affect NEW apps. If you want to update a widget in a existing app then you have to update the widgets folder in that specific app.
That helps a lot. Thank you. I replaced the widget in both locations. Now, when I "launch" the app from within Web AppBuilder for ArcGIS, the widget version displays 2.4.0.2. But, when I download the app and place it in the inetpub folder, the app somehow does not show the update. I have cleared internet history. Seems odd...
A couple of recommendations then. Replace the eSearch widget folder directly in the inetpub website folder. Two if you are using Chrome start an incognito window and test the app there.
I am not sure if it has been asked before. I am trying to configure the enhanced search widget to have text symbol (esriTS in the symbology of layer within config) where I can specify the field whose value should be shown as the text symbol. Is it already built in this widget or I need to customize?
To be honest in all the years I have had the eSearch widget out there you are the first to ask for searching on a feature using a textSymbol. So yes this would require customization.
I've tried searching for this but i have not be able to find an answer to my question specifically to your Esearch widget. I am currently using your widget and when doing a search for a certain item i noticed that the zoom is way to close. I would like to change the zoom to zoom out further when a result is returned. When i searched i found how to change the zoom level on WAB Search widget but not on your Esearch Widget. none less i tried adding the code you posted on this post but no luck. I might just not be seeing it correctly.
Hi Robert Scheitlin, GISP, I have also been looking into a buffer on features. I am trying to use a selection as the starting point for Geometry, and based on user input for distance and color scheme/Line type will generate a buffer as an operational layer.
I have been looking into you Identify and your eSearch widgets. And trying to get the parts of what I want from it, but of course, it is becoming quite a barbaric task that I might be losing at.
So given the specs:
- user selected color and line type for buffer
- feature selection on the map (point/polygon type graphic)
- text-based distance input
Do you have any advice to get this going? I have spent a few days so far on my mentioned method and feel lost in the progress.
The eSearch accomplished almost all of what I need; just missing the color scheme for buffer graphic.
I am using your eSearch widget (the latest edition ) with WAB DE 2.4. It is great!
But..
I have a question.
Edit field format inputs are not reflected in the search results' attribute table
i.e. Specifying Precision and Use Thousands Separator does not get reflected in the attribute table results as well as the order of the fields that you specify with arrows in the included fields area.
When I look at config_eSearch.json I see my customizations there, but not 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(/