|
|
|
@ -1,5 +1,5 @@ |
|
|
|
|
|
|
|
|
|
//select表示select本身,view表示跳出的é?¸é …
|
|
|
|
|
//select表示select本身,view表示跳出的<EFBFBD>?<EFBFBD>項
|
|
|
|
|
;(function($){ |
|
|
|
|
|
|
|
|
|
$.fn.extend({ |
|
|
|
@ -20,7 +20,7 @@ |
|
|
|
|
|
|
|
|
|
$.fn.extend({ |
|
|
|
|
|
|
|
|
|
//檢查文å—çš„Byte數,超é?Žlimit指定的個數的話,就回傳true å’Œ 未超é?Žä¹‹å‰?çš„æ–‡å—index
|
|
|
|
|
//檢查文字的Byte數,超<EFBFBD>?<EFBFBD>limit指定的個數的話,就回傳true 和 未超<EFBFBD>?<EFBFBD>之<EFBFBD>?的文字index
|
|
|
|
|
getIndexByByte: function(strIN,limit){ |
|
|
|
|
var i, cnt=0; |
|
|
|
|
|
|
|
|
@ -65,9 +65,9 @@ |
|
|
|
|
jQuery.extend(settings, options); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var tmp='<div id="'+settings.id+'-select" style="cursor:default;font-size:12px;z-index:'+settings.zIndex+';border: solid 0px #999; padding: 3px; width: 180px; position: relative;">' |
|
|
|
|
tmp+='<div id="'+settings.id+'-Text" style="background: url('+settings.selectImage+') no-repeat 0 0; width: '+settings.selectWidth+'; height: 21px; color: Black; padding: 0 0 0 10px;">'; |
|
|
|
|
tmp+='<div class="textshow" style="padding: 4px 0 0 0;">'+settings.selectText+'</div><div class="valueshow" style="display:none;"></div></div><div id="'+settings.id+'-selectshow" style="overflow-y:auto; overflow-x:hidden; height:'+settings.viewHeight+';width:'+settings.viewWidth+'; display:none; position: absolute; left:'+settings.viewLeft+'; top:'+settings.viewTop+'; border: solid 1px #999; background: white;"></div></div>'; |
|
|
|
|
var tmp='<div id="'+settings.id+'-select" style="cursor:default;font-size:12px;z-index:'+settings.zIndex+';border: solid 0px #999; padding: 0px; width: 180px; position: relative;">' |
|
|
|
|
tmp+='<div id="'+settings.id+'-Text" style="background: url('+settings.selectImage+') no-repeat 0 0; width: '+settings.selectWidth+'; height: 21px; color: Black; padding: 0 0 0 0;">'; |
|
|
|
|
tmp+='<div class="textshow" style="padding: 0px;">'+settings.selectText+'</div><div class="valueshow" style="display:none;"></div></div><div id="'+settings.id+'-selectshow" style="overflow-y:auto; overflow-x:hidden; height:'+settings.viewHeight+';width:'+settings.viewWidth+'; display:none; position: absolute; left:'+settings.viewLeft+'; top:'+settings.viewTop+'; border: solid 1px #999; background: white;"></div></div>'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -166,9 +166,9 @@ |
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//add item到select裡�
|
|
|
|
|
//在傳itemtext時,用<span class="thistext"></span>包起è¦?顯示的 "æ–‡å—"
|
|
|
|
|
//例如:<span class="thistext">哇哈哈</span>,這樣select�擇後,就會顯示 "哇哈哈"
|
|
|
|
|
//add item到select裡<EFBFBD>?<EFBFBD>
|
|
|
|
|
//在傳itemtext時,用<span class="thistext"></span>包起<EFBFBD>?顯示的 "文字"
|
|
|
|
|
//例如:<span class="thistext">哇哈哈</span>,這樣select<EFBFBD>?<EFBFBD>擇後,就會顯示 "哇哈哈"
|
|
|
|
|
this.addItem = function(itemtext,itemvalue){
|
|
|
|
|
|
|
|
|
|
var itemhtml='<div class="selectitem"><div class="selecttext">'+itemtext |
|
|
|
|