2 /*********************************************************************************
3 * SugarCRM Community Edition is a customer relationship management program developed by
4 * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
6 * This program is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Affero General Public License version 3 as published by the
8 * Free Software Foundation with the addition of the following permission added
9 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
18 * You should have received a copy of the GNU Affero General Public License along with
19 * this program; if not, see http://www.gnu.org/licenses or write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
26 * The interactive user interfaces in modified source and object code versions
27 * of this program must display Appropriate Legal Notices, as required under
28 * Section 5 of the GNU Affero General Public License version 3.
30 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31 * these Appropriate Legal Notices must retain the display of the "Powered by
32 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33 * technical reasons, the Appropriate Legal Notices must display the words
34 * "Powered by SugarCRM".
35 ********************************************************************************/
40 <div align="right"><button type="button" class="button" onclick="javascript: CAL.toggle_shared_edit('shared_cal_edit');">{$MOD.LBL_EDIT_USERLIST}</button></div>
43 <script language="javascript">
46 var td = document.getElementById(name+'_td');
47 var obj = td.getElementsByTagName('select')[0];
48 obj =(typeof obj == "string") ? document.getElementById(obj) : obj;
49 if(obj.tagName.toLowerCase() != "select" && obj.length < 2)
51 var sel = new Array();
53 for(i = 0; i < obj.length; i++){
54 if(obj[i].selected == true) {
59 if(sel[i] != 0 && !obj[sel[i]-1].selected) {
60 var tmp = new Array(obj[sel[i]-1].text, obj[sel[i]-1].value);
61 obj[sel[i]-1].text = obj[sel[i]].text;
62 obj[sel[i]-1].value = obj[sel[i]].value;
63 obj[sel[i]].text = tmp[0];
64 obj[sel[i]].value = tmp[1];
65 obj[sel[i]-1].selected = true;
66 obj[sel[i]].selected = false;
71 var td = document.getElementById(name+'_td');
72 var obj = td.getElementsByTagName('select')[0];
73 if(obj.tagName.toLowerCase() != "select" && obj.length < 2)
75 var sel = new Array();
76 for(i=obj.length-1; i>-1; i--){
77 if(obj[i].selected == true) {
82 if(sel[i] != obj.length-1 && !obj[sel[i]+1].selected) {
83 var tmp = new Array(obj[sel[i]+1].text, obj[sel[i]+1].value);
84 obj[sel[i]+1].text = obj[sel[i]].text;
85 obj[sel[i]+1].value = obj[sel[i]].value;
86 obj[sel[i]].text = tmp[0];
87 obj[sel[i]].value = tmp[1];
88 obj[sel[i]+1].selected = true;
89 obj[sel[i]].selected = false;
96 <div id="shared_cal_edit" style="{$style}">
97 <form name="shared_cal" action="index.php" method="post">
98 <input type="hidden" name="module" value="Calendar">
99 <input type="hidden" name="action" value="index">
100 <input type="hidden" name="edit_shared" value="">
101 <input type="hidden" name="view" value="shared">
104 <table cellpadding="0" cellspacing="3" border="0" align="center">
105 <tr><th valign="top" align="center" colspan="2">{$MOD.LBL_SELECT_USERS}</th></tr>
106 <tr><td valign="top"></td><td valign="top">
107 <table cellpadding="1" cellspacing="1" border="0" class="edit view" align="center">
109 <td valign="top" nowrap=""><b>{$MOD.LBL_USERS}:</b></td>
110 <td valign="top" id="shared_ids_td">
111 <select id="shared_ids" name="shared_ids[]" multiple size="8">{$users_options}</select>
114 <a onclick="up('shared_ids');">{$UP}</a><br>
115 <a onclick="down('shared_ids');">{$DOWN}</a>
119 <td align="right" colspan="2">
120 <input class="button" type="submit" title="{$APP.LBL_SELECT_BUTTON_TITLE}" accesskey="{$APP.LBL_SELECT_BUTTON_KEY}" value="{$APP.LBL_SELECT_BUTTON_LABEL}">
121 <input class="button" onclick="javascript: CAL.toggle_shared_edit('shared_cal_edit');" type="button" title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accesskey="{$APP.LBL_CANCEL_BUTTON_KEY}" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">