Changeset 4121 in subversion
- Timestamp:
- Oct 22, 2010 11:24:39 AM (3 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 10 edited
-
CHANGELOG (modified) (1 diff)
-
program/include/rcube_contacts.php (modified) (1 diff)
-
program/js/app.js (modified) (3 diffs)
-
program/localization/de_CH/labels.inc (modified) (1 diff)
-
program/localization/de_DE/labels.inc (modified) (1 diff)
-
program/localization/en_US/labels.inc (modified) (1 diff)
-
program/steps/addressbook/show.inc (modified) (2 diffs)
-
skins/default/common.css (modified) (1 diff)
-
skins/default/settings.css (modified) (1 diff)
-
skins/default/templates/showcontact.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r4120 r4121 2 2 =========================== 3 3 4 - List groups in address detail view and allow to subscribe/unsubscribe from there (#1486753) 4 5 - Messages caching: performance improvements, fixed syncing, fixes related with #1486748 5 6 - Add link to identities in compose window (#1486729) -
trunk/roundcubemail/program/include/rcube_contacts.php
r4015 r4121 356 356 357 357 /** 358 * Get group assignments of a specific contacr record 359 * 360 * @param mixed Record identifier 361 * @param array List of assigned groups as ID=>Name pairs 362 */ 363 function get_record_groups($id) 364 { 365 $results = array(); 366 367 if (!$this->groups) 368 return $results; 369 370 $sql_result = $this->db->query( 371 "SELECT cgm.contactgroup_id, cg.name FROM " . get_table_name($this->db_groupmembers) . " AS cgm" . 372 " LEFT JOIN " . get_table_name($this->db_groups) . " AS cg ON (cgm.contactgroup_id = cg.contactgroup_id AND cg.del<>1)" . 373 " WHERE cgm.contact_id=?", 374 $id 375 ); 376 while ($sql_result && ($sql_arr = $this->db->fetch_assoc($sql_result))) { 377 $results[$sql_arr['contactgroup_id']] = $sql_arr['name']; 378 } 379 380 return $results; 381 } 382 383 384 /** 358 385 * Create a new contact record 359 386 * -
trunk/roundcubemail/program/js/app.js
r4103 r4121 307 307 } 308 308 309 if (this.env.cid) 309 if (this.env.cid) { 310 310 this.enable_command('show', 'edit', true); 311 // register handlers for group assignment via checkboxes 312 if (this.gui_objects.editform) { 313 $('input.groupmember').change(function(){ 314 var cmd = this.checked ? 'group-addmembers' : 'group-delmembers'; 315 ref.http_post(cmd, '_cid='+urlencode(ref.env.cid) 316 + '&_source='+urlencode(ref.env.source) 317 + '&_gid='+urlencode(this.value)); 318 }); 319 } 320 } 311 321 312 322 if ((this.env.action=='add' || this.env.action=='edit') && this.gui_objects.editform) { … … 3714 3724 // exit if no mailbox specified or if selection is empty 3715 3725 var selection = this.contact_list.get_selection(); 3716 if (!(selection.length || this.env.cid) || (!this.env.group && !confirm(this.get_label('deletecontactconfirm'))))3726 if (!(selection.length || this.env.cid) || !confirm(this.get_label('deletecontactconfirm'))) 3717 3727 return; 3718 3728 … … 3738 3748 3739 3749 // send request to server 3740 if (this.env.group) 3741 this.http_post('group-delmembers', '_cid='+urlencode(a_cids.join(','))+'&_source='+urlencode(this.env.source)+'&_gid='+urlencode(this.env.group)+qs); 3742 else 3743 this.http_post('delete', '_cid='+urlencode(a_cids.join(','))+'&_source='+urlencode(this.env.source)+'&_from='+(this.env.action ? this.env.action : '')+qs); 3750 this.http_post('delete', '_cid='+urlencode(a_cids.join(','))+'&_source='+urlencode(this.env.source)+'&_from='+(this.env.action ? this.env.action : '')+qs); 3744 3751 3745 3752 return true; -
trunk/roundcubemail/program/localization/de_CH/labels.inc
r3989 r4121 202 202 $labels['email'] = 'E-Mail'; 203 203 $labels['contacts'] = 'Kontakte'; 204 $labels['contactproperties'] = 'Kontaktdaten'; 204 205 $labels['addcontact'] = 'Kontakt hinzufÃŒgen'; 205 206 $labels['editcontact'] = 'Kontakt bearbeiten'; -
trunk/roundcubemail/program/localization/de_DE/labels.inc
r4049 r4121 205 205 $labels['editcontact'] = 'Kontakt bearbeiten'; 206 206 $labels['contacts'] = 'Kontakte'; 207 $labels['contactproperties'] = 'Kontaktdaten'; 207 208 $labels['edit'] = 'Bearbeiten'; 208 209 $labels['cancel'] = 'Abbrechen'; -
trunk/roundcubemail/program/localization/en_US/labels.inc
r4101 r4121 260 260 $labels['editcontact'] = 'Edit contact'; 261 261 $labels['contacts'] = 'Contacts'; 262 $labels['contactproperties'] = 'Contact properties'; 262 263 263 264 $labels['edit'] = 'Edit'; -
trunk/roundcubemail/program/steps/addressbook/show.inc
r3989 r4121 25 25 $OUTPUT->set_env('cid', $record['ID']); 26 26 } 27 28 $GROUPS = $CONTACTS->list_groups(); 29 $OUTPUT->set_env('groups', !empty($GROUPS)); 30 27 31 28 32 function rcmail_contact_details($attrib) … … 70 74 71 75 76 function rcmail_contact_record_groups($attrib) 77 { 78 global $RCMAIL, $CONTACTS, $GROUPS; 79 80 // check if we have a valid result 81 if (!(($result = $CONTACTS->get_result()) && ($record = $result->first()))) 82 return false; 83 84 $table = new html_table(array('cols' => 2, 'cellspacing' => 0, 'border' => 0)); 85 86 $members = $CONTACTS->get_record_groups($record['ID']); 87 $checkbox = new html_checkbox(array('name' => '_gid[]', 'class' => 'groupmember', 'disabled' => $CONTACTS->readonly)); 88 foreach ($GROUPS as $group) { 89 $gid = $group['ID']; 90 $table->add(null, $checkbox->show($members[$gid] ? $gid : null, array('value' => $gid, 'id' => 'ff_gid' . $gid))); 91 $table->add(null, html::label('ff_gid' . $gid, Q($group['name']))); 92 } 93 94 $hiddenfields = new html_hiddenfield(array('name' => '_source', 'value' => get_input_value('_source', RCUBE_INPUT_GPC))); 95 $hiddenfields->add(array('name' => '_cid', 'value' => $record['ID'])); 96 97 $form_start = $RCMAIL->output->request_form(array('name' => "form", 'method' => "post", 'task' => $RCMAIL->task, 'action' => 'save', 'request' => 'save.'.intval($record['ID']), 'noclose' => true) + $attrib, $hiddenfields->show()); 98 $form_end = !strlen($attrib['form']) ? '</form>' : ''; 99 100 $RCMAIL->output->add_gui_object('editform', !empty($attrib['form']) ? $attrib['form'] : 'form'); 101 102 return $form_start . $table->show($attrib) . $form_end; 103 } 104 105 72 106 //$OUTPUT->framed = $_framed; 73 107 $OUTPUT->add_handler('contactdetails', 'rcmail_contact_details'); 108 $OUTPUT->add_handler('contactgroups', 'rcmail_contact_record_groups'); 74 109 $OUTPUT->send('showcontact'); -
trunk/roundcubemail/skins/default/common.css
r4062 r4121 844 844 } 845 845 846 fieldset 847 { 848 margin-bottom: 1em; 849 border: 1px solid #999999; 850 padding: 4px 8px 9px 8px; 851 } 852 853 legend 854 { 855 color: #999999; 856 } 857 846 858 fieldset.tabbed 847 859 { -
trunk/roundcubemail/skins/default/settings.css
r4043 r4121 150 150 } 151 151 152 fieldset153 {154 margin-bottom: 0.5em;155 border: 1px solid #999999;156 padding: 4px 8px 9px 8px;157 }158 159 legend160 {161 color: #999999;162 }163 164 152 #identities-list, 165 153 #sectionslist -
trunk/roundcubemail/skins/default/templates/showcontact.html
r3023 r4121 10 10 11 11 <div id="contact-details" class="boxcontent"> 12 <roundcube:object name="contactdetails" /> 12 <fieldset> 13 <legend><roundcube:label name="contactproperties" /></legend> 14 <roundcube:object name="contactdetails" /> 13 15 14 <p><br /><roundcube:button command="edit" type="input" class="button" label="editcontact" condition="!ENV:readonly" /></p> 16 <p><br /><roundcube:button command="edit" type="input" class="button" label="editcontact" condition="!ENV:readonly" /></p> 17 </fieldset> 18 19 <roundcube:if condition="ENV:groups" /> 20 <fieldset> 21 <legend><roundcube:label name="groups" /></legend> 22 <roundcube:object name="contactgroups" /> 23 </fieldset> 24 <roundcube:endif /> 25 15 26 </div> 16 27
Note: See TracChangeset
for help on using the changeset viewer.
