I need a code that allows moving the pop-up window, since when viewing the map this window covers the layers of the map. I need this to better the user experience assistance. I use the code of How To: Enable drag function on an infoWindow pop-up in Web AppBuilder for ArcGIS but generate this error.
Solved! Go to Solution.
Can you please send the file "utils.js "?
For anyone trying to do this on Portal that came with 10.8.1
open the file: [Portal Instllation Folder]\apps\webappviewer\jimu.js
Look for a function
y.createWebMap = function(a, c, b, g) {
a = U.getStandardPortalUrl(a);
a = U.getBaseItemUrl(a);
C.arcgisUrl = a;
return C.createMap(c, b, g)
}
You may need to prettify the file
Replace with:
y.createWebMap = function(a, c, b, g) {
a = U.getStandardPortalUrl(a);
a = U.getBaseItemUrl(a);
C.arcgisUrl = a;
def=C.createMap(c, b, g)
def.then(function (response){
var map = response.map;
var handle = dojo.query(".title", map.infoWindow.domNode)[0];
var dnd = new dojo.dnd.Moveable(map.infoWindow.domNode, {
handle: handle
});
});
return def;
//return C.createMap(c, b, g)
}
For CSS changes, I wanted to do in the FoldableTheme (You may change for theme you are working on).
Open file [Portal Instllation Folder]\apps\webappviewer\themes\FoldableTheme\common.css
Add this at the bottom
@import url("panels/FoldablePanel/style.css");
@import url("panels/DockablePanel/style.css");
.jimu-simple-panel {
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
}
.jimu-link {
opacity: 0.8;
}
.esriPopupWrapper .title{
cursor: move;
}
I used the advice from https://support.esri.com/en-us/knowledge-base/000015175 to successfully make pop ups moveable. Unfortunately, before I could document my process, ESRI have removed the page! (404 error) Does anyone have a copy of what was in the page, or know how to successfully contact ESRI to request the page is reinstated?
Thanks