fixed dragging bug

This commit is contained in:
David Baldwynn 2016-07-05 16:21:45 -07:00
parent 65eddbc8b8
commit 4aa7cd7d62
8 changed files with 29 additions and 41 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -42,9 +42,10 @@ angular.module('forms').config(['$translateProvider', function ($translateProvid
ADD_FIELD_LG: 'Click to Add New Field',
ADD_FIELD_MD: 'Add New Field',
ADD_FIELD_SM: 'Add Field',
PREVIEW_START_PAGE: 'Preview Start Page',
EDIT_START_PAGE: 'Edit Start Page',
INTRO_TTILE: 'Intro Title',
PREVIEW_START_PAGE: 'Preview Welcome Screen',
EDIT_START_PAGE: 'Edit Welcome Screen',
WELCOME_SCREEN: 'Welcome Screen',
INTRO_TITLE: 'Intro Title',
INTRO_PARAGRAPH: 'Intro Paragraph',
INTRO_BTN: 'Intro Button',
BUTTONS: 'Buttons',

View file

@ -21,7 +21,6 @@ angular.module('forms').directive('editFormDirective', ['$rootScope', 'FormField
//Setup UI-Sortable
$scope.sortableOptions = {
appendTo: '.dropzone',
cursorAt: { top: -155 },
forceHelperSize: true,
forcePlaceholderSize: true
};

View file

@ -27,7 +27,7 @@
</div>
</script>
<div class="page-header row" style="padding-bottom: 0px;">
<div class="page-header row-fluid" style="padding-bottom: 1em;">
<div class="col-xs-10 col-sm-8">
<h1 class="hidden-sm hidden-xs" data-ng-bind="myform.title" style="margin-bottom: 0px;"></h1>
<h2 class="hidden-md hidden-lg" data-ng-bind="myform.title" style="margin-bottom: 0px;"></h2>
@ -63,7 +63,7 @@
</div>
</div>
<div class="row">
<div class="row-fluid">
<div class="col-xs-12">
<!-- <tabset> -->
<tabs data="tabData"></tabs>

View file

@ -1,17 +1,18 @@
<form class="row container" name="editForm" auto-save-form auto-save-watch="myform" auto-save-callback="update">
<div class="col-xs-2 col-sm-4 col-md-5 add-field">
<!-- Add Fields Element -->
<div class="col-xs-2 col-sm-4 col-md-4 add-field">
<div class="row add-field-title">
<h3 class="col-md-12 hidden-sm hidden-xs">{{ 'ADD_FIELD_LG' | translate }}</h3>
<h4 class="col-sm-12 hidden-xs hidden-md hidden-lg">{{ 'ADD_FIELD_MD' | translate }}</h4>
<h5 class="col-sm-12 hidden-sm hidden-md hidden-lg">{{ 'ADD_FIELD_SM' | translate }}</h5>
<h5 class="col-xs-12 hidden-sm hidden-md hidden-lg">{{ 'ADD_FIELD_SM' | translate }}</h5>
</div>
<div class="panel-group row" class="draggable" ng-model="addField.types">
<div class="col-xs-12 col-sm-12 col-md-6" ng-repeat="type in addField.types" style="padding-top:7.5px;">
<div class="panel panel-default" style="background-color:#f5f5f5;">
<div class="panel-heading" ng-click="addNewField(true, type.name)" style="cursor: pointer; font-size:14px;">
<div class="panel-heading" ng-click="addNewField(true, type.name)" style="cursor: pointer; font-size:12px; padding-left: 10px; padding-right: 10px;">
<span>
<field-icon-directive type-name="{{type.name}}">
</field-icon-directive>
@ -24,13 +25,15 @@
</div>
</div>
<div class="col-xs-10 col-sm-8 col-md-7 current-fields container">
<!-- Current Fields Element -->
<div class="col-xs-10 col-sm-8 current-fields container">
<!-- Welcome Screen -->
<div class="row">
<div class="col-sm-12 col-md-10">
<div class="col-sm-12">
<div class="panel panel-default startPage">
<div class="panel-heading accordion-toggle collapsed" data-toggle="collapse" data-target="#collapseStart">
<h4 class="text-center">
Start Page
{{ 'WELCOME_SCREEN' | translate }}
<span class="pull-right">
<i class="fa fa-chevron-right" ng-hide="startPage.isOpen">
</i>
@ -47,7 +50,7 @@
<div class="col-md-12">
<h4>{{ 'PREVIEW_START_PAGE' | translate }}</h4>
</div>
<ul class="col-md-12 container" style="list-style:none;border:2px lightgray solid;">
<ul class="col-md-12 container" style="list-style:none; border:2px lightgray solid; padding-bottom: 2em;">
<div class="field row">
<div class="col-xs-12 text-center" style="overflow-wrap: break-word;">
@ -67,13 +70,13 @@
</p>
</div>
<div class="row form-actions">
<button ng-click="exitStartPage()" class="btn btn-info btn btn-info col-md-6 col-md-offset-3 col-lg-6 col-lg-offset-3" type="button">
<button class="btn btn-info btn btn-info col-md-6 col-md-offset-3 col-lg-6 col-lg-offset-3" type="button">
<span style="color:white; font-size: 1.6em; text-decoration: none;">
{{myform.startPage.introButtonText}}
</span>
</button>
</div>
</ul>
</ul>
</div>
<div class="row">
@ -159,10 +162,12 @@
</div>
</div>
<div class="row">
<div class="col-sm-12 col-md-10"><hr></div>
<div class="col-sm-12"><hr></div>
</div>
<!-- Form Fields -->
<div class="row">
<div class="col-sm-12 col-md-8 dropzoneContainer">
<div class="col-sm-12 col-md-10 dropzoneContainer">
<accordion close-others="accordion.oneAtATime"
ui-sortable="sortableOptions"
@ -318,7 +323,6 @@
<hr>
</accordion>
</div>
<div class="col-md-1 hidden-xs hidden-sm" style="padding:0 5px;" >
<div class="panel-group tool-panel text-center">
<div class="panel panel-default" ng-repeat="field in myform.form_fields track by field._id" ng-if="!field.deletePreserved">
@ -341,23 +345,7 @@
</div>
</div>
</div>
<div class="col-md-2 hidden-xs hidden-sm" style="padding:0 5px;" ng-if="myform.plugins.oscarhost.baseUrl">
<div class="panel-group text-center">
<div class="panel panel-default" ng-repeat="field in myform.form_fields track by $index" ng-if="!field.deletePreserved" style="border: none;">
<select ng-model="myform.plugins.oscarhost.settings.fieldMap[field._id]" style="height:39.2px">
<option value="">N/A</option>
<option ng-repeat="oscarhost_field in oscarFieldsLeft(field._id)"
ng-selected="oscarhost_field == myform.plugins.oscarhost.settings.fieldMap[field._id]"
ng-value="oscarhost_field">
{{oscarhost_field}}
</option>
</select>
</div>
</div>
</div>
</div>
</div>
</div>
</form>