mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-17 05:34:04 +00:00
Refactoring of proposal workflow. Fixes #215
This commit is contained in:
parent
333c5e39bf
commit
e6bb168c5e
35 changed files with 491 additions and 192 deletions
|
|
@ -36,6 +36,7 @@
|
|||
//= require osem-tickets
|
||||
//= require bootstrap-switch
|
||||
//= require osem-switch
|
||||
//= require osem-bootstrap
|
||||
|
||||
$(document).ready(function() {
|
||||
$('a[disabled=disabled]').click(function(event){
|
||||
|
|
|
|||
24
app/assets/javascripts/osem-bootstrap.js
Normal file
24
app/assets/javascripts/osem-bootstrap.js
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
$(function() {
|
||||
// add a hash to the URL when the user clicks on a tab
|
||||
$('a[data-toggle="tab"]').on('click', function(e) {
|
||||
history.pushState(null, null, $(this).attr('href'));
|
||||
});
|
||||
// navigate to a tab when the history changes
|
||||
window.addEventListener("popstate", function(e) {
|
||||
var activeTab = $('a[href="' + location.hash + '"]');
|
||||
if (activeTab.length) {
|
||||
activeTab.tab('show');
|
||||
} else {
|
||||
$('.nav-tabs a').first().tab('show');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(function() {
|
||||
var hash = window.location.hash;
|
||||
hash && $('ul.nav a[href="' + hash + '"]').tab('show');
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$('[data-toggle="popover"]').popover({html: true})
|
||||
});
|
||||
|
|
@ -27,11 +27,15 @@ $(function () {
|
|||
$("#" + id).toggle();
|
||||
});
|
||||
});
|
||||
$("#commercial_commercial_type").change(function () {
|
||||
$(".media-type").hide();
|
||||
$('#' + $(this).val().toLowerCase() + '-help').show();
|
||||
|
||||
$(".select-help-toggle").change(function () {
|
||||
var id = $(this).attr('id');
|
||||
$('.' + id).collapse('hide');
|
||||
|
||||
$('#' + $(this).val() + '-help.' + id).collapse('show');
|
||||
});
|
||||
$('.dropdown-toggle').dropdown();
|
||||
|
||||
/**
|
||||
* Adds the default template as value to the regarding email textarea field.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue