1var CONTENTS_LIST = function(){ 2 var that, contents_obj, selected_class, all_check, all_chk_len, default_header, select_header, select_cnt_obj, 3 content_body, mobile_header; 4 var check_idx; 5 6 var init = function(obj){ 7 that = this; 8 contents_obj = obj; 9 content_body = $('._content_body'); 10 check_idx = []; 11 selected_class = 'selected'; 12 default_header = $('#header'); 13 select_header = $('#select_header'); 14 select_cnt_obj = $('#select_cnt'); 15 mobile_header = $('#mobile_header'); 16 all_check = contents_obj.find('._all_check'); 17 all_chk_len = content_body.find('input:checkbox').length; 18 }; 19 20 var allCheckToggle = function(callback){ 21 if(all_check.prop('checked')){ 22 allCheckItem(callback); 23 }else{ 24 cancelCheckItem(callback); 25 } 26 }; 27 var allCheckItem = function(callback){ 28 contents_obj.find('input:checkbox').prop('checked',true); 29 all_check.prop('checked',true); 30 checkItem(callback); 31 }; 32 var cancelCheckItem = function(callback){ 33 contents_obj.find('input:checkbox').prop('checked',false); 34 all_check.prop('checked',false); 35 checkItem(callback); 36 }; 37 38 var checkItem = function(callback){ 39 var chk_len = content_body.find('input:checkbox:checked').length; 40 check_idx = []; 41 contents_obj.find('input:checkbox:checked').each(function(){ 42 check_idx.push($(this).data('idx')); 43 }); 44 if(chk_len>0){ 45 select_header.show(); 46 default_header.hide(); 47 mobile_header.hide(); 48 }else{ 49 select_header.hide(); 50 default_header.show(); 51 mobile_header.show(); 52 } 53 select_cnt_obj.text(chk_len); 54 55 if(all_chk_len === 0){ 56 all_check.prop('checked', false); 57 alert(getLocalizeString("ì¤ëª _ì íí ë°ì´í°ê°ììµëë¤", "", "ì íí ë°ì´í°ê° ììµëë¤.")); 58 }else{ 59 if(all_chk_len != chk_len) all_check.prop('checked',false); 60 else all_check.prop('checked',true); 61 } 62 63 if(typeof callback == 'function'){ 64 callback(check_idx); 65 } 66 }; 67 68 var checkActionWithReviewCode = function(callback){ 69 var item = []; 70 contents_obj.find('input:checkbox:checked').not('._all_check').each(function() { 71 item.push($(this).val()); 72 }); 73 return callback(item); 74 }; 75 76 77 return { 78 init: function(obj) { 79 init(obj); 80 }, 81 checkItem: function(callback){ 82 checkItem(callback); 83 }, 84 allCheckItem : function(callback){ 85 allCheckItem(callback); 86 }, 87 cancelCheckItem : function(callback){ 88 cancelCheckItem(callback); 89 }, 90 allCheckToggle : function(callback){ 91 allCheckToggle(callback); 92 }, 93 checkActionWithReviewCode : function(callback){ 94 checkActionWithReviewCode(callback); 95 } 96 }; 97 98}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.