1 2 /** 3 * @name CeL 輸入教育程度的範例 module 4 * @fileoverview 5 * 本檔案包含了輸入教育程度的 functions。 6 * @since 2010/1/7 23:50:43 7 */ 8 9 10 if (typeof CeL === 'function'){ 11 12 /** 13 * 本 module 之 name(id),<span style="text-decoration:line-through;">不設定時會從呼叫時之 path 取得</span>。 14 * @type String 15 * @constant 16 * @inner 17 * @ignore 18 */ 19 var module_name = 'net.form.education'; 20 21 //=================================================== 22 /** 23 * 若欲 include 整個 module 時,需囊括之 code。 24 * @type Function 25 * @param {Function} library_namespace namespace of library 26 * @param load_arguments 呼叫時之 argument(s) 27 * @return 28 * @name CeL.net.form.education 29 * @constant 30 * @inner 31 * @ignore 32 */ 33 var code_for_including = function(library_namespace, load_arguments) { 34 35 36 /** 37 * null module constructor 38 * @class 輸入教育程度的 functions 39 * @example 40 * var education_form = new CeL.education.TW('education'); 41 */ 42 CeL.net.form.education 43 = function() { 44 // null module constructor 45 }; 46 47 48 // =================================================== 49 50 _.TW= 51 52 (function(){ 53 54 var 55 56 57 // class private ----------------------------------- 58 59 60 // 模擬 inherit 61 _ = library_namespace.inherit('net.form.select_input', function() { 62 var _t = this; 63 if (!_t.loaded) 64 return; 65 66 _t.setClassName('education_input'); 67 _t.setSearch('includeKeyWC'); 68 _t.setAllList(_t.default_list); 69 70 _t.setProperty('onblur', function() { 71 if(!_t.clickNow) 72 _t.triggerToInput(0); 73 }); 74 75 // show arrow 76 _t.triggerToInput(1); 77 _t.focus(0); 78 }); 79 80 81 // class public interface --------------------------- 82 83 84 85 86 // instance public interface ------------------- 87 88 // 最高教育程度 http://wwwc.moex.gov.tw/ct.asp?xItem=250&CtNode=1054 89 _.prototype.default_list = 90 //請填寫 91 '博士(含)以上,碩士/研究所,學士/大學院校,副學士/專科,高中/高職,國中/國民中學,國小(含)以下,其他:請說明' 92 .split(','); 93 94 95 return _; 96 })(); // (function(){ 97 98 // =================================================== 99 100 101 102 103 104 return ( 105 CeL.net.form.education 106 ); 107 }; 108 109 //=================================================== 110 111 CeL.setup_module(module_name, code_for_including); 112 113 }; 114