[gitg] Only show notes when there are notes



commit 0742789d627baff0217477923c9a78178039f144
Author: Jesse van den Kieboom <jessevdk gmail com>
Date:   Sun Dec 14 19:27:44 2014 +0100

    Only show notes when there are notes
    
    This removes extra space introduced by the empty <p/>

 libgitg/resources/diff-view.html |    2 +-
 libgitg/resources/diff-view.js   |    5 +++++
 2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/libgitg/resources/diff-view.html b/libgitg/resources/diff-view.html
index 5929f4d..998f2fc 100644
--- a/libgitg/resources/diff-view.html
+++ b/libgitg/resources/diff-view.html
@@ -41,7 +41,7 @@
             <span class="date" data-id="date"></span>
           </p>
           <p class="message" data-id="message"></p>
-          <p>
+          <p data-id="notes_container">
             <span class="notes" data-id="notes"></span><br/>
             <span class="note_message" data-id="note_message"></span>
           </p>
diff --git a/libgitg/resources/diff-view.js b/libgitg/resources/diff-view.js
index f5e249d..0972961 100644
--- a/libgitg/resources/diff-view.js
+++ b/libgitg/resources/diff-view.js
@@ -156,6 +156,11 @@ function write_commit(content, commit)
        {
                elems.notes.text(settings.strings.notes);
                elems.note_message.text(commit.note);
+               elems.notes_container.show();
+       }
+       else
+       {
+               elems.notes_container.hide();
        }
 
        // Sha1


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