|
|
@@ -3,11 +3,10 @@
|
|
|
angular.module('app').controller('WebController', ['$scope', '$timeout', function($scope, $timeout) {
|
|
|
//lxtalkClient.Invoke('{FB60F992-A0FD-47B3-AAA7-E80DF209C5A4}', '_Register', '', $scope);
|
|
|
$scope.imgView = function(event) {
|
|
|
+ angular.element(".onView").removeClass("onView");
|
|
|
var img = $(event.target);
|
|
|
- console.log(img);
|
|
|
- img[0].id = "onView";
|
|
|
+ img[0].className = "onView";
|
|
|
if (img[0].naturalWidth > img[0].naturalHeight) {
|
|
|
- console.log("111111111");
|
|
|
angular.element(".image-view").addClass("width-Img");
|
|
|
} else {
|
|
|
angular.element(".image-view").removeClass("width-Img");
|
|
|
@@ -24,9 +23,8 @@ angular.module('app').controller('WebController', ['$scope', '$timeout', functio
|
|
|
// var imgUrl = activeClick[0].parentElement.previousElementSibling.firstElementChild.src;
|
|
|
var imgs = $(".images");
|
|
|
$(".image-big").remove();
|
|
|
- console.log(imgs);
|
|
|
for (var i = 0, len = imgs.length; i < len; i++) {
|
|
|
- if ($(".images")[i].firstElementChild.id == "onView") {
|
|
|
+ if ($(".images")[i].firstElementChild.className == "onView") {
|
|
|
$(".images")[i].remove();
|
|
|
var imgNum = $("#imgpreview").find('img').length;
|
|
|
if (imgNum == 2) {
|
|
|
@@ -47,7 +45,6 @@ angular.module('app').controller('WebController', ['$scope', '$timeout', functio
|
|
|
|
|
|
$scope.actived = function($event) {
|
|
|
var activeClick = $($event.target);
|
|
|
- console.log(activeClick);
|
|
|
if (activeClick[0].nodeName == "A") {
|
|
|
angular.element(".Aa").removeClass("activeColor");
|
|
|
angular.element(".glyphicon").removeClass("activeColor");
|
|
|
@@ -60,6 +57,20 @@ angular.module('app').controller('WebController', ['$scope', '$timeout', functio
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+ $scope.footHide = function() {
|
|
|
+ angular.element(".foot").addClass("hide");
|
|
|
+ };
|
|
|
+ $scope.footShow = function($event) {
|
|
|
+ var activeClick = $($event.target);
|
|
|
+ if (activeClick[0].className == "form-control input-sm" || activeClick[0].className == "text-message") {
|
|
|
+ angular.element(".foot").addClass("hide");
|
|
|
+ } else {
|
|
|
+ $timeout(function() {
|
|
|
+ angular.element(".foot").removeClass("hide");
|
|
|
+ }, 400);
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
$scope.imgPreview = function(fileDom) {
|
|
|
//判断是否支持FileReader
|
|
|
if (window.FileReader) {
|