Skip to content

Commit

Permalink
Updates for metamod view
Browse files Browse the repository at this point in the history
  • Loading branch information
tvroom committed Aug 5, 2008
1 parent 96f1be8 commit 736be23
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion plugins/Ajax/htdocs/images/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ function firehose_fix_up_down(id, new_state) {
$updown.setClass(new_state);

// When ad admin nixes something, it should collapse and get out of the way.
if ( fh_is_admin && (new_state=='voteddown' || $('#title-'+id).is(':contains("Comment:")')) )
if ((fh_is_admin || firehose_settings.metamod) && (new_state=='voteddown' || $('#title-'+id).is(':contains("Comment:")')) )
firehose_collapse_entry(id);
}
}
Expand Down
8 changes: 5 additions & 3 deletions plugins/FireHose/firehose.pl
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@ sub list {
sub metamod {
my($slashdb, $constants, $user, $form, $gSkin) = @_;
my $firehose = getObject("Slash::FireHose");
$form->{tabtype} = "metamod";
$form->{skipmenu} = 1;
$form->{metamod} = 1;
$form->{tabtype} = "metamod";
$form->{skipmenu} = 1;
$form->{metamod} = 1;
$form->{pause} = 1;
$form->{no_saved} = 1;
print $firehose->listView();
}

Expand Down
17 changes: 13 additions & 4 deletions plugins/FireHose/templates/list;firehose;default
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ list
__seclev__
10000
__template__
[% IF form.metamod %]
<div id="metamodwrap">
[% END %]
[% firehose = Slash.getObject("Slash::FireHose"); %]
[% IF env.script_name == "/firehose.pl" || form.ssi %]
<script type="text/javascript">
Expand Down Expand Up @@ -45,19 +48,22 @@ __template__
YAHOO.util.Event.addListener(window, "load", YAHOO.slashdot.SlashBoxApp.init);
</script>
[% ua = env.HTTP_USER_AGENT %]

<div id="slashboxes">
[% Slash.getAd(2) %]
[% UNLESS user.noboxes %]
[% IF slashboxes && !(form.smalldevices || form.embed || (constants.smalldevices_ua_regex && ua.match(constants.smalldevices_ua_regex)));
[% IF slashboxes && !(form.smalldevices || form.embed || form.metamod || (constants.smalldevices_ua_regex && ua.match(constants.smalldevices_ua_regex)));
slashboxes %]
[% END %]
[% END %]
</div>
<div id="message">
<div class="content">
<p>
[% PROCESS rand_mesg %]
[% IF form.metamod %]
Meta-Moderation
[% ELSE %]
[% PROCESS rand_mesg %]
[% END %]
</p>
</div>
</div>
Expand Down Expand Up @@ -173,7 +179,7 @@ cmdrtaco dot net but be forgiving of beta code!
[% END %]

var firehose_action_time = 0;
[% IF options.pagesize == "large" %]
[% IF options.pagesize == "large" && !form.metamod %]
firehose_more_increment = 15;
[% END %]
[% options_color = (options.color || user.firehose_color || "indigo") %]
Expand Down Expand Up @@ -207,6 +213,9 @@ firehose_slider_init();

[% END %]
</script>
[% IF form.metamod %]
</div>
[% END %]

__version__
$Id$
5 changes: 5 additions & 0 deletions plugins/FireHose/templates/paginate;firehose;default
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ __template__
<div class="paginate" [% IF divid %]id="[% divid %]"[% END %]>
<div class="menu" [% IF ulid %]id="[% ulid %]"[% END %]>
[% END %]
[% IF form.metamod %]
You are welcome to do <a href="#" onclick="firehose_more(); return false">more than 10</a> metamods per day.
[% ELSE %]
[% IF options.duration == 7 && !options.startdate %]
[% day = Slash.db.getDay(0);
got_more_link = 0;
Expand Down Expand Up @@ -144,6 +147,8 @@ __template__
[% END %]
[% END %]
[% idle_submit_plug %]
[% END %]

[% IF !contentsonly %]
</div>
</div>
Expand Down

0 comments on commit 736be23

Please sign in to comment.