-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbackend_body.js
More file actions
33 lines (32 loc) · 1.27 KB
/
backend_body.js
File metadata and controls
33 lines (32 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
jQuery(document).ready(function(){
$('.cc_loupslider_option_content').hide(0);
$('.cc_loupslider_option').click(function(){
$(this).next('div.cc_loupslider_option_content').toggle(400);
$(this).toggleClass('active');
});
$('.upload').click(function(){
var anzahl = $('.new_image').size();
$('.new_image:last').after('<br/><input type="file" size="32" class="new_image" name="new_image['+anzahl+']" />');
});
$('.show_links').click(function(){
current = $(this);
current.toggleClass('active');
current.parent().find('.select_link').toggleClass('active');
current.parent().find('.select_gallery').toggleClass('active');
if (current.hasClass('active')) { current.html('Link manuell setzen'); }
else { current.html('Galerie auswählen'); }
});
$('.select_gallery select').change(function(){
current = $(this);
current.parent().parent().find('.select_link input').val(current.val());
});
$('.select_gallery select').each(function(){
current = $(this);
if (current.val()!=''){
current.toggleClass('active');
current.parent().parent().find('.select_link').toggleClass('active');
current.parent().parent().find('.select_gallery').toggleClass('active');
current.parent().parent().find('.show_links').html('Link manuell setzen').addClass('active');
}
});
});