Aleksander Machniak
2014-02-14 abecca8f4bc0898f952a3362bd42b4c78ac783c3
Merge branch 'master' of github.com:roundcube/roundcubemail
12 files modified
149 ■■■■ changed files
CHANGELOG 1 ●●●● patch | view | raw | blame | history
plugins/password/drivers/domainfactory.php 2 ●●● patch | view | raw | blame | history
program/include/rcmail_output_html.php 2 ●●● patch | view | raw | blame | history
program/js/app.js 12 ●●●● patch | view | raw | blame | history
program/lib/Roundcube/html.php 13 ●●●● patch | view | raw | blame | history
skins/classic/images/mail_toolbar.png patch | view | raw | blame | history
skins/classic/includes/messagetoolbar.html 4 ●●●● patch | view | raw | blame | history
skins/classic/mail.css 49 ●●●●● patch | view | raw | blame | history
skins/larry/images/buttons.png patch | view | raw | blame | history
skins/larry/includes/mailtoolbar.html 1 ●●●● patch | view | raw | blame | history
skins/larry/styles.css 8 ●●●●● patch | view | raw | blame | history
tests/Framework/Html.php 57 ●●●●● patch | view | raw | blame | history
CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Added toolbar button to move message in message view
- Improve UI integration of ACL settings
- Fix directories check in Installer on Windows (#1489576)
- Fix issue when default_addressbook option is set to integer value (#1489407)
plugins/password/drivers/domainfactory.php
@@ -51,7 +51,7 @@
                // change password
                $ch = curl_copy_handle($ch);
                curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
                curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
                if ($result = curl_exec($ch)) {
                    // has the password been changed?
program/include/rcmail_output_html.php
@@ -1216,7 +1216,7 @@
        // generate html code for button
        if ($btn_content) {
            $attrib_str = html::attrib_string($attrib, $link_attrib);
            $attrib_str = html::attrib_string($attrib, array_merge($link_attrib, array('data-*')));
            $out = sprintf('<a%s>%s</a>', $attrib_str, $btn_content);
        }
program/js/app.js
@@ -6670,8 +6670,9 @@
  this.element_position = function(element, obj)
  {
    var obj = $(obj), win = $(window),
      width = obj.width(),
      height = obj.height(),
      width = obj.outerWidth(),
      height = obj.outerHeight(),
      menu_pos = obj.data('menu-pos'),
      win_height = win.height(),
      elem_height = $(element).height(),
      elem_width = $(element).width(),
@@ -6679,6 +6680,13 @@
      top = pos.top,
      left = pos.left + width;
    if (menu_pos == 'bottom') {
      top += height;
      left -= width;
    }
    else
      left -= 5;
    if (top + elem_height > win_height) {
      top -= elem_height - height;
      if (top < 0)
program/lib/Roundcube/html.php
@@ -271,17 +271,26 @@
        $allowed_f = array_flip((array)$allowed);
        $attrib_arr = array();
        foreach ($attrib as $key => $value) {
            // skip size if not numeric
            if ($key == 'size' && !is_numeric($value)) {
                continue;
            }
            // ignore "internal" or not allowed attributes
            if ($key == 'nl' || ($allowed && !isset($allowed_f[$key])) || $value === null) {
            // ignore "internal" or empty attributes
            if ($key == 'nl' || $value === null) {
                continue;
            }
            // ignore not allowed attributes
            if (!empty($allowed)) {
                $is_data_attr = substr_compare($key, 'data-', 0, 5) === 0;
                if (!isset($allowed_f[$key]) && (!$is_data_attr || !isset($allowed_f['data-*']))) {
                    continue;
                }
            }
            // skip empty eventhandlers
            if (preg_match('/^on[a-z]+/', $key) && !$value) {
                continue;
skins/classic/images/mail_toolbar.png

skins/classic/includes/messagetoolbar.html
@@ -17,6 +17,10 @@
<span id="forwardmenulink" onclick="rcmail_ui.show_popup('forwardmenu');return false"></span>
</span>
<roundcube:button command="delete" type="link" class="buttonPas delete" classAct="button delete" classSel="button deleteSel" title="deletemessage" content=" " />
<roundcube:if condition="template:name == 'message'" />
    <roundcube:button command="move" type="link" class="buttonPas move" classAct="button move" classSel="button moveSel" label="move" title="moveto" content=" " data-menu-pos="bottom" />
    <roundcube:button command="print" type="link" class="buttonPas print" classAct="button print" classSel="button printSel" label="print" title="printmessage" content=" " />
<roundcube:endif />
<roundcube:container name="toolbar" id="messagetoolbar" />
<roundcube:button name="markmenulink" id="markmenulink" type="link" class="button markmessage" title="markmessages" onclick="rcmail_ui.show_popup('markmenu');return false" content=" " />
<roundcube:button name="messagemenulink" id="messagemenulink" type="link" class="button messagemenu" title="moreactions" onclick="rcmail_ui.show_popup('messagemenu');return false" content=" " />
skins/classic/mail.css
@@ -108,59 +108,68 @@
}
#messagetoolbar a.print {
  background-position: -224px 0;
}
#messagetoolbar a.printSel {
  background-position: -224px -32px;
}
#messagetoolbar a.markmessage {
  background-position: -256px 0;
}
#messagetoolbar a.messagemenu {
#messagetoolbar a.printSel {
  background-position: -256px -32px;
}
#messagetoolbar a.markmessage {
  background-position: -288px 0;
}
#messagetoolbar a.messagemenu {
  background-position: -320px 0;
  width: 34px;
}
#messagetoolbar a.spellcheck {
  background-position: -384px 0;
  background-position: -418px 0;
}
#messagetoolbar a.spellcheckSel {
  background-position: -384px -32px;
  background-position: -418px -32px;
}
#messagetoolbar a.attach {
  background-position: -352px 0;
  background-position: -386px 0;
}
#messagetoolbar a.attachSel {
  background-position: -352px -32px;
  background-position: -386px -32px;
}
#messagetoolbar a.insertsig {
  background-position: -448px 0;
  background-position: -482px 0;
}
#messagetoolbar a.insertsigSel {
  background-position: -448px -32px;
  background-position: -482px -32px;
}
#messagetoolbar a.savedraft {
  background-position: -322px 0;
  background-position: -354px 0;
}
#messagetoolbar a.savedraftSel {
  background-position: -322px -32px;
  background-position: -354px -32px;
}
#messagetoolbar a.send {
  background-position: -416px 0;
  background-position: -450px 0;
}
#messagetoolbar a.sendSel {
  background-position: -416px -32px;
  background-position: -450px -32px;
}
#messagetoolbar a.move {
  background-position: -580px 0;
}
#messagetoolbar a.moveSel {
  background-position: -580px -32px;
}
#messagetoolbar a.download {
@@ -172,7 +181,7 @@
}
#messagetoolbar a.responses {
  background-position: -512px 0;
  background-position: -548px 0;
}
#messagemenu li a.active:hover,
skins/larry/images/buttons.png

