# This code was forked from the LiveJournal project owned and operated # by Live Journal, Inc. The code has been modified and expanded by # Dreamwidth Studios, LLC. These files were originally licensed under # the terms of the license supplied by Live Journal, Inc, which can # currently be found at: # # http://code.livejournal.org/trac/livejournal/browser/trunk/LICENSE-LiveJournal.txt # # In accordance with the original license, this code and all its # modifications are provided under the GNU General Public License. # A copy of that license can be found in the LICENSE file included as # part of this distribution. package LJ::Widget::InboxFolder; use strict; use base qw(LJ::Widget); use Carp qw(croak); # DO NOT COPY # This widget is not a good example of how to use JS and AJAX. # This widget's render_body outputs HTML similar to the HTML # output originally by the Notifications Inbox page. This was # done so that the existing JS, CSS and Endpoints could be used. sub need_res { return qw( js/6alib/core.js js/6alib/dom.js js/6alib/view.js js/6alib/datasource.js js/6alib/checkallbutton.js js/6alib/selectable_table.js js/6alib/httpreq.js js/6alib/hourglass.js js/esn_inbox.js stc/esn.css stc/lj_base.css ); } # args # folder: the view or subset of notification items to display # reply_btn: should we show a reply button or link # expand: display a specified in expanded view # inbox: NotificationInbox object # items: list of notification items sub render_body { my $class = shift; my %opts = @_; my $name = $opts{folder}; my $show_reply_btn = $opts{reply_btn} || 0; my $expand = $opts{expand} || 0; my $inbox = $opts{inbox}; my $nitems = $opts{items}; my $page = $opts{page} || 1; my $view = $opts{view} || "all"; my $itemid = int( $opts{itemid} || 0 ); my $remote = LJ::get_remote(); my $unread_count = 1; #TODO get real number my $disabled = $unread_count ? '' : 'disabled'; # print form my $msgs_body .= qq {
}; # JS confirm dialog that appears when a user tries to delete a bookmarked item $msgs_body .= ""; LJ::warn_for_perl_utf8($msgs_body); return $msgs_body; } 1;