diff options
| -rw-r--r-- | CHANGELOG | 2 | ||||
| -rw-r--r-- | program/js/app.js | 62 | ||||
| -rw-r--r-- | program/js/list.js | 5 | ||||
| -rw-r--r-- | program/lib/Roundcube/rcube_utils.php | 3 | ||||
| -rw-r--r-- | skins/classic/common.css | 3 | ||||
| -rw-r--r-- | skins/larry/images/listicons.png | bin | 26242 -> 33661 bytes | |||
| -rw-r--r-- | skins/larry/mail.css | 5 | ||||
| -rw-r--r-- | skins/larry/styles.css | 4 | ||||
| -rw-r--r-- | tests/Framework/Utils.php | 6 | ||||
| -rw-r--r-- | tests/src/media.css | 22 | 
10 files changed, 69 insertions, 43 deletions
@@ -1,6 +1,8 @@  CHANGELOG Roundcube Webmail  =========================== +- Added icon for priority column in messages list header (#1489234) +- New feature "Canned Responses" to save and recall boilerplate text snippets  - Fix HTML part detection when encapsulated inside multipart/signed (#1489372)  - Add spellchecker backend for the After the Deadline service  - Replace markdown-style [1] link indexes in plain text email bodies diff --git a/program/js/app.js b/program/js/app.js index ad0015452..bfae977b9 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -862,37 +862,24 @@ function rcube_webmail()          break;        case 'toggle_status': -        if (props && !props._row) -          break; - -        flag = 'read'; - -        if (props._row.uid) { -          uid = props._row.uid; +      case 'toggle_flag': +        flag = command == 'toggle_flag' ? 'flagged' : 'read'; +        if (uid = props) { +          // toggle flagged/unflagged +          if (flag == 'flagged') { +            if (this.message_list.rows[uid].flagged) +              flag = 'unflagged'; +          }            // toggle read/unread -          if (this.message_list.rows[uid].deleted) +          else if (this.message_list.rows[uid].deleted)              flag = 'undelete';            else if (!this.message_list.rows[uid].unread)              flag = 'unread'; -        } -        this.mark_message(flag, uid); -        break; - -      case 'toggle_flag': -        if (props && !props._row) -          break; - -        flag = 'flagged'; - -        if (props._row.uid) { -          uid = props._row.uid; -          // toggle flagged/unflagged -          if (this.message_list.rows[uid].flagged) -            flag = 'unflagged'; +          this.mark_message(flag, uid);          } -        this.mark_message(flag, uid); +          break;        case 'always-load': @@ -1752,7 +1739,7 @@ function rcube_webmail()    this.init_message_row = function(row)    { -    var expando, self = this, uid = row.uid, +    var i, fn = {}, self = this, uid = row.uid,        status_icon = (this.env.status_col != null ? 'status' : 'msg') + 'icn' + row.uid;      if (uid && this.env.messages[uid]) @@ -1760,8 +1747,7 @@ function rcube_webmail()      // set eventhandler to status icon      if (row.icon = document.getElementById(status_icon)) { -      row.icon._row = row.obj; -      row.icon.onclick = function(e) { self.command('toggle_status', this); return rcube_event.cancel(e); }; +      fn.icon = function(e) { self.command('toggle_status', uid); };      }      // save message icon position too @@ -1770,24 +1756,28 @@ function rcube_webmail()      else        row.msgicon = row.icon; -    // set eventhandler to flag icon, if icon found +    // set eventhandler to flag icon      if (this.env.flagged_col != null && (row.flagicon = document.getElementById('flagicn'+row.uid))) { -      row.flagicon._row = row.obj; -      row.flagicon.onclick = function(e) { self.command('toggle_flag', this); return rcube_event.cancel(e); }; +      fn.flagicon = function(e) { self.command('toggle_flag', uid); };      } -    if (!row.depth && row.has_children && (expando = document.getElementById('rcmexpando'+row.uid))) { -      row.expando = expando; -      expando.onclick = function(e) { return self.expand_message_row(e, uid); }; +    // set event handler to thread expand/collapse icon +    if (!row.depth && row.has_children && (row.expando = document.getElementById('rcmexpando'+row.uid))) { +      fn.expando = function(e) { self.expand_message_row(e, uid); }; +    } + +    // attach events +    $.each(fn, function(i, f) { +      row[i].onclick = function(e) { f(e); return rcube_event.cancel(e); };        if (bw.touch) { -        expando.addEventListener('touchend', function(e) { +        row[i].addEventListener('touchend', function(e) {            if (e.changedTouches.length == 1) { -            self.expand_message_row(e, uid); +            f(e);              return rcube_event.cancel(e);            }          }, false);        } -    } +    });      this.triggerEvent('insertrow', { uid:uid, row:row });    }; diff --git a/program/js/list.js b/program/js/list.js index 9f9e193e5..8843cd94a 100644 --- a/program/js/list.js +++ b/program/js/list.js @@ -457,10 +457,11 @@ click_row: function(e, id)    var dblclicked = now - this.rows[id].clicked < this.dblclick_time;    // selects/unselects currently selected row -  if (!this.drag_active && !dblclicked) +  if (!this.drag_active && this.in_selection_before == id && !dblclicked)      this.select_row(id, mod_key, true); -     +    this.drag_start = false; +  this.in_selection_before = false;    // row was double clicked    if (this.rowcount && dblclicked && this.in_selection(id)) { diff --git a/program/lib/Roundcube/rcube_utils.php b/program/lib/Roundcube/rcube_utils.php index b73bc0812..174fe398c 100644 --- a/program/lib/Roundcube/rcube_utils.php +++ b/program/lib/Roundcube/rcube_utils.php @@ -454,6 +454,9 @@ class rcube_utils          // cut out all contents between { and }          while (($pos = strpos($source, '{', $last_pos)) && ($pos2 = strpos($source, '}', $pos))) { +            $nested = strpos($source, '{', $pos+1); +            if ($nested && $nested < $pos2)  // when dealing with nested blocks (e.g. @media), take the inner one +                $pos = $nested;              $length = $pos2 - $pos - 1;              $styles = substr($source, $pos+1, $length); diff --git a/skins/classic/common.css b/skins/classic/common.css index 7d7c83f39..186be2485 100644 --- a/skins/classic/common.css +++ b/skins/classic/common.css @@ -484,7 +484,8 @@ body.iframe .boxtitle    left: 90px;    width: auto;    max-height: 70%; -  overflow: auto; +  overflow: -moz-scrollbars-vertical; +  overflow-y: auto;    display: none;    background-color: #fff;    background-color: rgba(255, 255, 255, 0.95); diff --git a/skins/larry/images/listicons.png b/skins/larry/images/listicons.png Binary files differindex e2906d957..2527fe10d 100644 --- a/skins/larry/images/listicons.png +++ b/skins/larry/images/listicons.png diff --git a/skins/larry/mail.css b/skins/larry/mail.css index c5c00554c..0c6166485 100644 --- a/skins/larry/mail.css +++ b/skins/larry/mail.css @@ -646,7 +646,7 @@ table.messagelist.fixedcopy {  }  .messagelist thead tr td.flag span.flagged { -	background-position: -24px -1036px; +	background-position: -22px -1036px;  }  .messagelist tr td.status span.msgicon:hover { @@ -700,7 +700,7 @@ table.messagelist.fixedcopy {  }  .messagelist thead tr td.status span.status { -	background-position: -24px -1016px; +	background-position: -23px -1017px;  }  .messagelist tr td div.collapsed { @@ -772,6 +772,7 @@ table.messagelist.fixedcopy {  	width: 100%;  	bottom: 27px;  	overflow: auto; +	-webkit-overflow-scrolling: touch;  }  #messageheader, diff --git a/skins/larry/styles.css b/skins/larry/styles.css index 2929713e1..0d7a50069 100644 --- a/skins/larry/styles.css +++ b/skins/larry/styles.css @@ -1925,7 +1925,8 @@ select.decorated option {  	left: 90px;  	width: auto;  	max-height: 70%; -	overflow: auto; +	overflow: -moz-scrollbars-vertical; +	overflow-y: auto;  	background: #444;  	border: 1px solid #999;  	z-index: 240; @@ -1958,7 +1959,6 @@ ul.toolbarmenu li,  	margin: 0;  	border-top: 1px solid #5a5a5a;  	border-bottom: 1px solid #333; -	padding-right: 10px;  }  .googie_list tr:first-child td, diff --git a/tests/Framework/Utils.php b/tests/Framework/Utils.php index 3f7f48c3a..2f4aec32e 100644 --- a/tests/Framework/Utils.php +++ b/tests/Framework/Utils.php @@ -171,6 +171,12 @@ class Framework_Utils extends PHPUnit_Framework_TestCase          $this->assertRegExp('/#rcmbody h1\s\{/', $mod, "Prefix tag styles (single)");          $this->assertRegExp('/#rcmbody h1, #rcmbody h2, #rcmbody h3, #rcmbody textarea\s+\{/', $mod, "Prefix tag styles (multiple)");          $this->assertRegExp('/#rcmbody \.noscript\s+\{/', $mod, "Prefix class styles"); + +        $css = file_get_contents(TESTS_DIR . 'src/media.css'); +        $mod = rcube_utils::mod_css_styles($css, 'rcmbody'); + +        $this->assertContains('#rcmbody table[class=w600]', $mod, 'Replace styles nested in @media block'); +        $this->assertContains('#rcmbody {width:600px', $mod, 'Replace body selector nested in @media block');      }      /** diff --git a/tests/src/media.css b/tests/src/media.css new file mode 100644 index 000000000..24eacc8a1 --- /dev/null +++ b/tests/src/media.css @@ -0,0 +1,22 @@ +.ReadMsgBody{width: 100%;} +.ExternalClass{width: 100%;} +div, p, a, li, td { -webkit-text-size-adjust:none; } +@media (max-width: 450px){ +	table[class=w600], td[class=w600], table[class=w540], td[class=w540], img[class=w600]{ width:100% !important; } +	table[class=w30], td[class=w30]{ width:20px !important; } +	.pict img {max-width:260px; height:auto !important;} +} +@media (min-width: 450px) and (max-width: 600px){ +	table[class=w600], td[class=w600], table[class=w540], td[class=w540], img[class=w600]{ width:100% !important; } +	table[class=w30], td[class=w30]{ width:20px !important; } +	.pict img {max-width:410px; height:auto !important;} +} +@media (min-width:600px){ +	body {width:600px !important; margin:auto !important;} +	.pict img {max-width:540px !important;  height:auto !important;} +} +h1{ font-weight:bold; font-size:14px;color:#3c3c3c ;margin:0px; } +h2{ color:#8DB048 ; font-size:14px; font-weight:bold; margin-top:20px; border-bottom:1px solid #d6d6d6; padding-bottom:4px; } +h3{ color:#7e7e7e ; font-size:14px; font-weight:bold; margin:20px 0px 0px 0px; border-bottom:1px solid #d6d6d6; padding-bottom:0px 0px 4px 0px; } +h4{ color:#8DB048 ; font-size:12px; font-weight:bold; margin:0px; padding:0px; } +a:visited{cursor:pointer; color:#8DB048; text-decoration:none; border:none;}  | 
