Changeset ed132ed in github


Ignore:
Timestamp:
Sep 2, 2008 1:22:00 PM (5 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
08abbac
Parents:
82bac87
Message:

New feature to import contacts from a vcard file + mark form buttons that provide the most obvious operation

Files:
6 added
18 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r8ac6fd0 red132ed  
    11CHANGELOG RoundCube Webmail 
    22--------------------------- 
     3 
     42008/09/02 (thomasb) 
     5---------- 
     6- Add feature to import contacts from vcard files (#1326103) 
     7- Mark form buttons that provide the most obvious operation (mainaction) 
    38 
    492008/08/30 (alec) 
  • program/include/main.inc

    r25f80d6 red132ed  
    793793 * @param mixed Debug message or data 
    794794 */ 
    795 function console($msg) 
    796   { 
    797   if (!is_string($msg)) 
    798     $msg = var_export($msg, true); 
     795function console() 
     796  { 
     797  $msg = array(); 
     798  foreach (func_get_args() as $arg) 
     799    $msg[] = !is_string($arg) ? var_export($arg, true) : $arg; 
    799800 
    800801  if (!($GLOBALS['CONFIG']['debug_level'] & 4)) 
    801     write_log('console', $msg); 
     802    write_log('console', join(";\n", $msg)); 
    802803  else if ($GLOBALS['OUTPUT']->ajax_call) 
    803     print "/*\n $msg \n*/\n"; 
     804    print "/*\n " . join(";\n", $msg) . " \n*/\n"; 
    804805  else 
    805806    { 
    806807    print '<div style="background:#eee; border:1px solid #ccc; margin-bottom:3px; padding:6px"><pre>'; 
    807     print $msg; 
     808    print join(";<br/>\n", $msg); 
    808809    print "</pre></div>\n"; 
    809810    } 
  • program/include/rcube_contacts.php

    r95987c3 red132ed  
    3535  var $search_fields; 
    3636  var $search_string; 
    37   var $table_cols = array('name', 'email', 'firstname', 'surname'); 
     37  var $table_cols = array('name', 'email', 'firstname', 'surname', 'vcard'); 
    3838   
    3939  /** public properties */ 
  • program/include/rcube_template.php

    r06655a5 red132ed  
    671671     * @todo   Remove all sprintf()'s - they are pretty, but also slow. 
    672672     */ 
    673     private function button($attrib) 
     673    public function button($attrib) 
    674674    { 
    675675        static $sa_buttons = array(); 
  • program/js/app.js

    rdf0dd4f4 red132ed  
    282282          this.enable_command('save', true); 
    283283        else 
    284           this.enable_command('search', 'reset-search', 'moveto', true); 
     284          this.enable_command('search', 'reset-search', 'moveto', 'import', true); 
    285285 
    286286        this.enable_command('list', true); 
     
    973973        } 
    974974 
    975       // reset quicksearch         
     975      // reset quicksearch 
    976976      case 'reset-search': 
    977977        var s = this.env.search_request; 
     
    983983          this.list_contacts(this.env.source); 
    984984        break; 
     985 
     986      case 'import': 
     987        if (this.env.action == 'import' && this.gui_objects.importform) { 
     988          var file = document.getElementById('rcmimportfile'); 
     989          if (file && !file.value) { 
     990            alert(this.get_label('selectimportfile')); 
     991            break; 
     992          } 
     993          this.gui_objects.importform.submit(); 
     994          this.set_busy(true, 'importwait'); 
     995          this.lock_form(this.gui_objects.importform, true); 
     996        } 
     997        else 
     998          this.goto_url('import'); 
     999        break 
    9851000 
    9861001      // collapse/expand folder 
  • program/localization/de_CH/labels.inc

    r2660a54 red132ed  
    185185$labels['groups'] = 'Gruppen'; 
    186186$labels['personaladrbook'] = 'Persönliches Adressbuch'; 
     187$labels['import'] = 'Importieren'; 
     188$labels['importcontacts'] = 'Adressen importieren'; 
     189$labels['importfromfile'] = 'Import aus Datei:'; 
     190$labels['importreplace'] = 'Bestehendes Adressbuch komplett ersetzen'; 
     191$labels['importtext'] = 'Sie können Kontakte aus einem bestehenden Adressbuch hochladen.<br/>Es können AdressbÃŒcher im <a href="http://de.wikipedia.org/wiki/VCard">vCard-Format</a> importiert werden.'; 
     192$labels['done'] = 'Fertig'; 
    187193$labels['settingsfor'] = 'Einstellungen fÃŒr'; 
    188194$labels['preferences'] = 'Einstellungen'; 
  • program/localization/de_CH/messages.inc

    r2660a54 red132ed  
    8181$messages['addsubfolderhint'] = 'Wird als Unterdornder des aktuell selektieren Ordners erstellt'; 
    8282$messages['forbiddencharacter'] = 'Der Ordnername enthÀlt ein ungÃŒltiges Zeichen'; 
     83$messages['selectimportfile'] = 'Bitte wÀhlen Sie eine Datei zum Importieren aus'; 
     84$messages['addresswriterror'] = 'Das gewÀhlte Adressbuch kann nicht verÀndert werden'; 
     85$messages['importwait'] = 'Daten werden importiert, bitte warten...'; 
     86$messages['importerror'] = 'Import fehlgeschlagen! Die hochgeladene Datei ist nicht im vCard-Format.'; 
     87$messages['importconfirm'] = '<b>Es wurden $inserted Adressen erfolgreich importiert und $skipped bestehende EintrÀge ÃŒbersprungen</b>:<p><em>$names</em></p>'; 
    8388 
    8489?> 
  • program/localization/en_US/labels.inc

    rfaf8766 red132ed  
    233233$labels['personaladrbook'] = 'Personal Addresses'; 
    234234 
     235$labels['import'] = 'Import'; 
     236$labels['importcontacts'] = 'Import contacts'; 
     237$labels['importfromfile'] = 'Import from file:'; 
     238$labels['importreplace'] = 'Replace the entire address book'; 
     239$labels['importtext'] = 'You can upload contacts from an existing address book.<br/>We currently support importing addresses from the <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> data format.'; 
     240$labels['done'] = 'Done'; 
    235241 
    236242// settings 
  • program/localization/en_US/messages.inc

    r9a5762a red132ed  
    8181$messages['addsubfolderhint'] = 'This folder will be created as subfolder of the currently selected one'; 
    8282$messages['forbiddencharacter'] = 'Folder name contains a forbidden character'; 
     83$messages['selectimportfile'] = 'Please select a file to upload'; 
     84$messages['addresswriterror'] = 'The selected address book is not writeable'; 
     85$messages['importwait'] = 'Importing, please wait...'; 
     86$messages['importerror'] = 'Import failed! The uploaded file is not a valid vCard file.'; 
     87$messages['importconfirm'] = '<b>Successfully imported $inserted contacts, $skipped existing entries skipped</b>:<p><em>$names</em></p>'; 
    8388 
    8489?> 
  • skins/default/addresses.css

    r1996d8f red132ed  
    3131} 
    3232 
    33 #directorylist, #addresslist 
     33#directorylist, #addresslist, #importbox 
    3434{ 
    3535  position: absolute; 
     
    5353  left: 185px; 
    5454  width: 340px; 
     55} 
     56 
     57#importbox 
     58{ 
     59  left: 20px; 
     60  right: 40px; 
     61  height: auto; 
     62  bottom: auto; 
     63  padding-bottom: 4ex; 
     64} 
     65 
     66#importbox a 
     67{ 
     68  color: blue; 
    5569} 
    5670 
  • skins/default/common.css

    r8e44f42 red132ed  
    7777 
    7878input[type="checkbox"], 
    79 input[type="radio"] 
     79input[type="radio"], 
     80input[type="file"] 
    8081{ 
    8182  border: 0; 
     
    9899{ 
    99100  color: black; 
     101} 
     102 
     103input.mainaction 
     104{ 
     105  font-weight: bold; 
     106  border: 1px solid #999; 
    100107} 
    101108 
  • skins/default/templates/addcontact.html

    rf115416 red132ed  
    1515<p><br /> 
    1616<input type="button" value="<roundcube:label name="cancel" />" class="button" onclick="history.back()" />&nbsp; 
    17 <roundcube:button command="save" type="input" class="button" label="save" /> 
     17<roundcube:button command="save" type="input" class="button" label="save mainaction" /> 
    1818</p> 
    1919 
  • skins/default/templates/addressbook.html

    ra549a92 red132ed  
    1616<roundcube:button command="delete" imageSel="/images/buttons/delete_sel.png" imageAct="/images/buttons/delete_act.png" imagePas="/images/buttons/delete_pas.png" width="32" height="32" title="deletecontact" /> 
    1717<roundcube:button command="compose" imageSel="/images/buttons/compose_sel.png" imageAct="/images/buttons/compose_act.png" imagePas="/images/buttons/compose_pas.png" width="32" height="32" title="composeto" /> 
    18 <roundcube:button command="print" imageSel="/images/buttons/print_sel.png" imageAct="/images/buttons/print_act.png" imagePas="/images/buttons/print_pas.png" width="32" height="32" title="print" /> 
     18<roundcube:button command="import" imageSel="/images/buttons/download_sel.png" imageAct="/images/buttons/adr_import_act.png" imagePas="/images/buttons/adr_import_pas.png" width="32" height="32" title="importcontacts" /> 
    1919<roundcube:button command="export" imageSel="/images/buttons/download_sel.png" imageAct="/images/buttons/download_act.png" imagePas="/images/buttons/download_pas.png" width="32" height="32" title="export" /> 
    2020</div> 
  • skins/default/templates/compose.html

    r6ed2560 red132ed  
    134134<tr> 
    135135<td style="white-space: nowrap"> 
    136 <roundcube:button type="input" command="send" class="button" label="sendmessage" tabindex="8" /> 
     136<roundcube:button type="input" command="send" class="button mainaction" label="sendmessage" tabindex="8" /> 
    137137<roundcube:button type="input" command="list" class="button" label="cancel" tabindex="9" /> 
    138138</td> 
  • skins/default/templates/editcontact.html

    r0c219c7 red132ed  
    1515<p><br /> 
    1616<roundcube:button command="show" type="input" class="button" label="cancel" />&nbsp; 
    17 <roundcube:button command="save" type="input" class="button" label="save" /> 
     17<roundcube:button command="save" type="input" class="button mainaction" label="save" /> 
    1818</p> 
    1919 
  • skins/default/templates/editidentity.html

    rb89d5a8 red132ed  
    2626<p><br /> 
    2727<roundcube:button command="delete" type="input" class="button" label="delete" />&nbsp; 
    28 <roundcube:button command="save" type="input" class="button" label="save" /> 
     28<roundcube:button command="save" type="input" class="button mainaction" label="save" /> 
    2929</p> 
    3030</div> 
  • skins/default/templates/login.html

    re3e597e red132ed  
    4040<roundcube:object name="loginform" form="form" autocomplete="off" /> 
    4141 
    42 <p style="text-align:center;"><input type="submit" class="button" value="<roundcube:label name='login' />" /></p> 
     42<p style="text-align:center;"><input type="submit" class="button mainaction" value="<roundcube:label name='login' />" /></p> 
    4343 
    4444</form> 
  • skins/default/templates/settings.html

    ra901aa5 red132ed  
    1818<roundcube:object name="userprefs"> 
    1919 
    20 <p><roundcube:button command="save" type="input" class="button" label="save" /></p> 
     20<p><roundcube:button command="save" type="input" class="button mainaction" label="save" /></p> 
    2121</div> 
    2222</div> 
Note: See TracChangeset for help on using the changeset viewer.