Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

UI: Add toggling effect on buttons #1141

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion vms/administrator/templates/administrator/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% block content %}
<div class="spacer"></div>
<ul class="nav nav-tabs">
<li class="active"><a href="{% url 'event:list' %}">{% trans "Events" %}</a></li>
<li class="active"><a class = "tabActive" href="{% url 'event:list' %}">{% trans "Events" %}</a></li>
<li class="active"><a href="{% url 'job:list' %}">{% trans "Jobs" %}</a></li>
<li class="active"><a href="{% url 'shift:list_jobs' %}">{% trans "Shifts" %}</a></li>
<li class="active"><a href="{% url 'organization:list' %}">{% trans "Organizations" %}</a></li>
Expand Down
7 changes: 6 additions & 1 deletion vms/vms/static/vms/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,12 @@ body > .container {
border-color: #158cba;
}


/* Custom Css for administrator/settings.html */
ul.nav.nav-tabs li.active a.tabActive{
background-color: #158cba !important;
color: white !important;
border-radius: 8px !important;
}
/* Featurettes
------------------------- */

Expand Down
12 changes: 12 additions & 0 deletions vms/vms/static/vms/js/tabswitcher.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
$(document).ready(function () {
$(function () {
$('.nav.nav-tabs li a.tabActive').removeClass('tabActive');
var current =location.pathname;
$('ul.nav.nav-tabs li.active a').each(function(){
var $this =$(this);
if($this.attr('href').indexOf(current) !== -1){
$this.addClass('tabActive');
}
});
});
});
1 change: 1 addition & 0 deletions vms/vms/templates/vms/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<script src="{% static "vms/js/load_city.js" %}"></script>
<script src="{% static "vms/js/load_state.js" %}"></script>
<script src="{% static "vms/js/hide_resume_textbox.js" %}"></script>
<script src="{% static "vms/js/tabswitcher.js" %}"></script>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
Expand Down