Skip to content

Commit

Permalink
Merge pull request #1115 from Eric-Jackson/fix-700
Browse files Browse the repository at this point in the history
  • Loading branch information
Diogo Parrinha committed Aug 15, 2014
2 parents e4b3e92 + 04aee97 commit 6c15574
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 9 deletions.
Binary file added images/forum_icon_sprite.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/off.png
Binary file not shown.
Binary file removed images/offlink.png
Binary file not shown.
Binary file removed images/offlock.png
Binary file not shown.
Binary file removed images/on.png
Binary file not shown.
40 changes: 34 additions & 6 deletions install/resources/mybb_theme.xml
Expand Up @@ -309,6 +309,34 @@ a:active {
width: auto;
}

.forum_status {
height: 30px;
width: 30px;
}

.forum_on,
.forum_off,
.forum_offlock,
.forum_offlink {
background: url(images/forum_icon_sprite.png) no-repeat 0 0;
}

.forum_on {
background-position: 0 0;
}

.forum_off {
background-position: 0 -30px;
}

.forum_offlock {
background-position: 0 -60px;
}

.forum_offlink {
background-position: 0 -90px;
}

table {
color: #333;
font-size: 13px;
Expand Down Expand Up @@ -3653,7 +3681,7 @@ a.button {
<a href="{$lastpost_link}" title="{$full_lastpost_subject}"><strong>{$lastpost_subject}</strong></a>
<br />{$lastpost_date}<br />{$lang->by} {$lastpost_profilelink}</span>]]></template>
<template name="forumbit_depth2_cat" version="1800"><![CDATA[<tr>
<td class="{$bgcolor}" align="center" valign="top" width="1"><img src="{$theme['imgdir']}/{$lightbulb['folder']}.png" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" /></td>
<td class="{$bgcolor}" align="center" valign="top" width="1"><div class="forum_status forum_{$lightbulb['folder']} ajax_mark_read" title="{$lightbulb['altonoff']}" id="mark_read_{$forum['fid']}"></div></td>
<td class="{$bgcolor}" valign="top">
<strong><a href="{$forum_url}">{$forum['name']}</a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$subforums}</div>
</td>
Expand All @@ -3662,7 +3690,7 @@ a.button {
<td class="{$bgcolor}" valign="top" align="right" style="white-space: nowrap">{$lastpost}</td>
</tr>]]></template>
<template name="forumbit_depth2_forum" version="1800"><![CDATA[<tr>
<td class="{$bgcolor}" align="center" valign="top" width="1"><img src="{$theme['imgdir']}/{$lightbulb['folder']}.png" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" /></td>
<td class="{$bgcolor}" align="center" valign="top" width="1"><div class="forum_status forum_{$lightbulb['folder']} ajax_mark_read" title="{$lightbulb['altonoff']}" id="mark_read_{$forum['fid']}"></div></td>
<td class="{$bgcolor}" valign="top">
<strong><a href="{$forum_url}">{$forum['name']}</a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div>
</td>
Expand Down Expand Up @@ -4194,16 +4222,16 @@ a.button {
{$boardstats}

<dl class="forum_legend smalltext">
<dt><img src="{$theme['imgdir']}/on.png" alt="{$lang->new_posts}" title="{$lang->new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>
<dt><div class="forum_status forum_on" title="{$lang->new_posts}"></div></dt>
<dd>{$lang->new_posts}</dd>

<dt><img src="{$theme['imgdir']}/off.png" alt="{$lang->no_new_posts}" title="{$lang->no_new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>
<dt><div class="forum_status forum_off" title="{$lang->no_new_posts}"></div></dt>
<dd>{$lang->no_new_posts}</dd>

<dt><img src="{$theme['imgdir']}/offlock.png" alt="{$lang->forum_locked}" title="{$lang->forum_locked}" style="vertical-align: middle;" /></dt>
<dt><div class="forum_status forum_offlock" title="{$lang->forum_locked}"></div></dt>
<dd>{$lang->forum_locked}</dd>

<dt><img src="{$theme['imgdir']}/offlink.png" alt="{$lang->forum_redirect}" title="{$lang->forum_redirect}" style="vertical-align: middle;" /></dt>
<dt><div class="forum_status forum_offlink" title="{$lang->forum_redirect}"></div></dt>
<dd>{$lang->forum_redirect}</dd>
</dl>
<br class="clear" />
Expand Down
6 changes: 3 additions & 3 deletions jscripts/general.js
Expand Up @@ -38,7 +38,7 @@ var MyBB = {
mark_read_imgs.each(function()
{
var element = $(this);
if(element.attr("src").match("off.png") || element.attr("src").match("offlock.png") || element.attr("src").match("offlink.png") || (element.attr("title") && element.attr("title") == lang.no_new_posts)) return;
if(element.hasClass('forum_off') || element.hasClass('forum_offlock') || element.hasClass('forum_offlink') || (element.attr("title") && element.attr("title") == lang.no_new_posts)) return;

element.click(function()
{
Expand Down Expand Up @@ -249,8 +249,8 @@ var MyBB = {
{
if(request == 1)
{
$("#mark_read_"+fid).attr("src", $("#mark_read_"+fid).attr("src").replace("on.png", "off.png"))
.css("cursor", "default")
$("#mark_read_"+fid).removeClass('forum_on').addClass('forum_off')
.css("cursor", "default")
.attr("title", lang.no_new_posts);
}
},
Expand Down

0 comments on commit 6c15574

Please sign in to comment.