|
|
@ -2,10 +2,10 @@ |
|
|
|
use \common\libs\MyLib; |
|
|
|
use \common\libs\MyLib; |
|
|
|
?> |
|
|
|
?> |
|
|
|
<?php $this->beginBlock('header_css'); ?> |
|
|
|
<?php $this->beginBlock('header_css'); ?> |
|
|
|
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
|
|
|
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
|
|
|
<?php $this->endBlock(); ?> |
|
|
|
<?php $this->endBlock(); ?> |
|
|
|
|
|
|
|
|
|
|
|
<div class="wrapper wrapper-content animated fadeInRight"> |
|
|
|
<div class="wrapper wrapper-content animated fadeInRight"> |
|
|
|
<div class="ibox float-e-margins"> |
|
|
|
<div class="ibox float-e-margins"> |
|
|
|
<div class="ibox-content"> |
|
|
|
<div class="ibox-content"> |
|
|
|
<div class="row"> |
|
|
|
<div class="row"> |
|
|
@ -18,7 +18,7 @@ use \common\libs\MyLib; |
|
|
|
<div class="row"> |
|
|
|
<div class="row"> |
|
|
|
<div class="col-sm-12"> |
|
|
|
<div class="col-sm-12"> |
|
|
|
<label class="i-checks"> |
|
|
|
<label class="i-checks"> |
|
|
|
<input type="checkbox" name="menu_ids[]" value="<?=$item->id?>" <?=in_array($item->id, $menu_ids)?'checked':''?>><i></i> <?=$item->name?> |
|
|
|
<input type="checkbox" class="parent_checkbox" name="menu_ids[]" value="<?=$item->id?>" <?=in_array($item->id, $menu_ids)?'checked':''?>><i></i> <?=$item->name?> |
|
|
|
</label> |
|
|
|
</label> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -28,7 +28,7 @@ use \common\libs\MyLib; |
|
|
|
<div class="row"> |
|
|
|
<div class="row"> |
|
|
|
<div class="col-sm-12"> |
|
|
|
<div class="col-sm-12"> |
|
|
|
<label class="i-checks"> |
|
|
|
<label class="i-checks"> |
|
|
|
<input type="checkbox" name="menu_ids[]" value="<?=$sub_item->id?>" <?=in_array($sub_item->id, $menu_ids)?'checked':''?>><i></i> <?=$sub_item->name?> |
|
|
|
<input type="checkbox" class="sub_checkbox" name="menu_ids[]" value="<?=$sub_item->id?>" <?=in_array($sub_item->id, $menu_ids)?'checked':''?>><i></i> <?=$sub_item->name?> |
|
|
|
</label> |
|
|
|
</label> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -48,13 +48,13 @@ use \common\libs\MyLib; |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<?php $this->beginBlock('footer_js'); ?> |
|
|
|
<?php $this->beginBlock('footer_js'); ?> |
|
|
|
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
|
|
|
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
|
|
|
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
|
|
|
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
|
|
|
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
|
|
|
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
$(function(){ |
|
|
|
$(function(){ |
|
|
|
$('.btn-save').click(function(){ |
|
|
|
$('.btn-save').click(function(){ |
|
|
|
var params = $('#theFrm').serialize(); |
|
|
|
var params = $('#theFrm').serialize(); |
|
|
@ -67,6 +67,27 @@ use \common\libs\MyLib; |
|
|
|
} |
|
|
|
} |
|
|
|
},'json'); |
|
|
|
},'json'); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
//处理自动选择功能 |
|
|
|
|
|
|
|
$('.parent_checkbox').click(function() { |
|
|
|
|
|
|
|
var checked = $(this).prop('checked'); |
|
|
|
|
|
|
|
var subs = $(this).parent().parent().parent().parent().next().find('.sub_checkbox'); |
|
|
|
|
|
|
|
for(var i = 0; i < subs.length; i++) { |
|
|
|
|
|
|
|
if(checked) { |
|
|
|
|
|
|
|
$(subs[i]).prop('checked', 'checked'); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
$(subs[i]).prop('checked', ''); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
$('.sub_checkbox').click(function() { |
|
|
|
|
|
|
|
var checked = $(this).prop('checked'); |
|
|
|
|
|
|
|
var subs = $(this).parent().parent().parent().parent().prev().find('.parent_checkbox'); |
|
|
|
|
|
|
|
for(var i = 0; i < subs.length; i++) { |
|
|
|
|
|
|
|
if(checked) { |
|
|
|
|
|
|
|
$(subs[i]).prop('checked', 'checked'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
<?php $this->endBlock(); ?> |
|
|
|
<?php $this->endBlock(); ?> |