successfully split form and admin panel template cache
This commit is contained in:
parent
709303d43c
commit
8d27010d0a
|
@ -71,7 +71,7 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var signupDisabled = {{signupDisabled | safe}};
|
var signupDisabled = {{signupDisabled | safe}};
|
||||||
var socketPort = {{socketPort | safe}};
|
var socketPort = {{socketPort | safe}};
|
||||||
var socketUrl = {{socketUrl | safe}} || null;
|
var socketUrl = {{socketUrl | safe}};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!--Socket.io Client Dependency-->
|
<!--Socket.io Client Dependency-->
|
||||||
|
|
4
config/env/all.js
vendored
4
config/env/all.js
vendored
|
@ -21,7 +21,6 @@ module.exports = {
|
||||||
},
|
},
|
||||||
|
|
||||||
port: process.env.PORT || 3000,
|
port: process.env.PORT || 3000,
|
||||||
socketPort: process.env.SOCKET_PORT || 20523,
|
|
||||||
|
|
||||||
templateEngine: 'swig',
|
templateEngine: 'swig',
|
||||||
|
|
||||||
|
@ -110,7 +109,8 @@ module.exports = {
|
||||||
'public/form_modules/forms/*.js',
|
'public/form_modules/forms/*.js',
|
||||||
'public/form_modules/forms/*/*/*/*.js',
|
'public/form_modules/forms/*/*/*/*.js',
|
||||||
'public/form_modules/forms/*/*.js',
|
'public/form_modules/forms/*/*.js',
|
||||||
'public/form_modules/forms/*/*/*.js'
|
'public/form_modules/forms/*/*/*.js',
|
||||||
|
'public/form_modules/forms/**.js'
|
||||||
],
|
],
|
||||||
views: [
|
views: [
|
||||||
'public/modules/**/*.html',
|
'public/modules/**/*.html',
|
||||||
|
|
2
config/env/development.js
vendored
2
config/env/development.js
vendored
|
@ -9,6 +9,8 @@ module.exports = {
|
||||||
pass: ''
|
pass: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
socketPort: process.env.SOCKET_PORT || 20523,
|
||||||
|
|
||||||
log: {
|
log: {
|
||||||
// Can specify one of 'combined', 'common', 'dev', 'short', 'tiny'
|
// Can specify one of 'combined', 'common', 'dev', 'short', 'tiny'
|
||||||
format: 'dev',
|
format: 'dev',
|
||||||
|
|
|
@ -57,9 +57,16 @@ module.exports = function(db) {
|
||||||
app.locals.description = config.app.description;
|
app.locals.description = config.app.description;
|
||||||
app.locals.keywords = config.app.keywords;
|
app.locals.keywords = config.app.keywords;
|
||||||
|
|
||||||
|
if(config.socketPort){
|
||||||
app.locals.socketPort = config.socketPort;
|
app.locals.socketPort = config.socketPort;
|
||||||
|
} else {
|
||||||
|
app.locals.socketPort = false;
|
||||||
|
}
|
||||||
|
|
||||||
if(config.socketUrl){
|
if(config.socketUrl){
|
||||||
app.locals.socketUrl = config.socketUrl;
|
app.locals.socketUrl = config.socketUrl;
|
||||||
|
} else {
|
||||||
|
app.locals.socketUrl = false;
|
||||||
}
|
}
|
||||||
app.locals.bowerJSFiles = config.getBowerJSAssets();
|
app.locals.bowerJSFiles = config.getBowerJSAssets();
|
||||||
app.locals.bowerCssFiles = config.getBowerCSSAssets();
|
app.locals.bowerCssFiles = config.getBowerCSSAssets();
|
||||||
|
|
16
gruntfile.js
16
gruntfile.js
|
@ -64,7 +64,7 @@ module.exports = function(grunt) {
|
||||||
},
|
},
|
||||||
mochaTests: {
|
mochaTests: {
|
||||||
files: watchFiles.serverTests,
|
files: watchFiles.serverTests,
|
||||||
tasks: ['test:server'],
|
tasks: ['test:server']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
jshint: {
|
jshint: {
|
||||||
|
@ -254,7 +254,7 @@ module.exports = function(grunt) {
|
||||||
},
|
},
|
||||||
forms: {
|
forms: {
|
||||||
options: {
|
options: {
|
||||||
module: 'TellForm.form_templates'
|
module: 'TellForm-Form.form_templates'
|
||||||
},
|
},
|
||||||
src: ['public/form_modules/**/views/**.html', 'public/form_modules/**/views/**/*.html'],
|
src: ['public/form_modules/**/views/**.html', 'public/form_modules/**/views/**/*.html'],
|
||||||
dest: 'public/dist/form_populate_template_cache.js'
|
dest: 'public/dist/form_populate_template_cache.js'
|
||||||
|
@ -306,21 +306,21 @@ module.exports = function(grunt) {
|
||||||
grunt.registerTask('coverage:server', ['env:test', 'mocha_istanbul:coverageServer']);
|
grunt.registerTask('coverage:server', ['env:test', 'mocha_istanbul:coverageServer']);
|
||||||
|
|
||||||
// Default task(s).
|
// Default task(s).
|
||||||
grunt.registerTask('default', ['lint', 'html2js:main', 'env', 'concurrent:default']);
|
grunt.registerTask('default', ['lint', 'html2js:main', 'html2js:forms', 'env', 'concurrent:default']);
|
||||||
grunt.registerTask('dev', ['lint', 'html2js:main', 'env:dev', 'concurrent:default']);
|
grunt.registerTask('dev', ['lint', 'html2js:main', 'html2js:forms', 'env:dev', 'concurrent:default']);
|
||||||
|
|
||||||
// Debug task.
|
// Debug task.
|
||||||
grunt.registerTask('debug', ['lint', 'html2js:main', 'concurrent:debug']);
|
grunt.registerTask('debug', ['lint', 'html2js:main', 'html2js:forms', 'concurrent:debug']);
|
||||||
|
|
||||||
// Secure task(s).
|
// Secure task(s).
|
||||||
grunt.registerTask('secure', ['env:secure', 'lint', 'html2js:main', 'concurrent:default']);
|
grunt.registerTask('secure', ['env:secure', 'lint', 'html2js:main', 'html2js:forms', 'concurrent:default']);
|
||||||
|
|
||||||
// Lint task(s).
|
// Lint task(s).
|
||||||
grunt.registerTask('lint', ['jshint', 'csslint']);
|
grunt.registerTask('lint', ['jshint', 'csslint']);
|
||||||
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']);
|
grunt.registerTask('build', ['lint', 'loadConfig', 'cssmin', 'ngAnnotate', 'uglify', 'html2js:main', 'html2js:forms']);
|
||||||
|
|
||||||
//Setup task(s).
|
//Setup task(s).
|
||||||
grunt.registerTask('setup', ['execute']);
|
grunt.registerTask('setup', ['execute']);
|
||||||
|
@ -328,5 +328,5 @@ module.exports = function(grunt) {
|
||||||
// Test task(s).
|
// Test task(s).
|
||||||
grunt.registerTask('test', ['lint:tests', 'test:server', 'test:client']);
|
grunt.registerTask('test', ['lint:tests', 'test:server', 'test:client']);
|
||||||
grunt.registerTask('test:server', ['lint:tests', 'env:test', 'mochaTest']);
|
grunt.registerTask('test:server', ['lint:tests', 'env:test', 'mochaTest']);
|
||||||
grunt.registerTask('test:client', ['lint:tests', 'html2js:main', 'env:test', 'karma:unit']);
|
grunt.registerTask('test:client', ['lint:tests', 'html2js:main', 'html2js:forms', 'env:test', 'karma:unit']);
|
||||||
};
|
};
|
||||||
|
|
41
public/dist/form-application.js
vendored
41
public/dist/form-application.js
vendored
File diff suppressed because one or more lines are too long
3
public/dist/form-application.min.js
vendored
3
public/dist/form-application.min.js
vendored
File diff suppressed because one or more lines are too long
38
public/dist/form_populate_template_cache.js
vendored
Normal file
38
public/dist/form_populate_template_cache.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -3,8 +3,8 @@
|
||||||
// Init the application configuration module for AngularJS application
|
// Init the application configuration module for AngularJS application
|
||||||
var ApplicationConfiguration = (function() {
|
var ApplicationConfiguration = (function() {
|
||||||
// Init module configuration options
|
// Init module configuration options
|
||||||
var applicationModuleName = 'TellForm';
|
var applicationModuleName = 'TellForm-Form';
|
||||||
var applicationModuleVendorDependencies = ['duScroll', 'ui.select', 'ngSanitize', 'vButton', 'ngResource', 'TellForm.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', 'ui.utils', 'pascalprecht.translate'];
|
||||||
|
|
||||||
// Add a new vertical module
|
// Add a new vertical module
|
||||||
var registerModule = function(moduleName, dependencies) {
|
var registerModule = function(moduleName, dependencies) {
|
||||||
|
|
|
@ -30,7 +30,7 @@ angular.module('view-form').directive('fieldDirective', ['$http', '$compile', '$
|
||||||
'natural'
|
'natural'
|
||||||
];
|
];
|
||||||
|
|
||||||
var templateUrl = 'modules/forms/base/views/directiveViews/field/';
|
var templateUrl = 'form_modules/forms/base/views/directiveViews/field/';
|
||||||
|
|
||||||
if (__indexOf.call(supportedFields, type) >= 0) {
|
if (__indexOf.call(supportedFields, type) >= 0) {
|
||||||
templateUrl = templateUrl+type+'.html';
|
templateUrl = templateUrl+type+'.html';
|
||||||
|
|
|
@ -39,7 +39,7 @@ function hashFnv32a(str, asString, seed) {
|
||||||
angular.module('view-form').directive('submitFormDirective', ['$http', 'TimeCounter', '$filter', '$rootScope', 'SendVisitorData',
|
angular.module('view-form').directive('submitFormDirective', ['$http', 'TimeCounter', '$filter', '$rootScope', 'SendVisitorData',
|
||||||
function ($http, TimeCounter, $filter, $rootScope, SendVisitorData) {
|
function ($http, TimeCounter, $filter, $rootScope, SendVisitorData) {
|
||||||
return {
|
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',
|
restrict: 'E',
|
||||||
scope: {
|
scope: {
|
||||||
myform:'='
|
myform:'='
|
||||||
|
|
Loading…
Reference in a new issue