Changeset 503 for trunk/contactcenter/js/cc.js
- Timestamp:
- 10/01/08 16:46:55 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/contactcenter/js/cc.js
r294 r503 184 184 function editContact (id){ 185 185 openFullAdd(); 186 populateFullEdit(id); 186 populateFullEdit(id,'bo_people_catalog'); 187 } 188 function editSharedContact (id){ 189 openFullAdd(); 190 populateFullEdit(id,'bo_shared_catalog_manager'); 187 191 } 188 192 /************ Edit Group *************/ … … 277 281 } 278 282 279 function populateFullEdit (id )283 function populateFullEdit (id,catalog) 280 284 { 281 285 var handler = function(responseText) … … 298 302 }; 299 303 300 Connector.newRequest('populateFullEdit', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_full_data&id=' + id , 'GET', handler);304 Connector.newRequest('populateFullEdit', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_full_data&id=' + id + "&catalog="+catalog, 'GET', handler); 301 305 } 302 306 … … 1970 1974 } 1971 1975 } 1972 1976 if (type == "shared") { 1977 if (data[3][pos][8] & 4) 1978 eval("document.getElementById(id + ':cc_card_edit').onclick = function(){editSharedContact(Element('"+id+"' + ':cc_id').value);};"); 1979 else 1980 document.getElementById(id + ':cc_card_edit').onclick = function(){ 1981 alert(Element('cc_msg_not_allowed').value); 1982 }; 1983 if (data[3][pos][8] & 8) 1984 eval("document.getElementById(id + ':cc_card_remove').onclick = function(){removeEntry(Element('" + id + "' + ':cc_id').value);};"); 1985 else 1986 document.getElementById(id + ':cc_card_remove').onclick = function(){ 1987 alert(Element('cc_msg_not_allowed').value); 1988 }; 1989 } 1973 1990 if (--ncards == 0) 1974 1991 { … … 2122 2139 function getCardHTML (id, type) 2123 2140 { 2124 if(type != 'groups') { 2125 2141 if(type == 'groups') { 2142 html_card = '<td id="' + id + '" style="width: ' + CC_card_image_width + 'px; height: ' + CC_card_image_height + '">' + 2143 '<div style="border: 0px solid #999; position: relative;">' + 2144 '<img src="templates/default/images/card.png" border="0" width="' + CC_card_image_width +'" height="' + CC_card_image_height + '"i ondblclick="editContact(Element(\'' + id + ':cc_id\').value);">' + 2145 '<img title="'+Element('cc_msg_group_edit').value+'" id="' + id + ':cc_card_edit" style="position: absolute; top: 35px; left: 222px; width: 18px; height: 18px; cursor: pointer; cursor: hand; z-index: 1" onclick="editGroup(Element(\'' + id + ':cc_id\').value);" onmouseover="resizeIcon(\''+id+':cc_card_edit\',0)" onmouseout="resizeIcon(\''+id+':cc_card_edit\',1)" src="templates/default/images/cc_card_edit.png">' + 2146 '<img title="'+Element('cc_msg_group_remove').value+'" id="' + id + ':cc_card_remove" style="position: absolute; top: 78px; left: 223px; width: 15px; height: 14px; cursor: pointer; cursor: hand; z-index: 1" onclick="removeEntry(Element(\'' + id + ':cc_id\').value,\'groups\');" onmouseover="resizeIcon(\''+id+':cc_card_remove\',0)" onmouseout="resizeIcon(\''+id+':cc_card_remove\',1)" src="templates/default/images/cc_x.png">' + 2147 '<span id="' + id + ':cc_title" style="position: absolute; top: 30px; left: 75px; width: 135px; border: 0px solid #999; font-weight: bold; font-size: 10px; text-align: center; height: 10px;" onmouseover="//Element(\''+id+':cc_name_full\').style.visibility=\'visible\'" onmouseout="//Element(\''+id+':cc_name_full\').style.visibility=\'hidden\'"></span>' + 2148 '<span id="' + id + ':cc_participantes" style="cursor: pointer; cursor: hand; z-index: 1;position: absolute; top: 15px; left: 15px"></span>' + 2149 '<span onMouseOver="this.title = \''+Element('cc_send_mail').value+' => '+'\'+document.getElementById(\''+id + ':cc_title\').innerHTML" id="' + id + ':cc_short_name" style="position: absolute; top: 105px; left: 75px; width: 135px; border: 0px solid #999; font-weight: normal; font-size: 10px; text-align: center; height: 10px;"></span>' + 2150 '<input id="' + id + ':cc_id" type="hidden">' + 2151 '</div>' + '</td>'; 2152 2153 } 2154 else { 2126 2155 html_card = '<td id="' + id + '" style="width: ' + CC_card_image_width + 'px; height: ' + CC_card_image_height + '">' + 2127 2156 '<div style="border: 0px solid #999; position: relative;">' + … … 2142 2171 '<input id="' + id + ':cc_id" type="hidden">' + 2143 2172 '</div>' + '</td>'; 2144 2145 } else {2146 html_card = '<td id="' + id + '" style="width: ' + CC_card_image_width + 'px; height: ' + CC_card_image_height + '">' +2147 '<div style="border: 0px solid #999; position: relative;">' +2148 '<img src="templates/default/images/card.png" border="0" width="' + CC_card_image_width +'" height="' + CC_card_image_height + '"i ondblclick="editContact(Element(\'' + id + ':cc_id\').value);">' +2149 '<img title="'+Element('cc_msg_group_edit').value+'" id="' + id + ':cc_card_edit" style="position: absolute; top: 35px; left: 222px; width: 18px; height: 18px; cursor: pointer; cursor: hand; z-index: 1" onclick="editGroup(Element(\'' + id + ':cc_id\').value);" onmouseover="resizeIcon(\''+id+':cc_card_edit\',0)" onmouseout="resizeIcon(\''+id+':cc_card_edit\',1)" src="templates/default/images/cc_card_edit.png">' +2150 '<img title="'+Element('cc_msg_group_remove').value+'" id="' + id + ':cc_card_remove" style="position: absolute; top: 78px; left: 223px; width: 15px; height: 14px; cursor: pointer; cursor: hand; z-index: 1" onclick="removeEntry(Element(\'' + id + ':cc_id\').value,\'groups\');" onmouseover="resizeIcon(\''+id+':cc_card_remove\',0)" onmouseout="resizeIcon(\''+id+':cc_card_remove\',1)" src="templates/default/images/cc_x.png">' +2151 '<span id="' + id + ':cc_title" style="position: absolute; top: 30px; left: 75px; width: 135px; border: 0px solid #999; font-weight: bold; font-size: 10px; text-align: center; height: 10px;" onmouseover="//Element(\''+id+':cc_name_full\').style.visibility=\'visible\'" onmouseout="//Element(\''+id+':cc_name_full\').style.visibility=\'hidden\'"></span>' +2152 '<span id="' + id + ':cc_participantes" style="cursor: pointer; cursor: hand; z-index: 1;position: absolute; top: 15px; left: 15px"></span>' +2153 '<span onMouseOver="this.title = \''+Element('cc_send_mail').value+' => '+'\'+document.getElementById(\''+id + ':cc_title\').innerHTML" id="' + id + ':cc_short_name" style="position: absolute; top: 105px; left: 75px; width: 135px; border: 0px solid #999; font-weight: normal; font-size: 10px; text-align: center; height: 10px;"></span>' +2154 '<input id="' + id + ':cc_id" type="hidden">' +2155 '</div>' + '</td>';2156 2173 } 2157 2174 … … 2167 2184 else 2168 2185 bg = "this.style.background=\'#EEEEEE\'"; 2186 if(type == 'groups') { 2187 html_card = '<tr width="40%" id="' + id + '" onmouseout="'+bg+'" onmouseover="this.style.background=\'LIGHTYELLOW\'" bgcolor="EEEEEE"><td width="auto" style="font-weight: normal; font-size: 10px; text-align: left; height: 10px;">' + 2188 '<span id="' + id + ':cc_participantes" style="cursor: pointer; cursor: hand; z-index: 1"></span>' + 2189 '<span id="' + id + ':cc_title"></span></td>' + 2190 '<td width="40%" style="solid #999; font-weight: normal; font-size: 10px; text-align: left; height: 10px"><span onMouseOver="this.title = \''+Element('cc_send_mail').value+' => '+'\'+document.getElementById(\''+id + ':cc_title\').innerHTML" id="' + id + ':cc_short_name"></span></td>' + 2191 '<td align="left" width="55px">'+ 2192 '<img title="'+Element('cc_msg_group_edit').value+'" id="' + id + ':cc_card_edit" style=" cursor: pointer; cursor: hand; z-index: 1;width: 18px; height: 18px;" onclick="editGroup(Element(\'' + id + ':cc_id\').value);" src="templates/default/images/cc_card_edit.png">' + 2193 ' | '+ 2194 '<img title="'+Element('cc_msg_group_remove').value+'" id="' + id + ':cc_card_remove" style="width: 15px; height: 14px; cursor: pointer; cursor: hand; z-index: 1" onclick="removeEntry(Element(\'' + id + ':cc_id\').value,\'groups\');" src="templates/default/images/cc_x.png">' + 2195 '<input id="' + id + ':cc_id" type="hidden">'+ 2196 '</td></tr>'; 2169 2197 2170 if(type != 'groups') {2171 2198 2199 } 2200 else { 2172 2201 html_card = '<tr style="height:20px" id="' + id + '" onmouseout="'+bg+'" onmouseover="this.style.background=\'LIGHTYELLOW\'" bgcolor="EEEEEE"><td width="auto" style="font-weight: normal; font-size: 10px; text-align: left; height: 10px;">' + 2173 2202 '<span valign="bottom" id="' + id + ':cc_icon_group"> </span><span id="' + id + ':cc_name"></span></td>' + … … 2189 2218 '</td></tr>'; 2190 2219 } 2191 else {2192 html_card = '<tr width="40%" id="' + id + '" onmouseout="'+bg+'" onmouseover="this.style.background=\'LIGHTYELLOW\'" bgcolor="EEEEEE"><td width="auto" style="font-weight: normal; font-size: 10px; text-align: left; height: 10px;">' +2193 '<span id="' + id + ':cc_participantes" style="cursor: pointer; cursor: hand; z-index: 1"></span>' +2194 '<span id="' + id + ':cc_title"></span></td>' +2195 '<td width="40%" style="solid #999; font-weight: normal; font-size: 10px; text-align: left; height: 10px"><span onMouseOver="this.title = \''+Element('cc_send_mail').value+' => '+'\'+document.getElementById(\''+id + ':cc_title\').innerHTML" id="' + id + ':cc_short_name"></span></td>' +2196 '<td align="left" width="55px">'+2197 '<img title="'+Element('cc_msg_group_edit').value+'" id="' + id + ':cc_card_edit" style=" cursor: pointer; cursor: hand; z-index: 1;width: 18px; height: 18px;" onclick="editGroup(Element(\'' + id + ':cc_id\').value);" src="templates/default/images/cc_card_edit.png">' +2198 ' | '+2199 '<img title="'+Element('cc_msg_group_remove').value+'" id="' + id + ':cc_card_remove" style="width: 15px; height: 14px; cursor: pointer; cursor: hand; z-index: 1" onclick="removeEntry(Element(\'' + id + ':cc_id\').value,\'groups\');" src="templates/default/images/cc_x.png">' +2200 '<input id="' + id + ':cc_id" type="hidden">'+2201 '</td></tr>';2202 }2203 2220 2204 2221 return html_card; … … 2228 2245 html_cards += ''; 2229 2246 } 2230 if((ccTree.catalog_perms & 2) && type != 'groups' )2247 if((ccTree.catalog_perms & 2) && type != 'groups' && type!='shared') 2231 2248 html_cards += '<tr><td colspan=4 align="right"><button id="cc_button_tools" value="" type="button" onclick="javascript:removeAllEntries()">Remover Todos</button></td></tr>'; 2232 2249 } … … 2267 2284 html_cards += '</tr>'; 2268 2285 } 2269 if((ccTree.catalog_perms & 2) && type != 'groups' )2286 if((ccTree.catalog_perms & 2) && type != 'groups' && type!='shared') 2270 2287 html_cards += '<tr><td colspan=3 align="right"><button id="cc_button_tools" value="" type="button" onclick="javascript:removeAllEntries()">Remover Todos</button></td></tr>'; 2271 2288 }
Note: See TracChangeset
for help on using the changeset viewer.