Quellcode durchsuchen

modal size

master
Pascal Gloor vor 5 Jahren
Ursprung
Commit
f44e2b62f0
1 geänderte Dateien mit 18 neuen und 3 gelöschten Zeilen
  1. 18
    3
      www/js/autodoc.js

+ 18
- 3
www/js/autodoc.js Datei anzeigen

@@ -53,12 +53,10 @@ $(document).ready(function () {
});

$('.autodoc_home_modal_size').click(function(e) {
var size = $(e.target).html();
$('.autodoc_home_modal_size').removeClass("active");
$(e.target).addClass("active");
home_modal_resize(conf.modalsize[size]);
home_modal_resize($(e.target).html());
});
});

$(window).bind("hashchange", function () {
@@ -417,6 +415,23 @@ function home_modal_page(pageNum) {
"/image");
}

function home_modal_resize(size) {
var newclass;
$('#autodoc_home_modal').children().removeClass('modal-sm modal-lg modal-xl');
switch(size) {
case "S": newclass = "modal-sm"; break;
case "M": break;
case "L": newclass = "modal-lg"; break;
case "XL": newclass = "modal-xl"; break;
}

if ( newclass ) {
$('#autodoc_home_modal').children().addClass(newclass);
}
}

function home_modal_page_prev() {
home_modal_page(
$('#autodoc_home_modal').data('pageNum') - 1);

Laden…
Abbrechen
Speichern