No it is already done in the 1.3.0.1 release but I am still working on other enhancement requests and am not ready to release yet. ETA this week or next.
Thank you. I don't know who thought that it was a good idea to add an ampersand to our zone abbreviations. Obviously they were not thinking the way the computer does.
I suppose I will wait until the release then. Thanks again.
If the following has been asked, please let me know but I didn't locate any search results on the matter.
Is Enhanced Search compatible with secured map/feature services? And if so, would you point me to the relevant section of the .js that handles the Server authentication?
In the JS API all secure service handling is done through the Identity Manager or handled through a Proxy. Are you having an issue with a secure service?
I realized there is a feature that will substantially increase eSearch power for us, and anyone else with a service that has a lot (100+) layers spread over many groups (about two dozen for 600 layers on our site).
Groups. Submenus of groups on the Search Layer menu.
Thoughts?
Here is what I have now:
Here is what I propose, at least one level of groups:
don't mind the ugly looking interface "buttons" I mocked up in MS Paint!
eSearch "Search by Shape" is the absolute best way I have found yet, to "Identify". I only have the Identify still because of its ability for "All Visible Layers.
Another way to solve this is "All Visible Layers" functionality, like Identify has, but I know you said "All Visible Layers" would be extremely complicated to add to eSearch by Shape. So I propose either Groups (one level of grouping at least) unless a way to incorporate All Visible Layers ability becomes feasible.
I know this is a heavy ask. Thought I'd throw it out there though and see what you and the eSearch braintrust here thought.
eSearch is still integral to our site. Currently I've put the top 25 most useful layers in it, and it's great.
Sorry for so many suggestions... our site basically revolves around this tool though! I have a legion of users about to use our internal flagship site built on this tool and since it's the kitchen sink viewer it's got all these hundreds of layers! (Yes... if you are thinking...task-based viewers etc..and those are next on the to-do list.. but we also need our kitchen sink viewer for a few reasons)
There is no Dojo UI dijit out there that would support that type of UI. Currently I can not think of a practical coding workflow to accomplish this that would justify the level of effort to implement it.
Robert, thanks for the reply and consideration. I understand.
I have successfully created a 'workaround' of sorts. I placed 'dummy' layers as 'headers' to section the menu.
I used a layer that has only one feature way out in the ocean. (This approach requires a valid layer with one field).
It works!
One thought Robert:
Perhaps you could codify this and make a special flag on the layer to make it a 'header layer' and in that event, the user has but one piece of info to enter: the text string for the title. Ideally I'd like these headers to be bold or a different color etc that stands out, but the way I've got here is good enough for now, using CAPS and ---dashes. Hope this is useful. In fact, looking at it now I'm quite pleased!
I'm able to add a secured service but when eSearch launches for the first time in a browser session, I'm challenged for the role credentials that were originally used to secure the service.
Am I correct in my thinking that passing a token via proxy (somewhat similar in logic to this discussion Internal ONLY Web Map Sharing Issues ) would fix the issue?
I was not aware that a stream layer provided a query capability. When I check the esri samples stream layer the only capability I see list is subscribe.
I just installed it and it works great so far in our WAB 1.2. It reads the existing config json perfect. In fact, it even fixed an issue. The release from December didn't work on our roads layer for some odd reason Layer: Local Roads (ID: 41) but now it does.
The new way you show what area you'd selected with the graphic, is really cool Robert. Very nice interface design and feedback. Customizable symbology per layer, awesome. I still propose a fourth category where it takes the server symbology and then puts a halo or highlight around the symbol, would be good. (for selected features from a layer to stand out when the layer is turned on. But still have original symbology)
Ability to remove results, just wow. It just gets better. Our municipal users are really going to get some work done with this. Get in, get some data, get out and do good things.
Hello Robert, I installed version 1.3.0.1 of Enhanced Search Widget. I think there is the problem again on codedvalue domain for the fields of long type, already reported to me a few months ago and fixed in the version 1.1.1
List of the latest enhancements and changes:
...
Fixed bug with Coded domains that use numeric fields not displaying domain description.
Strange it was a Map Service that I used to test. Is there any detail you can share about the field values or specifics about the domain or better yet is the service public? If not maybe you can export out a small sample of the data to a FGDB for testing.
Curious. Is there anyway to remove the popups that are created FROM the eSearch widget itself? We have configured highly customized pop-ups on the AGOL side of things and it confuses our users to have multiple pop-ups display presenting redundant (or duplicated) data.
Hello Robert the codedvalue domain issue occurs when I select the option Unique instead of option Value in the form Update Expression. I do not know if this is actually a bug or a desired behavior. Thanks for your time
Can this widget be updated to a newer version, in an existing app, but with keeping the old config file? So I don't have to re-configure everything? Or will it break something...
OK, I see the issue now. I never tough there would be a need to use unique when the field already has a domain attached to it, so I do not lookup the domain values when using unique. I will look at addressing this in the future, but the real solution is not to choose unique when using a field with a domain.
Edit: OK I see the usefulness of have unique values even from a domain. A scenario would be where you have a large domain and currently on 10 out of the 50 possible coded values are used. I have fixed this for the 1.3.0.2 release.
One other thing I've run into. I configure an attribute search using the BETWEEN operator. I enable "Value is required to be entered to enable search" and I enable "Ask for values". The search executes properly using the default values that I've configured, but when I change the values, it still returns the same results as when using the default values. So it doesn't seem to be reading user input values.
I'm currently using your enhance search 1.3.0.1 widget in Web Appbuilder. Loves how you transition all the functionality over to be use in the Web Appbuilder environment. With this enhance search widget, is there a way or code I could use to make a layer visible? In Flexviewer, you happen to provide me with just this code "map.getLayer ("Your Layer Name").visible = true;". I was wondering if this functionality carry over to Web AppBuilder.
See below of what I'm trying to do from my old production flexviewer....
This is a related question, Instead of creating a duplicate search widget just to turn a specific layer on. Are there an option to setup the code to work just for a specific Search Layer list when you select one?
Sure just put some logic in the onAttributeLayerChange function in the widget.js to check for that particular search layer name (i.e. if(this.config.layers[newValue].name === 'Project Search') { //then do something })
I experience some problems with eSearch widget in Launchpad theme - attribute table doesn't open with results, unless Attribute Table widget is added on its own. Is it normal behavior/known bug with Launchpad theme? I recall this theme was buggy in previous release as well, unfortunately I find it most suitable for my app. Please comment...
Hmm... I just tested the eSearch widget 1.3.0.1 and WAB 1.3 and it opened the Attribute table widget automatically when searching a layer that was defined to "Add Result as Operational Layer" and "Show in Attribute Table Widget".
i just found an odd bit of behavior. Maybe you know if it is a 'feature'.
i have build a WAB app and downloaded it (it uses your latest esearch and the 1.3 (latest) version of the WAB. after downloading i unzip and copy the app to the wwwroot directory
when i open the downloaded app and zoom to an area and then close and re-open the url
both IE and Chrome zoom me to the last location i was viewing and display whatever layers i had turned on or off.
this isn't happening with my development enviroment, but i have 1.2 install there still.
The restoring of the last map extent and layer visibility was something that was introduced in WAB 1.3 it has nothing to do with eSearch and currently is Not a configurable feature.
';
}
}
}
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(/