26 if( EntityName !=
'' )
28 document.getElementById( FirstPanel ).removeChild( document.getElementById( EntityName +
'_hidden_id' ) );
29 document.getElementById( FirstPanel ).removeChild( document.getElementById( EntityName +
'_div_id_first' ) );
30 document.getElementById( SecondPanel ).innerHTML +=
"<div onclick=\"javascript:SecondToFirst( '" + FirstPanel +
31 "' , '" + SecondPanel +
"' , '" + EntityName +
"' );\" class='double_panel_row no_selection_text' id='" +
32 EntityName +
"_div_id_second'>" + EntityName +
"</div>";
34 jQuery(
'.no_selection_text' ).disableTextSelect();
43 if( EntityName !=
'' )
45 document.getElementById( FirstPanel ).innerHTML +=
"<input type='hidden' name='entities[]' id='" +
46 EntityName +
"_hidden_id' value='" + EntityName +
"'>";
47 document.getElementById( SecondPanel ).removeChild( document.getElementById( EntityName +
'_div_id_second' ) );
48 document.getElementById( FirstPanel ).innerHTML +=
"<div onclick=\"javascript:FirstToSecond( '" + FirstPanel +
49 "' , '" + SecondPanel +
"' , '" + EntityName +
"' );\" class='double_panel_row no_selection_text' id='" +
50 EntityName +
"_div_id_first'>" + EntityName +
"</div>";
52 jQuery(
'.no_selection_text' ).disableTextSelect();
59 ultimix.double_panel.init_first_panel =
function( FirstPanel , SecondPanel , FirstPanelEntities )
61 if( FirstPanelEntities !=
'' )
63 FirstPanelEntities = FirstPanelEntities.split(
',' );
65 for( i = 0 ; i < FirstPanelEntities.length ; i++ )
67 document.getElementById( FirstPanel ).innerHTML +=
"<div onclick=\"javascript:FirstToSecond( '" +
68 FirstPanel +
"' , '" + SecondPanel +
"' , '" + FirstPanelEntities[ i ] +
69 "' );\" class='double_panel_row no_selection_text' id='" + FirstPanelEntities[ i ] +
70 "_div_id_first'>" + FirstPanelEntities[ i ] +
"</div>";
71 document.getElementById( FirstPanel ).innerHTML +=
"<input type='hidden' name='entities[]' id='" +
72 FirstPanelEntities[ i ] +
"_hidden_id' value='" + FirstPanelEntities[ i ] +
"'>";
77 FirstPanelEntities =
new Array;
80 return( FirstPanelEntities );
86 ultimix.double_panel.init_second_panel =
function( FirstPanel , SecondPanel , FirstPanelEntities , SecondPanelEntities )
88 if( SecondPanelEntities !=
'' )
90 SecondPanelEntities = SecondPanelEntities.split(
',' );
92 for( i = 0 ; i < SecondPanelEntities.length ; i++ )
94 if(
in_array( SecondPanelEntities[ i ] , FirstPanelEntities ) ==
false )
96 document.getElementById( SecondPanel ).innerHTML +=
"<div onclick=\"javascript:SecondToFirst( '" +
97 FirstPanel +
"' , '" + SecondPanel +
"' , '" + SecondPanelEntities[ i ] +
98 "' );\" class='double_panel_row no_selection_text' id='" + SecondPanelEntities[ i ] +
99 "_div_id_second'>" + SecondPanelEntities[ i ] +
"</div>";
108 function InitPanels( FirstPanel , SecondPanel , FirstPanelEntities , SecondPanelEntities )
110 FirstPanelEntities =
ultimix.double_panel.init_first_panel( FirstPanel , SecondPanel , FirstPanelEntities );
112 ultimix.double_panel.init_second_panel( FirstPanel , SecondPanel , FirstPanelEntities , SecondPanelEntities );
116 jQuery(
'.no_selection_text' ).disableTextSelect();