almost there...
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
|
||||
<ul>
|
||||
<li class="first" id='cat_14001'><span class="read" catId="14001"><a href='javascript:void(0)'>Image series 1</a></span><input name='categories[]' type='checkbox' value='14001' />
|
||||
<div class="clear"></div><div class="clear"></div></li>
|
||||
<li id='cat_14002'><span class="read" catId="14002"><a href='javascript:void(0)'>Image series 2</a></span><input name='categories[]' type='checkbox' value='14002' />
|
||||
<div class="clear"></div><div class="clear"></div></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
/********** CHECKBOX DETAIL LAYER **********/
|
||||
$('.detailLayer .folders #cat_14000 ul input[type="checkbox"], .folders #categoryTreeMultiAction #cat_14000 ul input[type="checkbox"]').each(function() {
|
||||
|
||||
$(this).hide();
|
||||
if($(this).attr("checked") == "checked")
|
||||
{
|
||||
var $image = $("<img class='checkbox' src='../assets/p/checkbox_active_layer.png' />").insertAfter(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
var $image = $("<img class='checkbox' src='../assets/p/checkbox_inactive_layer.png' />").insertAfter(this);
|
||||
}
|
||||
|
||||
$image.click(function(e) {
|
||||
|
||||
e.stopPropagation();
|
||||
|
||||
var $checkbox = $(this).prev();
|
||||
$(this).prev().hide();
|
||||
|
||||
|
||||
if($checkbox.attr('checked') == "checked")
|
||||
{
|
||||
// $checkbox.prop('checked',false);
|
||||
$checkbox.attr('checked',false);
|
||||
$image.attr("src", "../assets/p/checkbox_inactive_layer.png");
|
||||
}
|
||||
else
|
||||
{
|
||||
// $checkbox.prop('checked',true);
|
||||
$checkbox.attr('checked',true);
|
||||
$image.attr("src", "../assets/p/checkbox_active_layer.png");
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
if($('.addCategorys img').attr('src','../assets/p/checkbox_inactive_layer.png').length == 0)
|
||||
{
|
||||
|
||||
$('.addCategorys .folders #cat_14000 ul input[type="checkbox"]').each(function() {
|
||||
|
||||
$(this).hide();
|
||||
if($(this).attr("checked") == "checked")
|
||||
{
|
||||
var $image = $("<img class='checkbox' src='../assets/p/checkbox_active_layer.png' />").insertAfter(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
var $image = $("<img class='checkbox' src='../assets/p/checkbox_inactive_layer.png' />").insertAfter(this);
|
||||
}
|
||||
|
||||
$image.click(function() {
|
||||
var $checkbox = $(this).prev();
|
||||
$(this).prev().hide();
|
||||
if($checkbox.attr('checked') == "checked")
|
||||
{
|
||||
// $checkbox.prop('checked',false);
|
||||
$checkbox.attr('checked',false);
|
||||
$image.attr("src", "../assets/p/checkbox_inactive_layer.png");
|
||||
}
|
||||
else
|
||||
{
|
||||
// $checkbox.prop('checked',true);
|
||||
$checkbox.attr('checked',true);
|
||||
$image.attr("src", "../assets/p/checkbox_active_layer.png");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function($) {
|
||||
|
||||
if($('.detailLayer').css('display') == "block")
|
||||
{
|
||||
$('.folders input[value="14320"]').attr('checked','checked');
|
||||
$('.folders input[value="14320"]').prop('checked',true);
|
||||
$('.folders input[value="14320"]').next().attr('src','../assets/p/checkbox_active_layer.png');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user