1 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Step1.aspx.cs" Inherits="PumpkinHouse.Guide.Step1" MasterPageFile="/Account/Account.Master" %>
\r
3 <asp:Content ID="Head" runat="server" ContentPlaceHolderID="headHolder">
\r
4 <script src="/Scripts/lib/jquery.dateFormat-1.0.js" type="text/javascript"></script>
\r
5 <script type="text/javascript">
\r
6 function renderAlbums(albums) {
\r
7 renderTemplate('.loveBox ul', '#albumTemplate', albums.list);
\r
8 $('#likeAllAlbums').on('change', function (eventObject) {
\r
9 var target = $(eventObject.target);
\r
10 var checked = target.attr('checked') == 'checked';
\r
11 $('.likeAlbumChk').attr('checked', checked);
\r
15 function renderUsers(users) {
\r
16 renderTemplate('.loveUser', '#peopleTemplate', users.list);
\r
17 $('#fanAllUsers').on('change', function (eventObject) {
\r
18 var target = $(eventObject.target);
\r
19 var checked = target.attr('checked') == 'checked';
\r
20 $('.fanUserChk').attr('checked', checked);
\r
25 ajaxGetPopularAlbums(true, 8, renderAlbums, handleFault);
\r
26 ajaxGetPopularUsers(true, 15, renderUsers, handleFault);
\r
28 $('.stepBtn').on('click', function () {
\r
30 $('.likeAlbumChk').each(function (index, item) {
\r
31 if ($(item).attr('checked') == 'checked') {
\r
32 albumIds.push($(item).attr('data-album-id'));
\r
36 $('.fanUserChk').each(function (index, item) {
\r
37 if ($(item).attr('checked') == 'checked') {
\r
38 usernames.push($(item).attr('data-username'));
\r
42 if (albumIds.length < 1 || usernames.length < 1) {
\r
43 showSmallDialog('#actionFailTemplate', '.failDialog', '至少关注1个好友和1个盒子哦!');
\r
47 ajaxAddInitialFavoriates(true, usernames, albumIds, function () {
\r
48 document.location = "/guide/step2.aspx";
\r
55 <style type="text/css">
\r
56 body{ text-align:left;}
\r
60 <asp:Content ID="Content" runat="server" ContentPlaceHolderID="AccountContentHolder">
\r
62 <div class="RegStep">
\r
65 <li class="step1 step1t ColorAacd60"><a href="javascript:void(0);" class="allPngPic">1</a><br />关注你可能感兴趣的</li>
\r
66 <li class="step1"><a href="javascript:void(0);" class="allPngPic">2</a><br />学习使用木头盒子</li>
\r
67 <li class="step3"><a href="javascript:void(0);" class="allPngPic">3</a><br />添加我的盒子</li>
\r
71 <h1 class="float_l">你可能喜欢的盒子</h1> <h2 class="float_r"><input type="checkbox" id="likeAllAlbums"/> 一键喜欢</h2>
\r
73 <div class="loveBox clearfix">
\r
79 <h1 class="float_l">你可能想关注的人</h1> <h2 class="float_r"><input type="checkbox" id="fanAllUsers" /> 一键关注</h2>
\r
81 <div class="loveUser clearfix">
\r
84 <div class="stepBtnBox">
\r
85 <input type="button" value="" class="stepBtn" />
\r
89 <script id="albumTemplate" type="text/x-jQuery-tmpl">
\r
90 <li><div class="boxMargin">
\r
91 {{if pictures.list.length > 0}}
\r
92 <a href="/album/${id}" target="_blank"><img height="195" width="195" src="${pictures.list[0].url}_200_200_thumbnail.${pictures.list[0].ext}"/></a> <br />
\r
95 <span class="float_l">${name}</span><span class="float_r"><input type="checkbox" data-album-id="${id}" class="likeAlbumChk"/></span>
\r
100 <script id="peopleTemplate" type="text/x-jQuery-tmpl">
\r
102 <li>{{tmpl({username: username, dd: 47, pd: 50}) '#userProfilePhotoTemplate'}}</li>
\r
104 <span style="width:85px; display:block; height:18px; word-break:keep-all; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;">${displayName}</span>
\r
105 <span class="ColorC1" style="width:85px; display:block; height:18px; word-break:keep-all; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;">${selfIntroduction}</span>
\r
106 <input type="checkbox" data-username="${username}" class="fanUserChk" /><br />
\r
111 <!-- #Include virtual="/template/util.html" -->
\r
112 <!-- #Include virtual="/template/albumTemplate.html" -->
\r