- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2014 12:19 PM
All,
We just upgraded to Dublin and some functionality changed that our users liked. The UI Macro user_show_incidents used to popup a window with a list of related incidents. When a user selected an incident in the popup window, the result would be that the form view of that incident would be displayed in the popup.
In Dublin, when the user selects an incident from the popup window, the popup window closes and renders the result in the main window. (effectively overwriting what the users was working on)
It appears as if in Calgary the UI Macro user_show_incidents, used "popupOpenFocus" and in Dublin it now uses "GlideDialogWindow". I can not seem to find a property to have the link render it's result in the popup window as it did in Calgary.
Thanks in advance for you help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2014 03:47 AM
Hi Chris
the script on the UI Macro 'user_show_incidents' has been changed in Dublin to use
var w = new GlideDialogWindow('show_list');
However in Calgary the script was using the popup window
var w = getTopWindow();
w.popupOpenFocus(url, 'related_list', 950, 700, '', false, false);
Full script:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate var="jvar_guid" expression="gs.generateGUID(this);" />
<j:set var="jvar_n" value="show_incidents_${jvar_guid}:${ref}"/>
<g:reference_decoration id="${jvar_n}" field="${ref}"
onclick="showRelatedList('${ref}'); "
title="${gs.getMessage('Show related incidents')}" image="images/icons/tasks.gifx"/>
<script>
// show related list
// todo: should be part of the PopupWindow class
// todo: needs new stack name
function showRelatedList(reference) {
var s = reference.split('.');
var tableName = s[0];
var referenceField = s[1];
var url = tableName + '_list.do?';
url += '&amp;';
var v = g_form.getValue(referenceField);
url += 'sysparm_query=' + referenceField + '=' + v;
var w = getTopWindow();
w.popupOpenFocus(url, 'related_list', 950, 700, '', false, false);
}
</script>
</j:jelly>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2014 03:47 AM
Hi Chris
the script on the UI Macro 'user_show_incidents' has been changed in Dublin to use
var w = new GlideDialogWindow('show_list');
However in Calgary the script was using the popup window
var w = getTopWindow();
w.popupOpenFocus(url, 'related_list', 950, 700, '', false, false);
Full script:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate var="jvar_guid" expression="gs.generateGUID(this);" />
<j:set var="jvar_n" value="show_incidents_${jvar_guid}:${ref}"/>
<g:reference_decoration id="${jvar_n}" field="${ref}"
onclick="showRelatedList('${ref}'); "
title="${gs.getMessage('Show related incidents')}" image="images/icons/tasks.gifx"/>
<script>
// show related list
// todo: should be part of the PopupWindow class
// todo: needs new stack name
function showRelatedList(reference) {
var s = reference.split('.');
var tableName = s[0];
var referenceField = s[1];
var url = tableName + '_list.do?';
url += '&amp;';
var v = g_form.getValue(referenceField);
url += 'sysparm_query=' + referenceField + '=' + v;
var w = getTopWindow();
w.popupOpenFocus(url, 'related_list', 950, 700, '', false, false);
}
</script>
</j:jelly>