Merge branch '2.20' into emailNotifications
This commit is contained in:
commit
a77a59c3ba
@ -57,7 +57,7 @@ html(lang='en', xmlns='http://www.w3.org/1999/xhtml')
|
||||
//Embedding socketUrl
|
||||
if socketUrl
|
||||
script(type='text/javascript').
|
||||
socketUrl = !{socketUrl}
|
||||
socketUrl = "!{socketUrl}"
|
||||
|
||||
script(src='/static/lib/jquery/dist/jquery.min.js', type='text/javascript')
|
||||
link(rel='stylesheet', href='/static/lib/font-awesome/css/font-awesome.min.css')
|
||||
@ -80,6 +80,7 @@ html(lang='en', xmlns='http://www.w3.org/1999/xhtml')
|
||||
script(src='/static/lib/socket.io-client/dist/socket.io.min.js')
|
||||
|
||||
//Minified Bower Dependencies
|
||||
script(src='/static/lib/angular/angular.min.js')
|
||||
script(src='/static/dist/vendor.min.js')
|
||||
script(src='/static/lib/angular-ui-date/src/date.js', type='text/javascript')
|
||||
|
||||
|
||||
@ -151,8 +151,8 @@ module.exports = function(grunt) {
|
||||
},
|
||||
production: {
|
||||
files: {
|
||||
'public/dist/application.js': ['public/application.js', 'public/config.js', 'public/form_modules/**/*.js'],
|
||||
'public/dist/form_application.js': ['public/form-application.js', 'public/form-config.js', 'public/form_modules/**/*.js']
|
||||
'public/dist/application.js': '<%= applicationJavaScriptFiles %>',
|
||||
'public/dist/form-application.js': '<%= formApplicationJavaScriptFiles %>'
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -287,7 +287,7 @@ module.exports = function(grunt) {
|
||||
grunt.registerTask('coverage:server', ['env:test', 'mocha_istanbul:coverageServer']);
|
||||
|
||||
// Default task(s).
|
||||
grunt.registerTask('default', ['lint', 'html2js:main', 'html2js:forms', 'env', 'concurrent:default']);
|
||||
grunt.registerTask('default', ['lint', 'loadConfig', 'ngAnnotate', 'uglify', 'html2js:main', 'html2js:forms', 'env', 'concurrent:default']);
|
||||
grunt.registerTask('dev', ['lint', 'html2js:main', 'html2js:forms', 'env:dev', 'concurrent:default']);
|
||||
|
||||
// Debug task.
|
||||
|
||||
1977
package-lock.json
generated
1977
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -27,7 +27,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"async": "^1.4.2",
|
||||
"bcrypt": "~1.0.3",
|
||||
"body-parser": "~1.14.1",
|
||||
"bower": "~1.6.5",
|
||||
"chalk": "^1.1.3",
|
||||
@ -74,9 +73,7 @@
|
||||
"socket.io": "^1.4.6",
|
||||
"socket.io-redis": "^1.0.0",
|
||||
"uuid-token-generator": "^0.5.0",
|
||||
"wildcard-subdomains": "github:tellform/wildcard-subdomains",
|
||||
"winston": "^2.3.1",
|
||||
"winston-logrotate": "^1.2.0"
|
||||
"winston": "^2.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"all-contributors-cli": "^4.3.0",
|
||||
|
||||
0
public/dist/.placeholder
vendored
0
public/dist/.placeholder
vendored
1394
public/dist/form-application.js
vendored
1394
public/dist/form-application.js
vendored
File diff suppressed because one or more lines are too long
2
public/dist/form-application.min.js
vendored
2
public/dist/form-application.min.js
vendored
File diff suppressed because one or more lines are too long
0
public/dist/vendor.min.js.report.txt
vendored
0
public/dist/vendor.min.js.report.txt
vendored
20611
public/dist/vendor_forms_uglified.js
vendored
20611
public/dist/vendor_forms_uglified.js
vendored
File diff suppressed because one or more lines are too long
19430
public/dist/vendor_uglified.js
vendored
19430
public/dist/vendor_uglified.js
vendored
File diff suppressed because one or more lines are too long
@ -15,11 +15,19 @@ angular.module(ApplicationConfiguration.applicationModuleName).run(['$rootScope'
|
||||
$rootScope.$stateParams = $stateParams;
|
||||
|
||||
// add previous state property
|
||||
$rootScope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState) {
|
||||
$state.previous = fromState;
|
||||
$rootScope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams) {
|
||||
$state.previous = {
|
||||
state: fromState,
|
||||
params: fromParams
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
var statesToIgnore = ['home', 'signin', 'resendVerifyEmail', 'verify', 'signup', 'signup-success', 'forgot', 'reset-invalid', 'reset', 'reset-success'];
|
||||
|
||||
=======
|
||||
var statesToIgnore = ['', 'home', 'signin', 'resendVerifyEmail', 'verify', 'signup', 'signup-success', 'forgot', 'reset-invalid', 'reset', 'reset-success'];
|
||||
|
||||
>>>>>>> 2.20
|
||||
//Redirect to listForms if user is authenticated
|
||||
if(statesToIgnore.indexOf(toState.name) > 0){
|
||||
if(Auth.isAuthenticated()){
|
||||
|
||||
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
@ -1,10 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
//TODO: DAVID: URGENT: Make this a $resource that fetches valid field types from server
|
||||
<<<<<<< HEAD
|
||||
angular.module('forms').service('FormFields', [ '$rootScope', '$translate', '$window',
|
||||
function($rootScope, $translate, $window) {
|
||||
console.log($window.user);
|
||||
$translate.use($window.user.language);
|
||||
=======
|
||||
angular.module('forms').service('FormFields', [ '$rootScope', '$translate', 'Auth',
|
||||
function($rootScope, $translate, Auth) {
|
||||
|
||||
var language = Auth.ensureHasCurrentUser().language;
|
||||
$translate.use(language);
|
||||
>>>>>>> 2.20
|
||||
|
||||
this.types = [
|
||||
{
|
||||
|
||||
@ -58,7 +58,10 @@ angular.module('forms').config(['$stateProvider',
|
||||
});
|
||||
|
||||
return deferred.promise;
|
||||
}
|
||||
},
|
||||
formId: ['$stateParams', function ($stateParams) {
|
||||
return $stateParams.formId;
|
||||
}]
|
||||
},
|
||||
controller: 'AdminFormController'
|
||||
}).state('viewForm.create', {
|
||||
|
||||
@ -3,6 +3,10 @@
|
||||
// Use Application configuration module to register a new module
|
||||
ApplicationConfiguration.registerModule('forms', [
|
||||
'ngFileUpload', 'ui.date', 'ui.sortable',
|
||||
<<<<<<< HEAD
|
||||
'angular-input-stars', 'users', 'ngclipboard', 'textAngular',
|
||||
'frapontillo.bootstrap-switch'
|
||||
=======
|
||||
'angular-input-stars', 'users', 'ngclipboard'
|
||||
>>>>>>> 2.20
|
||||
]);//, 'colorpicker.module' @TODO reactivate this module
|
||||
|
||||
@ -8,6 +8,7 @@ angular.module('forms').factory('GetForms', ['$resource', 'FORM_URL',
|
||||
}, {
|
||||
'query' : {
|
||||
method: 'GET',
|
||||
url: '/forms',
|
||||
isArray: true
|
||||
},
|
||||
'get' : {
|
||||
|
||||
@ -8,6 +8,8 @@ angular.module('users').controller('AuthenticationController', ['$scope', '$loca
|
||||
$scope.error = '';
|
||||
$scope.forms = {};
|
||||
|
||||
var statesToIgnore = ['', 'home', 'signin', 'resendVerifyEmail', 'verify', 'signup', 'signup-success', 'forgot', 'reset-invalid', 'reset', 'reset-success'];
|
||||
|
||||
$scope.signin = function() {
|
||||
if($scope.forms && $scope.forms.signinForm.$valid){
|
||||
User.login($scope.credentials).then(
|
||||
@ -15,8 +17,8 @@ angular.module('users').controller('AuthenticationController', ['$scope', '$loca
|
||||
Auth.login(response);
|
||||
$scope.user = $rootScope.user = Auth.ensureHasCurrentUser(User);
|
||||
|
||||
if($state.previous.name !== 'home' && $state.previous.name !== 'verify' && $state.previous.name !== '') {
|
||||
$state.go($state.previous.name);
|
||||
if(statesToIgnore.indexOf($state.previous.state.name) === -1) {
|
||||
$state.go($state.previous.state.name, $state.previous.params);
|
||||
} else {
|
||||
$state.go('listForms');
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ angular.module('users').factory('Auth', ['$window',
|
||||
} else if ($window.user){
|
||||
service._currentUser = $window.user;
|
||||
return service._currentUser;
|
||||
} else{
|
||||
} else {
|
||||
User.getCurrent().then(function(user) {
|
||||
// success
|
||||
service._currentUser = user;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user