Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cards drag&drop

FlammiferMar 15 2019 — edited Jun 25 2019

Hi,

I made few own attempts but I'm missing details. Would like to have cards as drag and drop between regions, for example one being In Progress, second Completed, third Cancelled, and when moving in categories have ticket status change (then AJAX comes into play).

I found examples for drag and drop in APEX, but not using Cards.

On page load:

$( function() {

   

    $("#inprog").sortable({

     revert:true,

      beforeStop: function (event, ui) {

          newItem = ui.item;

      },

      receive: function(event,ui) {

          $(newItem).attr("class",".t-Cards-item");    

      }

});

    $( "#active li.t-Cards-item" ).draggable({

       

        connectToSortable: "#inprog",

         "revert": "invalid"}

);

  } );

$('#inprog').droppable({

    accept: "#active li.t-Cards-item",

    drop: function(event, ui) {

        console.log("dropped");

    }

});

with example of two regions. 1st, not sure about draggable containment, and second thing - when dragging and dropping the ticket loses style. Which I tried solving with connectToSortable, but doesn't help. Using t-Cards-item as selector could be incorrect too. So I'm still not at the point to write update logic for card status, the action of drag and drop.

Also, in each region representing card status category, I would like to have cards stocked all under one column. Attributes have setting for 2 as minimum.


Can someone provide better examples or ideas?

Thanks

Comments
Post Details
Added on Mar 15 2019
7 comments
2,532 views