Tree Travel Guide
This commit is contained in:
parent
a1ca534f55
commit
1f340e96fa
78 changed files with 4133 additions and 1027 deletions
|
|
@ -97,4 +97,106 @@
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
/* Custom drag handle */
|
||||
|
||||
.dd-custom-drag-handle .dd-handle {
|
||||
border: 0;
|
||||
float: left;
|
||||
margin: 1px;
|
||||
font-size: 0.9rem;
|
||||
line-height: 1.25rem;
|
||||
}
|
||||
.dd-custom-drag-handle .dd-handle>* {
|
||||
vertical-align: middle;
|
||||
}
|
||||
[dir=rtl] .dd-custom-drag-handle .dd-handle {
|
||||
float: right;
|
||||
}
|
||||
.dd-item > button:before {
|
||||
content: '\f284';
|
||||
|
||||
}
|
||||
.dd-item > button[data-action="collapse"]:before {
|
||||
content: '\f280';
|
||||
}
|
||||
.dd-item > button {
|
||||
display: inline-block;
|
||||
font-size: 1.4rem;
|
||||
text-transform: none;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-variant: normal;
|
||||
font-family: "Ionicons";
|
||||
line-height: 1;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
speak: none;
|
||||
text-rendering: auto
|
||||
}
|
||||
.alert ul {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.dragula-example {
|
||||
margin-bottom: 6px;
|
||||
border: 1px dotted #d6d6d6;
|
||||
}
|
||||
|
||||
.sortable-example {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.sortable-example li {
|
||||
padding: 6px 10px;
|
||||
margin-bottom: 8px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.sortable-example-inline li {
|
||||
margin-right: 8px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
[dir=rtl] .sortable-example-inline li {
|
||||
margin-right: 0;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
#sortable-3 {
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
#sortable-3 img {
|
||||
margin-right: 8px;
|
||||
margin-bottom: 8px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 999px;
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
border-bottom: 1px solid rgba(115, 113, 150, 0.50);
|
||||
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid rgba(115, 113, 150, 0.50);
|
||||
|
||||
}
|
||||
.modal-footer {
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid rgba(115, 113, 150, 0.50);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.default-style .messages-sidebox.large {
|
||||
-ms-flex-preferred-size: 23rem;
|
||||
flex-basis: 23rem;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,129 @@
|
|||
// Nestable
|
||||
$('.iq-save-bar').closest('form').find(':input, select, textarea').change(function() {
|
||||
showIqSaveBar($(this).closest('form'));
|
||||
});
|
||||
|
||||
$('.iq-save-bar').closest('form').find(':input, select, textarea').keydown(function() {
|
||||
showIqSaveBar($(this).closest('form'));
|
||||
});
|
||||
|
||||
|
||||
function showIqSaveBar(form){
|
||||
if(!$(form).data('save-bar')){
|
||||
$(form).find('.iq-save-bar').show(300);
|
||||
$(form).data('save-bar', 1)
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
if($('#netstable-content-tree').length){
|
||||
|
||||
function updateNetstableOutput(e) {
|
||||
|
||||
var list = e.length ? e : $(e.target);
|
||||
var output = list.data('output');
|
||||
|
||||
output.val(window.JSON ? window.JSON.stringify(list.nestable('serialize')) :
|
||||
'JSON browser support required for this demo.');
|
||||
};
|
||||
|
||||
$('#netstable-content-tree').nestable();
|
||||
|
||||
$('#netstable-content-tree').nestable().on('change', function(){
|
||||
showIqSaveBar($('#netstable-content-tree').closest('form'));
|
||||
updateNetstableOutput($('#netstable-content-tree'));
|
||||
});
|
||||
|
||||
// output initial serialised data
|
||||
updateNetstableOutput($('#netstable-content-tree').data('output', $('#nestable-output')));
|
||||
|
||||
$('#nestable-menu-collapse').on('click', function(e) {
|
||||
$('.dd').nestable('collapseAll');
|
||||
});
|
||||
$('#nestable-menu-expand').on('click', function(e) {
|
||||
$('.dd').nestable('expandAll');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(function() {
|
||||
// Drag handle
|
||||
dragula([$('#dragula-drag-handles')[0]], {
|
||||
moves: function (el, container, handle) {
|
||||
showIqSaveBar(el.closest('form'));
|
||||
return handle.classList.contains('handle');
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$(function () {
|
||||
// $('.selectpicker').selectpicker();
|
||||
// $('[data-toggle="tooltip"]').tooltip();
|
||||
function initModalInner() {
|
||||
$('[data-toggle="reloadModal"]').off().on('click', function(event) {
|
||||
event.preventDefault();
|
||||
button = $(this);
|
||||
var data = {};
|
||||
data.id = button.data('id');
|
||||
data.model = button.data('model');
|
||||
data.action = button.data('action');
|
||||
data.request = button.data('request');
|
||||
data.route = button.data('route');
|
||||
data.target = button.data('target');
|
||||
console.log(data);
|
||||
loadModalInner(this, data);
|
||||
});
|
||||
|
||||
}
|
||||
function loadModalInner(self, data){
|
||||
|
||||
var url = data.route,
|
||||
contentType = 'application/x-www-form-urlencoded; charset=UTF-8';
|
||||
$.ajax({
|
||||
url: url,
|
||||
data: data,
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
cache: false,
|
||||
contentType: contentType,
|
||||
encode: true,
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
success: function(data) {
|
||||
console.log(data);
|
||||
$(data.response.target).find('.modal-dialog').html(data.html);
|
||||
$('.selectpicker').selectpicker('refresh');
|
||||
initModalInner();
|
||||
},
|
||||
error: function(xhr, status, errorThrown) {
|
||||
console.log(xhr);
|
||||
console.log(xhr.responseText);
|
||||
console.log(errorThrown);
|
||||
console.log("Sorry, there was a problem!");
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$('#modals-load-content').on('show.bs.modal', function (event) {
|
||||
var button = $(event.relatedTarget);
|
||||
if (!button.data('id')) {
|
||||
return;
|
||||
}
|
||||
var data = {};
|
||||
data.id = button.data('id');
|
||||
data.model = button.data('model');
|
||||
data.action = button.data('action');
|
||||
data.request = button.data('request');
|
||||
data.route = button.data('route');
|
||||
data.target = button.data('target');
|
||||
console.log(data);
|
||||
loadModalInner(this, data);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
function update_modal_data_show(e, $ele) {
|
||||
|
|
@ -115,171 +238,3 @@ $(function() {
|
|||
|
||||
});
|
||||
});
|
||||
/*
|
||||
$(function() {
|
||||
$('.select2-main').each(function() {
|
||||
$(this)
|
||||
.wrap('<div class="position-relative"></div>')
|
||||
.select2({
|
||||
placeholder: 'Bitte wählen',
|
||||
dropdownParent: $(this).parent(),
|
||||
});
|
||||
})
|
||||
$('.select2-sub').each(function() {
|
||||
$(this)
|
||||
.wrap('<div class="position-relative"></div>')
|
||||
.select2({
|
||||
placeholder: 'Bitte wählen',
|
||||
dropdownParent: $(this).parent(),
|
||||
closeOnSelect: false
|
||||
});
|
||||
})
|
||||
});
|
||||
*/
|
||||
/*
|
||||
jQuery(document).ready(function() {
|
||||
|
||||
$('.main-branch').on('change', function () {
|
||||
|
||||
target = $(this).data('target');
|
||||
if ($(this).is(':checked')) {
|
||||
$(target).stop().show('slow');
|
||||
} else {
|
||||
$(target).stop().hide('slow');
|
||||
$(target).find('.custom-control-input').prop('checked', false);
|
||||
}
|
||||
});
|
||||
|
||||
var $form = $('#lead-form-validation');
|
||||
if($form.find('#company_country_id').length){
|
||||
$form.find('#company_country_id').on('change', function(){
|
||||
$form.find('#company_pre_phone_id').val($(this).val());
|
||||
$form.find('#company_pre_phone_id').selectpicker('refresh');
|
||||
});
|
||||
}
|
||||
|
||||
if($form.find('#country_id').length){
|
||||
$form.find('#country_id').on('change', function(){
|
||||
$form.find('#pre_phone_id').val($(this).val());
|
||||
$form.find('#pre_phone_id').selectpicker('refresh');
|
||||
|
||||
$form.find('#pre_mobil_id').val($(this).val());
|
||||
$form.find('#pre_mobil_id').selectpicker('refresh');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
*/
|
||||
|
||||
/*
|
||||
function trigger_company($ele, $speed){
|
||||
if($ele.val() == 1){
|
||||
$('.show_company_holder').show($speed);
|
||||
$('.show_company_holder').find('#company_name').prop('required', true);
|
||||
$('.show_company_holder').find('#company_country_id').prop('required', true);
|
||||
|
||||
}else{
|
||||
$('.show_company_holder').hide($speed);
|
||||
$('.show_company_holder').find('#company_name').prop('required', false);
|
||||
$('.show_company_holder').find('#company_country_id').prop('required', false);
|
||||
}
|
||||
}
|
||||
|
||||
$( document ).ready(function() {
|
||||
|
||||
// With validation
|
||||
var $form = $('#lead-form-validation');
|
||||
$form.find('#company').on('change', function () {
|
||||
trigger_company($(this), 'slow');
|
||||
});
|
||||
|
||||
trigger_company($form.find('#company'), 0);
|
||||
|
||||
// Set up validator
|
||||
$form.validate({
|
||||
rules: {
|
||||
'email': {
|
||||
required: true,
|
||||
email: true,
|
||||
remote:
|
||||
{
|
||||
url: "{{ route('user_check_mail') }}",
|
||||
type: "post",
|
||||
data:
|
||||
{
|
||||
user_id: function()
|
||||
{
|
||||
return $('#lead-form-validation :input[name="user_id"]').val();
|
||||
},
|
||||
email: function()
|
||||
{
|
||||
return $('#lead-form-validation :input[name="email"]').val();
|
||||
}
|
||||
},
|
||||
encode: true,
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
}
|
||||
},
|
||||
'email-confirm': {
|
||||
required: true,
|
||||
equalTo: "#email"
|
||||
},
|
||||
'accepted_data_protection': {
|
||||
required: true
|
||||
},
|
||||
},
|
||||
errorPlacement: function errorPlacement(error, element) {
|
||||
$(element).parents('.form-group').append(
|
||||
error.addClass('invalid-feedback small d-block')
|
||||
)
|
||||
},
|
||||
highlight: function (element) {
|
||||
if ($(element).hasClass('selectpicker')) {
|
||||
$(element).parent().addClass('is-invalid');
|
||||
}
|
||||
$(element).addClass('is-invalid');
|
||||
},
|
||||
unhighlight: function (element) {
|
||||
$(element).removeClass('is-invalid');
|
||||
$(element).parents('.form-group').find('.is-invalid').removeClass('is-invalid');
|
||||
},
|
||||
messages : {
|
||||
required: "{{__('This field is required.')}}",
|
||||
company_country_id : {
|
||||
required: "{{__('This field is required.')}}",
|
||||
},
|
||||
accepted_data_protection : {
|
||||
required: "{{__('This field is required.')}}",
|
||||
},
|
||||
salutation : {
|
||||
required: "{{__('This field is required.')}}",
|
||||
},
|
||||
company_name : {
|
||||
required: "{{__('This field is required.')}}",
|
||||
},
|
||||
last_name : {
|
||||
required: "{{__('This field is required.')}}",
|
||||
},
|
||||
equalTo : "{{__('Please enter the same value again.')}}",
|
||||
'email-confirm' : {
|
||||
equalTo : "{{__('Please enter the same value again.')}}",
|
||||
required: "{{__('This field is required.')}}",
|
||||
},
|
||||
email: {
|
||||
required : "{{__('This field is required.')}}",
|
||||
email: "{{ __('Please enter a valid email address.') }}",
|
||||
remote : "{{ __('This E-mail is already in use.') }}"
|
||||
},
|
||||
},
|
||||
onkeyup: false
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue