Mix Ember model values by Jquery plugin Nestable


#1

Hi, everyone

Need your professional help

I have Ember model, which builds DOM. I also have Nestable (jQuery plugin --> http://dbushell.github.io/Nestable/ ), which mix DOM.

When elements are moved, this plugin generates JSON with ID, which map on ID model.

After drag- n drop, i need mix Ember model values ​by ID from plugin’s JSON.

Is there a method in Ember to do it? I’ve researched a lot but couldn’t find for now. Have you met such cases to share your experience?

I would appreciate your help.


#2

It’d be easier to help you if you posted some code. Any chance to see the model?


#5

App.Listtests = DS.Model.extend( App.CommonfieldsMixin, {

list: DS.attr('array'),
title: DS.attr('string')

});

App.Listtests.FIXTURES = [

{ id: 2, title: 'Number Two' },
{ id: 1, title: 'Number One' },
{ id: 19, title: 'Number Three' , children: [
    { id: 4, title: 'Number Four' },
    { id: 5, title: 'Number Five', children: [
        { id: 6, title: 'Number Six' }
    ]}
]}

];