[copr] master: Some JS fanciness for builds list (0aad258)

bkabrda at fedoraproject.org bkabrda at fedoraproject.org
Tue Jan 22 07:02:14 UTC 2013


Repository : http://git.fedorahosted.org/cgit/copr.git

On branch  : master

>---------------------------------------------------------------

commit 0aad2581d214b7571f72c973d924fe00b115dc5f
Author: Bohuslav Kabrda <bkabrda at redhat.com>
Date:   Mon Jan 21 14:43:43 2013 +0100

    Some JS fanciness for builds list


>---------------------------------------------------------------

 coprs_frontend/coprs/static/copr.js                |    6 ++++++
 coprs_frontend/coprs/static/style-new.css          |    7 ++-----
 .../templates/coprs/detail/_builds_table.html      |    4 ++--
 coprs_frontend/coprs/templates/layout.html         |    2 ++
 4 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/coprs_frontend/coprs/static/copr.js b/coprs_frontend/coprs/static/copr.js
new file mode 100644
index 0000000..1f6e223
--- /dev/null
+++ b/coprs_frontend/coprs/static/copr.js
@@ -0,0 +1,6 @@
+// showing build details
+$(document).ready(function () {
+  $("table.builds-table tr[class^='build-']").each(function (i, e) {
+    $(this).hover(function() { $("table.builds-table tr.details").hide(); $(this).next().show(); });
+  });
+});
diff --git a/coprs_frontend/coprs/static/style-new.css b/coprs_frontend/coprs/static/style-new.css
index 6c36042..910898b 100644
--- a/coprs_frontend/coprs/static/style-new.css
+++ b/coprs_frontend/coprs/static/style-new.css
@@ -236,15 +236,12 @@ table.builds-table {
   width: 100%;
 }
 
-table.builds-table td.build-end {
-  border-bottom: 2px solid #4d4d4d;
-}
-
 table.builds-table form {
   display: inline;
 }
 
-table.builds-table tr.build-details {
+table.builds-table tr.details {
+  width: 100%;
   display: none;
 }
 
diff --git a/coprs_frontend/coprs/templates/coprs/detail/_builds_table.html b/coprs_frontend/coprs/templates/coprs/detail/_builds_table.html
index 3b15490..ddba34f 100644
--- a/coprs_frontend/coprs/templates/coprs/detail/_builds_table.html
+++ b/coprs_frontend/coprs/templates/coprs/detail/_builds_table.html
@@ -20,8 +20,8 @@
         <td>{{ build.ended_on|date_from_secs or 'Not yet' }}</td>
         <td>{{ build.state }}</td>
       </tr>
-      <tr class="build-details">
-        <td colspan=6 class="build-end">
+      <tr class="details">
+        <td colspan=6 class="end">
           <div>
           {% if g.user and g.user == build.user %}
             {{ copr_build_cancel_form(build) }}
diff --git a/coprs_frontend/coprs/templates/layout.html b/coprs_frontend/coprs/templates/layout.html
index ac3e8ef..e59f336 100644
--- a/coprs_frontend/coprs/templates/layout.html
+++ b/coprs_frontend/coprs/templates/layout.html
@@ -3,6 +3,8 @@
 <head>
   <title>{% block title %}Coprs Build System{% endblock %}</title>
   <link rel=stylesheet type=text/css href="{{ url_for('static', filename='style-new.css') }}">
+  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
+  <script src="{{ url_for('static', filename='copr.js') }}"></script>
 </head>
 <body>
 <div class="menu">



More information about the copr-devel mailing list