| <?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> |
| |
| <!--- Organization choice modal window when an organization is added to a user.--> |
| <class name="chooseOrganisationWindow" extends="labelExplorerBox" labelid="173" |
| docking="true" width="400" x="400" y="300" height="200"> |
| |
| <attribute name="item_id" value="0" type="number" /> |
| <attribute name="refObj" value="null" /> |
| |
| <handler name="oninit"> |
| //lz.ModeManager.makeModal(this); |
| this.getOrganisations.doCall(); |
| </handler> |
| |
| <handler name="onclose"> |
| //lz.ModeManager.release(this); |
| </handler> |
| |
| <netRemoteCallHib name="getOrganisations" funcname="organisationservice.getOrganisations" remotecontext="$once{ canvas.thishib }" > |
| <netparam><method name="getValue"> return canvas.sessionId; </method></netparam> |
| <netparam><method name="getValue"> return 0; </method></netparam> |
| <netparam><method name="getValue"> return 200; </method></netparam> |
| <netparam><method name="getValue"> return "organisation_id"; </method></netparam> |
| <netparam><method name="getValue"> return true; </method></netparam> |
| <handler name="ondata" args="value"> |
| <![CDATA[ |
| //Debug.write("getOrganisations ",value); |
| if (value!=null){ |
| for (var i=0;i<value.result.length;i++){ |
| if (!this.parent.refObj._organisationslist.checkValue(value.result[i].organisation_id)){ |
| this.parent._organisationslist.addItem(value.result[i].name,value.result[i].organisation_id); |
| } |
| } |
| } |
| ]]> |
| </handler> |
| </netRemoteCallHib> |
| |
| <labelText labelid="161" width="200" y="24" resize="false" x="2"/> |
| <simpleValueList name="_organisationslist" y="24" x="120" width="270" height="120" |
| multiselect="true" /> |
| |
| <simpleLabelButton labelid="174" x="290" y="170" width="100"> |
| <handler name="onclick"> |
| this.parent.close(); |
| </handler> |
| </simpleLabelButton> |
| <simpleLabelButton labelid="175" x="180" y="170" width="100"> |
| <handler name="onclick"> |
| <![CDATA[ |
| for (var i=0;i<this.parent._organisationslist._selected.length;i++){ |
| //Debug.write("this.parent.refObj._organisationslist.addItem ",this.parent._organisationslist._selected[i].text,this.parent._organisationslist._selected[i].value); |
| this.parent.refObj._organisationslist.addItem(this.parent._organisationslist._selected[i].text,this.parent._organisationslist._selected[i].value); |
| } |
| this.parent.close(); |
| ]]> |
| </handler> |
| </simpleLabelButton> |
| |
| </class> |
| |
| </library> |