dgf пре 8 година
родитељ
комит
e48f97f67b

+ 28 - 2
talkview/src/js/controller/historyMsgController.js

@@ -6,14 +6,40 @@ angular.module('appMessage').controller('HistoryMsgController', ['$scope', '$fil
     $scope.appContent = {};
     $scope.historymessages = [];
     $scope.selectName = "全部"
-    $scope.currentPage = 2; //初始当前页
+    $scope.totalItems = 100;
+    $scope.currentPage = Math.floor($scope.totalItems / 10) + 1; //初始当前页
     $scope.maxSize = 5; //最多显示7页其他的用···代替
-    $scope.totalItems = 16;
 
     $scope.initAppContent = function(appContentJson) {
         $scope.appContent = JSON.parse(appContentJson);
     };
 
+    $scope.actived = function($event) {
+        var activeClick = $($event.target);
+        console.log(activeClick);
+        if (activeClick[0].nodeName == "LI") {
+            angular.element(".li").removeClass("activeBackground");
+            activeClick.addClass("activeBackground");
+        } else {
+            angular.element(".li").removeClass("activeBackground");
+            $(activeClick[0].parentElement.parentElement).addClass("activeBackground");
+        }
+    };
+
+    $scope.opened = function($event) {
+        var activeClick = $($event.target);
+        $scope.collapsed = activeClick[0].className;
+        if ($scope.collapsed == "collapsed") {
+            angular.element(".pull-right").removeClass("glyphicon-chevron-down");
+            angular.element(".pull-right").addClass("glyphicon-chevron-right");
+            $(activeClick[0].parentElement.nextElementSibling).removeClass("glyphicon-chevron-right");
+            $(activeClick[0].parentElement.nextElementSibling).addClass("glyphicon-chevron-down");
+        } else if ($scope.collapsed == "") {
+            angular.element(".pull-right").removeClass("glyphicon-chevron-down");
+            angular.element(".pull-right").addClass("glyphicon-chevron-right");
+        }
+    };
+
     $scope.voicePlay = function($event) {
         var audio = $($event.target.parentElement.nextElementSibling)[0];
         var unread = $($event.target.nextElementSibling);

+ 28 - 16
talkview/src/less/app.main.less

@@ -844,7 +844,7 @@ body {
     #leftList {
         background: #F5F5F5;
         float: left;
-        width: 180px;
+        width: 200px;
         height: 550px;
         border-right: 1px solid #ddd;
         font-size: 12px;
@@ -860,48 +860,61 @@ body {
                 border-left: none;
                 .panel-heading {
                     background: #F5F5F5;
+                    span {
+                        font-size: 13px;
+                        color: #444;
+                        }
                     a {
                         font-size: 13px;
                         color: #555;
                         text-decoration: none;
-                        span {
-                            color: #444;
                         }
-                        .lt {
+                    .lt {
                             font-size: 13px;
                         }
-                        .rt {
+                    .rt {
                             font-size: 13px;
                             margin-left: -10px;
                             margin-top: -10px;
                         }
+                    i {
+                        margin-top: 2px;
+                        font-weight: normal;
+                        font-size: 10px;
+                        color: #666;
                     }
                 }
                 .panel-collapse {
                     .panel-body {
                         overflow-y: auto;
                         overflow-x: hidden;
-                        max-height: 258px;
+                        max-height: 255px;
                     }
                     ul {
                         list-style: none;
-                        margin: -15px 0px -5px -50px;
+                        margin: -15px 0px -11px -55px;
+                        .activeBackground {
+                            background: #ddd;
+                        }
                         >li {
-                            width: 170px;
+                            width: 210px;
                             height: 25px;
                             font-family: "微软雅黑","宋体";
-                            padding-top:4px;
-                            padding-bottom: 1px;
+                            padding-top:3px;
+                            padding-bottom: 2px;
                             text-align: left;
                             font-size: 12px;
-                            color: #444;
+                            color: #555;
                             white-space: nowrap; /* 自适应宽度,不换行*/
                             overflow: hidden;
+                            &:hover,&:active,&:focus {
+                                background: #eee;
+                            }
                             .lf {
                                 cursor:default;
                                 width: 20px;
                                 height: 20px;
-                                margin: 1px 0px 10px 1px;
+                                margin: 1px 0px 10px 10px;
                                 border-radius: 100%;
                                 border:1px solid #ddd;
                                 background: #96CEDF;
@@ -910,11 +923,10 @@ body {
                                     width: 100%;
                                     height: 100%;
                                 }
-                                input {
+                                span {
+                                    height: 25px;
+                                    font-weight: normal;
                                     margin-left: 5px;
-                                    border: none;
-                                    outline: none;
-                                    background: #fff;
                                     width: 800%;
                                     white-space: nowrap;
                                     overflow: hidden;

Разлика између датотеке није приказан због своје велике величине
+ 59 - 69
talkview/src/templates/historyMsg.html