Move all iCheck initialization to layout.js

This commit is contained in:
printempw 2017-08-06 22:31:09 +08:00
parent c1553e5b55
commit 86c5343c55
4 changed files with 2 additions and 18 deletions

View File

@ -19,6 +19,7 @@ $(document).ready(() => {
$('li.active > ul').show();
$('input').iCheck({
radioClass: 'iradio_square-blue',
checkboxClass: 'icheckbox_square-blue'
});

View File

@ -5,10 +5,6 @@
var selectedTextures = [];
$(document).ready(function () {
$('input[type=radio]').iCheck({
radioClass: 'iradio_square-blue'
});
if (! window.location.pathname.includes('/user/closet'))
return;

View File

@ -145,14 +145,6 @@
MSP.changeSkin('{{ url('textures/'.$texture->hash) }}');
@endif
$(function() {
$('input').iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue'
});
$('[for="private"]').tooltip();
});
$(document).ready(TexturePreview.init3dPreview);
// Auto resize canvas to fit responsive design
$(window).resize(TexturePreview.init3dPreview);

View File

@ -96,12 +96,7 @@ label[for="type-cape"] {
<script>
$(document).ready(function() {
TexturePreview.init3dPreview();
$('input[type=radio]').iCheck({
radioClass: 'iradio_square-blue'
});
$('input[type=checkbox]').iCheck({
checkboxClass: 'icheckbox_square-blue'
});
$('[for="private"]').tooltip();
});