浏览代码

文件传输

dgf 8 年之前
父节点
当前提交
3b090d7486

+ 0 - 100
talkview - 副本/Gulpfile.js

@@ -1,100 +0,0 @@
-var gulp = require('gulp');
-// var sass = require('gulp-sass');
-var less = require('gulp-less');
-var del = require('del');
-var concat = require('gulp-concat');
-var rev = require('gulp-rev');
-var revCollector = require('gulp-rev-collector');
-var minifycss = require('gulp-minify-css');
-var minifyhtml = require('gulp-minify-html');
-var minifyjs = require('gulp-uglify');
-var autoprefixer = require('gulp-autoprefixer');
-// var imagemin = require('gulp-imagemin');
-// var pngquant = require('imagemin-pngquant');
-var templateCache = require('gulp-angular-templatecache');
-
-
-// Paths to your asset files
-var paths = {
-    frontend: {
-        scripts: [
-            '../common/*.js',
-            'src/js/**/*.js'   
-        ],
-        styles: [            
-			'temp/css/*'    
-        ],
-        less: [
-            // '../common/*.less',
-            'src/less/*.less'
-        ],
-        imgs: [
-            'src/imgs/*'
-        ],
-        template: [
-            'src/templates/*.html'
-        ]
-    }
-}
-
-var distpath = '../dist/talkview';
-// console.log('Current directory: '+process.cwd());
-
-gulp.task('app-css', function() {
-    del([distpath + '/app-*.css'],{cwd:process.cwd(),force:true});
-    return gulp.src(paths.frontend.less)
-        .pipe(less())
-        .pipe(concat('app.css'))
-        // .pipe(minifycss())
-        .pipe(rev())
-        .pipe(gulp.dest(distpath))
-        .pipe(rev.manifest('app-css-manifest.json'))
-        .pipe(gulp.dest('temp/manifest'));
-});
-
-gulp.task('rev', ['app-css','js'], function() {    
-    return gulp.src(['temp/manifest/*.json', 'src/html/index.html'])
-        .pipe(revCollector())
-        .pipe(gulp.dest(distpath));
-});
-
-gulp.task('template', function() {
-    return gulp.src(paths.frontend.template)
-        .pipe(templateCache('templates.js', { module:'templatescache', standalone:true, root: 'templates/' }))
-        .pipe(gulp.dest('src/js'));
-});
-
-gulp.task('js', ['template'], function() {
-    // Cleanup old assets
-    del([distpath+ '/app-*.js'], {cwd:process.cwd(), force:true});
-    
-    return gulp.src(paths.frontend.scripts)
-        .pipe(concat('app.js'))
-        // .pipe(minifyjs())
-        .pipe(rev())
-        .pipe(gulp.dest(distpath))
-        .pipe(rev.manifest('app-js-manifest.json'))
-        .pipe(gulp.dest('temp/manifest'));
-});
-
-// gulp.task('imgs', function () {
-//     return gulp.src(paths.frontend.imgs)
-//         .pipe(imagemin({
-//             progressive: true,
-//             svgoPlugins: [{removeViewBox: false}],
-//             use: [pngquant()]
-//         }))
-//         .pipe(gulp.dest('dest/assets/imgs'));
-// });
-
-gulp.task('build', ['app-css', 'template', 'js', 'rev']);
-
-gulp.task('watch', function(){
-    gulp.watch('src/less/**/*.less', ['app-css', 'rev']);
-    gulp.watch('src/html/**/*.html', ['rev']);
-    gulp.watch('src/templates/**/*.html', ['template', 'js', 'rev']);
-    gulp.watch('src/js/**/*.js', ['js', 'rev']);
-});
-
-// The default task (called when you run `gulp` from cli)
-gulp.task('default', ['build', 'watch']);

+ 0 - 2
talkview - 副本/desktop.ini

@@ -1,2 +0,0 @@
-[LocalizedFileNames]
-Lighthouse.jpg=@%systemroot%\system32\SampleRes.dll,-107

二进制
talkview - 副本/img/unkown.png


+ 0 - 184
talkview - 副本/src/html/index.html

