fixed view form link bug

This commit is contained in:
David Baldwynn 2016-11-08 17:44:00 -05:00
parent 0255279183
commit 0c98c642ad
3 changed files with 12 additions and 4 deletions

View file

@ -1739,7 +1739,11 @@ angular.module('forms').controller('AdminFormController', ['$rootScope', '$scope
$scope.formURL = "/#!/forms/" + $scope.myform._id;
$scope.actualFormURL = window.location.protocol + '//' + $scope.myform.admin.username + '.' + window.location.host + "/#!/forms/" + $scope.myform._id;
if(window.location.host.split('.') < 3){
$scope.actualFormURL = window.location.protocol + '//' + $scope.myform.admin.username + '.' + window.location.host + "/#!/forms/" + $scope.myform._id;
} else {
$scope.actualFormURL = window.location.protocol + '//' + $scope.myform.admin.username + '.' + window.location.host.split('.').slice(1,3).join('.') + "/#!/forms/" + $scope.myform._id;
}
var refreshFrame = $scope.refreshFrame = function(){

File diff suppressed because one or more lines are too long

View file

@ -26,7 +26,11 @@ angular.module('forms').controller('AdminFormController', ['$rootScope', '$scope
$scope.formURL = "/#!/forms/" + $scope.myform._id;
$scope.actualFormURL = window.location.protocol + '//' + $scope.myform.admin.username + '.' + window.location.host + "/#!/forms/" + $scope.myform._id;
if(window.location.host.split('.') < 3){
$scope.actualFormURL = window.location.protocol + '//' + $scope.myform.admin.username + '.' + window.location.host + "/#!/forms/" + $scope.myform._id;
} else {
$scope.actualFormURL = window.location.protocol + '//' + $scope.myform.admin.username + '.' + window.location.host.split('.').slice(1,3).join('.') + "/#!/forms/" + $scope.myform._id;
}
var refreshFrame = $scope.refreshFrame = function(){