[gitg/wip/techlivezh/diff-view-clean-up: 9/21] Rename 'stats' to 'file_stats'



commit 81f0b6ba9280e44e6011b9d8a981946cf30f7e99
Author: Techlive Zheng <techlivezheng gmail com>
Date:   Tue Dec 17 20:38:02 2013 +0800

    Rename 'stats' to 'file_stats'
    
    https://bugzilla.gnome.org/show_bug.cgi?id=720886

 libgitg/resources/diff-view-html-builder.js |    8 ++++----
 libgitg/resources/diff-view.css             |   12 ++++++------
 libgitg/resources/diff-view.html            |    2 +-
 3 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/libgitg/resources/diff-view-html-builder.js b/libgitg/resources/diff-view-html-builder.js
index 271ec1f..9c9c341 100644
--- a/libgitg/resources/diff-view-html-builder.js
+++ b/libgitg/resources/diff-view-html-builder.js
@@ -132,7 +132,7 @@ function diff_file(file, lnstate, data)
        var addedp = Math.floor(added / total * 100);
        var removedp = 100 - addedp;
 
-       var stats = '<span class="expander">-</span><span class="stats"><span class="number">' + (added + 
removed)  + '</span><span class="bar"><span class="added" style="width: ' + addedp + '%;"></span><span 
class="removed" style="width: ' + removedp + '%;"></span></span></span>';
+       var file_stats = '<span class="expander">-</span><span class="file_stats"><span class="number">' + 
(added + removed)  + '</span><span class="bar"><span class="added" style="width: ' + addedp + 
'%;"></span><span class="removed" style="width: ' + removedp + '%;"></span></span></span>';
 
        if (data.settings.staged || data.settings.unstaged)
        {
@@ -149,14 +149,14 @@ function diff_file(file, lnstate, data)
                        nm = data.settings.strings.stage;
                }
 
-               stats += '<span class="' + cls + '">' + nm + '</span>';
+               file_stats += '<span class="' + cls + '">' + nm + '</span>';
        }
 
        var template = data.file_template;
        var repls = {
                'FILE_PATH': file_path,
                'FILE_BODY': file_body,
-               'STATS': stats,
+               'FILE_STATS': file_stats,
        };
 
        for (var r in repls)
@@ -178,7 +178,7 @@ function diff_files(files, lines, maxlines, data)
        var repl = [
                'FILE_PATH',
                'FILE_BODY',
-               'STATS'
+               'FILE_STATS'
        ];
 
        var replacements = {};
diff --git a/libgitg/resources/diff-view.css b/libgitg/resources/diff-view.css
index 063cb4d..b0c0b04 100644
--- a/libgitg/resources/diff-view.css
+++ b/libgitg/resources/diff-view.css
@@ -115,7 +115,7 @@ tbody.collapsed > :not(.file_header) {
   display:none;
 }
 
-span.stats {
+span.file_stats {
   width: 75px;
   background-color: #ececec;
   padding: 3px;
@@ -126,27 +126,27 @@ span.stats {
   vertical-align: middle;
 }
 
-span.stats .number, span.stats .bar {
+span.file_stats .number, span.file_stats .bar {
   display: table-cell;
   vertical-align: middle;
 }
 
-span.stats .bar {
+span.file_stats .bar {
   width: 100%;
   padding: 0px 0px 0px 6px;
 }
 
-span.stats .added, span.stats .removed {
+span.file_stats .added, span.file_stats .removed {
   height: 5px;
   float: left;
   display: block;
 }
 
-span.stats .added {
+span.file_stats .added {
   background-color: #33cc33;
 }
 
-span.stats .removed {
+span.file_stats .removed {
   background-color: #cc3333;
 }
 
diff --git a/libgitg/resources/diff-view.html b/libgitg/resources/diff-view.html
index 421e929..a4f4401 100644
--- a/libgitg/resources/diff-view.html
+++ b/libgitg/resources/diff-view.html
@@ -29,7 +29,7 @@
           </colgroup>
           <tbody>
             <tr class="file_header">
-              <td colspan="3"><!-- ${STATS} --><span class="file_path"><!-- ${FILE_PATH} --></span></td>
+              <td colspan="3"><!-- ${FILE_STATS} --><span class="file_path"><!-- ${FILE_PATH} --></span></td>
             </tr>
             <!-- ${FILE_BODY} -->
           </tbody>


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