diff --git a/tutor/app/assets/javascripts/lecturers.js b/tutor/app/assets/javascripts/lecturers.js new file mode 100644 index 00000000..974a8030 --- /dev/null +++ b/tutor/app/assets/javascripts/lecturers.js @@ -0,0 +1,13 @@ +$(document).ready(function() { + $('.tabs .tab-links a').on('click', function(e) { + var currentAttrValue = $(this).attr('href'); + // Show/Hide Tabs + $('.tabs ' + currentAttrValue).siblings().slideUp(400); + $('.tabs ' + currentAttrValue).delay(400).slideDown(400); + //or use fade + //$('.tabs ' + currentAttrValue).fadeIn(400).siblings().hide(); + // Change/remove current tab to active + $(this).parent('li').addClass('active').siblings().removeClass('active'); + e.preventDefault(); + }); +}); \ No newline at end of file diff --git a/tutor/app/assets/javascripts/students.js b/tutor/app/assets/javascripts/students.js new file mode 100644 index 00000000..974a8030 --- /dev/null +++ b/tutor/app/assets/javascripts/students.js @@ -0,0 +1,13 @@ +$(document).ready(function() { + $('.tabs .tab-links a').on('click', function(e) { + var currentAttrValue = $(this).attr('href'); + // Show/Hide Tabs + $('.tabs ' + currentAttrValue).siblings().slideUp(400); + $('.tabs ' + currentAttrValue).delay(400).slideDown(400); + //or use fade + //$('.tabs ' + currentAttrValue).fadeIn(400).siblings().hide(); + // Change/remove current tab to active + $(this).parent('li').addClass('active').siblings().removeClass('active'); + e.preventDefault(); + }); +}); \ No newline at end of file diff --git a/tutor/app/assets/javascripts/teaching_assistants.js b/tutor/app/assets/javascripts/teaching_assistants.js new file mode 100644 index 00000000..974a8030 --- /dev/null +++ b/tutor/app/assets/javascripts/teaching_assistants.js @@ -0,0 +1,13 @@ +$(document).ready(function() { + $('.tabs .tab-links a').on('click', function(e) { + var currentAttrValue = $(this).attr('href'); + // Show/Hide Tabs + $('.tabs ' + currentAttrValue).siblings().slideUp(400); + $('.tabs ' + currentAttrValue).delay(400).slideDown(400); + //or use fade + //$('.tabs ' + currentAttrValue).fadeIn(400).siblings().hide(); + // Change/remove current tab to active + $(this).parent('li').addClass('active').siblings().removeClass('active'); + e.preventDefault(); + }); +}); \ No newline at end of file diff --git a/tutor/app/assets/stylesheets/lecturers.css b/tutor/app/assets/stylesheets/lecturers.css index 07a48df6..2f23dc87 100644 --- a/tutor/app/assets/stylesheets/lecturers.css +++ b/tutor/app/assets/stylesheets/lecturers.css @@ -1,48 +1,44 @@ - /*----- Tabs -----*/ - .tabs { - width:100%; - display:inline-block; - } - /*----- Tab Links -----*/ - /* Clearfix */ - .tab-links:after { - display:block; - clear:both; - content:''; - } - .tab-links li { - margin:0px 5px; - float:left; - list-style:none; - } - .tab-links a { - padding:9px 15px; - display:inline-block; - border-radius:3px 3px 0px 0px; - background:#7FB5DA; - font-size:16px; - font-weight:600; - color:#4c4c4c; - transition:all linear 0.15s; - } - .tab-links a:hover { - background:#a7cce5; - text-decoration:none; - } - li.active a, li.active a:hover { - background:#fff; - color:#4c4c4c; - } - /*----- Content of Tabs -----*/ - .tab-content { - padding:15px; - border-radius:3px; - box-shadow:-1px 1px 1px rgba(0,0,0,0.15); - background:#fff; - } - .tab { - display:none; - } - .tab.active { - display:block; - } \ No newline at end of file +.tabs { + width:100%; + display:inline-block; +} +.tab-links:after { + display:block; + clear:both; + content:''; +} +.tab-links li { + margin:0px 5px; + float:left; + list-style:none; +} +.tab-links a { + padding:9px 15px; + display:inline-block; + border-radius:3px 3px 0px 0px; + background:#7FB5DA; + font-size:16px; + font-weight:600; + color:#4c4c4c; + transition:all linear 0.15s; +} +.tab-links a:hover { + background:#a7cce5; + text-decoration:none; +} +li.active a, li.active a:hover { + background:#fff; + color:#4c4c4c; +} +.tab-content { + padding:15px; + border-radius:3px; + box-shadow:-1px 1px 1px rgba(0,0,0,0.15); + background:#fff; +} +.tab { + display:none; +} +.tab.active { + display:block; +} \ No newline at end of file diff --git a/tutor/app/assets/stylesheets/students.css b/tutor/app/assets/stylesheets/students.css index 07a48df6..2f23dc87 100644 --- a/tutor/app/assets/stylesheets/students.css +++ b/tutor/app/assets/stylesheets/students.css @@ -1,48 +1,44 @@ - /*----- Tabs -----*/ - .tabs { - width:100%; - display:inline-block; - } - /*----- Tab Links -----*/ - /* Clearfix */ - .tab-links:after { - display:block; - clear:both; - content:''; - } - .tab-links li { - margin:0px 5px; - float:left; - list-style:none; - } - .tab-links a { - padding:9px 15px; - display:inline-block; - border-radius:3px 3px 0px 0px; - background:#7FB5DA; - font-size:16px; - font-weight:600; - color:#4c4c4c; - transition:all linear 0.15s; - } - .tab-links a:hover { - background:#a7cce5; - text-decoration:none; - } - li.active a, li.active a:hover { - background:#fff; - color:#4c4c4c; - } - /*----- Content of Tabs -----*/ - .tab-content { - padding:15px; - border-radius:3px; - box-shadow:-1px 1px 1px rgba(0,0,0,0.15); - background:#fff; - } - .tab { - display:none; - } - .tab.active { - display:block; - } \ No newline at end of file +.tabs { + width:100%; + display:inline-block; +} +.tab-links:after { + display:block; + clear:both; + content:''; +} +.tab-links li { + margin:0px 5px; + float:left; + list-style:none; +} +.tab-links a { + padding:9px 15px; + display:inline-block; + border-radius:3px 3px 0px 0px; + background:#7FB5DA; + font-size:16px; + font-weight:600; + color:#4c4c4c; + transition:all linear 0.15s; +} +.tab-links a:hover { + background:#a7cce5; + text-decoration:none; +} +li.active a, li.active a:hover { + background:#fff; + color:#4c4c4c; +} +.tab-content { + padding:15px; + border-radius:3px; + box-shadow:-1px 1px 1px rgba(0,0,0,0.15); + background:#fff; +} +.tab { + display:none; +} +.tab.active { + display:block; +} \ No newline at end of file diff --git a/tutor/app/assets/stylesheets/teaching_assistants.css b/tutor/app/assets/stylesheets/teaching_assistants.css index 07a48df6..2f23dc87 100644 --- a/tutor/app/assets/stylesheets/teaching_assistants.css +++ b/tutor/app/assets/stylesheets/teaching_assistants.css @@ -1,48 +1,44 @@ - /*----- Tabs -----*/ - .tabs { - width:100%; - display:inline-block; - } - /*----- Tab Links -----*/ - /* Clearfix */ - .tab-links:after { - display:block; - clear:both; - content:''; - } - .tab-links li { - margin:0px 5px; - float:left; - list-style:none; - } - .tab-links a { - padding:9px 15px; - display:inline-block; - border-radius:3px 3px 0px 0px; - background:#7FB5DA; - font-size:16px; - font-weight:600; - color:#4c4c4c; - transition:all linear 0.15s; - } - .tab-links a:hover { - background:#a7cce5; - text-decoration:none; - } - li.active a, li.active a:hover { - background:#fff; - color:#4c4c4c; - } - /*----- Content of Tabs -----*/ - .tab-content { - padding:15px; - border-radius:3px; - box-shadow:-1px 1px 1px rgba(0,0,0,0.15); - background:#fff; - } - .tab { - display:none; - } - .tab.active { - display:block; - } \ No newline at end of file +.tabs { + width:100%; + display:inline-block; +} +.tab-links:after { + display:block; + clear:both; + content:''; +} +.tab-links li { + margin:0px 5px; + float:left; + list-style:none; +} +.tab-links a { + padding:9px 15px; + display:inline-block; + border-radius:3px 3px 0px 0px; + background:#7FB5DA; + font-size:16px; + font-weight:600; + color:#4c4c4c; + transition:all linear 0.15s; +} +.tab-links a:hover { + background:#a7cce5; + text-decoration:none; +} +li.active a, li.active a:hover { + background:#fff; + color:#4c4c4c; +} +.tab-content { + padding:15px; + border-radius:3px; + box-shadow:-1px 1px 1px rgba(0,0,0,0.15); + background:#fff; +} +.tab { + display:none; +} +.tab.active { + display:block; +} \ No newline at end of file diff --git a/tutor/app/controllers/lecturers_controller.rb b/tutor/app/controllers/lecturers_controller.rb index 7f496f64..b1031281 100644 --- a/tutor/app/controllers/lecturers_controller.rb +++ b/tutor/app/controllers/lecturers_controller.rb @@ -9,6 +9,4 @@ def show @lecturer = Lecturer.find(params[:id]) @courses = @lecturer.courses.order("created_at desc") end - def index - end end \ No newline at end of file diff --git a/tutor/app/controllers/students_controller.rb b/tutor/app/controllers/students_controller.rb index 848e05e6..ed4766f4 100644 --- a/tutor/app/controllers/students_controller.rb +++ b/tutor/app/controllers/students_controller.rb @@ -9,6 +9,4 @@ def show @student = Student.find(params[:id]) @courses = @student.courses.order("created_at desc") end - def index - end end \ No newline at end of file diff --git a/tutor/app/controllers/teaching_assistants_controller.rb b/tutor/app/controllers/teaching_assistants_controller.rb index 3950d479..4802ed86 100644 --- a/tutor/app/controllers/teaching_assistants_controller.rb +++ b/tutor/app/controllers/teaching_assistants_controller.rb @@ -9,6 +9,4 @@ def show @teaching_assistant = TeachingAssistant.find(params[:id]) @courses = @teaching_assistant.courses.order("created_at desc") end - def index - end end \ No newline at end of file diff --git a/tutor/app/views/lecturers/show.html.erb b/tutor/app/views/lecturers/show.html.erb index 43ab78f3..1004f0f9 100644 --- a/tutor/app/views/lecturers/show.html.erb +++ b/tutor/app/views/lecturers/show.html.erb @@ -1,19 +1,4 @@ - CoolSoft - Java tutor | <%= @lecturer.id%>'s Profile @@ -32,7 +17,7 @@

@lecturer.getStat() "to be reviewed"

-
+
diff --git a/tutor/app/views/students/show.html.erb b/tutor/app/views/students/show.html.erb index 90e25412..64e2575c 100644 --- a/tutor/app/views/students/show.html.erb +++ b/tutor/app/views/students/show.html.erb @@ -1,19 +1,4 @@ -CoolSoft - Java tutor | <%= @student.id%>'s Profile @@ -32,7 +17,7 @@

@student.getStat() "to be reviewed"

-
+
diff --git a/tutor/app/views/teaching_assistants/show.html.erb b/tutor/app/views/teaching_assistants/show.html.erb index 683f5aaa..8d2f5fda 100644 --- a/tutor/app/views/teaching_assistants/show.html.erb +++ b/tutor/app/views/teaching_assistants/show.html.erb @@ -1,19 +1,4 @@ -CoolSoft - Java tutor | <%= @teaching_assistant.id%>'s Profile @@ -32,7 +17,7 @@

@teaching_assistant.getStat() "to be reviewed"

-
+