Changeset fa59965 in github
- Timestamp:
- Jul 18, 2011 1:35:12 PM (22 months ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 8c37422
- Parents:
- 3a9f795
- Location:
- program
- Files:
-
- 2 edited
-
js/app.js (modified) (1 diff)
-
steps/addressbook/func.inc (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/js/app.js
r7f554cf rfa59965 339 339 this.enable_command('add', 'import', this.env.writable_source); 340 340 this.enable_command('list', 'listgroup', 'advanced-search', true); 341 342 // load contacts of selected source 343 this.command('list', this.env.source); 341 344 break; 342 345 -
program/steps/addressbook/func.inc
r63fda8a rfa59965 85 85 $_SESSION['addressbooks_count'] = count($js_list); 86 86 $_SESSION['addressbooks_count_writeable'] = $writeable; 87 88 if (!strlen($source)) 89 $source = strval(key($js_list)); 87 90 88 91 $CONTACTS = rcmail_contact_source($source, true); … … 181 184 // currently selected source 182 185 $current = get_input_value('_source', RCUBE_INPUT_GPC); 183 if (!strlen($current) || !isset($sources[$source]))184 $current = strval(key($sources));185 186 186 187 foreach ($sources as $j => $source) { … … 248 249 249 250 250 // return the messagelist as HTML table251 // return the contacts list as HTML table 251 252 function rcmail_contacts_list($attrib) 252 253 { … … 255 256 // define list of cols to be displayed 256 257 $a_show_cols = array('name'); 257 258 // count contacts for this user259 $result = $CONTACTS->list_records($a_show_cols);260 258 261 259 // add id to message list table if not specified … … 264 262 265 263 // create XHTML table 266 $out = rcube_table_output($attrib, $result->records, $a_show_cols, $CONTACTS->primary_key);264 $out = rcube_table_output($attrib, array(), $a_show_cols, $CONTACTS->primary_key); 267 265 268 266 // set client env 269 267 $OUTPUT->add_gui_object('contactslist', $attrib['id']); 270 268 $OUTPUT->set_env('current_page', (int)$CONTACTS->list_page); 271 $OUTPUT->set_env('pagecount', ceil($result->count/$CONTACTS->page_size));272 269 $OUTPUT->include_script('list.js'); 273 270 … … 332 329 $OUTPUT->add_gui_object('countdisplay', $attrib['id']); 333 330 334 return html::span($attrib, rc mail_get_rowcount_text());331 return html::span($attrib, rcube_label('loading')); 335 332 } 336 333 … … 343 340 if (!$result) { 344 341 $result = $CONTACTS->get_result(); 345 }346 if (!$result) {347 $result = $CONTACTS->count();348 342 } 349 343
Note: See TracChangeset
for help on using the changeset viewer.
