My favorites | Sign in
Project Home Downloads
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 494: I am unable to use dynatree in js files, works fine in php files
  Back to list
Status:  Invalid
Owner:  ----
Closed:  Feb 2015


 
Reported by khurram....@gmail.com, Jan 23, 2015
var jsoncat =  jsoncat.replace(/\%/g,'"').trim();
		var jsoncat =  '{"data":['+JSON.stringify(jsoncat)+']}';
		var jsonObj =  JSON.parse(jsoncat);
		cWindowShow('jax.call("community","admin,groups,ajaxEditGroup", ' + groupId + ');', 'Editing Group' , 550 , 450);
		var delay=1000;//1 seconds
		alert(typeof(jsonObj));
		alert(jsonObj.data);    
    	setTimeout(function(){
			var treeData = [jsonObj.data];
				// --- Initialize sample trees
				jQuery('#tree1').dynatree({
					checkbox: true,
					// Override class name for checkbox icon:
					classNames: {checkbox: "dynatree-radio"},
					selectMode: 3,
					children: treeData,
					onActivate: function(node) {
						jQuery('#echoActive1').text(node.data.key);
					},
					onSelect: function(select, node) {
						// Display list of selected nodes
						jQuery("#categoryid").val(node.data.key);
					},
					onDblClick: function(node, event) {
						node.toggleSelect();
					},
					onKeydown: function(node, event) {
						if( event.which == 32 ) {
							node.toggleSelect();
							return false;
						}
					},

				});	
			},delay);

this is my code.
Thank You!
Feb 11, 2015
Project Member #1 moo...@wwwendt.de
This is not enough information to reproduce or analyze a problem, sorry.
Please give details, add a stack trace or set up a jsFiddle,
thanks
Status: Invalid

Powered by Google Project Hosting