[gitg/wip/techlivezh/diff-view-clean-up: 27/33] 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: 27/33] Document the usage of each code block
- Date: Mon, 23 Dec 2013 17:57:45 +0000 (UTC)
commit 9771d89254fd375c4797223aafe3863a80bb748f
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 4ccba87..d5e38c9 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)
@@ -101,6 +104,9 @@ function diff_file(file, lnstate, data)
}
}
+ /**
+ * file_path
+ */
var file_path;
if (file.file.new.path)
@@ -112,6 +118,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;
@@ -120,6 +129,9 @@ function diff_file(file, lnstate, data)
file_stats = lnstate.stagebutton + file_stats;
+ /**
+ * 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]