From cb21c33a14937a87551a0b39c2f814dca187a134 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Fri, 27 Sep 2013 16:56:06 +0300 Subject: [ticket/11872] Template syntax typos in oauth templates PHPBB3-11872 --- phpBB/styles/prosilver/template/ucp_auth_link_oauth.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/styles/prosilver/template') diff --git a/phpBB/styles/prosilver/template/ucp_auth_link_oauth.html b/phpBB/styles/prosilver/template/ucp_auth_link_oauth.html index a3e27328cd..18316613b0 100644 --- a/phpBB/styles/prosilver/template/ucp_auth_link_oauth.html +++ b/phpBB/styles/prosilver/template/ucp_auth_link_oauth.html @@ -20,7 +20,7 @@
 
- + {oauth.HIDDEN_FIELDS} {S_HIDDEN_FIELDS} -- cgit v1.2.1 From b196c9e8fff17703a37ed4b8ceea8b0f7a3eb625 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 13:26:48 +0300 Subject: [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(-) (limited to 'phpBB/styles/prosilver/template') 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 @@ - + -- cgit v1.2.1 From e660c1a5543c96d299b477731dedf3d144b685a0 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 15:17:48 +0300 Subject: [ticket/11956] Fix member list page PHPBB3-11956 --- phpBB/styles/prosilver/template/forum_fn.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'phpBB/styles/prosilver/template') 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; -- cgit v1.2.1 From 08811daa74dec097c5194f14dca2b30a6e11a631 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 16:53:57 +0300 Subject: [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(-) (limited to 'phpBB/styles/prosilver/template') 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}

-- cgit v1.2.1 From 9b789662119c2893385801f5c746bedbed52c882 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 21 Oct 2013 21:22:42 +0300 Subject: [ticket/11956] Fix errors in drafts.html PHPBB3-11956 --- phpBB/styles/prosilver/template/drafts.html | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'phpBB/styles/prosilver/template') 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}
      • -- cgit v1.2.1 From d2d4438db50e54b9ad61731b5d92d01bd057309c Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Tue, 22 Oct 2013 00:11:48 +0300 Subject: [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 ++++++++++++++++++++++ .../styles/prosilver/template/forumlist_body.html | 10 +++ phpBB/styles/prosilver/template/mcp_forum.html | 10 ++- phpBB/styles/prosilver/template/mcp_front.html | 6 +- phpBB/styles/prosilver/template/mcp_queue.html | 2 +- phpBB/styles/prosilver/template/mcp_reports.html | 7 ++ .../styles/prosilver/template/ucp_attachments.html | 2 +- .../prosilver/template/ucp_groups_manage.html | 2 +- .../prosilver/template/ucp_main_bookmarks.html | 10 ++- .../styles/prosilver/template/ucp_main_drafts.html | 4 ++ .../styles/prosilver/template/ucp_main_front.html | 9 ++- .../prosilver/template/ucp_main_subscribed.html | 21 +++++- .../prosilver/template/ucp_pm_viewfolder.html | 2 +- .../styles/prosilver/template/viewforum_body.html | 15 ++++- 15 files changed, 165 insertions(+), 14 deletions(-) (limited to 'phpBB/styles/prosilver/template') 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} +
          + + + + -- cgit v1.2.1 From 431b4acb36a2087b58795f0951a786008dc3b943 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Tue, 22 Oct 2013 00:41:05 +0300 Subject: [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 | 797 +++++++++++++++------------- 1 file changed, 424 insertions(+), 373 deletions(-) (limited to 'phpBB/styles/prosilver/template') 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 @@ -410,138 +410,203 @@ function insert_single_user(formId, user) } /** -* Run onload functions +* Parse document block */ -(function($) { - $(document).ready(function() { - // Swap .nojs and .hasjs - $('#phpbb.nojs').toggleClass('nojs hasjs'); - - // Focus forms - $('form[data-focus]:first').each(function() { - $('#' + this.getAttribute('data-focus')).focus(); - }); +function parse_document(container) +{ + var test = document.createElement('div'), + oldBrowser = (typeof test.style.borderRadius == 'undefined'); - // Reset avatar dimensions when changing URL or EMAIL - $('input[data-reset-on-edit]').bind('keyup', function() { - $(this.getAttribute('data-reset-on-edit')).val(''); - }); + delete test; - // Pagination - $('a.pagination-trigger').click(function() { - jumpto($(this)); - }); + /** + * 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(''); + }); - // Adjust HTML code for IE8 and older versions - var test = document.createElement('div'), - oldBrowser = (typeof test.style.borderRadius == 'undefined'); - delete test; + /** + * Pagination + */ + container.find('a.pagination-trigger').click(function() { + jumpto($(this)); + }); - if (oldBrowser) { - // Fix .linklist.bulletin lists - $('ul.linklist.bulletin li:first-child, ul.linklist.bulletin li.rightside:last-child').addClass('no-bulletin'); + /** + * 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; - } + // Do not run functions below for old browsers + return; + } - // Adjust topiclist lists with check boxes - $('ul.topiclist dd.mark').siblings('dt').children('.list-inner').addClass('with-mark'); + /** + * 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'); - // Resize navigation block to keep all links on same line - $('.navlinks').each(function() { - var $this = $(this), - left = $this.children().not('.rightside'), - right = $this.children('.rightside'); + if (left.length !== 1 || !right.length) return; - if (left.length !== 1 || !right.length) return; + function resize() { + var width = 0, + diff = left.outerWidth(true) - left.width(); - 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'); + } - right.each(function() { - width += $(this).outerWidth(true); - }); - left.css('max-width', Math.floor($this.width() - width - diff) + 'px'); - } + resize(); + $(window).resize(resize); + }); - 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()); }); - // Responsive breadcrumbs - $('.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; - // 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 (height <= maxHeight) { - if (!wrapped || lastWidth === false || lastWidth >= width) { - lastWidth = width; - return; - } + if (wrapped) { + $this.removeClass('wrapped').find('.crumb.wrapped').removeClass('wrapped ' + classes.join(' ')); + wrapped = false; + if ($this.height() <= maxHeight) { + return; } - lastWidth = width; + } - if (wrapped) { - $this.removeClass('wrapped').find('.crumb.wrapped').removeClass('wrapped ' + classes.join(' ')); - wrapped = false; + 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; } } + } + } - wrapped = true; - $this.addClass('wrapped'); - if ($this.height() <= maxHeight) { - return; - } + // Run function and set event + check(); + $(window).resize(check); + }); - 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; - } - } - } + /** + * 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('