| <?xml version="1.0" encoding="UTF-8" ?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| |
| --> |
| <library> |
| |
| <class name="orgAdminChooseUserWindow" extends="labelExplorerBox" labelid="180" |
| docking="true" width="400" x="200" y="0" height="290"> |
| |
| <attribute name="organisation_id" value="0" type="number" /> |
| <attribute name="refObj" value="null" /> |
| <attribute name="usersId" value="0" type="number" /> |
| |
| <attribute name="isOrgUserAddForm" value="false" type="boolean"/> |
| |
| <attribute name="refObjectDialog" value="null"/> |
| |
| <handler name="oninit"> |
| lz.ModeManager.makeModal(this); |
| </handler> |
| |
| <handler name="onclose"> |
| lz.ModeManager.release(this); |
| </handler> |
| |
| <netRemoteCallHib name="searchUser" funcname="userservice.searchUser" remotecontext="$once{ canvas.thishib }" > |
| <netparam><method name="getValue"> return canvas.sessionId; </method></netparam> |
| <netparam><method name="getValue"> return "login"; </method></netparam> |
| <netparam><method name="getValue"> return parent.parent.searchstring.getText(); </method></netparam> |
| <netparam><method name="getValue"> return 200; </method></netparam> |
| <netparam><method name="getValue"> return 0; </method></netparam> |
| <netparam><method name="getValue"> return "user_id"; </method></netparam> |
| <netparam><method name="getValue"> return true; </method></netparam> |
| <handler name="ondata" args="value"> |
| <![CDATA[ |
| //Debug.write("searchUser ",value); |
| if (value!=null){ |
| for (var i=0;i<value.length;i++){ |
| var v = value[i].login+' ['+value[i].lastname+', '+value[i].firstname+']'; |
| this.parent._userlist.addItem(v,value[i].user_id); |
| } |
| } |
| ]]> |
| </handler> |
| </netRemoteCallHib> |
| |
| <labelText labelid="181" width="200" y="24" resize="false" x="2"/> |
| <customEdittext name="searchstring" y="24" x="120" width="270" text="" /> |
| |
| <simpleLabelButton labelid="182" x="290" y="54" width="100"> |
| <handler name="onclick"> |
| parent.searchUser.doCall(); |
| </handler> |
| </simpleLabelButton> |
| |
| <labelText labelid="183" width="200" y="84" resize="false" x="2"/> |
| <simpleValueList name="_userlist" y="84" x="120" width="270" height="100" |
| multiselect="false" /> |
| |
| <simpleLabelButton labelid="175" x="180" y="$once{ parent.height-30 }" width="100"> |
| <handler name="onclick"> |
| <![CDATA[ |
| this.parent.usersId = this.parent._userlist._selected.value; |
| if ($debug) Debug.write(this.parent.usersId); |
| if ($debug) Debug.write(this.parent._userlist._selected.value); |
| if (parent.isOrgUserAddForm) { |
| this.parent.addUserToOrganisation.doCall(); |
| } else { |
| this.parent.refObjectDialog.addUserById(this.parent.usersId); |
| parent.close(); |
| } |
| // |
| ]]> |
| </handler> |
| </simpleLabelButton> |
| |
| <simpleLabelButton labelid="174" x="290" y="$once{ parent.height-30 }" width="100"> |
| <handler name="onclick"> |
| this.parent.close(); |
| </handler> |
| </simpleLabelButton> |
| |
| <netRemoteCallHib name="addUserToOrganisation" remotecontext="$once{ canvas.thishib }" |
| funcname="organisationservice.addUserToOrganisation" > |
| <netparam><method name="getValue"> return canvas.sessionId; </method></netparam> |
| <netparam><method name="getValue"> return parent.parent.organisation_id; </method></netparam> |
| <netparam><method name="getValue"> return parent.parent.usersId; </method></netparam> |
| <handler name="ondata" args="value"> |
| if ($debug) Debug.write("addUserToOrganisation ",value); |
| if (value>0){ |
| this.parent.refObj.onreload.sendEvent(); |
| this.parent.close(); |
| } else { |
| new lz.rpcErrorDialog(canvas.main_content._content.inner,{errorid:value}); |
| } |
| </handler> |
| </netRemoteCallHib> |
| |
| </class> |
| |
| </library> |