Commit 1c717845 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Syntax-highlight code in comments.

parent 2e04d1b7
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -5,7 +5,8 @@ Ext.define('Docs.view.comments.List', {
    extend: 'Ext.view.View',
    alias: 'widget.commentsList',
    requires: [
        'Docs.Auth'
        'Docs.Auth',
        'Docs.Syntax'
    ],

    itemSelector: "div.comment",
@@ -67,6 +68,8 @@ Ext.define('Docs.view.comments.List', {
        ];

        this.callParent(arguments);

        this.on("refresh", this.syntaxHighlight, this);
    },

    /**
@@ -77,6 +80,10 @@ Ext.define('Docs.view.comments.List', {
        this.store.loadData(comments);
    },

    syntaxHighlight: function() {
        Docs.Syntax.highlight(this.getEl());
    },

    dateStr: function(date) {
        try {
            var now = Math.ceil(Number(new Date()) / 1000);