@@ -1,184 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
-    <title>chat view</title>
-    <meta charset="utf-8" />
-    <!-- 新 Bootstrap 核心 CSS 文件 -->
-    <link rel="stylesheet" href="../bower_components/bootstrap/dist/css/bootstrap.css">
-    <link rel="stylesheet" href="app.css">
-
-    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
-    <!--<script src="js/jquery.min.js"></script>-->
-    <script src="../bower_components/jquery/dist/jquery.min.js"></script>
-    <script src="../bower_components/jquery-lazyload/jquery.lazyload.min.js"></script>
-    <script src="../bower_components/angular/angular.js"></script>
-    <script src="../bower_components/angular-animate/angular-animate.min.js"></script>
-    <script src="../bower_components/angular-scroll-glue/src/scrollglue.js"></script>
-    <script src="app.js"></script>
-</head>
-
-<body ng-app="appMessage" ng-controller="MessageController" id="body" ng-click="scrollShow()">
-    <div class="full-client">
-        <div id="getMore"><a role="button"><small ng-click="getMore()">加载更多消息</small></a></div>
-        <div class="feed-activity-list p-l-xs p-t-xs p-r-xs" id="loadmore" ng-repeat="item in historymessages track by $index" ng-history-msg="item" ng-app-content="appContent">
-            <!--<div class="feed-element" ng-repeat="item in historymessages track by $index">
-                <div class="media-body">
-                    <p>
-                        <strong>{{item.senderDisplayName === undefined || item.senderDisplayName == ''? item.sender : item.senderDisplayName}}</strong><small>-2017-2-6 15:57:17 {{item.ts}}</small>
-                    </p>
-                    <div class="well m-l-xs m-t-xs fit-content" ng-history-msg="item" ng-app-content="appContent">
-                        <div class="text-point"></div>
-                    </div>
-                </div>
-            </div>-->
-        </div>
-        <div class="feed-activity-list p-l-xs p-t-xs p-r-xs" id="sendmessage">
-            <div class="feed-element animate" ng-repeat="item in sendmessages track by $index">
-                <div class="media-body">
-                    <p>
-                        <strong>{{item.senderDisplayName === undefined || item.senderDisplayName == ''? item.sender : item.senderDisplayName}}</strong><small class="text-muted">-2017-2-6 15:57:17 {{item.ts}}</small>
-                    </p>
-                    <div class="well m-l-xs m-t-xs fit-content" ng-current-msg="item" ng-app-content="appContent" id="message">
-                        <div class="text-point"></div>
-                    </div>
-                </div>
-            </div>
-            <!--<a role="button" ng-click="addClick({name:'web', time:'2016-06-24 15:55', message:'hello world'})">test</a>-->
-
-            <!-- 普通消息 -->
-            <!--<div class="feed-element">
-				<div class="media-body ">
-					<strong>陆趣趣</strong>
-					<small class="text-muted">Today 2:10 pm - 12.06.2014</small>
-
-					<div class="well m-l-xs m-t-xs fit-content">
-						<span class="text-message">手动建开发技术的发是打发是否阿萨德发按时大家阿萨德发 圣诞节法律考试及地方akjsdklfajs 按时大奖是离开的房间阿萨德发是对方可爱上了对方快递费阿斯顿发阿萨德发啊阿萨德f</span>
-					</div>
-				</div>
-			</div>-->
-
-            <!-- 文件下载消息 -->
-            <!--<div class="feed-element">
-                <div class="media-body">
-                    <p>
-                        <strong>陆趣趣</strong><small class="text-muted">-2017-2-6 15:57:17 来自pc端</small>
-                    </p>
-
-                    <div class="well m-l-xs m-t-xs fit-content" style="width: 275px;">
-                        <div id="text-point"></div>
-                        <div class="file-message">
-                            <img src="../img/unkown.png" onError=" this.src = '../img/unkown.png' " />
-                            <span style="float:left; margin:5px 0px 0px 0px">文件名:办公助手文件<br/>大小:5M</span>
-                            <div class="p-t-sm text-right">
-                                <a class="text-primary" role="button"><span>打开</span></a>&nbsp
-                                <a class="text-primary" role="button"><span>打开文件夹</span></a>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            </div>-->
-
-            <!-- 带截图 -->
-            <!--<div class="feed-element">
-                <div class="media-body">
-                    <p>
-                        <strong>陆趣趣</strong><small>-2017-2-6 15:57:17 来自pc端</small>
-                    </p>
-                    <div class="well m-l-xs m-t-xs fit-content">
-                        <div id="text-point"></div>
-                        <span class="text-message">
-								<a href="#" class="thumbnail" style="max-width:125px;">
-									<img src="local://E:/LxtalkUIView/dist/img/loading.jpg" alt="通用的占位符缩略图">
-								</a>
-								
-						</span>
-                    </div>
-                </div>
-            </div>-->
-
-            <!-- 只有截图 -->
-            <!--<div class="feed-element">
-				<div class="media-body">
-					<strong>陆趣趣</strong>
-					<small class="text-muted">Today 2:10 pm - 12.06.2014</small>
-					<div class="well m-l-xs m-t-xs fit-content">
-						<span class="text-message">
-								<a href="#" class="thumbnail" style="width:300px;">
-									<img src="Lighthouse.jpg" alt="通用的占位符缩略图">
-								</a>
-							</span>
-					</div>
-				</div>
-			</div>-->
-
-            <!-- 带表情 -->
-            <!--<div class="feed-element">
-				<div class="media-body">
-					<strong>陆趣趣</strong>
-					<small class="text-muted">Today 2:10 pm - 12.06.2014</small>
-					<div class="well m-l-xs m-t-xs fit-content">
-						<span class="text-message">
-											萨德发按时大家阿萨德<img src="../../Images/Faces/em_009.gif">kjsdklfajs 按时大奖是离开的房间阿萨德
-							</span>
-					</div>
-				</div>
-			</div>-->
-
-            <!-- 只有表情 -->
-            <!--<div class="feed-element">
-				<div class="media-body">
-					<strong>陆趣趣</strong>
-					<small class="text-muted">Today 2:10 pm - 12.06.2014</small>
-					<div class="well m-l-xs m-t-xs fit-content">
-						<img src="../../Images/Faces/em_009.gif">
-					</div>
-				</div>
-			</div>-->
-
-            <!-- 地图 -->
-            <!--<div class="feed-element" ng-repeat="map in maps track by $index">
-                <div class="media-body">
-                    <p>
-                        <strong>陆趣趣</strong><small class="text-muted">-Today 2:10 pm - 12.06.2014</small>
-                    </p>
-                    <div class="well m-l-xs m-t-xs fit-content">
-                        <div class="text-point"></div>
-                        <span class="text-message">
-							<iframe class="map" border=0 src="{{map.url}}" frameBorder=no>
-                                您的浏览器不支持 iframe 标签。
-                            </iframe>
-						</span>
-                    </div>
-                </div>
-            </div>-->
-
-            <!-- 语音 -->
-            <!--<div class="feed-element">
-                <div class="media-body">
-                    <p>
-                        <strong>陆趣趣</strong><small class="text-muted">-Today 2:10 pm - 12.06.2014</small>
-                    </p>
-                    <div class="well m-l-xs m-t-xs fit-content">
-                        <div class="text-point"></div>
-                        <span class="text-message">
-                                <audio controls>
-                                    <source src="local://E:/LxtalkUIView/dist/img/111.mp3">
-                                    <source src="local://E:/LxtalkUIView/dist/img/111.ogg">
-                                    您的浏览器不支持 audio 元素。
-                                </audio>
-						</span>
-                    </div>
-                </div>
-            </div>-->
-        </div>
-        <div>
-            <p></p>
-            <span id="bottom"><span>
-        </div>
-
-    </div>
-
-</body>
-
-</html>

