November Happy Hour will be moved to Thursday December 5th.

Advanced Dijit Custom property with sortable list

Vote:
 

I want to create a custom property that manages an array of strings using a drag and drop list.

I have found this tutorial for dnd http://www.sitepen.com/blog/2011/12/05/dojo-drag-n-drop-redux/

but i cannot get it to work in episerver.

Could anyone help me with a working example of a dnd custom property that works with a string array

 

Thanks

#63712
Nov 27, 2012 13:54
Vote:
 

The main problem i have is that if i add a sortable list  to the template (along side the original text area) like so :

        templateString: "<div class=\"dijitInline\">\
                            <div data-dojo-attach-point=\"stateNode, tooltipNode\">\
                                <div data-dojo-attach-point=\"textArea\" data-dojo-type=\"dijit.form.Textarea\" style=\"width: 800px; \"></div>\
                            </div>\
                            <br />\
                            <span>${helptext}</span>\
                           <ol data-dojo-type=\"dojo.dnd.Source\" id=\"wishlistNode\" class=\"container\">\
                               <li class=\"dojoDndItem\">Wrist watch</li>\
                               <li class=\"dojoDndItem\">Life jacket</li>\
                               <li class=\"dojoDndItem\">Toy bulldozer</li>\
                               <li class=\"dojoDndItem\" >Vintage microphone</li>\
                               <li class=\"dojoDndItem\">TIE fighter</li>\
                           </ol>\
                        </div>",

 

then i cannot reference this node from either postCreate() or startup()

   postCreate: function () {
            // call base implementation
            this.inherited(arguments);
            
            var catalog = new Source("wishlistNode");

 

#63715
Nov 27, 2012 14:46
Vote:
 

also if i try and access this.containerNode , i get a null

#63716
Nov 27, 2012 14:59
Vote:
 

adding data-dojo-attach-point=\"containerNode\" gave me access to the containerNode :)

#63718
Nov 27, 2012 15:06
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.