adjusted viewJobLog() for portal mode

for viewing job details, i included a check for portal mode === true to have job detail page loaded in a new tab
This commit is contained in:
Jared Tabor
2014-10-22 16:49:37 -04:00
parent 1559ba50bb
commit 255a5158f3

View File

@@ -22,8 +22,8 @@ angular.module('JobsHelper', ['Utilities', 'RestServices', 'FormGenerator', 'Job
* Initialize calling scope with all the bits required to support a jobs list
*
*/
.factory('JobsControllerInit', ['$location', 'Find', 'DeleteJob', 'RelaunchJob', 'LogViewer',
function($location, Find, DeleteJob, RelaunchJob, LogViewer) {
.factory('JobsControllerInit', ['$location', 'Find', 'DeleteJob', 'RelaunchJob', 'LogViewer', '$window',
function($location, Find, DeleteJob, RelaunchJob, LogViewer, $window) {
return function(params) {
var scope = params.scope,
iterator = (params.iterator) ? params.iterator : scope.iterator,
@@ -89,7 +89,10 @@ angular.module('JobsHelper', ['Utilities', 'RestServices', 'FormGenerator', 'Job
}
job = Find({ list: list, key: 'id', val: id });
if (job.type === 'job') {
$location.url('/jobs/' + job.id);
if(scope.$parent.portalMode===true){
$window.open('/#/jobs/' + job.id, '_blank');
}
else $location.url('/jobs/' + job.id);
}
else {
LogViewer({