Changeset 4548
- Timestamp:
- 05/30/11 18:04:29 (13 years ago)
- Location:
- sandbox/2.2.0.2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.2.0.2/admin/inc/class.uiconfig.inc.php
r4500 r4548 118 118 { 119 119 /* don't erase passwords, since we also don't print them */ 120 if(!ereg('passwd',$key) && !ereg('password',$key) && !ereg('root_pw',$key) )120 if(!ereg('passwd',$key) && !ereg('password',$key) && !ereg('root_pw',$key) && !ereg('pw',$key)) 121 121 { 122 122 unset($c->config_data[$key]); … … 126 126 if($GLOBALS['phpgw_info']['server']['found_validation_hook'] && function_exists('final_validation')) 127 127 { 128 final_validation($ newsettings);128 final_validation($c->config_data); 129 129 if($GLOBALS['config_error']) 130 130 { … … 167 167 168 168 $campos = ''; 169 $checked_box = array(); 170 $i = 0; 169 171 170 172 if($appname=="contactcenter") … … 185 187 $checkedCoisa = 'value="details" checked="checked"'; 186 188 } 187 } 188 } 189 189 } 190 } 191 192 $campos_vazio = true; 193 $campos = "<div> 194 <label style=\"margin:46px;\">" . lang('Name') . "</label> 195 <label style=\"margin:50px;\">" . lang('Corresponding LDAP') . "</label> 196 <label style=\"margin:25px;\">" . lang('Type') . "</label> 197 <label style=\"margin:10px;\">" . lang('Searchable') . "</label> 198 </div>"; 190 199 191 200 foreach ($fields as $i => $line) 192 201 { 193 if ($line["cc_attribute_name_$i"] != '' && $line["cc_attribute_ldapname_$i"] != '') { 202 if ($line["cc_attribute_name_$i"] != '' && $line["cc_attribute_ldapname_$i"] != '') { 203 $campos_vazio = false; 194 204 $selectedText = $line["cc_attribute_type_$i"] == 'text' ? 'selected="selected"' : ''; 195 205 $selectedTMult = $line["cc_attribute_type_$i"] == 'multivalues' ? 'selected="selected"' : ''; 196 206 $selectedYes = $line["cc_attribute_searchable_$i"] == 'true' ? 'selected="selected"' : ''; 207 $selectedNo = $line["cc_attribute_searchable_$i"] == 'false' ? 'selected="selected"' : ''; 208 209 197 210 $campos = $campos . "<div class=\"cc_attribute\"> 198 <label>" . lang('Name') .":</label> 199 <input type=\"text\" name=\"newsettings[cc_attribute_name_" . $i . "]\" value=\"".$line["cc_attribute_name_$i"]."\" /> 200 <label>" . lang('Corresponding LDAP') . ":</label> 201 <input type=\"text\" name=\"newsettings[cc_attribute_ldapname_" . $i . "]\" value=\"".$line["cc_attribute_ldapname_$i"]."\" /> 202 <label>" . lang('Type') . ":</label> 203 <select name=\"newsettings[cc_attribute_type_" . $i . "]\"> 204 <option value=\"text\" $selectedText>" . lang('Text') . "</option> 205 <option value=\"multivalues\" $selectedTMult>" . lang('Multivalued') ."</option> 206 </select> 207 <img src=\"contactcenter/templates/default/images/cc_x.png\" alt=\"". lang('Delete') . "\" style=\"width: 15px; height: 14px; cursor: pointer; position: relative; top: 3px;\" onclick=\"javascript:cc_attribute_delete(this)\"/> 208 </div>"; 211 <input type=\"text\" name=\"newsettings[cc_attribute_name_" . $i . "]\" value=\"".$line["cc_attribute_name_$i"]."\" style=\"width:170px;\"/> 212 <input type=\"text\" name=\"newsettings[cc_attribute_ldapname_" . $i . "]\" value=\"".$line["cc_attribute_ldapname_$i"]."\" style=\"width:170px;\"/> 213 <select name=\"newsettings[cc_attribute_type_" . $i . "]\" style=\"width:86px; margin: 0px 0px 0px 8px;\"> 214 <option value=\"text\" $selectedText>" . lang('Text') . "</option> 215 <option value=\"multivalues\" $selectedTMult>" . lang('Multivalued') ."</option> 216 </select> 217 <select name=\"newsettings[cc_attribute_searchable_$i]\" style=\"margin: 0px 16px;\"> 218 <option value=\"true\" $selectedYes>" . lang('Yes') . "</option> 219 <option value=\"false\" $selectedNo>" . lang('No') . "</option> 220 </select> 221 <img src=\"contactcenter/templates/default/images/cc_x.png\" alt=\"". lang('Delete') . "\" style=\"width: 15px; height: 14px; cursor: pointer; position: relative; top: 3px;\" onclick=\"javascript:cc_attribute_delete(this)\"/> 222 </div>"; 209 223 } 210 224 } 211 225 212 if ($campos == '')226 if ($campos_vazio) 213 227 { 214 $campos = "<div class=\"cc_attribute\"> 215 <label>" . lang('Name') .":</label> 216 <input type=\"text\" name=\"newsettings[cc_attribute_name_0]\" value=\"\" /> 217 <label>" . lang('Corresponding LDAP') . ":</label> 218 <input type=\"text\" name=\"newsettings[cc_attribute_ldapname_0]\" value=\"\" /> 219 <label>" . lang('Type') . ":</label> 220 <select name=\"newsettings[cc_attribute_type_0]\"> 228 $campos .= "<div class=\"cc_attribute\"> 229 <input type=\"text\" name=\"newsettings[cc_attribute_name_0]\" value=\"\" style=\"width:170px;\"/> 230 <input type=\"text\" name=\"newsettings[cc_attribute_ldapname_0]\" value=\"\" style=\"width:170px;\"/> 231 <select name=\"newsettings[cc_attribute_type_0]\" style=\"width:86px; margin: 0px 0px 0px 8px;\"> 221 232 <option value=\"text\">" . lang('Text') . "</option> 222 233 <option value=\"multivalues\">" . lang('Multivalued') . "</option> 234 </select> 235 <select name=\"newsettings[cc_attribute_searchable_0]\" style=\"margin: 0px 16px;\"> 236 <option value=\"true\">" . lang('Yes') . "</option> 237 <option value=\"false\" selected=\"selected\">" . lang('No') . "</option> 223 238 </select> 224 239 <img src=\"contactcenter/templates/default/images/cc_x.png\" alt=\"". lang('Delete') ."\" style=\"width: 15px; height: 14px; cursor: pointer; position: relative; top: 3px;\" onclick=\"javascript:cc_attribute_delete(this)\"/> -
sandbox/2.2.0.2/contactcenter/inc/class.ui_data.inc.php
r4544 r4548 83 83 $this -> typeContact = 'contacts'; 84 84 $this->preferences = $_SESSION['phpgw_info']['user']['preferences']['contactcenter']; 85 } 86 87 function lg( $message, $path = '/tmp/natan.log' ) 88 { 89 ob_start(); 90 print_r( $message ); 91 echo( "\n" ); 92 $output = ob_get_clean(); 93 file_put_contents( $path, file_get_contents( $path ) . $output ); 85 94 } 86 95 … … 263 272 $GLOBALS['phpgw']->template->set_var('cc_msg_add_contact_to_group', lang('You did not add any contact for this group.')); 264 273 $GLOBALS['phpgw']->template->set_var('cc_msg_fill_field_name', lang('Fill the field Full Name')); 274 275 /* 276 * Monta Contactcenter Busca Avancada 277 */ 278 $c = CreateObject('phpgwapi.config','contactcenter'); 279 $c->read_repository(); 280 $current_config = $c->config_data; 281 $this->lg( $current_config ); 282 283 $arraySearch = array(); 284 foreach ($current_config as $index => $value) 285 { 286 287 if(substr($index, 0, 24) == 'cc_attribute_searchable_') 288 { 289 if($value == 'true') 290 $arraySearch[] = substr($index, 24, strlen($index)); 291 } 292 } 293 $advanceSearchArray = array(); 294 foreach ($arraySearch as $value) 295 { 296 foreach ($current_config as $index => $value2) 297 { 298 if($value == substr($index, 22, strlen($index)) && substr($index, 0, 22) == 'cc_attribute_ldapname_') 299 { 300 foreach ($current_config as $index2 => $value3) 301 { 302 if($value == substr($index2, 18, strlen($index2)) && substr($index2, 0, 18) == 'cc_attribute_name_') 303 $advanceSearchArray[$value2] = $value3; 304 } 305 } 306 307 } 308 } 309 310 $advanceSearch = array(); 311 foreach ($advanceSearchArray as $index => $value) 312 $advanceSearch[] ='"'.$index.'":"'.$value.'"'; 313 314 $advancedFields = "{".implode(',',$advanceSearch)."}"; 265 315 266 267 268 269 /* 270 * Monta Contactcenter Busca Avancada 271 */ 272 $c = CreateObject('phpgwapi.config','contactcenter'); 273 $c->read_repository(); 274 $current_config = $c->config_data; 275 276 $arraySearch = array(); 277 foreach ($current_config as $index => $value) 278 { 279 280 if(substr($index, 0, 24) == 'cc_attribute_searchable_') 281 { 282 if($value == 'true') 283 { 284 $v = substr($index, 24, strlen($index)); 285 $arraySearch[] = $v; 286 } 287 } 288 } 289 $advanceSearchArray = array(); 290 foreach ($arraySearch as $value) 291 { 292 foreach ($current_config as $index => $value2) 293 { 294 if($value == substr($index, 22, strlen($index)) && substr($index, 0, 22) == 'cc_attribute_ldapname_') 295 { 296 foreach ($current_config as $index2 => $value3) 297 { 298 if($value == substr($index2, 18, strlen($index2)) && substr($index2, 0, 18) == 'cc_attribute_name_') 299 $advanceSearchArray[$value2] = $value3; 300 } 301 } 302 303 } 304 } 305 306 $advanceSearch = array(); 307 foreach ($advanceSearchArray as $index => $value) 308 $advanceSearch[] ='"'.$index.'":"'.$value.'"'; 309 310 $advancedFields = "{".implode(',',$advanceSearch)."}"; 316 $this->lg( $advancedFields ); 311 317 312 318 … … 333 339 $GLOBALS['phpgw']->template->set_var('cc_contact_type', 'default'); 334 340 } 341 335 342 $GLOBALS['phpgw']->template->parse('out','index'); 336 343 -
sandbox/2.2.0.2/contactcenter/js/cc_config.js
r4544 r4548 67 67 68 68 var maior = 0; 69 for (var i= 1; i<vars.length; i++) {69 for (var i=0; i<vars.length; i++) { 70 70 var tupla = vars[i]; 71 71 var linhaIndice = tupla.getElementsByTagName("input")[0]; -
sandbox/2.2.0.2/contactcenter/js/cc_full_search.js
r4145 r4548 9 9 ccFullSearch.prototype.showForm = function() { 10 10 div = document.getElementById('cc_searchDiv'); 11 if(this.fields==null)12 this.fields = new Array(Element('cc_qa_given_names').value, Element('cc_corporate').value+":", Element('cc_qa_email').value, Element('cc_qa_phone').value);11 // if(this.fields==null) 12 // this.fields = new Array(Element('cc_qa_given_names').value, Element('cc_corporate').value+":", Element('cc_qa_email').value, Element('cc_qa_phone').value); 13 13 if(div) 14 14 this.showWindow(div); -
sandbox/2.2.0.2/contactcenter/js/cc_search.js
r4544 r4548 207 207 this.DOMbtn3.disabled = 'disabled'; 208 208 this.DOMbtn3.value = v_label + ':'; 209 var btn = this.DOMbtn.cloneNode(true);210 209 211 210 var btn = this.DOMbtn.cloneNode(true); … … 221 220 if( !target.innerHTML ) 222 221 { 223 var overlay = document.createElement( 'DIV' ); 224 225 var items = target.style.width = overlay.innerHTML = ''; 226 227 var config = { "cn":"Nome", "uid":"Matricula" }; 228 229 for( attr in config ) 230 items += "<tr><td style='padding: 3px'>"+config[attr]+"</td><td style='padding: 5px;'><input type='text' name='advanced_search' label='"+attr+"'><br></td></tr>"; 231 232 for( attr in advanced_search_fields ) 233 items += "<tr><td style='padding: 3px'>"+advanced_search_fields[attr]+"</td><td style='padding: 5px;'><input type='text' name='advanced_search' label='"+attr+"'><br></td></tr>"; 234 222 var items = []; 223 target.style.width = ''; 224 225 var config = [ { "cn":"Nome", "uid":"Matricula" }, advanced_search_fields ]; 226 227 for( var i = 0, counter = 2; i < config.length; i++ ) 228 for( attr in config[i] ) 229 items[counter++] = "<tr><td style='padding: 3px'>"+config[i][attr]+"</td><td style='padding: 5px;'><input type='text' name='advanced_search' label='"+attr+"'><br></td></tr>"; 230 235 231 var itemH = document.createElement('DIV'); 236 232 237 itemH.innerHTML = items ? '<table>' + items + '</table>' : '';233 itemH.innerHTML = items ? '<table>' + items.join("") + '</table>' : ''; 238 234 target.appendChild( itemH ); 239 235 … … 257 253 closeBtn.type = 'button'; 258 254 closeBtn.onclick = function(){ 259 document.getElementById('Layer2').style.visibility = 'hidden';255 win.close(); 260 256 document.getElementById('overlay').style.visibility = 'hidden'; 261 257 }; … … 273 269 274 270 target.appendChild( holder ); 271 272 this.win = new dJSWin({ 273 id: 'ccSearch_Layer2', 274 content_id: 'Layer2', 275 width: '255px', 276 height: ( counter * 31 ) +'px', 277 title_color: '#3978d6', 278 bg_color: '#eee', 279 title: Element('cc_cs_title').value, 280 title_text_color: 'white', 281 button_x_img: Element('cc_phpgw_img_dir').value+'/winclose.gif', 282 border: true }); 283 284 this.win.draw(); 275 285 } 276 286 277 var overlay = document.getElementById('overlay'); 278 279 overlay.style.visibility = ( overlay.style.visibility === 'hidden' ? 'visible' : 'hidden' ); 280 281 var pos = findPosY( this ); 282 283 with( target.style ) 284 { 285 if( !visibility || visibility === 'visible' ) 286 visibility = 'hidden'; 287 else 288 { 289 visibility = 'visible'; 290 top = 19 + pos + "px"; 291 } 292 } 287 this.win.open(); 293 288 }; 294 289 -
sandbox/2.2.0.2/contactcenter/templates/default/index.tpl
r4544 r4548 259 259 </table> 260 260 <div id="Layer1" style="position:absolute; top:178px; left:183px;width:auto; padding:2px; z-index:100000; background-color:#F2F3ED; border:1px solid #999999;visibility:hidden"></div> 261 <div id="Layer2" style=" position:absolute; top:178px; left:183px;width:auto; padding:2px; z-index:100000; background-color:#F2F3ED; border:1px solid #999999;visibility:hidden"></div>261 <div id="Layer2" style="width:auto; padding:2px; z-index:100000; visibility:hidden"></div> 262 262 <div id="debug_layer" style="position:absolute;width:0px;height:0px;display:none"></div> 263 263 <!-- _END VIEW CARDS -->
Note: See TracChangeset
for help on using the changeset viewer.