[ticket/11957] Responsive forums list

PHPBB3-11957
This commit is contained in:
Vjacheslav Trushkin 2013-10-26 11:01:23 +03:00
parent 10f0c8b333
commit b107b4c0e2
3 changed files with 48 additions and 10 deletions

View file

@ -440,19 +440,19 @@
<p><strong>{NAVIGATION}<!-- IF S_NO_FORUMS --> [<a href="{U_EDIT}">{L_EDIT}</a> | <a href="{U_DELETE}">{L_DELETE}</a><!-- IF not S_LINK --> | <a href="{U_SYNC}">{L_RESYNC}</a><!-- ENDIF -->]<!-- ENDIF --></strong></p>
<!-- IF .forums -->
<table cellspacing="1">
<table cellspacing="1" class="forums">
<col class="row1" /><col class="row1" /><col class="row2" />
<tbody>
<!-- BEGIN forums -->
<tr data-down="{forums.U_MOVE_DOWN}" data-up="{forums.U_MOVE_UP}">
<td style="width: 5%; text-align: center;">{forums.FOLDER_IMAGE}</td>
<td>
<td class="folder">{forums.FOLDER_IMAGE}</td>
<td class="forum-desc">
<!-- IF forums.FORUM_IMAGE --><div style="float: {S_CONTENT_FLOW_BEGIN}; margin-right: 5px;">{forums.FORUM_IMAGE}</div><!-- ENDIF -->
<strong><!-- IF forums.S_FORUM_LINK -->{forums.FORUM_NAME}<!-- ELSE --><a href="{forums.U_FORUM}">{forums.FORUM_NAME}</a><!-- ENDIF --></strong>
<!-- IF forums.FORUM_DESCRIPTION --><br /><span>{forums.FORUM_DESCRIPTION}</span><!-- ENDIF -->
<!-- IF forums.S_FORUM_POST --><br /><br /><span>{L_TOPICS}{L_COLON} <strong>{forums.FORUM_TOPICS}</strong> / {L_POSTS}{L_COLON} <strong>{forums.FORUM_POSTS}</strong></span><!-- ENDIF -->
</td>
<td style="vertical-align: top; width: 100px; text-align: right; white-space: nowrap;">
<td class="actions">
<!-- IF forums.S_FIRST_ROW && not forums.S_LAST_ROW -->
<span class="up">{ICON_MOVE_UP_DISABLED}</span>
<span class="down"><a href="{forums.U_MOVE_DOWN}" data-ajax="row_down" data-overlay="false">{ICON_MOVE_DOWN}</a></span>

View file

@ -750,6 +750,19 @@ td.name {
color: #BC2A4D;
}
/* Forums list */
table.forums td.folder {
width: 27px;
text-align: center;
}
table.forums td.actions {
vertical-align: middle;
width: 100px;
text-align: right;
white-space: nowrap;
}
@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
{
table.responsive, table.responsive tbody, table.responsive tr, table.responsive td {
@ -846,6 +859,36 @@ td.name {
table.responsive#memberlist td:first-child input[type="checkbox"] {
float: right;
}
/* Forums list */
table.responsive.forums td.folder {
float: left;
width: 27px;
background: transparent;
}
.rtl table.responsive.forums td.folder {
float: right;
}
table.responsive.forums td.forum-desc {
margin-left: 35px;
min-height: 27px;
background: transparent;
}
.rtl table.responsive.forums td.forum-desc {
margin-left: 0;
margin-right: 35px;
}
table.responsive.forums td.actions {
clear: both;
text-align: right !important;
}
.rtl table.responsive.forums td.actions {
text-align: left !important;
}
}
/* General form styles

View file

@ -51,12 +51,7 @@ function parse_document(container)
// Find columns
$this.find('colgroup:first').children().each(function(i) {
var column = $(this);
if (column.hasClass('col1')) {
$this.find('td:nth-child(' + (i + 1) + ')').addClass('col1');
}
if (column.hasClass('col2')) {
$this.find('td:nth-child(' + (i + 1) + ')').addClass('col2');
}
$this.find('td:nth-child(' + (i + 1) + ')').addClass(column.prop('className'));
});
// Find each header