From 8c5101a7297ebec1c9cc3ca849f604e5b39ccd9b Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 13:25:27 +0300 Subject: [PATCH 01/30] [ticket/11956] Responsive AJAX alerts PHPBB3-11956 --- phpBB/styles/prosilver/theme/common.css | 13 +++++++++++-- phpBB/styles/prosilver/theme/responsive.css | 5 +++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index 2c61ecfdea..19077bbc86 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -670,13 +670,22 @@ li.pagination ul { position: fixed; display: none; top: 150px; - left: 25%; - width: 50%; + left: 0; + right: 0; + max-width: 640px; + margin: 0 auto; z-index: 50; padding: 25px; padding: 0 25px 20px 25px; } +@media only screen and (max-height: 500px), only screen and (max-device-width: 500px) +{ + .phpbb_alert { + top: 25px; + } +} + .phpbb_alert .alert_close { display: block; float: right; diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index a9d7b1abc7..c15d9bee4e 100644 --- a/phpBB/styles/prosilver/theme/responsive.css +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -482,6 +482,11 @@ fieldset.display-actions { white-space: normal; } +.phpbb_alert { + max-width: none; + margin: 0 25px; +} + @media only screen and (max-width: 500px), only screen and (max-device-width: 500px) { p.responsive-center { From b196c9e8fff17703a37ed4b8ceea8b0f7a3eb625 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 13:26:48 +0300 Subject: [PATCH 02/30] [ticket/11956] Add assets_version to responsive.css link PHPBB3-11556 --- phpBB/styles/prosilver/template/overall_header.html | 2 +- phpBB/styles/prosilver/template/simple_header.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index 6ab0b3d553..e885503d90 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -29,7 +29,7 @@ - + diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html index e922893588..53c86689e0 100644 --- a/phpBB/styles/prosilver/template/simple_header.html +++ b/phpBB/styles/prosilver/template/simple_header.html @@ -12,7 +12,7 @@ - + From e660c1a5543c96d299b477731dedf3d144b685a0 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 15:17:48 +0300 Subject: [PATCH 03/30] [ticket/11956] Fix member list page PHPBB3-11956 --- phpBB/styles/prosilver/template/forum_fn.js | 6 +++++- phpBB/styles/prosilver/theme/responsive.css | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index a2758de9dc..b71ff45a27 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -546,7 +546,7 @@ function insert_single_user(formId, user) i, headersLength; // Find each header - th.each(function() { + th.each(function(column) { var cell = $(this), colspan = parseInt(cell.attr('colspan')), dfn = cell.attr('data-dfn'), @@ -558,6 +558,10 @@ function insert_single_user(formId, user) headers.push(text); } totalHeaders ++; + + if (dfn && !column) { + $this.addClass('show-header'); + } }); headersLength = headers.length; diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index c15d9bee4e..8578e50d1c 100644 --- a/phpBB/styles/prosilver/theme/responsive.css +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -262,6 +262,10 @@ table.responsive.show-header thead, table.responsive.show-header th:first-child text-align: left !important; } +table.responsive.show-header th:first-child span.rank-img { + display: none; +} + table.responsive tr { margin: 2px 0; } From af5e25cdf59f5c3e64d18810f1972dfb89be5506 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 15:38:58 +0300 Subject: [PATCH 04/30] [ticket/11956] Scale down large avatars Prevent large avatars from breaking layout on any resolution. PHPBB3-11956 --- phpBB/styles/prosilver/theme/content.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css index 7d91d331d6..ad6f27665d 100644 --- a/phpBB/styles/prosilver/theme/content.css +++ b/phpBB/styles/prosilver/theme/content.css @@ -711,6 +711,11 @@ fieldset.polls dd div { margin-bottom: 3px; } +.postprofile .avatar img { + max-width: 90%; + height: auto !important; +} + .online { background-image: none; background-position: 100% 0; From 4188d178f340f5784dfc762d64db29f38eb814f7 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 15:42:35 +0300 Subject: [PATCH 05/30] [ticket/11956] Scale down online image for HD display Scale down online image for HD displays PHPBB3-11956 --- phpBB/styles/prosilver/theme/responsive.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index 8578e50d1c..aadb98e188 100644 --- a/phpBB/styles/prosilver/theme/responsive.css +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -442,6 +442,14 @@ fieldset.polls dd.resultbar, fieldset.polls dd.poll_option_percent { max-height: 32px; } +@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 1.5dppx) +{ + /* Scale online image for HD displays */ + .online { + background-size: 40px; + } +} + /* Misc stuff ----------------------------------------*/ h2 { From 08811daa74dec097c5194f14dca2b30a6e11a631 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 16:53:57 +0300 Subject: [PATCH 06/30] [ticket/11956] Hide author on mobile devices Hide duplicate author name in posts on mobile devices PHPBB3-11956 --- phpBB/styles/prosilver/template/viewtopic_body.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index 82c380354b..763d7edb16 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -193,7 +193,7 @@ -

{postrow.MINI_POST_IMG}{postrow.MINI_POST_IMG}{L_POST_BY_AUTHOR} {postrow.POST_AUTHOR_FULL} » {postrow.POST_DATE}

+

{postrow.MINI_POST_IMG}{postrow.MINI_POST_IMG}{L_POST_BY_AUTHOR} {postrow.POST_AUTHOR_FULL} » {postrow.POST_DATE}

From 3016e5227b4256b9930e5515dbe849fbdc03e377 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 17:15:32 +0300 Subject: [PATCH 07/30] [ticket/11956] Fix responsive jumpbox PHPBB3-11956 --- phpBB/styles/prosilver/theme/forms.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/theme/forms.css b/phpBB/styles/prosilver/theme/forms.css index adb8c5e521..f128450955 100644 --- a/phpBB/styles/prosilver/theme/forms.css +++ b/phpBB/styles/prosilver/theme/forms.css @@ -206,7 +206,11 @@ fieldset.forum-selection2 { fieldset.jumpbox { text-align: right; margin-top: 15px; - height: 2.5em; + min-height: 2.5em; +} + +fieldset.jumpbox select { + max-width: 50%; } fieldset.quickmod { From 9833354578d9f2dfb9f1438718d84505880438e2 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 17:19:37 +0300 Subject: [PATCH 08/30] [ticket/11956] Fix topic actions layout Fix topic actions layout on mobile devices PHPBB3-11956 --- phpBB/styles/prosilver/theme/responsive.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index aadb98e188..fc24cd7ed2 100644 --- a/phpBB/styles/prosilver/theme/responsive.css +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -480,6 +480,12 @@ fieldset.quickmod { text-align: center; } +fieldset.display-options label { + display: block; + clear: both; + margin-bottom: 5px; +} + dl.mini dd.pm-legend { float: left; min-width: 200px; From 9b789662119c2893385801f5c746bedbed52c882 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 21:22:42 +0300 Subject: [PATCH 09/30] [ticket/11956] Fix errors in drafts.html PHPBB3-11956 --- phpBB/styles/prosilver/template/drafts.html | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/phpBB/styles/prosilver/template/drafts.html b/phpBB/styles/prosilver/template/drafts.html index b6e6a7f5b7..7620f2374c 100644 --- a/phpBB/styles/prosilver/template/drafts.html +++ b/phpBB/styles/prosilver/template/drafts.html @@ -13,26 +13,28 @@
-
    +
    • {L_LOAD_DRAFT}
      -
      {L_SAVE_DATE}
      +
      {L_SAVE_DATE}
    -
      +
      • - {draftrow.DRAFT_SUBJECT}
        - {L_TOPIC}{L_COLON} {draftrow.TITLE} - {L_FORUM}{L_COLON} {draftrow.TITLE} - {L_NO_TOPIC_FORUM} +
        + {draftrow.DRAFT_SUBJECT}
        + {L_TOPIC}{L_COLON} {draftrow.TITLE} + {L_FORUM}{L_COLON} {draftrow.TITLE} + {L_NO_TOPIC_FORUM} +
        -
        {draftrow.DATE}
        +
        {draftrow.DATE}
      • From 5c5137818607777367f6d9a970f668c0c6d061e7 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 21:28:32 +0300 Subject: [PATCH 10/30] [ticket/11956] Move responsive *CP navigation Move responsive *CP navigation to cp.css because layout has to change at width higher than 700px PHPBB3-11956 --- phpBB/styles/prosilver/theme/cp.css | 38 +++++++++++++++++++++ phpBB/styles/prosilver/theme/responsive.css | 35 ------------------- 2 files changed, 38 insertions(+), 35 deletions(-) diff --git a/phpBB/styles/prosilver/theme/cp.css b/phpBB/styles/prosilver/theme/cp.css index e0863f7458..f6bb1d0623 100644 --- a/phpBB/styles/prosilver/theme/cp.css +++ b/phpBB/styles/prosilver/theme/cp.css @@ -417,3 +417,41 @@ ol.def-rules li { border: 1px solid transparent; text-align: center; } + +/* Responsive *CP navigation +----------------------------------------*/ +@media only screen and (max-width: 900px), only screen and (max-device-width: 900px) +{ + .nojs #tabs a span, .nojs #minitabs a span { + max-width: 40px; + overflow: hidden; + text-overflow: ellipsis; + letter-spacing: -.5px; + } + + #cp-menu, #navigation, #cp-main { + float: none; + width: auto; + margin: 0; + } + + #navigation { + padding: 0; + margin: 0 auto; + max-width: 320px; + } + + #navigation a { + background-image: none; + } + + #navigation li:first-child a { + border-top-left-radius: 5px; + border-top-right-radius: 5px; + } + + #navigation li:last-child a { + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; + } +} diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index fc24cd7ed2..83233bf6aa 100644 --- a/phpBB/styles/prosilver/theme/responsive.css +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -211,41 +211,6 @@ ul.topiclist.forums dd.topics dfn, ul.topiclist.topics dd.posts dfn { margin: 5px 0; } -/* *CP navigation -----------------------------------------*/ -.nojs #tabs a span, .nojs #minitabs a span { - max-width: 40px; - overflow: hidden; - text-overflow: ellipsis; - letter-spacing: -.5px; -} - -#cp-menu, #navigation, #cp-main { - float: none; - width: auto; - margin: 0; -} - -#navigation { - padding: 0; - margin: 0 auto; - max-width: 320px; -} - -#navigation a { - background-image: none; -} - -#navigation li:first-child a { - border-top-left-radius: 5px; - border-top-right-radius: 5px; -} - -#navigation li:last-child a { - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; -} - /* Responsive tables ----------------------------------------*/ table.responsive, table.responsive tbody, table.responsive tr, table.responsive td { From d2d4438db50e54b9ad61731b5d92d01bd057309c Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Tue, 22 Oct 2013 00:11:48 +0300 Subject: [PATCH 11/30] [ticket/11956] Adjustments to responsive topiclist lists Changes behavior of topiclist lists on mobile devices. Shows/hides certain elements in each row to present all important information to visitor on mobile devices, such as last post when viewing forum instead of first post. Also fixes topiclist layout bug in drafts.html PHPBB3-11956 --- phpBB/styles/prosilver/template/drafts.html | 3 + phpBB/styles/prosilver/template/forum_fn.js | 76 +++++++++++++++++++ .../prosilver/template/forumlist_body.html | 10 +++ .../styles/prosilver/template/mcp_forum.html | 10 ++- .../styles/prosilver/template/mcp_front.html | 6 +- .../styles/prosilver/template/mcp_queue.html | 2 +- .../prosilver/template/mcp_reports.html | 7 ++ .../prosilver/template/ucp_attachments.html | 2 +- .../prosilver/template/ucp_groups_manage.html | 2 +- .../template/ucp_main_bookmarks.html | 10 ++- .../prosilver/template/ucp_main_drafts.html | 4 + .../prosilver/template/ucp_main_front.html | 9 ++- .../template/ucp_main_subscribed.html | 21 ++++- .../prosilver/template/ucp_pm_viewfolder.html | 2 +- .../prosilver/template/viewforum_body.html | 15 +++- phpBB/styles/prosilver/theme/responsive.css | 28 ++----- 16 files changed, 170 insertions(+), 37 deletions(-) diff --git a/phpBB/styles/prosilver/template/drafts.html b/phpBB/styles/prosilver/template/drafts.html index 7620f2374c..4b2e1bf0c6 100644 --- a/phpBB/styles/prosilver/template/drafts.html +++ b/phpBB/styles/prosilver/template/drafts.html @@ -32,6 +32,9 @@ {L_TOPIC}{L_COLON} {draftrow.TITLE} {L_FORUM}{L_COLON} {draftrow.TITLE} {L_NO_TOPIC_FORUM} +
{draftrow.DATE}
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index b71ff45a27..a425e9e1ad 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -536,6 +536,82 @@ function insert_single_user(formId, user) $(window).resize(check); }); + // Responsive topic lists + $('.topiclist.responsive-show-all > li > dl').each(function() { + var $this = $(this), + block = $this.find('dt .responsive-show:last-child'), + first = true; + + if (!block.length) { + $this.find('dt > .list-inner').append(' - {topicrow.ATTACH_ICON_IMG} {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} +
+ {topicrow.ATTACH_ICON_IMG} + {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} +
+
diff --git a/phpBB/styles/prosilver/template/mcp_front.html b/phpBB/styles/prosilver/template/mcp_front.html index 402cfe029a..6826b0af52 100644 --- a/phpBB/styles/prosilver/template/mcp_front.html +++ b/phpBB/styles/prosilver/template/mcp_front.html @@ -21,7 +21,7 @@ -
    +
    • @@ -75,7 +75,7 @@
    -
      +
      • @@ -116,7 +116,7 @@
      -
        +
        • diff --git a/phpBB/styles/prosilver/template/mcp_queue.html b/phpBB/styles/prosilver/template/mcp_queue.html index c2d39eff98..461d5982db 100644 --- a/phpBB/styles/prosilver/template/mcp_queue.html +++ b/phpBB/styles/prosilver/template/mcp_queue.html @@ -35,7 +35,7 @@
        -
          +
            diff --git a/phpBB/styles/prosilver/template/mcp_reports.html b/phpBB/styles/prosilver/template/mcp_reports.html index 902744fe25..ffa82d5e0e 100644 --- a/phpBB/styles/prosilver/template/mcp_reports.html +++ b/phpBB/styles/prosilver/template/mcp_reports.html @@ -48,6 +48,9 @@ {postrow.PM_SUBJECT} {postrow.ATTACH_ICON_IMG}
            {L_MESSAGE_BY_AUTHOR} {postrow.PM_AUTHOR_FULL} » {postrow.PM_TIME}
            {L_MESSAGE_TO} {postrow.RECIPIENTS} +
            @@ -58,6 +61,10 @@
            {postrow.POST_SUBJECT} {postrow.ATTACH_ICON_IMG}
            {L_POSTED} {L_POST_BY_AUTHOR} {postrow.POST_AUTHOR_FULL} » {postrow.POST_TIME} +
            diff --git a/phpBB/styles/prosilver/template/ucp_attachments.html b/phpBB/styles/prosilver/template/ucp_attachments.html index feb04278dc..ed39e80c12 100644 --- a/phpBB/styles/prosilver/template/ucp_attachments.html +++ b/phpBB/styles/prosilver/template/ucp_attachments.html @@ -31,7 +31,7 @@
          -
            +
            • diff --git a/phpBB/styles/prosilver/template/ucp_groups_manage.html b/phpBB/styles/prosilver/template/ucp_groups_manage.html index a785d18082..3053330f61 100644 --- a/phpBB/styles/prosilver/template/ucp_groups_manage.html +++ b/phpBB/styles/prosilver/template/ucp_groups_manage.html @@ -214,7 +214,7 @@
            -
              +
              • diff --git a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html index 017fadad77..477b06249e 100644 --- a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html +++ b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html @@ -54,7 +54,15 @@
              - {topicrow.ATTACH_ICON_IMG} {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} +
              + {topicrow.ATTACH_ICON_IMG} + {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} +
              +
              {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} diff --git a/phpBB/styles/prosilver/template/ucp_main_drafts.html b/phpBB/styles/prosilver/template/ucp_main_drafts.html index 723186e20c..52ad5b503b 100644 --- a/phpBB/styles/prosilver/template/ucp_main_drafts.html +++ b/phpBB/styles/prosilver/template/ucp_main_drafts.html @@ -45,6 +45,10 @@ {L_FORUM}{L_COLON} {draftrow.TITLE} {L_NO_TOPIC_FORUM} +
              {draftrow.DATE}
              {L_LOAD_DRAFT}{L_VIEW_EDIT}
              diff --git a/phpBB/styles/prosilver/template/ucp_main_front.html b/phpBB/styles/prosilver/template/ucp_main_front.html index 1e26e43772..fa3291cd6c 100644 --- a/phpBB/styles/prosilver/template/ucp_main_front.html +++ b/phpBB/styles/prosilver/template/ucp_main_front.html @@ -31,7 +31,14 @@
            - {topicrow.ATTACH_ICON_IMG} {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} +
            + {topicrow.ATTACH_ICON_IMG} + {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} +
            +
            {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} diff --git a/phpBB/styles/prosilver/template/ucp_main_subscribed.html b/phpBB/styles/prosilver/template/ucp_main_subscribed.html index 90fa76cefc..7344a4af1a 100755 --- a/phpBB/styles/prosilver/template/ucp_main_subscribed.html +++ b/phpBB/styles/prosilver/template/ucp_main_subscribed.html @@ -23,7 +23,17 @@
          • -
            {forumrow.FORUM_NAME}
            {forumrow.FORUM_DESC}
            +
            +
            + {forumrow.FORUM_NAME}
            + {forumrow.FORUM_DESC} + + + +
            +
            {L_LAST_POST} {L_POST_BY_AUTHOR} {forumrow.LAST_POST_AUTHOR_FULL} {LAST_POST_IMG}
            {forumrow.LAST_POST_TIME}
            {L_NO_POSTS}
              @@ -79,7 +89,14 @@
          - {topicrow.ATTACH_ICON_IMG} {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} +
          + {topicrow.ATTACH_ICON_IMG} + {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} +
          +
          {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html index 9cbff64a6a..a1012689f0 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html @@ -53,7 +53,7 @@
        -
          +
          • diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html index 04dc00aae2..360d9ae789 100644 --- a/phpBB/styles/prosilver/template/viewforum_body.html +++ b/phpBB/styles/prosilver/template/viewforum_body.html @@ -163,8 +163,19 @@
          - {topicrow.ATTACH_ICON_IMG} {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} - » {L_IN} {topicrow.FORUM_NAME} +
          + {topicrow.ATTACH_ICON_IMG} + {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} + » {L_IN} {topicrow.FORUM_NAME} +
          + + + + diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index 83233bf6aa..322f11e291 100644 --- a/phpBB/styles/prosilver/theme/responsive.css +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -133,35 +133,12 @@ ul.topiclist.forums dt, ul.topiclist.topics dt { } ul.topiclist.forums dt .list-inner, ul.topiclist.topics dt .list-inner { margin-right: 250px; - padding-bottom: 18px; } ul.topiclist.forums dd.lastpost, ul.topiclist.topics dd.lastpost { display: block; } -ul.topiclist.forums dd.topics, ul.topiclist.topics dd.posts { - display: block; - position: absolute; - left: 45px; - right: 0; - bottom: 0; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - min-height: 0; - height: auto; - border-width: 0; - margin: 0; - padding: 5px 0; - width: auto; - min-width: 0; - text-align: left; - font-weight: bold; - font-size: 1.2em; - line-height: 1em; -} - ul.topiclist dd.mark { display: block; position: absolute; @@ -196,6 +173,11 @@ ul.topiclist.forums dd.topics dfn, ul.topiclist.topics dd.posts dfn { } } +li.row .responsive-show strong { + font-weight: bold; + color: inherit; +} + /* Notifications list ----------------------------------------*/ @media only screen and (max-width: 350px), only screen and (max-device-width: 350px) From 431b4acb36a2087b58795f0951a786008dc3b943 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Tue, 22 Oct 2013 00:41:05 +0300 Subject: [PATCH 12/30] [ticket/11956] Move JS to reusable function Move JS to reusable function that can be ran for all content added with JavaScript such as results of AJAX forms PHPBB3-11956 --- phpBB/styles/prosilver/template/forum_fn.js | 1003 ++++++++++--------- 1 file changed, 527 insertions(+), 476 deletions(-) diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index a425e9e1ad..cb8ee2f9df 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -409,6 +409,532 @@ function insert_single_user(formId, user) self.close(); } +/** +* Parse document block +*/ +function parse_document(container) +{ + var test = document.createElement('div'), + oldBrowser = (typeof test.style.borderRadius == 'undefined'); + + delete test; + + /** + * Reset avatar dimensions when changing URL or EMAIL + */ + container.find('input[data-reset-on-edit]').bind('keyup', function() { + $(this.getAttribute('data-reset-on-edit')).val(''); + }); + + /** + * Pagination + */ + container.find('a.pagination-trigger').click(function() { + jumpto($(this)); + }); + + /** + * Adjust HTML code for IE8 and older versions + */ + if (oldBrowser) { + // Fix .linklist.bulletin lists + container.find('ul.linklist.bulletin li:first-child, ul.linklist.bulletin li.rightside:last-child').addClass('no-bulletin'); + + // Do not run functions below for old browsers + return; + } + + /** + * Resize navigation block to keep all links on same line + */ + container.find('.navlinks').each(function() { + var $this = $(this), + left = $this.children().not('.rightside'), + right = $this.children('.rightside'); + + if (left.length !== 1 || !right.length) return; + + function resize() { + var width = 0, + diff = left.outerWidth(true) - left.width(); + + right.each(function() { + width += $(this).outerWidth(true); + }); + left.css('max-width', Math.floor($this.width() - width - diff) + 'px'); + } + + resize(); + $(window).resize(resize); + }); + + /** + * Makes breadcrumbs responsive + */ + container.find('.breadcrumbs:not(.skip-responsive, .linklist.leftside .breadcrumbs)').each(function() { + var $this = $(this), + $body = $('body'), + links = $this.find('.crumb'), + length = links.length, + classes = ['wrapped-wide', 'wrapped-medium', 'wrapped-small'], + classesLength = classes.length, + maxHeight = 0, + lastWidth = false, + wrapped = false; + + // Test height by setting nowrap + $this.css('white-space', 'nowrap'); + maxHeight = $this.height() + 1; + $this.css('white-space', ''); + + // Set tooltips + $this.find('a').each(function() { + var $link = $(this); + $link.attr('title', $link.text()); + }); + + // Funciton that checks breadcrumbs + function check() { + var height = $this.height(), + width = $body.width(), + link, i, j; + + if (height <= maxHeight) { + if (!wrapped || lastWidth === false || lastWidth >= width) { + lastWidth = width; + return; + } + } + lastWidth = width; + + if (wrapped) { + $this.removeClass('wrapped').find('.crumb.wrapped').removeClass('wrapped ' + classes.join(' ')); + wrapped = false; + if ($this.height() <= maxHeight) { + return; + } + } + + wrapped = true; + $this.addClass('wrapped'); + if ($this.height() <= maxHeight) { + return; + } + + for (i = 0; i < classesLength; i ++) { + for (j = length - 1; j >= 0; j --) { + links.eq(j).addClass('wrapped ' + classes[i]); + if ($this.height() <= maxHeight) { + return; + } + } + } + } + + // Run function and set event + check(); + $(window).resize(check); + }); + + /** + * Adjust topiclist lists with check boxes + */ + container.find('ul.topiclist dd.mark').siblings('dt').children('.list-inner').addClass('with-mark'); + + /** + * Appends contents of all extra columns to first column in + * .topiclist lists for mobile devices. Copies contents as is. + * + * To add that functionality to .topiclist list simply add + * responsive-show-all to list of classes + */ + container.find('.topiclist.responsive-show-all > li > dl').each(function() { + var $this = $(this), + block = $this.find('dt .responsive-show:last-child'), + first = true; + + // Create block that is visible only on mobile devices + if (!block.length) { + $this.find('dt > .list-inner').append('