updated ecosystem.json
This commit is contained in:
parent
c8c8b36148
commit
c7b1b2fc94
|
@ -16,7 +16,9 @@
|
|||
"post-deploy": "npm install && pm2 startOrGracefulReload ecosystem.json --env production",
|
||||
"env": {
|
||||
"NODE_ENV": "production",
|
||||
"BASE_URL": "stage.tellform.com"
|
||||
"BASE_URL": "stage.tellform.com",
|
||||
"SOCKET_URL": "wsstage.tellform.com",
|
||||
"SUBDOMAINS_DISABLED": "TRUE"
|
||||
}
|
||||
},
|
||||
"prod": {
|
||||
|
|
79
public/dist/application.js
vendored
79
public/dist/application.js
vendored
|
@ -2229,8 +2229,8 @@ angular.module('core').config(['$translateProvider', function ($translateProvide
|
|||
'use strict';
|
||||
|
||||
// Forms controller
|
||||
angular.module('forms').controller('AdminFormController', ['$rootScope', '$scope', '$stateParams', '$state', 'Forms', 'CurrentForm', '$http', '$uibModal', 'myForm', '$filter', '$sce',
|
||||
function($rootScope, $scope, $stateParams, $state, Forms, CurrentForm, $http, $uibModal, myForm, $filter, $sce) {
|
||||
angular.module('forms').controller('AdminFormController', ['$rootScope', '$window', '$scope', '$stateParams', '$state', 'Forms', 'CurrentForm', '$http', '$uibModal', 'myForm', '$filter', '$sce',
|
||||
function($rootScope, $window, $scope, $stateParams, $state, Forms, CurrentForm, $http, $uibModal, myForm, $filter, $sce) {
|
||||
|
||||
$scope.trustSrc = function(src) {
|
||||
return $sce.trustAsResourceUrl(src);
|
||||
|
@ -2253,10 +2253,14 @@ angular.module('forms').controller('AdminFormController', ['$rootScope', '$scope
|
|||
|
||||
$scope.formURL = "/#!/forms/" + $scope.myform._id;
|
||||
|
||||
if(window.location.host.split('.').length < 3){
|
||||
$scope.actualFormURL = window.location.protocol + '//' + $scope.myform.admin.username + '.' + window.location.host + $scope.formURL;
|
||||
if($window.subdomainsDisabled == true){
|
||||
$scope.actualFormURL = window.location.protocol + '//' + window.location.host + $scope.formURL;
|
||||
} else {
|
||||
$scope.actualFormURL = window.location.protocol + '//' + $scope.myform.admin.username + '.' + window.location.host.split('.').slice(1,3).join('.') + $scope.formURL;
|
||||
if(window.location.host.split('.').length < 3){
|
||||
$scope.actualFormURL = window.location.protocol + '//' + $scope.myform.admin.username + '.' + window.location.host + $scope.formURL;
|
||||
} else {
|
||||
$scope.actualFormURL = window.location.protocol + '//' + $scope.myform.admin.username + '.' + window.location.host.split('.').slice(1,3).join('.') + $scope.formURL;
|
||||
}
|
||||
}
|
||||
|
||||
var refreshFrame = $scope.refreshFrame = function(){
|
||||
|
@ -3946,6 +3950,71 @@ angular.module('forms').factory('Forms', ['$resource', 'FORM_URL',
|
|||
}
|
||||
]);
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
// Create the Socket.io wrapper service
|
||||
angular
|
||||
.module('forms')
|
||||
.factory('Socket', Socket);
|
||||
|
||||
Socket.$inject = ['$timeout', '$window'];
|
||||
|
||||
function Socket($timeout, $window) {
|
||||
var service = {
|
||||
connect: connect,
|
||||
emit: emit,
|
||||
on: on,
|
||||
removeListener: removeListener,
|
||||
socket: null
|
||||
};
|
||||
|
||||
var url = '';
|
||||
if($window.socketPort && $window.socketUrl){
|
||||
url = $window.socketUrl + ':' + $window.socketPort;
|
||||
} else if ($window.socketUrl && !$window.socketUrl){
|
||||
url = $window.socketUrl;
|
||||
} else if ($window.socketPort){
|
||||
url = window.location.protocol+'//'+window.location.hostname + ':' + $window.socketPort;
|
||||
} else {
|
||||
url = window.location.protocol+'//'+window.location.hostname;
|
||||
}
|
||||
connect(url);
|
||||
|
||||
return service;
|
||||
|
||||
// Connect to Socket.io server
|
||||
function connect(url) {
|
||||
service.socket = io(url, {'transports': ['websocket', 'polling']});
|
||||
}
|
||||
|
||||
// Wrap the Socket.io 'emit' method
|
||||
function emit(eventName, data) {
|
||||
if (service.socket) {
|
||||
service.socket.emit(eventName, data);
|
||||
}
|
||||
}
|
||||
|
||||
// Wrap the Socket.io 'on' method
|
||||
function on(eventName, callback) {
|
||||
if (service.socket) {
|
||||
service.socket.on(eventName, function (data) {
|
||||
$timeout(function () {
|
||||
callback(data);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Wrap the Socket.io 'removeListener' method
|
||||
function removeListener(eventName) {
|
||||
if (service.socket) {
|
||||
service.socket.removeListener(eventName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}());
|
||||
|
||||
'use strict';
|
||||
|
||||
angular.module('forms').service('TimeCounter', [
|
||||
|
|
4
public/dist/application.min.js
vendored
4
public/dist/application.min.js
vendored
File diff suppressed because one or more lines are too long
12
public/dist/form-application.js
vendored
12
public/dist/form-application.js
vendored
|
@ -3,8 +3,8 @@
|
|||
// Init the application configuration module for AngularJS application
|
||||
var ApplicationConfiguration = (function() {
|
||||
// Init module configuration options
|
||||
var applicationModuleName = 'TellFormForm';
|
||||
var applicationModuleVendorDependencies = ['duScroll', 'ui.select', 'ngSanitize', 'vButton', 'ngResource', 'TellForm.form_templates', 'ui.router', 'ui.bootstrap', 'ui.utils', 'pascalprecht.translate'];
|
||||
var applicationModuleName = 'TellForm-Form';
|
||||
var applicationModuleVendorDependencies = ['duScroll', 'ui.select', 'ngSanitize', 'vButton', 'ngResource', 'TellForm-Form.form_templates', 'ui.router', 'ui.bootstrap', 'ui.utils', 'pascalprecht.translate'];
|
||||
|
||||
// Add a new vertical module
|
||||
var registerModule = function(moduleName, dependencies) {
|
||||
|
@ -61,7 +61,7 @@ angular.element(document).ready(function() {
|
|||
angular.bootstrap(document, [ApplicationConfiguration.applicationModuleName]);
|
||||
});
|
||||
|
||||
angular.module('TellForm.form_templates', []).run(['$templateCache', function($templateCache) {
|
||||
angular.module('TellForm-Form.form_templates', []).run(['$templateCache', function($templateCache) {
|
||||
"use strict";
|
||||
$templateCache.put("form_modules/forms/base/views/submit-form.client.view.html",
|
||||
"<section class=public-form ng-style=\"{ 'background-color': myform.design.colors.backgroundColor }\"><submit-form-directive myform=myform></submit-form-directive></section><script ng-if=myform.analytics.gaCode>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n" +
|
||||
|
@ -574,7 +574,7 @@ angular.module('view-form').directive('fieldDirective', ['$http', '$compile', '$
|
|||
'natural'
|
||||
];
|
||||
|
||||
var templateUrl = 'modules/forms/base/views/directiveViews/field/';
|
||||
var templateUrl = 'form_modules/forms/base/views/directiveViews/field/';
|
||||
|
||||
if (__indexOf.call(supportedFields, type) >= 0) {
|
||||
templateUrl = templateUrl+type+'.html';
|
||||
|
@ -593,7 +593,7 @@ angular.module('view-form').directive('fieldDirective', ['$http', '$compile', '$
|
|||
forms: '='
|
||||
},
|
||||
link: function(scope, element) {
|
||||
|
||||
|
||||
$rootScope.chooseDefaultOption = scope.chooseDefaultOption = function(type) {
|
||||
if(type === 'yes_no'){
|
||||
scope.field.fieldValue = 'true';
|
||||
|
@ -798,7 +798,7 @@ function hashFnv32a(str, asString, seed) {
|
|||
angular.module('view-form').directive('submitFormDirective', ['$http', 'TimeCounter', '$filter', '$rootScope', 'SendVisitorData',
|
||||
function ($http, TimeCounter, $filter, $rootScope, SendVisitorData) {
|
||||
return {
|
||||
templateUrl: 'modules/forms/base/views/directiveViews/form/submit-form.client.view.html',
|
||||
templateUrl: 'form_modules/forms/base/views/directiveViews/form/submit-form.client.view.html',
|
||||
restrict: 'E',
|
||||
scope: {
|
||||
myform:'='
|
||||
|
|
4
public/dist/form-application.min.js
vendored
4
public/dist/form-application.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue