From 9a4bc3ea3518da01abf926f5e302c48eff146dde Mon Sep 17 00:00:00 2001 From: Charles Holbrow Date: Thu, 14 Mar 2013 13:45:22 -0400 Subject: [PATCH] working on Nick\'s style on the main page --- karmaworld/assets/css/course_list_table.css | 71 +++++++++++++++++++ .../css/datatables-css/jquery.dataTables.css | 4 +- karmaworld/assets/css/global.css | 34 --------- karmaworld/templates/courses/course_list.html | 45 ++++++------ 4 files changed, 97 insertions(+), 57 deletions(-) create mode 100644 karmaworld/assets/css/course_list_table.css diff --git a/karmaworld/assets/css/course_list_table.css b/karmaworld/assets/css/course_list_table.css new file mode 100644 index 0000000..ffec890 --- /dev/null +++ b/karmaworld/assets/css/course_list_table.css @@ -0,0 +1,71 @@ +table#course_list +{ + margin:14px auto; +} + +/*************** +Table Headers +***************/ +table#course_list thead +{ + border-bottom: solid 1px black; +} + +table#course_list th +{ + float:right; + font-family: "MuseoSlab-500"; + font-size: 12px; + margin-right: 25px; +} + +th.date { +} + +th.note-count { +} + +th.school-name { +} + +th.course-name { +} + +th.instructor-name { +} + + +/*************** +Table Data +***************/ +table#course_list td +{ + font-family: "MuseoSlab-700"; + font-size: 12px; + float:left; +} + +table#course_list tr:nth-child(even) +{ + /*background: url(../img/dashboard_activity_alt_on_bg.gif);*/ +} + +td.date { + width: 40%; +} + +td.note-count { + width: 60%; +} + +td.school-name { + width:40%; +} + +td.course-name { + width:30%; +} + +td.instructor-name { + width:30%; +} diff --git a/karmaworld/assets/css/datatables-css/jquery.dataTables.css b/karmaworld/assets/css/datatables-css/jquery.dataTables.css index 8a08706..1c3dd61 100644 --- a/karmaworld/assets/css/datatables-css/jquery.dataTables.css +++ b/karmaworld/assets/css/datatables-css/jquery.dataTables.css @@ -31,7 +31,7 @@ table.dataTable td.dataTables_empty { text-align: center; } -table.dataTable tr.odd { background-color: #E2E4FF; } +/*table.dataTable tr.odd { background-color: #E2E4FF; } table.dataTable tr.even { background-color: white; } table.dataTable tr.odd td.sorting_1 { background-color: #D3D6FF; } @@ -39,7 +39,7 @@ table.dataTable tr.odd td.sorting_2 { background-color: #DADCFF; } table.dataTable tr.odd td.sorting_3 { background-color: #E0E2FF; } table.dataTable tr.even td.sorting_1 { background-color: #EAEBFF; } table.dataTable tr.even td.sorting_2 { background-color: #F2F3FF; } -table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; } +table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }*/ /* diff --git a/karmaworld/assets/css/global.css b/karmaworld/assets/css/global.css index e1542d4..edddeca 100644 --- a/karmaworld/assets/css/global.css +++ b/karmaworld/assets/css/global.css @@ -571,40 +571,6 @@ ul#course_menu li a font-family: "MuseoSlab-700"; font-size: 12px; } - -table#course_list -{ - margin:14px auto; -} - -table#course_list tr:nth-child(even) -{ - background: url(../img/dashboard_activity_alt_on_bg.gif); -} - -table#course_list thead -{ - border-bottom: solid 1px black; -} - -table#course_list th -{ - font-family: "MuseoSlab-500"; - font-size: 12px; -} - -/* hack - table sorter moves the th into a div */ -table#course_list th div -{ - font-family: "MuseoSlab-500"; - font-size: 12px; -} - -table#course_list td -{ - font-family: "MuseoSlab-700"; - font-size: 12px; -} /* end new course-list homepage css */ a.white diff --git a/karmaworld/templates/courses/course_list.html b/karmaworld/templates/courses/course_list.html index 30155a8..8fc55d4 100644 --- a/karmaworld/templates/courses/course_list.html +++ b/karmaworld/templates/courses/course_list.html @@ -7,7 +7,8 @@ {% block pagestyle %} - + + {% endblock %} @@ -21,6 +22,8 @@ $(document).ready(function() { 'oLanguage': { 'sSearch': '', }, + // we will set column widths explicitly + 'bAutoWidth': false, // don't provide a option for the user to change the table page length 'bLengthChange': false, // sepcify the number of rows in a page @@ -29,14 +32,14 @@ $(document).ready(function() { 'sDom': '<"top"f>rt<"bottom"p><"clear">', // Specify options for each column 'aoColumns': [ + { "bSearchable": false }, + { "bSearchable": false }, null, null, null, - { "bSearchable": false }, - { "bSearchable": false }, ], // Initial sorting - 'aaSorting': [[3,'desc']] + 'aaSorting': [[1,'desc']] // Use out Ajax endpoing to populate the list //'sAjaxSource': "{% url 'api_course_list' %}" }); @@ -68,32 +71,32 @@ $('.dataTables_filter input').attr("placeholder", "Search for a class");
- +
- - - - - - + + + + + + - - - - - + + + + + {% for course in object_list %} - - - - - + + + + + {% endfor %} -- 2.25.1
School Course Name Instructor Notes Last Updated Last Updated Notes School Course Name Instructor
{{ course.school.name }} {{ course.name }} {{ course.instructor_name }} {{ course.file_count }} {{ course.updated_at|date:"gA // D M d o" }} Updated on {{ course.updated_at|date:"M d o" }} {{ course.file_count }} {{ course.school.name }} {{ course.name }} {{ course.instructor_name }}