skins/larry/includes/mailtoolbar.html
@@ -11,6 +11,7 @@
</span>
<roundcube:button command="delete" type="link" class="button delete disabled" classAct="button delete" classSel="button delete pressed" label="delete" title="deletemessage" />
<roundcube:if condition="template:name == 'message'" />
<roundcube:button command="move" type="link" class="button move disabled" classAct="button move" classSel="button move pressed" label="move" title="moveto" data-menu-pos="bottom" />
<roundcube:button command="print" type="link" class="button print disabled" classAct="button print" classSel="button print pressed" label="print" title="printmessage" />
<roundcube:endif />
<roundcube:container name="toolbar" id="mailtoolbar" />
skins/larry/styles.css
@@ -1895,6 +1895,10 @@
    background-position: center -1094px;
}
.toolbar a.button.move {
    background-position: center -1971px;
}
.toolbar a.button.more {
    background-position: center -850px;
}
@@ -2339,6 +2343,10 @@
/*** folder selector ***/
#folder-selector {
    z-index: 1000;
}
#folder-selector li a span {
    background: url("images/listicons.png") 4px -2021px no-repeat;
    display: block;
tests/Framework/Html.php
@@ -19,6 +19,63 @@
    }
    /**
     * Data for test_attrib_string()
     */
    function data_attrib_string()
    {
        return array(
            array(
                array(), null, '',
            ),
            array(
                array('test' => 'test'), null, ' test="test"',
            ),
            array(
                array('test' => 'test'), array('test'), ' test="test"',
            ),
            array(
                array('test' => 'test'), array('other'), '',
            ),
            array(
                array('checked' => true), null, ' checked="checked"',
            ),
            array(
                array('checked' => ''), null, '',
            ),
            array(
                array('onclick' => ''), null, '',
            ),
            array(
                array('size' => 5), null, ' size="5"',
            ),
            array(
                array('size' => 'test'), null, '',
            ),
            array(
                array('data-test' => 'test'), null, ' data-test="test"',
            ),
            array(
                array('data-test' => 'test'), array('other'), '',
            ),
            array(
                array('data-test' => 'test'), array('data-test'), ' data-test="test"',
            ),
            array(
                array('data-test' => 'test'), array('data-*'), ' data-test="test"',
            ),
        );
    }
    /**
     * Test for attrib_string()
     * @dataProvider data_attrib_string
     */
    function test_attrib_string($arg1, $arg2, $result)
    {
        $this->assertEquals(html::attrib_string($arg1, $arg2), $result);
    }
    /**
     * Data for test_quote()
     */
    function data_quote()