fixed socket.io cdn
This commit is contained in:
commit
0e2fe9076a
|
@ -180,8 +180,9 @@ exports.update = function(req, res) {
|
|||
});
|
||||
} else {
|
||||
//Unless we have 'admin' privileges, updating form admin is disabled
|
||||
if(req.user.roles.indexOf('admin') === -1) delete req.body.form.admin;
|
||||
|
||||
if(req.body.form && req.user.roles.indexOf('admin') === -1) {
|
||||
req.body.form.admin = null;
|
||||
}
|
||||
//Do this so we can create duplicate fields
|
||||
var checkForValidId = new RegExp('^[0-9a-fA-F]{24}$');
|
||||
for(var i=0; i<req.body.form.form_fields.length; i++){
|
||||
|
|
|
@ -205,10 +205,11 @@ FormSchema.virtual('analytics.fields').get(function () {
|
|||
var visitors = this.analytics.visitors;
|
||||
var that = this;
|
||||
|
||||
if(this.form_fields.length == 0) return null;
|
||||
for(var i=0; i<this.form_fields.length; i++){
|
||||
var field = this.form_fields[i];
|
||||
|
||||
if(!field.deletePreserved){
|
||||
if(field && !field.deletePreserved){
|
||||
|
||||
var dropoffViews = _.reduce(visitors, function(sum, visitorObj){
|
||||
|
||||
|
@ -293,13 +294,9 @@ FormSchema.pre('save', function (next) {
|
|||
return cb(err);
|
||||
} else {
|
||||
_original = original;
|
||||
//console.log('_original');
|
||||
//console.log(_original);
|
||||
return cb(null);
|
||||
}
|
||||
});
|
||||
}, function(cb) {
|
||||
return cb(null);
|
||||
},
|
||||
function(cb) {
|
||||
var hasIds = true;
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
</script>
|
||||
|
||||
<!--Socket.io Client Dependency-->
|
||||
<script src="https://cdn.socket.io/socket.io-1.4.5.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.js"></script>
|
||||
|
||||
<!--Bower JS dependencies-->
|
||||
{% for bowerJSFile in bowerJSFiles %}
|
||||
|
|
|
@ -42,7 +42,8 @@
|
|||
"mathjs": "^3.4.1",
|
||||
"jsep": "^0.3.1",
|
||||
"ngclipboard": "^1.1.1",
|
||||
"mobile-detect": "^1.3.3"
|
||||
"mobile-detect": "^1.3.3",
|
||||
"socket.io-client": "^1.7.2"
|
||||
},
|
||||
"resolutions": {
|
||||
"angular-bootstrap": "^0.14.0",
|
||||
|
|
6
public/dist/application.js
vendored
6
public/dist/application.js
vendored
File diff suppressed because one or more lines are too long
6
public/dist/application.min.js
vendored
6
public/dist/application.min.js
vendored
File diff suppressed because one or more lines are too long
2
public/dist/form-application.js
vendored
2
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
|
@ -61,7 +61,8 @@ angular.module('forms').directive('editFormDirective', ['$rootScope', 'FormField
|
|||
|
||||
// LOGIC JUMP METHODS
|
||||
$scope.removeLogicJump = function (field_index) {
|
||||
$scope.myform.form_fields[field_index] = {};
|
||||
$scope.myform.form_fields[field_index].logicJump.fieldA = null;
|
||||
$scope.myform.form_fields[field_index].logicJump.valueB = null;
|
||||
};
|
||||
|
||||
$scope.addNewLogicJump = function (field_index) {
|
||||
|
|
Loading…
Reference in a new issue