diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 8d0db5da1a..5b8331bdce 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -931,6 +931,14 @@ phpbb.toggleDropdown = function() { return false; }; +/** +* Toggle dropdown submenu +*/ +phpbb.toggleSubmenu = function(e) { + $(this).siblings('.dropdown-submenu').toggle(); + e.preventDefault(); +} + /** * Register dropdown menu * Shows/hides dropdown, decides which side to open to @@ -962,6 +970,7 @@ phpbb.registerDropdown = function(toggle, dropdown, options) toggle.data('dropdown-options', ops); toggle.click(phpbb.toggleDropdown); + $('.dropdown-toggle-submenu', ops.parent).click(phpbb.toggleSubmenu); }; /** diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index 288ebb933e..0130362131 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -399,3 +399,17 @@ viewtopic_topic_title_prepend + styles/subsilver2/template/viewtopic_body.html * Since: 3.1.0-a1 * Purpose: Add content directly before the topic title link on the View topic screen + +viewtopic_topic_tools_after +=== +* Locations: + + styles/prosilver/template/viewtopic_topic_tools.html +* Since: 3.1.0-a3 +* Purpose: Add a new topic tool after the rest of the existing ones + +viewtopic_topic_tools_before +=== +* Locations: + + styles/prosilver/template/viewtopic_topic_tools.html +* Since: 3.1.0-a3 +* Purpose: Add a new topic tool before the rest of the existing ones diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 5592aa89ba..0ff842ea6a 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -1464,6 +1464,8 @@ function phpbb_gen_download_links($param_key, $param_val, $phpbb_root_path, $php } $methods = compress::methods(); + // Sort by preferred type. + $methods = array_intersect(array('.zip', '.tar.bz2', '.tar.gz', '.tar'), $methods); $links = array(); foreach ($methods as $method) diff --git a/phpBB/language/en/viewtopic.php b/phpBB/language/en/viewtopic.php index 6f318c39f1..424cb9da3e 100644 --- a/phpBB/language/en/viewtopic.php +++ b/phpBB/language/en/viewtopic.php @@ -104,6 +104,7 @@ $lang = array_merge($lang, array( 'SUBMIT_VOTE' => 'Submit vote', + 'TOPIC_TOOLS' => 'Topic tools', 'TOTAL_VOTES' => 'Total votes', 'UNLOCK_TOPIC' => 'Unlock topic', diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html index 6f297660a2..bbffe8dc3d 100644 --- a/phpBB/styles/prosilver/template/overall_footer.html +++ b/phpBB/styles/prosilver/template/overall_footer.html @@ -12,9 +12,6 @@
  • {S_WATCH_FORUM_TITLE}
  • -
  • {S_WATCH_TOPIC_TITLE}
  • -
  • {S_BOOKMARK_TOPIC}
  • -
  • {L_BUMP_TOPIC}
  • {S_TIMEZONE}
  • {L_DELETE_COOKIES}
  • diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index 46881d3b03..338c67dd33 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -33,6 +33,8 @@ + + - +
    -
    @@ -299,16 +300,7 @@ - - - + +
    diff --git a/phpBB/styles/prosilver/template/viewtopic_topic_tools.html b/phpBB/styles/prosilver/template/viewtopic_topic_tools.html new file mode 100644 index 0000000000..ec17185bae --- /dev/null +++ b/phpBB/styles/prosilver/template/viewtopic_topic_tools.html @@ -0,0 +1,39 @@ + + + diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css index b04e6576d3..d5e98d6197 100644 --- a/phpBB/styles/prosilver/theme/bidi.css +++ b/phpBB/styles/prosilver/theme/bidi.css @@ -90,6 +90,21 @@ text-align: left; } +/* Dropdown menu +---------------------------------------- */ +.rtl .dropdown-container.topic-tools { + float: right; +} + +.rtl .dropdown li { + text-align: right; +} + +.rtl .dropdown li li { + padding-left: 0; + padding-right: 10px; +} + /* Table styles ----------------------------------------*/ .rtl table.table1 thead th { diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css index cdd325fb13..89fdcd85a8 100644 --- a/phpBB/styles/prosilver/theme/buttons.css +++ b/phpBB/styles/prosilver/theme/buttons.css @@ -11,13 +11,13 @@ } /* Rollover state */ -.buttons div { +.buttons div, .dropdown-select { float: left; margin: 0 5px 0 0; } /* Rolloff state */ -.buttons div a { +.buttons div a, .dropdown-select { display: inline-block; line-height: 17.5px; height: 18px; @@ -38,7 +38,7 @@ .buttons div span { display: none; } -.buttons div a:after { +.buttons div a:after, .dropdown-select:after { content: ''; display: block; position: absolute; @@ -54,6 +54,35 @@ background-position: 0 -20px; } +.dropdown-select { + cursor: pointer; + font-family: inherit; + font-size: 1em; + font-weight: normal; +} + +.dropdown-select:after { + background-position: -103px 10px; + border-left: 1px solid; + margin-top: 0; + top: 0; + right: 0; + height: 21px; + width: 15px; +} + +.dropdown-visible .dropdown-select:after, .nojs .dropdown-container:hover .dropdown-select:after { + background-position: -103px -10px; +} + +.dropdown-select-icon:before { + content: ''; + display: block; + float: left; + margin-right: 4px; + margin-top: 2px; +} + /* Big button images */ .buttons div.reply-icon a:after, .buttons div.pmreply-icon a:after { background-position: -20px 0; } .buttons div.reply-icon a:hover:after, .buttons div.pmreply-icon a:hover:after { background-position: -20px -20px; } @@ -67,6 +96,11 @@ .buttons div.forwardpm-icon a:after { background-position: -40px 0; } .buttons div.forwardpm-icon a:hover:after { background-position: -40px -20px; } +.dropdown-select.tools-icon:before { background-position: -80px 0; height: 16px; width: 16px; } + +.dropdown-visible .dropdown-select.tools-icon:before, +.nojs .dropdown-container:hover .dropdown-select.tools-icon:before { background-position: -80px -20px; } + /* Sub-header (navigation bar) --------------------------------------------- */ a.print, a.sendemail { diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index 55b01f1269..68fbcde4f9 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -231,7 +231,6 @@ p.post-notice.reported:before, p.post-notice.error:before { background-image: url("./images/icon_topic_reported.gif"); } - /* -------------------------------------------------------------- Colours and backgrounds for links.css @@ -655,7 +654,7 @@ a.sendemail { background-image: url("./images/icon_sendemail.gif"); } -.buttons div a { +.buttons div a, .dropdown-select { border-color: #C7C3BF; background-color: #FFFFFF; background-image: -moz-linear-gradient(top, #FFFFFF, #E9E9E9); @@ -668,7 +667,16 @@ a.sendemail { color: #BC2A4D !important; } -.buttons div a:hover { +.dropdown-select { + color: #5C6482 !important; +} + +.dropdown-select:after { + border-color: #DADADA; +} + +.buttons div a:hover, .dropdown-select:hover, .dropdown-visible .dropdown-select, +.dropdown-visible .dropdown-select:hover, .nojs .dropdown-container:hover .dropdown-select { border-color: #0a8ed0; background-image: -moz-linear-gradient(top, #E9E9E9, #FFFFFF); background-image: -webkit-linear-gradient(top, #E9E9E9, #FFFFFF); @@ -678,7 +686,16 @@ a.sendemail { text-shadow: 1px 1px 0 #FFFFFF, -1px -1px 0 #FFFFFF, -1px -1px 0 rgba(188, 42, 77, 0.2); } -.buttons div a:after { +.dropdown-select:hover { + border-color: #C7C3BF; +} + +.dropdown-visible .dropdown-select, .dropdown-visible .dropdown-select:hover, .nojs .dropdown-container:hover .dropdown-select { + border-color: #A6B2BA; + color: #105289 !important; +} + +.buttons div a:after, .dropdown-select-icon:before, .dropdown-select:after { background-image: url("images/buttons.png"); } @@ -698,6 +715,7 @@ a.sendemail { .icon-search, .responsive-search a { background-image: url("./images/icon_search.gif"); } .icon-notification { background-image: url("./images/icon_notification.gif"); } .icon-pm { background-image: url("./images/icon_pm.gif"); } +.icon-download { background-image: url("./images/icon_download.gif"); } /* Profile & navigation icons */ .email-icon, .email-icon a { background-image: url("./images/icon_contact_email.gif"); } @@ -1162,6 +1180,10 @@ ul.linklist li.responsive-menu a.responsive-menu-link:hover:before, ul.linklist box-shadow: 1px 0 5px rgba(0, 0, 0, 0.2); } +.dropdown li, .dropdown li li { + border-color: #DCDCDC; +} + #minitabs .dropdown-contents { background-color: #F1F8FF; } diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index 3cc3ce1afe..cacae74649 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -463,6 +463,10 @@ ul.linklist.bulletin li.no-bulletin:before { padding: 9px 0 0; } +.dropdown-container.topic-tools { + float: left; +} + .dropdown-up .dropdown { top: auto; bottom: 1.2em; @@ -474,6 +478,15 @@ ul.linklist.bulletin li.no-bulletin:before { right: 0; } +.dropdown-button-control .dropdown { + top: 24px; +} + +.dropdown-button-control.dropdown-up .dropdown { + top: auto; + bottom: 24px; +} + .dropdown .pointer, .dropdown .pointer-inner { position: absolute; width: 0; @@ -535,12 +548,35 @@ ul.linklist.bulletin li.no-bulletin:before { } .dropdown li { - float: none; + border-bottom: 1px dotted transparent; + float: none !important; + line-height: normal !important; + font-size: 1em !important; + list-style: none; margin: 0; + padding-top: 4px; + padding-bottom: 4px; white-space: nowrap; text-align: left; } +.dropdown li:last-child, .dropdown li li { + border-bottom: 0; +} + +.dropdown li li:first-child { + margin-top: 4px; +} + +.dropdown li li:last-child { + padding-bottom: 0; +} + +.dropdown li li { + border-top: 1px dotted transparent; + padding-left: 10px; +} + .wrap .dropdown li, .dropdown.wrap li, #notification_list li { white-space: normal; } diff --git a/phpBB/styles/prosilver/theme/images/buttons.png b/phpBB/styles/prosilver/theme/images/buttons.png old mode 100644 new mode 100755 index a19abdc2b8..3a8c2f2f65 Binary files a/phpBB/styles/prosilver/theme/images/buttons.png and b/phpBB/styles/prosilver/theme/images/buttons.png differ diff --git a/phpBB/styles/prosilver/theme/images/icon_download.gif b/phpBB/styles/prosilver/theme/images/icon_download.gif new file mode 100644 index 0000000000..70cd61caf2 Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/icon_download.gif differ diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index d7af7519b7..397ff12942 100644 --- a/phpBB/styles/prosilver/theme/responsive.css +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -468,10 +468,6 @@ p.rightside { float: none; } -.topic-actions { - overflow: hidden; -} - fieldset.quickmod { width: auto; float: none; @@ -511,17 +507,14 @@ fieldset.display-actions { margin: 0; } - .topic-actions > div { - float: none; - overflow: hidden; - clear: both; - } - .topic-actions > .pagination, fieldset.jumpbox { text-align: center; } .topic-actions > .pagination { + float: none; + overflow: hidden; + clear: both; padding-bottom: 1px; } diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 3735bca83d..dd4f7e1b19 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1384,16 +1384,17 @@ if (sizeof($attach_list)) } } -$template->assign_vars(array( - 'S_HAS_ATTACHMENTS' => $topic_data['topic_attachment'], -)); - $methods = phpbb_gen_download_links('topic_id', $topic_id, $phpbb_root_path, $phpEx); foreach ($methods as $method) { $template->assign_block_vars('dl_method', $method); } +$template->assign_vars(array( + 'S_HAS_ATTACHMENTS' => $topic_data['topic_attachment'], + 'U_DOWNLOAD_ALL_ATTACHMENTS' => $methods[0]['LINK'], +)); + // Instantiate BBCode if need be if ($bbcode_bitfield !== '') {