Changeset 5075
- Timestamp:
- 09/07/11 16:23:02 (13 years ago)
- Location:
- trunk/expressoMail1_2
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.ldap_functions.inc.php
r4929 r5075 285 285 } 286 286 287 288 /** 289 * Método que faz o roteamento entre os métodos de busca (Catálogo pessoal, global e todos) 290 * @license http://www.gnu.org/copyleft/gpl.html GPL 291 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 292 * @sponsor Caixa Econômica Federal 293 * @author Prognus Software Livre <airton@prognus.com.br | prognus@prognus.com.br> 294 * @param <array> <$param> <parametros vindos do cliente> 295 */ 296 function quicksearchcontact($params) 297 { 298 $modal = false; 299 if($params['catalog']) 300 $modal = true; 301 302 include_once $_SESSION['rootPath']. '/header.inc.php'; 303 304 305 if (stripos( $params['search_for'] , '@' ) !== false) 306 $params['search_for'] = substr($params['search_for'], 0 , stripos( $params['search_for'] , '@' ) ); 307 308 309 if($modal) 310 { 311 if($params['catalog'] == "global") 312 { 313 return $this->quickSearchGlobal($params); 314 } 315 else 316 { 317 if($params['catalog'] == "personal") 318 return $this->quickSearchPersonal($params); 319 else 320 return $this->quickSearchAll($params); 321 } 322 } 323 else 324 { 325 if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['catalog_search'] == "global") 326 { 327 return $this->quickSearchGlobal($params); 328 } 329 else 330 { 331 if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['catalog_search'] == "personal") 332 return $this->quickSearchPersonal($params); 333 else 334 //Veirifica se quem chamou foi o campo de pesquisa rápida Expresso_Mail 335 if(($params['field'] == 'null') && ($params['ID'] == 'null')) 336 return $this->quickSearch($params); 337 else 338 return $this->quickSearchAll($params); 339 } 340 } 341 } 342 343 344 345 /** 346 * Método que faz a busca de usuários em todos os catálogos 347 * @license http://www.gnu.org/copyleft/gpl.html GPL 348 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 349 * @sponsor Caixa Econômica Federal 350 * @author Prognus Software Livre <airton@prognus.com.br | prognus@prognus.com.br> 351 * @param <array> <$param> <parametros vindos do cliente> 352 * @return <array> <$retorno> <Array com os usuários de todos os catálogos, de acordo com o parâmetro> 353 */ 354 function quickSearchAll($params) 355 { 356 357 $retorno_personal = $this->quickSearchPersonal($params); 358 $retorno_global = $this->quickSearchGlobal($params); 359 //$retorno = $retorno_personal + $retorno_global; 360 $retorno = array_merge($retorno_personal, $retorno_global); 361 $retorno['search_for'] = $params['search_for']; 362 $retorno['type_catalog'] = "A"; 363 return $retorno; 364 } 365 366 367 /** 368 * Método que faz a busca de usuários no Catálogo Pessoal 369 * @license http://www.gnu.org/copyleft/gpl.html GPL 370 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 371 * @sponsor Caixa Econômica Federal 372 * @author Prognus Software Livre <airton@prognus.com.br | prognus@prognus.com.br> 373 * @param <array> <$param> <parametros vindos do cliente> 374 * @return <array> <$retorno> <Array com os usuários do Catálogo Pessoal, de acordo com o parâmetro> 375 */ 376 function quickSearchPersonal($params, $all=false) 377 { 378 $results = array(); 379 $DBService = ServiceLocator::getService('db'); 380 $results = $DBService->search_contacts($params['search_for']); 381 382 if(!$all) 383 $results['type_catalog'] = "P"; 384 $results['search_for'] = $params['search_for']; 385 return $results; 386 } 387 388 389 /** 390 * Método que faz a busca de usuários no Catálogo Geral 391 * @license http://www.gnu.org/copyleft/gpl.html GPL 392 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 393 * @sponsor Caixa Econômica Federal 394 * @author Prognus Software Livre <airton@prognus.com.br | prognus@prognus.com.br> 395 * @param <array> <$param> <parametros vindos do cliente> 396 * @return <array> <$retorno> <Array com os usuários do Catálogo Global, de acordo com o parâmetro> 397 */ 398 function quickSearchGlobal($params, $all=false) 399 { 400 include_once $_SESSION['rootPath']. '/header.inc.php'; 401 $c = CreateObject('phpgwapi.config','contactcenter'); 402 $all_data = $c->read_repository(); 403 404 $searchable_fields = array(); 405 foreach($all_data as $index => $value) 406 { 407 $parts = explode('_', $index); 408 if (is_numeric($parts[3]) && $parts[1]=='attribute') 409 { 410 if($parts[2] == 'searchable' && $value == 'true') 411 $searchable_fields[$all_data['cc_attribute_ldapname_' . $parts[3]]] = $all_data['cc_attribute_name_' . $parts[3]]; 412 } 413 } 414 include_once("class.functions.inc.php"); 415 $functions = new functions; 416 $field = $params['field']; 417 $ID = $params['ID']; 418 $ldapService = ServiceLocator::getService('ldap'); 419 $filter = $ldapService->getSearchFilter($params['search_for']); 420 421 $contacts_result = array(); 422 $contacts_result['field'] = $field; 423 $contacts_result['ID'] = $ID; 424 $search_for = utf8_encode($params['search_for']); 425 426 $this->ldapConnect(true); 427 if ($this->ds) 428 { 429 $ldapService->connection = $this->ds; 430 $campos_extras = ''; 431 $justthese = array("cn", "mail", "telephonenumber", "mobile", "phpgwaccountvisible", "uid", "employeenumber", "ou"); 432 foreach($searchable_fields as $fields_ldap => $value_field) 433 { 434 $campos_extras .= $fields_ldap . "|" . $value_field . "#"; 435 array_push($justthese, $fields_ldap); 436 } 437 $types = false; 438 439 $campos_extras = substr($campos_extras,0,-1); 440 441 if($field == 'null' || $ID == 'null') 442 { 443 $justthese[] = "jpegphoto"; 444 $types = 'u'; 445 } 446 $filter = $ldapService->getSearchFilter($params['search_for'], $types); 447 // Retirei o this->max_results, que limitava a busca. Agora ta retornando tudo amigo. 448 $sr=@ldap_search($this->ds, $this->ldap_context, $filter, $justthese, 0); 449 450 if(!$sr) 451 return null; 452 453 $count_entries = ldap_count_entries($this->ds,$sr); 454 $info = ldap_get_entries($this->ds, $sr); 455 $info_return = $info; 456 //if($campos_extras != '') 457 //array_push($info_return, $campos_extras); 458 } 459 ldap_close($this->ds); 460 461 //Busca em Catalagos externos 462 $catalogsNum=count($this->external_srcs); 463 for ($i=0; $i<=$catalogsNum; $i++) { 464 if ($this->external_srcs[$i]["quicksearch"]) 465 { 466 $this->ldapConnect(true,$i); 467 $filter="(|(cn=*$search_for*)(mail=*$search_for*))"; 468 $justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible", "uid","employeeNumber", "ou"); 469 $sr=@ldap_search($this->ds, $this->ldap_context, $filter, $justthese, 0, $this->max_result+1); 470 if(!$sr) 471 return null; 472 $count_entries = ldap_count_entries($this->ds,$sr); 473 $search = ldap_get_entries($this->ds, $sr); 474 for ($j=0; $j<$search["count"]; $j++) { 475 $info_return[] = $search[$j]; 476 } 477 $info_return["count"] = count($info_return)-1; 478 } 479 } 480 //---------------------------------------------------------------// 481 482 if($all == false) 483 $info_return['type_catalog'] = "G"; 484 485 $info_return['search_for'] = $params['search_for']; 486 $info_return['extra_ldap_fields'] = $campos_extras; 487 return $info_return; 488 } 489 490 491 492 493 494 495 287 496 function make_quicksearch_card($info, $cn) 288 497 { -
trunk/expressoMail1_2/inc/hook_settings.inc.php
r4885 r5075 411 411 create_select_box('What is the maximum size of embedded images?','image_size',$default,'When user send an email with image in body message, it changes the size'); 412 412 413 $default = array( 414 'global' => lang("Global catalog"), 415 'personal' => lang("Personal catalog"), 416 'all' => lang("All catalogs") 417 ); 418 419 create_select_box('The dynamic search will use the catalog','catalog_search',$default,'Seleciona o catálogo que será usado para fazer a busca'); 420 421 422 413 423 if($GLOBALS['phpgw_info']['server']['use_assinar_criptografar']) 414 424 { … … 439 449 $vars = $GLOBALS['phpgw']->preferences->user['expressoMail']; 440 450 441 create_html_code("signature","<script src='../library/jquery/jquery -1.6.1.min.js' language='javascript'></script><script src='../library/tiny_mce/jquery.tinymce.js' language='javascript'></script><script src='../library/tiny_mce/tiny_mce.js' language='javascript'></script>451 create_html_code("signature","<script src='../library/jquery/jquery.js' language='javascript'></script><script src='../library/tiny_mce/jquery.tinymce.js' language='javascript'></script><script src='../library/tiny_mce/tiny_mce.js' language='javascript'></script> 442 452 <input type='hidden' id='counter' value='0'> 443 453 <input type='hidden' id='signatures' name='user[signatures]' value='". $vars['signatures']."'> -
trunk/expressoMail1_2/index.php
r4832 r5075 144 144 $template->set_var("user_organization", $acc->get_organization($GLOBALS['phpgw_info']['user']['account_dn'])); 145 145 $template->set_var("cyrus_delimiter",$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter']); 146 $template->set_var("lang_contact_details", lang("Contact Details")); 147 $template->set_var("lang_catalog", lang("catalog")); 148 $template->set_var("lang_search", lang("search")); 149 $template->set_var("lang_page", lang("page")); 150 $template->set_var("lang_quick_search_users_dialog_title", lang("Quick Search Contacts")); 151 $template->set_var("lang_global_catalog", lang("Global Catalog")); 152 $template->set_var("lang_personal_catalog", lang("Personal Catalog")); 153 $template->set_var("lang_all_catalogs", lang("All Catalogs")); 146 154 // Fix problem with cyrus delimiter changes in preferences. 147 155 // Dots in names: enabled/disabled. -
trunk/expressoMail1_2/js/QuickCatalogSearch.js
r4833 r5075 6 6 this.cc_groups = new Array(); 7 7 } 8 9 emQuickCatalogSearch.prototype.showList = function(data, begin, end){ 10 connector.loadScript("ccQuickAdd"); 11 12 if(preferences.use_shortcuts == '0'){ 13 connector.loadScript("shortcut"); 14 } 8 9 emQuickCatalogSearch.prototype.showList = function(data, begin, end, ID, field) 10 { 11 data_ = data; 12 id_ = ID; 13 field_ = field; 14 begin_ = begin; 15 end_ = end; 16 17 keypress_read(data); 18 init_results(data); 19 configure_slider(data); 20 details_results(data); 21 22 connector.loadScript("ccQuickAdd"); 23 24 if(preferences.use_shortcuts == '0'){ 25 connector.loadScript("shortcut"); 26 } 15 27 16 28 id = '1'; 17 29 _this = this; 18 30 var el_A = document.createElement("DIV"); 19 31 el_A.style.visibility = "hidden"; 20 32 el_A.style.position = "absolute"; … … 25 37 el_A.id = 'window_QuickCatalogSearch_A'; 26 38 document.body.appendChild(el_A); 27 el_A.innerHTML = ""; 28 29 var el = document.createElement("DIV"); 30 el.style.visibility = "hidden"; 31 el.style.position = "absolute"; 32 el.style.left = "0px"; 33 el.style.top = "40px"; 34 el.style.width = "695px"; 35 el.style.height = "186px"; 36 el.style.overflow = "auto"; 37 el.id = 'window_QuickCatalogSearch'; 38 el_A.appendChild(el); 39 el.innerHTML = ""; 40 41 42 func_add_contact = function () { 43 var select_QuickCatalogSearch = document.getElementById("select_QuickCatalogSearch"); 44 var contact_selected = select_QuickCatalogSearch.options[select_QuickCatalogSearch.selectedIndex].text; 45 46 contact_selected = contact_selected.split('('); 47 48 var first_and_last_name = contact_selected[0].split(" "); 49 50 var data = []; 51 data[0] = first_and_last_name[0]; 52 data[1] = first_and_last_name[0]; 53 data[2] = ""; 54 55 for (i=1; i < first_and_last_name.length; i++) 56 data[2] += first_and_last_name[i] + " "; 57 58 data[2] = data[2].replace(/\s*$/g,''); 59 data[3] = contact_selected[1].substring(0, contact_selected[1].indexOf(")") ); 60 61 ccQuickAddOne.showList( data ); 39 el_A.innerHTML = ""; 40 41 func_add_contact = function () { 62 42 }; 63 43 64 var title_innerHTML = get_lang('Select a name') + ':'; 65 if (data.quickSearch_only_in_userSector) 66 title_innerHTML += "<font color='BLACK' nowrap> ("+get_lang('Showing only the results found in your organization')+".)</font>" 67 68 var title = document.createElement("SPAM"); 69 title.id = 'window_QuickCatalogSearch_title'; 70 title.innerHTML = " <b><font color='BLUE' nowrap>"+title_innerHTML+"</font></b><br> "; 71 el_A.appendChild(title); 72 var butt = document.createElement('BUTTON'); 73 var buttext = document.createTextNode('OK'); 74 butt.id = "QuickCatalogSearch_button_ok"; 75 butt.appendChild(buttext); 76 butt.onclick = function () {QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end);}; 77 el_A.appendChild(butt); 78 79 var space = document.createElement('SPAN'); 80 space.innerHTML = " "; 81 el_A.appendChild(space); 82 83 var butt = document.createElement('BUTTON'); 84 butt.id = "QuickCatalogSearch_button_close"; 85 var buttext = document.createTextNode(get_lang('Close')); 86 butt.appendChild(buttext); 87 butt.onclick = function () {QuickCatalogSearch.close_QuickSearch_window(data.field, data.ID);}; 88 el_A.appendChild(butt); 89 90 var space = document.createElement('SPAN'); 91 space.innerHTML = " "; 92 el_A.appendChild(space); 93 94 var butt = document.createElement('BUTTON'); 95 butt.id = "QuickCatalogSearch_button_add_contact"; 96 var buttext = document.createTextNode(get_lang("Add Contact")); 97 butt.appendChild(buttext); 98 butt.onclick = func_add_contact; 99 el_A.appendChild(butt); 100 101 if (document.getElementById('select_QuickCatalogSearch') == null){ 102 103 var cmb = document.createElement("SELECT"); 104 cmb.id = "select_QuickCatalogSearch"; 105 cmb.style.width = "2400px"; 106 //cmb.size = "12"; 107 cmb.ondblclick = function() {QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end);}; 108 cmb.onkeypress = function (e) 44 _this.showWindow(el_A); 45 } 46 47 48 function keypress_read(data) 49 { 50 $("#dialog-modal").keypress(function (e) 51 { 52 var keyCode = e.keyCode || e.which, 53 arrow = {left: 37, up: 38, right: 39, down: 40, enter: 13, esc: 27 }; 54 var slider = $( "#slider" ); 55 switch (keyCode) 109 56 { 110 if (is_ie) 57 case arrow.enter: 58 add_contact_field(document.getElementsByClassName("ui-selected")[0].getElementsByClassName("name_contact")[0].innerHTML); 59 $("#dialog-modal").dialog("close"); 60 break; 61 62 case arrow.left: 63 slider.slider( "value", $( "#slider" ).slider( "value" ) - 1); 64 create_list(data_); 65 break; 66 67 case arrow.right: 68 if( (($( "#slider" ).slider( "value" ))) == Math.ceil(data_.length/7) ) 69 { 70 alert("Não há mais páginas"); 71 break; 72 } 73 slider.slider( "value", $( "#slider" ).slider( "value" ) + 1); 74 create_list(data_); 75 break; 76 77 case arrow.up: 78 id_contact = document.getElementsByClassName("ui-selected")[0].value; 79 if(id_contact == (($( "#slider" ).slider( "value" ) -1)*7)) 80 break; 81 var line_contact = $('li.ui-selected'); 82 $('li.ui-selected').prev().removeClass("ui-selectee").addClass("ui-selected"); //css('background-color', '#72A9D3'); 83 line_contact.removeClass("ui-selected").addClass("ui-selectee"); 84 var details = $("#detalhes_contato").empty(); 85 $( ".ui-selected", this ).each(function() { 86 if(data_['type_catalog'] == 'G') 87 { 88 var extra_fields = (data_['extra_ldap_fields']).split("#"); 89 /* Default fields */ 90 details.append("<strong>" + utf8_decoder(data_[this.value].cn[0])); 91 details.append("<br />" + data_[this.value].mail[0]); 92 details.append("<br /><br /><strong>Matrícula<br />"); 93 details.append(data_[this.value].employeenumber[0] + "<br />"); 94 details.append("<br /><strong> Telefone <br />"); 95 details.append(data_[this.value].telephonenumber[0] + "<br />"); 96 details.append(data_[this.value].telephonenumber[0]); 97 for (var i=0; i<extra_fields.length-1; i++) 98 { 99 var campo = extra_fields[i].substr(extra_fields[i].indexOf("|")+1); 100 var valor = extra_fields[i].substr(0, (extra_fields[i].indexOf("|"))); 101 if(data_[this.value][valor] != undefined) 102 { 103 details.append("<br /><br /><strong>" + campo); 104 details.append("<br />" + data_[this.value][valor][0]); 105 } 106 } 107 } 108 else 109 { 110 if(data_['type_catalog'] == 'P') 111 { 112 /* Default fields */ 113 details.append("<strong>" + utf8_decoder(data_[this.value].cn)); 114 details.append("<br />" + data_[this.value].mail); 115 if(data_[this.value].telephonenumber != "") 116 { 117 details.append("<br /><br /><br /><strong> Telefone <br />"); 118 details.append(data_[this.value].telephonenumber + "<br />"); 119 } 120 } 121 else 122 { 123 var extra_fields = (data_['extra_ldap_fields']).split("#"); 124 /* Default fields */ 125 details.append("<strong>" + utf8_decoder(data_[this.value].cn)); 126 details.append("<br />" + data_[this.value].mail); 127 if(data_[this.value].telephonenumber != "") 128 { 129 details.append("<br /><br /><br /><strong> Telefone <br />"); 130 details.append(data_[this.value].telephonenumber + "<br />"); 131 } 132 if(data_[this.value].mail[0].length > 1) 133 { 134 for (var i=0; i<extra_fields.length-1; i++) 135 { 136 var campo = extra_fields[i].substr(extra_fields[i].indexOf("|")+1); 137 var valor = extra_fields[i].substr(0, (extra_fields[i].indexOf("|"))); 138 if(data_[this.value][valor] != undefined) 139 { 140 details.append("<br /><br /><strong>" + campo); 141 details.append("<br />" + data_[this.value][valor][0]); 142 } 143 } 144 } 145 } 146 } 147 }); 148 break; 149 150 case arrow.down: 151 id_contact = document.getElementsByClassName("ui-selected")[0].value; 152 if((id_contact == (((((parseInt($( "#slider" ).slider( "value" )) - 1)*7))+7)-1)) || id_contact == data_.length - 2 || data_.length == 1) 153 break; 154 var line_contact = $('li.ui-selected'); 155 $('li.ui-selected').next().removeClass("ui-selectee").addClass("ui-selected"); 156 line_contact.removeClass("ui-selected").addClass("ui-selectee"); 157 var details = $("#detalhes_contato").empty(); 158 $( ".ui-selected", this ).each(function() { 159 if(data_['type_catalog'] == 'G') 160 { 161 var extra_fields = (data_['extra_ldap_fields']).split("#"); 162 /* Default fields */ 163 details.append("<strong>" + utf8_decoder(data_[this.value].cn[0])); 164 details.append("<br />" + data_[this.value].mail[0]); 165 details.append("<br /><br /><strong>Matrícula<br />"); 166 details.append(data_[this.value].employeenumber[0] + "<br />"); 167 details.append("<br /><strong> Telefone <br />"); 168 details.append(data_[this.value].telephonenumber[0] + "<br />"); 169 details.append(data_[this.value].telephonenumber[0]); 170 for (var i=0; i<extra_fields.length-1; i++) 171 { 172 var campo = extra_fields[i].substr(extra_fields[i].indexOf("|")+1); 173 var valor = extra_fields[i].substr(0, (extra_fields[i].indexOf("|"))); 174 if(data_[this.value][valor] != undefined) 175 { 176 details.append("<br /><br /><strong>" + campo); 177 details.append("<br />" + data_[this.value][valor][0]); 178 } 179 } 180 } 181 else 182 { 183 if(data_['type_catalog'] == 'P') 184 { 185 /* Default fields */ 186 details.append("<strong>" + utf8_decoder(data_[this.value].cn)); 187 details.append("<br />" + data_[this.value].mail); 188 if(data_[this.value].telephonenumber != "") 189 { 190 details.append("<br /><br /><br /><strong> Telefone <br />"); 191 details.append(data_[this.value].telephonenumber + "<br />"); 192 } 193 } 194 else 195 { 196 var extra_fields = (data_['extra_ldap_fields']).split("#"); 197 /* Default fields */ 198 details.append("<strong>" + utf8_decoder(data_[this.value].cn)); 199 details.append("<br />" + data_[this.value].mail); 200 if(data_[this.value].telephonenumber != "") 201 { 202 details.append("<br /><br /><br /><strong> Telefone <br />"); 203 details.append(data_[this.value].telephonenumber + "<br />"); 204 } 205 if(data_[this.value].mail[0].length > 1) 206 { 207 for (var i=0; i<extra_fields.length-1; i++) 208 { 209 var campo = extra_fields[i].substr(extra_fields[i].indexOf("|")+1); 210 var valor = extra_fields[i].substr(0, (extra_fields[i].indexOf("|"))); 211 if(data_[this.value][valor] != undefined) 212 { 213 details.append("<br /><br /><strong>" + campo); 214 details.append("<br />" + data_[this.value][valor][0]); 215 } 216 } 217 } 218 } 219 } 220 }); 221 break; 222 } 223 }); 224 } 225 226 227 228 /* 229 * Método que cria a lista de contatos 230 */ 231 function create_list(data) 232 { 233 $("#detalhes_contato").empty(); 234 var paginas = Math.ceil(data.length/7) - 1; 235 $("#title_usuarios").html( get_lang("Results") ); 236 var string_results = $( "#slider" ).slider( "value" ) + " " + get_lang("of") + " " + paginas + " (" + data.length + " " + get_lang("Results") + ")"; 237 var selectable = $("#selectable"); 238 selectable.empty(); 239 var Ul = document.createElement("ul"); 240 var Op = document.createElement("li"); 241 for (i=(($( "#slider" ).slider( "value" ) -1)*7)+1; i<((($( "#slider" ).slider( "value" ) -1)*7)+1)+7; i++) 242 { 243 if(i >= data.length) 244 break; 245 if (data['type_catalog'] != 'G' && (data[i-1].mail == null || data[i-1].mail == "")) 246 data[i-1].mail = "No mail"; 247 if(i == ((($( "#slider" ).slider( "value" ) -1)*7)+1)){ 248 Op.setAttribute("class", "ui-selected"); 249 } 250 else { 251 Op.setAttribute("class", "ui-selectee"); 252 } 253 var contact_name = utf8_decoder(data[i-1].cn); 254 if(contact_name.substring(contact_name.toLowerCase().indexOf(data.search_for.toLowerCase())) != -1) 255 contact_name = contact_name.substring(0, contact_name.toLowerCase().indexOf(data.search_for.toLowerCase())) + "<u>" + contact_name.substr(contact_name.toLowerCase().indexOf(data.search_for.toLowerCase()), data.search_for.length) + "</u>" + contact_name.substring(contact_name.toLowerCase().indexOf(data.search_for.toLowerCase()) + data.search_for.length); 256 Op.innerHTML = '<span style="float:right; left:335px; position: absolute; z-index: 100; background-color: #EEE; padding:0"><button onClick="add_contact_field(contact_' + i + '.innerHTML)">+</button><button onClick="remove_contact_field(contact_' + i + '.innerHTML)">x</button></span><div id=contact_' + i + ' onDblClick="add_contact_field(this.innerHTML)"><div class="name_contact"><strong>' + contact_name + '</strong><em>' + utf8_decoder(data[i-1].mail) + '</em></div></div>'; 257 $(Op).val(i - 1); 258 Ul.appendChild(Op); 259 selectable.append(Ul.innerHTML); 260 } 261 $( "#amount" ).val( string_results ); 262 $( "#amount" ).val( $( "#slider" ).slider( "value" ) + " " + get_lang("of") + " " + paginas + " (" + data.length + " " + get_lang("Results") + ")"); 263 document.getElementById("amount").focus(); 264 } 265 266 267 268 269 270 271 function details_results(data) 272 { 273 $(function() { 274 $( "#selectable" ).selectable({ 275 stop: function() { 276 var details = $("#detalhes_contato").empty(); 277 $( ".ui-selected", this ).each(function() { 278 if(data['type_catalog'] == 'G') 279 { 280 var extra_fields = (data['extra_ldap_fields']).split("#"); 281 /* Default fields */ 282 details.append("<strong>" + utf8_decoder(data[this.value].cn[0])); 283 details.append("<br />" + data[this.value].mail[0]); 284 details.append("<br /><br /><strong>Matrícula<br />"); 285 details.append(data[this.value].employeenumber[0] + "<br />"); 286 details.append("<br /><strong> Telefone <br />"); 287 details.append(data[this.value].telephonenumber[0] + "<br />"); 288 details.append(data[this.value].telephonenumber[0]); 289 for (var i=0; i<extra_fields.length-1; i++) 290 { 291 var campo = extra_fields[i].substr(extra_fields[i].indexOf("|")+1); 292 var valor = extra_fields[i].substr(0, (extra_fields[i].indexOf("|"))); 293 if(data[this.value][valor] != undefined) 294 { 295 details.append("<br /><br /><strong>" + campo); 296 details.append("<br />" + data[this.value][valor][0]); 297 } 298 } 299 } 300 else 301 { 302 if(data['type_catalog'] == 'P') 303 { 304 /* Default fields */ 305 details.append("<strong>" + utf8_decoder(data[this.value].cn)); 306 details.append("<br />" + data[this.value].mail); 307 if(data[this.value].telephonenumber != "") 308 { 309 details.append("<br /><br /><br /><strong> Telefone <br />"); 310 details.append(data[this.value].telephonenumber + "<br />"); 311 } 312 } 313 else 314 { 315 var extra_fields = (data['extra_ldap_fields']).split("#"); 316 /* Default fields */ 317 details.append("<strong>" + utf8_decoder(data[this.value].cn)); 318 details.append("<br />" + data[this.value].mail); 319 if(data[this.value].telephonenumber != "") 320 { 321 details.append("<br /><br /><br /><strong> Telefone <br />"); 322 details.append(data[this.value].telephonenumber + "<br />"); 323 } 324 if(data[this.value].mail[0].length > 1) 325 { 326 for (var i=0; i<extra_fields.length-1; i++) 327 { 328 var campo = extra_fields[i].substr(extra_fields[i].indexOf("|")+1); 329 var valor = extra_fields[i].substr(0, (extra_fields[i].indexOf("|"))); 330 if(data[this.value][valor] != undefined) 331 { 332 details.append("<br /><br /><strong>" + campo); 333 details.append("<br />" + data[this.value][valor][0]); 334 } 335 } 336 } 337 } 338 } 339 }); 340 } 341 }); 342 }); 343 } 344 345 346 /* 347 * Método que inicializa a tela de contatos 348 */ 349 function init_results(data) 350 { 351 var Op = null; 352 var Ul = null; 353 var selectable = $("#selectable"); 354 selectable.empty(); 355 Ul = document.createElement("ul"); 356 Op = document.createElement("li"); 357 var limit = data.length < 7 ? data.length : 7; 358 for (i=1; i<=limit; i++) 359 { 360 Op.setAttribute("class", "ui-selectee"); 361 if(i == 1) 362 Op.setAttribute("class", "ui-selected"); 363 var contact_name = utf8_decoder(data[i-1].cn); 364 if(data['type_catalog'] != 'G' && (data[i-1].mail == null || data[i-1].mail == "")) 111 365 { 112 if ((window.event.keyCode) == 13) 113 { 114 QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end); 115 } 116 else if ((window.event.keyCode) == 27) 117 { 118 QuickCatalogSearch.close_QuickSearch_window(data.field, data.ID); 119 } 366 data[i-1].mail = "No mail"; 120 367 } 368 369 if(contact_name.substring(contact_name.toLowerCase().indexOf(data.search_for.toLowerCase())) != -1) 370 contact_name = contact_name.substring(0, contact_name.toLowerCase().indexOf(data.search_for.toLowerCase())) + "<u>" + contact_name.substr(contact_name.toLowerCase().indexOf(data.search_for.toLowerCase()), data.search_for.length) + "</u>" + contact_name.substring(contact_name.toLowerCase().indexOf(data.search_for.toLowerCase()) + data.search_for.length); 371 Op.innerHTML = '<span style="float:right; left:335px; position: absolute; z-index: 100; background-color: #EEE; padding:0"><button onClick="add_contact_field(contact_' + i + '.innerHTML)">+</button><button onClick="remove_contact_field(contact_' + i + '.innerHTML)">x</button></span><div class="id_contact_field" id=contact_' + i + ' onDblClick="add_contact_field(this.innerHTML)"><div class="name_contact"><strong>' + contact_name + '</strong><em>' + utf8_decoder(data[i-1].mail) + '</em></div></div>'; 372 $(Op).val(i - 1); 373 Ul.appendChild(Op); 374 selectable.append(Ul.innerHTML); 375 } 376 $("#adds").html("Foram adicionados " + quantidade_contatos + " contatos."); 377 } 378 379 380 /* 381 * Método que configura o slider e os resultados 382 */ 383 function configure_slider(data) 384 { 385 $("#detalhes_contato").empty(); 386 var paginas = Math.ceil(data.length/7); 387 $("#title_usuarios").html( get_lang("Results") ); 388 $(function() { 389 $( "#slider" ).slider({ 390 value:1, 391 min: 1, 392 max: paginas, 393 step: 1, 394 slide: function( event, ui ) 395 { 396 var string_results = ui.value + " " + get_lang("of") + " " + paginas + " (" + data.length + " " + get_lang("Results") + ")"; 397 var selectable = $("#selectable"); 398 selectable.empty(); 399 var Ul = document.createElement("ul"); 400 var Op = document.createElement("li"); 401 for (i=((ui.value-1)*7)+1; i<(((ui.value-1)*7)+1)+7; i++) 402 { 403 if(data['type_catalog'] != 'G' && (data[i-1].mail == null || data[i-1].mail == "")) 404 { 405 data[i-1].mail = "No mail"; 406 } 407 var contact_name = utf8_decoder(data[i].cn); 408 if(contact_name.substring(contact_name.toLowerCase().indexOf(data.search_for.toLowerCase())) != -1) 409 contact_name = contact_name.substring(0, contact_name.toLowerCase().indexOf(data.search_for.toLowerCase())) + "<u>" + contact_name.substr(contact_name.toLowerCase().indexOf(data.search_for.toLowerCase()), data.search_for.length) + "</u>" + contact_name.substring(contact_name.toLowerCase().indexOf(data.search_for.toLowerCase()) + data.search_for.length); 410 411 Op.setAttribute("class", "ui-selectee"); 412 Op.innerHTML = '<span style="float:right; left:335px; position: absolute; z-index: 100; background-color: #EEE; padding:0"><button onClick="add_contact_field(contact_' + i + '.innerHTML)">+</button><button onClick="remove_contact_field(contact_' + i + '.innerHTML)">x</button></span><div class="id_contact_field" id=contact_' + i + ' onDblClick="add_contact_field(this.innerHTML)"><div class="name_contact"><strong>' + contact_name + '</strong><em>' + utf8_decoder(data[i].mail) + '</em></div></div>'; 413 $(Op).val(i); 414 Ul.appendChild(Op); 415 selectable.append(Ul.innerHTML); 416 } 417 $( "#amount" ).val( string_results ); 418 $(this).unbind('keypress'); 419 document.getElementById("amount").focus(); 420 } 421 }); 422 $( "#amount" ).val( $( "#slider" ).slider( "value" ) + " " + get_lang("of") + " " + paginas + " (" + data.length + " " + get_lang("Results") + ")"); 423 }); 424 } 425 426 427 428 function checkEnter(e) 429 { 430 var kC = window.event ? event.keyCode : 431 e && e.keyCode ? e.keyCode : 432 e && e.which ? e.which : null; 433 if (kC) { 434 //$("#dialog-modal").unbind('keypress'); 435 return kC == 13; 436 } 437 else{ 438 return false; 439 } 440 } 441 442 /* 443 * Faz a busca direto da tela modal 444 */ 445 function buscaContato(param) 446 { 447 $("#busca").empty(); 448 if(param.length == 0) 449 { 450 alert(get_lang("Please enter a parameter to search.")); 451 return false; 452 } 453 if(param.length < preferences.search_characters_number) 454 { 455 alert(get_lang("parameter must be at least") + " " + preferences.search_characters_number + " " + get_lang("characters")); 456 return false; 457 } 458 var catalog = $("#combobox").val(); 459 var handler_emQuickSearch = function(data) 460 { 461 data_ = data; 462 if(data_.length > 0) 463 { 464 init_results(data_); 465 configure_slider(data_); 466 details_results(data_); 467 } 468 else 469 { 470 $("#detalhes_contato, #selectable").empty(); 471 configure_slider(data); 472 } 473 } 474 cExecute ("$this.ldap_functions.quicksearchcontact&search_for="+param+"&field=TO&ID=0&catalog="+catalog, handler_emQuickSearch); 475 } 476 477 478 quantidade_contatos = 0; 479 /* 480 * Método que adiciona o contato selecionado no campo do email (To, CC, CCo) 481 */ 482 function add_contact_field(contact) 483 { 484 quantidade_contatos++; 485 $("#adds").html("Foram adicionados " + quantidade_contatos + " contatos."); 486 var emailList = document.getElementById(field_ + "_" + id_).value; 487 var contact_parsed = contact.replace(/<\/?[^>]+>/gi, ' '); 488 contact_parsed = contact_parsed.replace(/^\s+|\s+$/gi, "").replace(/\s{2,}/gi, "|"); 489 var tokens_contact = contact_parsed.split("|"); 490 491 if (tokens_contact[1].indexOf("(") > 0) 492 tokens_contact[1] = tokens_contact[1].substr(0, (tokens_contact[1].indexOf("("))-2); 493 494 var final_contact; 495 if(tokens_contact[2] == undefined) 496 final_contact = "\"" + tokens_contact[0] + " " + "\" <" + tokens_contact[1] + ">, "; 497 else 498 { 499 if(tokens_contact[3] == undefined) 500 final_contact = "\"" + tokens_contact[0] + " " + tokens_contact[1] + "\" <" + tokens_contact[2] + ">, "; 121 501 else 502 final_contact = "\"" + tokens_contact[0] + " " + tokens_contact[1] + " " + tokens_contact[2] + "\" <" + tokens_contact[3] + ">, "; 503 } 504 if (emailList[0] != '"') 505 emailList = emailList.substr(end_); 506 507 if(emailList.lastIndexOf(",") > 0) 508 emailList = emailList.substr(0, emailList.lastIndexOf(",") + 2); 509 510 new_emailList = emailList + final_contact; 511 document.getElementById(field_ + "_" + id_).value = new_emailList; 512 document.getElementById(field_ + "_" + id_).focus(); 513 $(this).unbind('keypress'); 514 $(this).dialog("close"); 515 } 516 517 /* 518 * Método que remove o contato selecionado no campo do email (To, CC, CCo) 519 */ 520 function remove_contact_field(contact) 521 { 522 var contact_parsed = contact.replace(/<\/?[^>]+>/gi, ' '); 523 contact_parsed = contact_parsed.replace(/^\s+|\s+$/gi, "").replace(/\s{2,}/gi, "|"); 524 var tokens_contact = contact_parsed.split("|"); 525 526 if (tokens_contact[2].indexOf("(") > 0) 527 tokens_contact[2] = tokens_contact[2].substr(0, (tokens_contact[2].indexOf("("))-2); 528 var final_contact; 529 if(tokens_contact[3] == undefined) 530 final_contact = "\"" + tokens_contact[0] + " " + tokens_contact[1] + "\" <" + tokens_contact[2] + ">"; 531 else 532 final_contact = "\"" + tokens_contact[0] + " " + tokens_contact[1] + " " + tokens_contact[2] + "\" <" + tokens_contact[3] + ">"; 533 534 if(quantidade_contatos ==0) 535 { 536 alert("Nenhum contato adicionado!"); 537 return false; 538 } 539 540 var encontrou = false; 541 var emailList = document.getElementById(field_ + "_" + id_).value; 542 var emails_adicionados = emailList.split(","); 543 var quantidade_excluidos = 0; 544 for(i=0; i<emails_adicionados.length -1; i++) 545 { 546 if(emails_adicionados[i].trim() == final_contact) 122 547 { 123 if ((e.keyCode) == 13) 124 { 125 QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end); 126 } 127 else if ((e.keyCode) == 27) 128 { 129 QuickCatalogSearch.close_QuickSearch_window(data.field, data.ID); 130 } 548 emails_adicionados[i] = "%"; 549 quantidade_excluidos++; 550 encontrou = true; 131 551 } 132 }; 133 el.appendChild(cmb); 134 135 } 136 else{ 137 var title_innerHTML = get_lang('Select a name') + ':'; 138 if (data.quickSearch_only_in_userSector) 139 title_innerHTML += "<font color='BLACK' nowrap> ("+get_lang('Showing only the results found in your organization')+".)</font>" 140 141 var title = Element('window_QuickCatalogSearch_title'); 142 title.innerHTML = " <b><font color='BLUE' nowrap>"+title_innerHTML+"</font></b><br> "; 143 144 var cmb = document.getElementById('select_QuickCatalogSearch'); 145 cmb.ondblclick = function() {QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end);}; 146 cmb.onkeypress = function (e) 552 } 553 if (encontrou == false) 147 554 { 148 if (is_ie) 149 { 150 if ((window.event.keyCode) == 13) 151 { 152 QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end); 153 } 154 else if ((window.event.keyCode) == 27) 155 { 156 QuickCatalogSearch.close_QuickSearch_window(data.field, data.ID); 157 } 158 } 159 else 160 { 161 if ((e.keyCode) == 13) 162 { 163 QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end); 164 } 165 else if ((e.keyCode) == 27) 166 { 167 QuickCatalogSearch.close_QuickSearch_window(data.field, data.ID); 168 } 169 } 170 }; 171 172 for (i=0; i<cmb.length; i++) 173 cmb.options[i--] = null; 174 175 var butt_ok = document.getElementById("QuickCatalogSearch_button_ok"); 176 var butt_close = document.getElementById("QuickCatalogSearch_button_close"); 177 var butt_add_contact = document.getElementById("QuickCatalogSearch_button_add_contact"); 178 butt_ok.onclick = function () {QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end);}; 179 butt_close.onclick = function () {QuickCatalogSearch.close_QuickSearch_window(data.field, data.ID);}; 180 butt_add_contact.onclick = func_add_contact; 181 } 182 183 for (i=0; i<data.length; i++){ 184 var Op = document.createElement("OPTION"); 185 Op.text = data[i].cn + ' (' + data[i].mail + ')'; 186 if (data[i].phone != '') 187 Op.text += ' - ' + data[i].phone; 188 if (data[i].ou != '') 189 Op.text += ' - ' + data[i].ou; // adicionado "data[i].ou" para exibir setor (F9) 190 Op.value = '"' + data[i].cn + '" ' + '<' + data[i].mail + '>'; 191 cmb.options.add(Op); 192 } 193 cmb.options[0].selected = true; 194 cmb.size = data.length+1; 195 _this.showWindow(el_A); 196 } 197 555 alert("Não pode excluir um contato que ainda não adicionou."); 556 return false; 557 } 558 559 quantidade_contatos -= quantidade_excluidos; 560 $("#adds").html("Foram adicionados " + quantidade_contatos + " contatos."); 561 562 var novos_contatos = emails_adicionados.join(","); 563 novos_contatos = novos_contatos.replace(/%,/g, ""); 564 document.getElementById(field_ + "_" + id_).value = novos_contatos; 565 } 566 567 568 function utf8_decoder ( str_data ) 569 { 570 var tmp_arr = [], i = 0, ac = 0, c1 = 0, c2 = 0, c3 = 0; 571 572 str_data += ''; 573 574 while ( i < str_data.length ) 575 { 576 c1 = str_data.charCodeAt(i); 577 if (c1 < 128) 578 { 579 tmp_arr[ac++] = String.fromCharCode(c1); 580 i++; 581 } else if ((c1 > 191) && (c1 < 224)) 582 { 583 c2 = str_data.charCodeAt(i+1); 584 tmp_arr[ac++] = String.fromCharCode(((c1 & 31) << 6) | (c2 & 63)); 585 i += 2; 586 } else { 587 c2 = str_data.charCodeAt(i+1); 588 c3 = str_data.charCodeAt(i+2); 589 tmp_arr[ac++] = String.fromCharCode(((c1 & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); 590 i += 3; 591 } 592 } 593 594 return tmp_arr.join(''); 595 } 596 597 598 function show_help() 599 { 600 $(function() { 601 $( "#dialog-modal_help" ).dialog({ 602 resizable: false, 603 height: 230, 604 width: 540, 605 modal: true, 606 closeOnEscape: true, 607 608 }); 609 }); 610 } 611 612 198 613 emQuickCatalogSearch.prototype.showWindow = function (div) 199 614 { 200 if(! div) { 615 $(this).bind('keypress'); 616 $(function() { 617 $( "#dialog:ui-dialog" ).dialog( "destroy" ); 618 $( "#dialog-modal" ).dialog({ 619 resizable: false, 620 height: 530, 621 width: 940, 622 modal: true, 623 closeOnEscape: true, 624 close: function (event, ui) { 625 event.stopPropagation(); 626 $(this).unbind('keypress'); 627 }, 628 focus: function (event, ui) { 629 $(this).bind('keypress'); 630 }, 631 beforeClose: function (event, ui) { 632 $(this).bind('keypress'); 633 }, 634 buttons:{ 635 'Fechar' : function(){ 636 $("#detalhes_contato, #selectable, #busca").empty(); 637 $(this).dialog("close"); 638 } 639 } 640 }); 641 }); 642 643 644 645 if(! div) { 201 646 alert(get_lang('The list has no participant.')); 202 647 return; … … 222 667 button_x_img: '../phpgwapi/images/winclose.gif', 223 668 border: true, 224 onclose: 'QuickCatalogSearch.restoreShortcuts("'+ div.id +'")' 669 onclose: 'QuickCatalogSearch.restoreShortcuts("'+ div.id +'")'}); 225 670 226 671 this.arrayWin[div.id] = win; … … 230 675 win = this.arrayWin[div.id]; 231 676 } 232 document.getElementById("window_QuickCatalogSearch").style.visibility = "visible";233 win.open();234 document.getElementById('select_QuickCatalogSearch').focus();677 //document.getElementById("window_QuickCatalogSearch").style.visibility = "visible"; 678 //win.open(); 679 //document.getElementById('select_QuickCatalogSearch').focus(); 235 680 236 681 if(is_ie && (preferences.use_shortcuts == '1')){ … … 249 694 document.getElementById(field + "_" + ID).value = new_emailList; 250 695 document.getElementById(field + "_" + ID).focus(); 251 252 696 this.arrayWin['window_QuickCatalogSearch_A'].close(); 253 697 document.getElementById("window_QuickCatalogSearch").style.visibility = "hidden"; … … 397 841 title_text_color: 'white', 398 842 button_x_img: '../phpgwapi/images/winclose.gif', 399 border: true 843 border: true}); 400 844 401 845 this.arrayWin[el.id] = win; -
trunk/expressoMail1_2/js/common_functions.js
r4929 r5075 561 561 var handler_emQuickSearch = function(data) 562 562 { 563 window_DropDownContacts = Element('tipDiv');564 if (window_DropDownContacts.style.visibility != 'hidden'){565 window_DropDownContacts.style.visibility = 'hidden';566 }567 563 568 564 if ((!data.status) && (data.error == "many results")){ … … 574 570 if ((field != 'null') && (ID != 'null')) 575 571 { 576 QuickCatalogSearch.showList(data, quickSearchKeyBegin, quickSearchKeyEnd );572 QuickCatalogSearch.showList(data, quickSearchKeyBegin, quickSearchKeyEnd, ID, field); 577 573 } 578 574 else … … 612 608 } 613 609 614 cExecute ("$this.ldap_functions.quicksearch &search_for="+search_for+"&field="+field+"&ID="+ID, handler_emQuickSearch);610 cExecute ("$this.ldap_functions.quicksearchcontact&search_for="+search_for+"&field="+field+"&ID="+ID, handler_emQuickSearch); 615 611 } 616 612 -
trunk/expressoMail1_2/preferences.php
r4231 r5075 257 257 } 258 258 259 if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['catalog_search']) 260 $GLOBALS['phpgw']->preferences->change('expressoMail', 'catalog_search', $_POST['catalog_search']); 261 else 262 $GLOBALS['phpgw']->preferences->add('expressoMail', 'catalog_search', $_POST['catalog_search']); 263 264 259 265 if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_shortcuts']) 260 266 $GLOBALS['phpgw']->preferences->change('expressoMail','use_shortcuts',$_POST['use_shortcuts']); … … 383 389 $GLOBALS['phpgw']->template->set_var('lang_Would_you_like_to_use_local_messages_?',lang('Would you like to use local messages?')); 384 390 391 $GLOBALS['phpgw']->template->set_var('lang_global_catalog', lang('Global Catalog')); 392 $GLOBALS['phpgw']->template->set_var('lang_personal_catalog', lang('Personal Catalog')); 393 $GLOBALS['phpgw']->template->set_var('lang_all_catalog', lang('All Catalogs')); 394 385 395 $GLOBALS['phpgw']->template->set_var('url_offline','offline.php'); 386 396 $GLOBALS['phpgw']->template->set_var('url_icon','templates/default/images/offline.png'); -
trunk/expressoMail1_2/setup/phpgw_pt-br.lang
r4929 r5075 675 675 Attention! The original message will be sent along with the original source of the email message expressoMail1_2 pt-br Atenção! A mensagem original será enviado junto com a fonte original da mensagem de e-mail 676 676 allow hidden copy expressoMail1_2 pt-br Liberar todos os usuários a enviar email com cópia oculta 677 Results expressoMail1_2 pt-br Resultados 678 Please, enter a parameter to search expressoMail1_2 pt-br Por favor, insira um parâmetro para a busca 679 Paramter must be at least expressoMail1_2 pt-br O Parâmetro deve ter pelo menos 680 characters expressoMail1_2 pt-br caracteres 681 Contact Details expressoMail1_2 pt-br Detalhes do contato 682 page expressoMail1_2 pt-br Página 683 search expressoMail1_2 pt-br Busca 684 catalog expressoMail1_2 pt-br Catálogo 685 Quick Search Contacts expressoMail1_2 pt-br Busca rápida de contatos 686 All Catalogs expressoMail1_2 pt-br Todos catálogos 687 -
trunk/expressoMail1_2/templates/default/index.tpl
r4830 r5075 131 131 </table> 132 132 </div> 133 <link href="../library/jquery/css/redmond/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css"> 134 <script src='../library/jquery/jquery.js' language='javascript'></script> 135 <script type="text/javascript" src="../library/jquery/jquery-ui.min.js"></script> 136 <link href="templates/default/quick_search.css" rel="stylesheet" type="text/css"> 137 <div style="display:none; width: auto; min-height: 0px; height: 410px;" id="dialog-modal" title="{lang_quick_search_users_dialog_title}"> 138 <div style="width:910px;height:410px;"> 139 <div class="acc-list" style="width:370px;height:85%;float:left;border:1px solid #DDD;background-color:#EEE;border-radius:3px;margin-left:1px;"> 140 <h3 id="title_usuarios"></h3> 141 <ul id="selectable" style="width:370px; height:350px;"></ul> 142 <div class="demo" style="width:100%;margin-top:-5px;"> 143 <div id="slider"></div> 144 <p> 145 <label for="amount">{lang_page}: </label> 146 <input type="text" id="amount" style="border:0; font-weight:bold; width:85%" /> 147 </p> 148 </div> 149 </div> 150 <div style="width:525px;height:90%;float:left;"> 151 <div id="accordion"> 152 <div class="ui-widget" align="right"> 153 <label>{lang_search}: </label> 154 <input type="text" id="busca" size=30></input> 155 <select id="combobox"> 156 <!-- Pegar essas opções das preferências --> 157 <option value="global">{lang_global_catalog}</option> 158 <option value="personal">{lang_personal_catalog}</option> 159 <option value="all">{lang_all_catalogs}</option> 160 </select> 161 <input type="button" value="Buscar" onClick=buscaContato(busca.value); /> 162 <input type="button" value="?" onClick="alert('Busca rápida de contatos versão 0.1\nPrognus Software Livre')" /> 163 </div> 164 <fieldset id="fieldset1" style="width:490px;height:85%;float:right;"> 165 <legend>{lang_contact_details}</legend> 166 <div style="float:left;"> <span id="detalhes_contato">---</span> </div> 167 </fieldset> 168 </div> 169 </div> 170 </div> 171 </div> 133 172 <!-- END list --> -
trunk/expressoMail1_2/templates/default/quick_search.css
r5072 r5075 47 47 #selectable { list-style-type: none; margin: 0; padding: 0; width: 100%; } 48 48 ul#selectable { overflow: hidden; width: 370px;} 49 ul#selectable li { width: 3 15px; overflow:hidden; }49 ul#selectable li { width: 300px; overflow:hidden; } 50 50 ul#selectable li.ui-selected { width: 81%; } 51 51 ul#selectable li div { width: 6000px; }
Note: See TracChangeset
for help on using the changeset viewer.