Aleksander Machniak
2015-10-15 fe8ff85d7eabb370d85fc31ca55b9a6c6f86a356
Move skin-specific code for compose encryption button to the skin
3 files modified
16 ■■■■■ changed files
program/js/app.js 2 ●●●●● patch | view | raw | blame | history
skins/classic/functions.js 4 ●●●● patch | view | raw | blame | history
skins/larry/ui.js 10 ●●●● patch | view | raw | blame | history
program/js/app.js
@@ -3435,8 +3435,6 @@
    }
    else if (action == 'compose') {
      this.env.compose_commands.push('compose-encrypted');
      // display the toolbar button
      $('#' + this.buttons['compose-encrypted'][0].id).show();
      var is_html = $('input[name="_is_html"]').val() > 0;
skins/classic/functions.js
@@ -640,6 +640,10 @@
    var label = rcmail.gettext(p.status ? 'replylist' : 'replyall');
    $('a.button.replyAll').attr('title', label);
  }
  else if (p.command == 'compose-encrypted') {
    // show the toolbar button for Mailvelope
    $('#messagetoolbar > a.encrypt').show();
  }
},
folder_search_init: function(container)
skins/larry/ui.js
@@ -136,6 +136,7 @@
      rcmail.addEventListener('menu-open', menu_toggle)
        .addEventListener('menu-close', menu_toggle)
        .addEventListener('menu-save', save_listoptions)
        .addEventListener('enable-command', enable_command)
        .addEventListener('responseafterlist', function(e){ switch_view_mode(rcmail.env.threading ? 'thread' : 'list', true) })
        .addEventListener('responseaftersearch', function(e){ switch_view_mode(rcmail.env.threading ? 'thread' : 'list', true) });
@@ -146,9 +147,9 @@
      }
      if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') {
        rcmail.addEventListener('enable-command', enable_command)
          .addEventListener('aftershow-headers', function() { layout_messageview(); })
        rcmail.addEventListener('aftershow-headers', function() { layout_messageview(); })
          .addEventListener('afterhide-headers', function() { layout_messageview(); });
        $('#previewheaderstoggle').click(function(e) {
            toggle_preview_headers();
            if (this.blur && !rcube_event.is_keyboard(e))
@@ -238,7 +239,6 @@
        rcmail.init_pagejumper('#pagejumper');
        rcmail.addEventListener('setquota', update_quota)
          .addEventListener('enable-command', enable_command)
          .addEventListener('afterimport-messages', show_uploadform);
      }
      else if (rcmail.env.action == 'get') {
@@ -601,6 +601,10 @@
      else
        $('a.button.reply-all').text(label).attr('title', label);
    }
    else if (p.command == 'compose-encrypted') {
      // show the toolbar button for Mailvelope
      $('a.button.encrypt').show();
    }
  }