sped up form rendering
This commit is contained in:
parent
3f20bcf712
commit
e64389d42e
|
@ -174,7 +174,7 @@ exports.uploadTemp = function(req, res) {
|
||||||
*/
|
*/
|
||||||
exports.readForRender = function(req, res) {
|
exports.readForRender = function(req, res) {
|
||||||
var newForm = req.form.toJSON();
|
var newForm = req.form.toJSON();
|
||||||
console.log(req.user);
|
|
||||||
if (!newForm.isLive && !req.user) {
|
if (!newForm.isLive && !req.user) {
|
||||||
return res.status(404).send({
|
return res.status(404).send({
|
||||||
message: 'Form Does Not Exist'
|
message: 'Form Does Not Exist'
|
||||||
|
|
|
@ -61,47 +61,6 @@
|
||||||
<section ui-view></section>
|
<section ui-view></section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<script src="/static/lib/file-saver.js/FileSaver.js" type="text/javascript"></script>
|
|
||||||
<!--Embedding The User Object-->
|
|
||||||
<script type="text/javascript">
|
|
||||||
var user = {{ user | json | safe }};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!--Embedding signupDisabled, socketPort and socketUrl Boolean-->
|
|
||||||
<script type="text/javascript">
|
|
||||||
var signupDisabled = {{signupDisabled | safe}};
|
|
||||||
var socketPort = {{socketPort | safe}};
|
|
||||||
var socketUrl = "{{socketUrl | safe}}";
|
|
||||||
var subdomainsDisabled = {{subdomainsDisabled | safe}};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!--Socket.io Client Dependency-->
|
|
||||||
<script src="/static/lib/socket.io-client/dist/socket.io.min.js"></script>
|
|
||||||
|
|
||||||
<!--Bower JS dependencies-->
|
|
||||||
{% for bowerJSFile in bowerJSFiles %}
|
|
||||||
<script type="text/javascript" src="{{bowerJSFile}}"></script>
|
|
||||||
{% endfor %}
|
|
||||||
<!-- end Bower JS dependencies-->
|
|
||||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular-strap/2.3.8/angular-strap.min.js"></script>
|
|
||||||
|
|
||||||
<!--Application JavaScript Files-->
|
|
||||||
{% for jsFile in formJSFiles %}
|
|
||||||
<script type="text/javascript" src="{{jsFile}}"></script>
|
|
||||||
{% endfor %}
|
|
||||||
<!-- end Application Javascript dependencies-->
|
|
||||||
|
|
||||||
{% if process.env.NODE_ENV === 'development' %}
|
|
||||||
<!--Livereload script rendered -->
|
|
||||||
<script type="text/javascript" src="http://{{request.hostname}}:35729/livereload.js"></script>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<script src="https://cdn.ravenjs.com/2.3.0/angular/raven.min.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
Raven.config('https://825fefd6b4ed4a4da199c1b832ca845c@sentry.tellform.com/2').install();
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- [if lt IE 9]>
|
<!-- [if lt IE 9]>
|
||||||
<section class="browsehappy jumbotron hide">
|
<section class="browsehappy jumbotron hide">
|
||||||
<h1>Hello there!</h1>
|
<h1>Hello there!</h1>
|
||||||
|
@ -111,7 +70,39 @@
|
||||||
</section>
|
</section>
|
||||||
<![endif] -->
|
<![endif] -->
|
||||||
|
|
||||||
<script>
|
|
||||||
|
<!--Embedding The User Object signupDisabled, socketPort and socketUrl Boolean--->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var user = {{ user | json | safe }};
|
||||||
|
var signupDisabled = {{signupDisabled | safe}};
|
||||||
|
var socketPort = {{socketPort | safe}};
|
||||||
|
var socketUrl = "{{socketUrl | safe}}";
|
||||||
|
var subdomainsDisabled = {{subdomainsDisabled | safe}};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--Socket.io Client Dependency-->
|
||||||
|
<script src="/static/lib/socket.io-client/dist/socket.io.min.js" async></script>
|
||||||
|
|
||||||
|
<script src="/static/lib/jquery/dist/jquery.min.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<script src="/static/dist/vendor.min.js"></script>
|
||||||
|
|
||||||
|
<!--Application JavaScript Files-->
|
||||||
|
{% for jsFile in formJSFiles %}
|
||||||
|
<script type="text/javascript" src="{{jsFile}}"></script>
|
||||||
|
{% endfor %}
|
||||||
|
<!-- end Application Javascript dependencies-->
|
||||||
|
|
||||||
|
{% if process.env.NODE_ENV === 'development' %}
|
||||||
|
<!--Livereload script rendered -->
|
||||||
|
<script async type="text/javascript" src="http://{{request.hostname}}:35729/livereload.js"></script>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<script async>
|
||||||
|
Raven.config('https://825fefd6b4ed4a4da199c1b832ca845c@sentry.tellform.com/2').install();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script async>
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||||
|
|
|
@ -63,7 +63,6 @@ module.exports.removeRootDir = function(files, removeRoot, addRoot) {
|
||||||
* Get the app's bower dependencies
|
* Get the app's bower dependencies
|
||||||
*/
|
*/
|
||||||
module.exports.getBowerJSAssets = function() {
|
module.exports.getBowerJSAssets = function() {
|
||||||
|
|
||||||
return this.removeRootDir(minBowerFiles('**/**.js'), 'public/', 'static/');
|
return this.removeRootDir(minBowerFiles('**/**.js'), 'public/', 'static/');
|
||||||
};
|
};
|
||||||
module.exports.getBowerCSSAssets = function() {
|
module.exports.getBowerCSSAssets = function() {
|
||||||
|
|
|
@ -143,7 +143,6 @@ module.exports = function(db) {
|
||||||
|
|
||||||
// TODO: check path and query strings are preserved
|
// TODO: check path and query strings are preserved
|
||||||
// reassign url
|
// reassign url
|
||||||
console.log("path: " + path);
|
|
||||||
req.url = path;
|
req.url = path;
|
||||||
|
|
||||||
req.userId = user._id;
|
req.userId = user._id;
|
||||||
|
@ -169,6 +168,7 @@ module.exports = function(db) {
|
||||||
//Setup Prerender.io
|
//Setup Prerender.io
|
||||||
app.use(require('prerender-node').set('prerenderToken', process.env.PRERENDER_TOKEN));
|
app.use(require('prerender-node').set('prerenderToken', process.env.PRERENDER_TOKEN));
|
||||||
|
|
||||||
|
|
||||||
// Passing the request url to environment locals
|
// Passing the request url to environment locals
|
||||||
app.use(function(req, res, next) {
|
app.use(function(req, res, next) {
|
||||||
if(config.baseUrl === ''){
|
if(config.baseUrl === ''){
|
||||||
|
@ -185,7 +185,7 @@ module.exports = function(db) {
|
||||||
return (/json|text|javascript|css/).test(res.getHeader('Content-Type'));
|
return (/json|text|javascript|css/).test(res.getHeader('Content-Type'));
|
||||||
},
|
},
|
||||||
// zlib option for compression level
|
// zlib option for compression level
|
||||||
level: 3
|
level: 9
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Showing stack errors
|
// Showing stack errors
|
||||||
|
|
127
gruntfile.js
127
gruntfile.js
|
@ -1,5 +1,100 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
var spawn = require('child_process').spawn;
|
var spawn = require('child_process').spawn;
|
||||||
|
var bowerFiles = require('main-bower-files');
|
||||||
|
var path = require('path');
|
||||||
|
|
||||||
|
var minBowerFiles = function(type){
|
||||||
|
return bowerFiles(type).map( function(path, index, arr) {
|
||||||
|
var newPath = path.replace(/.([^.]+)$/g, '.min.$1');
|
||||||
|
return exists( newPath ) ? newPath : path;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var removeRootDir = function(files, removeRoot, addRoot) {
|
||||||
|
return files.map(function(file) {
|
||||||
|
if (addRoot) return file.replace(path.join(process.cwd(), removeRoot), addRoot);
|
||||||
|
return file.replace(path.join(process.cwd(), removeRoot), '');
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var allBowerFiles = bowerFiles({
|
||||||
|
filter: function(filePath){
|
||||||
|
return (filePath.indexOf('js') > 0 && filePath.indexOf('angular-ui-utils') === -1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var bowerAllArray = ['public/lib/angular/angular.js',
|
||||||
|
'public/lib/angular-ui-select/dist/select.js',
|
||||||
|
'public/lib/v-button/dist/v-button.js',
|
||||||
|
'public/lib/angular-ui-scroll/dist/ui-scroll.js',
|
||||||
|
'public/lib/angular-resource/angular-resource.js',
|
||||||
|
'public/lib/angular-ui-router/release/angular-ui-router.js',
|
||||||
|
'public/lib/angular-sanitize/angular-sanitize.js',
|
||||||
|
'public/lib/angular-input-stars/angular-input-stars.js',
|
||||||
|
'public/lib/ng-file-upload/ng-file-upload.js',
|
||||||
|
'public/lib/angular-mocks/angular-mocks.js',
|
||||||
|
'public/lib/angular-bootstrap/ui-bootstrap-tpls.js',
|
||||||
|
'public/lib/angular-ui-scrollpoint/dist/scrollpoint.js',
|
||||||
|
'public/lib/angular-ui-event/dist/event.js',
|
||||||
|
'public/lib/angular-ui-mask/dist/mask.js',
|
||||||
|
'public/lib/angular-ui-validate/dist/validate.js',
|
||||||
|
'public/lib/angular-ui-indeterminate/dist/indeterminate.js',
|
||||||
|
'public/lib/angular-ui-uploader/dist/uploader.js',
|
||||||
|
'public/lib/raven-js/dist/raven.js',
|
||||||
|
'public/lib/jquery-ui/jquery-ui.js',
|
||||||
|
'public/lib/lodash/lodash.js',
|
||||||
|
'public/lib/angular-ui-sortable/sortable.js',
|
||||||
|
'public/lib/angular-permission/dist/angular-permission.js',
|
||||||
|
'public/lib/file-saver.js/FileSaver.js',
|
||||||
|
'public/lib/angular-bootstrap-colorpicker/js/bootstrap-colorpicker-module.js',
|
||||||
|
'public/lib/angular-ui-router-tabs/src/ui-router-tabs.js',
|
||||||
|
'public/lib/angular-scroll/angular-scroll.js',
|
||||||
|
'public/lib/angular-animate/angular-animate.js',
|
||||||
|
'public/lib/js-yaml/dist/js-yaml.js',
|
||||||
|
'public/lib/file-saver/FileSaver.js',
|
||||||
|
'public/lib/html2canvas/build/html2canvas.js',
|
||||||
|
'public/lib/jspdf/dist/jspdf.min.js',
|
||||||
|
'public/lib/jspdf-autotable/dist/jspdf.plugin.autotable.js',
|
||||||
|
'public/lib/angular-translate/angular-translate.js',
|
||||||
|
'public/lib/deep-diff/index.js',
|
||||||
|
'public/lib/jsep/build/jsep.js',
|
||||||
|
'public/lib/clipboard/dist/clipboard.js',
|
||||||
|
'public/lib/mobile-detect/mobile-detect.js',
|
||||||
|
'public/lib/angular-strap/dist/angular-strap.js',
|
||||||
|
'public/lib/angular-strap/dist/angular-strap.tpl.js',
|
||||||
|
'public/lib/bootstrap/dist/js/bootstrap.js',
|
||||||
|
'public/lib/angular-ui-utils/index.js',
|
||||||
|
'public/lib/angular-raven/angular-raven.js',
|
||||||
|
'public/lib/angular-ui-date/src/date.js',
|
||||||
|
'public/lib/angular-busy/dist/angular-busy.js',
|
||||||
|
'public/lib/tableExport.jquery.plugin/tableExport.min.js',
|
||||||
|
'public/lib/ngclipboard/dist/ngclipboard.js' ];
|
||||||
|
var bowerArray = ['public/lib/angular/angular.min.js',
|
||||||
|
'public/lib/angular-scroll/angular-scroll.min.js',
|
||||||
|
'public/lib/angular-ui-select/dist/select.min.js',
|
||||||
|
'public/lib/v-button/dist/v-button.min.js',
|
||||||
|
'public/lib/angular-resource/angular-resource.min.js',
|
||||||
|
'public/lib/angular-ui-router/release/angular-ui-router.min.js',
|
||||||
|
'public/lib/angular-bootstrap/ui-bootstrap-tpls.js',
|
||||||
|
'public/lib/angular-translate/angular-translate.min.js',
|
||||||
|
'public/lib/ng-file-upload/ng-file-upload-all.min.js',
|
||||||
|
'public/lib/angular-ui-date/src/date.js',
|
||||||
|
'public/lib/angular-input-stars/angular-input-stars.js',
|
||||||
|
'public/lib/jsep/build/jsep.min.js',
|
||||||
|
'public/lib/raven-js/dist/raven.min.js',
|
||||||
|
'public/lib/lodash/lodash.min.js',
|
||||||
|
'public/lib/mobile-detect/mobile-detect.js',
|
||||||
|
'public/lib/angular-sanitize/angular-sanitize.min.js'];
|
||||||
|
/*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'public/lib/bootstrap/dist/js/bootstrap.js',
|
||||||
|
'public/lib/angular-raven/angular-raven.js',
|
||||||
|
'public/lib/angular-busy/dist/angular-busy.js'];
|
||||||
|
*/
|
||||||
|
|
||||||
module.exports = function(grunt) {
|
module.exports = function(grunt) {
|
||||||
require('jit-grunt')(grunt);
|
require('jit-grunt')(grunt);
|
||||||
|
@ -90,16 +185,38 @@ module.exports = function(grunt) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
uglify: {
|
uglify: {
|
||||||
production: {
|
productionAdmin: {
|
||||||
options: {
|
options: {
|
||||||
mangle: false,
|
compress: true,
|
||||||
compress: true
|
mangled: true
|
||||||
},
|
},
|
||||||
files: {
|
files: {
|
||||||
'public/dist/application.min.js': 'public/dist/application.js',
|
'public/dist/application.min.js': 'public/dist/application.js',
|
||||||
'public/dist/form-application.min.js': 'public/dist/form-application.js'
|
'public/dist/form-application.min.js': 'public/dist/form-application.js'
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
productionForms: {
|
||||||
|
options: {
|
||||||
|
mangled: true,
|
||||||
|
beautify: true
|
||||||
|
},
|
||||||
|
files: {
|
||||||
|
'public/dist/vendor_forms_uglified.js': bowerArray
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'closure-compiler': {
|
||||||
|
vendor_file: {
|
||||||
|
closurePath: './scripts',
|
||||||
|
js: 'public/dist/vendor_forms_uglified.js',
|
||||||
|
jsOutputFile: 'public/dist/vendor.min.js',
|
||||||
|
maxBuffer: 10000000000,
|
||||||
|
options: {
|
||||||
|
warning_level: 'QUIET',
|
||||||
|
compilation_level: 'SIMPLE_OPTIMIZATIONS',
|
||||||
|
language_in: 'ECMASCRIPT5'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
cssmin: {
|
cssmin: {
|
||||||
combine: {
|
combine: {
|
||||||
|
@ -320,7 +437,7 @@ module.exports = function(grunt) {
|
||||||
grunt.registerTask('lint:tests', ['jshint:allTests']);
|
grunt.registerTask('lint:tests', ['jshint:allTests']);
|
||||||
|
|
||||||
// Build task(s).
|
// Build task(s).
|
||||||
grunt.registerTask('build', ['lint', 'loadConfig', 'cssmin', 'ngAnnotate', 'uglify', 'html2js:main', 'html2js:forms']);
|
grunt.registerTask('build', ['lint', 'loadConfig', 'cssmin', 'ngAnnotate', 'uglify', 'closure-compiler', 'html2js:main', 'html2js:forms']);
|
||||||
|
|
||||||
//Setup task(s).
|
//Setup task(s).
|
||||||
grunt.registerTask('setup', ['execute']);
|
grunt.registerTask('setup', ['execute']);
|
||||||
|
|
|
@ -99,9 +99,14 @@
|
||||||
"coveralls": "^2.11.4",
|
"coveralls": "^2.11.4",
|
||||||
"cross-spawn": "^5.0.0",
|
"cross-spawn": "^5.0.0",
|
||||||
"del": "^2.2.2",
|
"del": "^2.2.2",
|
||||||
|
"grunt-closure-compiler": "0.0.21",
|
||||||
|
"grunt-contrib-concat": "^1.0.1",
|
||||||
|
"grunt-contrib-copy": "^1.0.0",
|
||||||
|
"grunt-contrib-uglify": "^0.11.1",
|
||||||
"grunt-execute": "^0.2.2",
|
"grunt-execute": "^0.2.2",
|
||||||
"grunt-mocha-istanbul": "^3.0.1",
|
"grunt-mocha-istanbul": "^3.0.1",
|
||||||
"grunt-mocha-test": "~0.12.1",
|
"grunt-mocha-test": "~0.12.1",
|
||||||
|
"grunt-usemin": "^3.1.1",
|
||||||
"grunt-wiredep": "^3.0.1",
|
"grunt-wiredep": "^3.0.1",
|
||||||
"istanbul": "^0.4.0",
|
"istanbul": "^0.4.0",
|
||||||
"jasmine-core": "^2.4.1",
|
"jasmine-core": "^2.4.1",
|
||||||
|
|
10
public/dist/application.min.js
vendored
10
public/dist/application.min.js
vendored
File diff suppressed because one or more lines are too long
9
public/dist/form-application.js
vendored
9
public/dist/form-application.js
vendored
|
@ -4,7 +4,7 @@
|
||||||
var ApplicationConfiguration = (function() {
|
var ApplicationConfiguration = (function() {
|
||||||
// Init module configuration options
|
// Init module configuration options
|
||||||
var applicationModuleName = 'TellForm-Form';
|
var applicationModuleName = 'TellForm-Form';
|
||||||
var applicationModuleVendorDependencies = ['duScroll', 'ui.select', 'ngSanitize', 'vButton', 'ngResource', 'TellForm-Form.form_templates', 'ui.router', 'ui.bootstrap', 'ui.utils', 'pascalprecht.translate'];
|
var applicationModuleVendorDependencies = ['duScroll', 'ui.select', 'ngSanitize', 'vButton', 'ngResource', 'TellForm-Form.form_templates', 'ui.router', 'ui.bootstrap', 'pascalprecht.translate'];
|
||||||
|
|
||||||
// Add a new vertical module
|
// Add a new vertical module
|
||||||
var registerModule = function(moduleName, dependencies) {
|
var registerModule = function(moduleName, dependencies) {
|
||||||
|
@ -104,8 +104,7 @@ angular.module('TellForm-Form.form_templates', []).run(['$templateCache', functi
|
||||||
|
|
||||||
// Use Application configuration module to register a new module
|
// Use Application configuration module to register a new module
|
||||||
ApplicationConfiguration.registerModule('view-form', [
|
ApplicationConfiguration.registerModule('view-form', [
|
||||||
'ngFileUpload', 'ui.router.tabs', 'ui.date', 'ui.sortable',
|
'ngFileUpload', 'ui.date', 'angular-input-stars'
|
||||||
'angular-input-stars', 'pascalprecht.translate'
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -1212,9 +1211,9 @@ angular.module('view-form').factory('Forms', ['$resource', 'VIEW_FORM_URL',
|
||||||
var url = '';
|
var url = '';
|
||||||
console.log("$window.socketPort: "+$window.socketPort);
|
console.log("$window.socketPort: "+$window.socketPort);
|
||||||
console.log("$window.socketUrl: "+$window.socketUrl);
|
console.log("$window.socketUrl: "+$window.socketUrl);
|
||||||
if($window.socketPort && $window.socketUrl){
|
if($window.socketUrl && $window.socketPort){
|
||||||
url = window.location.protocol + '//' + $window.socketUrl + ':' + $window.socketPort;
|
url = window.location.protocol + '//' + $window.socketUrl + ':' + $window.socketPort;
|
||||||
} else if ($window.socketUrl && !$window.socketUrl){
|
} else if ($window.socketUrl && !$window.socketPort){
|
||||||
url = window.location.protocol + '//' + $window.socketUrl;
|
url = window.location.protocol + '//' + $window.socketUrl;
|
||||||
} else if ($window.socketPort){
|
} else if ($window.socketPort){
|
||||||
url = window.location.protocol + '//' + window.location.hostname + ':' + $window.socketPort;
|
url = window.location.protocol + '//' + window.location.hostname + ':' + $window.socketPort;
|
||||||
|
|
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
1137
public/dist/vendor.min.js
vendored
1137
public/dist/vendor.min.js
vendored
File diff suppressed because one or more lines are too long
0
public/dist/vendor.min.js.report.txt
vendored
Normal file
0
public/dist/vendor.min.js.report.txt
vendored
Normal file
18
public/dist/vendor_forms_uglified.js
vendored
Normal file
18
public/dist/vendor_forms_uglified.js
vendored
Normal file
File diff suppressed because one or more lines are too long
19430
public/dist/vendor_uglified.js
vendored
Normal file
19430
public/dist/vendor_uglified.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
||||||
var ApplicationConfiguration = (function() {
|
var ApplicationConfiguration = (function() {
|
||||||
// Init module configuration options
|
// Init module configuration options
|
||||||
var applicationModuleName = 'TellForm-Form';
|
var applicationModuleName = 'TellForm-Form';
|
||||||
var applicationModuleVendorDependencies = ['duScroll', 'ui.select', 'ngSanitize', 'vButton', 'ngResource', 'TellForm-Form.form_templates', 'ui.router', 'ui.bootstrap', 'ui.utils', 'pascalprecht.translate'];
|
var applicationModuleVendorDependencies = ['duScroll', 'ui.select', 'ngSanitize', 'vButton', 'ngResource', 'TellForm-Form.form_templates', 'ui.router', 'ui.bootstrap', 'pascalprecht.translate'];
|
||||||
|
|
||||||
// Add a new vertical module
|
// Add a new vertical module
|
||||||
var registerModule = function(moduleName, dependencies) {
|
var registerModule = function(moduleName, dependencies) {
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
var url = '';
|
var url = '';
|
||||||
console.log("$window.socketPort: "+$window.socketPort);
|
console.log("$window.socketPort: "+$window.socketPort);
|
||||||
console.log("$window.socketUrl: "+$window.socketUrl);
|
console.log("$window.socketUrl: "+$window.socketUrl);
|
||||||
if($window.socketPort && $window.socketUrl){
|
if($window.socketUrl && $window.socketPort){
|
||||||
url = window.location.protocol + '//' + $window.socketUrl + ':' + $window.socketPort;
|
url = window.location.protocol + '//' + $window.socketUrl + ':' + $window.socketPort;
|
||||||
} else if ($window.socketUrl && !$window.socketUrl){
|
} else if ($window.socketUrl && !$window.socketPort){
|
||||||
url = window.location.protocol + '//' + $window.socketUrl;
|
url = window.location.protocol + '//' + $window.socketUrl;
|
||||||
} else if ($window.socketPort){
|
} else if ($window.socketPort){
|
||||||
url = window.location.protocol + '//' + window.location.hostname + ':' + $window.socketPort;
|
url = window.location.protocol + '//' + window.location.hostname + ':' + $window.socketPort;
|
||||||
|
|
|
@ -2,6 +2,5 @@
|
||||||
|
|
||||||
// Use Application configuration module to register a new module
|
// Use Application configuration module to register a new module
|
||||||
ApplicationConfiguration.registerModule('view-form', [
|
ApplicationConfiguration.registerModule('view-form', [
|
||||||
'ngFileUpload', 'ui.router.tabs', 'ui.date', 'ui.sortable',
|
'ngFileUpload', 'ui.date', 'angular-input-stars'
|
||||||
'angular-input-stars', 'pascalprecht.translate'
|
|
||||||
]);
|
]);
|
||||||
|
|
Loading…
Reference in a new issue