[gitg/wip/techlivezh/diff-view-clean-up: 1/12] Document the usage of each code block
- From: Techlive Zheng <techlivezh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/wip/techlivezh/diff-view-clean-up: 1/12] Document the usage of each code block
- Date: Sat, 21 Dec 2013 16:20:44 +0000 (UTC)
commit eb499593a9f6e356879551f04770ebbfe8fa6b8e
Author: Techlive Zheng <techlivezheng gmail com>
Date: Tue Dec 17 20:38:15 2013 +0800
Document the usage of each code block
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]