1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- $(function() {
- //树形结构
- function treeOpenOrClose() {
- $('.tree li:has(ul)').addClass('parent_li').find(' > span').attr('title', 'Collapse this branch');
- $('.tree li.parent_li > span').on('click', function(e) {
- var children = $(this).parent('li.parent_li').find(' > ul > li');
- if (children.is(":visible")) {
- children.hide('fast');
- $(this).attr('title', 'Expand this branch').find(' > i').addClass('icon-plus-sign').removeClass('icon-minus-sign');
- } else {
- children.show('fast');
- $(this).attr('title', 'Collapse this branch').find(' > i').addClass('icon-minus-sign').removeClass('icon-plus-sign');
- }
- e.stopPropagation();
- });
- }
- treeOpenOrClose();
- // 单选框选项卡
- $(document).on('click', '.pure-table tbody tr', function() {
- $(this).addClass("selected").siblings().removeClass("selected");
- $(this).find(".status").addClass('checked').parent().siblings().find(".status").removeClass('checked');
- })
- //列表删除功能
- // $(".delete").click(function () {/** 批量删除*/
- // // alert(1)
- // $(".pure-table tbody tr.selected").each(function () {// 遍历选中的checkbox
- // var n = $(this).index(); // 获取checkbox所在行的顺序
- // delRow(n);
- // //alert(n)
- // });
- // //getListDataAjax(getSearchParamObj());
- // });
- // function delRow(n) {
- // $(".pure-table tbody").find("tr:eq(" + n + ")").remove(); //移除选中的行
- // }
- //新增模态框
- // $('.xcConfirm').hide()
- // $('.add').click(function () {
- // $('.xcConfirm').show()
- // })
- // $('.clsBtn,.cancel').click(function () {
- // //alert(1)
- // $('.xcConfirm').hide()
- // })
- // $('.handle').click(function () {
- // $('.xcConfirm.xcConfirm-handle').show()
- // })
- })
|