Changeset 752 for trunk/contactcenter/js
- Timestamp:
- 04/17/09 16:34:36 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/contactcenter/js/cc.js
r503 r752 188 188 function editSharedContact (id){ 189 189 openFullAdd(); 190 populateFullEdit(id,'bo_shared_ catalog_manager');190 populateFullEdit(id,'bo_shared_people_manager'); 191 191 } 192 192 /************ Edit Group *************/ … … 194 194 populateEditGroup(id); 195 195 } 196 197 function editSharedGroup(id){ 198 populateEditGroup(id, 'shared'); 199 } 200 196 201 /* 197 202 Updates all the constant fields in the … … 317 322 options_contact_list.innerHTML = select_contact_list; 318 323 319 if(data['id_group']) { 320 324 if(data['id_group']) { 325 Element('title').value = data['title']; 321 326 if(data['contact_in_list']) { 322 327 for(i = 0; i < data['contact_in_list'].length; i++) { … … 325 330 option.text = data['contact_in_list'][i]['names_ordered']+' ('+data['contact_in_list'][i]['connection_value']+')'; 326 331 Element('contact_in_list').options[Element('contact_in_list').options.length] = option; 327 } 328 } 329 330 Element('title').value = data['title']; 332 } 333 } 331 334 } 332 335 … … 341 344 id = typeof(id) == 'undefined' ? id = 0 : id; 342 345 343 ccAddGroup.clear(true); 346 ccAddGroup.clear(true); 344 347 Connector.newRequest('populateEditGroup', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_group&id='+id, 'GET', handler); 345 348 } … … 1850 1853 } 1851 1854 1852 if(type == 'groups' )1853 return populateGroupsInCards(data );1855 if(type == 'groups' || type == 'shared_groups') 1856 return populateGroupsInCards(data,type); 1854 1857 1855 1858 var pos = 0; … … 1904 1907 Element(id+':'+data[2][k]).innerHTML = data[3][pos][k]; 1905 1908 } 1909 if(data[3][pos][9]) 1910 Element(id+':'+data[2][k]).innerHTML += "<br><span style='margin-left:30px'><font size='-2' color='#808080'><i>"+data[3][pos][9]+"</i></font></span>"; 1906 1911 break; 1907 1912 … … 1973 1978 } 1974 1979 } 1975 } 1976 if (type == "shared ") {1980 } 1981 if (type == "shared_contacts") { 1977 1982 if (data[3][pos][8] & 4) 1978 1983 eval("document.getElementById(id + ':cc_card_edit').onclick = function(){editSharedContact(Element('"+id+"' + ':cc_id').value);};"); … … 1988 1993 }; 1989 1994 } 1995 1996 1997 1990 1998 if (--ncards == 0) 1991 1999 { … … 2000 2008 } 2001 2009 2002 function populateGroupsInCards(data )2010 function populateGroupsInCards(data,type) 2003 2011 { 2004 2012 var pos = 0; … … 2032 2040 Element(id+':'+data[2][k]).innerHTML = data[3][pos][k]; 2033 2041 } 2042 if(data[3][pos][5]) 2043 Element(id+':'+data[2][k]).innerHTML += "<br><span style='margin-left:30px'><font size='-2' color='#808080'><i>"+data[3][pos][5]+"</i></font></span>"; 2034 2044 break; 2035 2045 … … 2037 2047 if (data[3][pos][k].length > (CC_visual == 'table' ? 50 : 20)) 2038 2048 { 2039 Element(id+':'+data[2][k]).innerHTML = data[5] + ''+data[3][pos][k] +'\')">'+adjustString(data[3][pos][k], (CC_visual == 'table' ? 50 : 20))+'</span>';2049 Element(id+':'+data[2][k]).innerHTML = data[5] + ''+data[3][pos][k]+'::'+data[3][pos][6] +'\')">'+adjustString(data[3][pos][k], (CC_visual == 'table' ? 50 : 20))+'</span>'; 2040 2050 Element(id+':'+data[2][k]).title = data[3][pos][k]; 2041 2051 } 2042 2052 else 2043 2053 { 2044 Element(id+':'+data[2][k]).innerHTML = data[5] + ''+data[3][pos][k] + '\')">'+data[3][pos][k]+'</span>';2054 Element(id+':'+data[2][k]).innerHTML = data[5] + ''+data[3][pos][k]+(data[3][pos][6] ? '::'+data[3][pos][6] : "") + '\')">'+data[3][pos][k]+'</span>'; 2045 2055 } 2046 2056 break; … … 2073 2083 } 2074 2084 2085 if (type == "shared_groups") { 2086 /* Edição de grupos compartilhados está com problema. Desabilitado temporariamente. 2087 if (data[3][pos][4] & 4) 2088 eval("document.getElementById(id + ':cc_card_edit').onclick = function(){editSharedGroup(Element('"+id+"' + ':cc_id').value);};"); 2089 else 2090 */ 2091 document.getElementById(id + ':cc_card_edit').onclick = function(){ alert(Element('cc_msg_unavailable').value); }; 2092 2093 if (data[3][pos][4] & 8) 2094 eval("document.getElementById(id + ':cc_card_remove').onclick = function(){removeEntry(Element('" + id + "' + ':cc_id').value,'groups');};"); 2095 else 2096 document.getElementById(id + ':cc_card_remove').onclick = function(){ 2097 alert(Element('cc_msg_not_allowed').value); 2098 }; 2099 } 2100 2101 2075 2102 if (--ncards == 0) 2076 2103 { … … 2139 2166 function getCardHTML (id, type) 2140 2167 { 2141 if(type == 'groups' ) {2168 if(type == 'groups' || type == 'shared_groups') { 2142 2169 html_card = '<td id="' + id + '" style="width: ' + CC_card_image_width + 'px; height: ' + CC_card_image_height + '">' + 2143 2170 '<div style="border: 0px solid #999; position: relative;">' + … … 2147 2174 '<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 2175 '<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>' +2176 '<span onMouseOver="this.title = \''+Element('cc_send_mail').value+'\'" 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 2177 '<input id="' + id + ':cc_id" type="hidden">' + 2151 2178 '</div>' + '</td>'; … … 2184 2211 else 2185 2212 bg = "this.style.background=\'#EEEEEE\'"; 2186 if(type == 'groups' ) {2213 if(type == 'groups' || type == 'shared_groups') { 2187 2214 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 2215 '<span id="' + id + ':cc_participantes" style="cursor: pointer; cursor: hand; z-index: 1"></span>' + 2189 2216 '<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>' +2217 '<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+'\'" id="' + id + ':cc_short_name"></span></td>' + 2191 2218 '<td align="left" width="55px">'+ 2192 2219 '<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">' + … … 2201 2228 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;">' + 2202 2229 '<span valign="bottom" id="' + id + ':cc_icon_group"> </span><span id="' + id + ':cc_name"></span></td>' + 2203 '<td 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_name\').innerHTML" id="' + id + ':cc_mail"></span></td>' +2230 '<td style="solid #999; font-weight: normal; font-size: 10px; text-align: left; height: 10px"><span onMouseOver="this.title = \''+Element('cc_send_mail').value+'\'" id="' + id + ':cc_mail"></span></td>' + 2204 2231 '<td align="center" nowrap><span style="solid #999; font-weight: normal; font-size: 10px;height: 10px" id="' + id + ':cc_phone"></span></td>' + 2205 2232 ( ccTree.catalog_perms == 1 ? … … 2245 2272 html_cards += ''; 2246 2273 } 2247 if((ccTree.catalog_perms & 2) && type != 'groups' && type !='shared')2274 if((ccTree.catalog_perms & 2) && type != 'groups' && type !='shared_contacts' && type !='shared_groups') 2248 2275 html_cards += '<tr><td colspan=4 align="right"><button id="cc_button_tools" value="" type="button" onclick="javascript:removeAllEntries()">Remover Todos</button></td></tr>'; 2249 2276 } … … 2284 2311 html_cards += '</tr>'; 2285 2312 } 2286 if((ccTree.catalog_perms & 2) && type != 'groups' && type !='shared')2313 if((ccTree.catalog_perms & 2) && type != 'groups' && type !='shared_contacts' && type !='shared_groups') 2287 2314 html_cards += '<tr><td colspan=3 align="right"><button id="cc_button_tools" value="" type="button" onclick="javascript:removeAllEntries()">Remover Todos</button></td></tr>'; 2288 2315 }
Note: See TracChangeset
for help on using the changeset viewer.