Projekt

Obecné

Profil

Stáhnout (1.54 KB) Statistiky
| Větev: | Revize:
1
<div id="settings-modal" class="modal fade" role="dialog">
2
	<div class="modal-dialog modal-dialog-centered" role="document">
3
		<div class="modal-content">
4
			 <div class="modal-header">
5
					<h4 class="modal-title">Nastavení</h4>
6
					<button type="button" class="close" data-dismiss="modal">&times;</button>
7
			 </div>
8
			 <div class="modal-body">
9
				<div class="container">
10
					<div class="row">
11
                        <div class="col-xs-12 col-sm-5">
12
                            <label for="itemsPerPage">Počet záznamů na stránku: </label>
13
                        </div>
14
                        <div class="col-xs-12 col-sm-7">
15
                            <input type="number" id="itemsPerPage" onchange="checkValidItemsPerPage()">
16
                        </div>
17
                    </div>
18
				</div>
19
			 </div>
20
			 <div class="modal-footer">
21
                <button type="button" class="btn btn-default" data-dismiss="modal" onclick="changeItemsPerPage()">Uložit</button>
22
                <button type="button" class="btn btn-default" data-dismiss="modal">Zavřít</button>
23
            </div>
24
		</div>
25
	</div>
26
</div>
27
<!-- init modal with items per page value -->
28
<script>
29
	var visibleItemCount = document.getElementById("itemsPerPage");
30
	//when itemPerPage undefined - user is not on search page (make settings invisible on other pages)
31
	if(typeof itemPerPage === 'undefined'){
32
		document.getElementById("modalSettingsHref").style.display = "none";
33
	}else{ //user is on search page, ok, get valid count
34
		visibleItemCount.value = itemPerPage;
35
	}      
36
</script>
(5-5/5)