lqq 8 vuotta sitten
vanhempi
commit
61d2acff46
4 muutettua tiedostoa jossa 25 lisäystä ja 2 poistoa
  1. 21 0
      common/utilities.js
  2. 2 1
      dist/bower.json
  3. 1 0
      talkview/Gulpfile.js
  4. 1 1
      talkview/src/js/directive/historymessages.js

+ 21 - 0
common/utilities.js

@@ -0,0 +1,21 @@
+var util = { 
+  inherits: function(ctor, superCtor) {
+    ctor.super_ = superCtor;
+    ctor.prototype = Object.create(superCtor.prototype, {
+      constructor: {
+        value: ctor,
+        enumerable: false,
+        writable: true,
+        configurable: true
+      }
+    });
+  },
+  extend: function(dest, source) {
+    for(var key in source) {
+      if(source.hasOwnProperty(key)) {
+        dest[key] = source[key];
+      }
+    }
+    return dest;
+  }
+}

+ 2 - 1
dist/bower.json

@@ -25,6 +25,7 @@
     "angular-bootstrap": "^2.2.0",
     "angular-sanitize": "^1.5.8",
     "jquery-qrcode": "*",
-    "zTree": "^3.5.26"
+    "zTree": "^3.5.26",
+    "lodash": "^4.17.4"
   }
 }

+ 1 - 0
talkview/Gulpfile.js

@@ -94,6 +94,7 @@ gulp.task('watch', function(){
     gulp.watch('src/html/**/*.html', ['rev']);
     gulp.watch('src/templates/**/*.html', ['template', 'js', 'rev']);
     gulp.watch('src/js/**/*.js', ['js', 'rev']);
+    gulp.watch('../common/*.js', ['js', 'rev']);
 });
 
 // The default task (called when you run `gulp` from cli)

+ 1 - 1
talkview/src/js/directive/historymessages.js

@@ -70,7 +70,7 @@
                 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;
+                var style = JSON.parse(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) {