Changeset 4034
- Timestamp:
- 04/14/11 17:52:00 (13 years ago)
- Location:
- branches/2.2.0.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.0.1/expressoMail1_2/js/QuickCatalogSearch.js
r3932 r4034 12 12 id = '1'; 13 13 _this = this; 14 var el_A = document.createElement("DIV"); 15 el_A.style.visibility = "hidden"; 16 el_A.style.position = "absolute"; 17 el_A.style.left = "0px"; 18 el_A.style.top = "0px"; 19 el_A.style.width = "0px"; 20 el_A.style.height = "0px"; 21 el_A.id = 'window_QuickCatalogSearch_A'; 22 document.body.appendChild(el_A); 23 el_A.innerHTML = ""; 24 14 25 var el = document.createElement("DIV"); 15 26 el.style.visibility = "hidden"; 16 27 el.style.position = "absolute"; 17 28 el.style.left = "0px"; 18 el.style.top = "0px"; 19 el.style.width = "0px"; 20 el.style.height = "0px"; 29 el.style.top = "40px"; 30 el.style.width = "695px"; 31 el.style.height = "186px"; 32 el.style.overflow = "auto"; 21 33 el.id = 'window_QuickCatalogSearch'; 22 document.body.appendChild(el);34 el_A.appendChild(el); 23 35 el.innerHTML = ""; 24 36 … … 46 58 }; 47 59 48 if (document.getElementById('select_QuickCatalogSearch') == null){49 50 60 var title_innerHTML = get_lang('Select a name') + ':'; 51 61 if (data.quickSearch_only_in_userSector) … … 55 65 title.id = 'window_QuickCatalogSearch_title'; 56 66 title.innerHTML = " <b><font color='BLUE' nowrap>"+title_innerHTML+"</font></b><br> "; 57 el.appendChild(title); 67 el_A.appendChild(title); 68 var butt = document.createElement('BUTTON'); 69 var buttext = document.createTextNode('OK'); 70 butt.id = "QuickCatalogSearch_button_ok"; 71 butt.appendChild(buttext); 72 butt.onclick = function () {QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end);}; 73 el_A.appendChild(butt); 74 75 var space = document.createElement('SPAN'); 76 space.innerHTML = " "; 77 el_A.appendChild(space); 78 79 var butt = document.createElement('BUTTON'); 80 butt.id = "QuickCatalogSearch_button_close"; 81 var buttext = document.createTextNode(get_lang('Close')); 82 butt.appendChild(buttext); 83 butt.onclick = function () {QuickCatalogSearch.close_QuickSearch_window(data.field, data.ID);}; 84 el_A.appendChild(butt); 85 86 if (document.getElementById('select_QuickCatalogSearch') == null){ 58 87 59 88 var cmb = document.createElement("SELECT"); 60 89 cmb.id = "select_QuickCatalogSearch"; 61 cmb.style.width = "685px"; 62 cmb.size = "12"; 90 cmb.style.width = "2400px"; 91 //cmb.size = "12"; 92 cmb.ondblclick = function() {QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end);}; 63 93 cmb.onkeypress = function (e) 64 94 { … … 87 117 }; 88 118 el.appendChild(cmb); 89 90 var space = document.createElement('SPAN'); 91 space.innerHTML = "<BR> "; 92 el.appendChild(space); 93 94 var butt = document.createElement('BUTTON'); 95 var buttext = document.createTextNode('OK'); 96 butt.id = "QuickCatalogSearch_button_ok"; 97 butt.appendChild(buttext); 98 butt.onclick = function () {QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end);}; 99 el.appendChild(butt); 100 101 var space = document.createElement('SPAN'); 102 space.innerHTML = " "; 103 el.appendChild(space); 104 105 var butt = document.createElement('BUTTON'); 106 butt.id = "QuickCatalogSearch_button_close"; 107 var buttext = document.createTextNode(get_lang('Close')); 108 butt.appendChild(buttext); 109 butt.onclick = function () {QuickCatalogSearch.close_QuickSearch_window(data.field, data.ID);}; 110 el.appendChild(butt); 111 112 var space = document.createElement('SPAN'); 113 space.innerHTML = " "; 114 el.appendChild(space); 115 116 var butt = document.createElement('BUTTON'); 117 butt.id = "QuickCatalogSearch_button_add_contact"; 118 var buttext = document.createTextNode(get_lang("Add Contact")); 119 butt.appendChild(buttext); 120 butt.onclick = func_add_contact; 121 el.appendChild(butt); 119 122 120 } 123 121 else{ … … 130 128 131 129 var cmb = document.getElementById('select_QuickCatalogSearch'); 130 cmb.ondblclick = function() {QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end);}; 132 131 cmb.onkeypress = function (e) 133 132 { … … 178 177 } 179 178 cmb.options[0].selected = true; 180 _this.showWindow(el); 179 cmb.size = data.length+1; 180 _this.showWindow(el_A); 181 181 } 182 182 … … 214 214 win = this.arrayWin[div.id]; 215 215 } 216 //document.getElementById('QuickCatalogSearch_window_QuickCatalogSearch').style.display = "";216 document.getElementById("window_QuickCatalogSearch").style.visibility = "visible"; 217 217 win.open(); 218 218 document.getElementById('select_QuickCatalogSearch').focus(); … … 228 228 document.getElementById(field + "_" + ID).focus(); 229 229 230 //document.getElementById('QuickCatalogSearch_window_QuickCatalogSearch').style.display = "none";231 this.arrayWin['window_QuickCatalogSearch'].close();232 } 233 230 this.arrayWin['window_QuickCatalogSearch_A'].close(); 231 document.getElementById("window_QuickCatalogSearch").style.visibility = "hidden"; 232 } 233 234 234 emQuickCatalogSearch.prototype.close_QuickSearch_window = function (field, ID){ 235 235 //document.getElementById('QuickCatalogSearch_window_QuickCatalogSearch').style.display = "none"; 236 236 document.getElementById(field + "_" + ID).focus(); 237 this.arrayWin['window_QuickCatalogSearch'].close(); 237 this.arrayWin['window_QuickCatalogSearch_A'].close(); 238 document.getElementById("window_QuickCatalogSearch").style.visibility = "hidden"; 238 239 } 239 240 … … 467 468 var not_selected = true; 468 469 469 fieldOpener.value = trim(fieldOpener.value);470 471 470 for (i = 0 ; i < select.length ; i++) { 472 471 if (select.options[i].selected && select.options[i].value != '-1') { -
branches/2.2.0.1/phpgwapi/js/dJSWin/dJSWin.js
r144 r4034 172 172 this.buttons.xDIV.style.left = parseInt(params['width']) - 13 + 'px'; 173 173 this.buttons.xDIV.style.zIndex = '1'; 174 this.buttons.xDIV.onclick = function() {_this.close(); _this.state = 2; };174 this.buttons.xDIV.onclick = function() {_this.close(); _this.state = 2;if(document.getElementById("window_QuickCatalogSearch")) document.getElementById("window_QuickCatalogSearch").style.visibility = "hidden";}; 175 175 176 176 this.content.style.visibility = 'hidden'; … … 338 338 /* Turn the attribute visible false */ 339 339 this.visible = false; 340 } 340 //Remove attribute onclick 341 var divBan = document.getElementById('divAppbox'); 342 divBan.removeAttribute('onclick'); 343 if (is_ie){ 344 divBan.onclick = function(){}; 345 } 346 } 347 341 348 342 349 dJSWin.prototype.open = function()
Note: See TracChangeset
for help on using the changeset viewer.