[gitg/wip/techlivezh/diff-view-clean-up: 10/21] Document the usage of each code block



commit 82b632660d669a929567be0ae94802040a074cfc
Author: Techlive Zheng <techlivezheng gmail com>
Date:   Tue Dec 17 20:38:15 2013 +0800

    Document the usage of each code block
    
    https://bugzilla.gnome.org/show_bug.cgi?id=720886

 libgitg/resources/diff-view-html-builder.js |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/libgitg/resources/diff-view-html-builder.js b/libgitg/resources/diff-view-html-builder.js
index 9c9c341..d8c663a 100644
--- a/libgitg/resources/diff-view-html-builder.js
+++ b/libgitg/resources/diff-view-html-builder.js
@@ -13,6 +13,9 @@ function diff_file(file, lnstate, data)
        var added = 0;
        var removed = 0;
 
+       /**
+        * file_body
+        */
        var file_body = '';
 
        for (var i = 0; i < file.hunks.length; ++i)
@@ -117,6 +120,9 @@ function diff_file(file, lnstate, data)
                }
        }
 
+       /**
+        * file_path
+        */
        var file_path;
 
        if (file.file.new.path)
@@ -128,6 +134,9 @@ function diff_file(file, lnstate, data)
                file_path = file.file.old.path;
        }
 
+       /**
+        * file_stats
+        */
        var total = added + removed;
        var addedp = Math.floor(added / total * 100);
        var removedp = 100 - addedp;
@@ -152,6 +161,9 @@ function diff_file(file, lnstate, data)
                file_stats += '<span class="' + cls + '">' + nm + '</span>';
        }
 
+       /**
+        * run template
+        */
        var template = data.file_template;
        var repls = {
                'FILE_PATH': file_path,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]