add base build + demo
This commit is contained in:
parent
77f1f5dc43
commit
22cce3f6b3
4
public/modules/forms/base/.bowerrc
Normal file
4
public/modules/forms/base/.bowerrc
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"directory": "demo/lib",
|
||||||
|
"analytics": false
|
||||||
|
}
|
2
public/modules/forms/base/.gitignore
vendored
Normal file
2
public/modules/forms/base/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
dist
|
||||||
|
demo/lib
|
41
public/modules/forms/base/bower.json
Executable file
41
public/modules/forms/base/bower.json
Executable file
|
@ -0,0 +1,41 @@
|
||||||
|
{
|
||||||
|
"name": "tellform Form UI",
|
||||||
|
"description": "Opensource alternative to TypeForm",
|
||||||
|
"version": "1.2.1",
|
||||||
|
"homepage": "https://github.com/whitef0x0/tellform",
|
||||||
|
"authors": [
|
||||||
|
"David Baldwynn <polydaic@gmail.com> (http://baldwynn.me)",
|
||||||
|
"Samuel Laulhau <sam@lalop.co> (https://samuellaulhau.fr)"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"bootstrap": "~3",
|
||||||
|
"angular": "~1.4.7",
|
||||||
|
"angular-resource": "~1.4.7",
|
||||||
|
"angular-bootstrap": "~1.3.2",
|
||||||
|
"angular-ui-utils": "~3.0.0",
|
||||||
|
"ng-file-upload": "~10.0.2",
|
||||||
|
"angular-ui-date": "~0.0.8",
|
||||||
|
"lodash": "~3.10.0",
|
||||||
|
"angular-input-stars": "*",
|
||||||
|
"file-saver.js": "~1.20150507.2",
|
||||||
|
"angular-scroll": "^1.0.0",
|
||||||
|
"ui-select": "angular-ui-select#^0.16.1",
|
||||||
|
"angular-sanitize": "^1.5.3",
|
||||||
|
"v-button": "^1.1.1",
|
||||||
|
"angular-busy": "^4.1.3",
|
||||||
|
"font-awesome": "~4.6.1",
|
||||||
|
"components-font-awesome": "~4.6.1",
|
||||||
|
"angular-strap": "~2.3.8",
|
||||||
|
"restangular": "~1.5.2"
|
||||||
|
},
|
||||||
|
"resolutions": {
|
||||||
|
"angular-bootstrap": "^0.14.0",
|
||||||
|
"angular": "1.4.x"
|
||||||
|
},
|
||||||
|
"overrides": {
|
||||||
|
"BOWER-PACKAGE": {
|
||||||
|
"main": "**/*.min.js"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
51
public/modules/forms/base/demo/boot.js
Normal file
51
public/modules/forms/base/demo/boot.js
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
|
||||||
|
angular.module('NodeForm', [
|
||||||
|
'duScroll', 'ui.select', 'cgBusy', 'ngSanitize', 'vButton', 'ngResource',
|
||||||
|
'ui.router', 'ui.bootstrap', 'ui.utils', 'ngRaven'
|
||||||
|
]);
|
||||||
|
angular.module('forms', ['ngResource', 'NodeForm.templates']);
|
||||||
|
angular.module('NodeForm').requires.push('forms');
|
||||||
|
|
||||||
|
angular.module('forms').factory('Auth', [
|
||||||
|
function() {
|
||||||
|
var service = {
|
||||||
|
_currentUser: null,
|
||||||
|
get currentUser(){
|
||||||
|
return this._currentUser;
|
||||||
|
},
|
||||||
|
ensureHasCurrentUser: function() {
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
isAuthenticated: function() {
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
getUserState: function() {
|
||||||
|
return '';
|
||||||
|
},
|
||||||
|
login: function() {
|
||||||
|
},
|
||||||
|
logout: function() {
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return service;
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
angular.module('forms').factory('$state', [function() {
|
||||||
|
return {
|
||||||
|
go: function() {}
|
||||||
|
};
|
||||||
|
}]);
|
||||||
|
angular.module('forms').factory('myForm', ['Forms', function(Forms) {
|
||||||
|
var form = window.form;
|
||||||
|
form.visible_form_fields = _.filter(form.form_fields, function(field){
|
||||||
|
return (field.deletePreserved === false);
|
||||||
|
});
|
||||||
|
return form;
|
||||||
|
}]);
|
||||||
|
angular.module('forms').constant('FORM_URL', '/form/:formId');
|
||||||
|
|
||||||
|
|
||||||
|
angular.element(document).ready(function() {
|
||||||
|
//Then init the app
|
||||||
|
angular.bootstrap(document, ['forms']);
|
||||||
|
});
|
74
public/modules/forms/base/demo/index.html
Normal file
74
public/modules/forms/base/demo/index.html
Normal file
File diff suppressed because one or more lines are too long
47
public/modules/forms/base/gruntfile.js
Normal file
47
public/modules/forms/base/gruntfile.js
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
module.exports = function(grunt) {
|
||||||
|
require('jit-grunt')(grunt);
|
||||||
|
|
||||||
|
// Project Configuration
|
||||||
|
grunt.initConfig({
|
||||||
|
ngAnnotate: {
|
||||||
|
production: {
|
||||||
|
files: {
|
||||||
|
'dist/form.js': [
|
||||||
|
'config/**/*.js', 'controllers/**/*.js',
|
||||||
|
'directives/**/*.js', 'services/**/*.js',
|
||||||
|
'dist/template.js'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
html2js: {
|
||||||
|
options: {
|
||||||
|
base: '',
|
||||||
|
module: 'NodeForm.templates',
|
||||||
|
singleModule: true,
|
||||||
|
rename: function (moduleName) {
|
||||||
|
return 'modules/forms/base/' + moduleName;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
src: ['views/**/*.html'],
|
||||||
|
dest: 'dist/template.js'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cssmin: {
|
||||||
|
combine: {
|
||||||
|
files: {
|
||||||
|
'dist/form.css': 'css/**/*.css'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// Making grunt default to force in order not to break the project.
|
||||||
|
grunt.option('force', true);
|
||||||
|
|
||||||
|
// Default task(s).
|
||||||
|
grunt.registerTask('default', ['html2js:form', 'ngAnnotate', 'cssmin']);
|
||||||
|
};
|
33
public/modules/forms/base/package.json
Normal file
33
public/modules/forms/base/package.json
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
"name": "angular-tellform",
|
||||||
|
"description": "Opensource alternative to TypeForm",
|
||||||
|
"version": "1.3.0",
|
||||||
|
"homepage": "https://github.com/whitef0x0/tellform",
|
||||||
|
"authors": [
|
||||||
|
"David Baldwynn <polydaic@gmail.com> (http://baldwynn.me)",
|
||||||
|
"Samuel Laulhau <sam@lalop.co> (https://samuellaulhau.fr)"
|
||||||
|
],
|
||||||
|
"private": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/tellform/angular-tellform.git"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "~5.0.0",
|
||||||
|
"npm": "~2.11.2"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"postinstall": "node node_modules/.bin/bower install --config.interactive=false; node node_modules/.bin/grunt build"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"bower": "~1.6.5",
|
||||||
|
"grunt": "~0.4.1",
|
||||||
|
"grunt-cli": "~0.1.13",
|
||||||
|
"grunt-contrib-cssmin": "~0.14.0",
|
||||||
|
"grunt-contrib-uglify": "~0.11.0",
|
||||||
|
"grunt-html2js": "~0.3.5",
|
||||||
|
"grunt-ng-annotate": "~1.0.1",
|
||||||
|
"jit-grunt": "^0.10.0"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue