浏览代码

修正bug

懒得勤快 3 年之前
父节点
当前提交
fc5f013c3f

+ 2 - 2
src/Masuit.MyBlogs.Core/wwwroot/ng-views/controllers/partner.js

@@ -58,7 +58,7 @@
                         }
                     });
                 });
-            },200);
+            },1);
         });
     }
 
@@ -71,7 +71,7 @@
         on: function (data) {
             var arr=[];
             for (var i = 0; i < data.arr.length; i++) {
-                arr.push(data.arr[i].name);
+                arr.push(data.arr[i].value);
             }
             $scope.partner.Types=arr.join(",");
         }

+ 7 - 1
src/Masuit.MyBlogs.Core/wwwroot/ng-views/controllers/post.js

@@ -289,6 +289,9 @@
     }
 }]);
 myApp.controller("writeblog", ["$scope", "$http", "$timeout","$location", function ($scope, $http, $timeout,$location) {
+    UEDITOR_CONFIG.initialFrameHeight=null;
+    UEDITOR_CONFIG.autoHeightEnabled=true;
+    UEDITOR_CONFIG.zIndex=1;
     clearInterval(window.interval);
     $scope.post = {
         Title: "",
@@ -599,9 +602,12 @@ myApp.controller("writeblog", ["$scope", "$http", "$timeout","$location", functi
         $scope.ExceptRegions=data.Data;
     });
 }]);
+
 myApp.controller("postedit", ["$scope", "$http", "$location", "$timeout", function ($scope, $http, $location, $timeout) {
+    UEDITOR_CONFIG.initialFrameHeight=null;
+    UEDITOR_CONFIG.autoHeightEnabled=true;
+    UEDITOR_CONFIG.zIndex=1;
     $scope.id = $location.search()['id'];
-    
     $scope.reserve = true;
     $scope.get("/post/get/" + $scope.id, function (data) {
         $scope.post = data.Data;

+ 58 - 57
src/Masuit.MyBlogs.Core/wwwroot/ng-views/controllers/values.js

@@ -1,59 +1,60 @@
 myApp.controller("values", ["$scope", "$http", "NgTableParams", function ($scope, $http, NgTableParams) {
-	UEDITOR_CONFIG.autoHeightEnabled=false;
-	UEDITOR_CONFIG.initialFrameHeight=320;
-	var self = this;
-	self.data = {};
-	this.load = function() {
-		$http.get("/values/list").then(function(res) {
-			self.tableParams = new NgTableParams({}, {
-				filterDelay: 0,
-				dataset:res.data.Data
-			});
-		});
-	}
-	self.load();
-	$scope.closeAll = function() {
-		layer.closeAll();
-		setTimeout(function() {
-			$("#modal").css("display", "none");
-		}, 500);
-	}
-	$scope.submit = function (values) {
-		$scope.request("/values", values, function (data) {
-			swal(data.Message, null, 'info');
-			$scope.values = {};
-			$scope.closeAll();
-			self.load();
-		});
-	}
-	self.edit = function (row) {
-		layer.open({
-			type: 1,
-			zIndex: 8,
-			title: '修改变量',
-			area: (window.screen.width > 800 ? 800 : window.screen.width) + 'px',
-			content: $("#modal"),
-			success: function(layero, index) {
-				$scope.values = row;
-			},
-			end: function() {
-				$("#modal").css("display", "none");
-			}
-		});
-	}
-	self.add = function() {
-		layer.open({
-			type: 1,
-			zIndex: 8,
-			title: '添加变量',
-			area: (window.screen.width > 800 ? 800 : window.screen.width) + 'px',
-			content: $("#modal"),
-			success: function(layero, index) {
-				$scope.values = {};
-			},
-			end: function() {
-				$("#modal").css("display", "none");
-			}
-		});
-	}
+    UEDITOR_CONFIG.autoHeightEnabled=false;
+    UEDITOR_CONFIG.initialFrameHeight=320;
+    UEDITOR_CONFIG.zIndex=99;
+    var self = this;
+    self.data = {};
+    this.load = function() {
+        $http.get("/values/list").then(function(res) {
+            self.tableParams = new NgTableParams({}, {
+                filterDelay: 0,
+                dataset:res.data.Data
+            });
+        });
+    }
+    self.load();
+    $scope.closeAll = function() {
+        layer.closeAll();
+        setTimeout(function() {
+            $("#modal").css("display", "none");
+        }, 500);
+    }
+    $scope.submit = function (values) {
+        $scope.request("/values", values, function (data) {
+            swal(data.Message, null, 'info');
+            $scope.values = {};
+            $scope.closeAll();
+            self.load();
+        });
+    }
+    self.edit = function (row) {
+        layer.open({
+            type: 1,
+            zIndex: 8,
+            title: '修改变量',
+            area: (window.screen.width > 800 ? 800 : window.screen.width) + 'px',
+            content: $("#modal"),
+            success: function(layero, index) {
+                $scope.values = row;
+            },
+            end: function() {
+                $("#modal").css("display", "none");
+            }
+        });
+    }
+    self.add = function() {
+        layer.open({
+            type: 1,
+            zIndex: 8,
+            title: '添加变量',
+            area: (window.screen.width > 800 ? 800 : window.screen.width) + 'px',
+            content: $("#modal"),
+            success: function(layero, index) {
+                $scope.values = {};
+            },
+            end: function() {
+                $("#modal").css("display", "none");
+            }
+        });
+    }
 }]);

+ 24 - 24
src/Masuit.MyBlogs.Core/wwwroot/ng-views/filemanager/js/controllers/main.js

@@ -1,6 +1,6 @@
 (function(angular) {
     'use strict';
-	angular.module('FileManagerApp').controller('FileManagerCtrl', ['$scope', '$rootScope', '$http', '$window', '$translate', 'fileManagerConfig', 'item', 'fileNavigator', 'apiMiddleware', function ($scope, $rootScope, $http, $window, $translate, fileManagerConfig, Item, FileNavigator, ApiMiddleware) {
+    angular.module('FileManagerApp').controller('FileManagerCtrl', ['$scope', '$rootScope', '$http', '$window', '$translate', 'fileManagerConfig', 'item', 'fileNavigator', 'apiMiddleware', function ($scope, $rootScope, $http, $window, $translate, fileManagerConfig, Item, FileNavigator, ApiMiddleware) {
         var $storage = $window.localStorage;
         $scope.config = fileManagerConfig;
         $scope.reverse = false;
@@ -13,10 +13,10 @@
         $scope.fileNavigator = new FileNavigator();
         $scope.apiMiddleware = new ApiMiddleware();
         $scope.uploadFileList = [];
-			$scope.viewTemplate = $storage.getItem('viewTemplate') || 'main-table.html';
+            $scope.viewTemplate = $storage.getItem('viewTemplate') || 'main-table.html';
         $scope.fileList = [];
         $scope.temps = [];
-			$scope.loading = false;
+            $scope.loading = false;
         $scope.$watch('temps', function() {
             if ($scope.singleSelection()) {
                 $scope.temp = $scope.singleSelection();
@@ -28,11 +28,11 @@
         });
 
    //     $scope.$watch('apiMiddleware.apiHandler.inprocess', function() {
-			//if ($scope.apiMiddleware.apiHandler.inprocess) {
-			//	$(".loading1").show();
-			//} else {
-			//	$(".loading1").hide();
-			//}
+            //if ($scope.apiMiddleware.apiHandler.inprocess) {
+            //	$(".loading1").show();
+            //} else {
+            //	$(".loading1").hide();
+            //}
    //     });
 
         $scope.fileNavigator.onRefresh = function() {
@@ -244,13 +244,13 @@
             }
 
             $scope.apiMiddleware.compress($scope.temps, name, $rootScope.selectedModalPath).then(function() {
-				$scope.fileNavigator.refresh();
+                $scope.fileNavigator.refresh();
                 if (! $scope.config.compressAsync) {
                     return $scope.modal('compress', true);
                 }
-				$scope.apiMiddleware.apiHandler.asyncSuccess = true;
-			}, function () { 
-				$scope.apiMiddleware.apiHandler.asyncSuccess = false;
+                $scope.apiMiddleware.apiHandler.asyncSuccess = true;
+            }, function () { 
+                $scope.apiMiddleware.apiHandler.asyncSuccess = false;
             });
         };
 
@@ -347,18 +347,18 @@
         $scope.getUrl = function(_item) {
             return $scope.apiMiddleware.getUrl(_item);
         };
-		$scope.changeroot= function(path) {
-			$http.post('/system/save?sets='+JSON.stringify([{
-				Name: "PathRoot",
-				Value:path
-			}])).then(function(res) {
-				if (res.data.Success) {
-					$scope.fileNavigator.goTo(-1);
-				}
-			}, function() {
-
-			});
-		}
+        $scope.changeroot= function(path) {
+            $http.post('/system/save',[{
+                Name: "PathRoot",
+                Value:path
+            }]).then(function(res) {
+                if (res.data.Success) {
+                    $scope.fileNavigator.goTo(-1);
+                }
+            }, function() {
+
+            });
+        }
         var validateSamePath = function(item) {
             var selectedPath = $rootScope.selectedModalPath.join('');
             var selectedItemsPath = item && item.model.path.join('');