fixed field formatting

This commit is contained in:
David Baldwynn 2015-11-05 18:02:25 -08:00
parent 065f2a47f6
commit 73948afd85
3 changed files with 41 additions and 43 deletions

View file

@ -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({

View file

@ -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;
// // } // }
// } }
// }; };
/* /*

View file

@ -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" />
&nbsp;<span>Yes</span> &nbsp;<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" />
&nbsp;<span>No</span> &nbsp;<span>No</span>
</label> </label>
</div> </div>