dgf 8 rokov pred
rodič
commit
e69ce7ce65
1 zmenil súbory, kde vykonal 5 pridanie a 15 odobranie
  1. 5 15
      talkview/src/js/directive/historymessages.js

+ 5 - 15
talkview/src/js/directive/historymessages.js

@@ -57,16 +57,6 @@
                 return $filter("date")(item.ts, "yyyy-MM-dd HH:mm:ss");
             };
 
-            // scope.OpenFile = function(item) {
-            //     // var item = { fileName: file };
-            //     return lxtalkClient.Invoke('{15180DEF-D508-45F7-BAEB-6486CD8752C8}', 'OpenFile', JSON.stringify(item), scope);
-            // };
-            // scope.OpenDirectory = function(item) {
-            //     // var item = { fileName: file };
-            //     console.log(JSON.stringify(item));
-            //     return lxtalkClient.Invoke('{15180DEF-D508-45F7-BAEB-6486CD8752C8}', 'OpenDirectory', JSON.stringify(item), scope);
-
-            // };
             var replaceSystemFace = function(content) {
                 //匹配表情
                 var g = (/\/\:([\w]+)/).exec(content);
@@ -230,13 +220,13 @@
     /* @ngInject */
     function ControllerController($scope) {
         $scope.OpenFile = function(item) {
-            // var item = { fileName: file };
-            return lxtalkClient.Invoke('{15180DEF-D508-45F7-BAEB-6486CD8752C8}', 'OpenFile', JSON.stringify(item), $scope);
+            var file = JSON.parse(item);
+            return lxtalkClient.Invoke('{15180DEF-D508-45F7-BAEB-6486CD8752C8}', 'OpenFile', JSON.stringify(file), $scope);
         };
         $scope.OpenDirectory = function(item) {
-            // var item = { fileName: file };
-            console.log(JSON.stringify(item));
-            return lxtalkClient.Invoke('{15180DEF-D508-45F7-BAEB-6486CD8752C8}', 'OpenDirectory', JSON.stringify(item), $scope);
+            var file = JSON.parse(item);
+            console.log(JSON.stringify(file));
+            return lxtalkClient.Invoke('{15180DEF-D508-45F7-BAEB-6486CD8752C8}', 'OpenDirectory', JSON.stringify(file), $scope);
 
         };
     }