Thanks for your wonderful widget! It really helps me a lot!
I would like to add the searching results of eSearch to the LayerList Widget every time after we finish one search (even for the same searching layer).
Currently, for each searching layer the eSearch widget will provide only one operational layers in LayerList Widget and only one attribute table tab (in AttributeTable Widget). Can we have as many operational layers as we start a new search each time, and each searching result can have a separate attribute table (same as current ESRI’ s search widget)?
Now the eSearch widget clears the previous search results and update the new search results to the Layer List every time when users start a searching for one searching layer (I understand this is actually a big improvement). Are there any codes to change to get the above effect? Thanks!
I considered this in my initial development of the widget but decided against this path due to the complexity of managing the various search results and knowing the next thing would people would want is to be able to modify one of those existing searches. The other issue is how would you determine which results are displayed in the widgets results tab. I will not be able to provide any code for your desired path as this would be a drastic code change to the way the widget is currently written.
I'm also looking for a way to start editing a feature directly from the popup box. Just wonder if you already figured it out ? If you did could you please share it with me ?
Hi My name is Devarsi and I am using your enahnced widget with webapp builder 1.2 I am new to the developer scene and I have a problem where when i add a new layer to the exisiting enhanced tool when i go to search it fails. I am thinking that it may have to do with the sql script. Can you please help me with this. I have added a general utility reports layer from which we are trying to search by record number and it doesnt allow us to search yet the script run correctly. thank you
Thanks for your work on the eSearch widget and the many others. It sure makes our lives easier here at the county.
We've currently been migrating over from our flex viewer web maps and as I was testing out the eSearch widget before launch, I came across a problem involving the "Export all to CSV" option after the "Add to current results" was used. When trying to export the results, only the most recently added search results (by value or shape) are exported, rather than all the results. I could also repeat this on the Live Preview Site. Is there something I'm doing wrong or is this just an unintended error? Any help would be appreciated.
I am having some strange issues when trying to print when there are results from the search widget from my web app builder application that lives on a server in house. I normally would not bug you about printing but the error only appears when the user has preformed a search using the enhanced search widget, otherwise printing works just fine. I have set up a proxy and it still does not seem to work, if you have any ideas as to what may be causing this I would love to hear them. I have been stuck for days trying to figure this out. Thanks!
I have updated my live preview site to include the print widget and it works just fine with eSearch Results showing. Sorry I am not sure what to tell you.
I have a layer that comes from a secured service, which is authenticated thru the proxy. The print widget won't work with this layer turned on. Perhaps this thread will be of help:
I think I may know what is happening and would be curious to know if this happens for others. I have my esearch widget add my results as an operational layer to the map, if this is turned on in the layer list, the print fails, if I uncheck it, the printing seems to work. Have any of you noticed this as well?
The traffic cameras get added as an operational layer on my live preview site as well and the print still works. What about Ryan comment about secured layers?
That is a good question, I will have to check with our server admin and see. This is just a guess, but for some reason our server must be seeing that layer as a cross origin attack.
Like many others I want to thank you so much for the work you've done on this and all your other widgets. Have you considered implementing functionality to select multiple criteria from the drop-down boxes? Example: there is a 'day' field in the data and a user wants to select multiple days.
Sorry to border you with a lot of question, using the search widget, is there part of the code that i can modify to keep the graphics used in doing the "By Shape" selection?
I am having an issue with links in the results. If I set up the Link Type as text, everything works as expected. If I change the Link Type to Image, the link content does not come through in the application. I did have this working in an older version of the eSearch Widget (either 1.2 or 1.3....I cannot recall which).
You are the first place winner of the GeoNet MVP Award of 2016.
Jack was on stage with his directors at the Closing Ceremony of UC 2016 today. Everyone in the audience clapped in appreciation when your name came up on the big screen.
There is no other person more deserving than you, and we are delighted and grateful for all your contributions to the GeoNet Community.
Runners-up were Dan Patterson and Rebecca Strauch.
Derek Law, Moxie Zhang, and Julie Powell personally thanked you and Rebecca at every Web AppBuilder session at the User Conference.
It seems every person who has used the Web AppBuilder knows about your Enhanced Search Widget and Customization Resource List maintained by Rebecca.
We have greatly benefited from your custom widgets. We won the SAG Award this year.
The dates for the next User Conference is July 10 - July 14, 2017.
I have a quick question though. I was trying to modify the text "Clear Fields" under the By Value search tab. I went in the string.js inside the nls folder and assigned a new string to clearfields. But the change couldn't seem to be recognized by the widget when added to WAB.
I'm very new to Javascript so any pointers will be greatly appreciated!
When you create a new app it copies the eSearch widget from the stemapp widgets folder into the new apps widgets folder. so any change you make in the stemapp widgets folder will only affect new apps and not apps already created. To change an app that is already created you need to go to the [install dir]/server/apps/[app #]/widgets/eSearch/nls/strings.js and make that change.
First time commenter, long time appreciator. This eSearch widget is fantastic. Thank you for your work on it. Is there a way to use the print plus widget to print a buffered area? Whenever I click on another widget, I lose the buffer. Anyway I can have a nice printed PDF that includes a buffer from the eSearch widget?
I am not a Print plus user but the removal of the buffer when the eSearch is closed is something you can configure by going to the widgets setting page and clicking on the "Edit Default Buffer Properties" link and check the "Add the buffer layer to the maps legend". This is add the buffer as a operational layer and it will remain in the map when you switch to another widget.
I was expecting to be able to have my link content (http://images.stlouiscountymn.gov/GetPlatDocuments/GetPlatDocuments.aspx?PlatNumber=<http://images.stlouiscountymn.gov/GetPlatDocuments/GetPlatDocuments.aspx?PlatNumber=%7bPlatCode%7d>)
have a link icon Content (an Icon image that I choose) that would be the link to open a different web page (the scanned PDF plat document).
On your demo site, didn’t the camera icon in the results (view traffic photo) simply open an new tab or window in the browser to show the traffic picture?? When I try that now, I get javascript:void(0);
I have 2 layers used in eSearch, If I set the 'Auto Zoom to Search Result', both layers will do the auto zoom to search result. Is that possible to modify the code to control the individual layer instead of both. I only need one layer to do the auto zoom to.
As you know there is no configuration for this so you would have to modify the _zoomAndClose and _openResultInAttributeTable function to only execute the zoomall function if it is that one layer you are wanting.
I just discovered two typos in \setting\nls\strings.js:
editResultFormat: "Edit Result Formating", > Formatting
fromatTooltip: "The formtting set here will affect the result popups and widget result text", > formatting (and maybe you want to correct also the formatTooltip
Then I have another question:
Is there a way to rename the "Override 1" next to the search result in the Legend when printing? I would like to call it "Search result" or let it empty:
Thanks for the info on the spelling corrections. Unfortunately I have dealt with esri on this legend issue already and it is a ArcGIS Server print task issue I have no control over.
Robert Scheitlin, GISP is there anything you can think of that would cause the "Export All to CSV" to work from the WAB but not once a site goes live?
';
}
}
}
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 {
lingoThreadLangSelected(lang, '910880');
} catch (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(/