Show More
@@ -102,12 +102,15 b'' | |||||
102 | //definition of containers ID's |
|
102 | //definition of containers ID's | |
103 | var available_container = 'available_members'; |
|
103 | var available_container = 'available_members'; | |
104 | var selected_container = 'users_group_members'; |
|
104 | var selected_container = 'users_group_members'; | |
|
105 | ||||
105 | //form containing containers id |
|
106 | //form containing containers id | |
106 | var form_id = 'edit_users_group'; |
|
107 | var form_id = 'edit_users_group'; | |
107 |
|
108 | |||
108 | //temp container for selected storage. |
|
109 | //temp container for selected storage. | |
109 | var cache = new Array(); |
|
110 | var cache = new Array(); | |
|
111 | var av_cache = new Array(); | |||
110 | var c = D.get(selected_container); |
|
112 | var c = D.get(selected_container); | |
|
113 | var ac = D.get(available_container); | |||
111 |
|
114 | |||
112 | //get only selected options for further fullfilment |
|
115 | //get only selected options for further fullfilment | |
113 | for(var i = 0;node =c.options[i];i++){ |
|
116 | for(var i = 0;node =c.options[i];i++){ | |
@@ -125,6 +128,34 b'' | |||||
125 | c.options[i]=new Option(node.text, node.value, false, false); |
|
128 | c.options[i]=new Option(node.text, node.value, false, false); | |
126 | } |
|
129 | } | |
127 |
|
130 | |||
|
131 | ||||
|
132 | //get all available options to cache | |||
|
133 | for(var i = 0;node =ac.options[i];i++){ | |||
|
134 | //push selected to my temp storage left overs :) | |||
|
135 | av_cache.push(node); | |||
|
136 | } | |||
|
137 | ||||
|
138 | //fill available only with those not in choosen | |||
|
139 | ac.options.length=0; | |||
|
140 | tmp_cache = new Array(); | |||
|
141 | ||||
|
142 | for(var i = 0;node = av_cache[i];i++){ | |||
|
143 | var add = true; | |||
|
144 | for(var i2 = 0;node_2 = cache[i2];i2++){ | |||
|
145 | if(node.value == node_2.value){ | |||
|
146 | add=false; | |||
|
147 | break; | |||
|
148 | } | |||
|
149 | } | |||
|
150 | if(add){ | |||
|
151 | tmp_cache.push(new Option(node.text, node.value, false, false)); | |||
|
152 | } | |||
|
153 | } | |||
|
154 | ||||
|
155 | for(var i = 0;node = tmp_cache[i];i++){ | |||
|
156 | ac.options[i] = node; | |||
|
157 | } | |||
|
158 | ||||
128 | function prompts_action_callback(e){ |
|
159 | function prompts_action_callback(e){ | |
129 |
|
160 | |||
130 | var choosen = D.get(selected_container); |
|
161 | var choosen = D.get(selected_container); |
General Comments 0
You need to be logged in to leave comments.
Login now