+ 0 - 3
talkview - 副本/src/js/app.js

@@ -1,3 +0,0 @@
-'use strict';
-
-var appMessage = angular.module('appMessage', ['luegg.directives', 'ngAnimate']);

+ 0 - 178
talkview - 副本/src/js/controller/messageController.js

@@ -1,178 +0,0 @@
-'use strict';
-
-angular.module('appMessage').controller('MessageController', ['$scope', '$location', '$anchorScroll', function($scope, $location, $anchorScroll) {
-
-        lxtalkClient.Invoke('{15180DEF-D508-45F7-BAEB-6486CD8752C8}', '_Register', '', $scope);
-        $scope.glued = true;
-        $scope.items = [{
-                "uid": "2636765",
-                "senderDisplayName": "丽水市市委办公室",
-                "sender": "0578+002682BECE10-lqq",
-                "msgType": 0,
-                "networkType": 1,
-                "isDes": false,
-                "length": 0,
-                "isReaded": false,
-                "contentType": 1,
-                "receiver": "0578+002682BECE10-lsws",
-                "fromClient": 0,
-                "ts": "来自pc端",
-                "id": 0,
-                "content": "111111",
-                "style": ""
-            }, {
-                content: "消息内容",
-                style: '字体',
-                fromClient: 2, //消息来源([0:PC],[1:iOS],[2:Android]
-                id: "616ebe69e1c04c2ea9740a14457aaca6",
-                isDes: 0, //是否加密消息
-                contentType: 1, // 消息类型([1,文本消息],[2,图片消息],[3,文件消息],[4,语音消息], [5,位置消息])
-                networkType: 1, //网络类型([1:wifi],[2:2G],[3:3G],[4:4G])
-                sender: "0578+0-ls_xxj1",
-                senderDisplayName: "陆趣趣",
-                length: 12312,
-                ts: 12312312412 //时间搓
-            }, {
-                content: "http://202.107.249.133:8125/e/8/2/4/f/e824fa94cbacff419a0ad611926710f9.dat?下载文件.docx",
-                fromClient: 2,
-                id: "253db476c6d140f0a1b4d4af5fcf2016",
-                isDes: 0,
-                contentType: 3,
-                networkType: 1,
-                sender: "0578+0-ls_xxj1",
-                senderDisplayName: "陆趣趣",
-                "ts": "来自pc端",
-                length: 17359
-            },
-            {
-                content: "../img/DefaultHeadImage_96.png",
-                fromClient: 2,
-                id: "253db476c6d140f0a1b4d4af5fcf2016",
-                isDes: 0,
-                contentType: 2,
-                networkType: 1,
-                sender: "0578+0-ls_xxj1",
-                senderDisplayName: "陆趣趣",
-                "ts": "来自pc端",
-                length: 17359
-            },
-            {
-                content: "../img/DefaultHeadImage_96.png",
-                fromClient: 2,
-                id: "253db476c6d140f0a1b4d4af5fcf2016",
-                isDes: 0,
-                contentType: 2,
-                networkType: 1,
-                sender: "0578+0-ls_xxj1",
-                senderDisplayName: "陆趣趣",
-                "ts": "来自pc端",
-                length: 17359
-            },
-            {
-                content: "../img/DefaultHeadImage_96.png",
-                fromClient: 2,
-                id: "253db476c6d140f0a1b4d4af5fcf2016",
-                isDes: 0,
-                contentType: 2,
-                networkType: 1,
-                sender: "0578+0-ls_xxj1",
-                senderDisplayName: "陆趣趣",
-                "ts": "来自pc端",
-                length: 17359
-            },
-            {
-                content: "http://202.107.249.133:8125/e/8/2/4/f/e824fa94cbacff419a0ad611926710f9.dat?下载文件.docx",
-                fromClient: 2,
-                id: "253db476c6d140f0a1b4d4af5fcf2016",
-                isDes: 0,
-                contentType: 3,
-                networkType: 1,
-                sender: "0578+0-ls_xxj1",
-                senderDisplayName: "陆趣趣",
-                "ts": "来自pc端",
-                length: 17359
-            },
-            {
-                content: "消息内容",
-                style: { "family": "宋体", "size": 9, "color": 16711680 },
-                fromClient: 2, //消息来源([0:PC],[1:iOS],[2:Android]
-                id: "616ebe69e1c04c2ea9740a14457aaca6",
-                isDes: 0, //是否加密消息
-                contentType: 1, // 消息类型([1,文本消息],[2,图片消息],[3,文件消息],[4,语音消息], [5,位置消息])
-                networkType: 1, //网络类型([1:wifi],[2:2G],[3:3G],[4:4G])
-                sender: "0578+0-ls_xxj1",
-                senderDisplayName: "陆趣趣",
-                length: 12312,
-                ts: 12312312412 //时间搓
-            }
-        ];
-        $scope.appContent = {};
-        // $scope.guid  = lxtalkClient.Invoke('register', 'talkview', $scope)
-
-        $scope.sendmessages = [];
-        $scope.historyitems = [];
-        $scope.historymessages = [];
-        $scope.pageSize = 1;
-        $scope.pageNumber = 2;
-        $scope.historyitems.push($scope.items.slice($scope.pageNumber * ($scope.pageSize - 1), $scope.pageNumber * $scope.pageSize));
-        for (var i = 0; i < $scope.pageNumber; i++) {
-            if ($scope.historyitems[0][i] !== undefined) {
-                $scope.historymessages.push($scope.historyitems[0][i]);
-            }
-        }
-
-        $scope.initAppContent = function(appContentJson) {
-            $scope.appContent = JSON.parse(appContentJson);
-        }
-
-        $scope.addMessage = function() {
-            scroll(document.body);
-        }
-
-        $scope.showMessage = function(jsonStr) {
-            console.log(jsonStr);
-            jsonStr = jsonStr.replace(/ /g, "&nbsp");
-            jsonStr = jsonStr.replace(/\r\n/g, "<br>");
-            jsonStr = jsonStr.replace(/\r/g, "\\r");
-            jsonStr = jsonStr.replace(/\n/g, "\\n");
-            jsonStr = jsonStr.replace(/\t/g, "\\t");
-            jsonStr = jsonStr.replace(/\f/g, "\\f");
-            var msg = JSON.parse(jsonStr);
-            $scope.sendmessages.push(msg);
-            $scope.scrollHide();
-        }
-
-        $scope.showHistoryMessage = function(jsonStr) {
-            var msg = JSON.parse(jsonStr);
-            // $scope.items.unshift(msg);
-            // console.log(msg);
-        }
-
-        $scope.getMore = function() {
-            $scope.historyitems = [];
-            $scope.pageSize = $scope.pageSize + 1;
-            $scope.historyitems.push($scope.items.slice($scope.pageNumber * ($scope.pageSize - 1), $scope.pageNumber * $scope.pageSize));
-            for (var i = 0; i < $scope.pageNumber; i++) {
-                if ($scope.historyitems[0][i] !== undefined) {
-                    $scope.historymessages.push($scope.historyitems[0][i]);
-                }
-            }
-        }
-
-        $scope.scrollHide = function() {
-            angular.element("#body").addClass("scrollGlue");
-        }
-        $scope.scrollShow = function() {
-            angular.element("#body").removeClass("scrollGlue");
-        }
-
-    }])
-    .animation(".animate", function() {
-        return {
-            enter: function(element, done) {
-                var height = element.height();
-                element.css({ position: 'relative', bottom: 0, opacity: 0 });
-                element.animate({ bottom: 0, opacity: 1 }, 500, done);
-            }
-        };
-    });

