Changeset 3795 for branches/2.2/contactcenter
- Timestamp:
- 02/18/11 16:31:00 (13 years ago)
- Location:
- branches/2.2/contactcenter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/contactcenter/inc/class.ui_data.inc.php
r3688 r3795 24 24 var $so_group; 25 25 var $typeContact; 26 var $preferences; 26 27 27 28 var $page_info = array( … … 80 81 else 81 82 $this -> typeContact = 'contacts'; 83 $this->preferences = $_SESSION['phpgw_info']['user']['preferences']['contactcenter']; 82 84 } 83 85 … … 330 332 return $this->get_photo($_GET['id']); 331 333 332 case 'get_ visible_all_ldap':333 echo $this->get_visible_all_ldap();334 case 'get_init_values': 335 echo serialize(array("visible_all_ldap" => $this->get_visible_all_ldap(), "preferences" => $this->preferences)); 334 336 return; 335 337 … … 1463 1465 1464 1466 $i = 0; 1467 if (!is_array($this->preferences)) 1468 { 1469 $this->preferences['personCardEmail'] = 1; 1470 $this->preferences['personCardPhone'] = 2; 1471 } 1465 1472 foreach($contacts as $index => $contact) 1466 1473 { … … 1495 1502 1496 1503 //Para exibir o celular empresarial do empregado 1497 if ($ _SESSION['phpgw_info']['user']['preferences']['contactcenter']['voip_enabled'] && !$external && $final[3][$i][10] != 'none')1504 if ($this->preferences['voip_enabled'] && !$external && $final[3][$i][10] != 'none') 1498 1505 $final[3][$i][10] = "<a title=\"".lang("Call Mobile")."\" href=\"#\" onclick=\"connectVoip('".$final[3][$i][10]."', 'mob')\">".$final[3][$i][10]."</a>"; 1499 1506 1500 /* Select the correct Email and Telephone to be shown */1501 $preferences = ExecMethod('contactcenter.ui_preferences.get_preferences');1502 1503 if (!is_array($preferences))1504 {1505 $preferences['personCardEmail'] = 1;1506 $preferences['personCardPhone'] = 2;1507 }1508 1507 if ($contact['connections']) 1509 1508 { … … 1512 1511 foreach($contact['connections'] as $conn_info) 1513 1512 { 1514 if ($conn_info['id_type'] == $ preferences['personCardEmail'] and !$default_email_found)1513 if ($conn_info['id_type'] == $this->preferences['personCardEmail'] and !$default_email_found) 1515 1514 { 1516 1515 if ($conn_info['connection_is_default']) … … 1520 1519 $final[3][$i][4] = $conn_info['connection_value'] ? $conn_info['connection_value'] : 'none'; 1521 1520 } 1522 else if ($conn_info['id_type'] == $ preferences['personCardPhone'] and !$default_phone_found)1521 else if ($conn_info['id_type'] == $this->preferences['personCardPhone'] and !$default_phone_found) 1523 1522 { 1524 1523 if ($conn_info['connection_is_default']) … … 1531 1530 // $conn_info['connection_value'] = "<a title=\"".lang("Call Extension")."\" href=\"#\" onclick=\"connectVoip('".$conn_info['connection_value']."', 'ramal')\">".$conn_info['connection_value']."</a>"; 1532 1531 1533 if (!($ _SESSION['phpgw_info']['user']['preferences']['contactcenter']['telephone_number'] == $conn_info['connection_value']) && $_SESSION['phpgw_info']['user']['preferences']['contactcenter']['voip_enabled'] && $conn_info['connection_value'] && preg_match('/^\([0-9]{2}\)[0-9]{4}\-[0-9]{4}$/',$conn_info['connection_value'])==1 && !$external){1532 if (!($this->preferences['telephone_number'] == $conn_info['connection_value']) && $this->preferences['contactcenter']['voip_enabled'] && $conn_info['connection_value'] && preg_match('/^\([0-9]{2}\)[0-9]{4}\-[0-9]{4}$/',$conn_info['connection_value'])==1 && !$external){ 1534 1533 $conn_info['connection_value'] = "<a title=\"".lang("Call Extension")."\" href=\"#\" onclick=\"connectVoip('".$conn_info['connection_value']."', 'com')\">".$conn_info['connection_value']."</a>"; 1535 1534 … … 3317 3316 } 3318 3317 3319 $prefs = ExecMethod('contactcenter.ui_preferences.get_preferences');3320 3321 3318 $jsCode = array(); 3322 3319 $count = 0; … … 3354 3351 3355 3352 foreach ($value as $connection) { 3356 if ($connection['id_type'] == $ prefs['personCardEmail']) {3353 if ($connection['id_type'] == $this->preferences['personCardEmail']) { 3357 3354 $jsCode[] = '_this.entries.options[_this.entries.options.length] = new Option("'.$name.' <'.$connection['connection_value'].'>", "'.$count.'");'; 3358 3355 $count++; -
branches/2.2/contactcenter/js/ccMain.js
r3644 r3795 1 1 var last_id = 0; 2 2 var preferences = null; 3 3 function openwindow(url){ 4 4 var window_features = "scrollbars=yes,resizable=yes,location=no,menubar=no," + … … 43 43 try 44 44 { 45 function ViewLdap(data)45 function handlerInitValues(sdata) 46 46 { 47 if( boolData = eval(data) ) 47 var data = unserialize(sdata); 48 preferences = data.preferences; 49 if( boolData = eval(data.visible_all_ldap) ) 48 50 { 49 51 ccTree = new ccCatalogTree({name: 'ccTree', id_destination: 'cc_tree', afterSetCatalog: 'ccSearchHidePanel(); updateCards()'}); … … 62 64 } 63 65 64 Connector.newRequest(' ViewLdap', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_visible_all_ldap', 'GET', ViewLdap);66 Connector.newRequest('handlerInitValues', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_init_values', 'GET', handlerInitValues); 65 67 66 68 ccTree.Connector = Connector;
Note: See TracChangeset
for help on using the changeset viewer.