ultimix
jquery.jstree.extractor.js
Go to the documentation of this file.
1 
6 if( !ultimix )
7 {
8  ultimix = {};
9 }
10 
16 if( !ultimix.jstree )
17 {
18  ultimix.jstree = {};
19 }
20 
32 ultimix.jstree.ExtractJSTreeNode = function( AcceptorSelector , StatusSelector )
33 {
34  var Tree = jQuery.jstree._focused();
35  var Node = Tree.get_selected();
36 
37  if( Node.length )
38  {
39  var id = jQuery( Node ).attr( 'id' );
40  id = id.replace( 'phtml_' , '' );
41 
42  jQuery( AcceptorSelector ).attr( 'value' , id );
43  jQuery( StatusSelector ).attr( 'value' , Tree.get_text( Node ) );
44 
45  return( true );
46  }
47  else
48  {
49  ultimix.std_dialogs.MessageBox(
50  ultimix.get_string( 'nothing_was_selected' ) , ultimix.get_string( 'Error' ) ,
51  ultimix.std_dialogs.MB_OK | ultimix.std_dialogs.MB_ICONERROR
52  );
53  }
54  return( false );
55 }