Changeset 5740
- Timestamp:
- 03/16/12 15:01:10 (12 years ago)
- Location:
- trunk/expressoMail1_2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r5689 r5740 158 158 function get_range_msgs2($params) 159 159 { 160 include '../prototype/api/controller.php'; 160 161 // Free others requests 161 162 session_write_close(); … … 194 195 195 196 $return[$i] = $this->get_info_head_msg( $msg_number , $sample ); 197 198 199 $filter = array('AND', array('=', 'folderName', $folder), array('=','messageNumber', $msg_number)); 200 $followupflagged = Controller::find( 201 array('concept' => 'followupflagged'), 202 false, 203 array('filter' => $filter, 'criteria' => array('deepness' => '2')) 204 ); 205 206 if(isset($followupflagged[0]['followupflagId'])) 207 { 208 $followupflag = Controller::read( array( 'concept' => 'followupflag', 'id' => $followupflagged[0]['followupflagId'] )); 209 $followupflagged[0]['followupflag'] = $followupflag; 210 $return[$i]['followupflagged'] = $followupflagged[0]; 211 212 } 213 214 $labeleds = Controller::find( 215 array('concept' => 'labeled'), 216 false, 217 array('filter' => $filter, 'criteria' => array('deepness' => '2')) 218 ); 219 220 ob_start(); 221 var_dump($labeleds); 222 223 $output = ob_get_clean(); 224 file_put_contents( "/tmp/thiago.log", $output , FILE_APPEND); 225 226 227 if(isset($labeleds) && count($labeleds) > 0 && $labeleds){ 228 $return[$i]['labels'] = array(); 229 230 foreach ($labeleds as $e){ 231 232 $labels = Controller::read( array( 'concept' => 'label', 'id' => $e['labelId'])); 233 $return[$i]['labels'][] = $labels; 234 } 235 } 236 /* 237 238 239 $filter = array(array('=','messageNumber', $msg_number)); 240 $followupflagged = Controller::find( 241 array('concept' => 'followupflagged'), 242 false, 243 array('filter' => $filter, 'criteria' => array('deepness' => '2')) 244 ); 245 ob_start(); 246 print_r(var_export($followupflagged)); 247 248 $output = ob_get_clean(); 249 file_put_contents( "/tmp/thiago.log", $output , FILE_APPEND); 250 251 if(isset($followupflagged[0]['followupflagId'])) 252 { 253 $followupflag = Controller::read( array( 'concept' => 'followupflag', 'id' => $followupflagged[0]['followupflagId'] )); 254 $return[$i]['followupflag'] = $followupflag; 255 } 256 257 $labeleds = Controller::find( 258 array('concept' => 'labeled'), 259 false, 260 array('filter' => $filter, 'criteria' => array('deepness' => '2')) 261 ); 262 foreach ($labeleds as $e){ 263 $labels = Controller::read( array( 'concept' => 'label', 'id' => $e['labelId'])); 264 $return[$i]['labels'] = $labels; 265 } */ 196 266 $i++; 197 267 } … … 226 296 $return['num_msgs'] = count($sort_array_msg)+($msg_range_begin-1); 227 297 } 228 229 298 return $return; 230 299 } … … 4842 4911 $return['msgs'][$i]['followupflagged'] = $followupflagged[0]; 4843 4912 4844 } 4845 4913 } 4846 4914 $labeleds = Controller::find( 4847 4915 array('concept' => 'labeled'), -
trunk/expressoMail1_2/js/doiMenuData.js
r5738 r5740 218 218 var menuItems = {}; 219 219 if (messageInfo.labels) { 220 if($.isArray(messageInfo.labels)){ 221 var labels = messageInfo.labels; 222 messageInfo.labels = {}; 223 for(var i in labels) 224 messageInfo.labels[labels[i].id] = {backgroundColor: labels[i]['backgroundColor'], 225 borderColor: labels[i]['borderColor'], 226 fontColor: labels[i]['fontColor'], id: labels[i]['id'], name: labels[i]['name'], 227 uid: labels[i]['uid'] } 228 } 220 229 menuItems = messageInfo.labels; 221 230 } else { -
trunk/expressoMail1_2/js/draw_api.js
r5738 r5740 1012 1012 // Draw the inbox and another folders 1013 1013 function draw_box(headers_msgs, msg_folder, alternate){ 1014 1015 //console.log(headers_msgs); 1014 1016 /* 1015 1017 * When the paging response is not in the correct folder you need to change folder … … 1043 1045 * into message array 1044 1046 */ 1045 var messageNumbers = new Array();1047 /* var messageNumbers = new Array(); 1046 1048 for (var i=0; i<headers_msgs.length; i++) { 1047 1049 messageNumbers.push(headers_msgs[i].msg_number); … … 1062 1064 } 1063 1065 } 1064 } 1065 1066 } */ 1067 1066 1068 /** 1067 1069 * Get the followupflags applied to the messages and saves the information 1068 1070 * into message array 1069 1071 */ 1070 var followupflaggeds = DataLayer.get('followupflagged', {1072 /* var followupflaggeds = DataLayer.get('followupflagged', { 1071 1073 criteria: { 1072 1074 filter: ['AND', ['IN', 'messageNumber', messageNumbers], ['=', 'folderName', msg_folder]], … … 1085 1087 } 1086 1088 } 1087 } 1089 } */ 1088 1090 1089 1091 /**
Note: See TracChangeset
for help on using the changeset viewer.