fixed field formatting
This commit is contained in:
parent
065f2a47f6
commit
73948afd85
|
@ -10,8 +10,6 @@ angular.module('forms').controller('AdminFormController', ['$rootScope', '$scope
|
||||||
$rootScope.saveInProgress = false;
|
$rootScope.saveInProgress = false;
|
||||||
CurrentForm.setForm($scope.myform);
|
CurrentForm.setForm($scope.myform);
|
||||||
|
|
||||||
// console.log($scope.myform);
|
|
||||||
|
|
||||||
// Find a specific Form
|
// Find a specific Form
|
||||||
$scope.findOne = function(){
|
$scope.findOne = function(){
|
||||||
Forms.get({
|
Forms.get({
|
||||||
|
|
|
@ -61,49 +61,49 @@ angular.module('forms').directive('editFormDirective', ['$rootScope', '$q', '$ht
|
||||||
handle: ' .handle'
|
handle: ' .handle'
|
||||||
};
|
};
|
||||||
|
|
||||||
// $scope.draggable = {
|
$scope.draggable = {
|
||||||
// connectWith: ".dropzone",
|
connectWith: ".dropzone",
|
||||||
// start: function (e, ui) {
|
start: function (e, ui) {
|
||||||
// // $scope.$apply(function() {
|
// $scope.$apply(function() {
|
||||||
// // $scope.dragging = true
|
// $scope.dragging = true
|
||||||
// // });
|
// });
|
||||||
// $('.dropzone').sortable('refresh');
|
$('.dropzone').sortable('refresh');
|
||||||
// },
|
},
|
||||||
// update: function (e, ui) {
|
update: function (e, ui) {
|
||||||
// var isInDropzone = $(e.target).parentsUntil('.panel-group').hasClass('dropzone');
|
var isInDropzone = $(e.target).parentsUntil('.panel-group').hasClass('dropzone');
|
||||||
|
|
||||||
// console.log('isInDropzone: '+isInDropzone);
|
console.log('isInDropzone: '+isInDropzone);
|
||||||
// //Disable drag and drop if we aren't in dropzone
|
//Disable drag and drop if we aren't in dropzone
|
||||||
// if(!isInDropzone){
|
if(!isInDropzone){
|
||||||
// ui.item.sortable.cancel();
|
ui.item.sortable.cancel();
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
// stop: function (e, ui) {
|
stop: function (e, ui) {
|
||||||
// var isInDropzone = $(e.target).parentsUntil('.panel-group').hasClass('dropzone');
|
var isInDropzone = $(e.target).parentsUntil('.panel-group').hasClass('dropzone');
|
||||||
|
|
||||||
// //Disable drag and drop if we aren't in dropzone
|
//Disable drag and drop if we aren't in dropzone
|
||||||
// if(isInDropzone){
|
if(isInDropzone){
|
||||||
// console.log($(e.target));
|
console.log($(e.target));
|
||||||
// }
|
}
|
||||||
|
|
||||||
// // if (ui.item.sortable.droptarget === undefined) {
|
// if (ui.item.sortable.droptarget === undefined) {
|
||||||
// // $scope.$apply($scope.dragging = false);
|
// $scope.$apply($scope.dragging = false);
|
||||||
// // return;
|
// return;
|
||||||
// // }else if (ui.item.sortable.droptarget[0].classList[0] === "dropzone") {
|
// }else if (ui.item.sortable.droptarget[0].classList[0] === "dropzone") {
|
||||||
// // // run code when item is dropped in the dropzone
|
// // run code when item is dropped in the dropzone
|
||||||
// // $scope.$apply($scope.dragging = false);
|
// $scope.$apply($scope.dragging = false);
|
||||||
// // }else{
|
// }else{
|
||||||
// // // $scope.$apply($scope.dragging = false);
|
// // $scope.$apply($scope.dragging = false);
|
||||||
// // }
|
// }
|
||||||
// // console.log('has class .dropzone :'+);
|
// console.log('has class .dropzone :'+);
|
||||||
// // if ($(e.target).hasClass('dropzone') && ui.item.sortable.droptarget && e.target != ui.item.sortable.droptarget[0] ) {
|
// if ($(e.target).hasClass('dropzone') && ui.item.sortable.droptarget && e.target != ui.item.sortable.droptarget[0] ) {
|
||||||
// // // restore original types
|
// // restore original types
|
||||||
// // $scope.addField.types = FormFields.types;
|
// $scope.addField.types = FormFields.types;
|
||||||
// // }
|
// }
|
||||||
|
|
||||||
|
|
||||||
// }
|
}
|
||||||
// };
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -285,17 +285,17 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row field">
|
<div class="row field">
|
||||||
<div class="field-title col-sm-6">
|
<div class="field-title col-sm-6">
|
||||||
<h5>Hide Form Footer?</h5>
|
<h5>Display Form Footer?</h5>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field-input col-sm-6">
|
<div class="field-input col-sm-6">
|
||||||
<label>
|
<label>
|
||||||
<input type="radio" data-ng-value="true" ng-model="myform.hideFooter" ng-required="true" />
|
<input type="radio" data-ng-value="false" ng-model="myform.hideFooter" ng-required="true" />
|
||||||
<span>Yes</span>
|
<span>Yes</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
<input type="radio" data-ng-value="false" ng-model="myform.hideFooter" ng-required="true" />
|
<input type="radio" data-ng-value="true" ng-model="myform.hideFooter" ng-required="true" />
|
||||||
<span>No</span>
|
<span>No</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue