Selaa lähdekoodia

Signed-off-by: lqq <lqq@wswin.cn>

lqq 9 vuotta sitten
vanhempi
commit
2cbf4462ef

+ 1 - 2
common/utilities.js

@@ -1,4 +1,3 @@
 function stop(){ 
     return false; 
-} 
-document.oncontextmenu=stop; 
+} 

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
dist/settingview/app-316c6daf9f.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
dist/settingview/app-1a2fd32ce0.css


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 1
dist/settingview/app-e4454ada99.js


+ 5 - 9
dist/settingview/index.html

@@ -6,10 +6,10 @@
 	<meta charset="utf-8" />
 	<!-- 新 Bootstrap 核心 CSS 文件 -->
 	<link rel="stylesheet" href="../bower_components/bootstrap/dist/css/bootstrap.min.css">
-	<link rel="stylesheet" href="app-1a2fd32ce0.css">
+	<link rel="stylesheet" href="app-350f68e0fe.css">
 </head>
 
-<body ng-app="app" ng-controller="SettingController"  onselectstart="return false">
+<body ng-app="app" ng-controller="SettingController">
 	<div class="container">
 		<div class="row">
 			<div class="col-xs-2 p-r-none p-l-none" style="border-right:1px solid #BADEEA; height:400px">
@@ -17,18 +17,14 @@
 					<li><a href="{{user.shortL.length>=15?'#/setting-enterprise':'#/setting-user'}}" class="nav-settings-item">{{user.shortL.length >= 15? '企业名片':'个人名片'}}</a></li>
 					<li><a href="#/setting-system" class="nav-settings-item">系统设置</a></li>
 					<li><a href="#/setting-hotkey" class="nav-settings-item">热键设置</a></li>
-					<!--<li><a href="#sso">单点登录</a></li>-->
-					<!--<li><a href="#chuchai">出差设置</a></li>-->
+					<li><a href="#/setting-sso" class="nav-settings-item">单点登录</a></li>
+					<li><a href="#/setting-net" class="nav-settings-item">网络设置</a></li>
 				</ul>
 			</div>
 			<div class="col-xs-10 p" style="background-color:#F0FFFF; font-size:12px; height:400px; overflow-y:auto;">
 				<ui-view></ui-view>
-
 				<div style="height:40px;"></div>
 				<button type="button" class="btn btn-success btn-sm" style="position: fixed; bottom: 10px; right: 30px;" ng-show="userChanged||sysChanged||hotkeyChanged" ng-click="save()">保存</button>
-				<!--<h5 id="hotkey" class="m-t text-info">出差设置:</h5>
-				<div class="form-horizontal">
-				</div>-->
 			</div>
 		</div>
 	</div>
@@ -36,7 +32,7 @@
 	<!--<script src="js/jquery.min.js"></script>-->
 	<script src="../bower_components/angular/angular.min.js"></script>
 	<script src="../bower_components/angular-ui-router/release/angular-ui-router.min.js"></script>
-	<script src="app-e4454ada99.js"></script>
+	<script src="app-316c6daf9f.js"></script>
 </body>
 
 </html>

+ 3 - 7
settingview/src/html/index.html

@@ -9,7 +9,7 @@
 	<link rel="stylesheet" href="app.css">
 </head>
 
-<body ng-app="app" ng-controller="SettingController"  onselectstart="return false">
+<body ng-app="app" ng-controller="SettingController">
 	<div class="container">
 		<div class="row">
 			<div class="col-xs-2 p-r-none p-l-none" style="border-right:1px solid #BADEEA; height:400px">
@@ -17,18 +17,14 @@
 					<li><a href="{{user.shortL.length>=15?'#/setting-enterprise':'#/setting-user'}}" class="nav-settings-item">{{user.shortL.length >= 15? '企业名片':'个人名片'}}</a></li>
 					<li><a href="#/setting-system" class="nav-settings-item">系统设置</a></li>
 					<li><a href="#/setting-hotkey" class="nav-settings-item">热键设置</a></li>
-					<!--<li><a href="#sso">单点登录</a></li>-->
-					<!--<li><a href="#chuchai">出差设置</a></li>-->
+					<li><a href="#/setting-sso" class="nav-settings-item">单点登录</a></li>
+					<li><a href="#/setting-net" class="nav-settings-item">网络设置</a></li>
 				</ul>
 			</div>
 			<div class="col-xs-10 p" style="background-color:#F0FFFF; font-size:12px; height:400px; overflow-y:auto;">
 				<ui-view></ui-view>
-
 				<div style="height:40px;"></div>
 				<button type="button" class="btn btn-success btn-sm" style="position: fixed; bottom: 10px; right: 30px;" ng-show="userChanged||sysChanged||hotkeyChanged" ng-click="save()">保存</button>
-				<!--<h5 id="hotkey" class="m-t text-info">出差设置:</h5>
-				<div class="form-horizontal">
-				</div>-->
 			</div>
 		</div>
 	</div>

+ 0 - 3
settingview/src/js/app.js

@@ -1,7 +1,4 @@
 'use strict';
-
-
-
 var app = angular.module('app', [
     'ui.router', 
     'templatescache']);

+ 25 - 3
settingview/src/js/controller/settingController.js

@@ -2,7 +2,7 @@
 
 angular.module('app').controller('SettingController', ['$scope', '$state', '$stateParams', function ($scope, $state, $stateParams) {
 
-  lxtalkClient.Invoke('{B36B3985-B13D-45F3-A755-AFA6937B4F33}', '_Register', '', $scope);
+  // lxtalkClient.Invoke('{B36B3985-B13D-45F3-A755-AFA6937B4F33}', '_Register', '', $scope);
   $scope.user = {
     name: '陆趣趣',
     l:'0578+0-lslqq',
@@ -26,16 +26,30 @@ angular.module('app').controller('SettingController', ['$scope', '$state', '$sta
     cutScreen:'CTRL+ALT+S',
     sendMsg:'Ctrl+Enter'
   }
+  $scope.net = {
+    ip:"255.255.255.255",
+    port:443
+  }
 
   $scope.userChanged = false;
   $scope.sysChanged = false;
   $scope.hotkeyChanged = false;
 
+  $scope.$on('onNetRestore', function(event, data){
+    var net = JSON.parse(data);
+    $scope.net = net;
+    $scope.$apply();
+  });
+  
   $scope.onUserInfoChange = function() {
     console.log($scope.checkMoblie($scope.user.mob));
     console.log($scope.user.mob);
     $scope.userChanged = $scope.checkMoblie($scope.user.mob);
   }
+
+  $scope.onNetChange = function(){
+    $scope.netChanged = $scope.checkIP($scope.net.ip) && $scope.checkPort($scope.net.port);
+  }
   $scope.onSysChange = function() {
     $scope.sysChanged = true;
   }
@@ -63,10 +77,13 @@ angular.module('app').controller('SettingController', ['$scope', '$state', '$sta
       settings.sys = $scope.sys;
     if($scope.hotkeyChanged)
       settings.hotkey = $scope.hotkey;
-    lxtalkClient.Invoke('{B36B3985-B13D-45F3-A755-AFA6937B4F33}', 'Save', JSON.stringify(settings), null);
+    if ($scope.netChanged)
+      settings.net = $scope.net;
+    // lxtalkClient.Invoke('{B36B3985-B13D-45F3-A755-AFA6937B4F33}', 'Save', JSON.stringify(settings), null);
     $scope.userChanged = false;
     $scope.sysChanged = false;
     $scope.hotkeyChanged = false;
+    $scope.netChanged = false;
   }
 
   $scope.checkMoblie = function(params) {
@@ -75,5 +92,10 @@ angular.module('app').controller('SettingController', ['$scope', '$state', '$sta
   $scope.checkEmail = function (params) {
     return (/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/).test(params);
   }
-
+  $scope.checkIP = function (params){
+    return (/((?:(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d))))/).test(params);
+  }
+  $scope.checkPort = function (params){
+    return (/^([0-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/).test(params);
+  }
 }]);

+ 8 - 0
settingview/src/js/router.js

@@ -18,6 +18,14 @@ angular.module('app').run(['$rootScope', '$state', '$stateParams',
             url:'/setting-hotkey',
             templateUrl:'templates/setting-hotkey.html'
         })
+        .state('setting-sso',{
+            url:'/setting-sso',
+            templateUrl:'templates/setting-sso.html'
+        })
+        .state('setting-net',{
+            url:'/setting-net',
+            templateUrl:'templates/setting-net.html'
+        })
         .state('setting-system',{
             url:'/setting-system',
             templateUrl:'templates/setting-system.html'

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 3 - 1
settingview/src/js/templates.js


+ 34 - 1
settingview/src/less/app/app.main.less

@@ -32,4 +32,37 @@
   > li + li {
     margin-left: 0px;
   }
-}
+}
+
+.sso-table{
+  > thead{
+     > tr{
+       > th{
+         border: 0;
+         text-align: center;
+       }
+       border-bottom: 2px solid #0099FF;
+     }
+  }
+
+  & > tbody {
+      > tr{
+        > th{
+          border: 0;
+          font-weight: normal;
+          text-align: center;
+        }
+        background-color: transparent;
+        border-top: 1px dotted #3399FF;
+      }
+    > :last-child {
+      border-bottom: 1px solid #0099FF;
+    };
+    > :first-child{
+      border-top: 0px;
+    }
+  }
+  & .col-sm-w{
+    width: 6em;
+  }
+}

+ 2 - 2
settingview/src/templates/setting-enterprise.html

@@ -34,9 +34,9 @@
     </div>
     <div class="form-group form-group-sm m-r-none m-b-none">
         <label class="col-xs-2 control-label setting-name" for="formGroupInputSmall">法人邮箱</label>
-        <div class="col-xs-10 setting-value has-feedback {{checkMoblie(user.email)?'has-success':'has-error'}}">
+        <div class="col-xs-10 setting-value has-feedback {{checkEmail(user.email)?'has-success':'has-error'}}">
             <input type="text" class="form-control" ng-model="user.email" ng-change="onUserInfoChange()" aria-describedby="inputSuccess2Status">
-            <span class="glyphicon {{checkMoblie(user.email)?'glyphicon-ok':'glyphicon-remove'}} form-control-feedback" aria-hidden="true"></span>
+            <span class="glyphicon {{checkEmail(user.email)?'glyphicon-ok':'glyphicon-remove'}} form-control-feedback" aria-hidden="true"></span>
             <span id="inputSuccess2Status" class="sr-only">(success)</span>
         </div>
     </div>

+ 20 - 0
settingview/src/templates/setting-net.html

@@ -0,0 +1,20 @@
+<h5 id="system" class="m-t-none text-info">网络设置:</h5>
+<div class="form-horizontal">
+    <div class="form-group form-group-sm m-r-none m-b-none">
+        <label class="col-xs-2 control-label setting-name" for="formGroupInputSmall">IP地址</label>
+        <div class="col-xs-4 setting-value has-feedback {{checkIP(net.ip)?'has-success':'has-error'}}">
+            <input type="text" class="form-control" ng-model="net.ip" ng-change="onNetChange()" aria-describedby="inputSuccess2Status">
+            <span class="glyphicon {{checkIP(net.ip)?'glyphicon-ok':'glyphicon-remove'}} form-control-feedback" aria-hidden="true"></span>
+            <span id="inputSuccess2Status" class="sr-only">(success)</span>
+        </div>
+    </div>
+
+    <div class="form-group form-group-sm m-r-none m-b-none">
+        <label class="col-xs-2 control-label setting-name" for="formGroupInputSmall">端口</label>
+        <div class="col-xs-4 setting-value has-feedback {{checkPort(net.port)?'has-success':'has-error'}}">
+            <input type="text" class="form-control" ng-model="net.port" ng-change="onNetChange()" aria-describedby="inputSuccess2Status">
+            <span class="glyphicon {{checkPort(net.port)?'glyphicon-ok':'glyphicon-remove'}} form-control-feedback" aria-hidden="true"></span>
+            <span id="inputSuccess2Status" class="sr-only">(success)</span>
+        </div>
+    </div>
+</div>

+ 56 - 0
settingview/src/templates/setting-sso.html

@@ -0,0 +1,56 @@
+<h5 id="system" class="m-t-none text-info">单点登录:</h5>
+<div class="form-horizontal">
+    <div class="form-group form-group-sm m-r-none m-b-none">
+        <label class="col-xs-1 control-label"></label>
+        <div class="col-xs-11 setting-value">
+            <table class="table table-condensed sso-table">
+                <thead>
+                    <tr>
+                        <th>名称</th>
+                        <th class="col-sm-w">账号</th>
+                        <th class="col-sm-w">类型</th>
+                        <th class="col-sm-w">状态</th>
+                        <th class="col-sm-w">账号设置</th>
+                    </tr>
+                </thead>
+                <tbody>
+                    <tr>
+                        <th>名称</th>
+                        <th class="col-center col-sm-w">账号</th>
+                        <th class="col-center col-sm-w">类型</th>
+                        <th class="col-center col-sm-w">状态</th>
+                        <th class="col-center col-sm-w"><a>设置</a></th>
+                    </tr>
+                    <tr>
+                        <th>名称</th>
+                        <th class="col-center">账号</th>
+                        <th class="col-center">类型</th>
+                        <th class="col-center">状态</th>
+                        <th class="col-center"><a>设置</a></th>
+                    </tr>
+                    <tr>
+                        <th>名称</th>
+                        <th class="col-center">账号</th>
+                        <th class="col-center">类型</th>
+                        <th class="col-center">状态</th>
+                        <th class="col-center"><a>设置</a></th>
+                    </tr>
+                    <tr>
+                        <th>名称</th>
+                        <th class="col-center">账号</th>
+                        <th class="col-center">类型</th>
+                        <th class="col-center">状态</th>
+                        <th class="col-center"><a>设置</a></th>
+                    </tr>
+                    <tr>
+                        <th>名称</th>
+                        <th class="col-center">账号</th>
+                        <th class="col-center">类型</th>
+                        <th class="col-center">状态</th>
+                        <th class="col-center"><a>设置</a></th>
+                    </tr>
+                </tbody>
+            </table>
+        </div>
+    </div>
+</div>

+ 1 - 1
settingview/temp/manifest/app-css-manifest.json

@@ -1,3 +1,3 @@
 {
-  "app.css": "app-1a2fd32ce0.css"
+  "app.css": "app-350f68e0fe.css"
 }

+ 1 - 1
settingview/temp/manifest/app-js-manifest.json

@@ -1,3 +1,3 @@
 {
-  "app.js": "app-e4454ada99.js"
+  "app.js": "app-316c6daf9f.js"
 }