From 35085248b6d374cec412016b80f06c512a303789 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 16 Feb 2018 15:15:22 +0000 Subject: [PATCH] some changes to test droppable --- public/js/app.js | 11 +++++++++++ public/mix-manifest.json | 4 ++-- resources/assets/js/app.js | 11 +++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/public/js/app.js b/public/js/app.js index f5536c0c..47bc0b6b 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -59,6 +59,17 @@ $.when( $.ready ).then(function() { }); $("#sortable").sortable("disable"); + $(".item-container").droppable({ + tolerance: "pointer", + drop: function( event, ui ) { + alert($( this ).data('id')); + alert($( ui.draggable ).data('id')); + $( this ) + .addClass( "ui-state-highlight" ) + + } + }); + $('#app').on('click', '#config-button', function(e) { e.preventDefault(); diff --git a/public/mix-manifest.json b/public/mix-manifest.json index a43efc77..64e04fe6 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,4 +1,4 @@ { - "/css/app.css": "/css/app.css?id=a571eeda02c71a01f251", - "/js/app.js": "/js/app.js?id=b38be2e595ece6fcef81" + "/css/app.css": "/css/app.css?id=8ecb24c3817ea7885f13", + "/js/app.js": "/js/app.js?id=8dfc323d4d8919d6f3bf" } \ No newline at end of file diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index 3263a88f..61f95bde 100644 --- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -50,6 +50,17 @@ $.when( $.ready ).then(function() { }); $("#sortable").sortable("disable"); + $(".item-container").droppable({ + tolerance: "pointer", + drop: function( event, ui ) { + alert($( this ).data('id')); + alert($( ui.draggable ).data('id')); + $( this ) + .addClass( "ui-state-highlight" ) + + } + }); + $('#app').on('click', '#config-button', function(e) { e.preventDefault();