Browse Source

possible fix for RP for forms

pull/99/head
KodeStar 7 years ago
parent
commit
3369de9660
  1. 33
      public/js/app.js
  2. 33
      resources/assets/js/app.js
  3. 4
      vendor/laravelcollective/html/src/FormBuilder.php

33
public/js/app.js

@ -61,6 +61,22 @@ $.when( $.ready ).then(function() {
$("#upload").change(function() {
readURL(this);
});
/*$(".droppable").droppable({
tolerance: "intersect",
drop: function( event, ui ) {
var tag = $( this ).data('id');
var item = $( ui.draggable ).data('id');
$.get('tag/add/'+tag+'/'+item, function(data) {
if(data == 1) {
$( ui.draggable ).remove();
} else {
alert('not added');
}
});
}
});*/
$( "#sortable" ).sortable({
stop: function (event, ui) {
@ -76,23 +92,6 @@ $.when( $.ready ).then(function() {
});
$("#sortable").sortable("disable");
$(".droppable").droppable({
tolerance: "pointer",
greedy: true,
drop: function( event, ui ) {
var tag = $( this ).data('id');
var item = $( ui.draggable ).data('id');
$.get('tag/add/'+tag+'/'+item, function(data) {
if(data == 1) {
$( ui.draggable ).remove();
} else {
//alert('not added');
}
});
}
});
$('#app').on('click', '#config-button', function(e) {

33
resources/assets/js/app.js

@ -52,6 +52,22 @@ $.when( $.ready ).then(function() {
$("#upload").change(function() {
readURL(this);
});
/*$(".droppable").droppable({
tolerance: "intersect",
drop: function( event, ui ) {
var tag = $( this ).data('id');
var item = $( ui.draggable ).data('id');
$.get('tag/add/'+tag+'/'+item, function(data) {
if(data == 1) {
$( ui.draggable ).remove();
} else {
alert('not added');
}
});
}
});*/
$( "#sortable" ).sortable({
stop: function (event, ui) {
@ -67,23 +83,6 @@ $.when( $.ready ).then(function() {
});
$("#sortable").sortable("disable");
$(".droppable").droppable({
tolerance: "pointer",
greedy: true,
drop: function( event, ui ) {
var tag = $( this ).data('id');
var item = $( ui.draggable ).data('id');
$.get('tag/add/'+tag+'/'+item, function(data) {
if(data == 1) {
$( ui.draggable ).remove();
} else {
//alert('not added');
}
});
}
});
$('#app').on('click', '#config-button', function(e) {

4
vendor/laravelcollective/html/src/FormBuilder.php

@ -1055,10 +1055,10 @@ class FormBuilder
protected function getRouteAction($options)
{
if (is_array($options)) {
return $this->url->route($options[0], array_slice($options, 1));
return $this->url->route($options[0], array_slice($options, 1), false);
}
return $this->url->route($options);
return $this->url->route($options, [], false);
}
/**

Loading…
Cancel
Save