Browse Source

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@110 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d

administrator 11 years ago
parent
commit
263c9c2825

+ 2 - 1
src/main/webapp/WEB-INF/views/normal/index.html

@@ -12,6 +12,7 @@
 <link rel="stylesheet" href="static/lib/bootstrap/css/bootstrap.min.css" />
 <link rel="stylesheet"
 	href="static/lib/fontawesome/css/font-awesome.min.css" />
+<link rel="stylesheet" href="static/lib/angular/ng-table.min.css" />
 <link rel="stylesheet" href="static/css/index.css" />
 </head>
 <body>
@@ -33,7 +34,7 @@
 								</a></li>
 								<li class="divider"></li>
 								<li><a href="#"><i class="fa fa-gear fa-fw"></i> 账号管理</a><a
-									href="#" class="muted pull-right" ng-click="logout()">退出</a></li>
+									class="text-muted pull-right" ng-click="logout()">退出</a></li>
 							</ul>
 						</div></li>
 					<li class="dropdown"><a href="#" role="button"

+ 46 - 0
src/main/webapp/resources/css/index.css

@@ -34,6 +34,10 @@ a {
 .f16 {
 	font-size: 16px !important;
 }
+
+[ng-click] {
+	cursor: pointer;
+}
 /*inverse*/
 .text-default {
 	color: #56a022;
@@ -864,4 +868,46 @@ a {
 #footer .list-inline>li:not(:last-child):after {
 	margin-left: 15px;
 	content: "|"
+}
+/*table*/
+.table thead th {
+	background-color: #f5f5f5;
+	background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+	background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff),
+		to(#e6e6e6));
+	background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
+	background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+	background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
+	background-repeat: repeat-x;
+	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',
+		endColorstr='#ffe6e6e6', GradientType=0);
+}
+
+.ng-table-filters>th {
+	padding: 0;
+}
+
+.ng-table th.filter .input-filter {
+	border: none;
+	-webkit-border-radius: 0;
+	-moz-border-radius: 0;
+	border-radius: 0;
+}
+
+.table-striped tbody>tr:hover,.table-striped tbody>tr:nth-child(odd):hover>td
+	{
+	background-color: rgba(141, 192, 219, 0.25);
+}
+
+.ng-table th.sortable.sort-desc,.ng-table th.sortable.sort-asc {
+	background-image: -moz-linear-gradient(top, #ffffff, rgba(141, 192, 219, 0.25));
+	background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff),
+		to(rgba(141, 192, 219, 0.25)));
+	background-image: -webkit-linear-gradient(top, #ffffff, rgba(141, 192, 219, 0.25));
+	background-image: -o-linear-gradient(top, #ffffff, rgba(141, 192, 219, 0.25));
+	background-image: linear-gradient(to bottom, #ffffff, rgba(141, 192, 219, 0.25));
+}
+
+.table .text-right>span {
+	float: right;
 }

+ 8 - 3
src/main/webapp/resources/js/index/app.js

@@ -1,6 +1,6 @@
-define([ 'toaster', 'charts', 'services', 'ui.router', 'ui.bootstrap' ], function() {
+define([ 'toaster', 'charts', 'ngTable', 'services', 'ui.router', 'ui.bootstrap' ], function() {
 	'use strict';
-	var app = angular.module('myApp', [ 'toaster', 'angularCharts', 'ui.router', 'common.services', 'ui.bootstrap' ]);
+	var app = angular.module('myApp', [ 'toaster', 'angularCharts', 'ngTable', 'ui.router', 'common.services', 'ui.bootstrap' ]);
 	app.init = function() {
 		angular.bootstrap(document, [ 'myApp' ]);
 	};
@@ -92,7 +92,7 @@ define([ 'toaster', 'charts', 'services', 'ui.router', 'ui.bootstrap' ], functio
 			$scope.routeState = routeState || 'home';
 		});
 	});
-	app.controller('AuthCtrl', function($scope, AuthenticationService) {
+	app.controller('AuthCtrl', function($scope, $window, AuthenticationService) {
 		$scope.isAuthed = AuthenticationService.isAuthed();
 		$scope.userInfo = {};
 		AuthenticationService.getAuthentication().success(function(data) {
@@ -100,6 +100,11 @@ define([ 'toaster', 'charts', 'services', 'ui.router', 'ui.bootstrap' ], functio
 			if (data == null || !data.uu)
 				$scope.isAuthed = false;
 		});
+		$scope.logout = function() {
+			AuthenticationService.logout().success(function() {
+				$window.location.reload();
+			});
+		};
 	});
 	app.controller('DataCtrl', function($scope) {
 		$scope.charts = {

+ 7 - 2
src/main/webapp/resources/js/index/main.js

@@ -9,7 +9,8 @@ require.config({
 		'charts' : 'lib/angular/angular-charts.min',
 		'services' : 'js/common/services',
 		'ui.router' : 'lib/angular/angular-ui-router.min',
-		'ui.bootstrap' : 'lib/angular/ui-bootstrap-tpls'
+		'ui.bootstrap' : 'lib/angular/ui-bootstrap-tpls',
+		'ngTable' : 'lib/angular/ng-table'
 	},
 	shim : {
 		'angular' : {
@@ -20,7 +21,11 @@ require.config({
 		'charts' : ['angular', 'd3'],
 		'services' : ['angular'],
 		'ui.router' : ['angular'],
-		'ui.bootstrap' : [ 'angular' ]
+		'ui.bootstrap' : [ 'angular' ],
+		'ngTable' : {
+			'exports' : 'ngTable',
+			'deps' : [ 'angular' ]
+		}
 	}
 });
 require([ 'app/app' ], function(app) {

+ 1 - 2
src/main/webapp/resources/tpl/index/home/right.html

@@ -54,13 +54,12 @@
 				<li class="icon">委外</li>
 				<li class="start">
 					<ul class="list-unstyled">
-						<li><a href="#">询价中(0)</a></li>
 						<li><a href="#">待回复(0)</a></li>
 					</ul>
 				</li>
 				<li class="doing">
 					<ul class="list-unstyled">
-						<li><a href="#">待卖家发货(0)</a></li>
+						<li><a href="#">待发货(0)</a></li>
 					</ul>
 				</li>
 				<li class="end">