fixed form field dragging bug
This commit is contained in:
parent
f8f934f7b0
commit
e6232e467f
|
@ -317,6 +317,7 @@ div.config-form .row.field {
|
||||||
|
|
||||||
.admin-form .panel-heading {
|
.admin-form .panel-heading {
|
||||||
background-color: #f1f1f1;
|
background-color: #f1f1f1;
|
||||||
|
position: relative!important;
|
||||||
}
|
}
|
||||||
.admin-form .panel-heading:hover {
|
.admin-form .panel-heading:hover {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|
|
@ -16,6 +16,14 @@ angular.module('forms').directive('editFormDirective', ['$rootScope', 'FormField
|
||||||
/*
|
/*
|
||||||
** Initialize scope with variables
|
** Initialize scope with variables
|
||||||
*/
|
*/
|
||||||
|
//Setup UI-Sortable
|
||||||
|
$scope.sortableOptions = {
|
||||||
|
appendTo: '.dropzone',
|
||||||
|
cursorAt: { top: -160 }
|
||||||
|
};
|
||||||
|
|
||||||
|
console.log($scope.sortableOptions);
|
||||||
|
|
||||||
//Populate AddField with all available form field types
|
//Populate AddField with all available form field types
|
||||||
$scope.addField = {};
|
$scope.addField = {};
|
||||||
$scope.addField.types = FormFields.types;
|
$scope.addField.types = FormFields.types;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<div class="row add-field-title">
|
<div class="row add-field-title">
|
||||||
<h3 class="col-md-12 hidden-sm hidden-xs">Click to Add New Field</h3>
|
<h3 class="col-md-12 hidden-sm hidden-xs">Click to Add New Field</h3>
|
||||||
<h4 class="col-sm-12 hidden-xs hidden-md hidden-lg">Add New Field</h5>
|
<h4 class="col-sm-12 hidden-xs hidden-md hidden-lg">Add New Field</h4>
|
||||||
<h5 class="col-sm-12 hidden-sm hidden-md hidden-lg">Add Field</h5>
|
<h5 class="col-sm-12 hidden-sm hidden-md hidden-lg">Add Field</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-group row" class="draggable" ng-model="addField.types">
|
<div class="panel-group row" class="draggable" ng-model="addField.types">
|
||||||
|
@ -163,10 +163,17 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-md-8 dropzoneContainer">
|
<div class="col-sm-12 col-md-8 dropzoneContainer">
|
||||||
<accordion close-others="accordion.oneAtATime" ui-sortable="dropzone" ng-model="myform.form_fields" class="dropzone">
|
|
||||||
|
|
||||||
<accordion-group data-ng-repeat="field in myform.form_fields track by field._id" is-open="accordion[$index].isOpen" on-finish-render="editFormFields" ng-if="!field.deletePreserved">
|
<accordion close-others="accordion.oneAtATime"
|
||||||
|
ui-floating="true"
|
||||||
|
ui-sortable="sortableOptions"
|
||||||
|
ng-model="myform.form_fields"
|
||||||
|
class="dropzone">
|
||||||
|
|
||||||
|
<accordion-group data-ng-repeat="field in myform.form_fields track by field._id"
|
||||||
|
is-open="accordion[$index].isOpen"
|
||||||
|
on-finish-render="editFormFields"
|
||||||
|
ng-if="!field.deletePreserved">
|
||||||
<accordion-heading>
|
<accordion-heading>
|
||||||
|
|
||||||
<div class="handle">
|
<div class="handle">
|
||||||
|
|
Loading…
Reference in a new issue