liuxiaolong
2019-05-09 0d1d88cdb668e75ea8609417ac18ae19947e9525
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
 
<head>
 
    <title>通讯录</title>
    <meta name="decorator" content="default"/>
    
     <link href="${ctxStatic}/common/css/animate.css" rel="stylesheet">
 
 
    <script type="text/javascript">
    
        function search(n,s){
            $("#searchForm").attr("action","${ctx}/iim/contact/index");
            $("#searchForm").submit();
            return false;
        }
 
        function deleteFriend(id){
 
             window.location = "${ctx}/iim/contact/delFriend?id="+id;
        }
    </script>
</head>
 
<body class="gray-bg">
       <div class="wrapper wrapper-content animated fadeInRight">
       <div class="row">
       <c:forEach var="user" items="${list}">
             
            <div class="col-sm-4">
                <div class="contact-box">
                    <a href="#">
                        <div class="col-sm-4">
                            <div class="text-center">
                                <img alt="image" class="img-circle m-t-xs img-responsive" src="<c:out value="${user.photo}" />">
                            </div>
                        </div>
                        <div class="col-sm-7">
                            <h3><strong><c:out value="${user.name}" /></strong></h3>
                            <p><i class="fa fa-map-marker"></i> <c:out value="${user.company.name}" /></p>
                            <address>
                            <strong><c:out value="${user.office.name}" /></strong><br>
                              <c:out value="${user.email}" /><br>
                            tel:<c:out value="${user.phone}" /><br>
                            <abbr title="Phone">mobile:</abbr> <c:out value="${user.mobile}" />
                        </address>
                        </div>
                          <div class="col-sm-1">
                            <a class="hidden pull-right close-link btn btn-outline  btn-default btn-circle"   onclick="deleteFriend('${user.id}')"><i class="fa fa-times"></i>
                            </a>
                             </div>
                        <div class="clearfix"></div>
                    </a>
                </div>
            </div>
    </c:forEach>
            <div class="col-sm-4">
                <div class="contact-box">
                    <a href="#" onclick="searchFriend()">
                        <div class="col-sm-4">
                            <div class="text-center">
                                <img alt="image" style="height:140px;width:140px" class="img-circle m-t-xs img-responsive" src="${ctxStatic}/images/add_user.jpg">
                                <div class="m-t-xs font-bold"></div>
                            </div>
                        </div>
                        <div class="col-sm-8">
                            <br/>
                            <br/>
                            <h1><strong>添加好友</strong></h1>
                        </div>
                        <div class="clearfix"></div>
                    </a>
                </div>
            </div>
           
        </div>
    </div>
    <!-- 全局js -->
 
    <script>
        $(document).ready(function () {
            $('.contact-box').each(function () {
                animationHover(this, 'pulse');
            });
 
        });
 
        function searchFriend(){
            top.layer.open({
                type: 2,  
                area: ['800px', '500px'],
                title:"添加好友",
                name:'friend',
                content: "${ctx}/iim/contact/searchUsers" ,
                btn: ['确定', '关闭'],
                yes: function(index, layero){
                     var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
                     var ids = iframeWin.getSelectedIds();
 
                     if(ids == "-1"){
                         return;
                     }
                     window.location = "${ctx}/iim/contact/addFriend?ids="+ids;
                     top.layer.close(index);//关闭对话框。
                  },
                  cancel: function(index){ 
                   }
            }); 
        };
    </script>
 
    <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
    <!--统计代码,可删除-->
 
</body>
 
</html>