Skip to content

Commit

Permalink
Merge pull request #596 from cmv/fix/add-proxy-support-for-opening-pr…
Browse files Browse the repository at this point in the history
…int-results

Add proxy support for opening print results.
  • Loading branch information
DavidSpriggs authored Sep 20, 2016
2 parents 44eae07 + 8d853a3 commit dd02194
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions viewer/js/gis/dijit/Print.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ define([
'esri/tasks/PrintTemplate',
'esri/tasks/PrintParameters',
'esri/request',
'esri/urlUtils',
'dojo/i18n!./Print/nls/resource',

'dijit/form/Form',
Expand All @@ -30,7 +31,7 @@ define([
'dijit/TooltipDialog',
'dijit/form/RadioButton',
'xstyle/css!./Print/css/Print.css'
], function (declare, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, PrintTask, Memory, lang, array, topic, Style, domConstruct, domClass, printTemplate, printResultTemplate, PrintTemplate, PrintParameters, esriRequest, i18n) {
], function (declare, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, PrintTask, Memory, lang, array, topic, Style, domConstruct, domClass, printTemplate, printResultTemplate, PrintTemplate, PrintParameters, esriRequest, urlUtils, i18n) {

// Print result dijit
var PrintResultDijit = declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], {
Expand All @@ -45,7 +46,12 @@ define([
},
_onPrintComplete: function (data) {
if (data.url) {
this.url = data.url;
var proxyRule = urlUtils.getProxyRule(data.url);
if (proxyRule && proxyRule.proxyUrl) {
this.url = proxyRule.proxyUrl + '?' + data.url;
} else {
this.url = data.url;
}
this.nameNode.innerHTML = '<span class="bold">' + this.docName + '</span>';
domClass.add(this.resultNode, 'printResultHover');
} else {
Expand Down

0 comments on commit dd02194

Please sign in to comment.