1 <%@ Page Language="C#" Title="我的提醒 - 木头盒子" AutoEventWireup="true" CodeBehind="Notice.aspx.cs" Inherits="PumpkinHouse.Notice" MasterPageFile="~/Site.Master" %>
\r
3 <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
\r
4 <script type="text/javascript">
\r
7 function renderAnnouncement(announceList) {
\r
8 renderTemplate('#tab3', '#announcementTemplate', announceList);
\r
9 document.title = '通知 - 木头盒子';
\r
12 function renderNotice(noticeList) {
\r
13 renderTemplate('#tab1', '#noticeTemplate', noticeList.list);
\r
14 document.title = '提醒 - 木头盒子';
\r
16 function renderReply(noticeList) {
\r
17 renderTemplate('#tab2', '#noticeTemplate', noticeList.list);
\r
18 document.title = '回复 - 木头盒子';
\r
21 function initAnnoucementPagination() {
\r
25 function initNoticePagination(result) {
\r
26 pagination('#pagination', result.count, 20, noticePageSelectCallback);
\r
27 renderNotice(result);
\r
30 function noticePageSelectCallback(pageNumber, container) {
\r
33 11, // Collect = 1, Fan = 2, Like = 8
\r
39 function initReplyPagination(result) {
\r
40 pagination('#pagination', result.count, 20, replyPageSelectCallback);
\r
41 renderReply(result);
\r
44 function initAnnouncementPagination(result) {
\r
45 pagination('#pagination', 0, 20, replyPageSelectCallback);
\r
46 renderAnnouncement(result);
\r
49 function replyPageSelectCallback(pageNumber, container) {
\r
52 4, // Collect = 1, Fan = 2, Like = 8
\r
58 function doAction () {
\r
59 $.getTmplSync('/template/noticeTemplate.html');
\r
61 globalTabs = $('#noticeHolder').tabs({
\r
62 select: function (event, ui) {
\r
63 var tabName = $(ui.tab).attr('href');
\r
64 location.hash = tabName;
\r
67 show: function (event, ui) {
\r
68 var index = ($(this).tabs('option', 'selected'));
\r
73 11, // Collect = 1, Fan = 2, Like = 8
\r
75 initNoticePagination,
\r
83 initReplyPagination,
\r
90 0, initAnnouncementPagination, handleFault);
\r
96 $('#noticeHolder').show();
\r
98 $('.noticeLink').live('click', function () {
\r
99 var index = parseInt($(this).attr('data-tab-index'));
\r
100 if (index == globalTabs.tabs('option', 'selected')) return false;
\r
101 globalTabs.tabs('select', index);
\r
102 setTimeout(function () {
\r
103 window.scrollTo(0, 0);
\r
104 ajaxGetNoticeSummary(true, renderAlert, getSummaryFailed);
\r
111 <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
\r
112 <style type="text/css">
\r
114 .ui-corner-all{border-radius:0px; border:none; border-top:1px solid #AEAEAE;}
\r
115 .ui-widget-header{background:none; background:#EDEDED; border:none;}
\r
116 .ui-corner-al{border:none; background:#FFFFFF}
\r
117 .ui-tabs-selected,.ui-state-active,.ui-state-hover{border:none; background:#FFFFFF; border-radius:0px; }
\r
118 .ui-state-default{border:none; background:none; font-family:'微软雅黑'; color:#28a7ff; font-size:16px;}
\r
119 ui-state-default a{background:none;}
\r
120 .ui-state-default a:hover{color:#28a7ff; font-size:16px; background:none;}
\r
121 .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #28a7ff; text-decoration: none; cursor:pointer;}
\r
122 .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus{ background:#FFFFFF;}
\r
123 .ui-corner-all ul li a{background:none; border:1px solod red}
\r
125 <div class="siteLink clearfix" style="width:800px; height:55px; margin-top:50px;"><a href="/">木头盒子首页</a> >消息提醒</div>
\r
126 <div id="noticeHolder" class="NoticeBox" style="border: 0px solid red; background: none; display:none">
\r
127 <ul style="border:none; background: #F6F6F6; height:37px;">
\r
128 <li style="border:none; margin-left:10px;"><a href="#tab1">与我有关</a></li>
\r
129 <li style="border:none;"><a href="#tab2">评论回复</a></li>
\r
130 <li style="border:none;"><a href="#tab3">通知</a></li>
\r
132 <div id="tab1" style="border: 0px solid red; float:left">
\r
135 <div id="tab2" style="border: 0px solid red; float:left">
\r
138 <div id="tab3" style="border: 0px solid red; float:left">
\r
142 <div id="pagination"></div>
\r