+ 0 - 160
talkview - 副本/src/js/directive/currentmessage.js

@@ -1,160 +0,0 @@
-(function() {
-    'use strict';
-
-    angular
-        .module('appMessage')
-        .directive('ngCurrentMsg', CurrentMsg);
-
-    CurrentMsg.inject = ['$location', '$anchorScroll', '$timeout'];
-
-    function CurrentMsg($location, $anchorScroll, $timeout) {
-        var directive = {
-            link: link,
-            restrict: 'A',
-            scope: {
-                msg: '=ngCurrentMsg',
-                appContent: '=ngAppContent'
-            }
-        };
-        return directive;
-
-        function link(scope, element, attrs) {
-
-            var gotoBottom = function() {
-                $location.hash("bottom");
-                $anchorScroll();
-            };
-            var extend = function(dest, source) {
-                for (var key in source) {
-                    if (source.hasOwnProperty(key)) {
-                        dest[key] = source[key];
-                    }
-                }
-                return dest;
-            };
-            var toColor = function(num) {
-                var color = num.toString(16);
-                while (color.length < 6) {
-                    color = '0' + color;
-                }
-                return color;
-            }
-            var replaceSystemFace = function(content) {
-                //匹配表情
-                var g = (/\/\:([\w]+)/).exec(content);
-                while (g !== null) {
-                    scope.appContent.faceConfig.sys.forEach(function(element) {
-                        content = content.replace(element.shortcut, '<img style="height:56px" src="local://' + scope.appContent.directory.base + element.image + '">');
-                    }, this);
-                    g = (/\/\:([\w]+)/).exec(content);
-                }
-                //匹配截图
-                var g = (/\[image\-src=\"([\w\W]+?)\"\]/i).exec(content);
-                while (g !== null) {
-                    content = content.replace(g[0], function() {
-                        var html = '<a href="#" class="thumbnail"' + '>' +
-                            '<img style="max-width:270px;max-height:250px;" src="local://' + scope.appContent.directory.received + g[1] + '.JPG' + '" alt="" >' +
-                            '</a>';
-                        loadImg("local://" + scope.appContent.directory.received + g[1] + ".JPG", addImg);
-
-                        function loadImg(url, callback) {
-                            var img = new Image();
-                            img.onload = function() {
-                                img.onload = null;
-                                callback(img);
-                            }
-                            img.src = url;
-                            //img.attr("defaulturl", "../images/img.png");
-                        }
-
-                        function addImg(img) {
-                            //$(img).appendTo($(".image"));
-                            gotoBottom();
-                        }
-                        return html;
-                    });
-                    g = (/\[image\-src=\"([\w\W]+?)\"\]/i).exec(content);
-                }
-                //匹配网址
-                var i = 0;
-                var m = content.match(/(((((http|ftp|https|HTTP|FTP|HTTPS):\/\/)[\w\-_]+)|www|WWW|[0-9]+)(\.(?!gif|jpg|png|mp3)[\w\-_]+)+([\w\-\.,@?^=%:/~\+#]*[\w\-\@?^=%/~\+#\r\n]))/ig);
-                console.log(m);
-                if (m == null)
-                    return content;
-                content = content.replace(/(((((http|ftp|https|HTTP|FTP|HTTPS):\/\/)[\w\-_]+)|www|WWW|[0-9]+)(\.(?!gif|jpg|png|mp3)[\w\-_]+)+([\w\-\.,@?^=%:/~\+#]*[\w\-\@?^=%/~\+#\r\n]))/ig, function() {
-                    var html = '';
-                    var g = (/((((http|ftp|https|HTTP|FTP|HTTPS):\/\/)[\w\-_]+)(\.[\w\-_]+)+([\w\-\.,@?^=%:/~\+#]*[\w\-\@?^=%/~\+#\r\n]))/ig).exec(m[i]);
-                    if (g == null)
-                        html = '<a target="_blank" href="http://' + m[i] + '">' +
-                        m[i] +
-                        '</a>';
-                    else
-                        html = '<a target="_blank" href="' + m[i] + '">' +
-                        m[i] +
-                        '</a>';
-                    i = i + 1;
-                    return html;
-                });
-                return content;
-            };
-
-            var replaceImage = function(content) {}
-            var html = '';
-            var message = document.getElementById("message");
-            // 消息类型([1,文本消息],[2,图片消息],[3,文件消息], [4,位置消息],[5,语音消息])
-            if (scope.appContent === undefined || scope.appContent.faceConfig === undefined || scope.appContent.faceConfig.sys === undefined) {
-                html = '<span class="text-message">' + scope.msg.content + '</span>';
-            } else if (scope.msg.contentType == 1) {
-                //var style = { style: "normal", weight: "normal" };
-                var style = JSON.parse(scope.msg.style);
-                style = extend({
-                    style: 'normal',
-                    weight: 'normal',
-                    size: 9,
-                    family: '微软雅黑',
-                    color: 0
-                }, style);
-                html = '<span class="text-message"' + ' style="font:' + style.style + ' ' + style.weight + ' ' + style.size + 'pt' + ' ' + style.family + ';color:#' + toColor(style.color) + '">' +
-                    replaceSystemFace(scope.msg.content) + '</span>';
-            } else if (scope.msg.contentType == 2) {
-                html = '<span class="text-message">' +
-                    '<a href="#" class="thumbnail" >' +
-                    '<img src="' + scope.msg.content + '" alt="通用的占位符缩略图" >' +
-                    '</a>' +
-                    '</span>';
-            } else if (scope.msg.contentType == 3) {
-                element.css({
-                    width: '275px'
-                });
-                //element.addClass('file-message');
-                var reg = /\?[\W\w]*/;
-                var fileName = decodeURIComponent(reg.exec(scope.msg.content).toString().substr(1));
-
-                html = '<div class="file-message">' +
-                    '<img src="../img/unkown.png" onError= "this.src = \'../img/file/unkown.png\'">' +
-                    '<span style="float:left; margin:5px 0px 0px 0px">文件名:' + fileName + '<br/>大小:' + scope.msg.length + '</span>' +
-                    '<div class="p-t-sm text-right">' +
-                    '<a class="text-primary" role="button"><span>打开</span></a>&nbsp&nbsp' +
-                    '<a class="text-primary" role="button"><span>打开文件夹</span></a>' +
-                    '</div>' +
-                    '</div>';
-            } else if (scope.msg.contentType == 4) {
-                html = '<span class="text-message">' +
-                    '<iframe class="map" border=0 src="' + scope.msg.content + '" frameBorder=no></iframe>' +
-                    '</span>';
-            } else if (scope.msg.contentType == 5) {
-                html = '<span class="text-message">' +
-                    '<audio src="' + scope.msg.content + '" controls="controls">' +
-                    '</audio>' +
-                    '</span>';
-            }
-            console.log(html);
-            var newElement = angular.element(html);
-            element.append(newElement);
-            // $(function() {
-            //     $("img.lazy").lazyload();
-            // });
-            message.addEventListener('load', gotoBottom());
-        }
-    }
-})();

+ 0 - 126
talkview - 副本/src/js/directive/historymessages.js

@@ -1,126 +0,0 @@
-(function() {
-    'use strict';
-
-    angular
-        .module('appMessage')
-        .directive('ngHistoryMsg', HistoryMsg);
-
-    HistoryMsg.inject = [];
-
-    function HistoryMsg() {
-        var directive = {
-            link: link,
-            restrict: 'A',
-            scope: {
-                msg: '=ngHistoryMsg',
-                appContent: '=ngAppContent'
-            }
-        };
-        return directive;
-
-        function link(scope, element, attrs) {
-
-            var replaceSystemFace = function(content) {
-                //匹配表情
-                var g = (/\/\:([\w]+)/).exec(content);
-                while (g !== null) {
-                    scope.appContent.faceConfig.sys.forEach(function(element) {
-                        content = content.replace(element.shortcut, '<img style="height:56px" src="local://' + scope.appContent.directory.base + element.image + '">');
-                    }, this);
-                    g = (/\/\:([\w]+)/).exec(content);
-                }
-                //匹配截图
-                var g = (/\[image\-src=\"([\w\W]+?)\"\]/i).exec(content);
-                while (g !== null) {
-                    content = content.replace(g[0],
-                        '<a href="#" class="thumbnail"' + '>' +
-                        '<img class="lazy" style="max-width:270px;max-height:250px;" src="../img/loading.jpg" data-original="local://' + scope.appContent.directory.received + g[1] + '.JPG' + '" alt="" >' +
-                        '</a>'
-                    );
-                    g = (/\[image\-src=\"([\w\W]+?)\"\]/i).exec(content);
-                }
-                //匹配网址
-                var i = 0;
-                var m = content.match(/(((((http|ftp|https|HTTP|FTP|HTTPS):\/\/)[\w\-_]+)|www|WWW|[0-9]+)(\.(?!gif|jpg|png|mp3)[\w\-_]+)+([\w\-\.,@?^=%:/~\+#]*[\w\-\@?^=%/~\+#\r\n]))/ig);
-                console.log(m);
-                if (m == null)
-                    return content;
-                content = content.replace(/(((((http|ftp|https|HTTP|FTP|HTTPS):\/\/)[\w\-_]+)|www|WWW|[0-9]+)(\.(?!gif|jpg|png|mp3)[\w\-_]+)+([\w\-\.,@?^=%:/~\+#]*[\w\-\@?^=%/~\+#\r\n]))/ig, function() {
-                    var html = '';
-                    var g = (/((((http|ftp|https|HTTP|FTP|HTTPS):\/\/)[\w\-_]+)(\.[\w\-_]+)+([\w\-\.,@?^=%:/~\+#]*[\w\-\@?^=%/~\+#\r\n]))/ig).exec(m[i]);
-                    if (g == null)
-                        html = '<a target="_blank" href="http://' + m[i] + '">' +
-                        m[i] +
-                        '</a>';
-                    else
-                        html = '<a target="_blank" href="' + m[i] + '">' +
-                        m[i] +
-                        '</a>';
-                    i = i + 1;
-                    return html;
-                });
-                return content;
-            };
-
-            if (scope.msg.senderDisplayName === undefined || scope.msg.senderDisplayName == '')
-                scope.msg.senderDisplayName = scope.msg.sender;
-            var html = '';
-            // 消息类型([1,文本消息],[2,图片消息],[3,文件消息], [4,位置消息],[5,语音消息])
-            if (scope.appContent === undefined || scope.appContent.faceConfig === undefined || scope.appContent.faceConfig.sys === undefined) {
-                html = '<span class="text-message">' + scope.msg.content + '</span>';
-            } else if (scope.msg.contentType == 1) {
-                //var style = { style: "normal", weight: "normal" };
-                var style = scope.msg.style;
-                html = '<span class="text-message"' + ' style="font:' + style.style + ' ' + style.weight + ' ' + style.size + 'pt' + ' ' + style.family + ';color:#' + style.color.toString(16) + '">' +
-                    replaceSystemFace(scope.msg.content) + '</span>';
-            } else if (scope.msg.contentType == 2) {
-                html = '<span class="text-message">' +
-                    '<a href="#" class="thumbnail" >' +
-                    '<img src="' + scope.msg.content + '" alt="通用的占位符缩略图" >' +
-                    '</a>' +
-                    '</span>';
-            } else if (scope.msg.contentType == 3) {
-                // element.css({
-                //     width: '300px'
-                // });
-                //element.addClass('file-message');
-                var reg = /\?[\W\w]*/;
-                var fileName = decodeURIComponent(reg.exec(scope.msg.content).toString().substr(1));
-
-                html = '<div class="file-message" style="width:250px">' +
-                    '<img src="../img/unkown.png" onError= "this.src = \'../img/file/unkown.png\'">' +
-                    '<span style="float:left; margin:5px 0px 0px 0px">文件名:' + fileName + '<br/>大小:' + scope.msg.length + '</span>' +
-                    '<div class="p-t-sm text-right">' +
-                    '<a class="text-primary" role="button"><span>打开</span></a>&nbsp&nbsp' +
-                    '<a class="text-primary" role="button"><span>打开文件夹</span></a>' +
-                    '</div>' +
-                    '</div>';
-            } else if (scope.msg.contentType == 4) {
-                html = '<span class="text-message">' +
-                    '<iframe class="map" border=0 src="' + scope.msg.content + '" frameBorder=no></iframe>' +
-                    '</span>';
-            } else if (scope.msg.contentType == 5) {
-                html = '<span class="text-message">' +
-                    '<audio src="' + scope.msg.content + '" controls="controls">' +
-                    '</audio>' +
-                    '</span>';
-            }
-
-            var html_g = '<div class="feed-element">' +
-                '<div class="media-body" id="loadmore">' +
-                '<p><strong>' +
-                scope.msg.senderDisplayName +
-                '</strong><small class="text-muted">-2017-2-6 15:57:17&nbsp' +
-                scope.msg.ts + '</small></p>' +
-                '<div class="well m-l-xs m-t-xs fit-content" >' +
-                '<div class="text-point"></div>' + html +
-                '</div></div></div>';
-
-            angular.element("#loadmore").prepend(html_g);
-            $(function() {
-                $("img.lazy").lazyload();
-            });
-            console.log(html_g);
-        }
-    }
-})();

+ 0 - 3
talkview - 副本/src/less/app.less

@@ -1,3 +0,0 @@
-// Core variables and mixins
-@import "../../../common/app.utilities.less";
-@import "app.main.less";

+ 0 - 161
talkview - 副本/src/less/app.main.less

@@ -1,161 +0,0 @@
-.feed-element:first-child {
-    margin-top: 5px;
-}
-
-.scrollGlue {
-    overflow-y: hidden;
-}
-
-.full-client{
-    width: 100%;
-    height: 100%;
-    border: 0px;
-    margin: 0px 0px 0px 0px;
-    padding: 0px 0px 0px 0px;
-    #getMore {
-        text-align: center;
-        font-family: "宋体";
-        color: #009BDB;
-        font-size: 14px;
-    }
-    #loadmore {
-        margin-top: -5px;
-    }
-    #sendmessage {
-        margin-top: -10px;
-    }
-}
-
-.media-body {
-    font-family: "微软雅黑","宋体";
-    font-size: 13px;
-    width: 0px;
-    max-width: 700px;
-    vertical-align: top;
-    zoom: 1;
-    >p>strong {
-        float: left;
-        margin-left: 2px;
-        color: #336699;
-    }
-    >p>small {
-        margin-left: 4px;
-        font-size: 10px;
-        vertical-align: bottom;
-    }
-}
-
-.feed-element {
-    padding-bottom: 4px;
-    overflow: hidden;
-    .well {
-        position: relative;
-        float: left;
-        word-wrap:break-word;
-        word-break:break-all;
-        background-color: #DEDFDE;
-        color: #000000;
-        border-radius: 6px;
-        border: none;
-        box-shadow: none;
-        outline: none;
-        margin-left: 10px;
-        margin-top: -2px;
-        margin-bottom: 0px;
-        margin-right: 25px;
-        padding: 7px 14px 7px 12px;
-        font-size: 12px;
-        line-height: 16px;
-        .text-point {
-            z-index: -99;
-            position:absolute;
-            top:-18px;
-            left:8px;
-            width:0;
-            height:0;
-            font-size:0;
-            border-top:solid 10px;
-            border-bottom:solid 10px;
-            border-right: solid 7px;
-            border-left: solid 7px;
-            border-color:transparent transparent #DEDFDE transparent;
-        }
-    }
-}
-
-.fit-content {
-    width: fit-content;
-}
-//
-.text-message{
-    vertical-align: bottom;
-    .thumbnail {
-        margin-top: 5px;
-        margin-bottom: 5px;
-        max-width: 300px;
-        max-height: 300px;
-    }
-}
-
-.contact-box.center-version {
-    display: block;
-    background-color: #ffffff;
-    padding-top: 10px;
-    text-align: center;
-    color: #676a6c;
-    font-size: 13px;
-}
-
-.displayName{
-        font-weight: 700;
-        font-size: 16px;
-}
-
-.map {
-    width: 370px;
-	height: 170px;
-    display: block;
-}
-
-.audio-message{
-    display: block;
-}
-
-///Message
-.file-message {
-    background-color: #fff;
-    padding: 8px;
-    border-radius: 6px;
-}
-
-.file-message > img{
-    margin:5px 5px 5px 5px;
-    width: 48px; 
-    height: 48px;
-    float:left;
-}
-
-.file-message > div{
-    clear:both; 
-    width:100%; 
-    border-top:1px solid #ccc; 
-    height: 30px;
-    padding-top: 10px;
-}
-
-.file-message > a >span{
-    margin-top: 10px;
-    margin-right: 5px;
-}
-
-[scroll-glue-top],
-[scroll-glue-bottom],
-[scroll-glue]{
-    overflow-y: scroll;
-    height: 200px;
-}
-
-[scroll-glue-left],
-[scroll-glue-right]{
-    overflow-x: scroll;
-}

+ 0 - 45
talkview - 副本/user.html

@@ -1,45 +0,0 @@
-<!DOCTYPE>
-<html>
-
-<head>
-	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-	<!-- 新 Bootstrap 核心 CSS 文件 -->
-    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
-
-    <!-- 可选的Bootstrap主题文件(一般不用引入) -->
-    <!--<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">-->
-
-    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
-    <script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
-
-    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
-    <script src="http://cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
-	<link rel="stylesheet" type="text/css" href="style.css">
-</head>
-
-<body>
-	<div class="container-full">
-		<div class="row">
-
-				<div class="contact-box center-version">
-						<img alt="image" class="avator_96" src="DefaultHeadImage_96.png">
-						<div class="displayName m-t-md">陆趣趣</div>
-						<div class="font-bold">党委副书记、副社长</div>
-						<address class="m-t-md">
-											<strong>丽水日报社</strong><br>
-											2136613<br>
-											13906789079<br>
-                        </address>
-					<div class="contact-box-footer">
-						<div class="m-t-xs btn-group">
-							<a class="btn btn-xs btn-white"><i class="fa fa-phone"></i> 发短信 </a>
-							<a class="btn btn-xs btn-white"><i class="fa fa-user-plus"></i> 二维码</a>
-						</div>
-					</div>
-				</div>
-
-		</div>
-	</div>
-</body>
-
-</html>

+ 8 - 2
talkview/src/js/controller/transmitterController.js

@@ -29,11 +29,17 @@ angular.module('appMessage').controller('TransmitterController', ['$scope', '$in
 
     $scope.getFileSize = function(item) {
         $scope.fileSize = item.length;
-        if ($scope.fileSize > 1024 * 1024)
+        if ($scope.fileSize > 1024 * 1024 * 1024)
+            return (Math.round($scope.fileSize * 100 / (1024 * 1024 * 1024)) / 100).toString() + 'GB';
+        else if ($scope.fileSize > 1024 * 1024)
             return (Math.round($scope.fileSize * 100 / (1024 * 1024)) / 100).toString() + 'MB';
         else
             return (Math.round($scope.fileSize * 100 / 1024) / 100).toString() + 'KB';
-    }
+    };
+
+    $scope.getProgress = function(item) {
+        return parseInt((item.completedLength / item.length) * 100) + '%';
+    };
 
     $scope.accept = function(item) {
         lxtalkClient.Invoke('{AFAF1B48-627D-48E0-B513-26A0CDF1EBD0}', 'Accept', JSON.stringify(item), $scope);

+ 42 - 0
talkview/src/less/app.main.less

@@ -158,4 +158,46 @@
 [scroll-glue-left],
 [scroll-glue-right]{
     overflow-x: scroll;
+}
+
+#transmitters{
+    position: relative;
+    height:100px;
+    width:280px;
+    margin: 10px 0px 0px 5px;
+    font-family: "微软雅黑","宋体";
+    font-size: 12px;
+    >a{
+        margin: 5px;
+        text-decoration:none;
+        cursor:pointer;
+        &:hover {
+        color: #333;
+        }
+    }
+}
+#fileInfo{
+    white-space: nowrap;
+    >img{
+        float: left;
+        height:50px;
+    }
+    >input{
+        margin:5px 0px 2px; 
+        border: none;
+        outline: none;
+        width: 61%;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+}
+.progress{
+    height:3px;
+    width:200px;
+}
+#progress{
+    position: absolute;
+    top: 27px;
+    left: 257px;
 }

+ 7 - 3
talkview/src/templates/transmitter.html

@@ -1,6 +1,10 @@
-<div ng-repeat="item in transmitters">
-    <p><img style="height:50px" src="../img/unkown.png"><span>{{getFileName(item)}} ({{getFileSize(item)}})</span></p>
-    <p>{{toJson(item)}}</p>
+<div ng-repeat="item in transmitters" id="transmitters">
+    <p id="fileInfo"><img src="../img/unkown.png"><input type="text" readonly="readonly" value="{{getFileName(item)}}"><span>({{getFileSize(item)}})</span></p>
+    <div class="progress">
+        <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="1" aria-valuemin="0" aria-valuemax="100" style="height:3px; width: {{getProgress(item)}};min-width: 0.1em;">
+        </div>
+    </div>
+    <span id="progress">{{getProgress(item)}}</span>
     <a ng-show="item.direction==1" ng-click="accept(item)">接收</a><a ng-show="item.direction==1" ng-click="saveAs(item)">另存为</a><a ng-show="item.direction==1" ng-click="decline(item)">取消</a>
     <a ng-show="item.direction==0" ng-click="turnToOffline(item)">转为离线</a><a ng-show="item.direction==0" ng-click="cancel(item)">取消</a>
 </div>