make it work
This commit is contained in:
parent
89a4852b67
commit
0658c2de60
|
@ -34,7 +34,8 @@
|
||||||
"raven-js": "^3.0.4",
|
"raven-js": "^3.0.4",
|
||||||
"tableExport.jquery.plugin": "^1.5.1",
|
"tableExport.jquery.plugin": "^1.5.1",
|
||||||
"js-yaml": "^3.6.1",
|
"js-yaml": "^3.6.1",
|
||||||
"angular-ui-select": "whitef0x0/ui-select#compiled"
|
"angular-ui-select": "whitef0x0/ui-select#compiled",
|
||||||
|
"angular-translate": "~2.11.0"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"angular-bootstrap": "^0.14.0",
|
"angular-bootstrap": "^0.14.0",
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* Module dependencies.
|
* Module dependencies.
|
||||||
*/
|
*/
|
||||||
var _ = require('lodash'),
|
var _ = require('lodash'),
|
||||||
glob = require('glob'),
|
gruntFile = require('grunt').file,
|
||||||
bowerFiles = require('main-bower-files'),
|
bowerFiles = require('main-bower-files'),
|
||||||
path = require('path'),
|
path = require('path'),
|
||||||
fs = require('fs');
|
fs = require('fs');
|
||||||
|
@ -40,36 +40,15 @@ if( fs.existsSync('./config/env/api_keys.js') ){
|
||||||
* Get files by glob patterns
|
* Get files by glob patterns
|
||||||
*/
|
*/
|
||||||
module.exports.getGlobbedFiles = function(globPatterns, removeRoot) {
|
module.exports.getGlobbedFiles = function(globPatterns, removeRoot) {
|
||||||
// For context switching
|
|
||||||
var _this = this;
|
|
||||||
|
|
||||||
// URL paths regex
|
var files = gruntFile.expand(globPatterns);
|
||||||
var urlRegex = new RegExp('^(?:[a-z]+:)?\/\/', 'i');
|
|
||||||
|
|
||||||
// The output array
|
|
||||||
var output = [];
|
|
||||||
|
|
||||||
// If glob pattern is array so we use each pattern in a recursive way, otherwise we use glob
|
|
||||||
if (_.isArray(globPatterns)) {
|
|
||||||
globPatterns.forEach(function(globPattern) {
|
|
||||||
output = _.union(output, _this.getGlobbedFiles(globPattern, removeRoot));
|
|
||||||
});
|
|
||||||
} else if (_.isString(globPatterns)) {
|
|
||||||
if (urlRegex.test(globPatterns)) {
|
|
||||||
output.push(globPatterns);
|
|
||||||
} else {
|
|
||||||
var files = glob.sync(globPatterns);
|
|
||||||
if (removeRoot) {
|
if (removeRoot) {
|
||||||
files = files.map(function(file) {
|
files = files.map(function(file) {
|
||||||
return file.replace(removeRoot, '');
|
return file.replace(removeRoot, '');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
output = _.union(output, files);
|
return files;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return output;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports.removeRootDir = function(files, root) {
|
module.exports.removeRootDir = function(files, root) {
|
||||||
|
|
31
config/env/all.js
vendored
31
config/env/all.js
vendored
|
@ -71,27 +71,42 @@ module.exports = {
|
||||||
},
|
},
|
||||||
assets: {
|
assets: {
|
||||||
css: [
|
css: [
|
||||||
'public/modules/**/css/*.css'
|
'public/modules/**/css/*.css',
|
||||||
|
'!public/modules/**/demo/**/*.css',
|
||||||
|
'!public/modules/**/dist/**/*.css',
|
||||||
|
'!public/modules/**/node_modules/**/*.css'
|
||||||
],
|
],
|
||||||
js: [
|
js: [
|
||||||
'public/dist/populate_template_cache.js',
|
'public/dist/populate_template_cache.js',
|
||||||
'public/config.js',
|
'public/config.js',
|
||||||
'public/application.js',
|
'public/application.js',
|
||||||
|
'public/*.js',
|
||||||
'public/modules/*/*.js',
|
'public/modules/*/*.js',
|
||||||
'public/modules/*/*[!tests]*/*.js'
|
'public/modules/*/*/*.js',
|
||||||
|
'public/modules/**/*.js',
|
||||||
|
'!public/modules/**/gruntfile.js',
|
||||||
|
'!public/modules/**/demo/**/*.js',
|
||||||
|
'!public/modules/**/dist/**/*.js',
|
||||||
|
'!public/modules/**/node_modules/**/*.js',
|
||||||
|
'!public/modules/**/tests/**/*.js'
|
||||||
],
|
],
|
||||||
views: [
|
views: [
|
||||||
'public/modules/*/views/*.html',
|
'public/modules/**/*.html',
|
||||||
'public/modules/*/views/*/*.html',
|
'!public/modules/**/demo/**/*.html',
|
||||||
'public/modules/*/views/*/*/*.html'
|
'!public/modules/**/dist/**/*.html',
|
||||||
|
'!public/modules/**/node_modules/**/*.html',
|
||||||
|
'!public/modules/**/tests/**/*.html'
|
||||||
],
|
],
|
||||||
unit_tests: [
|
unit_tests: [
|
||||||
'public/lib/angular-mocks/angular-mocks.js',
|
'public/lib/angular-mocks/angular-mocks.js',
|
||||||
'public/modules/*/tests/unit/*.js',
|
'public/modules/*/tests/unit/**/*.js',
|
||||||
'public/modules/*/tests/unit/**/*.js'
|
'!public/modules/**/demo/**/*.js',
|
||||||
|
'!public/modules/**/node_modules/**/*.js'
|
||||||
],
|
],
|
||||||
e2e_tests: [
|
e2e_tests: [
|
||||||
'public/modules/*/tests/e2e/**.js'
|
'public/modules/*/tests/e2e/**.js',
|
||||||
|
'!public/modules/**/demo/**/*.js',
|
||||||
|
'!public/modules/**/node_modules/**/*.js'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
2
config/env/production.js
vendored
2
config/env/production.js
vendored
|
@ -3,7 +3,7 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
baseUrl: process.env.BASE_URL || 'tellform.com',
|
baseUrl: process.env.BASE_URL || 'tellform.com',
|
||||||
db: {
|
db: {
|
||||||
uri: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost') + '/mean',
|
uri: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || '192.168.99.100:27017') + '/mean',
|
||||||
options: {
|
options: {
|
||||||
user: '',
|
user: '',
|
||||||
pass: process.env.MONGOLAB_PASS || ''
|
pass: process.env.MONGOLAB_PASS || ''
|
||||||
|
|
|
@ -3,6 +3,10 @@ version: '2'
|
||||||
services:
|
services:
|
||||||
db:
|
db:
|
||||||
image: mongo:3.2
|
image: mongo:3.2
|
||||||
|
ports:
|
||||||
|
- "27017:27017"
|
||||||
|
volumes:
|
||||||
|
- mongo-data-wt:/data/db
|
||||||
web:
|
web:
|
||||||
build: .
|
build: .
|
||||||
volumes:
|
volumes:
|
||||||
|
|
16
gruntfile.js
16
gruntfile.js
|
@ -7,16 +7,20 @@ module.exports = function(grunt) {
|
||||||
|
|
||||||
// Unified Watch Object
|
// Unified Watch Object
|
||||||
var watchFiles = {
|
var watchFiles = {
|
||||||
|
|
||||||
serverViews: ['app/views/**/*.*'],
|
serverViews: ['app/views/**/*.*'],
|
||||||
serverJS: ['gruntfile.js', 'server.js', 'config/**/*.js', 'app/**/*.js', '!app/tests/'],
|
serverJS: ['gruntfile.js', 'server.js', 'config/**/*.js', 'app/**/*.js', '!app/tests/'],
|
||||||
clientViews: ['public/modules/**/views/**/*.html'],
|
|
||||||
clientJS: ['public/js/*.js', 'public/modules/**/*.js', '!public/modules/**/gruntfile.js', '!public/modules/**/demo/**/*.js', '!public/modules/**/dist/**/*.js', '!public/modules/**/lib/**/*.js'],
|
clientViews: ['public/modules/**/views/**/*.html', '!public/modules/**/demo/**/*.html', '!public/modules/**/dist/**/*.html', '!public/modules/**/node_modules/**/*.html'],
|
||||||
clientCSS: ['public/modules/**/*.css'],
|
clientJS: ['public/js/*.js', 'public/modules/**/*.js', '!public/modules/**/gruntfile.js', '!public/modules/**/demo/**/*.js', '!public/modules/**/dist/**/*.js', '!public/modules/**/node_modules/**/*.js'],
|
||||||
|
clientCSS: ['public/modules/**/*.css', '!public/modules/**/demo/**/*.css', '!public/modules/**/dist/**/*.css', '!public/modules/**/node_modules/**/*.css'],
|
||||||
|
|
||||||
serverTests: ['app/tests/**/*.js'],
|
serverTests: ['app/tests/**/*.js'],
|
||||||
clientTests: ['public/modules/**/tests/*.js'],
|
clientTests: ['public/modules/**/tests/*.js', '!public/modules/**/demo/**/*.js', '!public/modules/**/dist/**/*.js', '!public/modules/**/node_modules/**/*.js']
|
||||||
allTests: ['public/modules/**/tests/*.js', 'app/tests/**/*.js'],
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
watchFiles.allTests = watchFiles.serverTests.concat(watchFiles.clientTests);
|
||||||
|
|
||||||
// Project Configuration
|
// Project Configuration
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
pkg: grunt.file.readJSON('package.json'),
|
pkg: grunt.file.readJSON('package.json'),
|
||||||
|
@ -234,7 +238,7 @@ module.exports = function(grunt) {
|
||||||
},
|
},
|
||||||
html2js: {
|
html2js: {
|
||||||
options: {
|
options: {
|
||||||
base: 'NodeForm',
|
base: 'public',
|
||||||
watch: true,
|
watch: true,
|
||||||
module: 'NodeForm.templates',
|
module: 'NodeForm.templates',
|
||||||
singleModule: true,
|
singleModule: true,
|
||||||
|
|
4541
public/dist/application.js
vendored
4541
public/dist/application.js
vendored
File diff suppressed because one or more lines are too long
16
public/dist/application.min.js
vendored
16
public/dist/application.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -3,7 +3,7 @@
|
||||||
angular.module('forms').directive('configureFormDirective', ['$rootScope', '$http', 'Upload', 'CurrentForm',
|
angular.module('forms').directive('configureFormDirective', ['$rootScope', '$http', 'Upload', 'CurrentForm',
|
||||||
function ($rootScope, $http, Upload, CurrentForm) {
|
function ($rootScope, $http, Upload, CurrentForm) {
|
||||||
return {
|
return {
|
||||||
templateUrl: 'modules/forms/views/directiveViews/form/configure-form.client.view.html',
|
templateUrl: 'modules/forms/admin/views/directiveViews/form/configure-form.client.view.html',
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
scope: {
|
scope: {
|
||||||
myform:'=',
|
myform:'=',
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
angular.module('forms').directive('editFormDirective', ['$rootScope', 'FormFields',
|
angular.module('forms').directive('editFormDirective', ['$rootScope', 'FormFields',
|
||||||
function ($rootScope, FormFields) {
|
function ($rootScope, FormFields) {
|
||||||
return {
|
return {
|
||||||
templateUrl: 'modules/forms/views/directiveViews/form/edit-form.client.view.html',
|
templateUrl: 'modules/forms/admin/views/directiveViews/form/edit-form.client.view.html',
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
scope: {
|
scope: {
|
||||||
myform:'='
|
myform:'='
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
angular.module('forms').directive('editSubmissionsFormDirective', ['$rootScope', '$http',
|
angular.module('forms').directive('editSubmissionsFormDirective', ['$rootScope', '$http',
|
||||||
function ($rootScope, $http) {
|
function ($rootScope, $http) {
|
||||||
return {
|
return {
|
||||||
templateUrl: 'modules/forms/views/directiveViews/form/edit-submissions-form.client.view.html',
|
templateUrl: 'modules/forms/admin/views/directiveViews/form/edit-submissions-form.client.view.html',
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
scope: {
|
scope: {
|
||||||
myform:'=',
|
myform:'=',
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="container" cg-busy="{promise:updatePromise,templateUrl:'modules/forms/views/directiveViews/cgBusy/update-form-message-TypeB.html',message:'Updating form...', backdrop:false, wrapperClass:'.busy-updating-wrapper'}"></div>
|
<div class="container" cg-busy="{promise:updatePromise,templateUrl:'modules/forms/admin/views/directiveViews/cgBusy/update-form-message-TypeB.html',message:'Updating form...', backdrop:false, wrapperClass:'.busy-updating-wrapper'}"></div>
|
||||||
|
|
||||||
<section class="container admin-form">
|
<section class="container admin-form">
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-1 col-sm-2">
|
<div class="col-xs-1 col-sm-2">
|
||||||
<small class="pull-right">
|
<small class="pull-right">
|
||||||
<a class="btn btn-default view-form-btn" href="/#!/forms/{{myform._id}}" ng-if="myform.form_fields.length">
|
<a class="btn btn-default view-form-btn" href="/#!/forms/{{myform._id}}">
|
||||||
<span class="hidden-xs hidden-sm">
|
<span class="hidden-xs hidden-sm">
|
||||||
View
|
View
|
||||||
<span ng-show="myform.isLive">
|
<span ng-show="myform.isLive">
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bootstrap": "~3",
|
"bootstrap": "~3",
|
||||||
"angular": "~1.4.7",
|
"angular": "~1.4.7",
|
||||||
|
"angular-translate": "~2.11.0",
|
||||||
"angular-resource": "~1.4.7",
|
"angular-resource": "~1.4.7",
|
||||||
"angular-bootstrap": "~1.3.2",
|
"angular-bootstrap": "~1.3.2",
|
||||||
"angular-ui-utils": "~3.0.0",
|
"angular-ui-utils": "~3.0.0",
|
||||||
|
@ -20,18 +21,19 @@
|
||||||
"angular-input-stars": "*",
|
"angular-input-stars": "*",
|
||||||
"file-saver.js": "~1.20150507.2",
|
"file-saver.js": "~1.20150507.2",
|
||||||
"angular-scroll": "^1.0.0",
|
"angular-scroll": "^1.0.0",
|
||||||
"ui-select": "angular-ui-select#^0.16.1",
|
|
||||||
"angular-sanitize": "^1.5.3",
|
"angular-sanitize": "^1.5.3",
|
||||||
"v-button": "^1.1.1",
|
"v-button": "^1.1.1",
|
||||||
"angular-busy": "^4.1.3",
|
"angular-busy": "^4.1.3",
|
||||||
"font-awesome": "~4.6.1",
|
"font-awesome": "~4.6.1",
|
||||||
"components-font-awesome": "~4.6.1",
|
"components-font-awesome": "~4.6.1",
|
||||||
"angular-strap": "~2.3.8",
|
"angular-strap": "~2.3.8",
|
||||||
"restangular": "~1.5.2"
|
"restangular": "~1.5.2",
|
||||||
|
"angular-ui-select": "whitef0x0/ui-select#compiled",
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"angular-bootstrap": "^0.14.0",
|
"angular-bootstrap": "^0.14.0",
|
||||||
"angular": "1.4.x"
|
"angular": "~1.4.7",
|
||||||
|
"angular-ui-select": "compiled"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"BOWER-PACKAGE": {
|
"BOWER-PACKAGE": {
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
|
|
||||||
angular.module('forms', [
|
angular.module('forms', [
|
||||||
'duScroll', 'ngResource', 'NodeForm.templates', 'pascalprecht.translate',
|
'duScroll', 'ngResource', 'NodeForm.templates', 'pascalprecht.translate',
|
||||||
'angular-input-stars'
|
'angular-input-stars',
|
||||||
|
'ui.select'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
angular.module('NodeForm', [
|
angular.module('NodeForm', [
|
||||||
'ui.select', 'cgBusy', 'ngSanitize', 'vButton', 'ngResource',
|
'ui.select', 'cgBusy', 'ngSanitize', 'vButton', 'ngResource',
|
||||||
'ui.router', 'ui.bootstrap', 'ui.utils', 'ngRaven', 'forms'
|
'ui.router', 'ui.bootstrap', 'ui.utils', 'ngRaven', 'forms',
|
||||||
|
'ui.select'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
angular.module('forms').factory('Auth', [
|
angular.module('forms').factory('Auth', [
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -26,7 +26,7 @@ angular.module('forms').config(['$stateProvider',
|
||||||
controllerAs: 'ctrl'
|
controllerAs: 'ctrl'
|
||||||
}).state('viewForm', {
|
}).state('viewForm', {
|
||||||
url: '/forms/:formId/admin',
|
url: '/forms/:formId/admin',
|
||||||
templateUrl: 'modules/forms/views/admin-form.client.view.html',
|
templateUrl: 'modules/forms/admin/views/admin-form.client.view.html',
|
||||||
data: {
|
data: {
|
||||||
permissions: [ 'editForm' ]
|
permissions: [ 'editForm' ]
|
||||||
},
|
},
|
||||||
|
@ -39,16 +39,16 @@ angular.module('forms').config(['$stateProvider',
|
||||||
controller: 'AdminFormController'
|
controller: 'AdminFormController'
|
||||||
}).state('viewForm.configure', {
|
}).state('viewForm.configure', {
|
||||||
url: '/configure',
|
url: '/configure',
|
||||||
templateUrl: 'modules/forms/views/adminTabs/configure.html'
|
templateUrl: 'modules/forms/admin/views/adminTabs/configure.html'
|
||||||
}).state('viewForm.design', {
|
}).state('viewForm.design', {
|
||||||
url: '/design',
|
url: '/design',
|
||||||
templateUrl: 'modules/forms/views/adminTabs/design.html'
|
templateUrl: 'modules/forms/admin/views/adminTabs/design.html'
|
||||||
}).state('viewForm.analyze', {
|
}).state('viewForm.analyze', {
|
||||||
url: '/analyze',
|
url: '/analyze',
|
||||||
templateUrl: 'modules/forms/views/adminTabs/analyze.html',
|
templateUrl: 'modules/forms/admin/views/adminTabs/analyze.html',
|
||||||
}).state('viewForm.create', {
|
}).state('viewForm.create', {
|
||||||
url: '/create',
|
url: '/create',
|
||||||
templateUrl: 'modules/forms/views/adminTabs/create.html'
|
templateUrl: 'modules/forms/admin/views/adminTabs/create.html'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// Use Application configuration module to register a new module
|
// Use Application configuration module to register a new module
|
||||||
ApplicationConfiguration.registerModule('forms', ['ngFileUpload', 'ui.router.tabs', 'ui.date', 'ui.sortable', 'angular-input-stars', 'users']);//, 'colorpicker.module' @TODO reactivate this module
|
ApplicationConfiguration.registerModule('forms', [
|
||||||
|
'ngFileUpload', 'ui.router.tabs', 'ui.date', 'ui.sortable',
|
||||||
|
'angular-input-stars', 'users', 'pascalprecht.translate'
|
||||||
|
]);//, 'colorpicker.module' @TODO reactivate this module
|
||||||
|
|
Loading…
Reference in a new issue