code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
{php include pubTemplate("header");} <div style="margin:150px auto; width:350px;"> <img src="{SITE_URL}public/images/ik_error.gif" style="float:left;"> <ul style="margin-left:10px; list-style-type:none; list-style-image: none; list-style-position:outside;"> <li style="font-size:14px; line-height: 32px; padding-left:30px">{$notice}</li> <li style="color:#666;line-height: 10px;">&nbsp;</li> {if $isAutoGo == false} <li style="color:#666;"> &gt; <span id="f3s">3</span>秒后 <a href="{$url}">{$button}</a> <script type="text/javascript"> (function(){ var secs=5,si=setInterval(function(){ if(--secs){ document.getElementById('f3s').innerHTML = secs; } else{ location.href="{$url}";clearInterval(si); } }, 1000)})(); </script> </li> {/if} </ul> </div> {php include pubTemplate("footer");}
12ik
trunk/public/html/notice.html
HTML
oos
1,042
.dui-dialog { position:fixed; _position:absolute; z-index:1000 } .dui-dialog .dui-dialog-content { position:relative; z-index:2; background:#fff; -moz-border-radius:4px; -webkit-border-radius:4px; *zoom:1 } .dui-dialog .hd { padding:10px; background:#ebf5eb; font-size:14px; -moz-border-radius-topleft:4px; -moz-border-radius-topright:4px; -webkit-border-top-left-radius:4px; -webkit-border-top-right-radius:4px } .dui-dialog .hd h3 { padding:0 40px 0 4px; background:0; color:#333 } .dui-dialog .hd h3 i { color:#060; font-style:normal; margin-left:.5ex } .dui-dialog .bd { position:relative; padding:15px; *zoom:1; font-size:12px } .dui-dialog .bd:after { content:'\0020'; clear:both; display:block } .dui-dialog .ft .bn-flat,.dui-dialog .ft input { margin:0 .5em } .dui-dialog .ft { text-align:center; padding:10px; padding-top:0 } .dui-dialog .dui-dialog-close { position:absolute; top:10px; right:12px; line-height:1.2; padding:0 3px; font:11px "Comic Sans MS" } a.dui-dialog-close:link { color:#b4b4b4 } a.dui-dialog-close:hover { color:#fab0b6; background:0 } .dui-dialog .dui-dialog-shd { position:absolute; left:-8px; top:-8px; width:100%; height:100%; padding:8px; background:#666; opacity:.4; filter:alpha(opacity=50); -ms-filter:"alpha(opacity=50)"; -moz-border-radius:5px; -webkit-border-radius:5px; border-raduis:5px } .dui-dialog-iframe { border:0; background:transparent; position:absolute; z-index:1; left:-8px; top:-8px; opacity:0; filter:alpha(opacity=0) }
12ik
trunk/public/css/ui/dialog.css
CSS
oos
1,630
/* jquery.Jcrop.min.css v0.9.10 (build:20120429) */ .jcrop-holder{direction:ltr;text-align:left;} .jcrop-vline,.jcrop-hline{background:#FFF url(Jcrop.gif) top left repeat;font-size:0;position:absolute;} .jcrop-vline{height:100%;width:1px!important;} .jcrop-hline{height:1px!important;width:100%;} .jcrop-vline.right{right:0;} .jcrop-hline.bottom{bottom:0;} .jcrop-handle{background-color:#333;border:1px #eee solid;font-size:1px;} .jcrop-tracker{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;height:100%;width:100%;} .jcrop-handle.ord-n{left:50%;margin-left:-4px;margin-top:-4px;top:0;} .jcrop-handle.ord-s{bottom:0;left:50%;margin-bottom:-4px;margin-left:-4px;} .jcrop-handle.ord-e{margin-right:-4px;margin-top:-4px;right:0;top:50%;} .jcrop-handle.ord-w{left:0;margin-left:-4px;margin-top:-4px;top:50%;} .jcrop-handle.ord-nw{left:0;margin-left:-4px;margin-top:-4px;top:0;} .jcrop-handle.ord-ne{margin-right:-4px;margin-top:-4px;right:0;top:0;} .jcrop-handle.ord-se{bottom:0;margin-bottom:-4px;margin-right:-4px;right:0;} .jcrop-handle.ord-sw{bottom:0;left:0;margin-bottom:-4px;margin-left:-4px;} .jcrop-dragbar.ord-n,.jcrop-dragbar.ord-s{height:7px;width:100%;} .jcrop-dragbar.ord-e,.jcrop-dragbar.ord-w{height:100%;width:7px;} .jcrop-dragbar.ord-n{margin-top:-4px;} .jcrop-dragbar.ord-s{bottom:0;margin-bottom:-4px;} .jcrop-dragbar.ord-e{margin-right:-4px;right:0;} .jcrop-dragbar.ord-w{margin-left:-4px;} .jcrop-light .jcrop-vline,.jcrop-light .jcrop-hline{background:#FFF;filter:Alpha(opacity=70)!important;opacity:.70!important;} .jcrop-light .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#000;border-color:#FFF;border-radius:3px;} .jcrop-dark .jcrop-vline,.jcrop-dark .jcrop-hline{background:#000;filter:Alpha(opacity=70)!important;opacity:.7!important;} .jcrop-dark .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#FFF;border-color:#000;border-radius:3px;} .jcrop-holder img,img.jcrop-preview{max-width:none;}
12ik
trunk/public/css/lib/jquery.Jcrop.css
CSS
oos
2,057
//menu $(document).ready(function(){ $('li.mainlevel').mousemove(function(){ $(this).find('ul').slideDown();//you can give it a speed }); $('li.mainlevel').mouseleave(function(){ $(this).find('ul').slideUp("fast"); }); });
12ik
trunk/public/js/slide.js
JavaScript
oos
240
// JavaScript Document function searchForm(obj) { var keyword = $(obj).find('input[name=kw]'), defval = keyword.attr('placeholder'); if( keyword.val() =='' || keyword.val()==defval) { return false; } return true; } $(function(){ $('#search_bar input[name=kw]').bind('click',function(){ var defval = $(this).attr('placeholder'); if($(this).val() == defval) { $(this).val('');$(this).css({"color":"#333"}); }else if($(this).val()!=''){ $(this).css({"color":"#555"}); } }); $('#search_bar input[name=kw]').bind('blur',function(){ var defval = $(this).attr('placeholder'); if($(this).val() == '') { $(this).val(defval);$(this).css({"color":"#d4d4d4"}); } }); })
12ik
trunk/public/js/all.js
JavaScript
oos
758
/* try{ if (top.location.hostname != window.location.hostname && document.referrer.search(/http:\/\/[^\/]+\.douban\.com/i) !== 0) { top.location.href =window.location.href; } } catch(e){ if (document.referrer.search(/http:\/\/[^\/]+\.douban\.com/i) !== 0) { top.location.href = window.location.href; } } */ (function(){ var site_list = window.white_site_list || /http:\/\/movie\.douban\.com\/sogou_search|http:\/\/audit\.douban\.com|http:\/\/web2\.qq\.com|http:\/\/web\.qq\.com|http:\/\/web3\.qq\.com|http:\/\/youku\.movie-test\.alphatown\.com/; if (self !== top && document.referrer.search(site_list) === -1) { top.location = self.location; } })(); Do = (typeof Do === 'undefined')? function(fn){setTimeout(fn, 0);} : Do; Douban = new Object(); Douban.errdetail = [ '','未知错误','文件过大', '信息不全','域名错误','分类错误', '用户错误','权限不足','没有文件', '保存文件错误','不支持的文件格式','超时', '文件格式有误','','添加文件出错', '已经达到容量上限','不存在的相册','删除失败', '错误的MP3文件','有禁用的内容,请修改重试']; var trace = function(o){ if(!/^http:\/\/(www|movie|music\.|book|douban\.fm)/.test(location.href) && window.console && window.console.log){ console.log(o); } } var report = function(s){$.get('/j/report?e='+s)} Douban.EventMonitor = function(){ this.listeners = new Object(); } Douban.EventMonitor.prototype.broadcast=function(widgetObj, msg, data){ var lst = this.listeners[msg]; if(lst != null){ for(var o in lst){ lst[o](widgetObj, data); } } } Douban.EventMonitor.prototype.subscribe=function(msg, callback){ var lst = this.listeners[msg]; if (lst) { lst.push(callback); } else { this.listeners[msg] = [callback]; } } Douban.EventMonitor.prototype.unsubscribe=function(msg, callback){ var lst = this.listener[msg]; if (lst != null){ lst = lst.filter(function(ele, index, arr){return ele!=callback;}); } } // Page scope event-monitor obj. var event_monitor = new Douban.EventMonitor(); function load_event_monitor(root) { var re = /a_(\w+)/; var fns = {}; $(".j", root).each(function(i) { var m = re.exec(this.className); if (m) { var actionName = m[1], f = fns[actionName]; if (!f) { f = eval("Douban.init_"+actionName); fns[actionName] = f; } f && f(this); } }); } function request_log_ad_displays() { $('div[id^="daslot"]').each(function(i) { var id = $(this).attr('id'); params = id.split("-"); $.get("/j/da/view?da="+ params[1] + "&dag=" + params[2] + "&dac=" + params[3] + "&p=" + params[4] + "&kws=" + params[5]); }); } Douban.prettify_form = function(form) { $('input:submit', form).each(function(i) { var btn = $('<a href="#" class="butt"></a>').text($(this).val()); btn.click(function() { if(clean_tip()) form.submit(); return false; }); $(this).hide().after(btn); }); } var get_form_fields = function(form) { var param = {}; function add_item(name, value) { var v = param[name]; var t = (typeof v); if (t == 'string') { param[name] = [v, value] } else if (t == 'object') { param[name].push(value) } else { param[name] = value } } $(':input', form).each(function(i){ var name = this.name; var val = this.value; if ((this.type == 'radio' || this.type == 'checkbox')) { if (this.checked) add_item(name, val); } else if (this.type == 'submit'){ if (/selected/.test(this.className)) param[name] = val; } else if (name) { add_item(name, val); } if(/notnull/.test(this.className) && this.value == ''){ $(this).prev().addClass('errnotnull'); param['err'] = 'notnull'; } }); return param; } var remote_submit_json = function(form, func, disable, action) { var fvalue = get_form_fields(form); if(fvalue['err'] != undefined) return; $(':submit,:input',form).attr('disabled',disable==false?0:1); var act = action || form.action; $.post_withck(act, fvalue, function(ret){ func(ret); }, 'json'); } /* entry vote button */ Douban.init_evb = function(o) { var eid = $(o).attr("id").split("-")[1]; $(o).submit(function() { var url = "/j/entry/" + eid + "/vote"; $.post_withck(url, function(ret) { var r = eval("("+ret+")"); event_monitor.broadcast(this, "entry_"+eid+"_voted", r); $(o).text("你的投票已经提交,谢谢。") $("#nf-"+eid).hide(); $("#nf_s-"+eid).hide(); }); return false; }); } /* entry vote count */ Douban.init_evc = function(o) { var eid = $(o).attr("id").split("-")[1]; event_monitor.subscribe("entry_"+eid+"_voted", function(caller, data) { var count = data.rec_count; if (count) { $(o).text(""+count+"人推荐").removeClass("hidden"); } }); } /* entry nointerest button */ Douban.init_enb = function(o) { var eid = $(o).attr("id").split("-")[1]; $(o).submit(function() { var url = "/j/entry/" + eid + "/nointerest"; $.post_withck(url, function(ret) { $(o).text("你的投票已经提交,谢谢。"); $("#a_evb-"+eid+",#evb_s-"+eid).hide(); }); return false; }); } var voteuse_act = function(useful, id, type, isnew) { var url = "/j/" + type + "/" + id + (useful?"/useful":"/useless"); $.postJSON_withck(url, {}, function(ret){ if (ret.result) { if(isnew){ var u = $('#ucount'+id+'u'),l = $('#ucount'+id+'l'); if ((u.text() == ret.usecount) && (l.text()==ret.totalcount - ret.usecount) && (ret.result != 'notself')){ alert('你已经投过票了'); } u.html(ret.usecount); l.html(ret.totalcount-ret.usecount); }else{ $('#voteuse_'+id).html('<span class="m gtleft">你的投票已经提交,谢谢。</span>'); $('#userate_'+id).html('<p id="userate_%s" class="pl">' + ret.usecount + '/' + ret.totalcount + '的人觉得此评论有用:</p>'); } } return false; }); } var vote_type = function(prefix){ switch(prefix){ case 'd': return "doulist"; case 'r': return "review"; case 'c': return "discussion"; case 's': return "song"; } } var voteuseful = function(id, isnew) { var _ = id.split('-'); var type = vote_type(_[0]); return voteuse_act(true, _[1], type, isnew); } var voteuseless = function(id, isnew) { var _ = id.split('-'); var type = vote_type(_[0]); return voteuse_act(false, _[1], type, isnew); } var remove_movie_discussion = function(path, ck) { custome_bt = [ { text: '确认', method: function(){ window.location = path + "remove?ck=" + ck; } }, { text: '取消', method: function(o){ o.close(); } } ]; var rm_dlg = dui.Dialog({ isHideClose: true, title: "确认删除", content: "真的要删除这篇讨论吗?", width: 400, buttons: custome_bt }); rm_dlg.open().update(); } /* blog entry folding */ Douban.init_bef = function(o) { var eid = $(o).attr('id').split('entry-')[1], unfolder = $('.unfolder',o),folder = $('.folder',o), s = $('.entry-summary',o), f = $('.entry-full',o); unfolder.click(function(){ if(f.text() == ""){ var loadtip = $('<div class="loadtip">正在载入...</div>'); var loadhl = setTimeout(function(){$('.source',o).before(loadtip);}, 200); var url = '/j/entry/'+eid+'/'; $.getJSON(url, function(j){ clearTimeout(loadhl); loadtip.hide(); $.post_withck(url+'view', {}); f.html(j.content).find('a').attr('target','_blank'); f.show(); s.hide(); }); }else{ f.show(); s.hide(); } unfolder.hide(); folder.show(); return false; }).hover_fold('unfolder'); folder.click(function(){ s.show(); f.hide(); folder.hide(); unfolder.show(); }).hover_fold('folder'); } Douban.init_unfolder_n = function(o){ $(o).click(function(){ var rid = $(o).attr('id').split('-')[1]; var url = '/j/note/'+rid+'/full'; $.getJSON(url, function(r) { $('#note_'+rid+'_short').hide(); $('#note_'+rid+'_full').html(r.html); $('#note_'+rid+'_full').show(); $('#note_'+rid+'_footer').show(); $('#naf-'+rid).hide(); $('#nau-'+rid).show(); load_event_monitor($('#note_'+rid+'_full')); }); return false; }).hover_fold('unfolder'); } Douban.init_folder_n = function(o){ $(o).click(function(){ var rid = $(o).attr('id').split('-')[1]; $('#note_'+rid+'_full').hide(); $('#note_'+rid+'_short').show(); $('#note_'+rid+'_footer').hide(); $(o).hide(); $('#naf-'+rid).show(); }).hover_fold('folder'); } Douban.init_unfolder = function(o){ $(o).click(function(){ var rid = o.id.split('-')[1]; var sw = o.rel.split('-')[1]; var url = '/j/review/'+rid+'/fullinfo'; $.getJSON(url, {show_works:sw}, function(r) { var d = document.createElement('div'); d.innerHTML = r.html; $('#review_'+rid+'_short').hide(); $('#review_'+rid+'_full').html('').append(d); $('#review_'+rid+'_full').show(); $('#af-'+rid).hide(); $('#au-'+rid).show(); load_event_monitor($('#review_'+rid+'_full')); }); return false; }); } Douban.init_folder = function(o){ $(o).click(function(){ var rid = $(o).attr('id').split('-')[1]; $('#review_'+rid+'_full').hide(); $('#review_'+rid+'_short').show(); $(o).hide(); $('#af-'+rid).show(); }); } /* blog entry voters folding */ Douban.init_bevf = function(o) { var eid = $(o).attr('id').split('bevs-')[1]; var h = $('.voters_header',o); if (!h.length) return; h.hover(function(){$(this).addClass('clickable_title');}, function(){$(this).removeClass('clickable_title');}); var v = $('#vsl',o); var l = $('.link', o); var m = $('#more_voters',o); var fn = function(e) { var f = $(".mv",o); if (f.length) { var d = f.toggle().css('display'); l.text(d=='none' ? "更多推荐者" : "隐藏"); if (m.length) m.toggle().css('display'); } else { t=$('<li>正在装载...</li>'); if (v.length) { v.append(t); } else { h.after(v=$('<ul id="vsl" class="user-list pl indent"></ul>')); v.append(t); } var url = '/j/entry/'+eid+'/voters?start=8'; $.getJSON(url, function(j) { t.css('display','none'); t.before($(j.html)); if (m.length) { m.css('display','none'); } }); $('.link', o).text("隐藏"); } return false; } h.click(fn); l.click(fn); }; Douban.init_guidelink = function(o) { $(o).click(function() { window.open('/help/guide1', '', 'width=640,height=400'); return false; }); }; Douban.init_closelink = function(o) { $('<a href="#">关闭</a>').appendTo($(o)).click(function() { window.close(); return false; }); }; function ext_links() { es = $('.entry-summary'); es.each(function (i) { var a = $(es[i]).find('a'); a.each(function (j) { a[j].target = '_blank'; }); }); } Douban.init_confirm_link = function(o) { if(/recc/.test(o.name)) { var _ = o.name.split('-'); var link = $(o).attr('href').split('/'); var pid = link[0] != 'http:' ? link[2] : link[4]; var url = '/j/rec_comment'; $(o).click(function(){ var bln = confirm("真的要删除?"); if(bln){ $.getJSON(url,{rid: _[1], del_comment: _[2]}, function(){ $(o).parent().parent().parent().remove(); }) } return false; }) } else if(/sayc/.test(o.name)) { var _ = o.name.split('-'); var link = $(o).attr('href').split('/'); var pid = link[0] != 'http:' ? link[2] : link[4]; var url = '/j/saying_comment'; $(o).click(function(){ var bln = confirm("真的要删除?"); if(bln){ $.getJSON(url,{sid: _[1], del_comment: _[2]}, function(){ $(o).parent().parent().parent().remove(); }) } return false; }) } else { var o = $(o); o.click(function() { var text = o.attr('title') || o.text(); text = (text.slice(0,1) == '!') ? text.slice(1) : "真的要"+text+"?"; return confirm(text); }); } } var populate_tag_btns = function(title, div, tags, hash){ if (tags.length) { var p = $('<dl><dt>'+title+'</dt></dl>'),d = $('<dd></dd>'); $.each(tags, function(i,tag) { var btn = $('<span class="tagbtn"></span>').addClass(hash[tag.toLowerCase()]?'rdact':'gract').text(tag); d.append(btn).append(' &nbsp; '); }); p.append(d); div.append(p); } } Douban.init_music_sync_form = function(form) { var music = $('form.music-sns'), show_sync = $('form.show_sync'); if(music.length && show_sync.length){ // 豆瓣音乐分享到豆瓣说及第三方应用, 需在收藏前弹出设置 $('#overlay, #dialog').hide(); var auth = dui.Dialog({ 'title': '授权同步信息至豆瓣说与第三方网站', 'url': '/settings/pop', 'autoupdate': true, 'callback': function(data, o){ $('a#btn-later', o.node).bind('click', function(){ $('div.dui-dialog').remove(); $('#overlay, #dialog').show(); return false; }); $('a#btn-never', o.node).bind('click', function(e){ e.preventDefault(); $.post_withck('/settings/never_pop_sync_settings', {}, function(){ $('div.dui-dialog').remove(); $('#overlay, #dialog').show(); }); return false; }); $('a.dui-dialog-close', o.node).bind('click', function(){ $('div.dui-dialog').remove(); $('#overlay, #dialog').show(); return false; }); } }); auth.open(); $('a#btn-auth').live('click', function() { $.post_withck('/settings/pop_sync', {}, function(data) { var node = auth.node; if(node.find('.bd').find('#pop-sync').length == 0){ node.find('.bd').append(data); auth.update(); } }); }); } } Douban.init_interest_form = function(form) { Douban.init_music_sync_form(form); var oFrm = $(form), btns = {}, selected = {}, oShare = $('.share-label', form); $('body').data('shuo-conf', true); $('body').data('sina-conf', true); $('body').data('tencent-conf', true); if (oFrm.data('bind') === 'true') { return; } else { oFrm.data('bind', 'true'); } var select = function(tl) { if (btns[tl]) { selected[tl] = true; $.each(btns[tl], function(i, btn) { $(btn).removeClass('gract').addClass('rdact'); }); } } var deselect = function(tl) { if (btns[tl]) { delete selected[tl]; $.each(btns[tl], function(i, btn) { $(btn).removeClass('rdact').addClass('gract'); }); } } var update = function() { var tags = $.trim(form.tags.value.toLowerCase()).split(' '), hash = {}; $.each(tags, function(i, t){ if (t != '') { select(t); hash[t] = true; } }); for (t in selected) { if (!hash[t]) deselect(t) } } var changePrivate = function() { var oPrivate = $('#inp-private'), labels = oPrivate.parents('form').find('.share-label'); checked = oPrivate.attr("checked"); if (checked) { labels.addClass('greyinput').find('input').each(function(i, item) { item.__checked = item.checked; item.disabled = true; item.checked = false; }); } else { labels.removeClass('greyinput').find('input').each(function(i, item) { if ('__checked' in item) { item.checked = item.__checked; } item.disabled = false; }); } } var changeShare = function(e) { var key = e.data.key, conf = $('body').data(key); if (conf == true) { conf = false } else { conf = true }; $('body').data(key, conf); } update(); if($(form).data('comment')){ form.comment.focus(); } else if($('#foldcollect').val() == 'U'){ form.tags.focus(); } $(form).submit(function() { var sid = $(this).attr('action').split('/')[3]; remote_submit_json(this, function(data){ var shuo = $('#dialog .shuo :input[type=checkbox]'), movie = $('div#dialog form.movie-sns'); book = $('div#dialog form.book-sns'); if (data.r != 0){ $('#saving').remove(); $('#submits').show(); $('#error').html(Douban.errdetail[data.r]); refine_dialog(); return } $("#collect_form_"+sid).html(''); if (shuo.length && shuo[0].checked) { close_dialog(); if (typeof DoubanShare !== 'undefined') { DoubanShare.share(data); DoubanShare.onDialogClose(function(){ self.location.replace(self.location.href); }); } return; }else if(movie.length && data.pop_sync){ // 豆瓣电影分享到豆瓣说及第三方应用 close_dialog(); var auth = dui.Dialog({ 'title': '授权同步信息至豆瓣说与第三方网站', 'url': '/settings/pop', 'autoupdate': true, 'callback': function(data, o){ $('a#btn-later', o.node).bind('click', function(){ $('div.dui-dialog').remove(); self.location.replace(self.location.href); return false; }); $('a#btn-never', o.node).bind('click', function(e){ e.preventDefault(); $.post_withck('/settings/never_pop_sync_settings', {}, function(){ $('div.dui-dialog').remove(); self.location.replace(self.location.href); }); return false; }); $('a.dui-dialog-close', o.node).bind('click', function(){ self.location.replace(self.location.href); return false; }); } }); auth.open(); }else if(book.length && data.book_pop_sync){ // 豆瓣读书分享到豆瓣说及第三方应用 close_dialog(); var auth = dui.Dialog({ 'title': '授权同步信息至豆瓣说与第三方网站', 'url': '/settings/pop', 'autoupdate': true, 'callback': function(data, o){ $('a#btn-later', o.node).bind('click', function(){ $('div.dui-dialog').remove(); self.location.replace(self.location.href); return false; }); $('a#btn-never', o.node).bind('click', function(e){ e.preventDefault(); $.post_withck('/settings/never_pop_sync_settings', {}, function(){ $('div.dui-dialog').remove(); self.location.replace(self.location.href); }); return false; }); $('a.dui-dialog-close', o.node).bind('click', function(){ self.location.replace(self.location.href); return false; }); } }); auth.open(); } if ($(form).data('reload')) { if (/subject\/\d+\/comments/.test(location.href)){ location.href = location.href.split('?sort')[0] + '?sort=time'; }else if (/people\/[^\/]+\/(edittag|all|do|wish|collect)/.test(location.href)){ location.href = location.href; }else{ location.href = location.href.split('?')[0]; } }else{ close_dialog(); } },false); $('#submits').hide().after('<div id="saving" class="m">正在保存...</div>'); refine_dialog(); return false; }); if(oShare){ $('#inp-private').click(changePrivate); $('input[name=share-shuo]').bind('click', {key:'shuo-conf'}, changeShare); $('input[name=share-sina]').bind('click', {key:'sina-conf'}, changeShare); $('input[name=share-tencent]').bind('click', {key:'tencent-conf'}, changeShare); }; $(form.cancel).click(function(){ var sid = $(form).attr('action').split('/')[3]; $("#collect_form_"+sid).html(''); }); $('.tagbtn', form).each(function(i){ var tl = $(this).text().toLowerCase(); if (btns[tl]) btns[tl].push(this); else btns[tl] = [this]; }).click(function(){ var tag = $(this).text(); var tags = $.trim(form.tags.value).split(' '), present=false, tl=tag.toLowerCase(), i; tags = $.grep(tags, function(t, i) { if (t.toLowerCase() == tl) { deselect(tl); present = true; return false; } else { return true; } }); if (!present) { tags.push(tag); select(tl); } var content = tags.join(' '); form.tags.value = (content.length > 1) ? content+' ' : content; form.tags.focus(); }); $(form.tags).keyup(update); } Douban.init_stars = function(o){ var ratewords = {1:'很差', 2:'较差', 3:'还行', 4:'推荐', 5:'力荐'}, n = $('#n_rating', o), s = $('#stars img', o), f = function(i) { var rating = n.val() || 0; s.each(function(j){ var gif = this.src.replace(/\w*\.gif$/, ((j<i) ? 'sth' : ((j<rating) ? 'st' : 'nst')) + '.gif'); this.src = gif; }); if (i) { $('#rateword', o).text(ratewords[i]); } else { $('#rateword', o).text(rating ? ratewords[rating] : ''); } } s.hover(function(){f(this.id.charAt(4))}, function(){f(0)}); if(n.attr('name')){ s.click(function(){ var rating = this.id.charAt(4); n.val(rating); f(rating); }); } f(); } Douban.init_tries_to_listen = function(o) { var m = $(o).attr('name'); $(o).click(function(){ var isFF=!document.all; if(m!=''){ var _ = m.split('-') var w = _[0]; var h = _[1]; } else{ var w = 384; var h = 450; } var left = (screen.width-w)/2; var top = isFF?(screen.height-h)/2:50; window.open($(o).attr('href'),'','width='+w+',height='+h+',top='+top+',left='+left+',scrollbars=0,resizable=0,status=1'); return false; }); } Douban.init_discover = function(o){ var txt = $('#discover_text')[0] $(o).submit(function(form) { if(!txt.value || txt.value == txt.title) return false var cat = ""; cat = $(":radio:checked")[0].value; if (cat == "event"){ $("#discover_s").attr("action","/event/search"); }else if (cat == "group"){ $("#discover_s").attr("action","/group/search?q="+$("#discover_text").value); }else{ $("#discover_s").attr("action","/subject_search"); } }); $(o,':radio').click(function(){ txt.focus(); }) } var friend_form_update = function(data, uid) { $("#divac").html(data); $("#submitac").submit(function(){ this.action = "/j/people/"+uid+"/friend"; remote_submit_json(this,function(r) { $("#divac").parent().html(r['html']); $("#tip_wait").yellow_fade(); load_event_monitor($(data)); }); return false; }); $("#cancelac").click(function(){ $("#divac").html(""); }); } Douban.init_review_full = function(o) { var i = $(o).attr('id').split('_'); var rid = i[1]; var stype = i[2]; $('.link', o).click(function(){ var url = '/j/review/'+rid+'/'+stype; $.getJSON(url, function(r) { $(o).html(r.html); load_event_monitor($(o)); }); return false; }); } Douban.init_show_login = function(o){ $(o).click(function(){ alert(1) return pop_win.load('/j/misc/login_form') }); } Douban.init_show_signup_table = function(o){ $(o).click(function(){ event_id = window.location.href.split('/')[4]; return pop_win.load('/j/event/'+event_id+'/signup') }); } // 转移==> core/cookie.js var set_cookie = function(dict, days, domain, path){ var date = new Date(); date.setTime(date.getTime()+((days || 30)*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); for (var i in dict){ document.cookie = i+"="+dict[i]+expires+"; domain=" + (domain || "douban.com") + "; path=" + (path || "/"); } } // 转移==> core/cookie.js function get_cookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) { return c.substring(nameEQ.length,c.length).replace(/\"/g,''); } } return null; } Douban.init_hideme = function(o){ $(o).click(function(){ $(this).parent().parent().parent().hide(); }); } Douban.init_more = function(o){ $(o).click(function(){ lastObj = $(this).prev().find("input"); ids = /(.*_)(\d+)$/.exec(lastObj.attr("id")); id = ids[1] + (parseInt(ids[2]) + 1); a = lastObj.clone(); a.attr("value",""); $(this).before('<br/>').before(a); a.attr('id',id).attr('name',id).wrap('<span></span>'); }) } Douban.init_more2 = function(o){ $(o).click(function(){ lastObj = $(this).prev().find("input"); ids = /(.*_)(\d+)_(\d+)$/.exec( lastObj.attr("id")); last_id = parseInt(ids[3]) nid = last_id + 1; id = ids[1] + parseInt(ids[2]) +"_" + nid; a = lastObj.clone(); a.attr("value",""); $(this).before('<br/><span class="pl idx">'+(nid+1)+'</span>').before(a); a.attr('id',id).attr('name',id).removeClass("m").wrap('<span></span>'); init_keyup(); list_data[id]= "无"; }) } Douban.init_search_text = function(o){ if(!o.value || o.value == o.title){ $(o).addClass("greyinput"); o.value = o.title; } $(o).focus(function(){ $(o).removeClass("greyinput"); if(o.value == o.title) o.value = ""; }); $(o).blur(function(){ if(!o.value){ $(o).addClass("greyinput"); o.value = o.title; } }); } Douban.init_checkreg = function(o){ $(o).find('.butt').click(function(){ var check = true; $(o).find('input').each(function(){ if(this.type!='submit' && this.type!='button'){ if(this.value == ''){ $(this).next().css('display','inline'); check = false; }else{ $(this).next().css('display','none'); } } }); return check; }); } Douban.init_click_tip = function(o){ var tip = $(o).parent().find('.blocktip'); $(o).click(function(){ tip.show().blur_hide(); m = tip.width() + tip.pos().x - $.viewport_size()[0] > 0? -tip.width() : 0; tip.css('margin-left', m); }) $('.hideme',tip).click(function(){ tip.hide(); }) } function clean_tip(){ var txt = $('#page_focus')[0]; return txt && txt.value != txt.title } Douban.init_submit_link = function(o){ $(o).click(function(){ $(o).parent().submit(); }); } var nowmenu = null; var hidemenu = function(a){ a.find('.down').css('display','inline'); a.find('.up').hide(); a.next().hide(); nowmenu = null; $('body').unbind('mousedown'); } var openmenu = function(a){ if(nowmenu != null){ hidemenu(nowmenu); } a.find('.up').css('display','inline'); a.find('.down').hide(); a.next().show(); nowmenu = a; $('body').mousedown(function(){ if(a.parent().attr('rel') != 'on'){ hidemenu(a); } }); } $(function(){ $("a","#dsearch").each(function(){ $(this).click(function(){ if(!clean_tip()) return true; urls = $(this).attr("href").split("?cat="); $("#ssform").attr("action", urls[0]); if(urls[1] != undefined){ $('<input type="hidden" name="cat" value="' + urls[1] + '" />').appendTo($("#ssform")); } $("#ssform").submit(); return false; }); }); $('.arrow').click(function(){ if($(this).find('.up').is(':hidden')){ openmenu($(this)); }else{ hidemenu($(this)); } this.blur(); }); $('.arrow').parent().hover(function(){ $(this).attr('rel','on'); },function(){ $(this).attr('rel','off'); }) if($.suggest) $('#page_focus').suggest('/j/subject_suggest',{onSelect : function(){ $(this).parents('form') .append('<span><input name="add" value="1" type="hidden"/></span>') .submit(); }}) var rcoo = get_cookie('report'); if (rcoo){ set_cookie({report:''},0); $.get('/stat.html?'+rcoo) } $(':submit').each(function(){ if ($(this).val() == '加上去'){ $(this).click(function(){var self = this; setTimeout(function(){self.disabled = 1;},0)}) } }); if ($.browser.msie && $.browser.version == '6.0'){ $('form.miniform > :submit').hover( function(){$(this).addClass('hover')}, function(){$(this).removeClass('hover')} ) } }) //@import /js/core/old_show_dialog.js var refine_dialog = function(){ if (!$('#dialog').length) return; var agent = navigator.userAgent.toLowerCase(); var top = 0.5 * ($.viewport_size()[1] - $('#dialog')[0].offsetHeight) + 140; $('#dialog,#overlay').css('top', top); set_overlay(); } Douban.init_show_full = function(o){ $(o).click(function(){ $(o).parents('.short').hide(); $(o).parents('.short').next().show(); }) } Douban.init_show_full2 = function(o){ $(o).click(function(){ $(o).parents('.short').hide(); $(o).parents('.short').next().show(); $(o).parents('.reading-note').nextAll('.col-rec-con').show(); $(o).parents('.reading-note').next().children('.no-comments').show(); }) } Douban.init_show_short = function(o){ $(o).click(function(){ $(o).parents('.all').hide(); $(o).parents('.all').prev().show(); }) } Douban.init_show_short2 = function(o){ $(o).click(function(){ $(o).parents('.all').hide(); $(o).parents('.all').prev().show(); $(o).parents('.reading-note').nextAll('.col-rec-con').hide(); $(o).parents('.reading-note').next().children('.no-comments').hide(); }) } Douban.init_show_more = function(o){ $(o).click(function(){ $(o).parent().prevAll('.more').show(); $(o).parent().remove(); }) } Douban.init_collect_btn = function(o) { $(o).click(function(e){ e.preventDefault() if($('#hiddendialog').length){ show_dialog($('#hiddendialog').html()); load_event_monitor($('#dialog')); return } show_dialog(null); var _ = $(this).attr('name').split('-'), btn_type = _[0], sid = _[1], interest = _[2], rating = _[3], url = '/j/subject/'+sid+'/interest?'+ (interest ? 'interest='+interest : '')+ (rating ? '&rating='+rating : '')+ (btn_type == 'cbtn' ? '&cmt=1':''); $.getJSON(url, function(r) { if (!$('#dialog').length) { return } var html = $('<div></div>') html.get(0).innerHTML = r.html; var tags = r.tags; var content = tags.join(' '); $('input[name=tags]', html).val((content.length > 1)? content + ' ' : content) var hash = {}; $.each(tags, function(i,tag){hash[tag.toLowerCase()]=true;}); populate_tag_btns('我的标签:', $('#mytags', html), r['my_tags'], hash); populate_tag_btns("常用标签:", $('#populartags', html), r['popular_tags'], hash); if (btn_type == 'pbtn' || btn_type == 'cbtn') $('form', html).data('reload', 1); $('#dialog').html(html); $('#showtags').click(function(){ if($('#advtags').is(':hidden')){ $(this).html('缩起 ▲'); $('#advtags').show(); $('#foldcollect').val('U'); }else{ $(this).html($(this).attr('rel')); $('#advtags').hide(); $('#foldcollect').val('F'); } $(this).blur(); refine_dialog(); }); var oprd=$("input[name=interest]", html),rate=$(".rate_stars"), f = function(){ if (oprd[0].checked) {rate.hide()} else {rate.show()} refine_dialog(); }; oprd.click(f); f(); if($('#left_n').length){ var lstr = $('#left_n').text(); llen = (lstr.match(/\d+/i)==lstr)?lstr:140; $('#comment').display_limit(llen, $('#left_n')); } if(btn_type == 'cbtn'){ var h2 = $('h2','#dialog'); h2.text(h2.text().replace('修改','写短评')); if (!oprd[0].checked && oprd[1]) oprd[1].checked = true; $('form', '#dialog').data('comment',1); } load_event_monitor(html); // 豆瓣电影短评使用不同的短评字符计算方法 Miko // 英文和半角字符按半个字来计算 $.fn.movieDisplayLimit = function(textarea, ele, limit){ function _setCharactorLeft(objTextarea, objCharactor, numLimit){ objCharactor.text(numLimit - Math.ceil(objTextarea.val().replace(/[^\x00-\xff]/g, "**").length/2)); } // 因为半角和英文字符按半个字来计算 // 但是 maxlength 属性是不区分全、半角的长度限制 // 所以,需要按照半角、英文字符的长度来适当增加 maxlength function _setTextareaMaxLength(objTextarea){ var fullWidthCharactor = objTextarea.val().match(/[^\x00-\xff]/ig), fullWidthCharactorLength = !fullWidthCharactor? 0: fullWidthCharactor.length, halfWidthCharactorLength = objTextarea.val().length - fullWidthCharactorLength; textarea.attr('maxlength', 140 + Math.ceil(halfWidthCharactorLength/2)); } // 初始化先把之前按照其他字符计算方法的剩余字符数做调整 _setCharactorLeft(textarea, ele, limit); $(this).keyup(function(){ _setCharactorLeft($(this), ele, limit); _setTextareaMaxLength($(this)); return false; }); }; // 以 dialog 下的 form 是否有 .movie-sns 作为区分标记 if($('div#dialog form.movie-sns').length){ $('textarea#comment').unbind().movieDisplayLimit($('textarea#comment'), $('span#left_n'), 140); } }); return false; }); } Douban.init_nine_collect_btn = function(o) { $(o).click(function(){ var _ = $(this).attr('name').split('-'); var btn_type = _[0], sid = _[1], interest = _[2]; var url = '/j/subject/'+sid+'/interest'; $.getJSON(url, interest && {interest: interest}, function(r) { var html = $('<div></div>').html(r.html); var tags = r.tags; var content = tags.join(' '); $('input[name=tags]', html).val((content.length > 1)? content + ' ' : content); var hash = {}; $.each(tags, function(i,tag){hash[tag.toLowerCase()]=true;}); populate_tag_btns('我的标签(点击添加):', $('#mytags', html), r.my_tags, hash); populate_tag_btns("豆瓣成员常用的标签(点击添加):", $('#populartags', html), r.popular_tags, hash); if (btn_type == 'pbtn') $('form', html).data('reload',1); $("#collect_form_"+sid).html("").append('<p class="ul"></p>').append(html); load_event_monitor($("#collect_form_"+sid)); }); return false; }); } Douban.init_rec_btn= function(o) { var _ = $(o).attr('name').split('-'), url = '/j/recommend', rdialog = 'rdialog-' + _[1] + '-' + _[2], f = function(){ var uid = ((_[1] == 'I')&&(_[2]==undefined)) ? $('input',$(o).parent())[0].value : _[2], rec = (_[3]==undefined) ? '':_[3], fcs = function(type){ if(type == 'I'){ var s = $('.text','#dialog'); if(s.length){ if(s[0].value.length){s[1].focus();} else{s[0].focus();} } }else{ $('#dialog').find(':submit').focus(); } if ($(o).hasClass('novote')){ //it's a new test version of rec btn $('form','#dialog').append('<input name="novote" value="1" type="hidden"/>'); } } if($('#' + rdialog).length){ show_dialog($('#' + rdialog).html()); load_event_monitor('#dialog'); fcs(_[1]); }else{ $.getJSON(url, {type:_[1], uid:uid, rec:rec}, function(r){ show_dialog(r.html); if(_[1]!='I'){ var rechtml = $('<div id="'+rdialog+'"></div>'); rechtml.html(r.html).appendTo('body').hide(); } load_event_monitor('#dialog'); fcs(_[1]); }); } return false; } $(o).click(f); if(_[1] == 'I'){ $(o).parent().parent().submit(f); } } Douban.init_rec_form = function(form) { var frm = $(form); frm.submit(function(e){ $(':submit,:input',this).attr('disabled',true); $("#ban_word").remove() remote_submit_json(this, function(data){ trace(data); if(data.ban){ $(':submit,:input',form).attr('disabled',false); $(".recsubmit").before('<div class="attn" style="text-align:center" id="ban_word">你的推荐中有被禁止的内容</div >') return } $('#dialog').html('<div class="loadpop m">推荐已提交</div>'); set_overlay(); $('#rec_url_text').attr('value','http://'); setTimeout(function(){ $('#dialog, #overlay').fadeOut(close_dialog); if($('input[name=type]',form).val() == "I"){ document.location.reload(); } },400); }); return false; }); frm.find('.reccomment label').click(function(e){ $(this).next().focus(); }); frm.find('.reccomment .text').focus(function(e){ $(this).prev().hide(); }).blur(function(e){ var el = $(this); if ($.trim(el.val()) === '') { $(this).prev().show(); } }); frm.set_len_limit(140); } Douban.init_saying_reply = function(o){ var _ = o.name.split('-'); var url = '/j/saying_comment'; if(!o.rev){ $(o).attr('rev', 'unfold'); } $(o).click(function(){ if(o.rev != 'unfold'){ $(o).parent().parent().next().remove(); $(o).html($(o).attr('rev')); o.rev = 'unfold'; }else if(o.rel!="polling"){ o.rel="polling" $.getJSON(url, {sid: _[2], type: _[3], n:_[4], ni:_[5]}, function(r){ $('<div class="recreplylst"></div>').insertAfter($(o).parent().parent()).html(r.html); load_event_monitor($(o).parent().parent().next()); $(o).attr('rev', $(o).html()).text('隐藏回应'); o.rel="" }) } return false; }) } Douban.init_rec_reply = function(o){ var _ = o.name.split('-'); var url = '/j/rec_comment'; if(!o.rev){ $(o).attr('rev', 'unfold'); } $(o).click(function(){ if(o.rev != 'unfold'){ $(o).parent().parent().next().remove(); $(o).html($(o).attr('rev')); o.rev = 'unfold'; }else if(o.rel!="polling"){ o.rel="polling" $.getJSON(url, {rid: _[2], type: _[3], n:_[4], ni:_[5]}, function(r){ $('<div class="recreplylst"></div>').insertAfter($(o).parent().parent()).html(r.html); load_event_monitor($(o).parent().parent().next()); $(o).attr('rev', $(o).html()).text('隐藏回应'); o.rel="" }) } return false; }) } Douban.init_reply_form = function(form){ $(form).attr('action', $(form).attr('rev')); var n = $(form).attr('name'); $(form).submit(function(){ remote_submit_json(this, function(r){ var replst = $(form).parent(); $(replst).html(r.html); load_event_monitor(replst); if (n=='n'){ var a = $('<span><a href="javascript:void(0)">添加回应</a></span>'); } else { var a = $('<span style="margin-left:53px"><a href="javascript:void(0)">添加回应</a></span>'); } $('form', replst).hide().after(a); a.click(function(){ $(this).prev().show(); $(this).remove(); }) }); $(':submit',form).attr('disabled', 1); return false; }) $(form).set_len_limit(140); } Douban.init_video_comment = function(form){ $(form).submit(function(){ remote_submit_json(this, function(r){ var insert_point = $('#comments'); $(insert_point).html(r.html); load_event_monitor(insert_point); $(':submit', form).attr('disabled', 0); $('textarea', form).attr('disabled', 0); $('textarea', form).attr('value', ''); }, true, '/j/video/add_comment'); return false; }) } Douban.init_video_del_comment = function(o){ var _ = $(o).attr('name').split('-'); $(o).click(function(){ var text = o.title; if(confirm("真的要"+text+"?") == true){ $.postJSON_withck("/j/video/del_comment", {comment_id: _[1], video_id: _[2]}, function(r){ var insert_point = $('#c-'+_[1]); $(insert_point).html(""); }); } return false; }) } Douban.init_noti_form = function(form){ $(":submit",form).click(function(){ $(this).addClass('selected'); }); $(form).attr('action','/j/request/'); $(form).submit(function(){ form.confirm.disabled = true; form.ignore.disabled = true; remote_submit_json(this, function(r){ $(form).parent().html(r.html); }); return false; }); } Douban.init_editable = function(o){ var disp = $('#display',o), form = $('form',o)[0], a = $('a','#edi'); var show = function(t){ if(t != undefined){ disp.text(t); if (disp.text() == ''){ a.text('点击添加描述').addClass('sign-text'); }else{ a.text('修改').removeClass('sign-text'); } } disp.show(); $(form).hide(); $('#edi').show(); } show(disp.text()); if(form.name) $(form).set_len_limit(form.name); $(form).submit(function(){ remote_submit_json(form, function(r){ show(r.desc); }) $('textarea',form)[0].value="正在保存..."; return false; }) $('.cancel',form).click(function(){show()}); $('#edi',o).click(function(){ $('#display,#edi').hide(); $('input,textarea','form').attr('disabled',0); $('textarea',o)[0].value = disp.text(); $(form).show(); $('textarea',o).focus(); return false; }) } Douban.init_show_video = function(o){ $(o).css('position', 'relative').attr('target', ''); $('.vthumbwrap', o).append('<div class="video_overlay"></div>'); var f = $('img', o).attr('name'); $(o).click(function (e) { e.preventDefault(); var bnClose = $('<a href="#">缩进</a>'); bnClose.click(function (e) { e.preventDefault(); $(o).show(); $(this).prev().remove(); $(this).remove(); }) $(o).after(bnClose).after('<em>' + f + '</em>'); $(o).hide(); }) } Douban.init_morerec = function(o){ $(o).click(function(){ var n = $(o).parent().next(); if(n.is(':hidden')){ n.show()} else {n.next().show()} $(o).remove(); }) } Douban.init_search_result = function(o){ $('#sinput').suggest('/j/subject_suggest',{resultsClass : 'rc_results', onSelect:function(){ $(o).parent().submit(); }}); $(o).parent().submit(function(){ var txt = $('#sinput')[0]; return txt && txt.value != txt.title }) Douban.init_search_text(o); } Douban.init_prompt_link = function(o){ $(o).click(function(){ var val = prompt(o.title || '请输入'); if(val){ location.href = o.href + (o.href.indexOf('?') == -1? '?':'&') + o.name + '=' + encodeURIComponent(val); } return false; }) } Douban.init_discard_notify = function(o){ $(o).click(function () { var url = '/j/notification/discard'; var n_id = o.name; if (confirm("不再提醒该内容的新回复?")) { $.post_withck(url, {'id': n_id}, function(ret){ var r = eval("("+ret+")"); if(r.r === 'Y') { $('#n-' + n_id).remove(); } }); } return false; }); } $.viewport_size = function(){ var size = [0, 0]; if (typeof window.innerWidth != 'undefined'){ size = [window.innerWidth, window.innerHeight]; }else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0){ size = [document.documentElement.clientWidth, document.documentElement.clientHeight]; }else{ size = [document.body.clientWidth, document.body.clientHeight]; } return size; } //转移==> core/post_withck.js $.ajax_withck = function(options){ if(options.type=="POST") options.data=$.extend(options.data||{},{ck:get_cookie('ck')}); return $.ajax(options) } //转移==> core/post_withck.js $.postJSON_withck = function(url, data, callback){ $.post_withck(url, data, callback, "json"); } //转移==> core/post_withck.js $.post_withck = function( url, data, callback, type, traditional) { if ($.isFunction(data)) { type = callback; callback = data; data = {}; } return $.ajax({ type: "POST", traditional: typeof traditional == 'undefined' ? true : traditional, url: url, data: $.extend(data,{ck:get_cookie('ck')}), success: callback, dataType: type || 'text' }); }; //转移==> core/tmpl.js (function(){ var cache = {}; $.tmpl = function(str, data){ var fn = cache[str] = cache[str] || new Function("obj", "var p=[];with(obj){p.push('" + str.replace(/[\r\t\n]/g, " ") .replace(/'(?=[^%]*%})/g,"\t") .split("'").join("\\'") .split("\t").join("'") .replace(/{%=(.+?)%}/g, "',$1,'") .split("{%").join("');") .split("%}").join("p.push('") + "');}return p.join('');"); return fn(data); } })(); String.prototype.escapeHTML = function () { return this.replace(/&/g,'&amp;') .replace(/>/g,'&gt;') .replace(/</g,'&lt;') .replace(/"/g,'&quot;'); } jQuery.fn.extend({ pos:function() { var o = this[0]; if(o.offsetParent) { for(var posX=0, posY=0; o.offsetParent; o=o.offsetParent){ posX += o.offsetLeft; posY += o.offsetTop; } return {x:posX, y:posY}; } else return {x:o.x, y:o.y}; }, chop: function(callback, inv ) { var ret = [], nret = []; for ( var i = 0, length = this.length; i < length; i++ ) if ( !inv != !callback( this[i], i )){ ret.push( this[i] ); } else { nret.push( this[i] ); } return [ret, nret]; }, sum: function(name, sp){ var len = this.length, s = zero = sp ? '' : 0; while(len) s += this[--len][name] + (len && sp || zero); return s }, set_len_limit : function(limit){ var s = this.find(':submit:first'); var oldv = s.attr('value'); var check = function(){ if(this.value && this.value.length > limit){ s.attr('disabled',1).attr('value','字数不能超过'+limit+'字'); } else { s.attr('disabled',0).attr('value', oldv); } } $('textarea', this).focus(check).blur(check).keydown(check).keyup(check); }, display_limit : function(limit, n){ var self = this, oldv, f = function(e){ var v = self.val(); if (v == oldv) return; if (v.length>=limit){ self.val(v.substring(0, limit)); } n.text(limit - self.val().length); oldv = self.val(); }; this.keyup(f); f(); }, set_caret: function(){ if(!$.browser.msie) return; var initSetCaret = function(){this.p = document.selection.createRange().duplicate()}; this.click(initSetCaret).select(initSetCaret).keyup(initSetCaret); }, insert_caret:function(t){ var o = this[0]; if(document.all && o.createTextRange && o.p){ var p=o.p; p.text = p.text.charAt(p.text.length-1) == '' ? t+'' : t; } else if(o.setSelectionRange){ var s=o.selectionStart; var e=o.selectionEnd; var t1=o.value.substring(0,s); var t2=o.value.substring(e); o.value=t1+t+t2; o.focus(); var len=t.length; o.setSelectionRange(s+len,s+len); o.blur(); } else { o.value+=t; } }, get_sel:function(){ var o = this[0]; return document.all && o.createTextRange && o.p ? o.p.text : o.setSelectionRange ? o.value.substring(o.selectionStart,o.selectionEnd) : ''; }, blur_hide:function(){ var s=this,h=function(){return false}; s.mousedown(h) $(document.body).mousedown(function(){ s.hide().unbind('mousedown',h) $(document.body).unbind('mousedown',arguments.callee); }) return this; }, yellow_fade:function() { var m = 0,setp=1,self=this; function _yellow_fade(){ self.css({backgroundColor:"rgb(100%,100%,"+m+"%)"}) m += setp;setp+=.5; if(m <= 100){ setTimeout(_yellow_fade,35) }else{ self.css({backgroundColor:""}) } }; _yellow_fade(); return this; }, hover_fold:function(type){ var i = {folder:[1,3], unfolder:[0,2]}, s = function(o,n){ return function(){$('img',o).attr("src","/pics/arrow"+n+".gif");} } return this.hover(s(this,i[type][0]),s(this,i[type][1])); }, multiselect:function(opt){ var nfunc = function(){return true}, onselect = opt.onselect || nfunc, onremove = opt.onremove || nfunc, onchange = opt.onchange || nfunc, sel = opt.selclass || 'sel', values = opt.values || []; return this.click(function(){ var id = /id(\d*)/.exec(this.className)[1], i = $.inArray(id, values); if(i != -1){ if (!onremove(this)) return; values.splice(i,1); $(this).removeClass(sel); }else{ if (!onselect(this)) return; values.push(id); $(this).addClass(sel); } onchange(values); return false; }) }, initDataInput: function () { var self = $(this); if (!self.val() || self.val() === self.attr('title')) { self.addClass('color-lightgray'); self.val(self.attr('title')); } self.focus(function () { self.removeClass('color-lightgray'); if (self.val() === self.attr('title')) { self.val(''); } }).blur(function () { if (!self.val()) { self.addClass('color-lightgray'); self.val(self.attr('title')); } }); }, setItemList: function (options) { var o = {}, targetInfo = '', TEMPL_LOADER = '<img class="gray-loader" src="/pics/spinner.gif" />', IMG_SPINNER = '/pics/spinner.gif', CSS_INPUT_CREATE = '.input-create', customObjMap = { keyup: function (e) { var newItemName = e.target.value.replace(/ /g,''); // enter key if (e.keyCode === 13) { options.create.callback(o, targetInfo, newItemName, options.limit); } } }, _body = document.body, _preLoader = new Image(), _defaults = { create: { title: '新分组', tips: '创建新分组' } }, options = $.extend(_defaults, options), TEMPL_LINK_CREATE = '<span class="create-new">' + options.create.title+ '</span>', TEMPL_INPUT_CREATE = '<input class="input-create" type="text" value="" title="' + options.create.tips + '" maxlength="' + options.create.maxLen + '" />'; _preLoader.src = IMG_SPINNER; // bind show group list event $(this).click(function (e) { e.stopPropagation(); o = this; sglist.hide(); targetInfo = $.isFunction(options.target) ? options.target(o) : options.target; sgarrow.removeClass(CSS_ARROW_SELECT); $(o).addClass(CSS_ARROW_SELECT); $(CSS_SET_GROUP_LIST, this).show(); $(CSS_INPUT_CREATE).focus(); if ($.browser.msie && $.browser.version !== '8.0') { sgarrow.css('z-index', ''); $(this).css('z-index', 10); } }); // bind change group event $(CSS_SET_GROUP_LIST).delegate("li:not('.last')", 'click', function (e) { e.preventDefault(); var target = e.target, self = this, isCb = target.type === 'checkbox' ? true : false, cb = $(this).children('input'), tagId = $(this).children('input').val(), postPara = (isCb && cb.attr('checked') || !isCb && !cb.attr('checked')) ? 'addtotag' : 'removefromtag'; if (!$(CSS_LOADER, this).length) { cb.hide().after(TEMPL_LOADER); } options.callback(self, postPara, isCb, targetInfo, tagId); }); $(_body).click(function (e) { $(CSS_SET_GROUP_LIST, this).hide(); $(o).removeClass(CSS_ARROW_SELECT); if (newGroupNum && newGroupNum < options.limit) { $(CSS_INPUT_CREATE).replaceWith(TEMPL_LINK_CREATE); } }); // for contacts group form $(CSS_SET_GROUP_LIST).delegate('.create-new', 'click', function () { $(this).replaceWith(TEMPL_INPUT_CREATE); $(CSS_INPUT_CREATE).focus(); }); // multiple events delegte support $(CSS_SET_GROUP_LIST).delegate(CSS_INPUT_CREATE, 'keyup', function (e) { if ($.isFunction(customObjMap[e.type])) { customObjMap[e.type].call(this, e); } }); } }); var check_form = function(form){ var _re = true; $(':input',form).each(function(){ if((/notnull/.test(this.className) && this.value == '') || (/most/.test(this.className) && this.value && this.value.length>/most(\d*)/.exec(this.className)[1])) { $(this).next().show(); _re = false; }else{ if(/attn/.test($(this).next().attr('className'))) $(this).next().hide(); } }) return _re; } var paras = function(s){ var o = {}; if(s.indexOf('?') == -1) return {}; var vs = s.split('?')[1].split('&'); for(var i=0;i<vs.length;i++){ if(vs[i].indexOf('=') != -1){ var k = vs[i].split('='); o[k[0]+''] = k[1] + ''; } } return o; } function delete_reply_notify(id){ if(!delete_reply_notify.id){ delete_reply_notify.id=id; show_dialog($("#confirm_delete").html(), 280); $('#overlay').css('z-index',100); //workaround for ff2 bug $('#dialog .submit').eq(0).focus(); //auto focus on button[0] } return false; }; function close_delete(is_delete){ if(is_delete){ var id=delete_reply_notify.id; $.get("/j/accounts/remove_notify?id="+id) $("#reply_notify_"+id).fadeOut(); } delete_reply_notify.id=null; close_dialog() } function moreurl(self, dict){ var more = ['ref='+encodeURIComponent(location.pathname)]; for (var i in dict) more.push(i + '=' + dict[i]); set_cookie({report:more.join('&')}, 0.0001) } function tip_win(e){ $(e).next(".blocktip").show().blur_hide(); } tip_win.hide=function(e){ $(e).parents(".blocktip").hide() } function js_parser(htm){ var tag="script>",begin="<"+tag,end="</"+tag,pos=pos_pre=0,result=script=""; while( (pos=htm.indexOf(begin,pos))+1 ){ result+=htm.substring(pos_pre,pos); pos+=8; pos_pre=htm.indexOf(end,pos); if(pos_pre<0){ break; } script+=htm.substring(pos,pos_pre)+";"; pos_pre+=9; } result+=htm.substring(pos_pre,htm.length); return { htm:result, js:function(){eval(script)} }; } function center(elem){ return { left:(document.documentElement.offsetWidth-elem.offsetWidth)/2+'px', top:(document.documentElement.clientHeight-elem.offsetHeight)*.45+'px' } } function pop_win (htm, hide_close) { if (!window.__pop_win) { var pop_win_bg = document.createElement('div'); pop_win_bg.className = 'pop_win_bg'; document.body.appendChild(pop_win_bg); var pop_win_body = document.createElement('div'); pop_win_body.className = 'pop_win'; document.body.appendChild(pop_win_body); __pop_win = { bg: pop_win_bg, body: pop_win_body, body_j: $(pop_win_body), bg_j: $(pop_win_bg) }; } var b = __pop_win.body, body_j = __pop_win.body_j, dom = js_parser(htm); if (hide_close !== true) { dom.htm = '<a onclick="pop_win.close()" href="javascript:;" class="pop_win_close">X</a>' + dom.htm; } b.innerHTML = dom.htm; var cr = { left:(document.documentElement.offsetWidth-b.offsetWidth)/2+'px', top:(document.documentElement.clientHeight-b.offsetHeight)*.45+'px' }; if(document.documentElement.clientHeight<b.offsetHeight){ cr.top = '0'; cr.height = document.documentElement.clientHeight - 40 + 'px'; cr.overflow = 'auto'; } body_j.css({ display: 'block' }).css(cr).css({ visibility: 'visible', zIndex: 9999}); dom.js(); pop_win.fit(); if(!window.XMLHttpRequest){ __pop_win.bg.style.top = ''; } } pop_win.fit = function () { if (window.__pop_win) { var b=__pop_win.body; __pop_win.bg_j.css({ height: b.offsetHeight + 16 + 'px', width: b.offsetWidth + 16 + 'px', left: b.offsetLeft - 8 + 'px', top: b.offsetTop - 8 + 'px', zIndex: 8888 }).show(); } } pop_win.close=function(){ $(__pop_win.bg).remove() $(__pop_win.body).remove(); window.__pop_win = null; } pop_win.load=function(url,cache){ pop_win("<div style=\"padding:20px 60px;\">加载中, 请稍等...</div>") $.ajax({url: url, success: pop_win, cache: cache||false, dataType: 'html'}); return false } function event_init_tab() { $('#tongcheng_tab').click(function() { if($('#tongcheng_tab_block').is(':hidden')) { show_tongcheng_tab(); $(document.body).click(function() { hide_tongcheng_tab(); $(document.body).unbind("click",arguments.callee); }); } else { hide_tongcheng_tab(); } return false }) } function show_tongcheng_tab() { $('#tongcheng_tab_block').show(); $('#tongcheng_tab span').addClass('up') } function hide_tongcheng_tab() { $('#tongcheng_tab_block').hide(); $('#tongcheng_tab span').removeClass('up') } __load_bk=$.fn.load; $.fn.load_withck = function( url, data, callback ) { if ($.isFunction(data)) { callback = data; data = {}; } return __load_bk.call(this,url,$.extend(data,{ck:get_cookie('ck')}),callback); } function exp_dialog(e){ var d=document.documentElement; return 0 - parseInt(e.offsetHeight / 2) + (TBWindowMargin = d && d.scrollTop || document.body.scrollTop) + 'px'; } function exp_overlay(e){ return 0 - parseInt(e.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px' } function exp_sort_h2_over(){this.style.backgroundColor="#eeffee"} function exp_sort_h2_out(){this.style.backgroundColor=""} function getslider(nbtn,pbtn,mover,url,pp_id,cat_id){ var now = 5, max_num = 100, fetch_num = 5, off_set=0, slide = function(n){ if (now+n>max_num){ now = max_num; nbtn[0].className = 'dis'; }else if (now+n<5){ now = 5; pbtn[0].className = 'dis'; }else{ now += n; } pbtn[0].className = now == 5 ?'dis':''; nbtn[0].className = now == max_num ?'dis':''; off_set = (5-now) * 105; mover.animate({ "marginLeft":off_set+"px" }, {duration: 60*Math.abs(n)}); } return function(n){ if(now + n > fetch_num && fetch_num < max_num){ $.postJSON_withck(url, {"start":fetch_num,"pp":pp_id,"cat_id":cat_id}, function(ret){ if(ret.err){ max_num = ret.total; fetch_num += ret.num; n = ret.num; mover.html(mover.html()+ret.more_html); slide(n); } }); }else{ slide(n); } } } Douban.init_song_interest = function(o) { var el = $(o), sid = el.attr("id").split("-")[1], UNLIKE = 'n', LIKE = 'y'; el.click(function() { var url = "/j/song/" + sid + "/interest", alreadyInterested = el.hasClass('interest'); $.post_withck(url, {'action':(alreadyInterested? UNLIKE : LIKE)},function(ret) { el.toggleClass('interest'); if(alreadyInterested) { el.children().attr({src:"/pics/gray-heart.gif",title:"我喜欢", alt:"我喜欢"}); } else { el.children().attr({src: "/pics/red-heart.gif",title:"取消'我喜欢'", alt:"取消'我喜欢'"}); } }); return false; }); } Douban.init_vote_comment = function(o){ if (window.location.hostname === 'movie.douban.com' || /^movie\..*\.douban\.com/.test(window.location.hostname)) { var v = $(o).prev().prev(),id = $(o).prev().val(); $(o).click(function() { $.postJSON_withck('/j/comment/vote',{id:id},function(r){ if(r.count){v.text(r.count)}else{ alert('这条短评你已经投过票了'); } }) }) } } Douban.init_rev_text = function(o){ if (window.location.hostname === 'movie.douban.com' || /^movie\..*\.douban\.com/.test(window.location.hostname)) { var form = $(o).parents('form'), btn = $('input[name=rev_submit]'); btn.click(function(){ if ($(o).val().length<50){ var sid = /subject\/(\d*)/.exec(location.href)[1]; $.getJSON('/j/comment/check',{sid:sid},function(r){ if (r.has) { if(confirm('少于50字的评论将被自动转为简短评论。并替换之前发表的简短评论内容。是否继续?')) { form.submit(); } } else { form.submit(); } }) return false; } return true; }); } } Douban.init_popup = function(o){ $(o).click(function(){ var size = / (\d+)x(\d+)$/.exec(o.className); if(!window.open(o.href,'popup','height='+size[2]+',width='+size[1]+ ',toolbar=no,menubar=no,scrollbars=no,location=no,status=no')){ location.href=o.href; } return false; }) } Douban.init_show_request_join_form = function(o){ $(o).click(function(){ group_id = window.location.href.split('/')[4]; return pop_win.load('/j/group/'+group_id+'/request_join_form') }); } Douban.init_show_comment_form = function(o){ $(o).click(function(){ $(o).hide(); $('#comment_form').show(); }); } Douban.init_add2cart = function(o){ $(o).click(function(){ $.post_withck("/cart", {add: o.name}, function(){ $(o).next('.pl').hide(); $(o).hide().nextAll('.hidden').show().yellow_fade(); }) }) } Douban.init_switch_tab = function(o){ $(o).click(function(){ $('.a_switch_tab').removeClass('current') $(o).addClass('current'); $("#tag-loader").attr("class", "loading").text("") $.getJSON('/j/recommended/switch', {'tag': o.name}, function(ret){ $(".tag-fav-cloud").replaceWith(ret.tags); load_event_monitor('.tag-fav-cloud'); $(".rec-list").replaceWith(ret.subjects); load_event_monitor('.rec-list'); }); return false; }); } Douban.init_switch_tab_movie = function(o){ $(o).click(function(){ $('.a_switch_tab').removeClass('current'); url = $('#hide_full_path').attr("name") + "/switch" $('#tag_all').removeClass("current"); $('.tag-fav-cloud a').removeClass('current') $(o).addClass('current'); $("#tag-loader").attr("class", "loading").text("") $.getJSON(url, {'tag': o.name}, function(ret){ //$(".tag-fav-cloud").replaceWith(ret.tags); //load_event_monitor('.tag-fav-cloud'); $(".rec-list").replaceWith(ret.subjects); load_event_monitor('.rec-list'); $("#tag-loader").attr("class", "not-loading") }); return false; }); } Douban.init_get_more = function(o){ $(o).click(function(){ page = parseInt($(o).attr("attr")) + 10; url = $('#hide_full_path').attr("name") + "/switch"; start = parseInt($(o).attr("start")) + 10 $('.a_switch_tab').removeClass('current') $(o).addClass('current'); tag = o.name.replace('[','','g').replace(']','','g').replace('\'','','g') $("#tag-loader").attr("class", "loading").text("") $.getJSON(url, {'tag': tag, 'perpage': page, 'start': start}, function(ret){ //$(".tag-fav-cloud").replaceWith(ret.tags); $(o).attr("attr", page); //load_event_monitor('.tag-fav-cloud'); $(".rec-list").replaceWith(ret.subjects); load_event_monitor('.rec-list'); $("#tag-loader").attr("class", "not-loading") }); return false; });} Douban.init_nointerest_subject = function(o){ $(o).click(function(){ tag = $(".tag-fav-cloud > .current").attr("name"); $.post_withck('/j/recommended/nointerest_subject', {'sid': o.name}, function(ret){ if (ret == 'Y'){ $("#tag-loader").attr("class", "loading").text() $.getJSON('/j/recommended/switch', {'tag': tag}, function(ret){ $(".tag-fav-cloud").replaceWith(ret.tags); load_event_monitor('.tag-fav-cloud'); $(".rec-list").replaceWith(ret.subjects); load_event_monitor('.rec-list'); }); } }); return false; }); } Douban.init_nointerest_entry = function(o){ $(o).click(function(){ var id = o.href.match(/nointerest=(\d+)/)[1]; $.post_withck('/j/recommended/nointerest_subject', {'sid': id}, function(ret){ if (ret == 'Y'){ window.location.reload(); } }); return false; }); } Douban.init_nointerest_subject_tab = function(o){ $(o).click(function(){ tag = $(".tag-fav-cloud > .current").attr("name"); $.post_withck('/j/recommended/nointerest_subject', {'sid': o.name, 'tag': $(o).attr("tag")}, function(ret){ if (ret == 'Y'){ $("#tag-loader").attr("class", "loading").text() $.getJSON('/j/recommended/switch', {'tag': $(o).attr("tag")}, function(ret){ $(".tag-fav-cloud").replaceWith(ret.tags); load_event_monitor('.tag-fav-cloud'); $(".rec-list").replaceWith(ret.subjects); load_event_monitor('.rec-list'); }); } }); return false; }) } Douban.init_nointerest_subject_movie = function(o){ $(o).click(function(){ url = $('#hide_full_path').attr("name") + "/nointerest_subject"; self_item = $(this).parents('.item'); var is_blacklist = true; //abtest = parseInt($(o).attr("abid"))%2; //if (abtest==1){ // is_blacklist = true; //}else{ // is_blacklist = confirm("你确定不再关注这部电影?"); //} _self = this; if (is_blacklist){ tag = $(".tag-fav-cloud > .current").attr("name"); total = $('.a_get_more').attr('attr'); $.post_withck(url , {'sid': o.name}, function (ret) { if (ret == 'Y') { self_item.fadeOut(function () { $.getJSON($('#hide_full_path').attr("name") + "/switch", {'tag': tag, 'perpage': total}, function (ret) { $(".rec-list").replaceWith(ret.subjects); load_event_monitor('.rec-list'); $("#tag-loader").attr("class", "not-loading") }); }); } }); } return false; }); } Douban.init_nointerest_subject_top = function(o){ $(o).click(function () { url = $('#hide_full_path').attr("name") + "/nointerest_subject_top"; var is_blacklist = true; //abtest = parseInt($(o).attr("abid"))%2; //if (abtest==1){ // is_blacklist = true; //}else{ // is_blacklist = confirm("你确定不再关注这部电影?"); //} _self = this; if (is_blacklist) { $(_self).parents('li').fadeOut('slow', function () { $(this).remove(); }); last_num -= 1; cover_num -= 1; if (cover_num === 0) { $('#movie-rec').remove(); } if (last_num === 5) { $('.btn-next > a').addClass('dis'); } $('.detail-tip').remove(); $.post_withck(url, {'sid': o.name}, function(ret){ if (ret === 'Y') { /* delete success */ } }); } return false; }); } Douban.init_nointerest_doulist = function(o){ $(o).click(function(){ $("#doulist-loader").attr("class", "loading") $.post_withck('/j/recommended/nointerest_doulist', {'dl_del': o.name}, function(ret){ $(".simple-dashed-list").replaceWith(ret); load_event_monitor('.simple-dashed-list'); $("#doulist-loader").attr("class", "not-loading") }); return false; }); } Douban.init_nointerest_doulist_movie = function(o){ $(o).click(function(){ url = $('#hide_full_path').attr("name") + "/nointerest_doulist"; $("#doulist-loader").attr("class", "loading") $.post_withck(url, {'dl_del': o.name}, function(ret){ $(".simple-dashed-list").replaceWith(ret); load_event_monitor('.simple-dashed-list'); $("#doulist-loader").attr("class", "not-loading") }); return false; }); } Douban.init_post_link = function(o) { $(o).click(function(e){ var el = $(this), href = el.attr("href"), text = el.attr("title") || el.text() + "?", is_direct = el.attr("rel") == "direct", target = el.attr("target"), post_url = href.split("?")[0], post_args = {}, args = href.split("?")[1] || []; if (typeof args === 'string') { args = args.split("&"); } e.preventDefault(); // prevent continuous click if (el.hasClass('processing')) { return; }; if (is_direct) { var args_html = []; args.push("ck=" + get_cookie('ck')); for (i=0, pair; i<args.length; i++) { pair = args[i].split("="); args_html.push('<input type="hidden" name="' + pair[0] + '" value="' + pair[1] + '">'); } $('<form action="' + post_url + '" method="POST" target="' + (target || "_self") + '" sytle="display:none">' + args_html.join("") + '</form>').appendTo("body").submit(); } else { // parse query string for (i=0; i<args.length; i++) { var pair = args[i].split("="); post_args[pair[0]] = pair[1]; } // first confirm the operation if (confirm(text)) { el.addClass('processing'); $.post_withck(post_url, post_args, function(e){ el.removeClass('processing'); location.reload(true); }); } } }); }; try { document.execCommand("BackgroundImageCache", false, true); } catch(err) {} Douban.init_donate = function(){ var templ_container = '<div class="blocktip dou-tip">{BODY}</div>', templ_form = '<form action="" method="post"><div class="frm-item">你将向作者赠送<b>1</b>颗小豆</div><div class="frm-item"><label for="dou-inp-msg">顺带捎个话...</label><input id="dou-inp-msg" type="text" name="note"></div><div class="frm-submit"><span class="bn-flat"><input type="submit" value="送出"></span><a href="#" class="tip-bn-cancel">取消</a></div></form>', templ_tip = '<p>"感谢"将向作者赠送<b>1</b>颗小豆,你还没有小豆。<br><a href="http://www.douban.com/help/account#t4-q1">怎样获取小豆?</a></p><span class="bn-flat"><input type="button" class="tip-bn-cancel" value="知道了"></span>', templ_error = '<span class="donated-fail">{MSG}</span>', templ_success = '<span class="donated-success">{MSG}</span>', templ_processing = '<p>处理中,请稍候...</p>', css_closetip = '.tip-bn-cancel', css_process = 'processing', displayError = function(node, msg) { node.replaceWith(templ_error.replace('{MSG}', msg)); hideOverlay(); }, showOverlay = function(cont, node) { hideOverlay(); var overlay = $(templ_container.replace('{BODY}', cont)).appendTo('body'), pos = node.offset(), overlay_pos = [], win = $(window), winH = win.scrollTop() + win.height(); if ((winH - pos.top) < (overlay.height() + 20)) { overlay_pos = [pos.left, pos.top - overlay.height() - node.height()]; } else { overlay_pos = [pos.left, pos.top + node.height()]; } overlay.css({ position: 'absolute', left: overlay_pos[0] + 'px', top: overlay_pos[1] + 'px' }); return overlay.show(); }, hideOverlay = function() { $('.dou-tip').remove(); }, updateOverlay = function(overlay, node) { var pos = node.offset(), overlay_pos = [], win = $(window), winH = win.scrollTop() + win.height(); if ((winH - pos.top) < (overlay.height() + 20)) { overlay_pos = [pos.left, pos.top - overlay.height() - node.height()]; } else { overlay_pos = [pos.left, pos.top + node.height()]; } overlay.css({ left: overlay_pos[0] + 'px', top: overlay_pos[1] + 'px' }); }, handleDonateSubmit = function(e) { var handler = function(ret) { if (ret.error) { this.elm.replaceWith(templ_error.replace('{MSG}', ret.error)); } else { this.elm.replaceWith(templ_success.replace('{MSG}', ret.msg)); } hideOverlay(); }; e.preventDefault(); this.args.is_first = 0; this.args.note = $.trim(e.target.elements['note'].value); this.relateTip.html(templ_processing); updateOverlay(this.relateTip, this.elm); $.dataPoster(this.url, this.args, $.proxy(handler, this), 'post', 'json'); }, handleCloseTip = function(e) { e.preventDefault(); hideOverlay(); if (this.elm) { this.elm.removeClass(css_process); } }, handler = function(ret){ var elm = this.elm, pos, bn, tip; if (ret.error) { displayError(elm, ret.error); return; } if (ret.balance) { tip = showOverlay(templ_form, elm); this.relateTip = tip; tip.find('form').bind('submit', $.proxy(handleDonateSubmit, this)); tip.find(css_closetip).bind('click', $.proxy(handleCloseTip, this)); tip.find('input[type=text]').bind({ 'focusin': function(e){ $(this).prev().hide(); }, 'focusout': function(e){ if (this.value === '') { $(this).prev().show(); } } }); } else { // 余额不足 tip = showOverlay(templ_tip, elm); tip.css('width', 260 + 'px'); this.relateTip = tip; tip.find(css_closetip).bind('click', $.proxy(handleCloseTip, this)); } $(window).bind('resize', function() { updateOverlay(tip, elm); }); }; $('body').delegate('.btn-donate', 'click', function(e){ var elm = $(e.currentTarget), url = elm.attr('href').split('?'), param, p, i, len, o = { elm: elm }, args = {is_first: 1}; e.preventDefault(); if (elm.hasClass(css_process)) { return; } elm.addClass(css_process); if (url[1]) { param = url[1].split('&'); for (i = 0, len = param.length; i<len; i++) { p = param[i].split('='); args[p[0]] = p[1] || ''; } } o.args = args; o.url = url[0]; $.dataPoster(url[0], args, $.proxy(handler, o), 'post', 'json'); }); }; $(function() { load_event_monitor(document); // request_log_ad_displays(); });
12ik
trunk/public/js/douban_.js
JavaScript
oos
85,972
(function($) { $.fn.editable = function(target, options) { if ('disable' == target) { $(this).data('disabled.editable', true); return; } if ('enable' == target) { $(this).data('disabled.editable', false); return; } if ('destroy' == target) { $(this) .unbind($(this).data('event.editable')) .removeData('disabled.editable') .removeData('event.editable'); return; } var settings = $.extend({}, $.fn.editable.defaults, {target:target}, options); /* setup some functions */ var plugin = $.editable.types[settings.type].plugin || function() { }; var submit = $.editable.types[settings.type].submit || function() { }; var buttons = $.editable.types[settings.type].buttons || $.editable.types['defaults'].buttons; var content = $.editable.types[settings.type].content || $.editable.types['defaults'].content; var element = $.editable.types[settings.type].element || $.editable.types['defaults'].element; var reset = $.editable.types[settings.type].reset || $.editable.types['defaults'].reset; var callback = settings.callback || function() { }; var onedit = settings.onedit || function() { }; var onsubmit = settings.onsubmit || function() { }; var onreset = settings.onreset || function() { }; var onerror = settings.onerror || reset; /* show tooltip */ if (settings.tooltip) { $(this).attr('title', settings.tooltip); } settings.autowidth = 'auto' == settings.width; settings.autoheight = 'auto' == settings.height; return this.each(function() { /* save this to self because this changes when scope changes */ var self = this; /* inlined block elements lose their width and height after first edit */ /* save them for later use as workaround */ var savedwidth = $(self).width(); var savedheight = $(self).height(); /* save so it can be later used by $.editable('destroy') */ $(this).data('event.editable', settings.event); /* if element is empty add something clickable (if requested) */ if (!$.trim($(this).html())) { $(this).html(settings.placeholder); } $(this).bind(settings.event, function(e) { /* abort if disabled for this element */ if (true === $(this).data('disabled.editable')) { return; } /* prevent throwing an exeption if edit field is clicked again */ if (self.editing) { return; } /* abort if onedit hook returns false */ if (false === onedit.apply(this, [settings, self])) { return; } /* prevent default action and bubbling */ e.preventDefault(); e.stopPropagation(); /* remove tooltip */ if (settings.tooltip) { $(self).removeAttr('title'); } /* figure out how wide and tall we are, saved width and height */ /* are workaround for http://dev.jquery.com/ticket/2190 */ if (0 == $(self).width()) { //$(self).css('visibility', 'hidden'); settings.width = savedwidth; settings.height = savedheight; } else { if (settings.width != 'none') { settings.width = settings.autowidth ? $(self).width() : settings.width; } if (settings.height != 'none') { settings.height = settings.autoheight ? $(self).height() : settings.height; } } //$(this).css('visibility', ''); /* remove placeholder text, replace is here because of IE */ if ($(this).html().toLowerCase().replace(/(;|")/g, '') == settings.placeholder.toLowerCase().replace(/(;|")/g, '')) { $(this).html(''); } self.editing = true; self.revert = $(self).html(); $(self).html(''); /* create the form object */ var form = $('<form />'); /* apply css or style or both */ if (settings.cssclass) { if ('inherit' == settings.cssclass) { form.attr('class', $(self).attr('class')); } else { form.attr('class', settings.cssclass); } } if (settings.style) { if ('inherit' == settings.style) { form.attr('style', $(self).attr('style')); /* IE needs the second line or display wont be inherited */ form.css('display', $(self).css('display')); } else { form.attr('style', settings.style); } } /* add main input element to form and store it in input */ var input = element.apply(form, [settings, self]); /* set input content via POST, GET, given data or existing value */ var input_content; if (settings.loadurl) { var t = setTimeout(function() { input.disabled = true; content.apply(form, [settings.loadtext, settings, self]); }, 100); var loaddata = {}; loaddata[settings.id] = self.id; if ($.isFunction(settings.loaddata)) { $.extend(loaddata, settings.loaddata.apply(self, [self.revert, settings])); } else { $.extend(loaddata, settings.loaddata); } $.ajax({ type : settings.loadtype, url : settings.loadurl, data : loaddata, async : false, success: function(result) { window.clearTimeout(t); input_content = result; input.disabled = false; } }); } else if (settings.data) { input_content = settings.data; if ($.isFunction(settings.data)) { input_content = settings.data.apply(self, [self.revert, settings]); } } else { input_content = self.revert; } content.apply(form, [input_content, settings, self]); input.attr('name', settings.name); /* add buttons to the form */ buttons.apply(form, [settings, self]); /* add created form to self */ $(self).append(form); /* attach 3rd party plugin if requested */ plugin.apply(form, [settings, self]); /* focus to first visible form element */ $(':input:visible:enabled:first', form).focus(); /* highlight input contents when requested */ if (settings.select) { input.select(); } /* discard changes if pressing esc */ input.keydown(function(e) { if (e.keyCode == 27) { e.preventDefault(); //self.reset(); reset.apply(form, [settings, self]); } }); /* discard, submit or nothing with changes when clicking outside */ /* do nothing is usable when navigating with tab */ var t; if ('cancel' == settings.onblur) { input.blur(function(e) { /* prevent canceling if submit was clicked */ t = setTimeout(function() { reset.apply(form, [settings, self]); }, 500); }); } else if ('submit' == settings.onblur) { input.blur(function(e) { /* prevent double submit if submit was clicked */ t = setTimeout(function() { form.submit(); }, 200); }); } else if ($.isFunction(settings.onblur)) { input.blur(function(e) { settings.onblur.apply(self, [input.val(), settings]); }); } else { input.blur(function(e) { /* TODO: maybe something here */ }); } form.submit(function(e) { if (t) { clearTimeout(t); } /* do no submit */ e.preventDefault(); /* call before submit hook. */ /* if it returns false abort submitting */ if (false !== onsubmit.apply(form, [settings, self])) { /* custom inputs call before submit hook. */ /* if it returns false abort submitting */ if (false !== submit.apply(form, [settings, self])) { /* check if given target is function */ if ($.isFunction(settings.target)) { var str = settings.target.apply(self, [input.val(), settings]); $(self).html(str); self.editing = false; callback.apply(self, [self.innerHTML, settings]); /* TODO: this is not dry */ if (!$.trim($(self).html())) { $(self).html(settings.placeholder); } } else { /* add edited content and id of edited element to POST */ var submitdata = {}; submitdata[settings.name] = input.val(); submitdata[settings.id] = self.id; /* add extra data to be POST:ed */ if ($.isFunction(settings.submitdata)) { $.extend(submitdata, settings.submitdata.apply(self, [self.revert, settings])); } else { $.extend(submitdata, settings.submitdata); } /* quick and dirty PUT support */ if ('PUT' == settings.method) { submitdata['_method'] = 'put'; } /* show the saving indicator */ $(self).html(settings.indicator); /* defaults for ajaxoptions */ var ajaxoptions = { type : 'POST', data : submitdata, dataType: 'html', url : settings.target, success : function(result, status) { if (ajaxoptions.dataType == 'html') { $(self).html(result); } self.editing = false; callback.apply(self, [result, settings]); if (!$.trim($(self).html())) { $(self).html(settings.placeholder); } }, error : function(xhr, status, error) { onerror.apply(form, [settings, self, xhr]); } }; /* override with what is given in settings.ajaxoptions */ $.extend(ajaxoptions, settings.ajaxoptions); $.ajax(ajaxoptions); } } } /* show tooltip again */ $(self).attr('title', settings.tooltip); return false; }); }); /* privileged methods */ this.reset = function(form) { /* prevent calling reset twice when blurring */ if (this.editing) { /* before reset hook, if it returns false abort reseting */ if (false !== onreset.apply(form, [settings, self])) { $(self).html(self.revert); self.editing = false; if (!$.trim($(self).html())) { $(self).html(settings.placeholder); } /* show tooltip again */ if (settings.tooltip) { $(self).attr('title', settings.tooltip); } } } }; }); }; $.editable = { types: { defaults: { element : function(settings, original) { var input = $('<input type="hidden"></input>'); $(this).append(input); return(input); }, content : function(string, settings, original) { $(':input:first', this).val(string); }, reset : function(settings, original) { original.reset(this); }, buttons : function(settings, original) { var form = this; if (settings.submit) { /* if given html string use that */ if (settings.submit.match(/>$/)) { var submit = $(settings.submit).click(function() { if (submit.attr("type") != "submit") { form.submit(); } }); /* otherwise use button with given string as text */ } else { var submit = $('<button type="submit" />'); submit.html(settings.submit); } $(this).append(submit); } if (settings.cancel) { /* if given html string use that */ if (settings.cancel.match(/>$/)) { var cancel = $(settings.cancel); /* otherwise use button with given string as text */ } else { var cancel = $('<button type="cancel" />'); cancel.html(settings.cancel); } $(this).append(cancel); $(cancel).click(function(event) { //original.reset(); if ($.isFunction($.editable.types[settings.type].reset)) { var reset = $.editable.types[settings.type].reset; } else { var reset = $.editable.types['defaults'].reset; } reset.apply(form, [settings, original]); return false; }); } } }, text: { element : function(settings, original) { var input = $('<input />'); if (settings.width != 'none') { input.width(settings.width); } if (settings.height != 'none') { input.height(settings.height); } /* https://bugzilla.mozilla.org/show_bug.cgi?id=236791 */ //input[0].setAttribute('autocomplete','off'); input.attr('autocomplete','off'); $(this).append(input); return(input); } }, textarea: { element : function(settings, original) { var textarea = $('<textarea />'); if (settings.rows) { textarea.attr('rows', settings.rows); } else if (settings.height != "none") { textarea.height(settings.height); } if (settings.cols) { textarea.attr('cols', settings.cols); } else if (settings.width != "none") { textarea.width(settings.width); } $(this).append(textarea); return(textarea); } }, select: { element : function(settings, original) { var select = $('<select />'); $(this).append(select); return(select); }, content : function(data, settings, original) { /* If it is string assume it is json. */ if (String == data.constructor) { eval ('var json = ' + data); } else { /* Otherwise assume it is a hash already. */ var json = data; } for (var key in json) { if (!json.hasOwnProperty(key)) { continue; } if ('selected' == key) { continue; } var option = $('<option />').val(key).append(json[key]); $('select', this).append(option); } /* Loop option again to set selected. IE needed this... */ $('select', this).children().each(function() { if ($(this).val() == json['selected'] || $(this).text() == $.trim(original.revert)) { $(this).attr('selected', 'selected'); } }); } } }, /* Add new input type */ addInputType: function(name, input) { $.editable.types[name] = input; } }; // publicly accessible defaults $.fn.editable.defaults = { name : 'value', id : 'id', type : 'text', width : 'auto', height : 'auto', event : 'click.editable', onblur : 'cancel', loadtype : 'GET', loadtext : 'Loading...', placeholder: 'Click to edit', loaddata : {}, submitdata : {}, ajaxoptions: {} }; })(jQuery);
12ik
trunk/public/js/jeditable/jeditable.js
JavaScript
oos
21,589
(function() { // namespace 'dui' var dui = window.dui || {}, // private methods and properties. _id = 'dui-dialog', _ids = [], _current_dlg = null, _isIE6 = ($.browser.msie && $.browser.version === '6.0') ? true: false, _cache = {}, //button callback. _button_callback[button id] = function. _button_callback = {}, _CSS_DLG = 'dui-dialog', _CSS_BTN_CLOSE = 'dui-dialog-close', _CSS_DIV_SHD = 'dui-dialog-shd', _CSS_DIV_CONTENT = 'dui-dialog-content', _CSS_IFRM = 'dui-dialog-iframe', _TXT_CONFIRM = '确定', _TXT_CANCEL = '取消', _TXT_TIP = '提示', _TXT_LOADING = '下载中,请稍候...', _templ = '<div id="{ID}" class="' + _CSS_DLG + ' {CLS}" style="{CSS_ISHIDE}">\ <span class="' + _CSS_DIV_SHD + '"></span>\ <div class="' + _CSS_DIV_CONTENT + '">\ {TITLE}\ <div class="bd">{BODY}</div>\ {BN_CLOSE}\ </div>\ </div>', _templ_btn_close = '<a href="#" class="' + _CSS_BTN_CLOSE + '">X</a>', _templ_title = '<div class="hd"><h3>{TITLE}</h3></div>', _templ_iframe = '<iframe class="' + _CSS_IFRM + '"></iframe>', _button_config = { 'confirm': { text: _TXT_CONFIRM, method: function(o) { o.close(); } }, 'cancel': { text: _TXT_CANCEL, method: function(o) { o.close(); } } }, _default_config = { url: '', nodeId: '', cls: '', content: '', title: _TXT_TIP, width: 0, height: 0, visible: false, iframe: false, maxWidth: 960, autoupdate: false, cache: true, buttons: [], callback: null, dataType: 'text', isStick: false, isHideClose: false, isHideTitle: false }, // mix config setting. _config = function(n, d) { var cfg = {}, i; for (i in d) { if (d.hasOwnProperty(i)) { cfg[i] = n[i] || d[i]; } } return cfg; }, _formCollection = function(frm) { var els = frm.elements, i = 0, el, data = [], getValue = { 'select-one': function(el) { return encodeURIComponent(el.name) + '=' + encodeURIComponent(el.options[el.selectedIndex].value); }, 'select-multiple': function(el) { var i = 0, opt, values = []; for (; opt = el.options[i++];) { if (opt.selected) { values.push(encodeURIComponent(el.name) + '=' + encodeURIComponent(opt.value)); } } return values.join('&'); }, 'radio': function(el) { if (el.checked) { return encodeURIComponent(el.name) + '=' + encodeURIComponent(el.value); } }, 'checkbox': function(el) { if (el.checked) { return encodeURIComponent(el.name) + '=' + encodeURIComponent(el.value); } } }; for (; el = els[i++];) { if (getValue[el.type]) { data.push(getValue[el.type](el)); } else { data.push(encodeURIComponent(el.name) + '=' + encodeURIComponent(el.value)); } } return data.join('&').replace(/\&{2,}/g, '&'); }, dialog = function(cfg) { var c = cfg || {}; this.config = _config(c, _default_config); this.init(); }; dialog.prototype = { init: function() { if (!this.config) { return; } this.render(); this.bind(); return this; }, render: function(bd) { var cfg = this.config, id = cfg.nodeId || _id + _ids.length; _ids.push(id); var bodyHtml = typeof cfg.content === 'object' ? $(cfg.content).html() : cfg.content; $('body').append( _templ.replace('{ID}', id).replace('{CSS_ISHIDE}', cfg.visible ? '': 'visibility:hidden;top:-999em;left:-999em;') .replace('{CLS}', cfg.cls) .replace('{TITLE}', _templ_title.replace('{TITLE}', cfg.title)) .replace('{BN_CLOSE}', _templ_btn_close).replace('{BODY}', bodyHtml || bd || '') ); this.nodeId = id; this.node = $('#' + id); this.title = $('.hd', this.node); this.body = $('.bd', this.node); this.btnClose = $('.' + _CSS_BTN_CLOSE, this.node); this.shadow = $('.' + _CSS_DIV_SHD, this.node); this.iframe = $('.' + _CSS_IFRM, this.node); this.set(cfg); return this; }, bind: function() { var o = this; $(window).bind({ resize: function() { if (_isIE6) { return; } o.updatePosition(); }, scroll: function() { if (!_isIE6) { return; } o.updatePosition(); } }); this.btnClose.click(function(e) { o.close(); e.preventDefault(); }); $('body').keypress(function(e) { if (e.keyCode === 27) { o.close(); } }); return this; }, updateSize: function() { var w = this.node.width(), h, screen_height = $(window).height(), cfg = this.config; $('.bd', this.node).css({ 'height': 'auto', 'overflow-x': 'visible', 'overflow-y': 'visible' }); h = this.node.height(); if (w > cfg.maxWidth) { w = cfg.maxWidth; this.node.css('width', w + 'px'); } if (h > screen_height) { $('.bd', this.node).css({ 'height': (screen_height - 150) + 'px', 'overflow-x': 'hidden', 'overflow-y': 'auto' }); } h = this.node.height(); this.shadow.width(w).height(h); this.iframe.width(w + 16).height(h + 16); return this; }, updatePosition: function() { if (this.config.isStick) return; var w = this.node.width(), h = this.node.height(), win = $(window), t = _isIE6 ? win.scrollTop() : 0; this.node.css({ left: Math.floor(win.width() / 2 - w / 2 - 8) + 'px', top: Math.floor(win.height() / 2 - h / 2 - 8) + t + 'px' }); return this; }, set: function(cfg) { var title, close, html_str, el, id = this.nodeId, _id = this.nodeId || _id, num = [], that = this, genId = function(str) { num.push(0); return id + '-' + str + '-' + num.length; }; if (!cfg) { return this; } // set width and height. if (cfg.width) { this.node.css('width', cfg.width + 'px'); this.config.width = cfg.width; } if (cfg.height) { this.node.css('height', cfg.height + 'px'); this.config.height = cfg.height; } // set buttons if ($.isArray(cfg.buttons) && cfg.buttons[0]) { el = $('.ft', this.node); html_str = []; $(cfg.buttons).each(function() { var bn = arguments[1], bnId = genId('bn'); if (typeof bn === 'string') bn = _button_config[bn]; if (!bn.text) return; if (bn.href) { html_str.push('<a class="' + (bn.cls || '') + '" id="' + bnId + '" href="' + bn.href + '">' + bn.text + '</a> '); } else { html_str.push('<span class="bn-flat ' + (bn.cls || '') + '"><input type="button" id="' + bnId + '" class="' + _id + '-bn" value="' + bn.text + '" /></span> '); } _button_callback[bnId] = bn.method; }); if (!el[0]) { el = this.body.parent().append('<div class="ft">' + html_str.join('') + '</div>'); } else { el.html(html_str.join('')); } this.footer = $('.ft', this.node); // bind event. $('.ft input, .ft a', this.node).click(function(e) { var func = this.id && _button_callback[this.id]; if (func) { var halt = func.call(this, that); } if (halt) { e.preventDefault(); if (typeof halt == 'string') alert(halt); } }); } else { this.footer = $('.ft', this.node); this.footer.html(''); } // set hidden close button if (typeof cfg.isHideClose !== 'undefined') { if (cfg.isHideClose) { this.btnClose.hide(); } else { this.btnClose.show(); } this.config.isHideClose = cfg.isHideClose; } // set hidden title if (typeof cfg.isHideTitle !== 'undefined') { if (cfg.isHideTitle) { this.title.hide(); } else { this.title.show(); } this.config.isHideTitle = cfg.isHideTitle; } // set title. if (cfg.title) { this.setTitle(cfg.title); this.config.title = cfg.title; } // set enable iframe if (typeof cfg.iframe !== 'undefined') { if (!cfg.iframe) { this.iframe.hide(); } else if (!this.iframe[0]) { this.node.prepend(_templ_iframe); this.iframe = $('.' + _CSS_IFRM, this.node); } else { this.iframe.show(); } this.config.iframe = cfg.iframe; } // set content. if (cfg.content) { this.body.html(typeof cfg.content === 'object' ? $(cfg.content).html() : cfg.content); this.config.content = cfg.content; } // fetch content by URL. if (cfg.url) { if (cfg.cache && _cache[cfg.url]) { if (cfg.dataType === 'text' || ! cfg.dataType) { this.setContent(_cache[cfg.url]); } if (cfg.callback) { cfg.callback(_cache[cfg.url], this); } } else if (cfg.dataType === 'json') { this.setContent(_TXT_LOADING); if (this.footer) { this.footer.hide(); } $.getJSON(cfg.url, function(data) { that.footer.show(); _cache[cfg.url] = data; if (cfg.callback) { cfg.callback(data, that); } }); } else { this.setContent(_TXT_LOADING); if (this.footer) { this.footer.hide(); } $.ajax({ url: cfg.url, dataType: cfg.dataType, success: function(content) { _cache[cfg.url] = content; if (that.footer) { that.footer.show(); } that.setContent(content); if (cfg.callback) { cfg.callback(content, that); } } }); } } var pos = cfg.position; if (pos) { this.node.css({ left: pos[0] + 'px', top: pos[1] + 'px' }); } if (typeof cfg.autoupdate === "boolean") { this.config.autoupdate = cfg.autoupdate; } if (typeof cfg.isStick === "boolean") { if (cfg.isStick) { this.node[0].style.position = "absolute"; } else { this.node[0].style.position = ""; } this.config.isStick = cfg.isStick; } return this.update(); }, update: function() { this.updateSize(); this.updatePosition(); return this; }, setContent: function(str) { this.body.html(str); return this.update(); }, setTitle: function(str) { $('h3', this.title).html(str); return this; }, // submit form in dialog submit: function(callback) { var that = this, frm = $('form', this.node); frm.submit(function(e) { e.preventDefault(); var url = this.getAttribute('action', 2), type = this.getAttribute('method') || 'get', data = _formCollection(this); $[type.toLowerCase()](url, data, function(da) { if (callback) { callback(da); } }, 'json'); }); frm.submit(); }, open: function() { this.node.appendTo("body").css('visibility', 'visible').show(); var self = this, bd = self.body[0]; self.contentHeight = bd.offsetHeight; this.watcher = !this.config.autoupdate ? 0 : setInterval(function(){ if (bd.offsetHeight === self.contentHeight) { return; } self.update(); self.contentHeight = bd.offsetHeight; }, 100); return this; }, close: function() { this.node.hide(); this.node.trigger('dialog:close', this); clearInterval(this.watcher); return this; } }; // add to dui dui.Dialog = function(cfg, isMulti) { // use sigleton dialog mode by default. if (!isMulti && _current_dlg) { return cfg ? _current_dlg.set(cfg) : _current_dlg; } if (!_current_dlg && ! isMulti) { _current_dlg = new dialog(cfg); return _current_dlg; } return new dialog(cfg); }; window.dui = dui; })();
12ik
trunk/public/js/ui/dialog.js
JavaScript
oos
11,972
.colorpicker { width:307px; height:176px; overflow:hidden; position:absolute; background:url(../images/custom_background.png) no-repeat; font-family:Arial,Helvetica,sans-serif; display:none } .colorpicker_color { width:150px; height:150px; left:14px; top:13px; position:absolute; background:#f00; overflow:hidden; cursor:crosshair } .colorpicker_color div { position:absolute; top:0; left:0; width:150px; height:150px; background:url(../images/colorpicker_overlay.png) } .colorpicker_color div div { position:absolute; top:0; left:0; width:11px; height:11px; overflow:hidden; background:url(../images/colorpicker_select.gif); margin:-5px 0 0 -5px } .colorpicker_hue { position:absolute; top:13px; left:171px; width:35px; height:150px; cursor:n-resize } .colorpicker_hue div { position:absolute; width:35px; height:9px; overflow:hidden; background:url(../images/custom_indic.gif) left top; margin:-4px 0 0 0; left:0 } .colorpicker_new_color { display:none; position:absolute; width:60px; height:30px; left:213px; top:13px; background:#f00 } .colorpicker_current_color { display:none; position:absolute; width:60px; height:30px; left:283px; top:13px; background:#f00 } .colorpicker input { position:absolute; border:0; *border-color:#fff; font-size:12px; font-family:Arial,Helvetica,sans-serif; color:#898989; top:4px; *top:3px; margin:0; padding:0 } .colorpicker_hex { position:absolute; width:60px; height:22px; left:230px; top:15px } .colorpicker_field { display:none; height:22px; width:62px; background-position:top; position:absolute } .colorpicker_field span { position:absolute; width:12px; height:22px; overflow:hidden; top:0; right:0; cursor:n-resize } .colorpicker_rgb_r { background-image:url(../images/custom_rgb_r.png); top:52px; left:212px } .colorpicker_rgb_g { background-image:url(../images/custom_rgb_g.png); top:82px; left:212px } .colorpicker_rgb_b { background-image:url(../images/custom_rgb_b.png); top:112px; left:212px } .colorpicker_hsb_h { background-image:url(../images/custom_hsb_h.png); top:52px; left:282px } .colorpicker_hsb_s { background-image:url(../images/custom_hsb_s.png); top:82px; left:282px } .colorpicker_hsb_b { background-image:url(../images/custom_hsb_b.png); top:112px; left:282px } .colorpicker_submit { position:absolute; width:22px; height:22px; background:url(../images/custom_submit.png) top; left:322px; top:142px; overflow:hidden } .colorpicker_focus { background-position:center } .colorpicker_hex.colorpicker_focus { background-position:bottom } .colorpicker_submit.colorpicker_focus { background-position:bottom } .colorpicker_slider { background-position:bottom }
12ik
trunk/public/js/colorpicker/css/colorpicker.css
CSS
oos
2,889
/** * * Utilities * Author: Stefan Petre www.eyecon.ro * */ (function($) { EYE.extend({ getPosition : function(e, forceIt) { var x = 0; var y = 0; var es = e.style; var restoreStyles = false; if (forceIt && jQuery.curCSS(e,'display') == 'none') { var oldVisibility = es.visibility; var oldPosition = es.position; restoreStyles = true; es.visibility = 'hidden'; es.display = 'block'; es.position = 'absolute'; } var el = e; if (el.getBoundingClientRect) { // IE var box = el.getBoundingClientRect(); x = box.left + Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) - 2; y = box.top + Math.max(document.documentElement.scrollTop, document.body.scrollTop) - 2; } else { x = el.offsetLeft; y = el.offsetTop; el = el.offsetParent; if (e != el) { while (el) { x += el.offsetLeft; y += el.offsetTop; el = el.offsetParent; } } if (jQuery.browser.safari && jQuery.curCSS(e, 'position') == 'absolute' ) { x -= document.body.offsetLeft; y -= document.body.offsetTop; } el = e.parentNode; while (el && el.tagName.toUpperCase() != 'BODY' && el.tagName.toUpperCase() != 'HTML') { if (jQuery.curCSS(el, 'display') != 'inline') { x -= el.scrollLeft; y -= el.scrollTop; } el = el.parentNode; } } if (restoreStyles == true) { es.display = 'none'; es.position = oldPosition; es.visibility = oldVisibility; } return {x:x, y:y}; }, getSize : function(e) { var w = parseInt(jQuery.curCSS(e,'width'), 10); var h = parseInt(jQuery.curCSS(e,'height'), 10); var wb = 0; var hb = 0; if (jQuery.curCSS(e, 'display') != 'none') { wb = e.offsetWidth; hb = e.offsetHeight; } else { var es = e.style; var oldVisibility = es.visibility; var oldPosition = es.position; es.visibility = 'hidden'; es.display = 'block'; es.position = 'absolute'; wb = e.offsetWidth; hb = e.offsetHeight; es.display = 'none'; es.position = oldPosition; es.visibility = oldVisibility; } return {w:w, h:h, wb:wb, hb:hb}; }, getClient : function(e) { var h, w; if (e) { w = e.clientWidth; h = e.clientHeight; } else { var de = document.documentElement; w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; } return {w:w,h:h}; }, getScroll : function (e) { var t=0, l=0, w=0, h=0, iw=0, ih=0; if (e && e.nodeName.toLowerCase() != 'body') { t = e.scrollTop; l = e.scrollLeft; w = e.scrollWidth; h = e.scrollHeight; } else { if (document.documentElement) { t = document.documentElement.scrollTop; l = document.documentElement.scrollLeft; w = document.documentElement.scrollWidth; h = document.documentElement.scrollHeight; } else if (document.body) { t = document.body.scrollTop; l = document.body.scrollLeft; w = document.body.scrollWidth; h = document.body.scrollHeight; } if (typeof pageYOffset != 'undefined') { t = pageYOffset; l = pageXOffset; } iw = self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0; ih = self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0; } return { t: t, l: l, w: w, h: h, iw: iw, ih: ih }; }, getMargins : function(e, toInteger) { var t = jQuery.curCSS(e,'marginTop') || ''; var r = jQuery.curCSS(e,'marginRight') || ''; var b = jQuery.curCSS(e,'marginBottom') || ''; var l = jQuery.curCSS(e,'marginLeft') || ''; if (toInteger) return { t: parseInt(t, 10)||0, r: parseInt(r, 10)||0, b: parseInt(b, 10)||0, l: parseInt(l, 10) }; else return {t: t, r: r, b: b, l: l}; }, getPadding : function(e, toInteger) { var t = jQuery.curCSS(e,'paddingTop') || ''; var r = jQuery.curCSS(e,'paddingRight') || ''; var b = jQuery.curCSS(e,'paddingBottom') || ''; var l = jQuery.curCSS(e,'paddingLeft') || ''; if (toInteger) return { t: parseInt(t, 10)||0, r: parseInt(r, 10)||0, b: parseInt(b, 10)||0, l: parseInt(l, 10) }; else return {t: t, r: r, b: b, l: l}; }, getBorder : function(e, toInteger) { var t = jQuery.curCSS(e,'borderTopWidth') || ''; var r = jQuery.curCSS(e,'borderRightWidth') || ''; var b = jQuery.curCSS(e,'borderBottomWidth') || ''; var l = jQuery.curCSS(e,'borderLeftWidth') || ''; if (toInteger) return { t: parseInt(t, 10)||0, r: parseInt(r, 10)||0, b: parseInt(b, 10)||0, l: parseInt(l, 10)||0 }; else return {t: t, r: r, b: b, l: l}; }, traverseDOM : function(nodeEl, func) { func(nodeEl); nodeEl = nodeEl.firstChild; while(nodeEl){ EYE.traverseDOM(nodeEl, func); nodeEl = nodeEl.nextSibling; } }, getInnerWidth : function(el, scroll) { var offsetW = el.offsetWidth; return scroll ? Math.max(el.scrollWidth,offsetW) - offsetW + el.clientWidth:el.clientWidth; }, getInnerHeight : function(el, scroll) { var offsetH = el.offsetHeight; return scroll ? Math.max(el.scrollHeight,offsetH) - offsetH + el.clientHeight:el.clientHeight; }, getExtraWidth : function(el) { if($.boxModel) return (parseInt($.curCSS(el, 'paddingLeft'))||0) + (parseInt($.curCSS(el, 'paddingRight'))||0) + (parseInt($.curCSS(el, 'borderLeftWidth'))||0) + (parseInt($.curCSS(el, 'borderRightWidth'))||0); return 0; }, getExtraHeight : function(el) { if($.boxModel) return (parseInt($.curCSS(el, 'paddingTop'))||0) + (parseInt($.curCSS(el, 'paddingBottom'))||0) + (parseInt($.curCSS(el, 'borderTopWidth'))||0) + (parseInt($.curCSS(el, 'borderBottomWidth'))||0); return 0; }, isChildOf: function(parentEl, el, container) { if (parentEl == el) { return true; } if (!el || !el.nodeType || el.nodeType != 1) { return false; } if (parentEl.contains && !$.browser.safari) { return parentEl.contains(el); } if ( parentEl.compareDocumentPosition ) { return !!(parentEl.compareDocumentPosition(el) & 16); } var prEl = el.parentNode; while(prEl && prEl != container) { if (prEl == parentEl) return true; prEl = prEl.parentNode; } return false; }, centerEl : function(el, axis) { var clientScroll = EYE.getScroll(); var size = EYE.getSize(el); if (!axis || axis == 'vertically') $(el).css( { top: clientScroll.t + ((Math.min(clientScroll.h,clientScroll.ih) - size.hb)/2) + 'px' } ); if (!axis || axis == 'horizontally') $(el).css( { left: clientScroll.l + ((Math.min(clientScroll.w,clientScroll.iw) - size.wb)/2) + 'px' } ); } }); if (!$.easing.easeout) { $.easing.easeout = function(p, n, firstNum, delta, duration) { return -delta * ((n=n/duration-1)*n*n*n - 1) + firstNum; }; } })(jQuery);
12ik
trunk/public/js/colorpicker/js/utils.js
JavaScript
oos
7,135
/** * * Zoomimage * Author: Stefan Petre www.eyecon.ro * */ (function($){ var EYE = window.EYE = function() { var _registered = { init: [] }; return { init: function() { $.each(_registered.init, function(nr, fn){ fn.call(); }); }, extend: function(prop) { for (var i in prop) { if (prop[i] != undefined) { this[i] = prop[i]; } } }, register: function(fn, type) { if (!_registered[type]) { _registered[type] = []; } _registered[type].push(fn); } }; }(); $(EYE.init); })(jQuery);
12ik
trunk/public/js/colorpicker/js/eye.js
JavaScript
oos
604
/** * * Color picker * Author: Stefan Petre www.eyecon.ro * * Dual licensed under the MIT and GPL licenses * */ (function ($) { var ColorPicker = function () { var ids = {}, inAction, charMin = 65, visible, tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>', defaults = { eventName: 'click', onShow: function () {}, onBeforeShow: function(){}, onHide: function () {}, onChange: function () {}, onSubmit: function () {}, color: 'ff0000', livePreview: true, flat: false }, fillRGBFields = function (hsb, cal) { var rgb = HSBToRGB(hsb); $(cal).data('colorpicker').fields .eq(1).val(rgb.r).end() .eq(2).val(rgb.g).end() .eq(3).val(rgb.b).end(); }, fillHSBFields = function (hsb, cal) { $(cal).data('colorpicker').fields .eq(4).val(hsb.h).end() .eq(5).val(hsb.s).end() .eq(6).val(hsb.b).end(); }, fillHexFields = function (hsb, cal) { $(cal).data('colorpicker').fields .eq(0).val(HSBToHex(hsb)).end(); }, setSelector = function (hsb, cal) { $(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100})); $(cal).data('colorpicker').selectorIndic.css({ left: parseInt(150 * hsb.s/100, 10), top: parseInt(150 * (100-hsb.b)/100, 10) }); }, setHue = function (hsb, cal) { $(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10)); }, setCurrentColor = function (hsb, cal) { $(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb)); }, setNewColor = function (hsb, cal) { $(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb)); }, keyDown = function (ev) { var pressedKey = ev.charCode || ev.keyCode || -1; if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) { return false; } var cal = $(this).parent().parent(); if (cal.data('colorpicker').livePreview === true) { change.apply(this); } }, change = function (ev) { var cal = $(this).parent().parent(), col; if (this.parentNode.className.indexOf('_hex') > 0) { cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value)); } else if (this.parentNode.className.indexOf('_hsb') > 0) { cal.data('colorpicker').color = col = fixHSB({ h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10), s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10), b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10) }); } else { cal.data('colorpicker').color = col = RGBToHSB(fixRGB({ r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10), g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10), b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10) })); } if (ev) { fillRGBFields(col, cal.get(0)); fillHexFields(col, cal.get(0)); fillHSBFields(col, cal.get(0)); } setSelector(col, cal.get(0)); setHue(col, cal.get(0)); setNewColor(col, cal.get(0)); cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]); }, blur = function (ev) { var cal = $(this).parent().parent(); cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus'); }, focus = function () { charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65; $(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus'); $(this).parent().addClass('colorpicker_focus'); }, downIncrement = function (ev) { var field = $(this).parent().find('input').focus(); var current = { el: $(this).parent().addClass('colorpicker_slider'), max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255), y: ev.pageY, field: field, val: parseInt(field.val(), 10), preview: $(this).parent().parent().data('colorpicker').livePreview }; $(document).bind('mouseup', current, upIncrement); $(document).bind('mousemove', current, moveIncrement); }, moveIncrement = function (ev) { ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10)))); if (ev.data.preview) { change.apply(ev.data.field.get(0), [true]); } return false; }, upIncrement = function (ev) { change.apply(ev.data.field.get(0), [true]); ev.data.el.removeClass('colorpicker_slider').find('input').focus(); $(document).unbind('mouseup', upIncrement); $(document).unbind('mousemove', moveIncrement); return false; }, downHue = function (ev) { var current = { cal: $(this).parent(), y: $(this).offset().top }; current.preview = current.cal.data('colorpicker').livePreview; $(document).bind('mouseup', current, upHue); $(document).bind('mousemove', current, moveHue); }, moveHue = function (ev) { change.apply( ev.data.cal.data('colorpicker') .fields .eq(4) .val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10)) .get(0), [ev.data.preview] ); return false; }, upHue = function (ev) { fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); $(document).unbind('mouseup', upHue); $(document).unbind('mousemove', moveHue); return false; }, downSelector = function (ev) { var current = { cal: $(this).parent(), pos: $(this).offset() }; current.preview = current.cal.data('colorpicker').livePreview; $(document).bind('mouseup', current, upSelector); $(document).bind('mousemove', current, moveSelector); }, moveSelector = function (ev) { change.apply( ev.data.cal.data('colorpicker') .fields .eq(6) .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10)) .end() .eq(5) .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10)) .get(0), [ev.data.preview] ); return false; }, upSelector = function (ev) { fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); $(document).unbind('mouseup', upSelector); $(document).unbind('mousemove', moveSelector); return false; }, enterSubmit = function (ev) { $(this).addClass('colorpicker_focus'); }, leaveSubmit = function (ev) { $(this).removeClass('colorpicker_focus'); }, clickSubmit = function (ev) { var cal = $(this).parent(); var col = cal.data('colorpicker').color; cal.data('colorpicker').origColor = col; setCurrentColor(col, cal.get(0)); cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el); }, show = function (ev) { var cal = $('#' + $(this).data('colorpickerId')); cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]); var pos = $(this).offset(); var viewPort = getViewport(); var top = pos.top + this.offsetHeight; var left = pos.left; if (top + 176 > viewPort.t + viewPort.h) { top -= this.offsetHeight + 176; } if (left + 356 > viewPort.l + viewPort.w) { left -= 356; } cal.css({left: left + 'px', top: top + 'px'}); if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) { cal.show(); } $(document).bind('mousedown', {cal: cal}, hide); return false; }, hide = function (ev) { if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) { if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) { ev.data.cal.hide(); } $(document).unbind('mousedown', hide); } }, isChildOf = function(parentEl, el, container) { if (parentEl == el) { return true; } if (parentEl.contains) { return parentEl.contains(el); } if ( parentEl.compareDocumentPosition ) { return !!(parentEl.compareDocumentPosition(el) & 16); } var prEl = el.parentNode; while(prEl && prEl != container) { if (prEl == parentEl) return true; prEl = prEl.parentNode; } return false; }, getViewport = function () { var m = document.compatMode == 'CSS1Compat'; return { l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft), t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop), w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth), h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight) }; }, fixHSB = function (hsb) { return { h: Math.min(360, Math.max(0, hsb.h)), s: Math.min(100, Math.max(0, hsb.s)), b: Math.min(100, Math.max(0, hsb.b)) }; }, fixRGB = function (rgb) { return { r: Math.min(255, Math.max(0, rgb.r)), g: Math.min(255, Math.max(0, rgb.g)), b: Math.min(255, Math.max(0, rgb.b)) }; }, fixHex = function (hex) { var len = 6 - hex.length; if (len > 0) { var o = []; for (var i=0; i<len; i++) { o.push('0'); } o.push(hex); hex = o.join(''); } return hex; }, HexToRGB = function (hex) { var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16); return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)}; }, HexToHSB = function (hex) { return RGBToHSB(HexToRGB(hex)); }, RGBToHSB = function (rgb) { var hsb = { h: 0, s: 0, b: 0 }; var min = Math.min(rgb.r, rgb.g, rgb.b); var max = Math.max(rgb.r, rgb.g, rgb.b); var delta = max - min; hsb.b = max; if (max != 0) { } hsb.s = max != 0 ? 255 * delta / max : 0; if (hsb.s != 0) { if (rgb.r == max) { hsb.h = (rgb.g - rgb.b) / delta; } else if (rgb.g == max) { hsb.h = 2 + (rgb.b - rgb.r) / delta; } else { hsb.h = 4 + (rgb.r - rgb.g) / delta; } } else { hsb.h = -1; } hsb.h *= 60; if (hsb.h < 0) { hsb.h += 360; } hsb.s *= 100/255; hsb.b *= 100/255; return hsb; }, HSBToRGB = function (hsb) { var rgb = {}; var h = Math.round(hsb.h); var s = Math.round(hsb.s*255/100); var v = Math.round(hsb.b*255/100); if(s == 0) { rgb.r = rgb.g = rgb.b = v; } else { var t1 = v; var t2 = (255-s)*v/255; var t3 = (t1-t2)*(h%60)/60; if(h==360) h = 0; if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3} else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3} else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3} else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3} else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3} else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3} else {rgb.r=0; rgb.g=0; rgb.b=0} } return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)}; }, RGBToHex = function (rgb) { var hex = [ rgb.r.toString(16), rgb.g.toString(16), rgb.b.toString(16) ]; $.each(hex, function (nr, val) { if (val.length == 1) { hex[nr] = '0' + val; } }); return hex.join(''); }, HSBToHex = function (hsb) { return RGBToHex(HSBToRGB(hsb)); }, restoreOriginal = function () { var cal = $(this).parent(); var col = cal.data('colorpicker').origColor; cal.data('colorpicker').color = col; fillRGBFields(col, cal.get(0)); fillHexFields(col, cal.get(0)); fillHSBFields(col, cal.get(0)); setSelector(col, cal.get(0)); setHue(col, cal.get(0)); setNewColor(col, cal.get(0)); }; return { init: function (opt) { opt = $.extend({}, defaults, opt||{}); if (typeof opt.color == 'string') { opt.color = HexToHSB(opt.color); } else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) { opt.color = RGBToHSB(opt.color); } else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) { opt.color = fixHSB(opt.color); } else { return this; } return this.each(function () { if (!$(this).data('colorpickerId')) { var options = $.extend({}, opt); options.origColor = opt.color; var id = 'collorpicker_' + parseInt(Math.random() * 1000); $(this).data('colorpickerId', id); var cal = $(tpl).attr('id', id); if (options.flat) { cal.appendTo(this).show(); } else { cal.appendTo(document.body); } options.fields = cal .find('input') .bind('keyup', keyDown) .bind('change', change) .bind('blur', blur) .bind('focus', focus); cal .find('span').bind('mousedown', downIncrement).end() .find('>div.colorpicker_current_color').bind('click', restoreOriginal); options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector); options.selectorIndic = options.selector.find('div div'); options.el = this; options.hue = cal.find('div.colorpicker_hue div'); cal.find('div.colorpicker_hue').bind('mousedown', downHue); options.newColor = cal.find('div.colorpicker_new_color'); options.currentColor = cal.find('div.colorpicker_current_color'); cal.data('colorpicker', options); cal.find('div.colorpicker_submit') .bind('mouseenter', enterSubmit) .bind('mouseleave', leaveSubmit) .bind('click', clickSubmit); fillRGBFields(options.color, cal.get(0)); fillHSBFields(options.color, cal.get(0)); fillHexFields(options.color, cal.get(0)); setHue(options.color, cal.get(0)); setSelector(options.color, cal.get(0)); setCurrentColor(options.color, cal.get(0)); setNewColor(options.color, cal.get(0)); if (options.flat) { cal.css({ position: 'relative', display: 'block' }); } else { $(this).bind(options.eventName, show); } } }); }, showPicker: function() { return this.each( function () { if ($(this).data('colorpickerId')) { show.apply(this); } }); }, hidePicker: function() { return this.each( function () { if ($(this).data('colorpickerId')) { $('#' + $(this).data('colorpickerId')).hide(); } }); }, setColor: function(col) { if (typeof col == 'string') { col = HexToHSB(col); } else if (col.r != undefined && col.g != undefined && col.b != undefined) { col = RGBToHSB(col); } else if (col.h != undefined && col.s != undefined && col.b != undefined) { col = fixHSB(col); } else { return this; } return this.each(function(){ if ($(this).data('colorpickerId')) { var cal = $('#' + $(this).data('colorpickerId')); cal.data('colorpicker').color = col; cal.data('colorpicker').origColor = col; fillRGBFields(col, cal.get(0)); fillHSBFields(col, cal.get(0)); fillHexFields(col, cal.get(0)); setHue(col, cal.get(0)); setSelector(col, cal.get(0)); setCurrentColor(col, cal.get(0)); setNewColor(col, cal.get(0)); } }); } }; }(); $.fn.extend({ ColorPicker: ColorPicker.init, ColorPickerHide: ColorPicker.hidePicker, ColorPickerShow: ColorPicker.showPicker, ColorPickerSetColor: ColorPicker.setColor }); })(jQuery)
12ik
trunk/public/js/colorpicker/js/colorpicker.js
JavaScript
oos
17,175
(function($){ var initLayout = function() { var hash = window.location.hash.replace('#', ''); var currentTab = $('ul.navigationTabs a') .bind('click', showTab) .filter('a[rel=' + hash + ']'); if (currentTab.size() == 0) { currentTab = $('ul.navigationTabs a:first'); } showTab.apply(currentTab.get(0)); $('#colorpickerHolder').ColorPicker({flat: true}); $('#colorpickerHolder2').ColorPicker({ flat: true, color: '#00ff00', onSubmit: function(hsb, hex, rgb) { $('#colorSelector2 div').css('backgroundColor', '#' + hex); } }); $('#colorpickerHolder2>div').css('position', 'absolute'); var widt = false; $('#colorSelector2').bind('click', function() { $('#colorpickerHolder2').stop().animate({height: widt ? 0 : 173}, 500); widt = !widt; }); $('#colorpickerField1, #colorpickerField2, #colorpickerField3').ColorPicker({ onSubmit: function(hsb, hex, rgb, el) { $(el).val(hex); $(el).ColorPickerHide(); }, onBeforeShow: function () { $(this).ColorPickerSetColor(this.value); } }) .bind('keyup', function(){ $(this).ColorPickerSetColor(this.value); }); $('#colorSelector').ColorPicker({ color: '#0000ff', onShow: function (colpkr) { $(colpkr).fadeIn(500); return false; }, onHide: function (colpkr) { $(colpkr).fadeOut(500); return false; }, onChange: function (hsb, hex, rgb) { $('#colorSelector div').css('backgroundColor', '#' + hex); } }); }; var showTab = function(e) { var tabIndex = $('ul.navigationTabs a') .removeClass('active') .index(this); $(this) .addClass('active') .blur(); $('div.tab') .hide() .eq(tabIndex) .show(); }; EYE.register(initLayout, 'init'); })(jQuery)
12ik
trunk/public/js/colorpicker/js/layout.js
JavaScript
oos
1,829
html { height: 100%; } body,td,th { font-family: Arial, Verdana, sans-serif; font-size: 12px; } body { background-color: #FFFFFF; word-break: break-word; word-wrap: break-word; } .editMode { margin: 5px; padding: 0px; overflow-y: auto; } .editMode img:-moz-broken { -moz-force-broken-image-icon: 1; height: 24px; width: 24px; } .editMode table.xhe-border,.editMode table.xhe-border th,.editMode table.xhe-border td { border: 1px dotted #d3d3d3; } .editMode embed { display: inline-block; border: 1px dashed #FF4E4E; } .editMode embed[type="application/x-shockwave-flash"] { background: url(img/flash.gif) center center no-repeat; } .editMode embed[type="application/x-mplayer2"] { background: url(img/wmp.gif) center center no-repeat; } .editMode .xhe-paste { position: absolute; left: -1000px; overflow: hidden; width: 1px; height: 1px; } .editMode .xhe-anchor { display: inline-block; background: url(img/anchor.gif) no-repeat; border: 1px dotted #0000FF; width: 16px; height: 15px; overflow: hidden; } .editMode pre { border: 1px dashed #CCC; padding: 5px; font-family: Verdana } .sourceMode { margin: 0px; padding: 0px; overflow: hidden; height: 100%; } .sourceMode textarea { border: 0px; margin: 0px; padding: 0px; width: 100%; height: 100%; overflow-y: auto; font-family: 'Courier New', Courier, monospace !important; font-size: 10pt; } .previewMode { margin: 5px; padding: 0px; } .showBlocktag p,.showBlocktag h1,.showBlocktag h2,.showBlocktag h3,.showBlocktag h4,.showBlocktag h5,.showBlocktag h6,.showBlocktag pre,.showBlocktag address,.showBlocktag div { background: none no-repeat scroll right top; border: 1px dotted gray; } .showBlocktag p { background-image: url(img/tag-p.gif); } .showBlocktag h1 { background-image: url(img/tag-h1.gif); } .showBlocktag h2 { background-image: url(img/tag-h2.gif); } .showBlocktag h3 { background-image: url(img/tag-h3.gif); } .showBlocktag h4 { background-image: url(img/tag-h4.gif); } .showBlocktag h5 { background-image: url(img/tag-h5.gif); } .showBlocktag h6 { background-image: url(img/tag-h6.gif); } .showBlocktag pre { background-image: url(img/tag-pre.gif); } .showBlocktag address { background-image: url(img/tag-address.gif); } .showBlocktag div { background-image: url(img/tag-div.gif); }
12ik
trunk/public/js/editor/xheditor/skin/nostyle/iframe.css
CSS
oos
2,333
.xhe_nostyle table,.xhe_nostyle tr,.xhe_nostyle td,.xhe_nostyle iframe { border: 0; margin: 0; padding: 0; background: transparent; white-space: nowrap; text-decoration: none; font-weight: normal; color: #000 } .xhe_nostyle table.xheLayout { display: inline-table; background: #FFF; border: 1px solid #C5C5C5; width: 100%; height: 100%; } .xhe_nostyle td.xheTool { padding: 0px 3px; border-bottom: 1px solid #C5C5C5; } .xhe_nostyle td.xheTool span { float: left; margin: 2px 0px; } .xhe_nostyle td.xheTool br { clear: left; } .xhe_nostyle span.xheGStart { display: none; } .xhe_nostyle span.xheGEnd { display: none; } .xhe_nostyle span.xheSeparator { display: block; height: 22px; width: 4px; margin: 2px 2px !important; background: url(img/icons.gif) no-repeat -660px 0; } .xhe_nostyle a.xheButton { display: inline-block; margin: 1px; border: 0px; cursor: pointer; text-decoration: none; } .xhe_nostyle a.xheButton span { opacity: 0.3; -ms-filter: 'alpha(opacity=30)'; filter: alpha(opacity = 30); } .xhe_nostyle a.xheEnabled span { opacity: 1; -ms-filter: 'alpha(opacity=100)'; filter: alpha(opacity = 100); } .xhe_nostyle a.xheEnabled:hover { margin: 0px; border: 1px solid #999; background: #fff; } .xhe_nostyle a.xheActive { margin: 0px; border: 1px solid #999; background: #fff; } .xhe_nostyle a.xheButton span { display: block; margin: 0px; height: 20px; width: 20px; overflow: hidden; } .tsImg { background: url(img/icons.gif) no-repeat 20px 20px; background-position: -440px 0; } .tsMusic { background: url(img/icons.gif) no-repeat 20px 20px; background-position: -500px 0; } .tsAttach { background: url(img/icons.gif) no-repeat 20px 20px; background-position: -420px 0; } .tsVideo { background: url(img/icons.gif) no-repeat 20px 20px; background-position: -480px 0; } .tsCode { background: url(img/icons.gif) no-repeat 20px 20px; background-position: -280px 0; } .xhe_nostyle span.xheIcon { background: url(img/icons.gif) no-repeat 20px 20px } .xhe_nostyle span.xheBtnCut { background-position: 0 0 } .xhe_nostyle span.xheBtnCopy { background-position: -20px 0 } .xhe_nostyle span.xheBtnPaste { background-position: -40px 0 } .xhe_nostyle span.xheBtnPastetext { background-position: -60px 0 } .xhe_nostyle span.xheBtnBlocktag { background-position: -80px 0 } .xhe_nostyle span.xheBtnFontface { background-position: -100px 0 } .xhe_nostyle span.xheBtnFontSize { background-position: -120px 0 } .xhe_nostyle span.xheBtnBold { background-position: -140px 0 } .xhe_nostyle span.xheBtnItalic { background-position: -160px 0 } .xhe_nostyle span.xheBtnUnderline { background-position: -180px 0 } .xhe_nostyle span.xheBtnStrikethrough { background-position: -200px 0 } .xhe_nostyle span.xheBtnFontColor { background-position: -220px 0 } .xhe_nostyle span.xheBtnBackColor { background-position: -240px 0 } .xhe_nostyle span.xheBtnSelectAll { background-position: -260px 0 } .xhe_nostyle span.xheBtnRemoveformat { background-position: -280px 0 } .xhe_nostyle span.xheBtnAlign { background-position: -300px 0 } .xhe_nostyle span.xheBtnList { background-position: -320px 0 } .xhe_nostyle span.xheBtnOutdent { background-position: -340px 0 } .xhe_nostyle span.xheBtnIndent { background-position: -360px 0 } .xhe_nostyle span.xheBtnLink { background-position: -380px 0 } .xhe_nostyle span.xheBtnUnlink { background-position: -400px 0 } .xhe_nostyle span.xheBtnAttach { background-position: -420px 0 } .xhe_nostyle span.xheBtnImg { background-position: -440px 0 } .xhe_nostyle span.xheBtnthinkSaasImg { background-position: -440px 0 } .xhe_nostyle span.xheBtnFlash { background-position: -460px 0 } .xhe_nostyle span.xheBtnMedia { background-position: -480px 0 } .xhe_nostyle span.xheBtnMusic { background-position: -500px 0 } .xhe_nostyle span.xheBtnEmot { background-position: -520px 0 } .xhe_nostyle span.xheBtnTable { background-position: -540px 0 } .xhe_nostyle span.xheBtnSource { background-position: -560px 0 } .xhe_nostyle span.xheBtnPreview { background-position: -580px 0 } .xhe_nostyle span.xheBtnPrint { background-position: -600px 0 } .xhe_nostyle span.xheBtnFullscreen { background-position: -620px 0 } .xhe_nostyle span.xheBtnAbout { background-position: -640px 0 } .xhe_nostyle .xheIframeArea { height: 100%; } .xhe_nostyle iframe { display: block; background: #fff; width: 100%; height: 100%; } #xheCntLine { display: none; position: absolute; z-index: 1000001; background: #fff; height: 1px; font-size: 0; } #xhePanel { display: none; position: absolute; z-index: 1000000; border: #999 1px solid; background: #fff; text-align: left; } #xheShadow { display: none; position: absolute; z-index: 999999; background: #000; opacity: 0.2; -ms-filter: 'alpha(opacity=20)'; filter: alpha(opacity = 20); } .xheFixCancel { position: absolute; z-index: 999998; background-color: #FFF; opacity: 0; -ms-filter: 'alpha(opacity=0)'; filter: alpha(opacity = 0); } .xheMenu { padding: 2px; overflow-x: hidden; overflow-y: auto; max-height: 230px; } .xheMenu a { display: block; padding: 3px 20px 3px 3px; line-height: normal; font-size: 12px; color: #000; text-decoration: none; white-space: nowrap; } .xheMenu a:hover { background: #e5e5e5; text-decoration: none; color: #000; } .xheMenu p,.xheMenu h1,.xheMenu h2,.xheMenu h3,.xheMenu h4,.xheMenu h5,.xheMenu h6,.xheMenu pre,.xheMenu address,.xheMenu div { margin: 0 } .xheEmot div { padding: 5px; overflow-x: hidden; overflow-y: auto; } .xheEmot div a { display: inline-block; margin: 3px; padding: 3px; overflow: hidden; background-repeat: no-repeat; background-position: center; text-decoration: none; } .xheEmot div a:hover { border: 1px solid #999; padding: 2px; } .xheEmot ul { border-top: 1px solid #999; list-style: none; padding: 0 10px; margin: 0; font-size: 12px; } .xheEmot li { float: left; margin: 0 2px 5px 0; } .xheEmot li a { background: #fff; display: block; padding: 0 8px; text-decoration: none; color: #000; line-height: 20px; } .xheEmot li a:hover { text-decoration: underline; } .xheEmot li.cur { border: 1px solid #999; border-top: none; position: relative; bottom: 1px; } .xheEmot li.cur a { cursor: text; padding-top: 1px; } .xheEmot li.cur a:hover { text-decoration: none; } .xheColor { padding: 5px; } .xheColor a { display: inline-block; margin: 1px; border: #999 1px solid; width: 17px; height: 9px; font-size: 0; } .xheColor a:hover { border: #000 1px solid; } .xheColor a img { display: none; } .xheDialog { padding: 10px; font-size: 12px; font-family: monospace; } .xheDialog a { text-decoration: underline; color: #00f; } .xheDialog a:hover { text-decoration: underline; color: #00f } .xheDialog div { padding: 2px 0; } .xheDialog input { margin: 0; border-width: 1px; border-style: solid; font-size: 12px; *border-width: expression(( type != "checkbox") ? '1px' : 0 ); *padding: expression(( type == "text") ? '1px' : 'auto' ); *width: expression(( type == "text") ? '160px' : 'auto' ); *border-color: expression(( type == "text") ? '#ABADB3' : '#fff #888 #888 #fff' ); *background: expression(( type == "button") ? '#F0F0F0' : '#FFFFFF' ); *cursor: expression(( type == "button") ? 'pointer' : '' ); *font-size: expression(( type == "button") ? '13px' : '12px' ); } .xheDialog textarea { font-size: 12px; resize: none; } .xheDialog input[type=text] { padding: 1px; width: 160px; border-color: #ABADB3; } .xheDialog input[type=button] { margin: 0; border-color: #fff #888 #888 #fff; background: #F0F0F0; cursor: pointer; font-size: 13px; } .xheDialog input[type=file] { font-size: 13px; } .xheDialog input[type=checkbox] { border: 0; } .xheDialog select { margin: 0; border: 1px #ABADB3 solid; } .xheDialog .xheUpload { position: relative; display: inline-block; width: 164px; } .xheDialog .xheUpload .xheBtn { position: absolute; top: 0px; left: 114px; width: 50px; z-index: 1000001; padding: 0; } .xheDialog .xheUpload .xheFile { cursor: pointer; position: absolute; top: 0px; left: 0px; width: 164px; opacity: 0; -ms-filter: 'alpha(opacity=0)'; filter: alpha(opacity = 0); z-index: 1000002; } .xheDialog .xheUpload .xheText { position: absolute; width: 107px; top: 0px; left: 0px; z-index: 1000003; } .xheModal { position: fixed; z-index: 1000010; text-align: left; top: 50%; left: 50%; background: #FFF; border: 1px solid #BBB; font-size: 12px; _position: absolute; _margin-top: expression(0 - parseInt(this.offsetHeight/ 2) + ( TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop ) + 'px' ); } .xheModalTitle { padding: 5px; background: #F0F0EE; border-bottom: 1px solid #BBB; } .xheModalClose { float: right; width: 16px; height: 16px; background: url(img/close.gif); cursor: pointer; } .xheModalIfmWait { width: 100%; height: 100%; background: url(img/waiting.gif) no-repeat 50% 50%; margin: -16 0 0 -16; } .xheModalShadow { position: fixed; z-index: 1000009; top: 50%; left: 50%; background: #000; opacity: 0.2; -ms-filter: 'alpha(opacity=20)'; filter: alpha(opacity = 20); _position: absolute; _margin-top: expression(0 - parseInt(this.offsetHeight/ 2) + ( TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop ) + 5 + 'px' ); } .xheModalOverlay { position: fixed; z-index: 1000008; top: 0px; left: 0px; height: 100%; width: 100%; background-color: #000; opacity: 0.2; -ms-filter: 'alpha(opacity=20)'; filter: alpha(opacity = 20); _position: absolute; _height: expression(Math.max ( document.documentElement.clientHeight, document.documentElement.scrollHeight) + 'px' ); _width: expression(Math.max ( document.documentElement.clientWidth, document.documentElement.scrollWidth) + 'px' ); } * html{ background-image: url(about:blank); background-attachment: fixed; } .xheProgress { position: relative; width: 280px; margin: auto; border: 1px solid #C1C1C1; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; background: url(img/progressbg.gif) #E9E9E9; } .xheProgress span { position: absolute; left: 0; top: 0; width: 100%; text-align: center; line-height: 15px; font-size: 12px; color: #222; text-shadow: 1px 1px 0 #eee; } .xheProgress div { height: 15px; width: 1px; background: url(img/progress.gif) #31C135; } .xhe_Fullfix { overflow: hidden; } .xhe_Fullfix body { width: 100%; height: 100%; } .xhe_Fullscreen { top: 0px; left: 0px; position: fixed; z-index: 100000; width: 100%; height: 100%; background: #fff; _position: absolute; _top: expression(( document.compatMode ? documentElement.scrollTop : document.body.scrollTop) + 'px' ); _width: expression(( document.compatMode ? documentElement.offsetWidth : document.body.offsetWidth) + 'px' ); _height: expression(( document.compatMode ? documentElement.offsetHeight : document.body.offsetHeight) + 'px' ); } .xheHideArea { position: absolute; top: -1000px; left: -1000px; visibility: hidden; }
12ik
trunk/public/js/editor/xheditor/skin/nostyle/ui.css
CSS
oos
11,905
//加载编辑器 $(pageInit); function pageInit() { var tsplugin={ tsAttach:{c:'tsAttach',t:'插入附件',e:function(){ var _this=this; _this.saveBookmark(); _this.showIframeModal('选择附件',siteUrl+'index.php?app=attach&ac=ajax&ts=my',function(v){ _this.pasteHTML(v,false); },400,420); }}, tsImg:{c:'tsImg',t:'插入图片',e:function(){ var _this=this; _this.saveBookmark(); _this.showIframeModal('选择图片',siteUrl+'index.php?app=photo&ac=ajax&ts=album',function(v){ _this.pasteHTML(v,false); },400,420); }}, tsMusic:{c:'tsMusic',t:'插入远程音乐',h:1,e:function(){ var _this=this; var title = ''; var htmlCode=$('<div>插入MP3音乐</div><div>地址:<input type="text" id="xheMusicUrl" value="http://" class="xheText" /></div>'+ '<div>标题:<input type="text" id="xheMusicTit" value="" class="xheText" /></div><div style="text-align:right;"><input type="button" id="xheSave" value="确定" /></div>'); var jCode=$(htmlCode),jSave=$('#xheSave',jCode),jValue=$('#xheMusicUrl',jCode),jTit=$('#xheMusicTit',jCode); jSave.click(function(){ if(jValue.val() !='http://'){ if(jTit.val() !='') { title = ','+jTit.val();} _this.pasteHTML('[mp3='+jValue.val()+title+']',false); } _this.hidePanel(); return false; }); _this.saveBookmark(); _this.showDialog(htmlCode); }}, tsVideo:{c:'tsVideo',t:'插入视频地址',h:1,e:function(){ var _this=this; _this.saveBookmark(); var htmlCode=$('<div>插入视频地址(支持优酷土豆等播放地址)</div><div><img src="" id="urlImg" style="display:none"/></div><div>地址: <input type="text" id="xheVidoeUrl" value="" class="xheText" /></div><div>标题: <input type="text" id="xheVidoeTitle" value="" class="xheText" /></div><div style="text-align:right;"><input type="button" id="xheSave" value="解析" /></div>'); var jCode=$(htmlCode),jSave=$('#xheSave',jCode),jimg=$('#urlImg',jCode),jtitle=$('#xheVidoeTitle',jCode),jValue=$('#xheVidoeUrl',jCode); jSave.click(function(){ if(jimg.attr('src') != '') { _this.pasteHTML('[video='+rsJson.result.coverurl+','+rsJson.result.flash+','+jtitle.val()+']',false); _this.hidePanel(); } if(jValue.val() !='') { url = jValue.val(); var urls = siteUrl+'index.php?app=group&ac=do&ts=parseurl'; jSave.val('稍等...');jSave.attr('disabled',true); $.post(urls,{parseurl:url},function(rs){ rsJson = eval('(' + rs + ')'); if(rsJson.err != 0) { jSave.val('解析网址');jSave.attr('disabled',false); alert(rsJson.msg); return false; }else{ jSave.val('完成');jSave.attr('disabled',false); jimg.attr('src',rsJson.result.coverurl);jimg.show(); jtitle.val(rsJson.result.title); return false; } }) } return false; }); _this.saveBookmark(); _this.showDialog(htmlCode); }}, tsCode:{c:'tsCode',t:'插入代码',h:1,e:function(){ var _this=this; var htmlCode='<div>插入代码</div><div><textarea id="xheCodeValue" wrap="soft" spellcheck="false" style="width:300px;height:100px;" /></div><div style="text-align:right;"><input type="button" id="xheSave" value="确定" /></div>'; var jCode=$(htmlCode),jValue=$('#xheCodeValue',jCode),jSave=$('#xheSave',jCode); jSave.click(function(){ _this.loadBookmark(); if(jValue.val() != '') _this.pasteHTML('<pre class="code">'+_this.domEncode(jValue.val())+'</pre>'); _this.hidePanel(); return false; }); _this.saveBookmark(); _this.showDialog(jCode); }} }; var fulltools = 'Paste,|,Bold,FontSize,Italic,Underline,Strikethrough,|,FontColor,BackColor,Align,List,Outdent,Indent,|,Link,Unlink,|,tsAttach,tsImg,tsMusic,Flash,tsVideo,Emot,tsCode,|Fullscreen'; var minitools = 'Bold,FontSize,Italic,Underline,Strikethrough,|,FontColor,BackColor,Align,List,Outdent,Indent,|,Link,Unlink,|,tsImg,tsMusic,Flash,tsVideo,tsCode'; $('#editor_mini').xheditor({plugins:tsplugin,tools:minitools,skin:'nostyle',urlType:'abs',internalStyle:false,emotPath:siteUrl+'public/emot/',emots:{360:{name:'360',count:24,width:32,height:32,line:8}},shortcuts:{'ctrl+enter':miniSubmit}}); $('#editor_full').xheditor({plugins:tsplugin,tools:fulltools,skin:'nostyle',layerShadow:4,internalStyle:false,urlType:'abs',emotPath:siteUrl+'public/emot/',emots:{360:{name:'360',count:24,width:32,height:32,line:8}}}); } function miniSubmit() { if($('#editor_mini').val() == '') { tips('请输入内容'); }else{ $('#formMini').find('input[type=submit]').val('正在提交^_^').attr('disabled',true); $('#formMini').submit(); } } function insertEditor(val) { callback(val); unloadme(); }
12ik
trunk/public/js/editor/xheditor/loadeditor.js
JavaScript
oos
4,892
/* Uploadify v2.1.4 Release Date: November 8, 2010 Copyright (c) 2010 Ronnie Garcia, Travis Nickels Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ if(jQuery)( function(jQuery){ jQuery.extend(jQuery.fn,{ uploadify:function(options) { jQuery(this).each(function(){ var settings = jQuery.extend({ id : jQuery(this).attr('id'), // The ID of the object being Uploadified uploader : 'uploadify.swf', // The path to the uploadify swf file script : 'uploadify.php', // The path to the uploadify backend upload script expressInstall : null, // The path to the express install swf file folder : '', // The path to the upload folder height : 30, // The height of the flash button width : 120, // The width of the flash button cancelImg : 'cancel.png', // The path to the cancel image for the default file queue item container wmode : 'opaque', // The wmode of the flash file scriptAccess : 'sameDomain', // Set to "always" to allow script access across domains fileDataName : 'Filedata', // The name of the file collection object in the backend upload script method : 'POST', // The method for sending variables to the backend upload script queueSizeLimit : 999, // The maximum size of the file queue simUploadLimit : 1, // The number of simultaneous uploads allowed queueID : false, // The optional ID of the queue container displayData : 'percentage', // Set to "speed" to show the upload speed in the default queue item removeCompleted : true, // Set to true if you want the queue items to be removed when a file is done uploading onInit : function() {}, // Function to run when uploadify is initialized onSelect : function() {}, // Function to run when a file is selected onSelectOnce : function() {}, // Function to run once when files are added to the queue onQueueFull : function() {}, // Function to run when the queue reaches capacity onCheck : function() {}, // Function to run when script checks for duplicate files on the server onCancel : function() {}, // Function to run when an item is cleared from the queue onClearQueue : function() {}, // Function to run when the queue is manually cleared onError : function() {}, // Function to run when an upload item returns an error onProgress : function() {}, // Function to run each time the upload progress is updated onComplete : function() {}, // Function to run when an upload is completed onAllComplete : function() {} // Function to run when all uploads are completed }, options); jQuery(this).data('settings',settings); var pagePath = location.pathname; pagePath = pagePath.split('/'); pagePath.pop(); pagePath = pagePath.join('/') + '/'; var data = {}; data.uploadifyID = settings.id; data.pagepath = pagePath; if (settings.buttonImg) data.buttonImg = escape(settings.buttonImg); if (settings.buttonText) data.buttonText = escape(settings.buttonText); if (settings.rollover) data.rollover = true; data.script = settings.script; data.folder = escape(settings.folder); if (settings.scriptData) { var scriptDataString = ''; for (var name in settings.scriptData) { scriptDataString += '&' + name + '=' + settings.scriptData[name]; } data.scriptData = escape(scriptDataString.substr(1)); } data.width = settings.width; data.height = settings.height; data.wmode = settings.wmode; data.method = settings.method; data.queueSizeLimit = settings.queueSizeLimit; data.simUploadLimit = settings.simUploadLimit; if (settings.hideButton) data.hideButton = true; if (settings.fileDesc) data.fileDesc = settings.fileDesc; if (settings.fileExt) data.fileExt = settings.fileExt; if (settings.multi) data.multi = true; if (settings.auto) data.auto = true; if (settings.sizeLimit) data.sizeLimit = settings.sizeLimit; if (settings.checkScript) data.checkScript = settings.checkScript; if (settings.fileDataName) data.fileDataName = settings.fileDataName; if (settings.queueID) data.queueID = settings.queueID; if (settings.onInit() !== false) { jQuery(this).css('display','none'); jQuery(this).after('<div id="' + jQuery(this).attr('id') + 'Uploader"></div>'); swfobject.embedSWF(settings.uploader, settings.id + 'Uploader', settings.width, settings.height, '9.0.24', settings.expressInstall, data, {'quality':'high','wmode':settings.wmode,'allowScriptAccess':settings.scriptAccess},{},function(event) { if (typeof(settings.onSWFReady) == 'function' && event.success) settings.onSWFReady(); }); if (settings.queueID == false) { jQuery("#" + jQuery(this).attr('id') + "Uploader").after('<div id="' + jQuery(this).attr('id') + 'Queue" class="uploadifyQueue"></div>'); } else { jQuery("#" + settings.queueID).addClass('uploadifyQueue'); } } if (typeof(settings.onOpen) == 'function') { jQuery(this).bind("uploadifyOpen", settings.onOpen); } jQuery(this).bind("uploadifySelect", {'action': settings.onSelect, 'queueID': settings.queueID}, function(event, ID, fileObj) { if (event.data.action(event, ID, fileObj) !== false) { var byteSize = Math.round(fileObj.size / 1024 * 100) * .01; var suffix = 'KB'; if (byteSize > 1000) { byteSize = Math.round(byteSize *.001 * 100) * .01; suffix = 'MB'; } var sizeParts = byteSize.toString().split('.'); if (sizeParts.length > 1) { byteSize = sizeParts[0] + '.' + sizeParts[1].substr(0,2); } else { byteSize = sizeParts[0]; } if (fileObj.name.length > 20) { fileName = fileObj.name.substr(0,20) + '...'; } else { fileName = fileObj.name; } queue = '#' + jQuery(this).attr('id') + 'Queue'; if (event.data.queueID) { queue = '#' + event.data.queueID; } jQuery(queue).append('<div id="' + jQuery(this).attr('id') + ID + '" class="uploadifyQueueItem">\ <div class="cancel">\ <a href="javascript:jQuery(\'#' + jQuery(this).attr('id') + '\').uploadifyCancel(\'' + ID + '\')"><img src="' + settings.cancelImg + '" border="0" /></a>\ </div>\ <span class="fileName">' + fileName + ' (' + byteSize + suffix + ')</span><span class="percentage"></span>\ <div class="uploadifyProgress">\ <div id="' + jQuery(this).attr('id') + ID + 'ProgressBar" class="uploadifyProgressBar"><!--Progress Bar--></div>\ </div>\ </div>'); } }); jQuery(this).bind("uploadifySelectOnce", {'action': settings.onSelectOnce}, function(event, data) { event.data.action(event, data); if (settings.auto) { if (settings.checkScript) { jQuery(this).uploadifyUpload(null, false); } else { jQuery(this).uploadifyUpload(null, true); } } }); jQuery(this).bind("uploadifyQueueFull", {'action': settings.onQueueFull}, function(event, queueSizeLimit) { if (event.data.action(event, queueSizeLimit) !== false) { alert('The queue is full. The max size is ' + queueSizeLimit + '.'); } }); jQuery(this).bind("uploadifyCheckExist", {'action': settings.onCheck}, function(event, checkScript, fileQueueObj, folder, single) { var postData = new Object(); postData = fileQueueObj; postData.folder = (folder.substr(0,1) == '/') ? folder : pagePath + folder; if (single) { for (var ID in fileQueueObj) { var singleFileID = ID; } } jQuery.post(checkScript, postData, function(data) { for(var key in data) { if (event.data.action(event, data, key) !== false) { var replaceFile = confirm("Do you want to replace the file " + data[key] + "?"); if (!replaceFile) { document.getElementById(jQuery(event.target).attr('id') + 'Uploader').cancelFileUpload(key,true,true); } } } if (single) { document.getElementById(jQuery(event.target).attr('id') + 'Uploader').startFileUpload(singleFileID, true); } else { document.getElementById(jQuery(event.target).attr('id') + 'Uploader').startFileUpload(null, true); } }, "json"); }); jQuery(this).bind("uploadifyCancel", {'action': settings.onCancel}, function(event, ID, fileObj, data, remove, clearFast) { if (event.data.action(event, ID, fileObj, data, clearFast) !== false) { if (remove) { var fadeSpeed = (clearFast == true) ? 0 : 250; jQuery("#" + jQuery(this).attr('id') + ID).fadeOut(fadeSpeed, function() { jQuery(this).remove() }); } } }); jQuery(this).bind("uploadifyClearQueue", {'action': settings.onClearQueue}, function(event, clearFast) { var queueID = (settings.queueID) ? settings.queueID : jQuery(this).attr('id') + 'Queue'; if (clearFast) { jQuery("#" + queueID).find('.uploadifyQueueItem').remove(); } if (event.data.action(event, clearFast) !== false) { jQuery("#" + queueID).find('.uploadifyQueueItem').each(function() { var index = jQuery('.uploadifyQueueItem').index(this); jQuery(this).delay(index * 100).fadeOut(250, function() { jQuery(this).remove() }); }); } }); var errorArray = []; jQuery(this).bind("uploadifyError", {'action': settings.onError}, function(event, ID, fileObj, errorObj) { if (event.data.action(event, ID, fileObj, errorObj) !== false) { var fileArray = new Array(ID, fileObj, errorObj); errorArray.push(fileArray); jQuery("#" + jQuery(this).attr('id') + ID).find('.percentage').text(" - " + errorObj.type + " Error"); jQuery("#" + jQuery(this).attr('id') + ID).find('.uploadifyProgress').hide(); jQuery("#" + jQuery(this).attr('id') + ID).addClass('uploadifyError'); } }); if (typeof(settings.onUpload) == 'function') { jQuery(this).bind("uploadifyUpload", settings.onUpload); } jQuery(this).bind("uploadifyProgress", {'action': settings.onProgress, 'toDisplay': settings.displayData}, function(event, ID, fileObj, data) { if (event.data.action(event, ID, fileObj, data) !== false) { jQuery("#" + jQuery(this).attr('id') + ID + "ProgressBar").animate({'width': data.percentage + '%'},250,function() { if (data.percentage == 100) { jQuery(this).closest('.uploadifyProgress').fadeOut(250,function() {jQuery(this).remove()}); } }); if (event.data.toDisplay == 'percentage') displayData = ' - ' + data.percentage + '%'; if (event.data.toDisplay == 'speed') displayData = ' - ' + data.speed + 'KB/s'; if (event.data.toDisplay == null) displayData = ' '; jQuery("#" + jQuery(this).attr('id') + ID).find('.percentage').text(displayData); } }); jQuery(this).bind("uploadifyComplete", {'action': settings.onComplete}, function(event, ID, fileObj, response, data) { if (event.data.action(event, ID, fileObj, unescape(response), data) !== false) { jQuery("#" + jQuery(this).attr('id') + ID).find('.percentage').text(' - Completed'); if (settings.removeCompleted) { jQuery("#" + jQuery(event.target).attr('id') + ID).fadeOut(250,function() {jQuery(this).remove()}); } jQuery("#" + jQuery(event.target).attr('id') + ID).addClass('completed'); } }); if (typeof(settings.onAllComplete) == 'function') { jQuery(this).bind("uploadifyAllComplete", {'action': settings.onAllComplete}, function(event, data) { if (event.data.action(event, data) !== false) { errorArray = []; } }); } }); }, uploadifySettings:function(settingName, settingValue, resetObject) { var returnValue = false; jQuery(this).each(function() { if (settingName == 'scriptData' && settingValue != null) { if (resetObject) { var scriptData = settingValue; } else { var scriptData = jQuery.extend(jQuery(this).data('settings').scriptData, settingValue); } var scriptDataString = ''; for (var name in scriptData) { scriptDataString += '&' + name + '=' + scriptData[name]; } settingValue = escape(scriptDataString.substr(1)); } returnValue = document.getElementById(jQuery(this).attr('id') + 'Uploader').updateSettings(settingName, settingValue); }); if (settingValue == null) { if (settingName == 'scriptData') { var returnSplit = unescape(returnValue).split('&'); var returnObj = new Object(); for (var i = 0; i < returnSplit.length; i++) { var iSplit = returnSplit[i].split('='); returnObj[iSplit[0]] = iSplit[1]; } returnValue = returnObj; } } return returnValue; }, uploadifyUpload:function(ID,checkComplete) { jQuery(this).each(function() { if (!checkComplete) checkComplete = false; document.getElementById(jQuery(this).attr('id') + 'Uploader').startFileUpload(ID, checkComplete); }); }, uploadifyCancel:function(ID) { jQuery(this).each(function() { document.getElementById(jQuery(this).attr('id') + 'Uploader').cancelFileUpload(ID, true, true, false); }); }, uploadifyClearQueue:function() { jQuery(this).each(function() { document.getElementById(jQuery(this).attr('id') + 'Uploader').clearFileUploadQueue(false); }); } }) })(jQuery);
12ik
trunk/public/js/uploadify/jquery.uploadify.v2.1.4.js
JavaScript
oos
14,588
/* Uploadify v2.1.4 Release Date: November 8, 2010 Copyright (c) 2010 Ronnie Garcia, Travis Nickels Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ .uploadifyQueueItem { background-color: #F5F5F5; border: 2px solid #E5E5E5; font: 11px Verdana, Geneva, sans-serif; margin-top: 5px; padding: 10px; width: 350px; } .uploadifyError { background-color: #FDE5DD !important; border: 2px solid #FBCBBC !important; } .uploadifyQueueItem .cancel { float: right; } .uploadifyQueue .completed { background-color: #E5E5E5; } .uploadifyProgress { background-color: #E5E5E5; margin-top: 10px; width: 100%; } .uploadifyProgressBar { background-color: #0099FF; height: 3px; width: 1px; }
12ik
trunk/public/js/uploadify/uploadify.css
CSS
oos
1,671
$.post_withck = function( url, data, callback, type, traditional) { if ($.isFunction(data)) { type = callback; callback = data; data = {}; } return $.ajax({ type: "POST", traditional: typeof traditional == 'undefined' ? true : traditional, url: url, data: $.extend(data,{ck:get_cookie('ck')}), success: callback, dataType: type || 'text' }); }; // 转移==> core/cookie.js var set_cookie = function(dict, days, domain, path){ var date = new Date(); date.setTime(date.getTime()+((days || 30)*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); for (var i in dict){ document.cookie = i+"="+dict[i]+expires+"; domain=" + (domain || "12ik.com") + "; path=" + (path || "/"); } } // 转移==> core/cookie.js function get_cookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) { return c.substring(nameEQ.length,c.length).replace(/\"/g,''); } } return null; }
12ik
trunk/public/js/common.js
JavaScript
oos
1,232
@charset "utf-8"; /* * artDialog skin * http://code.google.com/p/artdialog/ * (c) 2009-2010 TangBin, http://www.planeArt.cn * * This is licensed under the GNU LGPL, version 2.1 or later. * For details, see: http://creativecommons.org/licenses/LGPL/2.1/ */ /* common start */ body { _margin: 0; _height: 100%; /*IE6 BUG*/ } .aui_outer { text-align: left; } .aui_border,.aui_inner { border: 0; margin: 0; border-collapse: collapse; width: auto; } .aui_nw,.aui_n,.aui_ne,.aui_w,.aui_center,.aui_e,.aui_sw,.aui_s,.aui_se,.aui_header,.aui_tdIcon,.aui_main,.aui_footer { padding: 0; } .aui_header,.aui_buttons button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family: Tahoma, Arial, Helvetica, STHeiti; -o-font-family: Tahoma, Arial; } .aui_title { overflow: hidden; text-overflow: ellipsis; } .aui_state_noTitle .aui_title { display: none; } .aui_close { display: block; position: absolute; text-decoration: none; outline: none; _cursor: pointer; } .aui_close:hover { text-decoration: none; } .aui_main { text-align: center; min-width: 9em; min-width: 0\9 /*IE8 BUG*/; } .aui_content { display: inline-block; *zoom: 1; *display: inline; text-align: left; border: none 0; } .aui_content.aui_state_full { display: block; width: 100%; margin: 0; padding: 0 !important; height: 100%; } .aui_loading { width: 96px; height: 32px; text-align: left; text-indent: -999em; overflow: hidden; background: url(icons/loading.gif) no-repeat center center; } .aui_icon { vertical-align: middle; } .aui_icon div { width: 48px; height: 48px; margin: 10px 0 10px 10px; background-position: center center; background-repeat: no-repeat; } .aui_buttons { padding: 8px; text-align: right; white-space: nowrap; } .aui_buttons button { margin-left: 15px; padding: 6px 12px; cursor: pointer; display: inline-block; text-align: center; line-height: 1; *padding: 4px 10px; *height: 2em; letter-spacing: 2px; font-family: Tahoma, Arial/ 9 !important; width: auto; overflow: visible; *width: 1; color: #333; border: solid 1px #999; border-radius: 5px; background: #DDD; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#FFFFFF', endColorstr = '#DDDDDD' ); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD) ); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); } .aui_buttons button:focus { outline: none 0; border-color: #426DC9; box-shadow: 0 0 8px rgba(66, 109, 201, .9); } .aui_buttons button:hover { color: #000; border-color: #666; } .aui_buttons button:active { border-color: #666; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#DDDDDD', endColorstr = '#FFFFFF' ); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF) ); box-shadow: inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); } .aui_buttons button[disabled] { cursor: default; color: #666; background: #DDD; border: solid 1px #999; filter: alpha(opacity = 50); opacity: .5; box-shadow: none; } button.aui_state_highlight { color: #FFF; border: solid 1px #3399dd; background: #2288cc; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#33bbee', endColorstr = '#2288cc' ); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc) ); text-shadow: -1px -1px 1px #1c6a9e; } button.aui_state_highlight:hover { color: #FFF; border-color: #1c6a9e; } button.aui_state_highlight:active { border-color: #1c6a9e; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#33bbee', endColorstr = '#2288cc' ); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc) ); } /* common end */ .aui_inner { background: #FFF; } .aui_center { border: 1px solid #666 !important; } .aui_nw,.aui_ne,.aui_sw,.aui_se { width: 3px; height: 3px; } .aui_nw,.aui_n,.aui_ne,.aui_w,.aui_e,.aui_sw,.aui_s,.aui_se { background: rgba(0, 0, 0, .05); background: #000\9 !important; filter: alpha(opacity = 5); } .aui_titleBar { position: relative; height: 100%; } .aui_title { height: 24px; line-height: 24px; padding: 0 24px 0 15px; font-weight: 700; color: #999; } .aui_state_drag .aui_title { color: #666; } .aui_close { padding: 0; top: 0; right: 0; width: 24px; height: 24px; line-height: 24px; text-align: center; font-family: Helvetica, STHeiti; _font-family: '\u9ed1\u4f53', 'Book Antiqua', Palatino; font-size: 18px; text-decoration: none; color: #214FA3; } .aui_close:hover,.aui_close:active { text-decoration: none; color: #900; } .aui_content { color: #666; } .aui_state_focus .aui_content { color: #000; }
12ik
trunk/public/js/dialog/skins/simple.css
CSS
oos
5,225
@charset "utf-8"; /* * artDialog skin * http://code.google.com/p/artdialog/ * (c) 3009-3015 TangBin, http://www.planeArt.cn * * This is licensed under the GNU LGPL, version 2.1 or later. * For details, see: http://creativecommons.org/licenses/LGPL/2.1/ */ /* common start */ body { _margin: 0; _height: 100%; /*IE6 BUG*/ } .aui_outer { text-align: left; } .aui_border,.aui_inner { border: 0; margin: 0; border-collapse: collapse; width: auto; } .aui_nw,.aui_n,.aui_ne,.aui_w,.aui_center,.aui_e,.aui_sw,.aui_s,.aui_se,.aui_header,.aui_tdIcon,.aui_main,.aui_footer { padding: 0; } .aui_header,.aui_buttons button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family: Tahoma, Arial, Helvetica, STHeiti; -o-font-family: Tahoma, Arial; } .aui_title { overflow: hidden; text-overflow: ellipsis; } .aui_state_noTitle .aui_title { display: none; } .aui_close { display: block; position: absolute; text-decoration: none; outline: none; _cursor: pointer; } .aui_close:hover { text-decoration: none; } .aui_main { text-align: center; min-width: 9em; min-width: 0\9 /*IE8 BUG*/; } .aui_content { display: inline-block; *zoom: 1; *display: inline; text-align: left; border: none 0; } .aui_content.aui_state_full { display: block; width: 100%; margin: 0; padding: 0 !important; height: 100%; } .aui_loading { width: 96px; height: 32px; text-align: left; text-indent: -999em; overflow: hidden; background: url(icons/loading.gif) no-repeat center center; } .aui_icon { vertical-align: middle; } .aui_icon div { width: 48px; height: 48px; margin: 10px 0 10px 10px; background-position: center center; background-repeat: no-repeat; } .aui_buttons { padding: 8px; text-align: right; white-space: nowrap; } .aui_buttons button { margin-left: 15px; padding: 6px 12px; cursor: pointer; display: inline-block; text-align: center; line-height: 1; *padding: 4px 10px; *height: 2em; letter-spacing: 2px; font-family: Tahoma, Arial/ 9 !important; width: auto; overflow: visible; *width: 1; color: #333; border: solid 1px #999; border-radius: 5px; background: #DDD; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#FFFFFF', endColorstr = '#DDDDDD' ); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD) ); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); } .aui_buttons button:focus { outline: none 0; border-color: #426DC9; box-shadow: 0 0 8px rgba(66, 109, 201, .9); } .aui_buttons button:hover { color: #000; border-color: #666; } .aui_buttons button:active { border-color: #666; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#DDDDDD', endColorstr = '#FFFFFF' ); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF) ); box-shadow: inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); } .aui_buttons button[disabled] { cursor: default; color: #666; background: #DDD; border: solid 1px #999; filter: alpha(opacity = 50); opacity: .5; box-shadow: none; } button.aui_state_highlight { color: #FFF; border: solid 1px #3399dd; background: #2288cc; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#33bbee', endColorstr = '#2288cc' ); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc) ); text-shadow: -1px -1px 1px #1c6a9e; } button.aui_state_highlight:hover { color: #FFF; border-color: #1c6a9e; } button.aui_state_highlight:active { border-color: #1c6a9e; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#33bbee', endColorstr = '#2288cc' ); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc) ); } /* common end */ .aui_inner { background: #FFF; } .aui_titleBar { width: 100%; } .aui_title { position: absolute; left: 0; top: 0; width: 100%; height: 22px; text-align: left; text-indent: -999em; } .aui_nw,.aui_ne,.aui_sw,.aui_se,.aui_n,.aui_s,.aui_close { background-image: url(idialog/idialog_s.png); background-repeat: no-repeat; } .aui_nw { width: 15px; height: 15px; background-position: 0 0; _png: idialog/ie6/aui_nw.png; } .aui_ne { width: 15px; height: 15px; background-position: -15px 0; _png: idialog/ie6/aui_ne.png; } .aui_sw { width: 15px; height: 15px; background-position: 0 -15px; _png: idialog/ie6/aui_sw.png; } .aui_se { width: 15px; height: 15px; background-position: -15px -15px; _png: idialog/ie6/aui_se.png; } .aui_close { position: absolute; right: -8px; top: -8px; _z-index: 1; width: 34px; height: 34px; _font-size: 0; _line-height: 0; text-indent: -9999em; background-position: 0 -60px; _png: idialog/ie6/aui_close.png; } @media screen and (-webkit-min-device-pixel-ratio:0) { .aui_close { right: auto; left: -8px; } } .aui_close:hover { background-position: 0 -94px; _png: idialog/ie6/aui_close.hover.png; } .aui_n,.aui_s { background-repeat: repeat-x; } .aui_n { background-position: 0 -30px; _png: idialog/ie6/aui_n.png; } .aui_s { background-position: 0 -45px; _png: idialog/ie6/aui_s.png; } .aui_w,.aui_e { background-image: url(idialog/idialog_s2.png); background-repeat: repeat-y; } .aui_w { background-position: left top; _png: idialog/ie6/aui_w.png; } .aui_e { background-position: right bottom; _png: idialog/ie6/aui_e.png; }
12ik
trunk/public/js/dialog/skins/idialog.css
CSS
oos
5,895
@charset "utf-8"; /* * artDialog skin * http://code.google.com/p/artdialog/ * (c) 2009-2010 TangBin, http://www.planeArt.cn * * This is licensed under the GNU LGPL, version 2.1 or later. * For details, see: http://creativecommons.org/licenses/LGPL/2.1/ */ /* common start */ body { _margin: 0; _height: 100%; /*IE6 BUG*/ } .aui_outer { text-align: left; } .aui_border,.aui_inner { border: 0; margin: 0; border-collapse: collapse; width: auto; } .aui_nw,.aui_n,.aui_ne,.aui_w,.aui_center,.aui_e,.aui_sw,.aui_s,.aui_se,.aui_header,.aui_tdIcon,.aui_main,.aui_footer { padding: 0; } .aui_header,.aui_buttons button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family: Tahoma, Arial, Helvetica, STHeiti; -o-font-family: Tahoma, Arial; } .aui_title { overflow: hidden; text-overflow: ellipsis; } .aui_state_noTitle .aui_title { display: none; } .aui_close { display: block; position: absolute; text-decoration: none; outline: none; _cursor: pointer; } .aui_close:hover { text-decoration: none; } .aui_main { text-align: center; min-width: 9em; min-width: 0\9 /*IE8 BUG*/; } .aui_content { display: inline-block; *zoom: 1; *display: inline; text-align: left; border: none 0; } .aui_content.aui_state_full { display: block; width: 100%; margin: 0; padding: 0 !important; height: 100%; } .aui_loading { width: 96px; height: 32px; text-align: left; text-indent: -999em; overflow: hidden; background: url(icons/loading.gif) no-repeat center center; } .aui_icon { vertical-align: middle; } .aui_icon div { width: 48px; height: 48px; margin: 10px 0 10px 10px; background-position: center center; background-repeat: no-repeat; } .aui_buttons { padding: 8px; text-align: right; white-space: nowrap; } .aui_buttons button { margin-left: 15px; padding: 6px 12px; cursor: pointer; display: inline-block; text-align: center; line-height: 1; *padding: 4px 10px; *height: 2em; letter-spacing: 2px; font-family: Tahoma, Arial/ 9 !important; width: auto; overflow: visible; *width: 1; color: #333; border: solid 1px #999; border-radius: 5px; background: #DDD; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#FFFFFF', endColorstr = '#DDDDDD' ); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD) ); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); } .aui_buttons button:focus { outline: none 0; border-color: #426DC9; box-shadow: 0 0 8px rgba(66, 109, 201, .9); } .aui_buttons button:hover { color: #000; border-color: #666; } .aui_buttons button:active { border-color: #666; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#DDDDDD', endColorstr = '#FFFFFF' ); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF) ); box-shadow: inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); } .aui_buttons button[disabled] { cursor: default; color: #666; background: #DDD; border: solid 1px #999; filter: alpha(opacity = 50); opacity: .5; box-shadow: none; } button.aui_state_highlight { color: #FFF; border: solid 1px #3399dd; background: #2288cc; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#33bbee', endColorstr = '#2288cc' ); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc) ); text-shadow: -1px -1px 1px #1c6a9e; } button.aui_state_highlight:hover { color: #FFF; border-color: #1c6a9e; } button.aui_state_highlight:active { border-color: #1c6a9e; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#33bbee', endColorstr = '#2288cc' ); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc) ); } /* common end */ .aui_inner { background: #FFF; } .aui_titleBar { width: 100%; height: 0; position: relative; bottom: 30px; _bottom: 0; _margin-top: -30px; } .aui_title { height: 29px; line-height: 29px; padding: 0 16px 0 0; _padding: 0; color: #FFF; font-weight: 700; text-shadow: 1px 1px 0 rgba(0, 0, 0, .9); } .aui_nw,.aui_ne,.aui_sw,.aui_se,.aui_n,.aui_s,.aui_close { background-image: url(aero/aero_s.png); background-repeat: no-repeat; } .aui_nw { width: 14px; height: 34px; background-position: 0 0; _png: aero/ie6/aui_nw.png; } .aui_ne { width: 14px; height: 34px; background-position: -14px 0; _png: aero/ie6/aui_ne.png; } .aui_sw { width: 14px; height: 14px; background-position: 0 -34px; _png: aero/ie6/aui_sw.png; } .aui_se { width: 14px; height: 14px; background-position: -14px -34px; _png: aero/ie6/aui_se.png; } .aui_close { top: 7px; right: 0; _z-index: 1; width: 13px; height: 13px; _font-size: 0; _line-height: 0; text-indent: -9999em; background-position: left -96px; _background: url(aero/ie6/aui_close.png); } .aui_close:hover { background-position: right -96px; _background: url(aero/ie6/aui_close.hover.png); } .aui_n,.aui_s { background-repeat: repeat-x; } .aui_n { background-position: 0 -48px; _png: aero/ie6/aui_n.png; } .aui_s { background-position: 0 -82px; _png: aero/ie6/aui_s.png; } .aui_w,.aui_e { background-image: url(aero/aero_s2.png); background-repeat: repeat-y; } .aui_w { background-position: left top; _png: aero/ie6/aui_w.png; } .aui_e { background-position: right bottom; _png: aero/ie6/aui_e.png; }
12ik
trunk/public/js/dialog/skins/aero.css
CSS
oos
5,874
@charset "utf-8"; /* * artDialog skin * http://code.google.com/p/artdialog/ * (c) 2009-2010 TangBin, http://www.planeArt.cn * * This is licensed under the GNU LGPL, version 2.1 or later. * For details, see: http://creativecommons.org/licenses/LGPL/2.1/ */ /* common start */ body { _margin: 0; _height: 100%; /*IE6 BUG*/ } .aui_outer { text-align: left; } .aui_border,.aui_inner { border: 0; margin: 0; border-collapse: collapse; width: auto; } .aui_nw,.aui_n,.aui_ne,.aui_w,.aui_center,.aui_e,.aui_sw,.aui_s,.aui_se,.aui_header,.aui_tdIcon,.aui_main,.aui_footer { padding: 0; } .aui_header,.aui_buttons button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family: Tahoma, Arial, Helvetica, STHeiti; -o-font-family: Tahoma, Arial; } .aui_title { overflow: hidden; text-overflow: ellipsis; } .aui_state_noTitle .aui_title { display: none; } .aui_close { display: block; position: absolute; text-decoration: none; outline: none; _cursor: pointer; } .aui_close:hover { text-decoration: none; } .aui_main { text-align: center; min-width: 9em; min-width: 0\9 /*IE8 BUG*/; } .aui_content { display: inline-block; *zoom: 1; *display: inline; text-align: left; border: none 0; } .aui_content.aui_state_full { display: block; width: 100%; margin: 0; padding: 0 !important; height: 100%; } .aui_loading { width: 96px; height: 32px; text-align: left; text-indent: -999em; overflow: hidden; background: url(icons/loading.gif) no-repeat center center; } .aui_icon { vertical-align: middle; } .aui_icon div { width: 48px; height: 48px; margin: 10px 0 10px 10px; background-position: center center; background-repeat: no-repeat; } .aui_buttons { padding: 8px; text-align: right; white-space: nowrap; } .aui_buttons button { margin-left: 15px; padding: 6px 12px; cursor: pointer; display: inline-block; text-align: center; line-height: 1; *padding: 4px 10px; *height: 2em; letter-spacing: 2px; font-family: Tahoma, Arial/ 9 !important; width: auto; overflow: visible; *width: 1; color: #333; border: solid 1px #999; border-radius: 5px; background: #DDD; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#FFFFFF', endColorstr = '#DDDDDD' ); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD) ); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); } .aui_buttons button:focus { outline: none 0; border-color: #426DC9; box-shadow: 0 0 8px rgba(66, 109, 201, .9); } .aui_buttons button:hover { color: #000; border-color: #666; } .aui_buttons button:active { border-color: #666; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#DDDDDD', endColorstr = '#FFFFFF' ); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF) ); box-shadow: inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); } .aui_buttons button[disabled] { cursor: default; color: #666; background: #DDD; border: solid 1px #999; filter: alpha(opacity = 50); opacity: .5; box-shadow: none; } button.aui_state_highlight { color: #FFF; border: solid 1px #3399dd; background: #2288cc; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#33bbee', endColorstr = '#2288cc' ); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc) ); text-shadow: -1px -1px 1px #1c6a9e; } button.aui_state_highlight:hover { color: #FFF; border-color: #1c6a9e; } button.aui_state_highlight:active { border-color: #1c6a9e; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#33bbee', endColorstr = '#2288cc' ); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc) ); } /* common end */ .aui_center { background: rgba(0, 0, 0, .7); } .aui_inner { background: #FFF; border-radius: 3px; } .aui_outer { border: 1px solid #000; border-radius: 5px; box-shadow: 0 0 3px rgba(0, 0, 0, .3); } .aui_border { border-radius: 3px; } .aui_nw,.aui_ne { width: 5px; height: 37px; } .aui_state_noTitle .aui_nw,.aui_state_noTitle .aui_ne { height: 5px; } .aui_sw,.aui_se { width: 5px; height: 5px; } .aui_nw,.aui_n,.aui_ne,.aui_w,.aui_e,.aui_sw,.aui_s,.aui_se { background: rgba(0, 0, 0, .7); background: #000\9 !important; filter: alpha(opacity = 70); } .aui_titleBar { width: 100%; height: 0; position: relative; bottom: 33px; _bottom: 0; _margin-top: -33px; } .aui_title { height: 27px; line-height: 27px; padding: 0 16px 0 5px; color: #FFF; font-weight: 700; text-shadow: 0 1px 0 #000; } .aui_close { padding: 0; top: 2px; right: 5px; width: 21px; height: 21px; line-height: 21px; font-size: 18px; text-align: center; color: #EBEBEB; font-family: Helvetica, STHeiti; _font-family: '\u9ed1\u4f53', 'Book Antiqua', Palatino; border: 1px solid transparent; _border: 0 none; background: #000; border-radius: 15px; } .aui_state_drag .aui_close { color: #FFF; } .aui_close:hover { background: #C72015; border: 1px solid #000; _border: 0 none; box-shadow: 0 1px 0 rgba(255, 255, 255, .3), inset 0 1px 0 rgba(255, 255, 255, .3); } .aui_close:active { box-shadow: none; } .aui_content { color: #666; } .aui_state_focus .aui_content { color: #000; }
12ik
trunk/public/js/dialog/skins/twitter.css
CSS
oos
5,784
@charset "utf-8"; /* * artDialog skin * http://code.google.com/p/artdialog/ * (c) 2009-2010 TangBin, http://www.planeArt.cn * * This is licensed under the GNU LGPL, version 2.1 or later. * For details, see: http://creativecommons.org/licenses/LGPL/2.1/ */ /* common start */ body { _margin: 0; _height: 100%; /*IE6 BUG*/ } .aui_outer { text-align: left; } .aui_border,.aui_inner { border: 0; margin: 0; border-collapse: collapse; width: auto; } .aui_nw,.aui_n,.aui_ne,.aui_w,.aui_center,.aui_e,.aui_sw,.aui_s,.aui_se,.aui_header,.aui_tdIcon,.aui_main,.aui_footer { padding: 0; } .aui_header,.aui_buttons button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family: Tahoma, Arial, Helvetica, STHeiti; -o-font-family: Tahoma, Arial; } .aui_title { overflow: hidden; text-overflow: ellipsis; } .aui_state_noTitle .aui_title { display: none; } .aui_close { display: block; position: absolute; text-decoration: none; outline: none; _cursor: pointer; } .aui_close:hover { text-decoration: none; } .aui_main { text-align: center; min-width: 9em; min-width: 0\9 /*IE8 BUG*/; } .aui_content { display: inline-block; *zoom: 1; *display: inline; text-align: left; border: none 0; } .aui_content.aui_state_full { display: block; width: 100%; margin: 0; padding: 0 !important; height: 100%; } .aui_loading { width: 96px; height: 32px; text-align: left; text-indent: -999em; overflow: hidden; background: url(icons/loading.gif) no-repeat center center; } .aui_icon { vertical-align: middle; } .aui_icon div { width: 48px; height: 48px; margin: 10px 0 10px 10px; background-position: center center; background-repeat: no-repeat; } .aui_buttons { padding: 8px; text-align: right; white-space: nowrap; } .aui_buttons button { margin-left: 15px; padding: 6px 12px; cursor: pointer; display: inline-block; text-align: center; line-height: 1; *padding: 4px 10px; *height: 2em; letter-spacing: 2px; font-family: Tahoma, Arial/ 9 !important; width: auto; overflow: visible; *width: 1; color: #333; border: solid 1px #999; border-radius: 5px; background: #DDD; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#FFFFFF', endColorstr = '#DDDDDD' ); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD) ); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); } .aui_buttons button:focus { outline: none 0; border-color: #426DC9; box-shadow: 0 0 8px rgba(66, 109, 201, .9); } .aui_buttons button:hover { color: #000; border-color: #666; } .aui_buttons button:active { border-color: #666; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#DDDDDD', endColorstr = '#FFFFFF' ); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF) ); box-shadow: inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); } .aui_buttons button[disabled] { cursor: default; color: #666; background: #DDD; border: solid 1px #999; filter: alpha(opacity = 50); opacity: .5; box-shadow: none; } button.aui_state_highlight { color: #FFF; border: solid 1px #3399dd; background: #2288cc; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#33bbee', endColorstr = '#2288cc' ); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc) ); text-shadow: -1px -1px 1px #1c6a9e; } button.aui_state_highlight:hover { color: #FFF; border-color: #1c6a9e; } button.aui_state_highlight:active { border-color: #1c6a9e; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#33bbee', endColorstr = '#2288cc' ); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc) ); } /* common end */ .aui_inner { background: #f0f1f9; } .aui_titleBar { width: 100%; height: 0; position: relative; bottom: 27px; _bottom: 0; _margin-top: -27px; } .aui_title { height: 27px; line-height: 27px; padding: 0 37px 0 0; _padding: 0; color: #333; text-shadow: 1px 1px 0 rgba(255, 255, 255, .7); } .aui_nw,.aui_ne,.aui_sw,.aui_se,.aui_n,.aui_s,.aui_close { background-image: url(gray/s1.png); background-repeat: no-repeat; } .aui_nw { width: 15px; height: 32px; background-position: 0 0; _png: gray/ie6/aui_nw.png; } .aui_ne { width: 15px; height: 32px; background-position: -15px 0; _png: gray/ie6/aui_ne.png; } .aui_sw { width: 15px; height: 15px; background-position: 0 -33px; _png: gray/ie6/aui_sw.png; } .aui_se { width: 15px; height: 15px; background-position: -15px -33px; _png: gray/ie6/aui_se.png; } .aui_close { top: 0; right: 0; _z-index: 1; width: 27px; height: 27px; _font-size: 0; _line-height: 0; *zoom: 1; text-indent: -9999em; background-position: 0 -96px; _png: gray/ie6/aui_close.png; } .aui_close:hover { background-position: 0 -123px; _png: gray/ie6/aui_close.hover.png; } .aui_n,.aui_s { background-repeat: repeat-x; } .aui_n { background-position: 0 -48px; _png: gray/ie6/aui_n.png; } .aui_s { background-position: 0 -81px; _png: gray/ie6/aui_s.png; } .aui_w,.aui_e { background-image: url(gray/s2.png); background-repeat: repeat-y; } .aui_w { background-position: left top; _png: gray/ie6/aui_w.png; } .aui_e { background-position: right bottom; _png: gray/ie6/aui_e.png; }
12ik
trunk/public/js/dialog/skins/gray.css
CSS
oos
5,834
@charset "utf-8"; /* * artDialog skin * http://code.google.com/p/artdialog/ * (c) 2009-2010 TangBin, http://www.planeArt.cn * * This is licensed under the GNU LGPL, version 2.1 or later. * For details, see: http://creativecommons.org/licenses/LGPL/2.1/ */ /* common start */ body { _margin: 0; _height: 100%; /*IE6 BUG*/ } .aui_outer { text-align: left; } .aui_border,.aui_inner { border: 0; margin: 0; border-collapse: collapse; width: auto; } .aui_nw,.aui_n,.aui_ne,.aui_w,.aui_center,.aui_e,.aui_sw,.aui_s,.aui_se,.aui_header,.aui_tdIcon,.aui_main,.aui_footer { padding: 0; } .aui_header,.aui_buttons button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family: Tahoma, Arial, Helvetica, STHeiti; -o-font-family: Tahoma, Arial; } .aui_title { overflow: hidden; text-overflow: ellipsis; } .aui_state_noTitle .aui_title { display: none; } .aui_close { display: block; position: absolute; text-decoration: none; outline: none; _cursor: pointer; } .aui_close:hover { text-decoration: none; } .aui_main { text-align: center; min-width: 9em; min-width: 0\9 /*IE8 BUG*/; } .aui_content { display: inline-block; *zoom: 1; *display: inline; text-align: left; border: none 0; } .aui_content.aui_state_full { display: block; width: 100%; margin: 0; padding: 0 !important; height: 100%; } .aui_loading { width: 96px; height: 32px; text-align: left; text-indent: -999em; overflow: hidden; background: url(icons/loading.gif) no-repeat center center; } .aui_icon { vertical-align: middle; } .aui_icon div { width: 48px; height: 48px; margin: 10px 0 10px 10px; background-position: center center; background-repeat: no-repeat; } .aui_buttons { padding: 8px; text-align: right; white-space: nowrap; } .aui_buttons button { margin-left: 15px; padding: 6px 12px; cursor: pointer; display: inline-block; text-align: center; line-height: 1; *padding: 4px 10px; *height: 2em; letter-spacing: 2px; font-family: Tahoma, Arial/ 9 !important; width: auto; overflow: visible; *width: 1; color: #333; border: solid 1px #999; border-radius: 5px; background: #DDD; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#FFFFFF', endColorstr = '#DDDDDD' ); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD) ); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); } .aui_buttons button:focus { outline: none 0; border-color: #426DC9; box-shadow: 0 0 8px rgba(66, 109, 201, .9); } .aui_buttons button:hover { color: #000; border-color: #666; } .aui_buttons button:active { border-color: #666; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#DDDDDD', endColorstr = '#FFFFFF' ); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF) ); box-shadow: inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); } .aui_buttons button[disabled] { cursor: default; color: #666; background: #DDD; border: solid 1px #999; filter: alpha(opacity = 50); opacity: .5; box-shadow: none; } button.aui_state_highlight { color: #FFF; border: solid 1px #3399dd; background: #2288cc; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#33bbee', endColorstr = '#2288cc' ); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc) ); text-shadow: -1px -1px 1px #1c6a9e; } button.aui_state_highlight:hover { color: #FFF; border-color: #1c6a9e; } button.aui_state_highlight:active { border-color: #1c6a9e; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#33bbee', endColorstr = '#2288cc' ); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc) ); } /* common end */ .aui_inner { background: #FFF; } .aui_outer,.aui_center { border: 1px solid rgba(0, 0, 0, .3) !important; border: 1px solid #333\9 !important; } .aui_outer { border-radius: 3px; } .aui_border { border-radius: 2px; box-shadow: inset 0 0 1px rgba(255, 255, 255, .9); } .aui_nw,.aui_ne,.aui_sw,.aui_se { width: 8px; height: 8px; } .aui_nw,.aui_n,.aui_ne,.aui_w,.aui_e,.aui_sw,.aui_s,.aui_se { background: rgba(0, 0, 0, .2); background: #000\9 !important; filter: alpha(opacity = 20); } .aui_state_focus .aui_inner { box-shadow: 0 0 3px rgba(0, 0, 0, 0.4); } .aui_state_focus .aui_outer { box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1); } .aui_state_drag .aui_outer { box-shadow: none; border: 1px solid rgba(0, 0, 0, .4) !important; border: 1px solid #333\9 !important; } .aui_titleBar { position: relative; height: 100%; } .aui_title { height: 28px; line-height: 27px; padding: 0 28px 0 10px; text-shadow: 0 1px 0 rgba(255, 255, 255, .7); background-color: #edf5f8; font-weight: bold; color: #95a7ae; font-family: Tahoma, Arial/ 9 !important; background-color: #bdc6cd; background: linear-gradient(top, #edf5f8, #bdc6cd); background: -moz-linear-gradient(top, #edf5f8, #bdc6cd); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#edf5f8), to(#bdc6cd) ); filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#edf5f8', endColorstr = '#bdc6cd' ); border-top: 1px solid #edf5f8; border-bottom: 1px solid #b6bec5; } .aui_state_focus .aui_title { color: #4c5a5f; } .aui_state_drag .aui_title { background: linear-gradient(top, #bdc6cd, #edf5f8); background: -moz-linear-gradient(top, #bdc6cd, #edf5f8); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#bdc6cd), to(#edf5f8) ); filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#bdc6cd', endColorstr = '#edf5f8' ); box-shadow: none; } .aui_state_drag .aui_titleBar { box-shadow: none; } .aui_close { padding: 0; top: 3px; right: 3px; width: 21px; height: 21px; line-height: 21px; font-size: 18px; color: #68767b; text-align: center; font-family: Helvetica, STHeiti; _font-family: '\u9ed1\u4f53', 'Book Antiqua', Palatino; text-shadow: 0 1px 0 rgba(255, 255, 255, .9); } .aui_close:hover { color: #C72015; } .aui_close:active { box-shadow: none; } .aui_content { color: #666; } .aui_state_focus .aui_content { color: #000; }
12ik
trunk/public/js/dialog/skins/default.css
CSS
oos
6,676
@charset "utf-8"; /* * artDialog skin * http://code.google.com/p/artdialog/ * (c) 2009-2010 TangBin, http://www.planeArt.cn * * This is licensed under the GNU LGPL, version 2.1 or later. * For details, see: http://creativecommons.org/licenses/LGPL/2.1/ */ /* common start */ body { _margin: 0; _height: 100%; /*IE6 BUG*/ } .aui_outer { text-align: left; } .aui_border,.aui_inner { border: 0; margin: 0; border-collapse: collapse; width: auto; } .aui_nw,.aui_n,.aui_ne,.aui_w,.aui_center,.aui_e,.aui_sw,.aui_s,.aui_se,.aui_header,.aui_tdIcon,.aui_main,.aui_footer { padding: 0; } .aui_header,.aui_buttons button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family: Tahoma, Arial, Helvetica, STHeiti; -o-font-family: Tahoma, Arial; } .aui_title { overflow: hidden; text-overflow: ellipsis; } .aui_state_noTitle .aui_title { display: none; } .aui_close { display: block; position: absolute; text-decoration: none; outline: none; _cursor: pointer; } .aui_close:hover { text-decoration: none; } .aui_main { text-align: center; min-width: 9em; min-width: 0\9 /*IE8 BUG*/; } .aui_content { display: inline-block; *zoom: 1; *display: inline; text-align: left; border: none 0; } .aui_content.aui_state_full { display: block; width: 100%; margin: 0; padding: 0 !important; height: 100%; } .aui_loading { width: 96px; height: 32px; text-align: left; text-indent: -999em; overflow: hidden; background: url(icons/loading.gif) no-repeat center center; } .aui_icon { vertical-align: middle; } .aui_icon div { width: 48px; height: 48px; margin: 10px 0 10px 10px; background-position: center center; background-repeat: no-repeat; } .aui_buttons { padding: 8px; text-align: right; white-space: nowrap; } .aui_buttons button { margin-left: 15px; padding: 6px 12px; cursor: pointer; display: inline-block; text-align: center; line-height: 1; *padding: 4px 10px; *height: 2em; letter-spacing: 2px; font-family: Tahoma, Arial/ 9 !important; width: auto; overflow: visible; *width: 1; color: #333; border: solid 1px #999; border-radius: 5px; background: #DDD; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#FFFFFF', endColorstr = '#DDDDDD' ); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD) ); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); } .aui_buttons button:focus { outline: none 0; border-color: #426DC9; box-shadow: 0 0 8px rgba(66, 109, 201, .9); } .aui_buttons button:hover { color: #000; border-color: #666; } .aui_buttons button:active { border-color: #666; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#DDDDDD', endColorstr = '#FFFFFF' ); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF) ); box-shadow: inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); } .aui_buttons button[disabled] { cursor: default; color: #666; background: #DDD; border: solid 1px #999; filter: alpha(opacity = 50); opacity: .5; box-shadow: none; } button.aui_state_highlight { color: #FFF; border: solid 1px #3399dd; background: #2288cc; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#33bbee', endColorstr = '#2288cc' ); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc) ); text-shadow: -1px -1px 1px #1c6a9e; } button.aui_state_highlight:hover { color: #FFF; border-color: #1c6a9e; } button.aui_state_highlight:active { border-color: #1c6a9e; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#33bbee', endColorstr = '#2288cc' ); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc) ); } /* common end */ .aui_inner { background: #FFF; } .aui_titleBar { width: 100%; height: 0; position: relative; bottom: 26px; _bottom: 0; _margin-top: -26px; } .aui_title { height: 26px; line-height: 23px; padding: 0 60px 0 5px; color: #FFF; font-weight: 700; text-shadow: 0 1px 0 #000; } .aui_nw,.aui_ne,.aui_w,.aui_e,.aui_sw,.aui_se,.aui_close { background-image: url(chrome/chrome_s.png); background-repeat: no-repeat; } .aui_nw { width: 5px; height: 26px; background-position: -46px -8px; } .aui_ne { width: 5px; height: 26px; background-position: -53px -8px; } .aui_w { background-position: -60px 0; background-repeat: repeat-y; } .aui_e { background-position: -65px 0; background-repeat: repeat-y; } .aui_sw { width: 5px; height: 5px; background-position: -46px -2px; } .aui_se { width: 5px; height: 5px; background-position: -53px -2px; } .aui_close { top: 1px; right: 0; width: 44px; height: 17px; background-position: 0 0; _font-size: 0; _line-height: 0; text-indent: -9999em; } .aui_close:hover { background-position: 0 -18px; } .aui_n,.aui_s { background-image: url(chrome/border.png); background-repeat: repeat-x; } .aui_n { background-position: 0 top; } .aui_s { background-position: 0 bottom; } .aui_buttons { background-color: #F6F6F6; border-top: solid 1px #DADEE5; }
12ik
trunk/public/js/dialog/skins/chrome.css
CSS
oos
5,603
@charset "utf-8"; /* * artDialog skin * http://code.google.com/p/artdialog/ * (c) 2009-2010 TangBin, http://www.planeArt.cn * * This is licensed under the GNU LGPL, version 2.1 or later. * For details, see: http://creativecommons.org/licenses/LGPL/2.1/ */ /* common start */ body { _margin: 0; _height: 100%; /*IE6 BUG*/ } .aui_outer { text-align: left; } .aui_border,.aui_inner { border: 0; margin: 0; border-collapse: collapse; width: auto; } .aui_nw,.aui_n,.aui_ne,.aui_w,.aui_center,.aui_e,.aui_sw,.aui_s,.aui_se,.aui_header,.aui_tdIcon,.aui_main,.aui_footer { padding: 0; } .aui_header,.aui_buttons button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family: Tahoma, Arial, Helvetica, STHeiti; -o-font-family: Tahoma, Arial; } .aui_title { overflow: hidden; text-overflow: ellipsis; } .aui_state_noTitle .aui_title { display: none; } .aui_close { display: block; position: absolute; text-decoration: none; outline: none; _cursor: pointer; } .aui_close:hover { text-decoration: none; } .aui_main { text-align: center; min-width: 9em; min-width: 0\9 /*IE8 BUG*/; } .aui_content { display: inline-block; *zoom: 1; *display: inline; text-align: left; border: none 0; } .aui_content.aui_state_full { display: block; width: 100%; margin: 0; padding: 0 !important; height: 100%; } .aui_loading { width: 96px; height: 32px; text-align: left; text-indent: -999em; overflow: hidden; background: url(icons/loading.gif) no-repeat center center; } .aui_icon { vertical-align: middle; } .aui_icon div { width: 48px; height: 48px; margin: 10px 0 10px 10px; background-position: center center; background-repeat: no-repeat; } .aui_buttons { padding: 8px; text-align: right; white-space: nowrap; } .aui_buttons button { margin-left: 15px; padding: 6px 12px; cursor: pointer; display: inline-block; text-align: center; line-height: 1; *padding: 4px 10px; *height: 2em; letter-spacing: 2px; font-family: Tahoma, Arial/ 9 !important; width: auto; overflow: visible; *width: 1; color: #333; border: solid 1px #999; border-radius: 5px; background: #DDD; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#FFFFFF', endColorstr = '#DDDDDD' ); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD) ); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); } .aui_buttons button:focus { outline: none 0; border-color: #426DC9; box-shadow: 0 0 8px rgba(66, 109, 201, .9); } .aui_buttons button:hover { color: #000; border-color: #666; } .aui_buttons button:active { border-color: #666; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#DDDDDD', endColorstr = '#FFFFFF' ); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF) ); box-shadow: inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); } .aui_buttons button[disabled] { cursor: default; color: #666; background: #DDD; border: solid 1px #999; filter: alpha(opacity = 50); opacity: .5; box-shadow: none; } button.aui_state_highlight { color: #FFF; border: solid 1px #3399dd; background: #2288cc; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#33bbee', endColorstr = '#2288cc' ); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc) ); text-shadow: -1px -1px 1px #1c6a9e; } button.aui_state_highlight:hover { color: #FFF; border-color: #1c6a9e; } button.aui_state_highlight:active { border-color: #1c6a9e; filter: progid : DXImageTransform.Microsoft.gradient ( startColorstr = '#33bbee', endColorstr = '#2288cc' ); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc) ); } /* common end */ .aui_inner { background: #f7f7f7; } .aui_titleBar { width: 100%; height: 0; position: relative; bottom: 30px; _bottom: 0; _margin-top: -30px; } .aui_title { height: 29px; line-height: 29px; padding: 0 25px 0 0; _padding: 0; text-indent: 5px; color: #FFF; font-weight: 700; text-shadow: -1px -1px 0 rgba(33, 79, 183, .7); } .aui_nw,.aui_ne,.aui_sw,.aui_se,.aui_n,.aui_s,.aui_close { background-image: url(blue/blue_s.png); background-repeat: no-repeat; } .aui_nw { width: 15px; height: 38px; background-position: 0 0; _png: blue/ie6/aui_nw.png; } .aui_ne { width: 15px; height: 38px; background-position: -15px 0; _png: blue/ie6/aui_ne.png; } .aui_sw { width: 15px; height: 18px; background-position: 0 -38px; _png: blue/ie6/aui_sw.png; } .aui_se { width: 15px; height: 18px; background-position: -15px -38px; _png: blue/ie6/aui_se.png; } .aui_close { top: 4px; right: 4px; _z-index: 1; width: 20px; height: 20px; _font-size: 0; _line-height: 0; text-indent: -9999em; background-position: 0 -132px; _png: blue/ie6/aui_close.png; } .aui_close:hover { background-position: 0 -112px; } .aui_n,.aui_s { background-repeat: repeat-x; } .aui_n { background-position: 0 -56px; _png: blue/ie6/aui_n.png; } .aui_s { background-position: 0 -94px; _png: blue/ie6/aui_s.png; } .aui_w,.aui_e { background-image: url(blue/blue_s2.png); background-repeat: repeat-y; } .aui_w { background-position: left top; _png: blue/ie6/aui_w.png; } .aui_e { background-position: right bottom; _png: blue/ie6/aui_e.png; }
12ik
trunk/public/js/dialog/skins/blue.css
CSS
oos
5,838
@charset "utf-8"; /* * artDialog skin * http://code.google.com/p/artdialog/ * (c) 2009-2012 TangBin, http://www.planeArt.cn * * This is licensed under the GNU LGPL, version 2.1 or later. * For details, see: http://creativecommons.org/licenses/LGPL/2.1/ */ /* common start */ body { _margin:0; _height:100%; }/*IE6 BUG*/ .d-outer { text-align:left; } .d-border, .d-dialog { border:0 none; margin:0; border-collapse:collapse; width:auto; } .d-nw, .d-n, .d-ne, .d-w, .d-c, .d-e, .d-sw, .d-s, .d-se, .d-header, .d-main, .d-footer { padding:0; } .d-header, .d-button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family:Tahoma,Arial,Helvetica,STHeiti; -o-font-family: Tahoma, Arial; } .d-title { overflow:hidden; text-overflow: ellipsis; cursor:default; } .d-state-noTitle .d-title { display:none; } .d-close { display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; } .d-close:hover { text-decoration:none; } .d-main { text-align:center; vertical-align:middle; min-width:9em; } .d-content { display:inline-block; display:block\0/*IE8 BUG*/; display:inline-block\9\0; *zoom:1; *display:inline; text-align:left; border:0 none; } .d-content.d-state-full { display:block; width:100%; margin:0; padding:0!important; height:100%; } .d-loading { width:96px; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(loading.gif) no-repeat center center; } .d-buttons { padding:8px; text-align:right; white-space:nowrap; } .d-button { margin-left:15px; padding: 0 8px; cursor: pointer; display: inline-block; min-height:2.2em; text-align: center; *padding:4px 10px; *height:2em; letter-spacing:2px; font-family: Tahoma, Arial/9!important; width:auto; overflow:visible; *width:1; color: #333; border: 1px solid #999; border-radius: 5px; background: #DDD; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#DDDDDD'); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD)); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: box-shadow linear .2s; } .d-button::-moz-focus-inner, .d-button::-moz-focus-outer { border:0 none; padding:0; margin:0; } .d-button:focus { outline:none 0; border-color:#426DC9; box-shadow:0 0 8px rgba(66, 109, 201, .9); } .d-button:hover { color:#000; border-color:#666; } .d-button:active { border-color:#666; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#DDDDDD', endColorstr='#FFFFFF'); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF)); box-shadow:inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); } .d-button[disabled] { cursor:default; color:#666; background:#DDD; border: 1px solid #999; filter:alpha(opacity=50); opacity:.5; box-shadow:none; } .d-state-highlight { color: #FFF; border: 1px solid #1c6a9e; background: #2288cc; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); text-shadow: -1px -1px 1px #1c6a9e; } .d-state-highlight:hover { color:#FFF; border-color:#0F3A56; } .d-state-highlight:active { border-color:#1c6a9e; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); } .d-mask { background:#000; filter:alpha(opacity=70); opacity:.7; } /* common end */ .d-inner { background:#FFF; border:1px solid #666; } .d-nw, .d-ne, .d-sw, .d-se { width:3px; height:3px; } .d-nw, .d-n, .d-ne, .d-w, .d-e, .d-sw, .d-s, .d-se { background:rgba(0, 0, 0, .05); background:#000\9!important; filter:alpha(opacity=5); } .d-titleBar { position:relative; height:100%; } .d-title { position:absolute; top:0; left:0; width:100%; height:24px; text-indent:-9999em; overflow:hidden; font-size:0; } .d-state-drag .d-title { color:#666; } .d-close { padding:0; top:0; right:0; width:18px; height:18px; line-height:18px; text-align:center; font-family: Helvetica, STHeiti; _font-family: '\u9ed1\u4f53', 'Book Antiqua', Palatino; font-size:18px; text-decoration:none; color:#214FA3; } .d-close:hover, .d-close:active { text-decoration:none; color:#900; } .d-content { color:#666; } .d-state-focus .d-content { color:#000; } @media screen and (min-width:0) { .d-close { width:20px; height:20px; line-height:20px; right:-10px; top:-10px; border-radius:20px; background:#999; color:#FFF; box-shadow:0 1px 3px rgba(0, 0, 0, .3); -moz-transition: linear .06s; -webkit-transition: linear .06s; transition: linear .06s; } .d-close:hover { width:24px; height:24px; line-height:24px; right:-12px; top:-12px; color:#FFF; box-shadow:0 1px 3px rgba(209, 40, 42, .5); background:#d1282a; border-radius:24px; } .d-state-lock .d-dialog { box-shadow:0 3px 26px rgba(0, 0, 0, .9); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: -webkit-box-shadow linear .2s; } .d-dialog:active { box-shadow:0 0 5px rgba(0, 0, 0, .1)!important; } .d-state-drag { box-shadow:none!important; } }
12ik
trunk/public/js/dialog/skins5/simple.css
CSS
oos
5,763
@charset "utf-8"; /* * artDialog skin * http://code.google.com/p/artdialog/ * (c) 2009-2012 TangBin, http://www.planeArt.cn * * This is licensed under the GNU LGPL, version 2.1 or later. * For details, see: http://creativecommons.org/licenses/LGPL/2.1/ */ /* common start */ body { _margin:0; _height:100%; }/*IE6 BUG*/ .d-outer { text-align:left; } .d-border, .d-dialog { border:0 none; margin:0; border-collapse:collapse; width:auto; } .d-nw, .d-n, .d-ne, .d-w, .d-c, .d-e, .d-sw, .d-s, .d-se, .d-header, .d-main, .d-footer { padding:0; } .d-header, .d-button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family:Tahoma,Arial,Helvetica,STHeiti; -o-font-family: Tahoma, Arial; } .d-title { overflow:hidden; text-overflow: ellipsis; cursor:default; } .d-state-noTitle .d-title { display:none; } .d-close { display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; } .d-close:hover { text-decoration:none; } .d-main { text-align:center; vertical-align:middle; min-width:9em; } .d-content { display:inline-block; display:block\0/*IE8 BUG*/; display:inline-block\9\0; *zoom:1; *display:inline; text-align:left; border:0 none; } .d-content.d-state-full { display:block; width:100%; margin:0; padding:0!important; height:100%; } .d-loading { width:96px; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(loading.gif) no-repeat center center; } .d-buttons { padding:8px; text-align:right; white-space:nowrap; } .d-button { margin-left:15px; padding: 0 8px; cursor: pointer; display: inline-block; min-height:2.2em; text-align: center; *padding:4px 10px; *height:2em; letter-spacing:2px; font-family: Tahoma, Arial/9!important; width:auto; overflow:visible; *width:1; color: #333; border: 1px solid #999; border-radius: 5px; background: #DDD; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#DDDDDD'); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD)); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: box-shadow linear .2s; } .d-button::-moz-focus-inner, .d-button::-moz-focus-outer { border:0 none; padding:0; margin:0; } .d-button:focus { outline:none 0; border-color:#426DC9; box-shadow:0 0 8px rgba(66, 109, 201, .9); } .d-button:hover { color:#000; border-color:#666; } .d-button:active { border-color:#666; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#DDDDDD', endColorstr='#FFFFFF'); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF)); box-shadow:inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); } .d-button[disabled] { cursor:default; color:#666; background:#DDD; border: 1px solid #999; filter:alpha(opacity=50); opacity:.5; box-shadow:none; } .d-state-highlight { color: #FFF; border: 1px solid #1c6a9e; background: #2288cc; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); text-shadow: -1px -1px 1px #1c6a9e; } .d-state-highlight:hover { color:#FFF; border-color:#0F3A56; } .d-state-highlight:active { border-color:#1c6a9e; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); } .d-mask { background:#000; filter:alpha(opacity=70); opacity:.7; } /* common end */ .d-inner { background:#FFF; } .d-titleBar { width:100%; } .d-title { position:absolute; left:0; top:0; width:100%; height:22px; text-align:left; text-indent:-999em; font-size:0; } .d-nw, .d-ne, .d-sw, .d-se, .d-n, .d-s, .d-close { background-image:url(idialog/idialog_s.png); background-repeat:no-repeat; } .d-nw { width:15px; height:15px; background-position: 0 0; } .d-ne { width:15px; height:15px; background-position: -15px 0; } .d-sw { width:15px; height:15px; background-position: 0 -15px; } .d-se { width:15px; height:15px; background-position: -15px -15px; } .d-close { position:absolute; right:-8px; top:-8px; _z-index:1; width:34px; height:34px; _font-size:0; _line-height:0; text-indent:-9999em; background-position:0 -60px; } .d-close:hover { background-position:0 -94px; } .d-n, .d-s { background-repeat:repeat-x; } .d-n { background-position: 0 -30px; } .d-s { background-position: 0 -45px; } .d-w, .d-e { background-image:url(idialog/idialog_s2.png); background-repeat:repeat-y; } .d-w { background-position:left top; } .d-e { background-position: right bottom; } @media screen and (min-width:0) {/* css3 */ .d-nw, .d-ne, .d-sw, .d-se{ width:5px; height:5px; } .d-nw, .d-n, .d-ne, .d-w, .d-e, .d-sw, .d-s, .d-se { background:none; } .d-sw, .d-s, .d-se { background:url(idialog/idialog_s.png) repeat-x 0 -45px; } .d-sw { border-radius:0 0 0 5px; } .d-se { border-radius:0 0 5px 0; } .d-outer { border:1px solid #929292; border-radius:5px; box-shadow:0 3px 8px rgba(0, 0, 0, .2); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: -webkit-box-shadow linear .2s; } .d-border { border-radius:5px; background:#FFF; } .d-state-drag { box-shadow:none; } .d-state-lock { box-shadow:0 3px 26px rgba(0, 0, 0, .9); } .d-outer:active { box-shadow:0 0 5px rgba(0, 0, 0, .1)!important; } .d-state-drag { box-shadow:none!important; } .d-close { right:-16px; top:-16px; } .d-outer { -webkit-transform: scale(0); transform: scale(0); -webkit-transition: -webkit-box-shadow .2s ease-in-out, -webkit-transform .2s ease-in-out; transition: box-shadow .2s ease-in-out, transform .2s ease-in-out; } .d-state-visible { -webkit-transform: scale(1); transform: scale(1); } } @media screen and (-webkit-min-device-pixel-ratio:0) {/* apple | webkit */ .d-close { right:auto; left:-16px; top:-16px; } }
12ik
trunk/public/js/dialog/skins5/idialog.css
CSS
oos
6,500
@charset "utf-8"; /* * artDialog skin * http://code.google.com/p/artdialog/ * (c) 2009-2012 TangBin, http://www.planeArt.cn * * This is licensed under the GNU LGPL, version 2.1 or later. * For details, see: http://creativecommons.org/licenses/LGPL/2.1/ */ /* common start */ body { _margin:0; _height:100%; }/*IE6 BUG*/ .d-outer { text-align:left; } .d-border, .d-dialog { border:0 none; margin:0; border-collapse:collapse; width:auto; } .d-nw, .d-n, .d-ne, .d-w, .d-c, .d-e, .d-sw, .d-s, .d-se, .d-header, .d-main, .d-footer { padding:0; } .d-header, .d-button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family:Tahoma,Arial,Helvetica,STHeiti; -o-font-family: Tahoma, Arial; } .d-title { overflow:hidden; text-overflow: ellipsis; cursor:default; } .d-state-noTitle .d-title { display:none; } .d-close { display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; } .d-close:hover { text-decoration:none; } .d-main { text-align:center; vertical-align:middle; min-width:9em; } .d-content { display:inline-block; display:block\0/*IE8 BUG*/; display:inline-block\9\0; *zoom:1; *display:inline; text-align:left; border:0 none; } .d-content.d-state-full { display:block; width:100%; margin:0; padding:0!important; height:100%; } .d-loading { width:96px; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(loading.gif) no-repeat center center; } .d-buttons { padding:8px; text-align:right; white-space:nowrap; } .d-button { margin-left:15px; padding: 0 8px; cursor: pointer; display: inline-block; min-height:2.2em; text-align: center; *padding:4px 10px; *height:2em; letter-spacing:2px; font-family: Tahoma, Arial/9!important; width:auto; overflow:visible; *width:1; color: #333; border: 1px solid #999; border-radius: 5px; background: #DDD; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#DDDDDD'); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD)); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: box-shadow linear .2s; } .d-button::-moz-focus-inner, .d-button::-moz-focus-outer { border:0 none; padding:0; margin:0; } .d-button:focus { outline:none 0; border-color:#426DC9; box-shadow:0 0 8px rgba(66, 109, 201, .9); } .d-button:hover { color:#000; border-color:#666; } .d-button:active { border-color:#666; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#DDDDDD', endColorstr='#FFFFFF'); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF)); box-shadow:inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); } .d-button[disabled] { cursor:default; color:#666; background:#DDD; border: 1px solid #999; filter:alpha(opacity=50); opacity:.5; box-shadow:none; } .d-state-highlight { color: #FFF; border: 1px solid #1c6a9e; background: #2288cc; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); text-shadow: -1px -1px 1px #1c6a9e; } .d-state-highlight:hover { color:#FFF; border-color:#0F3A56; } .d-state-highlight:active { border-color:#1c6a9e; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); } .d-mask { background:#000; filter:alpha(opacity=70); opacity:.7; } /* common end */ .d-inner { background:#f7f7f7; } .d-titleBar { width:100%; height:0; position:relative; bottom:30px; _bottom:0; _margin-top:-30px; } .d-title { height:29px; line-height:29px; padding:0 25px 0 0; _padding:0; text-indent:5px; color:#FFF; font-weight:700; text-shadow:-1px -1px 0 rgba(0, 50, 0, .7); } .d-nw, .d-ne, .d-sw, .d-se, .d-n, .d-s, .d-close { background-image:url(green/bg.png); background-repeat:no-repeat; } .d-nw { width:15px; height:38px; background-position: 0 0; } .d-ne { width:15px; height:38px; background-position: -15px 0; } .d-sw { width:15px; height:18px; background-position: 0 -38px; } .d-se { width:15px; height:18px; background-position: -15px -38px; } .d-close { top:4px; right:4px; _z-index:1; width:20px; height:20px; _font-size:0; _line-height:0; text-indent:-9999em; background-position:0 -112px; } .d-close:hover { background-position:0 -132px; } .d-n, .d-s { background-repeat:repeat-x; } .d-n { background-position: 0 -56px; } .d-s { background-position: 0 -94px; } .d-w, .d-e { background-image:url(green/bg2.png); background-repeat:repeat-y; } .d-w { background-position:left top; } .d-e { background-position: right bottom; } aui_icon, .d-main { padding-top:3px; } @media screen and (min-width:0) { .d-outer { border-radius:8px; box-shadow:0 5px 15px rgba(0, 50, 0, .4); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: -webkit-box-shadow linear .2s; } .d-state-lock { box-shadow:0 3px 26px rgba(0, 0, 0, .9); } .d-outer:active { box-shadow:0 0 5px rgba(0, 50, 0, .1)!important; } .d-state-drag { box-shadow:none!important; } .d-nw, .d-ne, .d-sw, .d-se, .d-n, .d-s, .d-close { background-image:url(green/bg_css3.png); } .d-nw { width:5px; height:31px; } .d-ne { width:5px; height:31px; background-position: -5px 0; } .d-sw { width:5px; height:5px;background-position: 0 -31px; } .d-se { width:5px; height:5px; background-position: -5px -31px; } .d-close { background-position:0 -72px; } .d-close:hover { background-position:0 -92px; } .d-n { background-position: 0 -36px; } .d-s { background-position: 0 -67px; } .d-w, .d-e { background-image:url(green/bg_css3_2.png); } } .d-state-noTitle .d-nw, .d-state-noTitle .d-ne, .d-state-noTitle .d-sw, .d-state-noTitle .d-se { width:3px; height:3px; } .d-state-noTitle .d-inner { border:1px solid #666; background:#FFF; } .d-state-noTitle { box-shadow:none; } .d-state-noTitle .d-nw, .d-state-noTitle .d-n, .d-state-noTitle .d-ne, .d-state-noTitle .d-w, .d-state-noTitle .d-e, .d-state-noTitle .d-sw, .d-state-noTitle .d-s, .d-state-noTitle .d-se { background:rgba(0, 0, 0, .05); background:#000\9!important; filter:alpha(opacity=5)!important; } .d-state-noTitle .d-titleBar { bottom:0; _bottom:0; _margin-top:0; } .d-state-noTitle .d-close { top:0; right:0; width:18px; height:18px; line-height:18px; text-align:center; text-indent:0; font-family: Helvetica, STHeiti; _font-family: '\u9ed1\u4f53', 'Book Antiqua', Palatino; font-size:18px; text-decoration:none; color:#214FA3; background:none; filter:!important; } .d-state-noTitle .d-close:hover, .d-state-noTitle .d-close:active { text-decoration:none; color:#900; }
12ik
trunk/public/js/dialog/skins5/green.css
CSS
oos
7,312
@charset "utf-8"; /* * artDialog skin * http://code.google.com/p/artdialog/ * (c) 2009-2012 TangBin, http://www.planeArt.cn * * This is licensed under the GNU LGPL, version 2.1 or later. * For details, see: http://creativecommons.org/licenses/LGPL/2.1/ */ /* common start */ body { _margin:0; _height:100%; }/*IE6 BUG*/ .d-outer { text-align:left; } .d-border, .d-dialog { border:0 none; margin:0; border-collapse:collapse; width:auto; } .d-nw, .d-n, .d-ne, .d-w, .d-c, .d-e, .d-sw, .d-s, .d-se, .d-header, .d-main, .d-footer { padding:0; } .d-header, .d-button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family:Tahoma,Arial,Helvetica,STHeiti; -o-font-family: Tahoma, Arial; } .d-title { overflow:hidden; text-overflow: ellipsis; cursor:default; } .d-state-noTitle .d-title { display:none; } .d-close { display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; } .d-close:hover { text-decoration:none; } .d-main { text-align:center; vertical-align:middle; min-width:9em; } .d-content { display:inline-block; display:block\0/*IE8 BUG*/; display:inline-block\9\0; *zoom:1; *display:inline; text-align:left; border:0 none; } .d-content.d-state-full { display:block; width:100%; margin:0; padding:0!important; height:100%; } .d-loading { width:96px; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(loading.gif) no-repeat center center; } .d-buttons { padding:8px; text-align:right; white-space:nowrap; } .d-button { margin-left:15px; padding: 0 8px; cursor: pointer; display: inline-block; min-height:2.2em; text-align: center; *padding:4px 10px; *height:2em; letter-spacing:2px; font-family: Tahoma, Arial/9!important; width:auto; overflow:visible; *width:1; color: #333; border: 1px solid #999; border-radius: 5px; background: #DDD; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#DDDDDD'); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD)); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: box-shadow linear .2s; } .d-button::-moz-focus-inner, .d-button::-moz-focus-outer { border:0 none; padding:0; margin:0; } .d-button:focus { outline:none 0; border-color:#426DC9; box-shadow:0 0 8px rgba(66, 109, 201, .9); } .d-button:hover { color:#000; border-color:#666; } .d-button:active { border-color:#666; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#DDDDDD', endColorstr='#FFFFFF'); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF)); box-shadow:inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); } .d-button[disabled] { cursor:default; color:#666; background:#DDD; border: 1px solid #999; filter:alpha(opacity=50); opacity:.5; box-shadow:none; } .d-state-highlight { color: #FFF; border: 1px solid #1c6a9e; background: #2288cc; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); text-shadow: -1px -1px 1px #1c6a9e; } .d-state-highlight:hover { color:#FFF; border-color:#0F3A56; } .d-state-highlight:active { border-color:#1c6a9e; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); } .d-mask { background:#000; filter:alpha(opacity=70); opacity:.7; } /* common end */ .d-inner { background:#f7f7f7; } .d-titleBar { width:100%; height:0; position:relative; bottom:30px; _bottom:0; _margin-top:-30px; } .d-title { height:29px; line-height:29px; padding:0 25px 0 0; _padding:0; text-indent:5px; color:#FFF; font-weight:700; text-shadow:-1px -1px 0 rgba(0, 0, 0, .7); } .d-nw, .d-ne, .d-sw, .d-se, .d-n, .d-s, .d-close { background-image:url(black/bg.png); background-repeat:no-repeat; } .d-nw { width:15px; height:38px; background-position: 0 0; } .d-ne { width:15px; height:38px; background-position: -15px 0; } .d-sw { width:15px; height:18px; background-position: 0 -38px; } .d-se { width:15px; height:18px; background-position: -15px -38px; } .d-close { top:4px; right:4px; _z-index:1; width:20px; height:20px; _font-size:0; _line-height:0; text-indent:-9999em; background-position:0 -112px; } .d-close:hover { background-position:0 -132px; } .d-n, .d-s { background-repeat:repeat-x; } .d-n { background-position: 0 -56px; } .d-s { background-position: 0 -94px; } .d-w, .d-e { background-image:url(black/bg2.png); background-repeat:repeat-y; } .d-w { background-position:left top; } .d-e { background-position: right bottom; } aui_icon, .d-main { padding-top:3px; } @media screen and (min-width:0) { .d-outer { border-radius:8px; box-shadow:0 5px 15px rgba(0, 0, 0, .4); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: -webkit-box-shadow linear .2s; } .d-state-drag { box-shadow:none; } .d-state-lock { box-shadow:0 3px 26px rgba(0, 0, 0, .9); } .d-outer:active { box-shadow:0 0 5px rgba(0, 0, 0, .1)!important; } .d-state-drag { box-shadow:none!important; } .d-nw, .d-ne, .d-sw, .d-se, .d-n, .d-s, .d-close { background-image:url(black/bg_css3.png); } .d-nw { width:5px; height:31px; } .d-ne { width:5px; height:31px; background-position: -5px 0; } .d-sw { width:5px; height:5px;background-position: 0 -31px; } .d-se { width:5px; height:5px; background-position: -5px -31px; } .d-close { background-position:0 -72px; } .d-close:hover { background-position:0 -92px; } .d-n { background-position: 0 -36px; } .d-s { background-position: 0 -67px; } .d-w, .d-e { background-image:url(black/bg_css3_2.png); } } .d-state-noTitle .d-nw, .d-state-noTitle .d-ne, .d-state-noTitle .d-sw, .d-state-noTitle .d-se { width:3px; height:3px; } .d-state-noTitle .d-inner { border:1px solid #666; background:#FFF; } .d-state-noTitle { box-shadow:none; } .d-state-noTitle .d-nw, .d-state-noTitle .d-n, .d-state-noTitle .d-ne, .d-state-noTitle .d-w, .d-state-noTitle .d-e, .d-state-noTitle .d-sw, .d-state-noTitle .d-s, .d-state-noTitle .d-se { background:rgba(0, 0, 0, .05); background:#000\9!important; filter:alpha(opacity=5)!important; } .d-state-noTitle .d-titleBar { bottom:0; _bottom:0; _margin-top:0; } .d-state-noTitle .d-close { top:0; right:0; width:18px; height:18px; line-height:18px; text-align:center; text-indent:0; font-family: Helvetica, STHeiti; _font-family: '\u9ed1\u4f53', 'Book Antiqua', Palatino; font-size:18px; text-decoration:none; color:#214FA3; background:none; filter:!important; } .d-state-noTitle .d-close:hover, .d-state-noTitle .d-close:active { text-decoration:none; color:#900; }
12ik
trunk/public/js/dialog/skins5/black.css
CSS
oos
7,346
@charset "utf-8"; /* * artDialog skin * http://code.google.com/p/artdialog/ * (c) 2009-2012 TangBin, http://www.planeArt.cn * * This is licensed under the GNU LGPL, version 2.1 or later. * For details, see: http://creativecommons.org/licenses/LGPL/2.1/ */ /* common start */ body { _margin:0; _height:100%; }/*IE6 BUG*/ .d-outer { text-align:left; } .d-border, .d-dialog { border:0 none; margin:0; border-collapse:collapse; width:auto; } .d-nw, .d-n, .d-ne, .d-w, .d-c, .d-e, .d-sw, .d-s, .d-se, .d-header, .d-main, .d-footer { padding:0; } .d-header, .d-button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family:Tahoma,Arial,Helvetica,STHeiti; -o-font-family: Tahoma, Arial; } .d-title { overflow:hidden; text-overflow: ellipsis; cursor:default; } .d-state-noTitle .d-title { display:none; } .d-close { display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; } .d-close:hover { text-decoration:none; } .d-main { text-align:center; vertical-align:middle; min-width:9em; } .d-content { display:inline-block; display:block\0/*IE8 BUG*/; display:inline-block\9\0; *zoom:1; *display:inline; text-align:left; border:0 none; } .d-content.d-state-full { display:block; width:100%; margin:0; padding:0!important; height:100%; } .d-loading { width:96px; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(loading.gif) no-repeat center center; } .d-buttons { padding:8px; text-align:right; white-space:nowrap; } .d-button { margin-left:15px; padding: 0 8px; cursor: pointer; display: inline-block; min-height:2.2em; text-align: center; *padding:4px 10px; *height:2em; letter-spacing:2px; font-family: Tahoma, Arial/9!important; width:auto; overflow:visible; *width:1; color: #333; border: 1px solid #999; border-radius: 5px; background: #DDD; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#DDDDDD'); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD)); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: box-shadow linear .2s; } .d-button::-moz-focus-inner, .d-button::-moz-focus-outer { border:0 none; padding:0; margin:0; } .d-button:focus { outline:none 0; border-color:#426DC9; box-shadow:0 0 8px rgba(66, 109, 201, .9); } .d-button:hover { color:#000; border-color:#666; } .d-button:active { border-color:#666; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#DDDDDD', endColorstr='#FFFFFF'); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF)); box-shadow:inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); } .d-button[disabled] { cursor:default; color:#666; background:#DDD; border: 1px solid #999; filter:alpha(opacity=50); opacity:.5; box-shadow:none; } .d-state-highlight { color: #FFF; border: 1px solid #1c6a9e; background: #2288cc; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); text-shadow: -1px -1px 1px #1c6a9e; } .d-state-highlight:hover { color:#FFF; border-color:#0F3A56; } .d-state-highlight:active { border-color:#1c6a9e; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); } .d-mask { background:#000; filter:alpha(opacity=70); opacity:.7; } /* common end */ .d-inner { background:#FFF; } .d-titleBar { width:100%; height:0; position:relative; bottom:30px; _bottom:0; _margin-top:-30px; } .d-title { height:29px; line-height:29px; padding:0 16px 0 0; _padding:0; color:#FFF; font-weight:700; text-shadow:1px 1px 0 rgba(0, 0, 0, .9); } .d-nw, .d-ne, .d-sw, .d-se, .d-n, .d-s, .d-close { background-image:url(aero/aero_s.png); background-repeat:no-repeat; } .d-nw { width:14px; height:34px; background-position: 0 0; } .d-ne { width:14px; height:34px; background-position: -14px 0; } .d-sw { width:14px; height:14px; background-position: 0 -34px; } .d-se { width:14px; height:14px; background-position: -14px -34px; } .d-close { top:7px; right:0; _z-index:1; width:13px; height:13px; _font-size:0; _line-height:0; text-indent:-9999em; background-position:left -96px; } .d-close:hover { background-position:right -96px; } .d-n, .d-s { background-repeat:repeat-x; } .d-n { background-position: 0 -48px; } .d-s { background-position: 0 -82px; } .d-w, .d-e { background-image:url(aero/aero_s2.png); background-repeat:repeat-y; } .d-w { background-position:left top; } .d-e { background-position: right bottom; } .d-state-noTitle .d-nw, .d-state-noTitle .d-ne, .d-state-noTitle .d-sw, .d-state-noTitle .d-se { width:3px; height:3px; } .d-state-noTitle .d-inner { border:1px solid #666; background:#FFF; } .d-state-noTitle { box-shadow:none; } .d-state-noTitle .d-nw, .d-state-noTitle .d-n, .d-state-noTitle .d-ne, .d-state-noTitle .d-w, .d-state-noTitle .d-e, .d-state-noTitle .d-sw, .d-state-noTitle .d-s, .d-state-noTitle .d-se { background:rgba(0, 0, 0, .05); background:#000\9!important; filter:alpha(opacity=5)!important; } .d-state-noTitle .d-titleBar { bottom:0; _bottom:0; _margin-top:0; } .d-state-noTitle .d-close { top:0; right:0; width:18px; height:18px; line-height:18px; text-align:center; text-indent:0; font-family: Helvetica, STHeiti; _font-family: '\u9ed1\u4f53', 'Book Antiqua', Palatino; font-size:18px; text-decoration:none; color:#214FA3; background:none; filter:!important; } .d-state-noTitle .d-close:hover, .d-state-noTitle .d-close:active { text-decoration:none; color:#900; }
12ik
trunk/public/js/dialog/skins5/aero.css
CSS
oos
6,262
@charset "utf-8"; /* * artDialog skin * http://code.google.com/p/artdialog/ * (c) 2009-2012 TangBin, http://www.planeArt.cn * * This is licensed under the GNU LGPL, version 2.1 or later. * For details, see: http://creativecommons.org/licenses/LGPL/2.1/ */ /* common start */ body { _margin:0; _height:100%; }/*IE6 BUG*/ .d-outer { text-align:left; } .d-border, .d-dialog { border:0 none; margin:0; border-collapse:collapse; width:auto; } .d-nw, .d-n, .d-ne, .d-w, .d-c, .d-e, .d-sw, .d-s, .d-se, .d-header, .d-main, .d-footer { padding:0; } .d-header, .d-button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family:Tahoma,Arial,Helvetica,STHeiti; -o-font-family: Tahoma, Arial; } .d-title { overflow:hidden; text-overflow: ellipsis; cursor:default; } .d-state-noTitle .d-title { display:none; } .d-close { display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; } .d-close:hover { text-decoration:none; } .d-main { text-align:center; vertical-align:middle; min-width:9em; } .d-content { display:inline-block; display:block\0/*IE8 BUG*/; display:inline-block\9\0; *zoom:1; *display:inline; text-align:left; border:0 none; } .d-content.d-state-full { display:block; width:100%; margin:0; padding:0!important; height:100%; } .d-loading { width:96px; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(loading.gif) no-repeat center center; } .d-buttons { padding:8px; text-align:right; white-space:nowrap; } .d-button { margin-left:15px; padding: 0 8px; cursor: pointer; display: inline-block; min-height:2.2em; text-align: center; *padding:4px 10px; *height:2em; letter-spacing:2px; font-family: Tahoma, Arial/9!important; width:auto; overflow:visible; *width:1; color: #333; border: 1px solid #999; border-radius: 5px; background: #DDD; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#DDDDDD'); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD)); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: box-shadow linear .2s; } .d-button::-moz-focus-inner, .d-button::-moz-focus-outer { border:0 none; padding:0; margin:0; } .d-button:focus { outline:none 0; border-color:#426DC9; box-shadow:0 0 8px rgba(66, 109, 201, .9); } .d-button:hover { color:#000; border-color:#666; } .d-button:active { border-color:#666; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#DDDDDD', endColorstr='#FFFFFF'); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF)); box-shadow:inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); } .d-button[disabled] { cursor:default; color:#666; background:#DDD; border: 1px solid #999; filter:alpha(opacity=50); opacity:.5; box-shadow:none; } .d-state-highlight { color: #FFF; border: 1px solid #1c6a9e; background: #2288cc; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); text-shadow: -1px -1px 1px #1c6a9e; } .d-state-highlight:hover { color:#FFF; border-color:#0F3A56; } .d-state-highlight:active { border-color:#1c6a9e; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); } .d-mask { background:#000; filter:alpha(opacity=70); opacity:.7; } /* common end */ .d-inner { background:rgba(0, 0, 0, .7); } .d-dialog { background:#FFF; border-radius:3px; } .d-inner { background:#FFF; /*ie*/} .d-outer { border:1px solid #000; border-radius:5px; box-shadow: 0 3px 0 rgba(0,0,0,0.1); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: -webkit-box-shadow linear .2s; } .d-state-lock { box-shadow:0 3px 26px rgba(0, 0, 0, .9); } .d-outer:active { box-shadow:none!important; } .d-state-drag { box-shadow:none!important; } .d-border { border-radius:3px; } .d-nw, .d-ne { width:5px; height:37px; } .d-sw, .d-se { width:5px; height:5px; } .d-nw, .d-n, .d-ne, .d-w, .d-e, .d-sw, .d-s, .d-se { background:rgba(0, 0, 0, .7); background:#000\9!important; filter:alpha(opacity=70); } .d-titleBar { width:100%; height:0; position:relative; bottom:33px; _bottom:0; _margin-top:-33px; } .d-title { height:27px; line-height:27px; padding:0 16px 0 5px; color:#FFF; font-weight:700; text-shadow:0 1px 0 #000; } .d-close { padding:0; top:2px; right:5px; width:21px; height:21px; line-height:21px; font-size:18px; text-align:center; color:#EBEBEB; font-family: Helvetica, STHeiti; _font-family: Tahoma, '\u9ed1\u4f53', 'Book Antiqua', Palatino; border:1px solid transparent; _border:0 none; background:#000; border-radius:15px; } .d-close:hover { color:#FFF; background:#C72015; border:1px solid #000; _border:0 none; box-shadow: 0 1px 0 rgba(255, 255, 255, .3), inset 0 1px 0 rgba(255, 255, 255, .3); } .d-close:active { box-shadow: none; } .d-state-noTitle { } .d-content { color:#666; } .d-state-noTitle .d-nw, .d-state-noTitle .d-ne { height:5px; } .d-state-noTitle .d-titleBar { bottom:0; _bottom:0; _margin-top:0; } .d-state-noTitle .d-close { top:5px; }
12ik
trunk/public/js/dialog/skins5/twitter.css
CSS
oos
5,859
@charset "utf-8"; /* * artDialog skin * http://code.google.com/p/artdialog/ * (c) 2009-2012 TangBin, http://www.planeArt.cn * * This is licensed under the GNU LGPL, version 2.1 or later. * For details, see: http://creativecommons.org/licenses/LGPL/2.1/ */ /* common start */ body { _margin:0; _height:100%; }/*IE6 BUG*/ .d-outer { text-align:left; } .d-border, .d-dialog { border:0 none; margin:0; border-collapse:collapse; width:auto; } .d-nw, .d-n, .d-ne, .d-w, .d-c, .d-e, .d-sw, .d-s, .d-se, .d-header, .d-main, .d-footer { padding:0; } .d-header, .d-button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family:Tahoma,Arial,Helvetica,STHeiti; -o-font-family: Tahoma, Arial; } .d-title { overflow:hidden; text-overflow: ellipsis; cursor:default; } .d-state-noTitle .d-title { display:none; } .d-close { display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; } .d-close:hover { text-decoration:none; } .d-main { text-align:center; vertical-align:middle; min-width:9em; } .d-content { display:inline-block; display:block\0/*IE8 BUG*/; display:inline-block\9\0; *zoom:1; *display:inline; text-align:left; border:0 none; } .d-content.d-state-full { display:block; width:100%; margin:0; padding:0!important; height:100%; } .d-loading { width:96px; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(loading.gif) no-repeat center center; } .d-buttons { padding:8px; text-align:right; white-space:nowrap; } .d-button { margin-left:15px; padding: 0 8px; cursor: pointer; display: inline-block; min-height:2.2em; text-align: center; *padding:4px 10px; *height:2em; letter-spacing:2px; font-family: Tahoma, Arial/9!important; width:auto; overflow:visible; *width:1; color: #333; border: 1px solid #999; border-radius: 5px; background: #DDD; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#DDDDDD'); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD)); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: box-shadow linear .2s; } .d-button::-moz-focus-inner, .d-button::-moz-focus-outer { border:0 none; padding:0; margin:0; } .d-button:focus { outline:none 0; border-color:#426DC9; box-shadow:0 0 8px rgba(66, 109, 201, .9); } .d-button:hover { color:#000; border-color:#666; } .d-button:active { border-color:#666; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#DDDDDD', endColorstr='#FFFFFF'); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF)); box-shadow:inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); } .d-button[disabled] { cursor:default; color:#666; background:#DDD; border: 1px solid #999; filter:alpha(opacity=50); opacity:.5; box-shadow:none; } .d-state-highlight { color: #FFF; border: 1px solid #1c6a9e; background: #2288cc; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); text-shadow: -1px -1px 1px #1c6a9e; } .d-state-highlight:hover { color:#FFF; border-color:#0F3A56; } .d-state-highlight:active { border-color:#1c6a9e; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); } .d-mask { background:#000; filter:alpha(opacity=70); opacity:.7; } /* common end */ .d-inner { background:#FFF; } .d-outer, .d-inner { border:1px solid rgba(0, 0, 0, .7); border:1px solid #333\9; } .d-nw, .d-ne, .d-sw, .d-se { width:8px; height:8px; } .d-nw, .d-n, .d-ne, .d-w, .d-e, .d-sw, .d-s, .d-se { background:rgba(0, 0, 0, .4); background:#000\9!important; filter:alpha(opacity=40); } .d-state-lock .d-nw, .d-state-lock .d-n, .d-state-lock .d-ne, .d-state-lock .d-w, .d-state-lock .d-e, .d-state-lock .d-sw, .d-state-lock .d-s, .d-state-lock .d-se { background:rgba(0, 0, 0, .5); background:#000\9!important; filter:alpha(opacity=50); } .d-titleBar { position:relative; height:100%; } .d-title { height:28px; line-height:27px; padding:0 28px 0 10px; text-shadow:0 1px 0 rgba(255, 255, 255, .7); background-color:#edf5f8; font-weight:bold; color:#95a7ae; font-family: Tahoma, Arial/9!important; background-color:#bdc6cd; background: linear-gradient(top, #edf5f8, #bdc6cd); background: -moz-linear-gradient(top, #edf5f8, #bdc6cd); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#edf5f8), to(#bdc6cd)); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#edf5f8', endColorstr='#bdc6cd'); border-top:1px solid #edf5f8; border-bottom:1px solid #b6bec5; } .d-state-focus .d-title { color:#4c5a5f; } .d-state-drag .d-title { background: linear-gradient(top, #bdc6cd, #edf5f8); background: -moz-linear-gradient(top, #bdc6cd, #edf5f8); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#bdc6cd), to(#edf5f8)); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdc6cd', endColorstr='#edf5f8'); box-shadow:none; } .d-state-drag .d-titleBar { box-shadow:none; } .d-close { padding:0; top:4px; right:4px; width:21px; height:21px; line-height:21px; font-size:18px; color:#68767b; text-align:center; font-family: Helvetica, STHeiti; _font-family: Tahoma, '\u9ed1\u4f53', 'Book Antiqua', Palatino; text-shadow:0 1px 0 rgba(255, 255, 255, .9); } .d-close:hover { background:#85140E; color:#FFF; text-shadow:0 1px 0 rgba(0, 0, 0, .5); } .d-close:active { background:#450B07; color:#FFF; } .d-content { color:#666; } .d-state-focus .d-content { color:#000; }.d-buttons { background-color:#F6F6F6; border-top: 1px solid #DADEE5; } .d-state-noTitle .d-nw, .d-state-noTitle .d-ne, .d-state-noTitle .d-sw, .d-state-noTitle .d-se { width:3px; height:3px; } .d-state-noTitle .d-inner { border:1px solid #666; background:#FFF; } .d-state-noTitle { border:0 none; box-shadow:none; } .d-state-noTitle .d-nw, .d-state-noTitle .d-n, .d-state-noTitle .d-ne, .d-state-noTitle .d-w, .d-state-noTitle .d-e, .d-state-noTitle .d-sw, .d-state-noTitle .d-s, .d-state-noTitle .d-se { background:rgba(0, 0, 0, .05); background:#000\9!important; filter:alpha(opacity=5)!important; } .d-state-noTitle .d-titleBar { bottom:0; _bottom:0; _margin-top:0; } .d-state-noTitle .d-close { top:0; right:0; width:18px; height:18px; line-height:18px; text-align:center; text-indent:0; font-size:18px; text-decoration:none; color:#214FA3; background:none; filter:!important; } .d-state-noTitle .d-close:hover, .d-state-noTitle .d-close:active { text-decoration:none; color:#900; } .d-state-noTitle .d-dialog { box-shadow: none; } @media screen and (min-width:0) {/* css3 */ .d-nw, .d-n, .d-ne, .d-w, .d-e, .d-sw, .d-s, .d-se { display:none; } .d-inner { border:0 none; } .d-outer { border-color:#666; } .d-state-focus .d-dialog { box-shadow: 0 0 3px rgba(0, 0, 0, .4); } .d-state-drag, .d-state-focus:active { box-shadow:none; } .d-state-focus { box-shadow:0 3px 26px rgba(0, 0, 0, .9); } .d-close { border-radius:5px; } .d-close:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .4); } .d-outer { -webkit-transform: scale(0); transform: scale(0); -webkit-transition: -webkit-box-shadow .2s ease-in-out, -webkit-transform .2s ease-in-out; transition: box-shadow .2s ease-in-out, transform .2s ease-in-out; } .d-state-visible { -webkit-transform: scale(1); transform: scale(1); } }
12ik
trunk/public/js/dialog/skins5/default.css
CSS
oos
8,050
@charset "utf-8"; /* * artDialog skin * http://code.google.com/p/artdialog/ * (c) 2009-2012 TangBin, http://www.planeArt.cn * * This is licensed under the GNU LGPL, version 2.1 or later. * For details, see: http://creativecommons.org/licenses/LGPL/2.1/ */ /* common start */ body { _margin:0; _height:100%; }/*IE6 BUG*/ .d-outer { text-align:left; } .d-border, .d-dialog { border:0 none; margin:0; border-collapse:collapse; width:auto; } .d-nw, .d-n, .d-ne, .d-w, .d-c, .d-e, .d-sw, .d-s, .d-se, .d-header, .d-main, .d-footer { padding:0; } .d-header, .d-button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family:Tahoma,Arial,Helvetica,STHeiti; -o-font-family: Tahoma, Arial; } .d-title { overflow:hidden; text-overflow: ellipsis; cursor:default; } .d-state-noTitle .d-title { display:none; } .d-close { display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; } .d-close:hover { text-decoration:none; } .d-main { text-align:center; vertical-align:middle; min-width:9em; } .d-content { display:inline-block; display:block\0/*IE8 BUG*/; display:inline-block\9\0; *zoom:1; *display:inline; text-align:left; border:0 none; } .d-content.d-state-full { display:block; width:100%; margin:0; padding:0!important; height:100%; } .d-loading { width:96px; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(loading.gif) no-repeat center center; } .d-buttons { padding:8px; text-align:right; white-space:nowrap; } .d-button { margin-left:15px; padding: 0 8px; cursor: pointer; display: inline-block; min-height:2.2em; text-align: center; *padding:4px 10px; *height:2em; letter-spacing:2px; font-family: Tahoma, Arial/9!important; width:auto; overflow:visible; *width:1; color: #333; border: 1px solid #999; border-radius: 5px; background: #DDD; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#DDDDDD'); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD)); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: box-shadow linear .2s; } .d-button::-moz-focus-inner, .d-button::-moz-focus-outer { border:0 none; padding:0; margin:0; } .d-button:focus { outline:none 0; border-color:#426DC9; box-shadow:0 0 8px rgba(66, 109, 201, .9); } .d-button:hover { color:#000; border-color:#666; } .d-button:active { border-color:#666; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#DDDDDD', endColorstr='#FFFFFF'); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF)); box-shadow:inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); } .d-button[disabled] { cursor:default; color:#666; background:#DDD; border: 1px solid #999; filter:alpha(opacity=50); opacity:.5; box-shadow:none; } .d-state-highlight { color: #FFF; border: 1px solid #1c6a9e; background: #2288cc; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); text-shadow: -1px -1px 1px #1c6a9e; } .d-state-highlight:hover { color:#FFF; border-color:#0F3A56; } .d-state-highlight:active { border-color:#1c6a9e; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); } .d-mask { background:#000; filter:alpha(opacity=70); opacity:.7; } /* common end */ .d-inner { background:#f0f1f9; } .d-titleBar { width:100%; height:0; position:relative; bottom:27px; _bottom:0; _margin-top:-27px; } .d-title { height:27px; line-height:27px; padding:0 37px 0 0; _padding:0; color:#333; text-shadow:1px 1px 0 rgba(255, 255, 255, .7); } .d-nw, .d-ne, .d-sw, .d-se, .d-n, .d-s, .d-close { background-image:url(opera/s1.png); background-repeat:no-repeat; } .d-nw { width:15px; height:32px; background-position: 0 0; } .d-ne { width:15px; height:32px; background-position: -15px 0; } .d-sw { width:15px; height:15px; background-position: 0 -33px; } .d-se { width:15px; height:15px; background-position: -15px -33px } .d-close { top:0; right:0; _z-index:1; width:27px; height:27px; _font-size:0; _line-height:0; *zoom:1; text-indent:-9999em; background-position:0 -96px; } .d-close:hover { background-position:0 -123px; } .d-n, .d-s { background-repeat:repeat-x; } .d-n { background-position: 0 -48px; } .d-s { background-position: 0 -81px; } .d-w, .d-e { background-image:url(opera/s2.png); background-repeat:repeat-y; } .d-w { background-position:left top; } .d-e { background-position: right bottom; } .d-icon, .d-main { padding-top:10px; } .d-state-noTitle .d-nw, .d-state-noTitle .d-ne, .d-state-noTitle .d-sw, .d-state-noTitle .d-se { width:3px; height:3px; } .d-state-noTitle .d-inner { border:1px solid #666; background:#FFF; } .d-state-noTitle { box-shadow:none; } .d-state-noTitle .d-nw, .d-state-noTitle .d-n, .d-state-noTitle .d-ne, .d-state-noTitle .d-w, .d-state-noTitle .d-e, .d-state-noTitle .d-sw, .d-state-noTitle .d-s, .d-state-noTitle .d-se { background:rgba(0, 0, 0, .05); background:#000\9!important; filter:alpha(opacity=5)!important; } .d-state-noTitle .d-titleBar { bottom:0; _bottom:0; _margin-top:0; } .d-state-noTitle .d-close { top:0; right:0; width:18px; height:18px; line-height:18px; text-align:center; text-indent:0; font-family: Helvetica, STHeiti; _font-family: '\u9ed1\u4f53', 'Book Antiqua', Palatino; font-size:18px; text-decoration:none; color:#214FA3; background:none; filter:!important; } .d-state-noTitle .d-close:hover, .d-state-noTitle .d-close:active { text-decoration:none; color:#900; }
12ik
trunk/public/js/dialog/skins5/opera.css
CSS
oos
6,287
@charset "utf-8"; /* * artDialog skin * http://code.google.com/p/artdialog/ * (c) 2009-2012 TangBin, http://www.planeArt.cn * * This is licensed under the GNU LGPL, version 2.1 or later. * For details, see: http://creativecommons.org/licenses/LGPL/2.1/ */ /* common start */ body { _margin:0; _height:100%; }/*IE6 BUG*/ .d-outer { text-align:left; } .d-border, .d-dialog { border:0 none; margin:0; border-collapse:collapse; width:auto; } .d-nw, .d-n, .d-ne, .d-w, .d-c, .d-e, .d-sw, .d-s, .d-se, .d-header, .d-main, .d-footer { padding:0; } .d-header, .d-button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family:Tahoma,Arial,Helvetica,STHeiti; -o-font-family: Tahoma, Arial; } .d-title { overflow:hidden; text-overflow: ellipsis; cursor:default; } .d-state-noTitle .d-title { display:none; } .d-close { display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; } .d-close:hover { text-decoration:none; } .d-main { text-align:center; vertical-align:middle; min-width:9em; } .d-content { display:inline-block; display:block\0/*IE8 BUG*/; display:inline-block\9\0; *zoom:1; *display:inline; text-align:left; border:0 none; } .d-content.d-state-full { display:block; width:100%; margin:0; padding:0!important; height:100%; } .d-loading { width:96px; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(loading.gif) no-repeat center center; } .d-buttons { padding:8px; text-align:right; white-space:nowrap; } .d-button { margin-left:15px; padding: 0 8px; cursor: pointer; display: inline-block; min-height:2.2em; text-align: center; *padding:4px 10px; *height:2em; letter-spacing:2px; font-family: Tahoma, Arial/9!important; width:auto; overflow:visible; *width:1; color: #333; border: 1px solid #999; border-radius: 5px; background: #DDD; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#DDDDDD'); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD)); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: box-shadow linear .2s; } .d-button::-moz-focus-inner, .d-button::-moz-focus-outer { border:0 none; padding:0; margin:0; } .d-button:focus { outline:none 0; border-color:#426DC9; box-shadow:0 0 8px rgba(66, 109, 201, .9); } .d-button:hover { color:#000; border-color:#666; } .d-button:active { border-color:#666; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#DDDDDD', endColorstr='#FFFFFF'); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF)); box-shadow:inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); } .d-button[disabled] { cursor:default; color:#666; background:#DDD; border: 1px solid #999; filter:alpha(opacity=50); opacity:.5; box-shadow:none; } .d-state-highlight { color: #FFF; border: 1px solid #1c6a9e; background: #2288cc; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); text-shadow: -1px -1px 1px #1c6a9e; } .d-state-highlight:hover { color:#FFF; border-color:#0F3A56; } .d-state-highlight:active { border-color:#1c6a9e; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); } .d-mask { background:#000; filter:alpha(opacity=70); opacity:.7; } /* common end */ .d-inner { background:#FFF; } .d-titleBar { width:100%; height:0; position:relative; bottom:26px; _bottom:0; _margin-top:-26px;} .d-title { height:26px; line-height:23px; padding:0 60px 0 5px; color:#FFF; font-weight:700; text-shadow:0 1px 0 #000; } .d-nw, .d-ne, .d-w, .d-e, .d-sw, .d-se, .d-close { background-image:url(chrome/chrome_s.png); background-repeat:no-repeat; } .d-nw { width:5px; height:26px; background-position: -46px -8px; } .d-ne { width:5px; height:26px; background-position: -53px -8px; } .d-w { background-position:-60px 0; background-repeat:repeat-y; } .d-e { background-position:-65px 0; background-repeat:repeat-y; } .d-sw { width:5px; height:5px; background-position: -46px -2px;} .d-se { width:5px; height:5px; background-position: -53px -2px;} .d-close { top:1px; right:0; width:44px; height:17px; background-position:0 0; _font-size:0; _line-height:0; text-indent:-9999em; } .d-close:hover { background-position:0 -18px; } .d-n, .d-s { background-image:url(chrome/border.png); background-repeat:repeat-x; } .d-n { background-position:0 top; } .d-s { background-position: 0 bottom; }.d-buttons { background-color:#F6F6F6; border-top:1px solid #DADEE5; } .d-state-noTitle .d-nw, .d-state-noTitle .d-ne, .d-state-noTitle .d-sw, .d-state-noTitle .d-se { width:3px; height:3px; } .d-state-noTitle .d-inner { border:1px solid #666; background:#FFF; } .d-state-noTitle { box-shadow:none; } .d-state-noTitle .d-nw, .d-state-noTitle .d-n, .d-state-noTitle .d-ne, .d-state-noTitle .d-w, .d-state-noTitle .d-e, .d-state-noTitle .d-sw, .d-state-noTitle .d-s, .d-state-noTitle .d-se { background:rgba(0, 0, 0, .05); background:#000\9!important; filter:alpha(opacity=5)!important; } .d-state-noTitle .d-titleBar { bottom:0; _bottom:0; _margin-top:0; } .d-state-noTitle .d-close { top:0; right:0; width:18px; height:18px; line-height:18px; text-align:center; text-indent:0; font-family: Helvetica, STHeiti; _font-family: '\u9ed1\u4f53', 'Book Antiqua', Palatino; font-size:18px; text-decoration:none; color:#214FA3; background:none; filter:!important; } .d-state-noTitle .d-close:hover, .d-state-noTitle .d-close:active { text-decoration:none; color:#900; }
12ik
trunk/public/js/dialog/skins5/chrome.css
CSS
oos
6,297
@charset "utf-8"; /* * artDialog skin * http://code.google.com/p/artdialog/ * (c) 2009-2012 TangBin, http://www.planeArt.cn * * This is licensed under the GNU LGPL, version 2.1 or later. * For details, see: http://creativecommons.org/licenses/LGPL/2.1/ */ /* common start */ body { _margin:0; _height:100%; }/*IE6 BUG*/ .d-outer { text-align:left; } .d-border, .d-dialog { border:0 none; margin:0; border-collapse:collapse; width:auto; } .d-nw, .d-n, .d-ne, .d-w, .d-c, .d-e, .d-sw, .d-s, .d-se, .d-header, .d-main, .d-footer { padding:0; } .d-header, .d-button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family:Tahoma,Arial,Helvetica,STHeiti; -o-font-family: Tahoma, Arial; } .d-title { overflow:hidden; text-overflow: ellipsis; cursor:default; } .d-state-noTitle .d-title { display:none; } .d-close { display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; } .d-close:hover { text-decoration:none; } .d-main { text-align:center; vertical-align:middle; min-width:9em; } .d-content { display:inline-block; display:block\0/*IE8 BUG*/; display:inline-block\9\0; *zoom:1; *display:inline; text-align:left; border:0 none; } .d-content.d-state-full { display:block; width:100%; margin:0; padding:0!important; height:100%; } .d-loading { width:96px; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(loading.gif) no-repeat center center; } .d-buttons { padding:8px; text-align:right; white-space:nowrap; } .d-button { margin-left:15px; padding: 0 8px; cursor: pointer; display: inline-block; min-height:2.2em; text-align: center; *padding:4px 10px; *height:2em; letter-spacing:2px; font-family: Tahoma, Arial/9!important; width:auto; overflow:visible; *width:1; color: #333; border: 1px solid #999; border-radius: 5px; background: #DDD; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#DDDDDD'); background: linear-gradient(top, #FFF, #DDD); background: -moz-linear-gradient(top, #FFF, #DDD); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#DDD)); text-shadow: 0px 1px 1px rgba(255, 255, 255, 1); box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(0, 0, 0, .09); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: box-shadow linear .2s; } .d-button::-moz-focus-inner, .d-button::-moz-focus-outer { border:0 none; padding:0; margin:0; } .d-button:focus { outline:none 0; border-color:#426DC9; box-shadow:0 0 8px rgba(66, 109, 201, .9); } .d-button:hover { color:#000; border-color:#666; } .d-button:active { border-color:#666; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#DDDDDD', endColorstr='#FFFFFF'); background: linear-gradient(top, #DDD, #FFF); background: -moz-linear-gradient(top, #DDD, #FFF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), to(#FFF)); box-shadow:inset 0 1px 5px rgba(66, 109, 201, .9), inset 0 1px 1em rgba(0, 0, 0, .3); } .d-button[disabled] { cursor:default; color:#666; background:#DDD; border: 1px solid #999; filter:alpha(opacity=50); opacity:.5; box-shadow:none; } .d-state-highlight { color: #FFF; border: 1px solid #1c6a9e; background: #2288cc; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); text-shadow: -1px -1px 1px #1c6a9e; } .d-state-highlight:hover { color:#FFF; border-color:#0F3A56; } .d-state-highlight:active { border-color:#1c6a9e; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee', endColorstr='#2288cc'); background: linear-gradient(top, #33bbee, #2288cc); background: -moz-linear-gradient(top, #33bbee, #2288cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#33bbee), to(#2288cc)); } .d-mask { background:#000; filter:alpha(opacity=70); opacity:.7; } /* common end */ .d-inner { background:#f7f7f7; } .d-titleBar { width:100%; height:0; position:relative; bottom:30px; _bottom:0; _margin-top:-30px; } .d-title { height:29px; line-height:29px; padding:0 25px 0 0; _padding:0; text-indent:5px; color:#FFF; font-weight:700; text-shadow:-1px -1px 0 rgba(33, 79, 183, .7); } .d-nw, .d-ne, .d-sw, .d-se, .d-n, .d-s, .d-close { background-image:url(blue/bg.png); background-repeat:no-repeat; } .d-nw { width:15px; height:38px; background-position: 0 0;} .d-ne { width:15px; height:38px; background-position: -15px 0; } .d-sw { width:15px; height:18px; background-position: 0 -38px; } .d-se { width:15px; height:18px; background-position: -15px -38px; } .d-close { top:4px; right:4px; _z-index:1; width:20px; height:20px; _font-size:0; _line-height:0; text-indent:-9999em; background-position:0 -112px; } .d-close:hover { background-position:0 -132px; } .d-n, .d-s { background-repeat:repeat-x; } .d-n { background-position: 0 -56px; } .d-s { background-position: 0 -94px; } .d-w, .d-e { background-image:url(blue/bg2.png); background-repeat:repeat-y; } .d-w { background-position:left top; } .d-e { background-position: right bottom; } .d-main { padding-top:3px; } @media screen and (min-width:0) {/* css3 */ .d-outer { border-radius:8px; box-shadow:0 5px 15px rgba(2, 37, 69, .4); -moz-transition:-moz-box-shadow linear .2s; -webkit-transition: -webkit-box-shadow linear .2s; transition: -webkit-box-shadow linear .2s; } .d-state-drag { box-shadow:none; } .d-state-lock { box-shadow:0 3px 26px rgba(0, 0, 0, .9); } .d-outer:active { box-shadow:0 0 5px rgba(2, 37, 69, .1)!important; } .d-state-drag { box-shadow:none!important; } .d-nw, .d-ne, .d-sw, .d-se, .d-n, .d-s, .d-close { background-image:url(blue/bg_css3.png); } .d-nw { width:5px; height:31px; } .d-ne { width:5px; height:31px; background-position: -5px 0; } .d-sw { width:5px; height:5px;background-position: 0 -31px; } .d-se { width:5px; height:5px; background-position: -5px -31px; } .d-close { background-position:0 -72px; } .d-close:hover { background-position:0 -92px; } .d-n { background-position: 0 -36px; } .d-s { background-position: 0 -67px; } .d-w, .d-e { background-image:url(blue/bg_css3_2.png); } } .d-state-noTitle .d-nw, .d-state-noTitle .d-ne, .d-state-noTitle .d-sw, .d-state-noTitle .d-se { width:3px; height:3px; } .d-state-noTitle .d-inner { border:1px solid #666; background:#FFF; } .d-state-noTitle { box-shadow:none; } .d-state-noTitle .d-nw, .d-state-noTitle .d-n, .d-state-noTitle .d-ne, .d-state-noTitle .d-w, .d-state-noTitle .d-e, .d-state-noTitle .d-sw, .d-state-noTitle .d-s, .d-state-noTitle .d-se { background:rgba(0, 0, 0, .05); background:#000\9!important; filter:alpha(opacity=5)!important; } .d-state-noTitle .d-titleBar { bottom:0; _bottom:0; _margin-top:0; } .d-state-noTitle .d-close { top:0; right:0; width:18px; height:18px; line-height:18px; text-align:center; text-indent:0; font-family: Helvetica, STHeiti; _font-family: '\u9ed1\u4f53', 'Book Antiqua', Palatino; font-size:18px; text-decoration:none; color:#214FA3; background:none; filter:!important; } .d-state-noTitle .d-close:hover, .d-state-noTitle .d-close:active { text-decoration:none; color:#900; }
12ik
trunk/public/js/dialog/skins5/blue.css
CSS
oos
7,349
/*! HTML5 Shiv vpre3.5 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed */ ;(function(window, document) { /** Preset options */ var options = window.html5 || {}; /** Used to skip problem elements */ var reSkip = /^<|^(?:button|form|map|select|textarea|object|iframe|option|optgroup)$/i; /** Not all elements can be cloned in IE (this list can be shortend) **/ var saveClones = /^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i; /** Detect whether the browser supports default html5 styles */ var supportsHtml5Styles; /** Detect whether the browser supports unknown elements */ var supportsUnknownElements; (function() { var a = document.createElement('a'); a.innerHTML = '<xyz></xyz>'; //if the hidden property is implemented we can assume, that the browser supports HTML5 Styles | this fails in Chrome 8 supportsHtml5Styles = ('hidden' in a); //if we are part of Modernizr, we do an additional test to solve the Chrome 8 fail if(supportsHtml5Styles && typeof injectElementWithStyles == 'function'){ injectElementWithStyles('#modernizr{}', function(node){ node.hidden = true; supportsHtml5Styles = (window.getComputedStyle ? getComputedStyle(node, null) : node.currentStyle).display == 'none'; }); } supportsUnknownElements = a.childNodes.length == 1 || (function() { // assign a false positive if unable to shiv try { (document.createElement)('a'); } catch(e) { return true; } var frag = document.createDocumentFragment(); return ( typeof frag.cloneNode == 'undefined' || typeof frag.createDocumentFragment == 'undefined' || typeof frag.createElement == 'undefined' ); }()); }()); /*--------------------------------------------------------------------------*/ /** * Creates a style sheet with the given CSS text and adds it to the document. * @private * @param {Document} ownerDocument The document. * @param {String} cssText The CSS text. * @returns {StyleSheet} The style element. */ function addStyleSheet(ownerDocument, cssText) { var p = ownerDocument.createElement('p'), parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement; p.innerHTML = 'x<style>' + cssText + '</style>'; return parent.insertBefore(p.lastChild, parent.firstChild); } /** * Returns the value of `html5.elements` as an array. * @private * @returns {Array} An array of shived element node names. */ function getElements() { var elements = html5.elements; return typeof elements == 'string' ? elements.split(' ') : elements; } /** * Shivs the `createElement` and `createDocumentFragment` methods of the document. * @private * @param {Document|DocumentFragment} ownerDocument The document. */ function shivMethods(ownerDocument) { var cache = {}, docCreateElement = ownerDocument.createElement, docCreateFragment = ownerDocument.createDocumentFragment, frag = docCreateFragment(); ownerDocument.createElement = function(nodeName) { //abort shiv if(!html5.shivMethods){ return docCreateElement(nodeName); } var node; if(cache[nodeName]){ node = cache[nodeName].cloneNode(); } else if(saveClones.test(nodeName)){ node = (cache[nodeName] = docCreateElement(nodeName)).cloneNode(); } else { node = docCreateElement(nodeName); } // Avoid adding some elements to fragments in IE < 9 because // * Attributes like `name` or `type` cannot be set/changed once an element // is inserted into a document/fragment // * Link elements with `src` attributes that are inaccessible, as with // a 403 response, will cause the tab/window to crash // * Script elements appended to fragments will execute when their `src` // or `text` property is set return node.canHaveChildren && !reSkip.test(nodeName) ? frag.appendChild(node) : node; }; ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' + 'var n=f.cloneNode(),c=n.createElement;' + 'h.shivMethods&&(' + // unroll the `createElement` calls getElements().join().replace(/\w+/g, function(nodeName) { docCreateElement(nodeName); frag.createElement(nodeName); return 'c("' + nodeName + '")'; }) + ');return n}' )(html5, frag); } /*--------------------------------------------------------------------------*/ /** * Shivs the given document. * @memberOf html5 * @param {Document} ownerDocument The document to shiv. * @returns {Document} The shived document. */ function shivDocument(ownerDocument) { var shived; if (ownerDocument.documentShived) { return ownerDocument; } if (html5.shivCSS && !supportsHtml5Styles) { shived = !!addStyleSheet(ownerDocument, // corrects block display not defined in IE6/7/8/9 'article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}' + // corrects audio display not defined in IE6/7/8/9 'audio{display:none}' + // corrects canvas and video display not defined in IE6/7/8/9 'canvas,video{display:inline-block;*display:inline;*zoom:1}' + // corrects 'hidden' attribute and audio[controls] display not present in IE7/8/9 '[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}' + // adds styling not present in IE6/7/8/9 'mark{background:#FF0;color:#000}' ); } if (!supportsUnknownElements) { shived = !shivMethods(ownerDocument); } if (shived) { ownerDocument.documentShived = shived; } return ownerDocument; } /*--------------------------------------------------------------------------*/ /** * The `html5` object is exposed so that more elements can be shived and * existing shiving can be detected on iframes. * @type Object * @example * * // options can be changed before the script is included * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false }; */ var html5 = { /** * An array or space separated string of node names of the elements to shiv. * @memberOf html5 * @type Array|String */ 'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video', /** * A flag to indicate that the HTML5 style sheet should be inserted. * @memberOf html5 * @type Boolean */ 'shivCSS': !(options.shivCSS === false), /** * A flag to indicate that the document's `createElement` and `createDocumentFragment` * methods should be overwritten. * @memberOf html5 * @type Boolean */ 'shivMethods': !(options.shivMethods === false), /** * A string to describe the type of `html5` object ("default" or "default print"). * @memberOf html5 * @type String */ 'type': 'default', // shivs the document according to the specified `html5` object options 'shivDocument': shivDocument }; /*--------------------------------------------------------------------------*/ // expose html5 window.html5 = html5; // shiv the document shivDocument(document); /*------------------------------- Print Shiv -------------------------------*/ /** Used to filter media types */ var reMedia = /^$|\b(?:all|print)\b/; /** Used to namespace printable elements */ var shivNamespace = 'html5shiv'; /** Detect whether the browser supports shivable style sheets */ var supportsShivableSheets = !supportsUnknownElements && (function() { // assign a false negative if unable to shiv var docEl = document.documentElement; return !( typeof document.namespaces == 'undefined' || typeof document.parentWindow == 'undefined' || typeof docEl.applyElement == 'undefined' || typeof docEl.removeNode == 'undefined' || typeof window.attachEvent == 'undefined' ); }()); /*--------------------------------------------------------------------------*/ /** * Wraps all HTML5 elements in the given document with printable elements. * (eg. the "header" element is wrapped with the "html5shiv:header" element) * @private * @param {Document} ownerDocument The document. * @returns {Array} An array wrappers added. */ function addWrappers(ownerDocument) { var node, nodes = ownerDocument.getElementsByTagName('*'), index = nodes.length, reElements = RegExp('^(?:' + getElements().join('|') + ')$', 'i'), result = []; while (index--) { node = nodes[index]; if (reElements.test(node.nodeName)) { result.push(node.applyElement(createWrapper(node))); } } return result; } /** * Creates a printable wrapper for the given element. * @private * @param {Element} element The element. * @returns {Element} The wrapper. */ function createWrapper(element) { var node, nodes = element.attributes, index = nodes.length, wrapper = element.ownerDocument.createElement(shivNamespace + ':' + element.nodeName); // copy element attributes to the wrapper while (index--) { node = nodes[index]; node.specified && wrapper.setAttribute(node.nodeName, node.nodeValue); } // copy element styles to the wrapper wrapper.style.cssText = element.style.cssText; return wrapper; } /** * Shivs the given CSS text. * (eg. header{} becomes html5shiv\:header{}) * @private * @param {String} cssText The CSS text to shiv. * @returns {String} The shived CSS text. */ function shivCssText(cssText) { var pair, parts = cssText.split('{'), index = parts.length, reElements = RegExp('(^|[\\s,>+~])(' + getElements().join('|') + ')(?=[[\\s,>+~#.:]|$)', 'gi'), replacement = '$1' + shivNamespace + '\\:$2'; while (index--) { pair = parts[index] = parts[index].split('}'); pair[pair.length - 1] = pair[pair.length - 1].replace(reElements, replacement); parts[index] = pair.join('}'); } return parts.join('{'); } /** * Removes the given wrappers, leaving the original elements. * @private * @params {Array} wrappers An array of printable wrappers. */ function removeWrappers(wrappers) { var index = wrappers.length; while (index--) { wrappers[index].removeNode(); } } /*--------------------------------------------------------------------------*/ /** * Shivs the given document for print. * @memberOf html5 * @param {Document} ownerDocument The document to shiv. * @returns {Document} The shived document. */ function shivPrint(ownerDocument) { var shivedSheet, wrappers, namespaces = ownerDocument.namespaces, ownerWindow = ownerDocument.parentWindow; if (!supportsShivableSheets || ownerDocument.printShived) { return ownerDocument; } if (typeof namespaces[shivNamespace] == 'undefined') { namespaces.add(shivNamespace); } ownerWindow.attachEvent('onbeforeprint', function() { var imports, length, sheet, collection = ownerDocument.styleSheets, cssText = [], index = collection.length, sheets = Array(index); // convert styleSheets collection to an array while (index--) { sheets[index] = collection[index]; } // concat all style sheet CSS text while ((sheet = sheets.pop())) { // IE does not enforce a same origin policy for external style sheets... // but has trouble with some dynamically created stylesheets if (!sheet.disabled && reMedia.test(sheet.media)) { try { imports = sheet.imports; length = imports.length; } catch(er){ length = 0; } for (index = 0; index < length; index++) { sheets.push(imports[index]); } try { cssText.push(sheet.cssText); } catch(er){} } } // wrap all HTML5 elements with printable elements and add the shived style sheet cssText = shivCssText(cssText.reverse().join('')); wrappers = addWrappers(ownerDocument); shivedSheet = addStyleSheet(ownerDocument, cssText); }); ownerWindow.attachEvent('onafterprint', function() { // remove wrappers, leaving the original elements, and remove the shived style sheet removeWrappers(wrappers); shivedSheet.removeNode(true); }); ownerDocument.printShived = true; return ownerDocument; } /*--------------------------------------------------------------------------*/ // expose API html5.type += ' print'; html5.shivPrint = shivPrint; // shiv for print shivPrint(document); }(this, document));
12ik
trunk/public/js/html5shiv-printshiv.js
JavaScript
oos
13,376
var langList = [ {name:'en', charset:'UTF-8'}, {name:'zh-cn', charset:'UTF-8'}, {name:'zh-tw', charset:'UTF-8'} ]; var skinList = [ {name:'default', charset:'UTF-8'}, {name:'whyGreen', charset:'UTF-8'} ];
12ik
trunk/public/js/date/config.js
JavaScript
oos
212
<html> <head> <meta http-equiv="content-type" content="text/xml; charset=utf-8" /> <title>My97DatePicker</title> <script type="text/javascript" src="config.js"></script> <script> if(parent==window) location.href = 'http://www.my97.net'; var $d, $dp, $pdp = parent.$dp, $dt, $tdt, $sdt, $IE=$pdp.ie, $FF = $pdp.ff,$OPERA=$pdp.opera, $ny, $cMark = false; if ($pdp.eCont) { $dp = {}; for (var p in $pdp) { $dp[p] = $pdp[p]; } } else $dp = $pdp; $dp.getLangIndex = function(name){ var arr = langList; for (var i = 0; i < arr.length; i++) { if (arr[i].name == name) { return i; } } return -1; } $dp.getLang = function(name){ var index = $dp.getLangIndex(name); if (index == -1) { index = 0; } return langList[index]; } $dp.realLang = $dp.getLang($dp.lang); document.write("<script src='lang/" + $dp.realLang.name + ".js' charset='" + $dp.realLang.charset + "'><\/script>"); for (var i = 0; i < skinList.length; i++) { document.write('<link rel="stylesheet" type="text/css" href="skin/' + skinList[i].name + '/datepicker.css" title="' + skinList[i].name + '" charset="' + skinList[i].charset + '" disabled="true"/>'); } </script> <script type="text/javascript" src="calendar.js"></script> </head> <body leftmargin="0" topmargin="0" onload="$c.autoSize()" tabindex=0> </body> </html> <script>new My97DP();</script>
12ik
trunk/public/js/date/My97DatePicker.htm
HTML
oos
1,341
.Wdate { border: #999 1px solid; height: 20px; background: #fff url(datePicker.gif) no-repeat right; } .WdateFmtErr { font-weight: bold; color: red; }
12ik
trunk/public/js/date/skin/WdatePicker.css
CSS
oos
156
/* * My97 DatePicker 4.7 Skin:whyGreen */ .WdateDiv { width: 180px; background-color: #fff; border: #C5E1E4 1px solid; padding: 2px; } .WdateDiv2 { width: 360px; } .WdateDiv * { font-size: 9pt; } .WdateDiv .NavImg a { cursor: pointer; display: block; width: 16px; height: 16px; margin-top: 1px; } .WdateDiv .NavImgll a { float: left; background: url(img.gif) no-repeat; } .WdateDiv .NavImgl a { float: left; background: url(img.gif) no-repeat -16px 0px; } .WdateDiv .NavImgr a { float: right; background: url(img.gif) no-repeat -32px 0px; } .WdateDiv .NavImgrr a { float: right; background: url(img.gif) no-repeat -48px 0px; } .WdateDiv #dpTitle { height: 24px; padding: 1px; border: #c5d9e8 1px solid; background: url(bg.jpg); margin-bottom: 2px; } .WdateDiv .yminput { margin-top: 2px; text-align: center; border: 0px; height: 20px; width: 50px; color: #034c50; background-color: transparent; cursor: pointer; } .WdateDiv .yminputfocus { margin-top: 2px; text-align: center; border: #939393 1px solid; font-weight: bold; color: #034c50; height: 20px; width: 50px; } .WdateDiv .menuSel { z-index: 1; position: absolute; background-color: #FFFFFF; border: #A3C6C8 1px solid; display: none; } .WdateDiv .menu { cursor: pointer; background-color: #fff; color: #11777C; } .WdateDiv .menuOn { cursor: pointer; background-color: #BEEBEE; } .WdateDiv .invalidMenu { color: #aaa; } .WdateDiv .YMenu { margin-top: 20px; } .WdateDiv .MMenu { margin-top: 20px; *width: 62px; } .WdateDiv .hhMenu { margin-top: -90px; margin-left: 26px; } .WdateDiv .mmMenu { margin-top: -46px; margin-left: 26px; } .WdateDiv .ssMenu { margin-top: -24px; margin-left: 26px; } .WdateDiv .Wweek { text-align: center; background: #DAF3F5; border-right: #BDEBEE 1px solid; } .WdateDiv .MTitle { color: #13777e; background-color: #bdebee; } .WdateDiv .WdayTable2 { border-collapse: collapse; border: #BEE9F0 1px solid; } .WdateDiv .WdayTable2 table { border: 0; } .WdateDiv .WdayTable { line-height: 20px; color: #13777e; background-color: #edfbfb; border: #BEE9F0 1px solid; } .WdateDiv .WdayTable td { text-align: center; } .WdateDiv .Wday { cursor: pointer; } .WdateDiv .WdayOn { cursor: pointer; background-color: #74d2d9; } .WdateDiv .Wwday { cursor: pointer; color: #ab1e1e; } .WdateDiv .WwdayOn { cursor: pointer; background-color: #74d2d9; } .WdateDiv .Wtoday { cursor: pointer; color: blue; } .WdateDiv .Wselday { background-color: #A7E2E7; } .WdateDiv .WspecialDay { background-color: #66F4DF; } .WdateDiv .WotherDay { cursor: pointer; color: #0099CC; } .WdateDiv .WotherDayOn { cursor: pointer; background-color: #C0EBEF; } .WdateDiv .WinvalidDay { color: #aaa; } .WdateDiv #dpTime { float: left; margin-top: 3px; margin-right: 30px; } .WdateDiv #dpTime #dpTimeStr { margin-left: 1px; color: #497F7F; } .WdateDiv #dpTime input { height: 20px; width: 18px; text-align: center; color: #333; border: #61CAD0 1px solid; } .WdateDiv #dpTime .tB { border-right: 0px; } .WdateDiv #dpTime .tE { border-left: 0; border-right: 0; } .WdateDiv #dpTime .tm { width: 7px; border-left: 0; border-right: 0; } .WdateDiv #dpTime #dpTimeUp { height: 10px; width: 13px; border: 0px; background: url(img.gif) no-repeat -32px -16px; } .WdateDiv #dpTime #dpTimeDown { height: 10px; width: 13px; border: 0px; background: url(img.gif) no-repeat -48px -16px; } .WdateDiv #dpQS { float: left; margin-right: 3px; margin-top: 3px; background: url(img.gif) no-repeat 0px -16px; width: 20px; height: 20px; cursor: pointer; } .WdateDiv #dpControl { text-align: right; margin-top: 3px; } .WdateDiv .dpButton { height: 20px; width: 45px; margin-top: 2px; border: #38B1B9 1px solid; background-color: #CFEBEE; color: #08575B; }
12ik
trunk/public/js/date/skin/whyGreen/datepicker.css
CSS
oos
3,845
/* * My97 DatePicker 4.7 */ .WdateDiv { width: 180px; background-color: #FFFFFF; border: #bbb 1px solid; padding: 2px; } .WdateDiv2 { width: 360px; } .WdateDiv * { font-size: 9pt; } .WdateDiv .NavImg a { display: block; cursor: pointer; height: 16px; width: 16px; } .WdateDiv .NavImgll a { float: left; background: transparent url(img.gif) no-repeat scroll 0 0; } .WdateDiv .NavImgl a { float: left; background: transparent url(img.gif) no-repeat scroll -16px 0; } .WdateDiv .NavImgr a { float: right; background: transparent url(img.gif) no-repeat scroll -32px 0; } .WdateDiv .NavImgrr a { float: right; background: transparent url(img.gif) no-repeat scroll -48px 0; } .WdateDiv #dpTitle { height: 24px; margin-bottom: 2px; padding: 1px; } .WdateDiv .yminput { margin-top: 2px; text-align: center; height: 20px; border: 0px; width: 50px; cursor: pointer; } .WdateDiv .yminputfocus { margin-top: 2px; text-align: center; font-weight: bold; height: 20px; color: blue; border: #ccc 1px solid; width: 50px; } .WdateDiv .menuSel { z-index: 1; position: absolute; background-color: #FFFFFF; border: #ccc 1px solid; display: none; } .WdateDiv .menu { cursor: pointer; background-color: #fff; } .WdateDiv .menuOn { cursor: pointer; background-color: #BEEBEE; } .WdateDiv .invalidMenu { color: #aaa; } .WdateDiv .YMenu { margin-top: 20px; } .WdateDiv .MMenu { margin-top: 20px; *width: 62px; } .WdateDiv .hhMenu { margin-top: -90px; margin-left: 26px; } .WdateDiv .mmMenu { margin-top: -46px; margin-left: 26px; } .WdateDiv .ssMenu { margin-top: -24px; margin-left: 26px; } .WdateDiv .Wweek { text-align: center; background: #DAF3F5; border-right: #BDEBEE 1px solid; } .WdateDiv .MTitle { background-color: #BDEBEE; } .WdateDiv .WdayTable2 { border-collapse: collapse; border: #c5d9e8 1px solid; } .WdateDiv .WdayTable2 table { border: 0; } .WdateDiv .WdayTable { line-height: 20px; border: #c5d9e8 1px solid; } .WdateDiv .WdayTable td { text-align: center; } .WdateDiv .Wday { cursor: pointer; } .WdateDiv .WdayOn { cursor: pointer; background-color: #C0EBEF; } .WdateDiv .Wwday { cursor: pointer; color: #FF2F2F; } .WdateDiv .WwdayOn { cursor: pointer; color: #000; background-color: #C0EBEF; } .WdateDiv .Wtoday { cursor: pointer; color: blue; } .WdateDiv .Wselday { background-color: #A9E4E9; } .WdateDiv .WspecialDay { background-color: #66F4DF; } .WdateDiv .WotherDay { cursor: pointer; color: #6A6AFF; } .WdateDiv .WotherDayOn { cursor: pointer; background-color: #C0EBEF; } .WdateDiv .WinvalidDay { color: #aaa; } .WdateDiv #dpTime { float: left; margin-top: 3px; margin-right: 30px; } .WdateDiv #dpTime #dpTimeStr { margin-left: 1px; } .WdateDiv #dpTime input { width: 18px; height: 20px; text-align: center; border: #ccc 1px solid; } .WdateDiv #dpTime .tB { border-right: 0px; } .WdateDiv #dpTime .tE { border-left: 0; border-right: 0; } .WdateDiv #dpTime .tm { width: 7px; border-left: 0; border-right: 0; } .WdateDiv #dpTime #dpTimeUp { height: 10px; width: 13px; border: 0px; background: url(img.gif) no-repeat -32px -16px; } .WdateDiv #dpTime #dpTimeDown { height: 10px; width: 13px; border: 0px; background: url(img.gif) no-repeat -48px -16px; } .WdateDiv #dpQS { float: left; margin-right: 3px; margin-top: 3px; background: url(img.gif) no-repeat 0px -16px; width: 20px; height: 20px; cursor: pointer; } .WdateDiv #dpControl { text-align: right; } .WdateDiv .dpButton { height: 20px; width: 45px; border: #ccc 1px solid; margin-top: 2px; margin-right: 1px; }
12ik
trunk/public/js/date/skin/default/datepicker.css
CSS
oos
3,630
var $lang={ errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u7BC4\u570D,\u9700\u8981\u64A4\u92B7\u55CE?", aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"], aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"], aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"], aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"], clearStr: "\u6E05\u7A7A", todayStr: "\u4ECA\u5929", okStr: "\u78BA\u5B9A", updateStr: "\u78BA\u5B9A", timeStr: "\u6642\u9593", quickStr: "\u5FEB\u901F\u9078\u64C7", err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u65BC\u6700\u5927\u65E5\u671F!' }
12ik
trunk/public/js/date/lang/zh-tw.js
JavaScript
oos
1,075
var $lang={ errAlertMsg: "Invalid date or the date out of range,redo or not?", aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], aLongWeekStr:["wk","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"], aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], aLongMonStr: ["January","February","March","April","May","June","July","August","September","October","November","December"], clearStr: "Clear", todayStr: "Today", okStr: "OK", updateStr: "OK", timeStr: "Time", quickStr: "Quick Selection", err_1: 'MinDate Cannot be bigger than MaxDate!' }
12ik
trunk/public/js/date/lang/en.js
JavaScript
oos
631
var $lang={ errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u8303\u56F4,\u9700\u8981\u64A4\u9500\u5417?", aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"], aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"], aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"], aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"], clearStr: "\u6E05\u7A7A", todayStr: "\u4ECA\u5929", okStr: "\u786E\u5B9A", updateStr: "\u786E\u5B9A", timeStr: "\u65F6\u95F4", quickStr: "\u5FEB\u901F\u9009\u62E9", err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u4E8E\u6700\u5927\u65E5\u671F!' }
12ik
trunk/public/js/date/lang/zh-cn.js
JavaScript
oos
1,076
/** * jQuery Validation Plugin 1.8.0 * * http://bassistance.de/jquery-plugins/jquery-plugin-validation/ * http://docs.jquery.com/Plugins/Validation * * Copyright (c) 2006 - 2011 Jörn Zaefferer * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ (function($) { $.extend($.fn, { // http://docs.jquery.com/Plugins/Validation/validate validate: function( options ) { // if nothing is selected, return nothing; can't chain anyway if (!this.length) { options && options.debug && window.console && console.warn( "nothing selected, can't validate, returning nothing" ); return; } // check if a validator for this form was already created var validator = $.data(this[0], 'validator'); if ( validator ) { return validator; } validator = new $.validator( options, this[0] ); $.data(this[0], 'validator', validator); if ( validator.settings.onsubmit ) { // allow suppresing validation by adding a cancel class to the submit button this.find("input, button").filter(".cancel").click(function() { validator.cancelSubmit = true; }); // when a submitHandler is used, capture the submitting button if (validator.settings.submitHandler) { this.find("input, button").filter(":submit").click(function() { validator.submitButton = this; }); } // validate the form on submit this.submit( function( event ) { if ( validator.settings.debug ) // prevent form submit to be able to see console output event.preventDefault(); function handle() { if ( validator.settings.submitHandler ) { if (validator.submitButton) { // insert a hidden input as a replacement for the missing submit button var hidden = $("<input type='hidden'/>").attr("name", validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm); } validator.settings.submitHandler.call( validator, validator.currentForm ); if (validator.submitButton) { // and clean up afterwards; thanks to no-block-scope, hidden can be referenced hidden.remove(); } return false; } return true; } // prevent submit for invalid forms or custom submit handlers if ( validator.cancelSubmit ) { validator.cancelSubmit = false; return handle(); } if ( validator.form() ) { if ( validator.pendingRequest ) { validator.formSubmitted = true; return false; } return handle(); } else { validator.focusInvalid(); return false; } }); } return validator; }, // http://docs.jquery.com/Plugins/Validation/valid valid: function() { if ( $(this[0]).is('form')) { return this.validate().form(); } else { var valid = true; var validator = $(this[0].form).validate(); this.each(function() { valid &= validator.element(this); }); return valid; } }, // attributes: space seperated list of attributes to retrieve and remove removeAttrs: function(attributes) { var result = {}, $element = this; $.each(attributes.split(/\s/), function(index, value) { result[value] = $element.attr(value); $element.removeAttr(value); }); return result; }, // http://docs.jquery.com/Plugins/Validation/rules rules: function(command, argument) { var element = this[0]; if (command) { var settings = $.data(element.form, 'validator').settings; var staticRules = settings.rules; var existingRules = $.validator.staticRules(element); switch(command) { case "add": $.extend(existingRules, $.validator.normalizeRule(argument)); staticRules[element.id] = existingRules; if (argument.messages) settings.messages[element.id] = $.extend( settings.messages[element.id], argument.messages ); break; case "remove": if (!argument) { delete staticRules[element.id]; return existingRules; } var filtered = {}; $.each(argument.split(/\s/), function(index, method) { filtered[method] = existingRules[method]; delete existingRules[method]; }); return filtered; } } var data = $.validator.normalizeRules( $.extend( {}, $.validator.metadataRules(element), $.validator.classRules(element), $.validator.attributeRules(element), $.validator.staticRules(element) ), element); // make sure required is at front if (data.required) { var param = data.required; delete data.required; data = $.extend({required: param}, data); } return data; } }); // Custom selectors $.extend($.expr[":"], { // http://docs.jquery.com/Plugins/Validation/blank blank: function(a) {return !$.trim("" + a.value);}, // http://docs.jquery.com/Plugins/Validation/filled filled: function(a) {return !!$.trim("" + a.value);}, // http://docs.jquery.com/Plugins/Validation/unchecked unchecked: function(a) {return !a.checked;} }); // constructor for validator $.validator = function( options, form ) { this.settings = $.extend( true, {}, $.validator.defaults, options ); this.currentForm = form; this.init(); }; $.validator.format = function(source, params) { if ( arguments.length == 1 ) return function() { var args = $.makeArray(arguments); args.unshift(source); return $.validator.format.apply( this, args ); }; if ( arguments.length > 2 && params.constructor != Array ) { params = $.makeArray(arguments).slice(1); } if ( params.constructor != Array ) { params = [ params ]; } $.each(params, function(i, n) { source = source.replace(new RegExp("\\{" + i + "\\}", "g"), n); }); return source; }; $.extend($.validator, { defaults: { messages: {}, groups: {}, rules: {}, errorClass: "error", validClass: "valid", errorElement: "label", focusInvalid: true, errorContainer: $( [] ), errorLabelContainer: $( [] ), onsubmit: true, ignore: [], ignoreTitle: false, onfocusin: function(element) { this.lastActive = element; // hide error label and remove error class on focus if enabled if ( this.settings.focusCleanup && !this.blockFocusCleanup ) { this.settings.unhighlight && this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass ); this.addWrapper(this.errorsFor(element)).hide(); } }, onfocusout: function(element) { if ( !this.checkable(element) && (element.id in this.submitted || !this.optional(element)) ) { this.element(element); } }, onkeyup: function(element) { if ( element.id in this.submitted || element == this.lastElement ) { this.element(element); } }, onclick: function(element) { // click on selects, radiobuttons and checkboxes if ( element.id in this.submitted ) this.element(element); // or option elements, check parent select in that case else if (element.parentNode.name in this.submitted) this.element(element.parentNode); }, highlight: function( element, errorClass, validClass ) { $(element).addClass(errorClass).removeClass(validClass); }, unhighlight: function( element, errorClass, validClass ) { $(element).removeClass(errorClass).addClass(validClass); } }, // http://docs.jquery.com/Plugins/Validation/Validator/setDefaults setDefaults: function(settings) { $.extend( $.validator.defaults, settings ); }, messages: { required: "This field is required.", remote: "Please fix this field.", email: "Please enter a valid email address.", url: "Please enter a valid URL.", date: "Please enter a valid date.", dateISO: "Please enter a valid date (ISO).", number: "Please enter a valid number.", digits: "Please enter only digits.", creditcard: "Please enter a valid credit card number.", equalTo: "Please enter the same value again.", accept: "Please enter a value with a valid extension.", maxlength: $.validator.format("Please enter no more than {0} characters."), minlength: $.validator.format("Please enter at least {0} characters."), rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."), range: $.validator.format("Please enter a value between {0} and {1}."), max: $.validator.format("Please enter a value less than or equal to {0}."), min: $.validator.format("Please enter a value greater than or equal to {0}.") }, autoCreateRanges: false, prototype: { init: function() { this.labelContainer = $(this.settings.errorLabelContainer); this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm); this.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer ); this.submitted = {}; this.valueCache = {}; this.pendingRequest = 0; this.pending = {}; this.invalid = {}; this.reset(); var groups = (this.groups = {}); $.each(this.settings.groups, function(key, value) { $.each(value.split(/\s/), function(index, name) { groups[name] = key; }); }); var rules = this.settings.rules; $.each(rules, function(key, value) { rules[key] = $.validator.normalizeRule(value); }); function delegate(event) { var validator = $.data(this[0].form, "validator"), eventType = "on" + event.type.replace(/^validate/, ""); validator.settings[eventType] && validator.settings[eventType].call(validator, this[0] ); } $(this.currentForm) .validateDelegate(":text, :password, :file, select, textarea", "focusin focusout keyup", delegate) .validateDelegate(":radio, :checkbox, select, option", "click", delegate); if (this.settings.invalidHandler) $(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler); }, // http://docs.jquery.com/Plugins/Validation/Validator/form form: function() { this.checkForm(); $.extend(this.submitted, this.errorMap); this.invalid = $.extend({}, this.errorMap); if (!this.valid()) $(this.currentForm).triggerHandler("invalid-form", [this]); this.showErrors(); return this.valid(); }, checkForm: function() { this.prepareForm(); for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) { this.check( elements[i] ); } return this.valid(); }, // http://docs.jquery.com/Plugins/Validation/Validator/element element: function( element ) { element = this.clean( element ); this.lastElement = element; this.prepareElement( element ); this.currentElements = $(element); var result = this.check( element ); if ( result ) { delete this.invalid[element.id]; } else { this.invalid[element.id] = true; } if ( !this.numberOfInvalids() ) { // Hide error containers on last error this.toHide = this.toHide.add( this.containers ); } this.showErrors(); return result; }, // http://docs.jquery.com/Plugins/Validation/Validator/showErrors showErrors: function(errors) { if(errors) { // add items to error list and map $.extend( this.errorMap, errors ); this.errorList = []; for ( var name in errors ) { this.errorList.push({ message: errors[name], element: this.findByName(name)[0] }); } // remove items from success list this.successList = $.grep( this.successList, function(element) { return !(element.id in errors); }); } this.settings.showErrors ? this.settings.showErrors.call( this, this.errorMap, this.errorList ) : this.defaultShowErrors(); }, // http://docs.jquery.com/Plugins/Validation/Validator/resetForm resetForm: function() { if ( $.fn.resetForm ) $( this.currentForm ).resetForm(); this.submitted = {}; this.prepareForm(); this.hideErrors(); this.elements().removeClass( this.settings.errorClass ); }, numberOfInvalids: function() { return this.objectLength(this.invalid); }, objectLength: function( obj ) { var count = 0; for ( var i in obj ) count++; return count; }, hideErrors: function() { this.addWrapper( this.toHide ).hide(); }, valid: function() { return this.size() == 0; }, size: function() { return this.errorList.length; }, focusInvalid: function() { if( this.settings.focusInvalid ) { try { $(this.findLastActive() || this.errorList.length && this.errorList[0].element || []) .filter(":visible") .focus() // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find .trigger("focusin"); } catch(e) { // ignore IE throwing errors when focusing hidden elements } } }, findLastActive: function() { var lastActive = this.lastActive; return lastActive && $.grep(this.errorList, function(n) { return n.element.id == lastActive.name; }).length == 1 && lastActive; }, elements: function() { var validator = this, rulesCache = {}; // select all valid inputs inside the form (no submit or reset buttons) // workaround $Query([]).add until http://dev.jquery.com/ticket/2114 is solved return $([]).add(this.currentForm.elements) .filter(":input") .not(":submit, :reset, :image, [disabled]") .not( this.settings.ignore ) .filter(function() { !this.name && validator.settings.debug && window.console && console.error( "%o has no name assigned", this); // select only the first element for each name, and only those with rules specified if ( this.name in rulesCache || !validator.objectLength($(this).rules()) ) return false; rulesCache[this.name] = true; return true; }); }, clean: function( selector ) { return $( selector )[0]; }, errors: function() { return $( this.settings.errorElement + "." + this.settings.errorClass, this.errorContext ); }, reset: function() { this.successList = []; this.errorList = []; this.errorMap = {}; this.toShow = $([]); this.toHide = $([]); this.currentElements = $([]); }, prepareForm: function() { this.reset(); this.toHide = this.errors().add( this.containers ); }, prepareElement: function( element ) { this.reset(); this.toHide = this.errorsFor(element); }, check: function( element ) { element = this.clean( element ); // if radio/checkbox, validate first element in group instead if (this.checkable(element)) { element = this.findByName( element.id ).not(this.settings.ignore)[0]; } var rules = $(element).rules(); var dependencyMismatch = false; for (var method in rules ) { var rule = { method: method, parameters: rules[method] }; try { var result = $.validator.methods[method].call( this, element.value.replace(/\r/g, ""), element, rule.parameters ); // if a method indicates that the field is optional and therefore valid, // don't mark it as valid when there are no other rules if ( result == "dependency-mismatch" ) { dependencyMismatch = true; continue; } dependencyMismatch = false; if ( result == "pending" ) { this.toHide = this.toHide.not( this.errorsFor(element) ); return; } if( !result ) { this.formatAndAdd( element, rule ); return false; } } catch(e) { this.settings.debug && window.console && console.log("exception occured when checking element " + element.id + ", check the '" + rule.method + "' method", e); throw e; } } if (dependencyMismatch) return; if ( this.objectLength(rules) ) this.successList.push(element); return true; }, // return the custom message for the given element and validation method // specified in the element's "messages" metadata customMetaMessage: function(element, method) { if (!$.metadata) return; var meta = this.settings.meta ? $(element).metadata()[this.settings.meta] : $(element).metadata(); return meta && meta.messages && meta.messages[method]; }, // return the custom message for the given element name and validation method customMessage: function( name, method ) { var m = this.settings.messages[name]; return m && (m.constructor == String ? m : m[method]); }, // return the first defined argument, allowing empty strings findDefined: function() { for(var i = 0; i < arguments.length; i++) { if (arguments[i] !== undefined) return arguments[i]; } return undefined; }, defaultMessage: function( element, method) { return this.findDefined( this.customMessage( element.id, method ), this.customMetaMessage( element, method ), // title is never undefined, so handle empty string as undefined !this.settings.ignoreTitle && element.title || undefined, $.validator.messages[method], "<strong>Warning: No message defined for " + element.id + "</strong>" ); }, formatAndAdd: function( element, rule ) { var message = this.defaultMessage( element, rule.method ), theregex = /\$?\{(\d+)\}/g; if ( typeof message == "function" ) { message = message.call(this, rule.parameters, element); } else if (theregex.test(message)) { message = jQuery.format(message.replace(theregex, '{$1}'), rule.parameters); } this.errorList.push({ message: message, element: element }); this.errorMap[element.id] = message; this.submitted[element.id] = message; }, addWrapper: function(toToggle) { if ( this.settings.wrapper ) toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) ); return toToggle; }, defaultShowErrors: function() { for ( var i = 0; this.errorList[i]; i++ ) { var error = this.errorList[i]; this.settings.highlight && this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass ); this.showLabel( error.element, error.message ); } if( this.errorList.length ) { this.toShow = this.toShow.add( this.containers ); } if (this.settings.success) { for ( var i = 0; this.successList[i]; i++ ) { this.showLabel( this.successList[i] ); } } if (this.settings.unhighlight) { for ( var i = 0, elements = this.validElements(); elements[i]; i++ ) { this.settings.unhighlight.call( this, elements[i], this.settings.errorClass, this.settings.validClass ); } } this.toHide = this.toHide.not( this.toShow ); this.hideErrors(); this.addWrapper( this.toShow ).show(); }, validElements: function() { return this.currentElements.not(this.invalidElements()); }, invalidElements: function() { return $(this.errorList).map(function() { return this.element; }); }, showLabel: function(element, message) { var label = this.errorsFor( element ); if ( label.length ) { // refresh error/success class label.removeClass().addClass( this.settings.errorClass ); // check if we have a generated label, replace the message then label.attr("generated") && label.html(message); } else { // create label label = $("<" + this.settings.errorElement + "/>") .attr({"for": this.idOrName(element), generated: true}) .addClass(this.settings.errorClass) .html(message || ""); if ( this.settings.wrapper ) { // make sure the element is visible, even in IE // actually showing the wrapped element is handled elsewhere label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent(); } if ( !this.labelContainer.append(label).length ) this.settings.errorPlacement ? this.settings.errorPlacement(label, $(element) ) : label.insertAfter(element); } if ( !message && this.settings.success ) { label.text(""); typeof this.settings.success == "string" ? label.addClass( this.settings.success ) : this.settings.success( label ); } this.toShow = this.toShow.add(label); }, errorsFor: function(element) { var name = this.idOrName(element); return this.errors().filter(function() { return $(this).attr('for') == name; }); }, idOrName: function(element) { return this.groups[element.id] || (this.checkable(element) ? element.id : element.id || element.id); }, checkable: function( element ) { return /radio|checkbox/i.test(element.type); }, findByName: function( name ) { // select by name and filter by form for performance over form.find("[name=...]") var form = this.currentForm; return $(document.getElementsByName(name)).map(function(index, element) { return element.form == form && element.id == name && element || null; }); }, getLength: function(value, element) { switch( element.nodeName.toLowerCase() ) { case 'select': return $("option:selected", element).length; case 'input': if( this.checkable( element) ) return this.findByName(element.id).filter(':checked').length; } return value.length; }, depend: function(param, element) { return this.dependTypes[typeof param] ? this.dependTypes[typeof param](param, element) : true; }, dependTypes: { "boolean": function(param, element) { return param; }, "string": function(param, element) { return !!$(param, element.form).length; }, "function": function(param, element) { return param(element); } }, optional: function(element) { return !$.validator.methods.required.call(this, $.trim(element.value), element) && "dependency-mismatch"; }, startRequest: function(element) { if (!this.pending[element.id]) { this.pendingRequest++; this.pending[element.id] = true; } }, stopRequest: function(element, valid) { this.pendingRequest--; // sometimes synchronization fails, make sure pendingRequest is never < 0 if (this.pendingRequest < 0) this.pendingRequest = 0; delete this.pending[element.id]; if ( valid && this.pendingRequest == 0 && this.formSubmitted && this.form() ) { $(this.currentForm).submit(); this.formSubmitted = false; } else if (!valid && this.pendingRequest == 0 && this.formSubmitted) { $(this.currentForm).triggerHandler("invalid-form", [this]); this.formSubmitted = false; } }, previousValue: function(element) { return $.data(element, "previousValue") || $.data(element, "previousValue", { old: null, valid: true, message: this.defaultMessage( element, "remote" ) }); } }, classRuleSettings: { required: {required: true}, email: {email: true}, url: {url: true}, date: {date: true}, dateISO: {dateISO: true}, dateDE: {dateDE: true}, number: {number: true}, numberDE: {numberDE: true}, digits: {digits: true}, creditcard: {creditcard: true} }, addClassRules: function(className, rules) { className.constructor == String ? this.classRuleSettings[className] = rules : $.extend(this.classRuleSettings, className); }, classRules: function(element) { var rules = {}; var classes = $(element).attr('class'); classes && $.each(classes.split(' '), function() { if (this in $.validator.classRuleSettings) { $.extend(rules, $.validator.classRuleSettings[this]); } }); return rules; }, attributeRules: function(element) { var rules = {}; var $element = $(element); for (var method in $.validator.methods) { var value = $element.attr(method); if (value) { rules[method] = value; } } // maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs if (rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength)) { delete rules.maxlength; } return rules; }, metadataRules: function(element) { if (!$.metadata) return {}; var meta = $.data(element.form, 'validator').settings.meta; return meta ? $(element).metadata()[meta] : $(element).metadata(); }, staticRules: function(element) { var rules = {}; var validator = $.data(element.form, 'validator'); if (validator.settings.rules) { rules = $.validator.normalizeRule(validator.settings.rules[element.id]) || {}; } return rules; }, normalizeRules: function(rules, element) { // handle dependency check $.each(rules, function(prop, val) { // ignore rule when param is explicitly false, eg. required:false if (val === false) { delete rules[prop]; return; } if (val.param || val.depends) { var keepRule = true; switch (typeof val.depends) { case "string": keepRule = !!$(val.depends, element.form).length; break; case "function": keepRule = val.depends.call(element, element); break; } if (keepRule) { rules[prop] = val.param !== undefined ? val.param : true; } else { delete rules[prop]; } } }); // evaluate parameters $.each(rules, function(rule, parameter) { rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter; }); // clean number parameters $.each(['minlength', 'maxlength', 'min', 'max'], function() { if (rules[this]) { rules[this] = Number(rules[this]); } }); $.each(['rangelength', 'range'], function() { if (rules[this]) { rules[this] = [Number(rules[this][0]), Number(rules[this][1])]; } }); if ($.validator.autoCreateRanges) { // auto-create ranges if (rules.min && rules.max) { rules.range = [rules.min, rules.max]; delete rules.min; delete rules.max; } if (rules.minlength && rules.maxlength) { rules.rangelength = [rules.minlength, rules.maxlength]; delete rules.minlength; delete rules.maxlength; } } // To support custom messages in metadata ignore rule methods titled "messages" if (rules.messages) { delete rules.messages; } return rules; }, // Converts a simple string to a {string: true} rule, e.g., "required" to {required:true} normalizeRule: function(data) { if( typeof data == "string" ) { var transformed = {}; $.each(data.split(/\s/), function() { transformed[this] = true; }); data = transformed; } return data; }, // http://docs.jquery.com/Plugins/Validation/Validator/addMethod addMethod: function(name, method, message) { $.validator.methods[name] = method; $.validator.messages[name] = message != undefined ? message : $.validator.messages[name]; if (method.length < 3) { $.validator.addClassRules(name, $.validator.normalizeRule(name)); } }, methods: { // http://docs.jquery.com/Plugins/Validation/Methods/required required: function(value, element, param) { // check if dependency is met if ( !this.depend(param, element) ) return "dependency-mismatch"; switch( element.nodeName.toLowerCase() ) { case 'select': // could be an array for select-multiple or a string, both are fine this way var val = $(element).val(); return val && val.length > 0; case 'input': if ( this.checkable(element) ) return this.getLength(value, element) > 0; default: return $.trim(value).length > 0; } }, // http://docs.jquery.com/Plugins/Validation/Methods/remote remote: function(value, element, param) { if ( this.optional(element) ) return "dependency-mismatch"; var previous = this.previousValue(element); if (!this.settings.messages[element.id] ) this.settings.messages[element.id] = {}; previous.originalMessage = this.settings.messages[element.id].remote; this.settings.messages[element.id].remote = previous.message; param = typeof param == "string" && {url:param} || param; if ( this.pending[element.id] ) { return "pending"; } if ( previous.old === value ) { return previous.valid; } previous.old = value; var validator = this; this.startRequest(element); var data = {}; data[element.id] = value; $.ajax($.extend(true, { url: param, mode: "abort", port: "validate" + element.id, dataType: "json", data: data, success: function(response) { validator.settings.messages[element.id].remote = previous.originalMessage; var valid = response === true; if ( valid ) { var submitted = validator.formSubmitted; validator.prepareElement(element); validator.formSubmitted = submitted; validator.successList.push(element); validator.showErrors(); } else { var errors = {}; var message = response || validator.defaultMessage( element, "remote" ); errors[element.id] = previous.message = $.isFunction(message) ? message(value) : message; validator.showErrors(errors); } previous.valid = valid; validator.stopRequest(element, valid); } }, param)); return "pending"; }, // http://docs.jquery.com/Plugins/Validation/Methods/minlength minlength: function(value, element, param) { return this.optional(element) || this.getLength($.trim(value), element) >= param; }, // http://docs.jquery.com/Plugins/Validation/Methods/maxlength maxlength: function(value, element, param) { return this.optional(element) || this.getLength($.trim(value), element) <= param; }, // http://docs.jquery.com/Plugins/Validation/Methods/rangelength rangelength: function(value, element, param) { var length = this.getLength($.trim(value), element); return this.optional(element) || ( length >= param[0] && length <= param[1] ); }, // http://docs.jquery.com/Plugins/Validation/Methods/min min: function( value, element, param ) { return this.optional(element) || value >= param; }, // http://docs.jquery.com/Plugins/Validation/Methods/max max: function( value, element, param ) { return this.optional(element) || value <= param; }, // http://docs.jquery.com/Plugins/Validation/Methods/range range: function( value, element, param ) { return this.optional(element) || ( value >= param[0] && value <= param[1] ); }, // http://docs.jquery.com/Plugins/Validation/Methods/email email: function(value, element) { // contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/ return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value); }, // http://docs.jquery.com/Plugins/Validation/Methods/url url: function(value, element) { // contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/ return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value); }, // http://docs.jquery.com/Plugins/Validation/Methods/date date: function(value, element) { return this.optional(element) || !/Invalid|NaN/.test(new Date(value)); }, // http://docs.jquery.com/Plugins/Validation/Methods/dateISO dateISO: function(value, element) { return this.optional(element) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value); }, // http://docs.jquery.com/Plugins/Validation/Methods/number number: function(value, element) { return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value); }, // http://docs.jquery.com/Plugins/Validation/Methods/digits digits: function(value, element) { return this.optional(element) || /^\d+$/.test(value); }, // http://docs.jquery.com/Plugins/Validation/Methods/creditcard // based on http://en.wikipedia.org/wiki/Luhn creditcard: function(value, element) { if ( this.optional(element) ) return "dependency-mismatch"; // accept only digits and dashes if (/[^0-9-]+/.test(value)) return false; var nCheck = 0, nDigit = 0, bEven = false; value = value.replace(/\D/g, ""); for (var n = value.length - 1; n >= 0; n--) { var cDigit = value.charAt(n); var nDigit = parseInt(cDigit, 10); if (bEven) { if ((nDigit *= 2) > 9) nDigit -= 9; } nCheck += nDigit; bEven = !bEven; } return (nCheck % 10) == 0; }, // http://docs.jquery.com/Plugins/Validation/Methods/accept accept: function(value, element, param) { param = typeof param == "string" ? param.replace(/,/g, '|') : "png|jpe?g|gif"; return this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i")); }, // http://docs.jquery.com/Plugins/Validation/Methods/equalTo equalTo: function(value, element, param) { // bind to the blur event of the target in order to revalidate whenever the target field is updated // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead var target = $(param).unbind(".validate-equalTo").bind("blur.validate-equalTo", function() { $(element).valid(); }); return value == target.val(); } } }); // deprecated, use $.validator.format instead $.format = $.validator.format; })(jQuery); // ajax mode: abort // usage: $.ajax({ mode: "abort"[, port: "uniqueport"]}); // if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort() ;(function($) { var pendingRequests = {}; // Use a prefilter if available (1.5+) if ( $.ajaxPrefilter ) { $.ajaxPrefilter(function(settings, _, xhr) { var port = settings.port; if (settings.mode == "abort") { if ( pendingRequests[port] ) { pendingRequests[port].abort(); } pendingRequests[port] = xhr; } }); } else { // Proxy ajax var ajax = $.ajax; $.ajax = function(settings) { var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode, port = ( "port" in settings ? settings : $.ajaxSettings ).port; if (mode == "abort") { if ( pendingRequests[port] ) { pendingRequests[port].abort(); } return (pendingRequests[port] = ajax.apply(this, arguments)); } return ajax.apply(this, arguments); }; } })(jQuery); // provides cross-browser focusin and focusout events // IE has native support, in other browsers, use event caputuring (neither bubbles) // provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation // handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target ;(function($) { // only implement if not provided by jQuery core (since 1.4) // TODO verify if jQuery 1.4's implementation is compatible with older jQuery special-event APIs if (!jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener) { $.each({ focus: 'focusin', blur: 'focusout' }, function( original, fix ){ $.event.special[fix] = { setup:function() { this.addEventListener( original, handler, true ); }, teardown:function() { this.removeEventListener( original, handler, true ); }, handler: function(e) { arguments[0] = $.event.fix(e); arguments[0].type = fix; return $.event.handle.apply(this, arguments); } }; function handler(e) { e = $.event.fix(e); e.type = fix; return $.event.handle.call(this, e); } }); }; $.extend($.fn, { validateDelegate: function(delegate, type, handler) { return this.bind(type, function(event) { var target = $(event.target); if (target.is(delegate)) { return handler.apply(target, arguments); } }); } }); })(jQuery);
12ik
trunk/public/js/validate/jquery.validateid.js
JavaScript
oos
37,080
// 手机号码验证 jQuery.validator.addMethod("mobile", function(value, element) { var length = value.length; return this.optional(element) || (length == 11 && /^(((13[0-9]{1})|(15[0-9]{1}))+\d{8})$/.test(value) || /^(((18[0-9]{1})|(15[0-9]{1}))+\d{8})$/.test(value) || /^(((15[0-9]{1})|(15[0-9]{1}))+\d{8})$/.test(value)); }, "手机号码格式错误!"); // 电话号码验证 jQuery.validator.addMethod("phone", function(value, element) { //var tel = /^(\d{3,4}-?)?\d{7,9}$/g; var tel = /^(\d{3,4}-?)?\d{7,9}$/; return this.optional(element) || (tel.test(value)); }, "电话号码格式错误!"); // 特殊字符验证 jQuery.validator.addMethod("string", function(value, element) { return this.optional(element) || (/^[\u0391-\uFFE5\w]+$/.test(value)); }, "不允许包含特殊符号!"); // 中文英文验证 jQuery.validator.addMethod("cnen", function(value, element) { return this.optional(element) || (/^[\u4e00-\u9fa5a-zA-Z]+$/.test(value)); }, "不允许包含特殊符号!"); // 中文英文数字验证 jQuery.validator.addMethod("cnennum", function(value, element) { //return this.optional(element) || /^[\u4e00-\u9fa5a-zA-Z]+$/.test(value); return this.optional(element) || (/^[A-Za-z0-9\u4E00-\u9FA5]+$/.test(value)); }, "中文英文数字!"); // 增加只能是字母和数字的验证 jQuery.validator.addMethod("ennum", function(value, element) { return this.optional(element) || (/^[a-zA-Z0-9]+$/.test(value)); }, "只能输入英文和数字"); // 网址URL jQuery.validator.addMethod("enurl", function(value, element) { return this.optional(element) || (/^[a-zA-z]+://[^\s]/.test(value)); }, ""); //日期 jQuery.validator.addMethod("compareDate",function(value, element, param) { var startDate = $(param).val(); var date1 = parseInt(startDate.replace(/-/g,'')); var date2 = parseInt(value.replace(/-/g,'')); return this.optional(element) || (date1 < date2); },""); function Is_URL(str_url){ var strRegex = "^((https|http|ftp|rtsp|mms)?://)" + "?(([0-9a-z_!~*'().&=+$%-]+: )?[0-9a-z_!~*'().&=+$%-]+@)?" //ftp的user@ + "(([0-9]{1,3}\.){3}[0-9]{1,3}" // IP形式的URL- 199.194.52.184 + "|" // 允许IP和DOMAIN(域名) + "([0-9a-z_!~*'()-]+\.)*" // 域名- www. + "([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\." // 二级域名 + "[a-z]{2,6})" // first level domain- .com or .museum + "(:[0-9]{1,4})?" // 端口- :80 + "((/?)|" // a slash isn't required if there is no file name + "(/[0-9a-z_!~*'().;?:@&=+$,%#-]+)+/?)$"; var re=new RegExp(strRegex); //re.test() if (re.test(str_url)){ return (true); }else{ return (false); } } //日期 jQuery.validator.addMethod("isurl",function(value) { var strRegex = "^((https|http|ftp|rtsp|mms)?://)" + "?(([0-9a-z_!~*'().&=+$%-]+: )?[0-9a-z_!~*'().&=+$%-]+@)?" //ftp的user@ + "(([0-9]{1,3}\.){3}[0-9]{1,3}" // IP形式的URL- 199.194.52.184 + "|" // 允许IP和DOMAIN(域名) + "([0-9a-z_!~*'()-]+\.)*" // 域名- www. + "([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\." // 二级域名 + "[a-z]{2,6})" // first level domain- .com or .museum + "(:[0-9]{1,4})?" // 端口- :80 + "((/?)|" // a slash isn't required if there is no file name + "(/[0-9a-z_!~*'().;?:@&=+$,%#-]+)+/?)$"; var re=new RegExp(strRegex); //re.test() if (re.test(value)){ return (true); }else{ return (false); } });
12ik
trunk/public/js/validate/validate_plugin.js
JavaScript
oos
3,693
/* Modernizr 2.6.2 (Custom Build) | MIT & BSD * Build: http://modernizr.com/download/#-draganddrop-hasevent */ ; window.Modernizr = (function( window, document, undefined ) { var version = '2.6.2', Modernizr = {}, docElement = document.documentElement, mod = 'modernizr', modElem = document.createElement(mod), mStyle = modElem.style, inputElem , toString = {}.toString, tests = {}, inputs = {}, attrs = {}, classes = [], slice = classes.slice, featureName, isEventSupported = (function() { var TAGNAMES = { 'select': 'input', 'change': 'input', 'submit': 'form', 'reset': 'form', 'error': 'img', 'load': 'img', 'abort': 'img' }; function isEventSupported( eventName, element ) { element = element || document.createElement(TAGNAMES[eventName] || 'div'); eventName = 'on' + eventName; var isSupported = eventName in element; if ( !isSupported ) { if ( !element.setAttribute ) { element = document.createElement('div'); } if ( element.setAttribute && element.removeAttribute ) { element.setAttribute(eventName, ''); isSupported = is(element[eventName], 'function'); if ( !is(element[eventName], 'undefined') ) { element[eventName] = undefined; } element.removeAttribute(eventName); } } element = null; return isSupported; } return isEventSupported; })(), _hasOwnProperty = ({}).hasOwnProperty, hasOwnProp; if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) { hasOwnProp = function (object, property) { return _hasOwnProperty.call(object, property); }; } else { hasOwnProp = function (object, property) { return ((property in object) && is(object.constructor.prototype[property], 'undefined')); }; } if (!Function.prototype.bind) { Function.prototype.bind = function bind(that) { var target = this; if (typeof target != "function") { throw new TypeError(); } var args = slice.call(arguments, 1), bound = function () { if (this instanceof bound) { var F = function(){}; F.prototype = target.prototype; var self = new F(); var result = target.apply( self, args.concat(slice.call(arguments)) ); if (Object(result) === result) { return result; } return self; } else { return target.apply( that, args.concat(slice.call(arguments)) ); } }; return bound; }; } function setCss( str ) { mStyle.cssText = str; } function setCssAll( str1, str2 ) { return setCss(prefixes.join(str1 + ';') + ( str2 || '' )); } function is( obj, type ) { return typeof obj === type; } function contains( str, substr ) { return !!~('' + str).indexOf(substr); } function testDOMProps( props, obj, elem ) { for ( var i in props ) { var item = obj[props[i]]; if ( item !== undefined) { if (elem === false) return props[i]; if (is(item, 'function')){ return item.bind(elem || obj); } return item; } } return false; } tests['draganddrop'] = function() { var div = document.createElement('div'); return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div); }; for ( var feature in tests ) { if ( hasOwnProp(tests, feature) ) { featureName = feature.toLowerCase(); Modernizr[featureName] = tests[feature](); classes.push((Modernizr[featureName] ? '' : 'no-') + featureName); } } Modernizr.addTest = function ( feature, test ) { if ( typeof feature == 'object' ) { for ( var key in feature ) { if ( hasOwnProp( feature, key ) ) { Modernizr.addTest( key, feature[ key ] ); } } } else { feature = feature.toLowerCase(); if ( Modernizr[feature] !== undefined ) { return Modernizr; } test = typeof test == 'function' ? test() : test; if (typeof enableClasses !== "undefined" && enableClasses) { docElement.className += ' ' + (test ? '' : 'no-') + feature; } Modernizr[feature] = test; } return Modernizr; }; setCss(''); modElem = inputElem = null; Modernizr._version = version; Modernizr.hasEvent = isEventSupported; return Modernizr; })(this, this.document); ;
12ik
trunk/public/js/lib/modernizr.dnd.js
JavaScript
oos
5,394
(function(){ Douban.init_lnk_share = function(e){ var el = $(this), param = el.attr('rel').split('|'); var url = param[0]; var stype = param[1]; var title = param[2]; var content = param[3]; //var hash = window.document.getElementById("bigImage").src.replace(/.*key=([^&]+).*/,'$1'); var img =""; var siteUrl = param[4] ; var pin = ""; if (stype == "qzone"){ url = url + "&title=" + content + "&pic=" + img + "&url=" + siteUrl + pin; } if (stype == "sina"){ url = url + "&title=" + content + "&pic=" + img + "&url=" + siteUrl + pin; } if (stype == "renren"){ url = url + "title=" + title +"&content="+ content + "&pic=" + img + "&url=" + siteUrl + pin; } if (stype == "kaixing"){ url = url + "rtitle=" + title + "&rcontent=" + content + "&rurl=" + siteUrl + pin; } if (stype == "douban"){ url = url + "title=" + title + "&comment=" + content + "&url=" + siteUrl + pin; } if (stype == "MSN"){ url = url + "url=" + siteUrl + pin + "&title=" + title + "&description=" + content + "&screenshot=" + img; } window.open(encodeURI(url),"","height=500, width=600"); }; })();
12ik
trunk/public/js/lib/sharetool.js
JavaScript
oos
1,165
/** * jQuery plugin for posting form including file inputs. * Copyright (c) 2010 Ewen Elder * * Licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * @author: Ewen Elder <glomainn at yahoo dot co dot uk> <ewen at jainaewen dot com> * @version: 1.0.1 (2010-22-02) **/ (function($) { $.fn.iframePostForm = function(o) { var J, a, i, n; a = $(this); o = $.extend({}, $.fn.iframePostForm.defaults, o); if (!$('#' + o.iframeID).length) { $('body').append('<iframe name="' + o.iframeID + '" id="' + o.iframeID + '" style="display:none"></iframe>') } return a.each(function() { i = $(this); i.attr('target', o.iframeID); i.submit(function() { o.post.apply(this); n = $('#' + o.iframeID); n.unbind('load').bind('load', function() { J = n.contents().find('body'); o.complete.apply(this, [J.html()]); setTimeout(function() { J.html('') }, 1) }) }) }) }; $.fn.iframePostForm.defaults = { iframeID: 'iframe-post-form', post: function() {}, complete: function(response) {} } })(jQuery);
12ik
trunk/public/js/lib/iframe-post-form.js
JavaScript
oos
1,476
(function($) { var defaultConfig = { errorRequired: '此项为必填项', errorTempl: '<span class="validate-error">{msg}</span>', optionTempl: '<span class="validate-option">{msg}</span>', callback: null }, CSS_ITEM = '.item', CSS_ERROR = '.validate-error', CSS_OPTION = '.validate-option', validateForm = function(el, oRules, oErrorMsg, oOptions, oConfig) { if (!oRules || !el) { return; } this.asyncList = []; this.asyncEndHandle = null; this._init(el, oRules, oErrorMsg, oOptions, oConfig); }; validateForm.prototype = { _init: function(el, oRules, oErrorMsg, oOptions, oConfig) { var node; node = this.node = $(el); this.form = (node.attr('tagName').toLowerCase() === 'form') ? node : node.find('form'); this.config = $.extend(defaultConfig, oConfig); this.rules = oRules; this.errorMsg = oErrorMsg || {}; this.optionMsg = oOptions || {}; node.data('validateForm', this); this._bindEvent(); }, _bindEvent: function() { if (this.node.data('hasBindValidateEvent')) { return; } this.node.data('hasBindValidateEvent', true); //bind form. this.form.submit($.proxy(function(e) { this.validate(); this._handleFormSubmit(e); }, this)).find('input, select, textarea').bind({ //bind error verifny blur: $.proxy(function(e) { this._handleBlur(e); }, this), //bind option msg focus: $.proxy(function(e) { this._handleFocus(e); }, this) }); this._bindRules(); }, _bindRules: function() { var rules = this.rules, k; for (k in rules) { if (rules.hasOwnProperty(k)) { $(rules[k].elems, this.form).each(function(i, e) { var $e = $(e), r = $e.data('validate-rules') || ''; $e.data('validate-rules', r + ',' + k) }); } } }, _handleBlur: function(e) { var $e = $(e.target), $item = $e.parents(CSS_ITEM).eq(0), i, r, len, k, hasError = false, rules = $e.data('validate-rules'); $item.find(CSS_OPTION).hide(); if (!rules) { return; } rules = rules.split(',').slice(1); for (i = 0, len = rules.length; i < len; i++) { r = this.rules[rules[i]]; this.validate(r, this.errorMsg[rules[i]], $e); } }, _handleFocus: function(e) { var na = e.target.getAttribute('name'), msg; if (!na) { return; } if (msg = this.optionMsg[na.toLowerCase()]) { this.displayOptionMsg($(e.target), msg); } }, _handleFormSubmit: function(e) { e.preventDefault(); var errorItems, processItems, o = this; errorItems = this.form.find('.has-error'); if (errorItems.length > 0) { e.preventDefault(); $(o.form).trigger('hasError'); return; } processItems = this.form.find('.has-process'); if (processItems.length > 0) { e.preventDefault(); this.asyncEndHandle = function() { o.asyncEndHandle = null; o._handleFormSubmit(e); }; return; } if (o.config.callback) { e.preventDefault(); o.config.callback(o.form); } else { o.form[0].submit(); } }, clearErrorMsg: function(el) { var item = el.parents(CSS_ITEM).eq(0); item.find(CSS_ERROR).hide(); }, displayError: function(el, msg) { var item = el.parents(CSS_ITEM).eq(0), option = item.find(CSS_OPTION), error = item.find(CSS_ERROR); option.hide(); if (error.length === 0) { $(this.config.errorTempl.replace('{msg}', msg)).appendTo(item).show(); return; } error.show().html(msg); return; }, displayOptionMsg: function(el, msg) { if (!msg) { return; } var item = el.parents(CSS_ITEM).eq(0), option = item.find(CSS_OPTION), error = item.hasClass('has-error'); if (error) { return; } if (option.length === 0) { $(this.config.optionTempl.replace('{msg}', msg)).appendTo(item).show(); return; } option.show().html(msg); return; }, asyncValidate: function(el, url, cb) { if (!el || !url) { return; } var item = el.parent(); if (item.hasClass('has-process')) { return; } item.addClass('has-process'); this.asyncList.push($.getJSON(url, $.proxy(function(da){ var list = this.asyncList; cb && cb(da); item.removeClass('has-process'); this.asyncList.pop(); if (list.length === 0) { this.asyncEndHandle && this.asyncEndHandle(); } }, this))); $('body').ajaxError(function(){ alert('远程验证失败!\n请稍候重试或将此问题反馈给我们(help@12ik.com)'); }); }, validate: function(rule, errorMsg, el) { var errorRequired = this.errorMsg.errorRequired, verify = function(r, errmsg, el, o) { var item = el.parents(CSS_ITEM).eq(0), hasError = false, k; if (r.isRequired && $.trim(el.val()) === '') { o.displayError(el, errorRequired || defaultConfig.errorRequired); hasError = true; item.addClass('has-error'); } else { for (k in r) { if (r.hasOwnProperty(k) && typeof r[k] === 'function') { if (r[k](el, o)) { o.displayError(el, errmsg[k]); item.addClass('has-error'); hasError = true; break; } } } if (!hasError) { o.clearErrorMsg(el); item.removeClass('has-error'); } } }, r, rules, errors, k; if (!rule) { rules = this.rules; errors = this.errorMsg; for (k in rules) { if (rules.hasOwnProperty(k)) { r = rules[k]; $(r.elems, this.form).each($.proxy(function(i, e) { verify(r, errors[k], $(e), this); }, this)); } } } else { verify(rule, errorMsg, el, this); } } }; // public validate methods. $.extend({ validate: { isEmail: function(s) { return /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(s); } } }); $.fn.validateForm = function(oRules, oErrorMsg, oOptions, oConfig) { var options = oOptions, config = oConfig; if (arguments.length === 3) { options = null; config = oOptions; } this.each(function() { new validateForm(this, oRules, oErrorMsg, options, config); }); return this; }; })(jQuery);
12ik
trunk/public/js/lib/validate.js
JavaScript
oos
9,005
/*! * jQuery Templates Plugin 1.0.0pre * http://github.com/jquery/jquery-tmpl * Requires jQuery 1.4.2 * * Copyright 2011, Software Freedom Conservancy, Inc. * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license */ (function( jQuery, undefined ){ var oldManip = jQuery.fn.domManip, tmplItmAtt = "_tmplitem", htmlExpr = /^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /, newTmplItems = {}, wrappedItems = {}, appendToTmplItems, topTmplItem = { key: 0, data: {} }, itemKey = 0, cloneIndex = 0, stack = []; function newTmplItem( options, parentItem, fn, data ) { // Returns a template item data structure for a new rendered instance of a template (a 'template item'). // The content field is a hierarchical array of strings and nested items (to be // removed and replaced by nodes field of dom elements, once inserted in DOM). var newItem = { data: data || (data === 0 || data === false) ? data : (parentItem ? parentItem.data : {}), _wrap: parentItem ? parentItem._wrap : null, tmpl: null, parent: parentItem || null, nodes: [], calls: tiCalls, nest: tiNest, wrap: tiWrap, html: tiHtml, update: tiUpdate }; if ( options ) { jQuery.extend( newItem, options, { nodes: [], parent: parentItem }); } if ( fn ) { // Build the hierarchical content to be used during insertion into DOM newItem.tmpl = fn; newItem._ctnt = newItem._ctnt || newItem.tmpl( jQuery, newItem ); newItem.key = ++itemKey; // Keep track of new template item, until it is stored as jQuery Data on DOM element (stack.length ? wrappedItems : newTmplItems)[itemKey] = newItem; } return newItem; } // Override appendTo etc., in order to provide support for targeting multiple elements. (This code would disappear if integrated in jquery core). jQuery.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function( name, original ) { jQuery.fn[ name ] = function( selector ) { var ret = [], insert = jQuery( selector ), elems, i, l, tmplItems, parent = this.length === 1 && this[0].parentNode; appendToTmplItems = newTmplItems || {}; if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) { insert[ original ]( this[0] ); ret = this; } else { for ( i = 0, l = insert.length; i < l; i++ ) { cloneIndex = i; elems = (i > 0 ? this.clone(true) : this).get(); jQuery( insert[i] )[ original ]( elems ); ret = ret.concat( elems ); } cloneIndex = 0; ret = this.pushStack( ret, name, insert.selector ); } tmplItems = appendToTmplItems; appendToTmplItems = null; jQuery.tmpl.complete( tmplItems ); return ret; }; }); jQuery.fn.extend({ // Use first wrapped element as template markup. // Return wrapped set of template items, obtained by rendering template against data. tmpl: function( data, options, parentItem ) { return jQuery.tmpl( this[0], data, options, parentItem ); }, // Find which rendered template item the first wrapped DOM element belongs to tmplItem: function() { return jQuery.tmplItem( this[0] ); }, // Consider the first wrapped element as a template declaration, and get the compiled template or store it as a named template. template: function( name ) { return jQuery.template( name, this[0] ); }, domManip: function( args, table, callback, options ) { if ( args[0] && jQuery.isArray( args[0] )) { var dmArgs = jQuery.makeArray( arguments ), elems = args[0], elemsLength = elems.length, i = 0, tmplItem; while ( i < elemsLength && !(tmplItem = jQuery.data( elems[i++], "tmplItem" ))) {} if ( tmplItem && cloneIndex ) { dmArgs[2] = function( fragClone ) { // Handler called by oldManip when rendered template has been inserted into DOM. jQuery.tmpl.afterManip( this, fragClone, callback ); }; } oldManip.apply( this, dmArgs ); } else { oldManip.apply( this, arguments ); } cloneIndex = 0; if ( !appendToTmplItems ) { jQuery.tmpl.complete( newTmplItems ); } return this; } }); jQuery.extend({ // Return wrapped set of template items, obtained by rendering template against data. tmpl: function( tmpl, data, options, parentItem ) { var ret, topLevel = !parentItem; if ( topLevel ) { // This is a top-level tmpl call (not from a nested template using {{tmpl}}) parentItem = topTmplItem; tmpl = jQuery.template[tmpl] || jQuery.template( null, tmpl ); wrappedItems = {}; // Any wrapped items will be rebuilt, since this is top level } else if ( !tmpl ) { // The template item is already associated with DOM - this is a refresh. // Re-evaluate rendered template for the parentItem tmpl = parentItem.tmpl; newTmplItems[parentItem.key] = parentItem; parentItem.nodes = []; if ( parentItem.wrapped ) { updateWrapped( parentItem, parentItem.wrapped ); } // Rebuild, without creating a new template item return jQuery( build( parentItem, null, parentItem.tmpl( jQuery, parentItem ) )); } if ( !tmpl ) { return []; // Could throw... } if ( typeof data === "function" ) { data = data.call( parentItem || {} ); } if ( options && options.wrapped ) { updateWrapped( options, options.wrapped ); } ret = jQuery.isArray( data ) ? jQuery.map( data, function( dataItem ) { return dataItem ? newTmplItem( options, parentItem, tmpl, dataItem ) : null; }) : [ newTmplItem( options, parentItem, tmpl, data ) ]; return topLevel ? jQuery( build( parentItem, null, ret ) ) : ret; }, // Return rendered template item for an element. tmplItem: function( elem ) { var tmplItem; if ( elem instanceof jQuery ) { elem = elem[0]; } while ( elem && elem.nodeType === 1 && !(tmplItem = jQuery.data( elem, "tmplItem" )) && (elem = elem.parentNode) ) {} return tmplItem || topTmplItem; }, // Set: // Use $.template( name, tmpl ) to cache a named template, // where tmpl is a template string, a script element or a jQuery instance wrapping a script element, etc. // Use $( "selector" ).template( name ) to provide access by name to a script block template declaration. // Get: // Use $.template( name ) to access a cached template. // Also $( selectorToScriptBlock ).template(), or $.template( null, templateString ) // will return the compiled template, without adding a name reference. // If templateString includes at least one HTML tag, $.template( templateString ) is equivalent // to $.template( null, templateString ) template: function( name, tmpl ) { if (tmpl) { // Compile template and associate with name if ( typeof tmpl === "string" ) { // This is an HTML string being passed directly in. tmpl = buildTmplFn( tmpl ); } else if ( tmpl instanceof jQuery ) { tmpl = tmpl[0] || {}; } if ( tmpl.nodeType ) { // If this is a template block, use cached copy, or generate tmpl function and cache. tmpl = jQuery.data( tmpl, "tmpl" ) || jQuery.data( tmpl, "tmpl", buildTmplFn( tmpl.innerHTML )); // Issue: In IE, if the container element is not a script block, the innerHTML will remove quotes from attribute values whenever the value does not include white space. // This means that foo="${x}" will not work if the value of x includes white space: foo="${x}" -> foo=value of x. // To correct this, include space in tag: foo="${ x }" -> foo="value of x" } return typeof name === "string" ? (jQuery.template[name] = tmpl) : tmpl; } // Return named compiled template return name ? (typeof name !== "string" ? jQuery.template( null, name ): (jQuery.template[name] || // If not in map, and not containing at least on HTML tag, treat as a selector. // (If integrated with core, use quickExpr.exec) jQuery.template( null, htmlExpr.test( name ) ? name : jQuery( name )))) : null; }, encode: function( text ) { // Do HTML encoding replacing < > & and ' and " by corresponding entities. return ("" + text).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;"); } }); jQuery.extend( jQuery.tmpl, { tag: { "tmpl": { _default: { $2: "null" }, open: "if($notnull_1){__=__.concat($item.nest($1,$2));}" // tmpl target parameter can be of type function, so use $1, not $1a (so not auto detection of functions) // This means that {{tmpl foo}} treats foo as a template (which IS a function). // Explicit parens can be used if foo is a function that returns a template: {{tmpl foo()}}. }, "wrap": { _default: { $2: "null" }, open: "$item.calls(__,$1,$2);__=[];", close: "call=$item.calls();__=call._.concat($item.wrap(call,__));" }, "each": { _default: { $2: "$index, $value" }, open: "if($notnull_1){$.each($1a,function($2){with(this){", close: "}});}" }, "if": { open: "if(($notnull_1) && $1a){", close: "}" }, "else": { _default: { $1: "true" }, open: "}else if(($notnull_1) && $1a){" }, "html": { // Unecoded expression evaluation. open: "if($notnull_1){__.push($1a);}" }, "=": { // Encoded expression evaluation. Abbreviated form is ${}. _default: { $1: "$data" }, open: "if($notnull_1){__.push($.encode($1a));}" }, "!": { // Comment tag. Skipped by parser open: "" } }, // This stub can be overridden, e.g. in jquery.tmplPlus for providing rendered events complete: function( items ) { newTmplItems = {}; }, // Call this from code which overrides domManip, or equivalent // Manage cloning/storing template items etc. afterManip: function afterManip( elem, fragClone, callback ) { // Provides cloned fragment ready for fixup prior to and after insertion into DOM var content = fragClone.nodeType === 11 ? jQuery.makeArray(fragClone.childNodes) : fragClone.nodeType === 1 ? [fragClone] : []; // Return fragment to original caller (e.g. append) for DOM insertion callback.call( elem, fragClone ); // Fragment has been inserted:- Add inserted nodes to tmplItem data structure. Replace inserted element annotations by jQuery.data. storeTmplItems( content ); cloneIndex++; } }); //========================== Private helper functions, used by code above ========================== function build( tmplItem, nested, content ) { // Convert hierarchical content into flat string array // and finally return array of fragments ready for DOM insertion var frag, ret = content ? jQuery.map( content, function( item ) { return (typeof item === "string") ? // Insert template item annotations, to be converted to jQuery.data( "tmplItem" ) when elems are inserted into DOM. (tmplItem.key ? item.replace( /(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g, "$1 " + tmplItmAtt + "=\"" + tmplItem.key + "\" $2" ) : item) : // This is a child template item. Build nested template. build( item, tmplItem, item._ctnt ); }) : // If content is not defined, insert tmplItem directly. Not a template item. May be a string, or a string array, e.g. from {{html $item.html()}}. tmplItem; if ( nested ) { return ret; } // top-level template ret = ret.join(""); // Support templates which have initial or final text nodes, or consist only of text // Also support HTML entities within the HTML markup. ret.replace( /^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/, function( all, before, middle, after) { frag = jQuery( middle ).get(); storeTmplItems( frag ); if ( before ) { frag = unencode( before ).concat(frag); } if ( after ) { frag = frag.concat(unencode( after )); } }); return frag ? frag : unencode( ret ); } function unencode( text ) { // Use createElement, since createTextNode will not render HTML entities correctly var el = document.createElement( "div" ); el.innerHTML = text; return jQuery.makeArray(el.childNodes); } // Generate a reusable function that will serve to render a template against data function buildTmplFn( markup ) { return new Function("jQuery","$item", // Use the variable __ to hold a string array while building the compiled template. (See https://github.com/jquery/jquery-tmpl/issues#issue/10). "var $=jQuery,call,__=[],$data=$item.data;" + // Introduce the data as local variables using with(){} "with($data){__.push('" + // Convert the template into pure JavaScript jQuery.trim(markup) .replace( /([\\'])/g, "\\$1" ) .replace( /[\r\t\n]/g, " " ) .replace( /\$\{([^\}]*)\}/g, "{{#= $1}}" ) .replace( /\{\{#(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g, function( all, slash, type, fnargs, target, parens, args ) { var tag = jQuery.tmpl.tag[ type ], def, expr, exprAutoFnDetect; if ( !tag ) { throw "Unknown template tag: " + type; } def = tag._default || []; if ( parens && !/\w$/.test(target)) { target += parens; parens = ""; } if ( target ) { target = unescape( target ); args = args ? ("," + unescape( args ) + ")") : (parens ? ")" : ""); // Support for target being things like a.toLowerCase(); // In that case don't call with template item as 'this' pointer. Just evaluate... expr = parens ? (target.indexOf(".") > -1 ? target + unescape( parens ) : ("(" + target + ").call($item" + args)) : target; exprAutoFnDetect = parens ? expr : "(typeof(" + target + ")==='function'?(" + target + ").call($item):(" + target + "))"; } else { exprAutoFnDetect = expr = def.$1 || "null"; } fnargs = unescape( fnargs ); return "');" + tag[ slash ? "close" : "open" ] .split( "$notnull_1" ).join( target ? "typeof(" + target + ")!=='undefined' && (" + target + ")!=null" : "true" ) .split( "$1a" ).join( exprAutoFnDetect ) .split( "$1" ).join( expr ) .split( "$2" ).join( fnargs || def.$2 || "" ) + "__.push('"; }) + "');}return __;" ); } function updateWrapped( options, wrapped ) { // Build the wrapped content. options._wrap = build( options, true, // Suport imperative scenario in which options.wrapped can be set to a selector or an HTML string. jQuery.isArray( wrapped ) ? wrapped : [htmlExpr.test( wrapped ) ? wrapped : jQuery( wrapped ).html()] ).join(""); } function unescape( args ) { return args ? args.replace( /\\'/g, "'").replace(/\\\\/g, "\\" ) : null; } function outerHtml( elem ) { var div = document.createElement("div"); div.appendChild( elem.cloneNode(true) ); return div.innerHTML; } // Store template items in jQuery.data(), ensuring a unique tmplItem data data structure for each rendered template instance. function storeTmplItems( content ) { var keySuffix = "_" + cloneIndex, elem, elems, newClonedItems = {}, i, l, m; for ( i = 0, l = content.length; i < l; i++ ) { if ( (elem = content[i]).nodeType !== 1 ) { continue; } elems = elem.getElementsByTagName("*"); for ( m = elems.length - 1; m >= 0; m-- ) { processItemKey( elems[m] ); } processItemKey( elem ); } function processItemKey( el ) { var pntKey, pntNode = el, pntItem, tmplItem, key; // Ensure that each rendered template inserted into the DOM has its own template item, if ( (key = el.getAttribute( tmplItmAtt ))) { while ( pntNode.parentNode && (pntNode = pntNode.parentNode).nodeType === 1 && !(pntKey = pntNode.getAttribute( tmplItmAtt ))) { } if ( pntKey !== key ) { // The next ancestor with a _tmplitem expando is on a different key than this one. // So this is a top-level element within this template item // Set pntNode to the key of the parentNode, or to 0 if pntNode.parentNode is null, or pntNode is a fragment. pntNode = pntNode.parentNode ? (pntNode.nodeType === 11 ? 0 : (pntNode.getAttribute( tmplItmAtt ) || 0)) : 0; if ( !(tmplItem = newTmplItems[key]) ) { // The item is for wrapped content, and was copied from the temporary parent wrappedItem. tmplItem = wrappedItems[key]; tmplItem = newTmplItem( tmplItem, newTmplItems[pntNode]||wrappedItems[pntNode] ); tmplItem.key = ++itemKey; newTmplItems[itemKey] = tmplItem; } if ( cloneIndex ) { cloneTmplItem( key ); } } el.removeAttribute( tmplItmAtt ); } else if ( cloneIndex && (tmplItem = jQuery.data( el, "tmplItem" )) ) { // This was a rendered element, cloned during append or appendTo etc. // TmplItem stored in jQuery data has already been cloned in cloneCopyEvent. We must replace it with a fresh cloned tmplItem. cloneTmplItem( tmplItem.key ); newTmplItems[tmplItem.key] = tmplItem; pntNode = jQuery.data( el.parentNode, "tmplItem" ); pntNode = pntNode ? pntNode.key : 0; } if ( tmplItem ) { pntItem = tmplItem; // Find the template item of the parent element. // (Using !=, not !==, since pntItem.key is number, and pntNode may be a string) while ( pntItem && pntItem.key != pntNode ) { // Add this element as a top-level node for this rendered template item, as well as for any // ancestor items between this item and the item of its parent element pntItem.nodes.push( el ); pntItem = pntItem.parent; } // Delete content built during rendering - reduce API surface area and memory use, and avoid exposing of stale data after rendering... delete tmplItem._ctnt; delete tmplItem._wrap; // Store template item as jQuery data on the element jQuery.data( el, "tmplItem", tmplItem ); } function cloneTmplItem( key ) { key = key + keySuffix; tmplItem = newClonedItems[key] = (newClonedItems[key] || newTmplItem( tmplItem, newTmplItems[tmplItem.parent.key + keySuffix] || tmplItem.parent )); } } } //---- Helper functions for template item ---- function tiCalls( content, tmpl, data, options ) { if ( !content ) { return stack.pop(); } stack.push({ _: content, tmpl: tmpl, item:this, data: data, options: options }); } function tiNest( tmpl, data, options ) { // nested template, using {{tmpl}} tag return jQuery.tmpl( jQuery.template( tmpl ), data, options, this ); } function tiWrap( call, wrapped ) { // nested template, using {{wrap}} tag var options = call.options || {}; options.wrapped = wrapped; // Apply the template, which may incorporate wrapped content, return jQuery.tmpl( jQuery.template( call.tmpl ), call.data, options, call.item ); } function tiHtml( filter, textOnly ) { var wrapped = this._wrap; return jQuery.map( jQuery( jQuery.isArray( wrapped ) ? wrapped.join("") : wrapped ).filter( filter || "*" ), function(e) { return textOnly ? e.innerText || e.textContent : e.outerHTML || outerHtml(e); }); } function tiUpdate() { var coll = this.nodes; jQuery.tmpl( null, null, null, this).insertBefore( coll[0] ); jQuery( coll ).remove(); } })( jQuery );
12ik
trunk/public/js/lib/jquery.tmpl.js
JavaScript
oos
19,579
//及时消息开始 var newMessageRemind={ _step: 0, _title: document.title, _timer: null, //显示新消息提示 show:function(){ var temps = newMessageRemind._title.replace("【   】", "").replace("【新消息】", ""); newMessageRemind._timer = setTimeout(function() { newMessageRemind.show(); //这里写Cookie操作 newMessageRemind._step++; if (newMessageRemind._step == 3) { newMessageRemind._step = 1 }; if (newMessageRemind._step == 1) { document.title = "【   】" + temps }; if (newMessageRemind._step == 2) { document.title = "【新消息】" + temps }; }, 600); return [newMessageRemind._timer, newMessageRemind._title]; }, //取消新消息提示 clear: function(){ clearTimeout(newMessageRemind._timer ); document.title = newMessageRemind._title; //这里写Cookie操作 } }; function clearNewMessageRemind() { newMessageRemind.clear(); } function evdata(userid){ $.ajax({ type: "GET", url: siteUrl + "index.php?app=message&ac=newmsg&userid="+userid, success: function(msg){ if(msg.r == '0'){ $('#newmsg').html('新消息(<font color="red">'+msg.num+'</font>)'); newMessageRemind.show(); }else if(msg.r == '1'){ $('#newmsg').html('<a href="'+siteUrl+'index.php?app=message&ac=ikmail&ts=inbox">新消息</a>'); } } }); } //及时消息结束
12ik
trunk/public/js/imbox/imbox.js
JavaScript
oos
1,450
<?php defined ( 'IN_IK' ) or die ( 'Access Denied.' ); return array ('name' => 'blue', 'author' => '小麦', 'site' => 'http://www.12ik.com' );
12ik
trunk/theme/blue/about.php
PHP
oos
145
@charset "utf-8"; /* CSS Document */ /* *CSS Document *BY 12IK 2011-04-11 *标准基础样式表 *头部header *中部midder *底部footer */ /* reset style */ * { margin:0; padding:0; word-break:break-all; } /**定义HTML5 css3 全局样式**/ article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{ display:block;} body{ background:#fff; color:#333; font:12px/1.5em Arial,Helvetica,sans-serif,Microsoft YaHei; direction:ltr;} h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: normal; } h1 { color: #494949; display: block; font-size: 25px; font-weight: bold; line-height: 1.1; margin: 0; padding: 0 0 15px; word-wrap: break-word; } h2 { color: #006600; font: 14px/150% Arial,Helvetica,sans-serif; margin:8px 0px; letter-spacing: 2px; } a { cursor:pointer; text-decoration:none; color:#336699 } a:hover { text-decoration:none; color:#333 } a img { border-width:0; vertical-align:middle } ul, li { list-style:none; } fieldset, img { border:none; } legend { display:none; } em, strong, cite, th { font-style:normal; font-weight:400; } input, textarea, select, button { font:12px Verdana,Helvetica,Arial,sans-serif; } table { border-collapse:collapse; } html { overflow:-moz-scrollbars-vertical; } form input[type='radio'] {vertical-align:text-bottom;} .cl,.clear{ clear:both; display:block; font-size:0px; line-height:0px; height:0px; visibility:hidden} /* common style */ .clearfix:after { content:"."; display:block; height:0; clear:both; visibility:hidden; line-height:0px; font-size:0px } .clearfix { display:inline-block; } /*按钮*/ .submit { background-color: #6dbc1d; border: 1px solid #5aa710; border-radius:3px; color: #FFFFFF; cursor: default; display: inline-block; padding: 3px 10px; text-align: center; cursor:pointer } a.submit:link, a.submit:visited, a.submit:hover, .submit:hover{ background-color:#63AB1A; border: 1px solid #50950E; border-radius:3px; color: #FFFFFF; cursor: default; display: inline-block; padding: 3px 10px; text-align: center; cursor:pointer; text-decoration:none } /*灰色按钮*/ .gray-submit { background-color: #e1e1e1; border: 1px solid #d1d1d1; border-radius:3px; color: #9a9a9a; cursor: default; display: inline-block; padding: 3px 10px; text-align: center; cursor:pointer } a.gray-submit:link, a.gray-submit:visited, a.gray-submit:hover, .gray-submit:hover{ background-color:#e1e1e1; border: 1px solid #d1d1d1; border-radius:3px; color: #9a9a9a; cursor: default; display: inline-block; padding: 3px 10px; text-align: center; cursor:pointer; text-decoration:none } /*链接按钮*/ .tagtxt { border:#ccc solid 1px; height:22px; width:150px; padding:0px 2px;} .subab{ background-color: #63AB1A; border: 1px solid #50950E; border-radius: 2px; cursor: pointer; color:#fff; padding: 0px 5px; } /**发布帖子按钮**/ .bn-post span { background-color: #6dbc1d; border: 1px solid #5aa710; border-radius: 3px;; color: #FFFFFF; cursor: pointer; display: inline-block; padding: 1px 10px; text-align: center; } a.bn-post:hover span{ color:#FFF; background-color:#63AB1A; border: 1px solid #50950E;} /*字体大小*/ .f12{font-size:12px;} .f14{font-size:14px;} /*字间距*/ .line23{line-height:25px; margin-bottom:15px} /*浮动方向*/ .fl{float:left;} .fr{float:right;} /*结构*/ /*头部*/ .top_nav {clear:both;width:100%;color:#d4d4d4;margin-bottom:20px;height:30px; line-height:30px;border-bottom:1px dashed #d4d4d4;} .top_nav .top_bd{ width:980px; margin:0 auto} .top_nav .top_info{ float:right} .top_nav .top_items{ float:left} .top_nav .top_items li{ float:left; margin-right:10px} /**导航样式**/ #header {width:980px; margin:0px auto;margin-bottom:40px; } #header .site_nav .site_logo{ float:left; width:165px;} #header .appnav{ float:right; width:810px; background-color:#acd3e6; height:35px; line-height:35px} #nav_bar{ display:block; float:left; width:530px;} #nav_bar li{ float:left; } #nav_bar li a{ font-size:14px; padding:0px 20px; color:#fff} #nav_bar li a:hover{ color:#43b0e6} #search_bar{ float:right; width:260px;} #search_bar li{ float:left; position:relative} #search_bar li .key{ border-style:none;height:24px; border:#4bb3e6 solid 1px; border-right:medium none; font-size:12px; width:180px; color:#d4d4d4; line-height:24px; padding:0px 2px} #search_bar li .search-button{ height:26px; display:block; width:26px; cursor:pointer; border:none; outline-width:0px; text-indent:-999px; overflow:hidden;background:url(search_bg.gif) no-repeat right 0px; position:absolute; left:0px; top:5px} /*APP导航*/ /*中部*/ .midder{width:980px;margin:0 auto;padding:0;overflow:hidden;height:auto !important; min-height:400px; margin-top:15px; } .midder .mc{overflow:hidden;display: block;} .midder .mc .cleft{float: left;padding-right: 10px; width: 640px;} .midder .mc .cright{float: right;width: 310px;} /*底部*/ #footer{height:162px; padding-top:43px; margin-top:40px; } #footer .f_content{width:980px; overflow:hidden; margin:0 auto; border-top: 1px dashed #DDDDDD; padding-top:10px} /*tab切换导航*/ .tabnav { padding:0px; background:url(zbar.gif) repeat-x 0px 0px; margin-bottom:10px; height:28px;} .tabnav ul { height: 28px; margin: 0; overflow: hidden; padding: 0; } .tabnav ul li { float: left; margin:0px 8px; margin-top:3px} .tabnav ul li a{ padding: 0 20px; display:block; line-height:24px; color:#333;} .tabnav .select{ border:1px solid #faeee4; border-bottom:none; background-color:#fff; border-style:solid solid none; border-width:1px 1px medium; border-radius:3px 3px 0px 0px; } .tabnav .select a { } /*分页*/ .page {margin:0;text-align: left;padding:5px;} .page a { border:#DDDDDD 1px solid; padding:2px 5px;margin: 2px; color: #336699;text-decoration: none } .page a:hover { border: #3266A0 1px solid; } .page a:active { border: #3266A0 1px solid; } .page .current { color:#FFFFFF;background:#3A81C0;border-bottom: 1px solid #3266A0; padding:2px 5px;font-weight: bold; margin: 2px; } .page .disabled { border: #eee 1px solid; padding:2px 5px; margin: 2px;color: #ddd; } /*tag*/ .tags { margin:10px 0; line-height: 18px; } .tags a.post-tag { background-color: #ededed; border-bottom: 1px solid #3E6D8E; border-right: 1px solid #7F9FB6; color: #4B8DC5; font-size: 12px; line-height: 2.4; margin: 2px 2px 2px 0; padding: 3px 4px; text-decoration: none; white-space: nowrap; border-radius:px; border-radius:2px; } .tags a.post-tag:hover{ background-color: #3E6D8E; border-bottom: 1px solid #37607D; border-right: 1px solid #37607D; color: #E0EAF1; text-decoration: none; } .tags .item-multiplier { color: #444444; font-size: 120%; font-weight: bold; margin-right: 4px; } pre{ white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word; background-color: #F8FFF8; border-color: #F0FFF0; border-style: solid; border-width: 1px 1px 1px 5px; color: #006600; display: block; font-size: 10pt; padding: 4px 12px; } /**输入框**/ .utext{ width:300px;height:50;border-color: #CCCCCC #E1E1E1 #E1E1E1 #CCCCCC;border-style: solid;border-width: 1px; padding: 3px 0 3px 0;font-size: 14px;} .utext:focus{border-color:gray} .txt{ border: 1px solid #CCCCCC; line-height: 22px; padding: 3px; padding:3px; } .txt:focus{ border-color:gray} h1.tit1{ color: #494949; display: block; font-size: 25px; font-weight: bold; line-height: 1.1; margin: 0; padding: 0 0 15px; word-wrap: break-word; } h1.title{ color: #000000; display: block; font: 24px/30px Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif; margin-bottom: 5px; text-align:center; } .tit2{ line-height:30px;} /**发布表格**/ .table_1{ width:100%} .table_1 td{ padding:10px;} .table_1 th{ text-align:right; width:100px; font-size:14px; color:#666666;} .table_1 .tip{ color:gray;} /**发布按钮**/ .pl2{ color: #666666;font-size:14px; line-height:35px;} .pl2 .send{font-size:12px; color:#000; background:url(new/post.gif) no-repeat 0px 0px; width:120px; height:25px; line-height:25px; display:inline-block; margin:10px 0px} .pl2 .send span{ padding-left:28px; letter-spacing:6px} .goback{ line-height:30px; margin-bottom:10px} /**头像 组icon 设置**/ .face_form{} .face_form .pil{ float:left; margin-right:10px; padding:1px; border:#ddd solid 1px; margin-top:5px} .face_form .file_info{ float:left} .face_form .file_info p{ line-height:30px;} input[type="checkbox"] { margin:0;padding:0; vertical-align:middle;} input[type="radio"] { margin:0;padding:0; vertical-align:middle; margin-right:5px} /**右侧分类**/ .cate{ margin-bottom:15px} .cate li{ line-height:25px;} .cate li.select{ } .pl { color: #666666; font: 12px/150% Arial; } /*2011-06-20*/ /*个人主页左侧*/ #db-usr-profile { height: 58px; left: 0; margin-bottom: 2em; position: relative; top: 0; width: 100%; } #db-usr-profile .pic { float: left; margin-right: 12px; } #db-usr-profile .info { float: left; padding-top: 2px; } #db-usr-profile h1 { padding: 0 0 4px; } #db-usr-profile .info ul li { display: inline; margin-right: 1em; } #review { margin-bottom: 27px; } /**load style <div class="loading-style1"><b></b>加载中,请稍候...</div>**/ .loading-style1{ text-align:center; color:#999;} .loading-style1 b{ background:url(../../public/images/loading.gif) no-repeat 0px 0px; display:block; width:20px; height:20px; margin:5px auto;}
12ik
trunk/theme/blue/base.css
CSS
oos
10,063
<?php defined ( 'IN_IK' ) or die ( 'Access Denied.' ); return array ('name' => 'blue', 'author' => '小麦', 'site' => 'http://www.12ik.com' );
12ik
trunk/theme/white/about.php
PHP
oos
145
@charset "utf-8"; /* CSS Document */ /* *CSS Document *BY 12IK 2011-04-11 *标准基础样式表 *头部header *中部midder *底部footer */ /* reset style */ * { margin:0; padding:0; word-break:break-all; } /**定义HTML5 css3 全局样式**/ article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{ display:block;} body{ background:#fff; color:#333; font:12px/1.5em Arial,Helvetica,sans-serif,Microsoft YaHei; direction:ltr;} h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: normal; } h1 { color: #494949; display: block; font-size: 25px; font-weight: bold; line-height: 1.1; margin: 0; padding: 0 0 15px; word-wrap: break-word; } h2 { color: #006600; font: 14px/150% Arial,Helvetica,sans-serif; margin:8px 0px; letter-spacing: 2px; } a { cursor:pointer; text-decoration:none; color:#336699 } a:hover { text-decoration:none; color:#333 } a img { border-width:0; vertical-align:middle } ul, li { list-style:none; } fieldset, img { border:none; } legend { display:none; } em, strong, cite, th { font-style:normal; font-weight:400; } input, textarea, select, button { font:12px Verdana,Helvetica,Arial,sans-serif; } table { border-collapse:collapse; } html { overflow:-moz-scrollbars-vertical; } .cl{ clear:both; display:block; font-size:0px; line-height:0px; height:0px; visibility:hidden} .clear{ clear:both;display:block; font-size:0px; line-height:0px; height:0px; visibility:hidden} /* common style */ .clearfix:after { content:"."; display:block; height:0; clear:both; visibility:hidden; } .clearfix { display:inline-block; } form input[type='radio'] {vertical-align:text-bottom;} /*按钮*/ .submit { background-color: #6dbc1d; border: 1px solid #5aa710; border-radius:3px; color: #FFFFFF; cursor: default; display: inline-block; padding: 3px 10px; text-align: center; cursor:pointer } a.submit:link, a.submit:visited, a.submit:hover, .submit:hover{ background-color:#63AB1A; border: 1px solid #50950E; border-radius:3px; color: #FFFFFF; cursor: default; display: inline-block; padding: 3px 10px; text-align: center; cursor:pointer; text-decoration:none } /*链接按钮*/ .tagtxt { border:#ccc solid 1px; height:22px; width:150px; padding:0px 2px;} .subab{ background-color: #63AB1A; border: 1px solid #50950E; border-radius: 2px; cursor: pointer; color:#fff; padding: 0px 5px; } /**发布帖子按钮**/ .bn-post span { background-color: #6dbc1d; border: 1px solid #5aa710; border-radius: 3px;; color: #FFFFFF; cursor: pointer; display: inline-block; padding: 1px 10px; text-align: center; } a.bn-post:hover span{ color:#FFF; background-color:#63AB1A; border: 1px solid #50950E;} /*字体大小*/ .f12{font-size:12px;} .f14{font-size:14px;} /*字间距*/ .line23{line-height:25px; margin-bottom:15px} /*浮动方向*/ .fl{float:left;} .fr{float:right;} /*结构*/ /*头部*/ .top_nav {clear:both;width:100%;color:#d4d4d4;margin-bottom:20px;height:30px; line-height:30px;border-bottom:1px dashed #d4d4d4;} .top_nav .top_bd{ width:980px; margin:0 auto} .top_nav .top_info{ float:right} .top_nav .top_items{ float:left} .top_nav .top_items li{ float:left; margin-right:10px} /**导航样式**/ #header {width:980px; margin:0px auto;margin-bottom:40px; } #header .site_nav .site_logo{ float:left; width:165px;} #header .appnav{ float:right; width:810px; background-color:#E9F4E9; height:35px; line-height:35px} #nav_bar{ display:block; float:left; width:530px;} #nav_bar li{ float:left; } #nav_bar li a{ font-size:14px; padding:10px 20px; color:#0C7823} #nav_bar li a:hover{ color:#000} #search_bar{ float:right; width:260px;} #search_bar li{ float:left;} #search_bar li .key{ border-style:none; background-color:#FFF; line-height:22px; height:22px; font-size:12px;} /*APP导航*/ /*中部*/ .midder{width:980px;margin:0 auto;padding:0;overflow:hidden;height:auto !important;min-height:400px;margin-top:15px; } .midder .mc{overflow:hidden;display: block;} .midder .mc .cleft{float: left;padding-right: 10px; width: 640px;} .midder .mc .cright{float: right;width: 310px;} /*底部*/ #footer{height:162px; padding-top:43px; margin-top:40px; } #footer .f_content{width:980px; overflow:hidden; margin:0 auto; border-top: 1px dashed #DDDDDD; padding-top:10px} /*tab切换导航*/ .tabnav { padding:0px; background:url(new/zbar.gif) repeat-x 0px 0px; margin-bottom:10px; height:28px;} .tabnav ul { height: 28px; margin: 0; overflow: hidden; padding: 0; } .tabnav ul li { float: left; margin:0px 8px; margin-top:3px} .tabnav ul li a{ padding: 0 20px; display:block; line-height:24px; color:#333;} .tabnav .select{ border:1px solid #faeee4; border-bottom:none; background-color:#fff; border-style:solid solid none; border-width:1px 1px medium; } .tabnav .select a { } /*分页*/ .page {margin:0;text-align: left;padding:5px;} .page a { border:#DDDDDD 1px solid; padding:2px 5px;margin: 2px; color: #336699;text-decoration: none } .page a:hover { border: #3266A0 1px solid; } .page a:active { border: #3266A0 1px solid; } .page .current { color:#FFFFFF;background:#3A81C0;border-bottom: 1px solid #3266A0; padding:2px 5px;font-weight: bold; margin: 2px; } .page .disabled { border: #eee 1px solid; padding:2px 5px; margin: 2px;color: #ddd; } /*tag*/ .tags { margin:10px 0; line-height: 18px; } .tags a.post-tag { background-color: #ededed; border-bottom: 1px solid #3E6D8E; border-right: 1px solid #7F9FB6; color: #4B8DC5; font-size: 12px; line-height: 2.4; margin: 2px 2px 2px 0; padding: 3px 4px; text-decoration: none; white-space: nowrap; border-radius:px; border-radius:2px; } .tags a.post-tag:hover{ background-color: #3E6D8E; border-bottom: 1px solid #37607D; border-right: 1px solid #37607D; color: #E0EAF1; text-decoration: none; } .tags .item-multiplier { color: #444444; font-size: 120%; font-weight: bold; margin-right: 4px; } pre{ white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word; background-color: #F8FFF8; border-color: #F0FFF0; border-style: solid; border-width: 1px 1px 1px 5px; color: #006600; display: block; font-size: 10pt; padding: 4px 12px; } /**输入框**/ .utext{ width:300px;height:50;border-color: #CCCCCC #E1E1E1 #E1E1E1 #CCCCCC;border-style: solid;border-width: 1px; padding: 3px 0 3px 0;font-size: 14px;} .utext:focus{border-color:gray} .txt{ border: 1px solid #CCCCCC; line-height: 22px; padding: 3px; padding:3px; } .txt:focus{ border-color:gray} h1.tit1{ color: #494949; display: block; font-size: 25px; font-weight: bold; line-height: 1.1; margin: 0; padding: 0 0 15px; word-wrap: break-word; } h1.title{ color: #000000; display: block; font: 24px/30px Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif; margin-bottom: 5px; text-align:center; } .tit2{ line-height:30px;} /**发布表格**/ .table_1{ width:100%} .table_1 td{ padding:10px;} .table_1 th{ text-align:right; width:100px; font-size:14px; color:#666666;} .table_1 .tip{ color:gray;} /**发布按钮**/ .pl2{ color: #666666;font-size:14px; line-height:35px;} .pl2 .send{font-size:12px; color:#000; background:url(new/post.gif) no-repeat 0px 0px; width:120px; height:25px; line-height:25px; display:inline-block; margin:10px 0px} .pl2 .send span{ padding-left:28px; letter-spacing:6px} .goback{ line-height:30px; margin-bottom:10px} /**头像 组icon 设置**/ .face_form{} .face_form .pil{ float:left; margin-right:10px; padding:1px; border:#ddd solid 1px; margin-top:5px} .face_form .file_info{ float:left} .face_form .file_info p{ line-height:30px;} input[type="checkbox"] { margin:0;padding:0; vertical-align:middle;} input[type="radio"] { margin:0;padding:0; vertical-align:middle; margin-right:5px} /**右侧分类**/ .cate{ margin-bottom:15px} .cate li{ line-height:25px;} .cate li.select{ } .pl { color: #666666; font: 12px/150% Arial; } /*2011-06-20*/ /*个人主页左侧*/ #db-usr-profile { height: 58px; left: 0; margin-bottom: 2em; position: relative; top: 0; width: 100%; } #db-usr-profile .pic { float: left; margin-right: 12px; } #db-usr-profile .info { float: left; padding-top: 2px; } #db-usr-profile h1 { padding: 0 0 4px; } #db-usr-profile .info ul li { display: inline; margin-right: 1em; } #review { margin-bottom: 27px; } /**load style <div class="loading-style1"><b></b>加载中,请稍候...</div>**/ .loading-style1{ text-align:center; color:#999;} .loading-style1 b{ background:url(../../public/images/loading.gif) no-repeat 0px 0px; display:block; width:20px; height:20px; margin:5px auto;}
12ik
trunk/theme/white/base.css
CSS
oos
9,223
<html> <head> <title>videomanager</title> </head> <body> <h2>Hello World!</h2> </body> </html>
0-o-0
trunk/videomanager/src/main/webapp/index.jsp
Java Server Pages
asf20
95
using System; using System.Collections.Generic; using System.Text; using System.Configuration; using Entities; using DAL; using Utility; namespace BUS { public class tbDoanhNghiepBUS { public static void Insert_DN(tbDoanhNghiep doanhnghiep) { tbDoanhNghiepDAL DoanhNghiepDAL = new tbDoanhNghiepDAL(); DoanhNghiepDAL.Insert(doanhnghiep); } public static void Update_DN(tbDoanhNghiep doanhnghiep) { tbDoanhNghiepDAL doanhnghiepDAL = new tbDoanhNghiepDAL(); doanhnghiepDAL.Update(doanhnghiep); } public static void Delete_DN(int Id) { tbDoanhNghiepDAL DoanhNghiepDAL = new tbDoanhNghiepDAL(); DoanhNghiepDAL.Delete(Id); } public static tbDoanhNghiepCollection Get(string Where, int PageIndex, int PageSize, string OrderBy, string OrderDirection, out int TotalRecords) { tbDoanhNghiepDAL DoanhNghiepDAL = new tbDoanhNghiepDAL(); return DoanhNghiepDAL.Get(Where, PageIndex, PageSize, OrderBy, OrderDirection, out TotalRecords); } public static tbDoanhNghiepCollection GetAll() { Criteria cri = new Criteria(); int Total = 0; tbDoanhNghiepDAL DoanhNghiepDAL = new tbDoanhNghiepDAL(); return DoanhNghiepDAL.Get(cri.Criter, 0, 0, tbDoanhNghiepColumns.IdDoanhNghiep.ToString(), OrderDirection.ASC.ToString(), out Total); } public static tbDoanhNghiep GetById(int Id) { Criteria cri = new Criteria(); int Total = 0; cri.add(Condition.AND, tbDoanhNghiepColumns.IdDoanhNghiep.ToString(), Condition.EQUAL, Id); tbDoanhNghiepDAL DoanhNghiepDAL = new tbDoanhNghiepDAL(); tbDoanhNghiepCollection DNCollection = DoanhNghiepDAL.Get(cri.Criter, 0, 0, tbDoanhNghiepColumns.IdDoanhNghiep.ToString(), OrderDirection.ASC.ToString(), out Total); if (DNCollection.Count > 0) return DNCollection[0]; return null; } } }
02cdnth2
trunk/BUS/tbDoanhNghiepBUS.cs
C#
epl
2,398
using System; using System.Collections.Generic; using System.Text; using Utility; using Entities; using DAL; namespace BUS { public class tbHinhThucTTBUS { public static void Insert(tbHinhThucTT hinhthuctt) { tbHinhThucTTDAL hinhthucttDAL = new tbHinhThucTTDAL(); hinhthucttDAL.Insert(hinhthuctt); } public static void Update(tbHinhThucTT hinhthuctt) { tbHinhThucTTDAL hinhthucttDAL = new tbHinhThucTTDAL(); hinhthucttDAL.Update(hinhthuctt); } public static void Detele(int iD) { tbHinhThucTTDAL hinhthucttDAL = new tbHinhThucTTDAL(); hinhthucttDAL.Delete(iD); } public static tbHinhThucTTCollection Get(string where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int total) { tbHinhThucTTDAL hinhthucttDAL = new tbHinhThucTTDAL(); return hinhthucttDAL.Get(where, pageIndex, pageSize, orderBy, orderDirection, out total); } public static tbHinhThucTTCollection GetAll() { int total = 0; tbHinhThucTTDAL hinhthucttDAL = new tbHinhThucTTDAL(); return hinhthucttDAL.Get("where 1=1", 0, 0, tbHinhThucTTColumns.IdHinhThuc.ToString(), "ASC", out total); } public static tbHinhThucTT GetById(int iD) { int total = 0; Criteria cri = new Criteria(); cri.add(Condition.AND, tbHinhThucTTColumns.IdHinhThuc.ToString(), Condition.EQUAL, iD); tbHinhThucTTDAL hinhthucttDAL = new tbHinhThucTTDAL(); tbHinhThucTTCollection hinhthucttCollection = hinhthucttDAL .Get(cri .Criter ,0,0, tbHinhThucTTColumns .IdHinhThuc .ToString (), OrderDirection .ASC .ToString (),out total ); if (hinhthucttCollection.Count > 0) return hinhthucttCollection[0]; return null; } } }
02cdnth2
trunk/BUS/tbHinhThucTTBUS.cs
C#
epl
2,137
using System; using System.Collections.Generic; using System.Text; using Utility; using Entities; using DAL; using BUS; namespace BUS { public class tbDonHangBUS { public static int Insert(tbDonHang donHang) { tbDonHangDAL donHangDAL = new tbDonHangDAL(); return donHangDAL.Insert(donHang); } public static void Update(tbDonHang donHang) { tbDonHangDAL donHangDAL = new tbDonHangDAL(); donHangDAL.Update(donHang); } public static void Delete(int iD) { tbDonHangDAL donHangDAL = new tbDonHangDAL(); donHangDAL.Delete(iD); } public static tbDonHangCollection Get(string where, int pageindex, int pagesize, string orderby, string orderdirection, out int total) { tbDonHangDAL donHangDAL = new tbDonHangDAL(); return donHangDAL.Get(where, pageindex, pagesize, orderby, orderdirection, out total); } public static tbDonHangCollection GetAll() { int total = 0; Criteria cri = new Criteria(); tbDonHangDAL donHangDAL = new tbDonHangDAL(); return donHangDAL.Get(cri.Criter, 0, 0, tbDonHangColumns.IdDH.ToString(), OrderDirection.ASC.ToString(), out total); } public static tbDonHang GetByID(int iD) { int total = 0; Criteria cri = new Criteria(); cri.add(Condition.AND, tbDonHangColumns.IdDH.ToString(), Condition.EQUAL, iD); tbDonHangDAL donHangDAL = new tbDonHangDAL(); tbDonHangCollection donHangCollection = donHangDAL.Get(cri.Criter, 0, 0, tbDonHangColumns.IdDH.ToString(), OrderDirection.ASC.ToString(), out total); if (donHangCollection.Count > 0) return donHangCollection[0]; return null; } } }
02cdnth2
trunk/BUS/tbDonHangBUS.cs
C#
epl
2,011
using System; using System.Collections.Generic; using System.Text; using Entities; using DAL; using Utility; namespace BUS { public class tbTTGiaoDichBUS { public static void Insert(tbTTGiaoDich sp) { tbTTGiaoDichDAL spDAL = new tbTTGiaoDichDAL(); spDAL.Insert(sp); } public static void Update(tbTTGiaoDich sp) { tbTTGiaoDichDAL spDAL = new tbTTGiaoDichDAL(); spDAL.Update(sp); } public static void Detele(int iD) { tbTTGiaoDichDAL spDAL = new tbTTGiaoDichDAL(); spDAL.Delete(iD); } public static tbTTGiaoDichCollection Get(string where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int total) { tbTTGiaoDichDAL spDAL = new tbTTGiaoDichDAL(); return spDAL.Get(where, pageIndex, pageSize, orderBy, orderDirection, out total); } public static tbTTGiaoDichCollection GetAll() { int total = 0; tbTTGiaoDichDAL spDAL = new tbTTGiaoDichDAL(); return spDAL.Get("where 1=1", 0, 0, tbTTGiaoDichColumns.IdTTGiaoDich.ToString(), "ASC", out total); } public static tbTTGiaoDich GetById(int iD) { int total = 0; Criteria cri = new Criteria(); cri.add(Condition.AND, tbTTGiaoDichColumns.IdDH.ToString(), Condition.EQUAL, iD); tbTTGiaoDichDAL spDAL = new tbTTGiaoDichDAL(); tbTTGiaoDichCollection spCollection = spDAL.Get(cri .Criter ,0,0,tbTTGiaoDichColumns .IdDH .ToString (), OrderDirection .ASC .ToString (),out total ); if (spCollection.Count > 0) return spCollection[0]; return null; } } }
02cdnth2
trunk/BUS/tbTTGiaoDichBUS.cs
C#
epl
1,912
using System; using System.Collections.Generic; using System.Text; using Utility; using Entities; using DAL; namespace BUS { public class tbCTDonHangBUS { public static void Insert(tbCTDonHang cTDonHang) { tbCTDonHangDAL cTDonHangDAL = new tbCTDonHangDAL(); cTDonHangDAL.Insert(cTDonHang); } public static void Update(tbCTDonHang cTDonHang) { tbCTDonHangDAL cTDonHangDAL = new tbCTDonHangDAL(); cTDonHangDAL.Update(cTDonHang); } public static void Delete(int iD) { tbCTDonHangDAL cTDonHangDAL = new tbCTDonHangDAL(); cTDonHangDAL.Delete(iD); } public static tbCTDonHangCollection Get(string where, int pageindex, int pagesize, string orderby, string orderdirection, out int total) { tbCTDonHangDAL cTDonHangDAL = new tbCTDonHangDAL(); return cTDonHangDAL.Get(where, pageindex, pagesize, orderby, orderdirection, out total); } public static tbCTDonHangCollection GetAll() { int total = 0; Criteria cri = new Criteria(); tbCTDonHangDAL cTDonHangDAL = new tbCTDonHangDAL(); return cTDonHangDAL.Get(cri.Criter, 0, 0, tbCTDonHangColumns.IdCTDonHang.ToString(), OrderDirection.ASC.ToString(), out total); } public static tbCTDonHang GetByID(int iD) { int total = 0; Criteria cri = new Criteria(); cri.add(Condition.AND, tbCTDonHangColumns.IdCTDonHang.ToString(), Condition.EQUAL, iD); tbCTDonHangDAL cTDonHangDAL = new tbCTDonHangDAL(); tbCTDonHangCollection cTDonHangCollection = cTDonHangDAL.Get(cri.Criter, 0, 0, tbCTDonHangColumns.IdCTDonHang.ToString(), OrderDirection.ASC.ToString(), out total); if (cTDonHangCollection.Count > 0) return cTDonHangCollection[0]; return null; } } }
02cdnth2
trunk/BUS/tbCTDonHangBUS.cs
C#
epl
2,096
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("BUS")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("BUS")] [assembly: AssemblyCopyright("Copyright © 2011")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("e35c3144-073c-4b35-adda-1c51d398d12b")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
02cdnth2
trunk/BUS/Properties/AssemblyInfo.cs
C#
epl
1,377
using System; using System.Collections.Generic; using System.Text; using Entities; using DAL; using Utility; namespace BUS { public class tbTrangThaiSPBUS { public static void Insert_TTSP(tbTrangThaiSP ttsp) { tbTrangThaiSPDAL ttspDAL = new tbTrangThaiSPDAL(); ttspDAL.Insert(ttsp); } public static void Update_TTSP(tbTrangThaiSP ttsp) { tbTrangThaiSPDAL ttspDAL = new tbTrangThaiSPDAL(); ttspDAL.Update(ttsp); } public static void Delete_TTSP(int Id) { tbTrangThaiSPDAL ttspDAL = new tbTrangThaiSPDAL(); ttspDAL.Delete (Id ); } public static tbTrangThaiSPCollection Get(string Where, int PageIndex, int PageSize, string OrderBy, string OrderDirection, out int Total) { tbTrangThaiSPDAL ttspDAL= new tbTrangThaiSPDAL(); return ttspDAL.Get(Where, PageIndex, PageSize, OrderBy, OrderDirection, out Total); } public static tbTrangThaiSPCollection GetAll() { int Total = 0; Criteria cri = new Criteria(); tbTrangThaiSPDAL ttspDAL = new tbTrangThaiSPDAL(); return ttspDAL.Get(cri.Criter, 0, 0, tbTrangThaiSPColumns.IdTrangThaiSP.ToString(), OrderDirection.ASC.ToString(), out Total); } public static tbTrangThaiSP GetById(int Id) { int Total = 0; Criteria cri = new Criteria(); cri.add(Condition.AND, tbTrangThaiSPColumns.IdTrangThaiSP.ToString(), Condition.EQUAL, Id); tbTrangThaiSPDAL ttspDAL=new tbTrangThaiSPDAL (); tbTrangThaiSPCollection ttspCollection = ttspDAL.Get(cri.Criter, 0, 0, tbTrangThaiSPColumns.IdTrangThaiSP.ToString(), OrderDirection.ASC.ToString(), out Total); if(ttspCollection .Count >0) return ttspCollection [0]; return null ; } } }
02cdnth2
trunk/BUS/tbTrangThaiSPBUS.cs
C#
epl
2,232
using System; using System.Collections.Generic; using System.Text; using System.Configuration; using Entities; using DAL; using Utility; namespace BUS { public class tbKhachHangBUS { public static void Insert(tbKhachHang kh) { tbKhachHangDAL khachhangDAL = new tbKhachHangDAL(); khachhangDAL.Insert(kh); } public static void Update(tbKhachHang kh) { tbKhachHangDAL khachhangDAL = new tbKhachHangDAL(); khachhangDAL.Update(kh); } public static void Delete(int iD) { tbKhachHangDAL khachhangDAL = new tbKhachHangDAL(); khachhangDAL.Delete(iD); } public static tbKhachHangCollection Get(string where, int pageindex, int pagesize, string orderby, string orderdirection, out int total) { tbKhachHangDAL khachhangDAL = new tbKhachHangDAL(); return khachhangDAL.Get(where, pageindex, pagesize, orderby, orderdirection, out total); } public static tbKhachHangCollection GetAll() { int total = 0; tbKhachHangDAL khachhangDAL = new tbKhachHangDAL(); return khachhangDAL.Get("where 1=1", 0, 0, tbKhachHangColumns.IdKhachHang.ToString(), "ASC", out total); } public static tbKhachHang GetByID(int iD) { int total = 0; Criteria cri = new Criteria(); cri.add(Condition.AND, tbKhachHangColumns.IdKhachHang.ToString(), Condition.EQUAL, iD); tbKhachHangDAL khachhangDAL = new tbKhachHangDAL(); tbKhachHangCollection khachhangCollection = khachhangDAL .Get(cri.Criter ,0,0, tbKhachHangColumns .IdKhachHang .ToString (), OrderDirection .ASC .ToString (),out total ); if (khachhangCollection.Count > 0) return khachhangCollection[0]; return null; } } }
02cdnth2
trunk/BUS/tbKhachHangBUS.cs
C#
epl
2,086
using System; using System.Collections.Generic; using System.Text; using System.Configuration; using Entities; using DAL; using Utility; namespace BUS { public class tbLoaiSPBUS { public static void Insert(tbLoaiSP loaisp) { tbLoaiSPDAL LSP = new tbLoaiSPDAL(); LSP.Insert(loaisp); } public static void Update(tbLoaiSP loaisp) { tbLoaiSPDAL LSP = new tbLoaiSPDAL(); LSP.Update(loaisp); } public static void delete(int Id) { tbLoaiSPDAL LSP = new tbLoaiSPDAL(); LSP.Delete(Id); } public static tbLoaiSPCollection Get(string Where, int PageIndex, int PageSize, string OrderBy, string OrderDirection, out int Total) { tbLoaiSPDAL LSP = new tbLoaiSPDAL(); return LSP.Get(Where, PageIndex, PageSize, OrderBy, OrderDirection, out Total); } public static tbLoaiSPCollection GetAll() { int Total = 0; Criteria cr = new Criteria(); tbLoaiSPDAL LSP = new tbLoaiSPDAL(); return LSP.Get(cr.Criter, 0, 0, tbLoaiSPColumns.IdLoaiSP .ToString(), OrderDirection .ASC .ToString (), out Total); } public static tbLoaiSP GetId(int Id) { int Total = 0; Criteria cr = new Criteria(); cr.add(Condition.AND, tbLoaiSPColumns.IdLoaiSP , Condition.LIKE, Id); tbLoaiSPDAL LSP = new tbLoaiSPDAL(); tbLoaiSPCollection loaispcollection = LSP.Get(cr.Criter, 0, 0, tbLoaiSPColumns.IdLoaiSP .ToString(), OrderDirection.ASC.ToString(), out Total); if (loaispcollection.Count > 0) return loaispcollection[0]; return null ; } } }
02cdnth2
trunk/BUS/tbLoaiSPBUS.cs
C#
epl
2,101
using System; using System.Collections.Generic; using System.Text; using Entities; using DAL; using BUS; using Utility; namespace BUS { public class tbHinhAnhBUS { public static void Insert(tbHinhAnh hinhanh) { tbHinhAnhDAL hinhanhDAL = new tbHinhAnhDAL(); hinhanhDAL.Insert(hinhanh); } public static void Update(tbHinhAnh hinhanh) { tbHinhAnhDAL hinhanhDAL = new tbHinhAnhDAL(); hinhanhDAL.Update(hinhanh); } public static void Detele(int iD) { tbHinhAnhDAL hinhanhDAL = new tbHinhAnhDAL(); hinhanhDAL.Delete(iD); } public static void DeleteIdSP(int IdSanPham) { tbHinhAnhDAL hinhAnhDAL = new tbHinhAnhDAL(); hinhAnhDAL.DeleteIdSP (IdSanPham); } public static string [] DeleteImageByIdSP(int IdSanPham) { tbHinhAnhDAL hinhAnhDAL = new tbHinhAnhDAL(); return hinhAnhDAL.DeleteImageByIdSP(IdSanPham); } public static tbHinhAnhCollection Get(string where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int total) { tbHinhAnhDAL hinhanhDAL = new tbHinhAnhDAL(); return hinhanhDAL.Get(where, pageIndex, pageSize, orderBy, orderDirection, out total); } public static tbHinhAnhCollection GetAll() { int total = 0; tbHinhAnhDAL hinhanhDAL = new tbHinhAnhDAL(); return hinhanhDAL.Get("where 1=1", 0, 0, tbHinhAnhColumns.IdHinhAnh.ToString(), OrderDirection .ASC .ToString (), out total); } public static tbHinhAnh GetById(int iD) { int total = 0; tbHinhAnhDAL hinhanhDAL = new tbHinhAnhDAL(); Criteria Cri = new Criteria(); Cri.add(Condition.AND, tbHinhAnhColumns.IdHinhAnh.ToString(), Condition.EQUAL, iD); tbHinhAnhCollection hinhanhCollection = hinhanhDAL.Get(Cri .Criter ,0,0,tbHinhAnhColumns .IdHinhAnh .ToString (), OrderDirection .ASC .ToString (),out total ); if (hinhanhCollection.Count > 0) return hinhanhCollection[0]; return null; } public static int FirstImage(int IdSanPham,int Id) { tbHinhAnhDAL hinhAnhDAL = new tbHinhAnhDAL(); return hinhAnhDAL.FirstImage(IdSanPham, Id); } } }
02cdnth2
trunk/BUS/tbHinhAnhBUS.cs
C#
epl
2,586
using System; using System.Collections.Generic; using System.Text; using Utility; using Entities; using DAL; namespace BUS { public class tbTrangThaiDHBUS { public static void Insert(tbTrangThaiDH sp) { tbTrangThaiDHDAL spDAL = new tbTrangThaiDHDAL(); spDAL.Insert(sp); } public static void Update(tbTrangThaiDH sp) { tbTrangThaiDHDAL spDAL = new tbTrangThaiDHDAL(); spDAL.Update(sp); } public static void Detele(int iD) { tbTrangThaiDHDAL spDAL = new tbTrangThaiDHDAL(); spDAL.Delete(iD); } public static tbTrangThaiDHCollection Get(string where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int total) { tbTrangThaiDHDAL spDAL = new tbTrangThaiDHDAL(); return spDAL.Get(where, pageIndex, pageSize, orderBy, orderDirection, out total); } public static tbTrangThaiDHCollection GetAll() { int total = 0; tbTrangThaiDHDAL spDAL = new tbTrangThaiDHDAL(); return spDAL.Get("where 1=1", 0, 0, tbTrangThaiDHColumns.IdTrangThaiDH.ToString(), "ASC", out total); } public static tbTrangThaiDH GetById(int iD) { int total = 0; tbTrangThaiDHDAL spDAL = new tbTrangThaiDHDAL(); Criteria cri = new Criteria(); cri.add(Condition.AND, tbTrangThaiDHColumns.IdTrangThaiDH.ToString(), Condition.EQUAL, iD); tbTrangThaiDHCollection spCollection = spDAL.Get(cri .Criter ,0,0,tbTrangThaiDHColumns .IdTrangThaiDH .ToString (), OrderDirection .ASC .ToString() ,out total ); if (spCollection.Count > 0) return spCollection[0]; return null; } } }
02cdnth2
trunk/BUS/tbTrangThaiDHBUS.cs
C#
epl
1,947
using System; using System.Collections.Generic; using System.Text; using Entities; using DAL; using Utility; namespace BUS { public class tbSanPhamBUS { public static int Insert_SP(tbSanPham sanpham) { tbSanPhamDAL SpDAL = new tbSanPhamDAL(); return SpDAL.Insert(sanpham); } public static void Update_SP(tbSanPham sanpham) { tbSanPhamDAL SpDAL = new tbSanPhamDAL(); SpDAL.Update(sanpham); } public static void Delete_SP(int Id) { tbSanPhamDAL SpDAL = new tbSanPhamDAL(); SpDAL.Delete(Id); } public static tbSanPhamCollection Get(string Where, int PageIndex, int PageSize, string OderBy, string OderDirection, out int Total) { tbSanPhamDAL SanPham_Get = new tbSanPhamDAL(); return (SanPham_Get.Get(Where, PageIndex, PageSize, OderBy, OderDirection, out Total)); } public static tbSanPhamCollection GetAll() { int Total = 0; tbSanPhamDAL SanPham_GetAll = new tbSanPhamDAL(); return (SanPham_GetAll.Get("Where 1=1", 0, 0, tbSanPhamColumns.IdSanPham.ToString(), OrderDirection .ASC .ToString (), out Total)); } public static tbSanPham GetId(int Id) { int Total = 0; Criteria cri = new Criteria(); cri.add(Condition.AND, tbSanPhamColumns.IdSanPham.ToString(), Condition.EQUAL, Id); tbSanPhamDAL SanPham_GetId = new tbSanPhamDAL(); tbSanPhamCollection SPColection = SanPham_GetId.Get (cri .Criter ,0,0,tbSanPhamColumns .IdSanPham .ToString (), OrderDirection .ASC .ToString() ,out Total ); if (SPColection.Count > 0) return SPColection[0]; return null; } } }
02cdnth2
trunk/BUS/tbSanPhamBUS.cs
C#
epl
1,936
using System; using System.Collections.Generic; using System.Text; using Utility; using Entities; using BUS; using DAL; namespace BUS { public class tbMaSoSPBUS { public static void Insert(tbMaSoSP MS) { tbMaSoSPDAL masospDAL = new tbMaSoSPDAL(); masospDAL.Insert(MS); } public static void Update(tbMaSoSP MS) { tbMaSoSPDAL masospDAL = new tbMaSoSPDAL(); masospDAL.Update(MS); } public static void Delete(int iD) { tbMaSoSPDAL masospDAL = new tbMaSoSPDAL(); masospDAL.Delete(iD); } public static tbMaSoSPCollection Get(string where, int pageindex, int pagesize, string orderby, string orderdirection, out int total) { tbMaSoSPDAL masospDAL = new tbMaSoSPDAL(); return masospDAL.Get(where, pageindex, pagesize, orderby, orderdirection, out total); } public static tbMaSoSPCollection GetAll() { int total = 0; tbMaSoSPDAL masospDAL = new tbMaSoSPDAL(); return masospDAL.Get("where 1=1", 0, 0, tbMaSoSPColumns.IdMaSoSP.ToString(), "ASC", out total); } public static tbMaSoSP GetByID(int iD) { int total = 0; tbMaSoSPDAL masospDAL = new tbMaSoSPDAL(); Criteria cri = new Criteria(); cri.add(Condition.AND, tbMaSoSPColumns.IdMaSoSP.ToString(), Condition.EQUAL, iD); tbMaSoSPCollection masospCollection = masospDAL.Get(cri .Criter ,0,0,tbMaSoSPColumns .IdMaSoSP .ToString (), OrderDirection .ASC .ToString (),out total ); if (masospCollection.Count > 0) return masospCollection[0]; return null; } } }
02cdnth2
trunk/BUS/tbMaSoSPBUS.cs
C#
epl
1,886
using System; using System.Collections.Generic; using System.Text; using System.Configuration; using Entities; using DAL; using Utility; namespace BUS { public class tbNhanVienBUS { public static void Insert_NhanVien(tbNhanVien nhanvien) { tbNhanVienDAL NVDAL = new tbNhanVienDAL(); NVDAL.Insert(nhanvien); } public static void Update_NhanVien(tbNhanVien nhanvien) { tbNhanVienDAL NVDAL = new tbNhanVienDAL(); NVDAL.Update(nhanvien); } public static void Delete_NhanVien(int Id) { tbNhanVienDAL NVDAL = new tbNhanVienDAL(); NVDAL.Delete(Id); } public static tbNhanVienCollection Get(string Where, int PageIndex, int PageSize, string OderBy, string OderDirection, out int Total) { tbNhanVienDAL NhanVien_Get = new tbNhanVienDAL(); return (NhanVien_Get.Get(Where, PageIndex, PageSize, OderBy, OderDirection, out Total)); } public static tbNhanVienCollection GetAll() { int Total = 0; tbNhanVienDAL NV_GetAll = new tbNhanVienDAL(); return (NV_GetAll.Get("Where 1=1", 0, 0, tbNhanVienColumns.IdNhanVien.ToString(), "ASC", out Total)); } public static tbNhanVien GetId(int Id) { int Total = 0; tbNhanVienDAL NV_GetId = new tbNhanVienDAL(); tbNhanVienCollection NVColection = NV_GetId.Get("Where " + tbNhanVienColumns.IdNhanVien.ToString() + "= " + Id.ToString(), 0, 0, tbNhanVienColumns.IdNhanVien.ToString(), "ASC", out Total); if (NVColection.Count > 0) return NVColection[0]; return null; } public static Boolean DangNhap(string User, string Pass) { tbNhanVienDAL NVDAL = new tbNhanVienDAL(); return NVDAL.DangNhap(User, Pass); } } }
02cdnth2
trunk/BUS/tbNhanVienBUS.cs
C#
epl
1,998
using System; using System.Collections.Generic; using System.Text; using Utility; using Entities; using DAL; namespace BUS { public class tbDiaDiemBUS { public static void Insert(tbDiaDiem dd) { tbDiaDiemDAL diadiemDAL = new tbDiaDiemDAL(); diadiemDAL.Insert(dd); } public static void Update(tbDiaDiem dd) { tbDiaDiemDAL diadiemDAL = new tbDiaDiemDAL(); diadiemDAL.Update(dd); } public static void Detele(int iD) { tbDiaDiemDAL diadiemDAL = new tbDiaDiemDAL(); diadiemDAL.Delete(iD); } public static tbDiaDiemCollection Get(string where, int pageIndex, int pageSize, string orderBy, string orderDirection, out int total) { tbDiaDiemDAL diadiemDAL = new tbDiaDiemDAL(); return diadiemDAL.Get(where, pageIndex, pageSize, orderBy, orderDirection, out total); } public static tbDiaDiemCollection GetAll() { int total = 0; tbDiaDiemDAL diadiemDAL = new tbDiaDiemDAL(); return diadiemDAL.Get("where 1=1", 0, 0, tbDiaDiemColumns.IdDiaDiem.ToString(), "ASC", out total); } public static tbDiaDiem GetById(int iD) { int total = 0; tbDiaDiemDAL diadiemDAL = new tbDiaDiemDAL(); Criteria cri = new Criteria(); cri.add(Condition.AND, tbDiaDiemColumns.IdDiaDiem.ToString(), Condition.EQUAL, iD); tbDiaDiemCollection diadiemCollection = diadiemDAL.Get(cri .Criter ,0,0, tbDiaDiemColumns .IdDiaDiem .ToString (), OrderDirection .ASC .ToString (),out total ); if (diadiemCollection.Count > 0) return diadiemCollection[0]; return null; } } }
02cdnth2
trunk/BUS/tbDiaDiemBUS.cs
C#
epl
1,982
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Homnay.aspx.cs" Inherits="Homnay" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:Repeater ID ="repeater1" runat ="server" OnItemDataBound="repeater1_ItemDataBound"> <ItemTemplate > <div class="box" > <div class="sect" > <ul class="deals-list" > <li style =" background-color :White"> <h4><asp:HyperLink ID ="hyp_tensp" runat ="server" ></asp:HyperLink> <span class="time" style="color:#999;"><asp:Literal ID ="lit_ngaythang" runat ="server" ></asp:Literal></span></h4> <div class="pic"> <div class="isopen"></div> <a href="http://www.hotdeal.vn/ho-chi-minh/princess-resort---spa-2n1d_3704.html" title="Nghỉ Dưỡng 2 N1Đ Dành Cho 02 NgườiTrong Không Gian Ngập Tràn Sắc Xanh Tại Princess Resort &amp; Spa Tiêu Chuẩn Tương Đương 4* Tại Bình Dương. Voucher 1.700.000VNĐ, Còn 590.000VNĐ, Giảm 66%." target="_blank"> <asp:Image ID="img_HinhAnh" runat ="server" Height ="120" Width ="200" /> </a> </div> <div class="info"> <p class="total" align="center"><strong class="count"><asp:Literal ID ="lit_count" runat ="server" ></asp:Literal></strong><br>người đã mua<!--persons have bought--></p> </div> <div class="clear"> <table border="0" width="100%"> <tbody> <tr> <td class="price"><!--Original price:-->Giá gốc: <strong class="old"><asp:Literal ID ="lit_old" runat ="server" ></asp:Literal><span class="money">VNĐ</span></strong></td> <td class="price">Giảm: <strong class="discount"><asp:Literal ID ="lit_discount" runat ="server" ></asp:Literal></strong></td> </tr> <tr> <td class="price">Giá bán: <strong><asp:Literal ID ="lit_giaban" runat ="server" ></asp:Literal> <span class="money">VNĐ</span></strong></td> <td class="price">Tiết kiệm: <strong><asp:Literal ID ="lit_tietkiem" runat ="server" ></asp:Literal> <span class="money">VNĐ</span></strong></td> </tr> </tbody> </table> </div> </li> </ul> </div> </div> </ItemTemplate> </asp:Repeater> </asp:Content>
02cdnth2
trunk/Test/Homnay.aspx
ASP.NET
epl
2,999
/* * This file has been commented to support Visual Studio Intellisense. * You should not use this file at runtime inside the browser--it is only * intended to be used only for design-time IntelliSense. Please use the * standard jQuery library for all production use. * * Comment version: 1.3.2b */ /* * jQuery JavaScript Library v1.3.2 * http://jquery.com/ * * Copyright (c) 2009 John Resig * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) * Revision: 6246 */ (function(){ var // Will speed up references to window, and allows munging its name. window = this, // Will speed up references to undefined, and allows munging its name. undefined, // Map over jQuery in case of overwrite _jQuery = window.jQuery, // Map over the $ in case of overwrite _$ = window.$, jQuery = window.jQuery = window.$ = function(selector, context) { /// <summary> /// 1: $(expression, context) - This function accepts a string containing a CSS selector which is then used to match a set of elements. /// 2: $(html) - Create DOM elements on-the-fly from the provided String of raw HTML. /// 3: $(elements) - Wrap jQuery functionality around a single or multiple DOM Element(s). /// 4: $(callback) - A shorthand for $(document).ready(). /// </summary> /// <param name="selector" type="String"> /// 1: expression - An expression to search with. /// 2: html - A string of HTML to create on the fly. /// 3: elements - DOM element(s) to be encapsulated by a jQuery object. /// 4: callback - The function to execute when the DOM is ready. /// </param> /// <param name="context" type="jQuery"> /// 1: context - A DOM Element, Document or jQuery to use as context. /// </param> /// <field name="selector" Type="Object"> /// The DOM node context originally passed to jQuery() (if none was passed then context will be equal to the document). /// </field> /// <field name="context" Type="String"> /// A selector representing selector originally passed to jQuery(). /// </field> /// <returns type="jQuery" /> // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context ); }, // A simple way to check for HTML strings or ID strings // (both of which we optimize for) quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/, // Is it a simple selector isSimple = /^.[^:#\[\.,]*$/; jQuery.fn = jQuery.prototype = { init: function( selector, context ) { /// <summary> /// 1: $(expression, context) - This function accepts a string containing a CSS selector which is then used to match a set of elements. /// 2: $(html) - Create DOM elements on-the-fly from the provided String of raw HTML. /// 3: $(elements) - Wrap jQuery functionality around a single or multiple DOM Element(s). /// 4: $(callback) - A shorthand for $(document).ready(). /// </summary> /// <param name="selector" type="String"> /// 1: expression - An expression to search with. /// 2: html - A string of HTML to create on the fly. /// 3: elements - DOM element(s) to be encapsulated by a jQuery object. /// 4: callback - The function to execute when the DOM is ready. /// </param> /// <param name="context" type="jQuery"> /// 1: context - A DOM Element, Document or jQuery to use as context. /// </param> /// <returns type="jQuery" /> // Make sure that a selection was provided selector = selector || document; // Handle $(DOMElement) if ( selector.nodeType ) { this[0] = selector; this.length = 1; this.context = selector; return this; } // Handle HTML strings if (typeof selector === "string") { // Are we dealing with HTML string or an ID? var match = quickExpr.exec(selector); // Verify a match, and that no context was specified for #id if (match && (match[1] || !context)) { // HANDLE: $(html) -> $(array) if (match[1]) selector = jQuery.clean([match[1]], context); // HANDLE: $("#id") else { var elem = document.getElementById(match[3]); // Handle the case where IE and Opera return items // by name instead of ID if (elem && elem.id != match[3]) return jQuery().find(selector); // Otherwise, we inject the element directly into the jQuery object var ret = jQuery(elem || []); ret.context = document; ret.selector = selector; return ret; } // HANDLE: $(expr, [context]) // (which is just equivalent to: $(content).find(expr) } else return jQuery(context).find(selector); // HANDLE: $(function) // Shortcut for document ready } else if ( jQuery.isFunction( selector ) ) return jQuery( document ).ready( selector ); // Make sure that old selector state is passed along if ( selector.selector && selector.context ) { this.selector = selector.selector; this.context = selector.context; } return this.setArray(jQuery.isArray( selector ) ? selector : jQuery.makeArray(selector)); }, // Start with an empty selector selector: "", // The current version of jQuery being used jquery: "1.3.2", // The number of elements contained in the matched element set size: function() { /// <summary> /// The number of elements currently matched. /// Part of Core /// </summary> /// <returns type="Number" /> return this.length; }, // Get the Nth element in the matched element set OR // Get the whole matched element set as a clean array get: function( num ) { /// <summary> /// Access a single matched element. num is used to access the /// Nth element matched. /// Part of Core /// </summary> /// <returns type="Element" /> /// <param name="num" type="Number"> /// Access the element in the Nth position. /// </param> return num == undefined ? // Return a 'clean' array Array.prototype.slice.call( this ) : // Return just the object this[ num ]; }, // Take an array of elements and push it onto the stack // (returning the new matched element set) pushStack: function( elems, name, selector ) { /// <summary> /// Set the jQuery object to an array of elements, while maintaining /// the stack. /// Part of Core /// </summary> /// <returns type="jQuery" /> /// <param name="elems" type="Elements"> /// An array of elements /// </param> // Build a new jQuery matched element set var ret = jQuery( elems ); // Add the old object onto the stack (as a reference) ret.prevObject = this; ret.context = this.context; if ( name === "find" ) ret.selector = this.selector + (this.selector ? " " : "") + selector; else if ( name ) ret.selector = this.selector + "." + name + "(" + selector + ")"; // Return the newly-formed element set return ret; }, // Force the current matched set of elements to become // the specified array of elements (destroying the stack in the process) // You should use pushStack() in order to do this, but maintain the stack setArray: function( elems ) { /// <summary> /// Set the jQuery object to an array of elements. This operation is /// completely destructive - be sure to use .pushStack() if you wish to maintain /// the jQuery stack. /// Part of Core /// </summary> /// <returns type="jQuery" /> /// <param name="elems" type="Elements"> /// An array of elements /// </param> // Resetting the length to 0, then using the native Array push // is a super-fast way to populate an object with array-like properties this.length = 0; Array.prototype.push.apply( this, elems ); return this; }, // Execute a callback for every element in the matched set. // (You can seed the arguments with an array of args, but this is // only used internally.) each: function( callback, args ) { /// <summary> /// Execute a function within the context of every matched element. /// This means that every time the passed-in function is executed /// (which is once for every element matched) the 'this' keyword /// points to the specific element. /// Additionally, the function, when executed, is passed a single /// argument representing the position of the element in the matched /// set. /// Part of Core /// </summary> /// <returns type="jQuery" /> /// <param name="callback" type="Function"> /// A function to execute /// </param> return jQuery.each( this, callback, args ); }, // Determine the position of an element within // the matched set of elements index: function( elem ) { /// <summary> /// Searches every matched element for the object and returns /// the index of the element, if found, starting with zero. /// Returns -1 if the object wasn't found. /// Part of Core /// </summary> /// <returns type="Number" /> /// <param name="elem" type="Element"> /// Object to search for /// </param> // Locate the position of the desired element return jQuery.inArray( // If it receives a jQuery object, the first element is used elem && elem.jquery ? elem[0] : elem , this ); }, attr: function( name, value, type ) { /// <summary> /// Set a single property to a computed value, on all matched elements. /// Instead of a value, a function is provided, that computes the value. /// Part of DOM/Attributes /// </summary> /// <returns type="jQuery" /> /// <param name="name" type="String"> /// The name of the property to set. /// </param> /// <param name="value" type="Function"> /// A function returning the value to set. /// </param> var options = name; // Look for the case where we're accessing a style value if ( typeof name === "string" ) if ( value === undefined ) return this[0] && jQuery[ type || "attr" ]( this[0], name ); else { options = {}; options[ name ] = value; } // Check to see if we're setting style values return this.each(function(i){ // Set all the styles for ( name in options ) jQuery.attr( type ? this.style : this, name, jQuery.prop( this, options[ name ], type, i, name ) ); }); }, css: function( key, value ) { /// <summary> /// Set a single style property to a value, on all matched elements. /// If a number is provided, it is automatically converted into a pixel value. /// Part of CSS /// </summary> /// <returns type="jQuery" /> /// <param name="key" type="String"> /// The name of the property to set. /// </param> /// <param name="value" type="String"> /// The value to set the property to. /// </param> // ignore negative width and height values if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) value = undefined; return this.attr( key, value, "curCSS" ); }, text: function( text ) { /// <summary> /// Set the text contents of all matched elements. /// Similar to html(), but escapes HTML (replace &quot;&lt;&quot; and &quot;&gt;&quot; with their /// HTML entities). /// Part of DOM/Attributes /// </summary> /// <returns type="String" /> /// <param name="text" type="String"> /// The text value to set the contents of the element to. /// </param> if ( typeof text !== "object" && text != null ) return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); var ret = ""; jQuery.each( text || this, function(){ jQuery.each( this.childNodes, function(){ if ( this.nodeType != 8 ) ret += this.nodeType != 1 ? this.nodeValue : jQuery.fn.text( [ this ] ); }); }); return ret; }, wrapAll: function( html ) { /// <summary> /// Wrap all matched elements with a structure of other elements. /// This wrapping process is most useful for injecting additional /// stucture into a document, without ruining the original semantic /// qualities of a document. /// This works by going through the first element /// provided and finding the deepest ancestor element within its /// structure - it is that element that will en-wrap everything else. /// This does not work with elements that contain text. Any necessary text /// must be added after the wrapping is done. /// Part of DOM/Manipulation /// </summary> /// <returns type="jQuery" /> /// <param name="html" type="Element"> /// A DOM element that will be wrapped around the target. /// </param> if ( this[0] ) { // The elements to wrap the target around var wrap = jQuery( html, this[0].ownerDocument ).clone(); if ( this[0].parentNode ) wrap.insertBefore( this[0] ); wrap.map(function(){ var elem = this; while ( elem.firstChild ) elem = elem.firstChild; return elem; }).append(this); } return this; }, wrapInner: function( html ) { /// <summary> /// Wraps the inner child contents of each matched elemenht (including text nodes) with an HTML structure. /// </summary> /// <param name="html" type="String"> /// A string of HTML or a DOM element that will be wrapped around the target contents. /// </param> /// <returns type="jQuery" /> return this.each(function(){ jQuery( this ).contents().wrapAll( html ); }); }, wrap: function( html ) { /// <summary> /// Wrap all matched elements with a structure of other elements. /// This wrapping process is most useful for injecting additional /// stucture into a document, without ruining the original semantic /// qualities of a document. /// This works by going through the first element /// provided and finding the deepest ancestor element within its /// structure - it is that element that will en-wrap everything else. /// This does not work with elements that contain text. Any necessary text /// must be added after the wrapping is done. /// Part of DOM/Manipulation /// </summary> /// <returns type="jQuery" /> /// <param name="html" type="Element"> /// A DOM element that will be wrapped around the target. /// </param> return this.each(function(){ jQuery( this ).wrapAll( html ); }); }, append: function() { /// <summary> /// Append content to the inside of every matched element. /// This operation is similar to doing an appendChild to all the /// specified elements, adding them into the document. /// Part of DOM/Manipulation /// </summary> /// <returns type="jQuery" /> /// <param name="content" type="Content"> /// Content to append to the target /// </param> return this.domManip(arguments, true, function(elem){ if (this.nodeType == 1) this.appendChild( elem ); }); }, prepend: function() { /// <summary> /// Prepend content to the inside of every matched element. /// This operation is the best way to insert elements /// inside, at the beginning, of all matched elements. /// Part of DOM/Manipulation /// </summary> /// <returns type="jQuery" /> /// <param name="" type="Content"> /// Content to prepend to the target. /// </param> return this.domManip(arguments, true, function(elem){ if (this.nodeType == 1) this.insertBefore( elem, this.firstChild ); }); }, before: function() { /// <summary> /// Insert content before each of the matched elements. /// Part of DOM/Manipulation /// </summary> /// <returns type="jQuery" /> /// <param name="" type="Content"> /// Content to insert before each target. /// </param> return this.domManip(arguments, false, function(elem){ this.parentNode.insertBefore( elem, this ); }); }, after: function() { /// <summary> /// Insert content after each of the matched elements. /// Part of DOM/Manipulation /// </summary> /// <returns type="jQuery" /> /// <param name="" type="Content"> /// Content to insert after each target. /// </param> return this.domManip(arguments, false, function(elem){ this.parentNode.insertBefore( elem, this.nextSibling ); }); }, end: function() { /// <summary> /// End the most recent 'destructive' operation, reverting the list of matched elements /// back to its previous state. After an end operation, the list of matched elements will /// revert to the last state of matched elements. /// If there was no destructive operation before, an empty set is returned. /// Part of DOM/Traversing /// </summary> /// <returns type="jQuery" /> return this.prevObject || jQuery( [] ); }, // For internal use only. // Behaves like an Array's method, not like a jQuery method. push: [].push, sort: [].sort, splice: [].splice, find: function( selector ) { /// <summary> /// Searches for all elements that match the specified expression. /// This method is a good way to find additional descendant /// elements with which to process. /// All searching is done using a jQuery expression. The expression can be /// written using CSS 1-3 Selector syntax, or basic XPath. /// Part of DOM/Traversing /// </summary> /// <returns type="jQuery" /> /// <param name="selector" type="String"> /// An expression to search with. /// </param> /// <returns type="jQuery" /> if ( this.length === 1 ) { var ret = this.pushStack( [], "find", selector ); ret.length = 0; jQuery.find( selector, this[0], ret ); return ret; } else { return this.pushStack( jQuery.unique(jQuery.map(this, function(elem){ return jQuery.find( selector, elem ); })), "find", selector ); } }, clone: function( events ) { /// <summary> /// Clone matched DOM Elements and select the clones. /// This is useful for moving copies of the elements to another /// location in the DOM. /// Part of DOM/Manipulation /// </summary> /// <returns type="jQuery" /> /// <param name="deep" type="Boolean" optional="true"> /// (Optional) Set to false if you don't want to clone all descendant nodes, in addition to the element itself. /// </param> // Do the clone var ret = this.map(function(){ if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) { // IE copies events bound via attachEvent when // using cloneNode. Calling detachEvent on the // clone will also remove the events from the orignal // In order to get around this, we use innerHTML. // Unfortunately, this means some modifications to // attributes in IE that are actually only stored // as properties will not be copied (such as the // the name attribute on an input). var html = this.outerHTML; if ( !html ) { var div = this.ownerDocument.createElement("div"); div.appendChild( this.cloneNode(true) ); html = div.innerHTML; } return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0]; } else return this.cloneNode(true); }); // Copy the events from the original to the clone if ( events === true ) { var orig = this.find("*").andSelf(), i = 0; ret.find("*").andSelf().each(function(){ if ( this.nodeName !== orig[i].nodeName ) return; var events = jQuery.data( orig[i], "events" ); for ( var type in events ) { for ( var handler in events[ type ] ) { jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data ); } } i++; }); } // Return the cloned set return ret; }, filter: function( selector ) { /// <summary> /// Removes all elements from the set of matched elements that do not /// pass the specified filter. This method is used to narrow down /// the results of a search. /// }) /// Part of DOM/Traversing /// </summary> /// <returns type="jQuery" /> /// <param name="selector" type="Function"> /// A function to use for filtering /// </param> /// <returns type="jQuery" /> return this.pushStack( jQuery.isFunction( selector ) && jQuery.grep(this, function(elem, i){ return selector.call( elem, i ); }) || jQuery.multiFilter( selector, jQuery.grep(this, function(elem){ return elem.nodeType === 1; }) ), "filter", selector ); }, closest: function( selector ) { /// <summary> /// Get a set of elements containing the closest parent element that matches the specified selector, the starting element included. /// </summary> /// <returns type="jQuery" /> /// <param name="selector" type="Function"> /// An expression to filter the elements with. /// </param> /// <returns type="jQuery" /> var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null, closer = 0; return this.map(function(){ var cur = this; while ( cur && cur.ownerDocument ) { if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) { jQuery.data(cur, "closest", closer); return cur; } cur = cur.parentNode; closer++; } }); }, not: function( selector ) { /// <summary> /// Removes any elements inside the array of elements from the set /// of matched elements. This method is used to remove one or more /// elements from a jQuery object. /// Part of DOM/Traversing /// </summary> /// <param name="selector" type="jQuery"> /// A set of elements to remove from the jQuery set of matched elements. /// </param> /// <returns type="jQuery" /> if ( typeof selector === "string" ) // test special case where just one selector is passed in if ( isSimple.test( selector ) ) return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector ); else selector = jQuery.multiFilter( selector, this ); var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; return this.filter(function() { return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; }); }, add: function( selector ) { /// <summary> /// Adds one or more Elements to the set of matched elements. /// Part of DOM/Traversing /// </summary> /// <param name="elements" type="Element"> /// One or more Elements to add /// </param> /// <returns type="jQuery" /> return this.pushStack( jQuery.unique( jQuery.merge( this.get(), typeof selector === "string" ? jQuery( selector ) : jQuery.makeArray( selector ) ))); }, is: function( selector ) { /// <summary> /// Checks the current selection against an expression and returns true, /// if at least one element of the selection fits the given expression. /// Does return false, if no element fits or the expression is not valid. /// filter(String) is used internally, therefore all rules that apply there /// apply here, too. /// Part of DOM/Traversing /// </summary> /// <returns type="Boolean" /> /// <param name="expr" type="String"> /// The expression with which to filter /// </param> return !!selector && jQuery.multiFilter( selector, this ).length > 0; }, hasClass: function( selector ) { /// <summary> /// Checks the current selection against a class and returns whether at least one selection has a given class. /// </summary> /// <param name="selector" type="String">The class to check against</param> /// <returns type="Boolean">True if at least one element in the selection has the class, otherwise false.</returns> return !!selector && this.is( "." + selector ); }, val: function( value ) { /// <summary> /// Set the value of every matched element. /// Part of DOM/Attributes /// </summary> /// <returns type="jQuery" /> /// <param name="val" type="String"> /// Set the property to the specified value. /// </param> if ( value === undefined ) { var elem = this[0]; if ( elem ) { if( jQuery.nodeName( elem, 'option' ) ) return (elem.attributes.value || {}).specified ? elem.value : elem.text; // We need to handle select boxes special if ( jQuery.nodeName( elem, "select" ) ) { var index = elem.selectedIndex, values = [], options = elem.options, one = elem.type == "select-one"; // Nothing was selected if ( index < 0 ) return null; // Loop through all the selected options for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { var option = options[ i ]; if ( option.selected ) { // Get the specifc value for the option value = jQuery(option).val(); // We don't need an array for one selects if ( one ) return value; // Multi-Selects return an array values.push( value ); } } return values; } // Everything else, we just grab the value return (elem.value || "").replace(/\r/g, ""); } return undefined; } if ( typeof value === "number" ) value += ''; return this.each(function(){ if ( this.nodeType != 1 ) return; if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) ) this.checked = (jQuery.inArray(this.value, value) >= 0 || jQuery.inArray(this.name, value) >= 0); else if ( jQuery.nodeName( this, "select" ) ) { var values = jQuery.makeArray(value); jQuery( "option", this ).each(function(){ this.selected = (jQuery.inArray( this.value, values ) >= 0 || jQuery.inArray( this.text, values ) >= 0); }); if ( !values.length ) this.selectedIndex = -1; } else this.value = value; }); }, html: function( value ) { /// <summary> /// Set the html contents of every matched element. /// This property is not available on XML documents. /// Part of DOM/Attributes /// </summary> /// <returns type="jQuery" /> /// <param name="val" type="String"> /// Set the html contents to the specified value. /// </param> return value === undefined ? (this[0] ? this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") : null) : this.empty().append( value ); }, replaceWith: function( value ) { /// <summary> /// Replaces all matched element with the specified HTML or DOM elements. /// </summary> /// <param name="value" type="String"> /// The content with which to replace the matched elements. /// </param> /// <returns type="jQuery">The element that was just replaced.</returns> return this.after( value ).remove(); }, eq: function( i ) { /// <summary> /// Reduce the set of matched elements to a single element. /// The position of the element in the set of matched elements /// starts at 0 and goes to length - 1. /// Part of Core /// </summary> /// <returns type="jQuery" /> /// <param name="num" type="Number"> /// pos The index of the element that you wish to limit to. /// </param> return this.slice( i, +i + 1 ); }, slice: function() { /// <summary> /// Selects a subset of the matched elements. Behaves exactly like the built-in Array slice method. /// </summary> /// <param name="start" type="Number" integer="true">Where to start the subset (0-based).</param> /// <param name="end" optional="true" type="Number" integer="true">Where to end the subset (not including the end element itself). /// If omitted, ends at the end of the selection</param> /// <returns type="jQuery">The sliced elements</returns> return this.pushStack( Array.prototype.slice.apply( this, arguments ), "slice", Array.prototype.slice.call(arguments).join(",") ); }, map: function( callback ) { /// <summary> /// This member is internal. /// </summary> /// <private /> /// <returns type="jQuery" /> return this.pushStack( jQuery.map(this, function(elem, i){ return callback.call( elem, i, elem ); })); }, andSelf: function() { /// <summary> /// Adds the previous selection to the current selection. /// </summary> /// <returns type="jQuery" /> return this.add( this.prevObject ); }, domManip: function( args, table, callback ) { /// <param name="args" type="Array"> /// Args /// </param> /// <param name="table" type="Boolean"> /// Insert TBODY in TABLEs if one is not found. /// </param> /// <param name="dir" type="Number"> /// If dir&lt;0, process args in reverse order. /// </param> /// <param name="fn" type="Function"> /// The function doing the DOM manipulation. /// </param> /// <returns type="jQuery" /> /// <summary> /// Part of Core /// </summary> if ( this[0] ) { var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(), scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ), first = fragment.firstChild; if ( first ) for ( var i = 0, l = this.length; i < l; i++ ) callback.call( root(this[i], first), this.length > 1 || i > 0 ? fragment.cloneNode(true) : fragment ); if ( scripts ) jQuery.each( scripts, evalScript ); } return this; function root( elem, cur ) { return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ? (elem.getElementsByTagName("tbody")[0] || elem.appendChild(elem.ownerDocument.createElement("tbody"))) : elem; } } }; // Give the init function the jQuery prototype for later instantiation jQuery.fn.init.prototype = jQuery.fn; function evalScript( i, elem ) { /// <summary> /// This method is internal. /// </summary> /// <private /> if ( elem.src ) jQuery.ajax({ url: elem.src, async: false, dataType: "script" }); else jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); if ( elem.parentNode ) elem.parentNode.removeChild( elem ); } function now(){ /// <summary> /// Gets the current date. /// </summary> /// <returns type="Date">The current date.</returns> return +new Date; } jQuery.extend = jQuery.fn.extend = function() { /// <summary> /// Extend one object with one or more others, returning the original, /// modified, object. This is a great utility for simple inheritance. /// jQuery.extend(settings, options); /// var settings = jQuery.extend({}, defaults, options); /// Part of JavaScript /// </summary> /// <param name="target" type="Object"> /// The object to extend /// </param> /// <param name="prop1" type="Object"> /// The object that will be merged into the first. /// </param> /// <param name="propN" type="Object" optional="true" parameterArray="true"> /// (optional) More objects to merge into the first /// </param> /// <returns type="Object" /> // copy reference to target object var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; // Handle a deep copy situation if ( typeof target === "boolean" ) { deep = target; target = arguments[1] || {}; // skip the boolean and the target i = 2; } // Handle case when target is a string or something (possible in deep copy) if ( typeof target !== "object" && !jQuery.isFunction(target) ) target = {}; // extend jQuery itself if only one argument is passed if ( length == i ) { target = this; --i; } for ( ; i < length; i++ ) // Only deal with non-null/undefined values if ( (options = arguments[ i ]) != null ) // Extend the base object for ( var name in options ) { var src = target[ name ], copy = options[ name ]; // Prevent never-ending loop if ( target === copy ) continue; // Recurse if we're merging object values if ( deep && copy && typeof copy === "object" && !copy.nodeType ) target[ name ] = jQuery.extend( deep, // Never move original objects, clone them src || ( copy.length != null ? [ ] : { } ) , copy ); // Don't bring in undefined values else if ( copy !== undefined ) target[ name ] = copy; } // Return the modified object return target; }; // exclude the following css properties to add px var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, // cache defaultView defaultView = document.defaultView || {}, toString = Object.prototype.toString; jQuery.extend({ noConflict: function( deep ) { /// <summary> /// Run this function to give control of the $ variable back /// to whichever library first implemented it. This helps to make /// sure that jQuery doesn't conflict with the $ object /// of other libraries. /// By using this function, you will only be able to access jQuery /// using the 'jQuery' variable. For example, where you used to do /// $(&quot;div p&quot;), you now must do jQuery(&quot;div p&quot;). /// Part of Core /// </summary> /// <returns type="undefined" /> window.$ = _$; if ( deep ) window.jQuery = _jQuery; return jQuery; }, // See test/unit/core.js for details concerning isFunction. // Since version 1.3, DOM methods and functions like alert // aren't supported. They return false on IE (#2968). isFunction: function( obj ) { /// <summary> /// Determines if the parameter passed is a function. /// </summary> /// <param name="obj" type="Object">The object to check</param> /// <returns type="Boolean">True if the parameter is a function; otherwise false.</returns> return toString.call(obj) === "[object Function]"; }, isArray: function(obj) { /// <summary> /// Determine if the parameter passed is an array. /// </summary> /// <param name="obj" type="Object">Object to test whether or not it is an array.</param> /// <returns type="Boolean">True if the parameter is a function; otherwise false.</returns> return toString.call(obj) === "[object Array]"; }, // check if an element is in a (or is an) XML document isXMLDoc: function( elem ) { /// <summary> /// Determines if the parameter passed is an XML document. /// </summary> /// <param name="elem" type="Object">The object to test</param> /// <returns type="Boolean">True if the parameter is an XML document; otherwise false.</returns> return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" || !!elem.ownerDocument && jQuery.isXMLDoc(elem.ownerDocument); }, // Evalulates a script in a global context globalEval: function( data ) { /// <summary> /// Internally evaluates a script in a global context. /// </summary> /// <private /> if ( data && /\S/.test(data) ) { // Inspired by code by Andrea Giammarchi // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html var head = document.getElementsByTagName("head")[0] || document.documentElement, script = document.createElement("script"); script.type = "text/javascript"; if ( jQuery.support.scriptEval ) script.appendChild( document.createTextNode( data ) ); else script.text = data; // Use insertBefore instead of appendChild to circumvent an IE6 bug. // This arises when a base node is used (#2709). head.insertBefore( script, head.firstChild ); head.removeChild( script ); } }, nodeName: function( elem, name ) { /// <summary> /// Checks whether the specified element has the specified DOM node name. /// </summary> /// <param name="elem" type="Element">The element to examine</param> /// <param name="name" type="String">The node name to check</param> /// <returns type="Boolean">True if the specified node name matches the node's DOM node name; otherwise false</returns> return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); }, // args is for internal usage only each: function( object, callback, args ) { /// <summary> /// A generic iterator function, which can be used to seemlessly /// iterate over both objects and arrays. This function is not the same /// as $().each() - which is used to iterate, exclusively, over a jQuery /// object. This function can be used to iterate over anything. /// The callback has two arguments:the key (objects) or index (arrays) as first /// the first, and the value as the second. /// Part of JavaScript /// </summary> /// <param name="obj" type="Object"> /// The object, or array, to iterate over. /// </param> /// <param name="fn" type="Function"> /// The function that will be executed on every object. /// </param> /// <returns type="Object" /> var name, i = 0, length = object.length; if ( args ) { if ( length === undefined ) { for ( name in object ) if ( callback.apply( object[ name ], args ) === false ) break; } else for ( ; i < length; ) if ( callback.apply( object[ i++ ], args ) === false ) break; // A special, fast, case for the most common use of each } else { if ( length === undefined ) { for ( name in object ) if ( callback.call( object[ name ], name, object[ name ] ) === false ) break; } else for ( var value = object[0]; i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} } return object; }, prop: function( elem, value, type, i, name ) { /// <summary> /// This method is internal. /// </summary> /// <private /> // This member is not documented within the jQuery API: http://docs.jquery.com/action/edit/Internals/jQuery.prop // Handle executable functions if ( jQuery.isFunction( value ) ) value = value.call( elem, i ); // Handle passing in a number to a CSS property return typeof value === "number" && type == "curCSS" && !exclude.test( name ) ? value + "px" : value; }, className: { // internal only, use addClass("class") add: function( elem, classNames ) { /// <summary> /// Internal use only; use addClass('class') /// </summary> /// <private /> jQuery.each((classNames || "").split(/\s+/), function(i, className){ if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) elem.className += (elem.className ? " " : "") + className; }); }, // internal only, use removeClass("class") remove: function( elem, classNames ) { /// <summary> /// Internal use only; use removeClass('class') /// </summary> /// <private /> if (elem.nodeType == 1) elem.className = classNames !== undefined ? jQuery.grep(elem.className.split(/\s+/), function(className){ return !jQuery.className.has( classNames, className ); }).join(" ") : ""; }, // internal only, use hasClass("class") has: function( elem, className ) { /// <summary> /// Internal use only; use hasClass('class') /// </summary> /// <private /> return elem && jQuery.inArray(className, (elem.className || elem).toString().split(/\s+/)) > -1; } }, // A method for quickly swapping in/out CSS properties to get correct calculations swap: function( elem, options, callback ) { /// <summary> /// Swap in/out style options. /// </summary> var old = {}; // Remember the old values, and insert the new ones for ( var name in options ) { old[ name ] = elem.style[ name ]; elem.style[ name ] = options[ name ]; } callback.call( elem ); // Revert the old values for ( var name in options ) elem.style[ name ] = old[ name ]; }, css: function( elem, name, force, extra ) { /// <summary> /// This method is internal only. /// </summary> /// <private /> // This method is undocumented in jQuery API: http://docs.jquery.com/action/edit/Internals/jQuery.css if ( name == "width" || name == "height" ) { var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; function getWH() { val = name == "width" ? elem.offsetWidth : elem.offsetHeight; if ( extra === "border" ) return; jQuery.each( which, function() { if ( !extra ) val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; if ( extra === "margin" ) val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0; else val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; }); } if ( elem.offsetWidth !== 0 ) getWH(); else jQuery.swap( elem, props, getWH ); return Math.max(0, Math.round(val)); } return jQuery.curCSS( elem, name, force ); }, curCSS: function( elem, name, force ) { /// <summary> /// This method is internal only. /// </summary> /// <private /> // This method is undocumented in jQuery API: http://docs.jquery.com/action/edit/Internals/jQuery.curCSS var ret, style = elem.style; // We need to handle opacity special in IE if ( name == "opacity" && !jQuery.support.opacity ) { ret = jQuery.attr( style, "opacity" ); return ret == "" ? "1" : ret; } // Make sure we're using the right name for getting the float value if ( name.match( /float/i ) ) name = styleFloat; if ( !force && style && style[ name ] ) ret = style[ name ]; else if ( defaultView.getComputedStyle ) { // Only "float" is needed here if ( name.match( /float/i ) ) name = "float"; name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); var computedStyle = defaultView.getComputedStyle( elem, null ); if ( computedStyle ) ret = computedStyle.getPropertyValue( name ); // We should always get a number back from opacity if ( name == "opacity" && ret == "" ) ret = "1"; } else if ( elem.currentStyle ) { var camelCase = name.replace(/\-(\w)/g, function(all, letter){ return letter.toUpperCase(); }); ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; // From the awesome hack by Dean Edwards // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // If we're not dealing with a regular pixel number // but a number that has a weird ending, we need to convert it to pixels if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { // Remember the original values var left = style.left, rsLeft = elem.runtimeStyle.left; // Put in the new values to get a computed value out elem.runtimeStyle.left = elem.currentStyle.left; style.left = ret || 0; ret = style.pixelLeft + "px"; // Revert the changed values style.left = left; elem.runtimeStyle.left = rsLeft; } } return ret; }, clean: function( elems, context, fragment ) { /// <summary> /// This method is internal only. /// </summary> /// <private /> // This method is undocumented in the jQuery API: http://docs.jquery.com/action/edit/Internals/jQuery.clean context = context || document; // !context.createElement fails in IE with an error but returns typeof 'object' if ( typeof context.createElement === "undefined" ) context = context.ownerDocument || context[0] && context[0].ownerDocument || document; // If a single string is passed in and it's a single tag // just do a createElement and skip the rest if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) { var match = /^<(\w+)\s*\/?>$/.exec(elems[0]); if ( match ) return [ context.createElement( match[1] ) ]; } var ret = [], scripts = [], div = context.createElement("div"); jQuery.each(elems, function(i, elem){ if ( typeof elem === "number" ) elem += ''; if ( !elem ) return; // Convert html string into DOM nodes if ( typeof elem === "string" ) { // Fix "XHTML"-style tags in all browsers elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? all : front + "></" + tag + ">"; }); // Trim whitespace, otherwise indexOf won't work as expected var tags = elem.replace(/^\s+/, "").substring(0, 10).toLowerCase(); var wrap = // option or optgroup !tags.indexOf("<opt") && [ 1, "<select multiple='multiple'>", "</select>" ] || !tags.indexOf("<leg") && [ 1, "<fieldset>", "</fieldset>" ] || tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && [ 1, "<table>", "</table>" ] || !tags.indexOf("<tr") && [ 2, "<table><tbody>", "</tbody></table>" ] || // <thead> matched above (!tags.indexOf("<td") || !tags.indexOf("<th")) && [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] || !tags.indexOf("<col") && [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] || // IE can't serialize <link> and <script> tags normally !jQuery.support.htmlSerialize && [ 1, "div<div>", "</div>" ] || [ 0, "", "" ]; // Go to html and back, then peel off extra wrappers div.innerHTML = wrap[1] + elem + wrap[2]; // Move to the right depth while ( wrap[0]-- ) div = div.lastChild; // Remove IE's autoinserted <tbody> from table fragments if ( !jQuery.support.tbody ) { // String was a <table>, *may* have spurious <tbody> var hasBody = /<tbody/i.test(elem), tbody = !tags.indexOf("<table") && !hasBody ? div.firstChild && div.firstChild.childNodes : // String was a bare <thead> or <tfoot> wrap[1] == "<table>" && !hasBody ? div.childNodes : []; for ( var j = tbody.length - 1; j >= 0 ; --j ) if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) tbody[ j ].parentNode.removeChild( tbody[ j ] ); } // IE completely kills leading whitespace when innerHTML is used if ( !jQuery.support.leadingWhitespace && /^\s/.test( elem ) ) div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild ); elem = jQuery.makeArray( div.childNodes ); } if ( elem.nodeType ) ret.push( elem ); else ret = jQuery.merge( ret, elem ); }); if ( fragment ) { for ( var i = 0; ret[i]; i++ ) { if ( jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) { scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] ); } else { if ( ret[i].nodeType === 1 ) ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) ); fragment.appendChild( ret[i] ); } } return scripts; } return ret; }, attr: function( elem, name, value ) { /// <summary> /// This method is internal. /// </summary> /// <private /> // don't set attributes on text and comment nodes if (!elem || elem.nodeType == 3 || elem.nodeType == 8) return undefined; var notxml = !jQuery.isXMLDoc( elem ), // Whether we are setting (or getting) set = value !== undefined; // Try to normalize/fix the name name = notxml && jQuery.props[ name ] || name; // Only do all the following if this is a node (faster for style) // IE elem.getAttribute passes even for style if ( elem.tagName ) { // These attributes require special treatment var special = /href|src|style/.test( name ); // Safari mis-reports the default selected property of a hidden option // Accessing the parent's selectedIndex property fixes it if ( name == "selected" && elem.parentNode ) elem.parentNode.selectedIndex; // If applicable, access the attribute via the DOM 0 way if ( name in elem && notxml && !special ) { if ( set ){ // We can't allow the type property to be changed (since it causes problems in IE) if ( name == "type" && jQuery.nodeName( elem, "input" ) && elem.parentNode ) throw "type property can't be changed"; elem[ name ] = value; } // browsers index elements by id/name on forms, give priority to attributes. if( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) return elem.getAttributeNode( name ).nodeValue; // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ if ( name == "tabIndex" ) { var attributeNode = elem.getAttributeNode( "tabIndex" ); return attributeNode && attributeNode.specified ? attributeNode.value : elem.nodeName.match(/(button|input|object|select|textarea)/i) ? 0 : elem.nodeName.match(/^(a|area)$/i) && elem.href ? 0 : undefined; } return elem[ name ]; } if ( !jQuery.support.style && notxml && name == "style" ) return jQuery.attr( elem.style, "cssText", value ); if ( set ) // convert the value to a string (all browsers do this but IE) see #1070 elem.setAttribute( name, "" + value ); var attr = !jQuery.support.hrefNormalized && notxml && special // Some attributes require a special call on IE ? elem.getAttribute( name, 2 ) : elem.getAttribute( name ); // Non-existent attributes return null, we normalize to undefined return attr === null ? undefined : attr; } // elem is actually elem.style ... set the style // IE uses filters for opacity if ( !jQuery.support.opacity && name == "opacity" ) { if ( set ) { // IE has trouble with opacity if it does not have layout // Force it by setting the zoom level elem.zoom = 1; // Set the alpha filter to set the opacity elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) + (parseInt( value ) + '' == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")"); } return elem.filter && elem.filter.indexOf("opacity=") >= 0 ? (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) + '': ""; } name = name.replace(/-([a-z])/ig, function(all, letter){ return letter.toUpperCase(); }); if ( set ) elem[ name ] = value; return elem[ name ]; }, trim: function( text ) { /// <summary> /// Remove the whitespace from the beginning and end of a string. /// Part of JavaScript /// </summary> /// <returns type="String" /> /// <param name="text" type="String"> /// The string to trim. /// </param> return (text || "").replace( /^\s+|\s+$/g, "" ); }, makeArray: function( array ) { /// <summary> /// Turns anything into a true array. This is an internal method. /// </summary> /// <param name="array" type="Object">Anything to turn into an actual Array</param> /// <returns type="Array" /> /// <private /> var ret = []; if( array != null ){ var i = array.length; // The window, strings (and functions) also have 'length' if( i == null || typeof array === "string" || jQuery.isFunction(array) || array.setInterval ) ret[0] = array; else while( i ) ret[--i] = array[i]; } return ret; }, inArray: function( elem, array ) { /// <summary> /// Determines the index of the first parameter in the array. /// </summary> /// <param name="elem">The value to see if it exists in the array.</param> /// <param name="array" type="Array">The array to look through for the value</param> /// <returns type="Number" integer="true">The 0-based index of the item if it was found, otherwise -1.</returns> for ( var i = 0, length = array.length; i < length; i++ ) // Use === because on IE, window == document if ( array[ i ] === elem ) return i; return -1; }, merge: function( first, second ) { /// <summary> /// Merge two arrays together, removing all duplicates. /// The new array is: All the results from the first array, followed /// by the unique results from the second array. /// Part of JavaScript /// </summary> /// <returns type="Array" /> /// <param name="first" type="Array"> /// The first array to merge. /// </param> /// <param name="second" type="Array"> /// The second array to merge. /// </param> // We have to loop this way because IE & Opera overwrite the length // expando of getElementsByTagName var i = 0, elem, pos = first.length; // Also, we need to make sure that the correct elements are being returned // (IE returns comment nodes in a '*' query) if ( !jQuery.support.getAll ) { while ( (elem = second[ i++ ]) != null ) if ( elem.nodeType != 8 ) first[ pos++ ] = elem; } else while ( (elem = second[ i++ ]) != null ) first[ pos++ ] = elem; return first; }, unique: function( array ) { /// <summary> /// Removes all duplicate elements from an array of elements. /// </summary> /// <param name="array" type="Array&lt;Element&gt;">The array to translate</param> /// <returns type="Array&lt;Element&gt;">The array after translation.</returns> var ret = [], done = {}; try { for ( var i = 0, length = array.length; i < length; i++ ) { var id = jQuery.data( array[ i ] ); if ( !done[ id ] ) { done[ id ] = true; ret.push( array[ i ] ); } } } catch( e ) { ret = array; } return ret; }, grep: function( elems, callback, inv ) { /// <summary> /// Filter items out of an array, by using a filter function. /// The specified function will be passed two arguments: The /// current array item and the index of the item in the array. The /// function must return 'true' to keep the item in the array, /// false to remove it. /// }); /// Part of JavaScript /// </summary> /// <returns type="Array" /> /// <param name="elems" type="Array"> /// array The Array to find items in. /// </param> /// <param name="fn" type="Function"> /// The function to process each item against. /// </param> /// <param name="inv" type="Boolean"> /// Invert the selection - select the opposite of the function. /// </param> var ret = []; // Go through the array, only saving the items // that pass the validator function for ( var i = 0, length = elems.length; i < length; i++ ) if ( !inv != !callback( elems[ i ], i ) ) ret.push( elems[ i ] ); return ret; }, map: function( elems, callback ) { /// <summary> /// Translate all items in an array to another array of items. /// The translation function that is provided to this method is /// called for each item in the array and is passed one argument: /// The item to be translated. /// The function can then return the translated value, 'null' /// (to remove the item), or an array of values - which will /// be flattened into the full array. /// Part of JavaScript /// </summary> /// <returns type="Array" /> /// <param name="elems" type="Array"> /// array The Array to translate. /// </param> /// <param name="fn" type="Function"> /// The function to process each item against. /// </param> var ret = []; // Go through the array, translating each of the items to their // new value (or values). for ( var i = 0, length = elems.length; i < length; i++ ) { var value = callback( elems[ i ], i ); if ( value != null ) ret[ ret.length ] = value; } return ret.concat.apply( [], ret ); } }); // Use of jQuery.browser is deprecated. // It's included for backwards compatibility and plugins, // although they should work to migrate away. var userAgent = navigator.userAgent.toLowerCase(); // Figure out what browser is being used jQuery.browser = { version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1], safari: /webkit/.test( userAgent ), opera: /opera/.test( userAgent ), msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ), mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent ) }; // [vsdoc] The following section has been denormalized from original sources for IntelliSense. // jQuery.each({ // parent: function(elem){return elem.parentNode;}, // parents: function(elem){return jQuery.dir(elem,"parentNode");}, // next: function(elem){return jQuery.nth(elem,2,"nextSibling");}, // prev: function(elem){return jQuery.nth(elem,2,"previousSibling");}, // nextAll: function(elem){return jQuery.dir(elem,"nextSibling");}, // prevAll: function(elem){return jQuery.dir(elem,"previousSibling");}, // siblings: function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);}, // children: function(elem){return jQuery.sibling(elem.firstChild);}, // contents: function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);} // }, function(name, fn){ // jQuery.fn[ name ] = function( selector ) { // /// <summary> // /// Get a set of elements containing the unique parents of the matched // /// set of elements. // /// Can be filtered with an optional expressions. // /// Part of DOM/Traversing // /// </summary> // /// <param name="expr" type="String" optional="true"> // /// (optional) An expression to filter the parents with // /// </param> // /// <returns type="jQuery" /> // // var ret = jQuery.map( this, fn ); // // if ( selector && typeof selector == "string" ) // ret = jQuery.multiFilter( selector, ret ); // // return this.pushStack( jQuery.unique( ret ), name, selector ); // }; // }); jQuery.each({ parent: function(elem){return elem.parentNode;} }, function(name, fn){ jQuery.fn[ name ] = function( selector ) { /// <summary> /// Get a set of elements containing the unique parents of the matched /// set of elements. /// Can be filtered with an optional expressions. /// Part of DOM/Traversing /// </summary> /// <param name="expr" type="String" optional="true"> /// (optional) An expression to filter the parents with /// </param> /// <returns type="jQuery" /> var ret = jQuery.map( this, fn ); if ( selector && typeof selector == "string" ) ret = jQuery.multiFilter( selector, ret ); return this.pushStack( jQuery.unique( ret ), name, selector ); }; }); jQuery.each({ parents: function(elem){return jQuery.dir(elem,"parentNode");} }, function(name, fn){ jQuery.fn[ name ] = function( selector ) { /// <summary> /// Get a set of elements containing the unique ancestors of the matched /// set of elements (except for the root element). /// Can be filtered with an optional expressions. /// Part of DOM/Traversing /// </summary> /// <param name="expr" type="String" optional="true"> /// (optional) An expression to filter the ancestors with /// </param> /// <returns type="jQuery" /> var ret = jQuery.map( this, fn ); if ( selector && typeof selector == "string" ) ret = jQuery.multiFilter( selector, ret ); return this.pushStack( jQuery.unique( ret ), name, selector ); }; }); jQuery.each({ next: function(elem){return jQuery.nth(elem,2,"nextSibling");} }, function(name, fn){ jQuery.fn[ name ] = function( selector ) { /// <summary> /// Get a set of elements containing the unique next siblings of each of the /// matched set of elements. /// It only returns the very next sibling, not all next siblings. /// Can be filtered with an optional expressions. /// Part of DOM/Traversing /// </summary> /// <param name="expr" type="String" optional="true"> /// (optional) An expression to filter the next Elements with /// </param> /// <returns type="jQuery" /> var ret = jQuery.map( this, fn ); if ( selector && typeof selector == "string" ) ret = jQuery.multiFilter( selector, ret ); return this.pushStack( jQuery.unique( ret ), name, selector ); }; }); jQuery.each({ prev: function(elem){return jQuery.nth(elem,2,"previousSibling");} }, function(name, fn){ jQuery.fn[ name ] = function( selector ) { /// <summary> /// Get a set of elements containing the unique previous siblings of each of the /// matched set of elements. /// Can be filtered with an optional expressions. /// It only returns the immediately previous sibling, not all previous siblings. /// Part of DOM/Traversing /// </summary> /// <param name="expr" type="String" optional="true"> /// (optional) An expression to filter the previous Elements with /// </param> /// <returns type="jQuery" /> var ret = jQuery.map( this, fn ); if ( selector && typeof selector == "string" ) ret = jQuery.multiFilter( selector, ret ); return this.pushStack( jQuery.unique( ret ), name, selector ); }; }); jQuery.each({ nextAll: function(elem){return jQuery.dir(elem,"nextSibling");} }, function(name, fn){ jQuery.fn[name] = function(selector) { /// <summary> /// Finds all sibling elements after the current element. /// Can be filtered with an optional expressions. /// Part of DOM/Traversing /// </summary> /// <param name="expr" type="String" optional="true"> /// (optional) An expression to filter the next Elements with /// </param> /// <returns type="jQuery" /> var ret = jQuery.map( this, fn ); if ( selector && typeof selector == "string" ) ret = jQuery.multiFilter( selector, ret ); return this.pushStack( jQuery.unique( ret ), name, selector ); }; }); jQuery.each({ prevAll: function(elem){return jQuery.dir(elem,"previousSibling");} }, function(name, fn){ jQuery.fn[ name ] = function( selector ) { /// <summary> /// Finds all sibling elements before the current element. /// Can be filtered with an optional expressions. /// Part of DOM/Traversing /// </summary> /// <param name="expr" type="String" optional="true"> /// (optional) An expression to filter the previous Elements with /// </param> /// <returns type="jQuery" /> var ret = jQuery.map( this, fn ); if ( selector && typeof selector == "string" ) ret = jQuery.multiFilter( selector, ret ); return this.pushStack( jQuery.unique( ret ), name, selector ); }; }); jQuery.each({ siblings: function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);} }, function(name, fn){ jQuery.fn[ name ] = function( selector ) { /// <summary> /// Get a set of elements containing all of the unique siblings of each of the /// matched set of elements. /// Can be filtered with an optional expressions. /// Part of DOM/Traversing /// </summary> /// <param name="expr" type="String" optional="true"> /// (optional) An expression to filter the sibling Elements with /// </param> /// <returns type="jQuery" /> var ret = jQuery.map( this, fn ); if ( selector && typeof selector == "string" ) ret = jQuery.multiFilter( selector, ret ); return this.pushStack( jQuery.unique( ret ), name, selector ); }; }); jQuery.each({ children: function(elem){return jQuery.sibling(elem.firstChild);} }, function(name, fn){ jQuery.fn[ name ] = function( selector ) { /// <summary> /// Get a set of elements containing all of the unique children of each of the /// matched set of elements. /// Can be filtered with an optional expressions. /// Part of DOM/Traversing /// </summary> /// <param name="expr" type="String" optional="true"> /// (optional) An expression to filter the child Elements with /// </param> /// <returns type="jQuery" /> var ret = jQuery.map( this, fn ); if ( selector && typeof selector == "string" ) ret = jQuery.multiFilter( selector, ret ); return this.pushStack( jQuery.unique( ret ), name, selector ); }; }); jQuery.each({ contents: function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);} }, function(name, fn){ jQuery.fn[ name ] = function( selector ) { /// <summary>Finds all the child nodes inside the matched elements including text nodes, or the content document if the element is an iframe.</summary> /// <returns type="jQuery" /> var ret = jQuery.map( this, fn ); if ( selector && typeof selector == "string" ) ret = jQuery.multiFilter( selector, ret ); return this.pushStack( jQuery.unique( ret ), name, selector ); }; }); // [vsdoc] The following section has been denormalized from original sources for IntelliSense. // jQuery.each({ // appendTo: "append", // prependTo: "prepend", // insertBefore: "before", // insertAfter: "after", // replaceAll: "replaceWith" // }, function(name, original){ // jQuery.fn[ name ] = function() { // var args = arguments; // // return this.each(function(){ // for ( var i = 0, length = args.length; i < length; i++ ) // jQuery( args[ i ] )[ original ]( this ); // }); // }; // }); jQuery.fn.appendTo = function( selector ) { /// <summary> /// Append all of the matched elements to another, specified, set of elements. /// As of jQuery 1.3.2, returns all of the inserted elements. /// This operation is, essentially, the reverse of doing a regular /// $(A).append(B), in that instead of appending B to A, you're appending /// A to B. /// </summary> /// <param name="selector" type="Selector"> /// target to which the content will be appended. /// </param> /// <returns type="jQuery" /> var ret = [], insert = jQuery( selector ); for ( var i = 0, l = insert.length; i < l; i++ ) { var elems = (i > 0 ? this.clone(true) : this).get(); jQuery.fn[ "append" ].apply( jQuery(insert[i]), elems ); ret = ret.concat( elems ); } return this.pushStack( ret, "appendTo", selector ); }; jQuery.fn.prependTo = function( selector ) { /// <summary> /// Prepend all of the matched elements to another, specified, set of elements. /// As of jQuery 1.3.2, returns all of the inserted elements. /// This operation is, essentially, the reverse of doing a regular /// $(A).prepend(B), in that instead of prepending B to A, you're prepending /// A to B. /// </summary> /// <param name="selector" type="Selector"> /// target to which the content will be appended. /// </param> /// <returns type="jQuery" /> var ret = [], insert = jQuery( selector ); for ( var i = 0, l = insert.length; i < l; i++ ) { var elems = (i > 0 ? this.clone(true) : this).get(); jQuery.fn[ "prepend" ].apply( jQuery(insert[i]), elems ); ret = ret.concat( elems ); } return this.pushStack( ret, "prependTo", selector ); }; jQuery.fn.insertBefore = function( selector ) { /// <summary> /// Insert all of the matched elements before another, specified, set of elements. /// As of jQuery 1.3.2, returns all of the inserted elements. /// This operation is, essentially, the reverse of doing a regular /// $(A).before(B), in that instead of inserting B before A, you're inserting /// A before B. /// </summary> /// <param name="content" type="String"> /// Content after which the selected element(s) is inserted. /// </param> /// <returns type="jQuery" /> var ret = [], insert = jQuery( selector ); for ( var i = 0, l = insert.length; i < l; i++ ) { var elems = (i > 0 ? this.clone(true) : this).get(); jQuery.fn[ "before" ].apply( jQuery(insert[i]), elems ); ret = ret.concat( elems ); } return this.pushStack( ret, "insertBefore", selector ); }; jQuery.fn.insertAfter = function( selector ) { /// <summary> /// Insert all of the matched elements after another, specified, set of elements. /// As of jQuery 1.3.2, returns all of the inserted elements. /// This operation is, essentially, the reverse of doing a regular /// $(A).after(B), in that instead of inserting B after A, you're inserting /// A after B. /// </summary> /// <param name="content" type="String"> /// Content after which the selected element(s) is inserted. /// </param> /// <returns type="jQuery" /> var ret = [], insert = jQuery( selector ); for ( var i = 0, l = insert.length; i < l; i++ ) { var elems = (i > 0 ? this.clone(true) : this).get(); jQuery.fn[ "after" ].apply( jQuery(insert[i]), elems ); ret = ret.concat( elems ); } return this.pushStack( ret, "insertAfter", selector ); }; jQuery.fn.replaceAll = function( selector ) { /// <summary> /// Replaces the elements matched by the specified selector with the matched elements. /// As of jQuery 1.3.2, returns all of the inserted elements. /// </summary> /// <param name="selector" type="Selector">The elements to find and replace the matched elements with.</param> /// <returns type="jQuery" /> var ret = [], insert = jQuery( selector ); for ( var i = 0, l = insert.length; i < l; i++ ) { var elems = (i > 0 ? this.clone(true) : this).get(); jQuery.fn[ "replaceWith" ].apply( jQuery(insert[i]), elems ); ret = ret.concat( elems ); } return this.pushStack( ret, "replaceAll", selector ); }; // [vsdoc] The following section has been denormalized from original sources for IntelliSense. // jQuery.each({ // removeAttr: function( name ) { // jQuery.attr( this, name, "" ); // if (this.nodeType == 1) // this.removeAttribute( name ); // }, // // addClass: function( classNames ) { // jQuery.className.add( this, classNames ); // }, // // removeClass: function( classNames ) { // jQuery.className.remove( this, classNames ); // }, // // toggleClass: function( classNames, state ) { // if( typeof state !== "boolean" ) // state = !jQuery.className.has( this, classNames ); // jQuery.className[ state ? "add" : "remove" ]( this, classNames ); // }, // // remove: function( selector ) { // if ( !selector || jQuery.filter( selector, [ this ] ).length ) { // // Prevent memory leaks // jQuery( "*", this ).add([this]).each(function(){ // jQuery.event.remove(this); // jQuery.removeData(this); // }); // if (this.parentNode) // this.parentNode.removeChild( this ); // } // }, // // empty: function() { // // Remove element nodes and prevent memory leaks // jQuery( ">*", this ).remove(); // // // Remove any remaining nodes // while ( this.firstChild ) // this.removeChild( this.firstChild ); // } // }, function(name, fn){ // jQuery.fn[ name ] = function(){ // return this.each( fn, arguments ); // }; // }); jQuery.fn.removeAttr = function(){ /// <summary> /// Remove an attribute from each of the matched elements. /// Part of DOM/Attributes /// </summary> /// <param name="key" type="String"> /// name The name of the attribute to remove. /// </param> /// <returns type="jQuery" /> return this.each( function( name ) { jQuery.attr( this, name, "" ); if (this.nodeType == 1) this.removeAttribute( name ); }, arguments ); }; jQuery.fn.addClass = function(){ /// <summary> /// Adds the specified class(es) to each of the set of matched elements. /// Part of DOM/Attributes /// </summary> /// <param name="classNames" type="String"> /// lass One or more CSS classes to add to the elements /// </param> /// <returns type="jQuery" /> return this.each( function( classNames ) { jQuery.className.add( this, classNames ); }, arguments ); }; jQuery.fn.removeClass = function(){ /// <summary> /// Removes all or the specified class(es) from the set of matched elements. /// Part of DOM/Attributes /// </summary> /// <param name="cssClasses" type="String" optional="true"> /// (Optional) One or more CSS classes to remove from the elements /// </param> /// <returns type="jQuery" /> return this.each( function( classNames ) { jQuery.className.remove( this, classNames ); }, arguments ); }; jQuery.fn.toggleClass = function(){ /// <summary> /// Adds the specified class if it is not present, removes it if it is /// present. /// Part of DOM/Attributes /// </summary> /// <param name="cssClass" type="String"> /// A CSS class with which to toggle the elements /// </param> /// <returns type="jQuery" /> return this.each( function( classNames, state ) { if( typeof state !== "boolean" ) state = !jQuery.className.has( this, classNames ); jQuery.className[ state ? "add" : "remove" ]( this, classNames ); }, arguments ); }; jQuery.fn.remove = function(){ /// <summary> /// Removes all matched elements from the DOM. This does NOT remove them from the /// jQuery object, allowing you to use the matched elements further. /// Can be filtered with an optional expressions. /// Part of DOM/Manipulation /// </summary> /// <param name="expr" type="String" optional="true"> /// (optional) A jQuery expression to filter elements by. /// </param> /// <returns type="jQuery" /> return this.each( function( selector ) { if ( !selector || jQuery.filter( selector, [ this ] ).length ) { // Prevent memory leaks jQuery( "*", this ).add([this]).each(function(){ jQuery.event.remove(this); jQuery.removeData(this); }); if (this.parentNode) this.parentNode.removeChild( this ); } }, arguments ); }; jQuery.fn.empty = function(){ /// <summary> /// Removes all child nodes from the set of matched elements. /// Part of DOM/Manipulation /// </summary> /// <returns type="jQuery" /> return this.each( function() { // Remove element nodes and prevent memory leaks jQuery(this).children().remove(); // Remove any remaining nodes while ( this.firstChild ) this.removeChild( this.firstChild ); }, arguments ); }; // Helper function used by the dimensions and offset modules function num(elem, prop) { return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0; } var expando = "jQuery" + now(), uuid = 0, windowData = {}; jQuery.extend({ cache: {}, data: function( elem, name, data ) { elem = elem == window ? windowData : elem; var id = elem[ expando ]; // Compute a unique ID for the element if ( !id ) id = elem[ expando ] = ++uuid; // Only generate the data cache if we're // trying to access or manipulate it if ( name && !jQuery.cache[ id ] ) jQuery.cache[ id ] = {}; // Prevent overriding the named cache with undefined values if ( data !== undefined ) jQuery.cache[ id ][ name ] = data; // Return the named cache data, or the ID for the element return name ? jQuery.cache[ id ][ name ] : id; }, removeData: function( elem, name ) { elem = elem == window ? windowData : elem; var id = elem[ expando ]; // If we want to remove a specific section of the element's data if ( name ) { if ( jQuery.cache[ id ] ) { // Remove the section of cache data delete jQuery.cache[ id ][ name ]; // If we've removed all the data, remove the element's cache name = ""; for ( name in jQuery.cache[ id ] ) break; if ( !name ) jQuery.removeData( elem ); } // Otherwise, we want to remove all of the element's data } else { // Clean up the element expando try { delete elem[ expando ]; } catch(e){ // IE has trouble directly removing the expando // but it's ok with using removeAttribute if ( elem.removeAttribute ) elem.removeAttribute( expando ); } // Completely remove the data cache delete jQuery.cache[ id ]; } }, queue: function( elem, type, data ) { if ( elem ){ type = (type || "fx") + "queue"; var q = jQuery.data( elem, type ); if ( !q || jQuery.isArray(data) ) q = jQuery.data( elem, type, jQuery.makeArray(data) ); else if( data ) q.push( data ); } return q; }, dequeue: function( elem, type ){ var queue = jQuery.queue( elem, type ), fn = queue.shift(); if( !type || type === "fx" ) fn = queue[0]; if( fn !== undefined ) fn.call(elem); } }); jQuery.fn.extend({ data: function( key, value ){ var parts = key.split("."); parts[1] = parts[1] ? "." + parts[1] : ""; if ( value === undefined ) { var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); if ( data === undefined && this.length ) data = jQuery.data( this[0], key ); return data === undefined && parts[1] ? this.data( parts[0] ) : data; } else return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){ jQuery.data( this, key, value ); }); }, removeData: function( key ){ return this.each(function(){ jQuery.removeData( this, key ); }); }, queue: function(type, data){ /// <summary> /// 1: queue() - Returns a reference to the first element's queue (which is an array of functions). /// 2: queue(callback) - Adds a new function, to be executed, onto the end of the queue of all matched elements. /// 3: queue(queue) - Replaces the queue of all matched element with this new queue (the array of functions). /// </summary> /// <param name="type" type="Function">The function to add to the queue.</param> /// <returns type="jQuery" /> if ( typeof type !== "string" ) { data = type; type = "fx"; } if ( data === undefined ) return jQuery.queue( this[0], type ); return this.each(function(){ var queue = jQuery.queue( this, type, data ); if( type == "fx" && queue.length == 1 ) queue[0].call(this); }); }, dequeue: function(type){ /// <summary> /// Removes a queued function from the front of the queue and executes it. /// </summary> /// <param name="type" type="String" optional="true">The type of queue to access.</param> /// <returns type="jQuery" /> return this.each(function(){ jQuery.dequeue( this, type ); }); } });/*! * Sizzle CSS Selector Engine - v0.9.3 * Copyright 2009, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ (function(){ var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g, done = 0, toString = Object.prototype.toString; var Sizzle = function(selector, context, results, seed) { results = results || []; context = context || document; if ( context.nodeType !== 1 && context.nodeType !== 9 ) return []; if ( !selector || typeof selector !== "string" ) { return results; } var parts = [], m, set, checkSet, check, mode, extra, prune = true; // Reset the position of the chunker regexp (start from head) chunker.lastIndex = 0; while ( (m = chunker.exec(selector)) !== null ) { parts.push( m[1] ); if ( m[2] ) { extra = RegExp.rightContext; break; } } if ( parts.length > 1 && origPOS.exec( selector ) ) { if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { set = posProcess( parts[0] + parts[1], context ); } else { set = Expr.relative[ parts[0] ] ? [ context ] : Sizzle( parts.shift(), context ); while ( parts.length ) { selector = parts.shift(); if ( Expr.relative[ selector ] ) selector += parts.shift(); set = posProcess( selector, set ); } } } else { var ret = seed ? { expr: parts.pop(), set: makeArray(seed) } : Sizzle.find( parts.pop(), parts.length === 1 && context.parentNode ? context.parentNode : context, isXML(context) ); set = Sizzle.filter( ret.expr, ret.set ); if ( parts.length > 0 ) { checkSet = makeArray(set); } else { prune = false; } while ( parts.length ) { var cur = parts.pop(), pop = cur; if ( !Expr.relative[ cur ] ) { cur = ""; } else { pop = parts.pop(); } if ( pop == null ) { pop = context; } Expr.relative[ cur ]( checkSet, pop, isXML(context) ); } } if ( !checkSet ) { checkSet = set; } if ( !checkSet ) { throw "Syntax error, unrecognized expression: " + (cur || selector); } if ( toString.call(checkSet) === "[object Array]" ) { if ( !prune ) { results.push.apply( results, checkSet ); } else if ( context.nodeType === 1 ) { for ( var i = 0; checkSet[i] != null; i++ ) { if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i])) ) { results.push( set[i] ); } } } else { for ( var i = 0; checkSet[i] != null; i++ ) { if ( checkSet[i] && checkSet[i].nodeType === 1 ) { results.push( set[i] ); } } } } else { makeArray( checkSet, results ); } if ( extra ) { Sizzle( extra, context, results, seed ); if ( sortOrder ) { hasDuplicate = false; results.sort(sortOrder); if ( hasDuplicate ) { for ( var i = 1; i < results.length; i++ ) { if ( results[i] === results[i-1] ) { results.splice(i--, 1); } } } } } return results; }; Sizzle.matches = function(expr, set){ return Sizzle(expr, null, null, set); }; Sizzle.find = function(expr, context, isXML){ var set, match; if ( !expr ) { return []; } for ( var i = 0, l = Expr.order.length; i < l; i++ ) { var type = Expr.order[i], match; if ( (match = Expr.match[ type ].exec( expr )) ) { var left = RegExp.leftContext; if ( left.substr( left.length - 1 ) !== "\\" ) { match[1] = (match[1] || "").replace(/\\/g, ""); set = Expr.find[ type ]( match, context, isXML ); if ( set != null ) { expr = expr.replace( Expr.match[ type ], "" ); break; } } } } if ( !set ) { set = context.getElementsByTagName("*"); } return {set: set, expr: expr}; }; Sizzle.filter = function(expr, set, inplace, not){ var old = expr, result = [], curLoop = set, match, anyFound, isXMLFilter = set && set[0] && isXML(set[0]); while ( expr && set.length ) { for ( var type in Expr.filter ) { if ( (match = Expr.match[ type ].exec( expr )) != null ) { var filter = Expr.filter[ type ], found, item; anyFound = false; if ( curLoop == result ) { result = []; } if ( Expr.preFilter[ type ] ) { match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); if ( !match ) { anyFound = found = true; } else if ( match === true ) { continue; } } if ( match ) { for ( var i = 0; (item = curLoop[i]) != null; i++ ) { if ( item ) { found = filter( item, match, i, curLoop ); var pass = not ^ !!found; if ( inplace && found != null ) { if ( pass ) { anyFound = true; } else { curLoop[i] = false; } } else if ( pass ) { result.push( item ); anyFound = true; } } } } if ( found !== undefined ) { if ( !inplace ) { curLoop = result; } expr = expr.replace( Expr.match[ type ], "" ); if ( !anyFound ) { return []; } break; } } } // Improper expression if ( expr == old ) { if ( anyFound == null ) { throw "Syntax error, unrecognized expression: " + expr; } else { break; } } old = expr; } return curLoop; }; var Expr = Sizzle.selectors = { order: [ "ID", "NAME", "TAG" ], match: { ID: /#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/, CLASS: /\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/, NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/, ATTR: /\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/, TAG: /^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/, CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/, POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/, PSEUDO: /:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/ }, attrMap: { "class": "className", "for": "htmlFor" }, attrHandle: { href: function(elem){ return elem.getAttribute("href"); } }, relative: { "+": function(checkSet, part, isXML){ var isPartStr = typeof part === "string", isTag = isPartStr && !/\W/.test(part), isPartStrNotTag = isPartStr && !isTag; if ( isTag && !isXML ) { part = part.toUpperCase(); } for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { if ( (elem = checkSet[i]) ) { while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} checkSet[i] = isPartStrNotTag || elem && elem.nodeName === part ? elem || false : elem === part; } } if ( isPartStrNotTag ) { Sizzle.filter( part, checkSet, true ); } }, ">": function(checkSet, part, isXML){ var isPartStr = typeof part === "string"; if ( isPartStr && !/\W/.test(part) ) { part = isXML ? part : part.toUpperCase(); for ( var i = 0, l = checkSet.length; i < l; i++ ) { var elem = checkSet[i]; if ( elem ) { var parent = elem.parentNode; checkSet[i] = parent.nodeName === part ? parent : false; } } } else { for ( var i = 0, l = checkSet.length; i < l; i++ ) { var elem = checkSet[i]; if ( elem ) { checkSet[i] = isPartStr ? elem.parentNode : elem.parentNode === part; } } if ( isPartStr ) { Sizzle.filter( part, checkSet, true ); } } }, "": function(checkSet, part, isXML){ var doneName = done++, checkFn = dirCheck; if ( !part.match(/\W/) ) { var nodeCheck = part = isXML ? part : part.toUpperCase(); checkFn = dirNodeCheck; } checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML); }, "~": function(checkSet, part, isXML){ var doneName = done++, checkFn = dirCheck; if ( typeof part === "string" && !part.match(/\W/) ) { var nodeCheck = part = isXML ? part : part.toUpperCase(); checkFn = dirNodeCheck; } checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML); } }, find: { ID: function(match, context, isXML){ if ( typeof context.getElementById !== "undefined" && !isXML ) { var m = context.getElementById(match[1]); return m ? [m] : []; } }, NAME: function(match, context, isXML){ if ( typeof context.getElementsByName !== "undefined" ) { var ret = [], results = context.getElementsByName(match[1]); for ( var i = 0, l = results.length; i < l; i++ ) { if ( results[i].getAttribute("name") === match[1] ) { ret.push( results[i] ); } } return ret.length === 0 ? null : ret; } }, TAG: function(match, context){ return context.getElementsByTagName(match[1]); } }, preFilter: { CLASS: function(match, curLoop, inplace, result, not, isXML){ match = " " + match[1].replace(/\\/g, "") + " "; if ( isXML ) { return match; } for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { if ( elem ) { if ( not ^ (elem.className && (" " + elem.className + " ").indexOf(match) >= 0) ) { if ( !inplace ) result.push( elem ); } else if ( inplace ) { curLoop[i] = false; } } } return false; }, ID: function(match){ return match[1].replace(/\\/g, ""); }, TAG: function(match, curLoop){ for ( var i = 0; curLoop[i] === false; i++ ){} return curLoop[i] && isXML(curLoop[i]) ? match[1] : match[1].toUpperCase(); }, CHILD: function(match){ if ( match[1] == "nth" ) { // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec( match[2] == "even" && "2n" || match[2] == "odd" && "2n+1" || !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); // calculate the numbers (first)n+(last) including if they are negative match[2] = (test[1] + (test[2] || 1)) - 0; match[3] = test[3] - 0; } // TODO: Move to normal caching system match[0] = done++; return match; }, ATTR: function(match, curLoop, inplace, result, not, isXML){ var name = match[1].replace(/\\/g, ""); if ( !isXML && Expr.attrMap[name] ) { match[1] = Expr.attrMap[name]; } if ( match[2] === "~=" ) { match[4] = " " + match[4] + " "; } return match; }, PSEUDO: function(match, curLoop, inplace, result, not){ if ( match[1] === "not" ) { // If we're dealing with a complex expression, or a simple one if ( match[3].match(chunker).length > 1 || /^\w/.test(match[3]) ) { match[3] = Sizzle(match[3], null, null, curLoop); } else { var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); if ( !inplace ) { result.push.apply( result, ret ); } return false; } } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { return true; } return match; }, POS: function(match){ match.unshift( true ); return match; } }, filters: { enabled: function(elem){ return elem.disabled === false && elem.type !== "hidden"; }, disabled: function(elem){ return elem.disabled === true; }, checked: function(elem){ return elem.checked === true; }, selected: function(elem){ // Accessing this property makes selected-by-default // options in Safari work properly elem.parentNode.selectedIndex; return elem.selected === true; }, parent: function(elem){ return !!elem.firstChild; }, empty: function(elem){ return !elem.firstChild; }, has: function(elem, i, match){ return !!Sizzle( match[3], elem ).length; }, header: function(elem){ return /h\d/i.test( elem.nodeName ); }, text: function(elem){ return "text" === elem.type; }, radio: function(elem){ return "radio" === elem.type; }, checkbox: function(elem){ return "checkbox" === elem.type; }, file: function(elem){ return "file" === elem.type; }, password: function(elem){ return "password" === elem.type; }, submit: function(elem){ return "submit" === elem.type; }, image: function(elem){ return "image" === elem.type; }, reset: function(elem){ return "reset" === elem.type; }, button: function(elem){ return "button" === elem.type || elem.nodeName.toUpperCase() === "BUTTON"; }, input: function(elem){ return /input|select|textarea|button/i.test(elem.nodeName); } }, setFilters: { first: function(elem, i){ return i === 0; }, last: function(elem, i, match, array){ return i === array.length - 1; }, even: function(elem, i){ return i % 2 === 0; }, odd: function(elem, i){ return i % 2 === 1; }, lt: function(elem, i, match){ return i < match[3] - 0; }, gt: function(elem, i, match){ return i > match[3] - 0; }, nth: function(elem, i, match){ return match[3] - 0 == i; }, eq: function(elem, i, match){ return match[3] - 0 == i; } }, filter: { PSEUDO: function(elem, match, i, array){ var name = match[1], filter = Expr.filters[ name ]; if ( filter ) { return filter( elem, i, match, array ); } else if ( name === "contains" ) { return (elem.textContent || elem.innerText || "").indexOf(match[3]) >= 0; } else if ( name === "not" ) { var not = match[3]; for ( var i = 0, l = not.length; i < l; i++ ) { if ( not[i] === elem ) { return false; } } return true; } }, CHILD: function(elem, match){ var type = match[1], node = elem; switch (type) { case 'only': case 'first': while (node = node.previousSibling) { if ( node.nodeType === 1 ) return false; } if ( type == 'first') return true; node = elem; case 'last': while (node = node.nextSibling) { if ( node.nodeType === 1 ) return false; } return true; case 'nth': var first = match[2], last = match[3]; if ( first == 1 && last == 0 ) { return true; } var doneName = match[0], parent = elem.parentNode; if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) { var count = 0; for ( node = parent.firstChild; node; node = node.nextSibling ) { if ( node.nodeType === 1 ) { node.nodeIndex = ++count; } } parent.sizcache = doneName; } var diff = elem.nodeIndex - last; if ( first == 0 ) { return diff == 0; } else { return ( diff % first == 0 && diff / first >= 0 ); } } }, ID: function(elem, match){ return elem.nodeType === 1 && elem.getAttribute("id") === match; }, TAG: function(elem, match){ return (match === "*" && elem.nodeType === 1) || elem.nodeName === match; }, CLASS: function(elem, match){ return (" " + (elem.className || elem.getAttribute("class")) + " ") .indexOf( match ) > -1; }, ATTR: function(elem, match){ var name = match[1], result = Expr.attrHandle[ name ] ? Expr.attrHandle[ name ]( elem ) : elem[ name ] != null ? elem[ name ] : elem.getAttribute( name ), value = result + "", type = match[2], check = match[4]; return result == null ? type === "!=" : type === "=" ? value === check : type === "*=" ? value.indexOf(check) >= 0 : type === "~=" ? (" " + value + " ").indexOf(check) >= 0 : !check ? value && result !== false : type === "!=" ? value != check : type === "^=" ? value.indexOf(check) === 0 : type === "$=" ? value.substr(value.length - check.length) === check : type === "|=" ? value === check || value.substr(0, check.length + 1) === check + "-" : false; }, POS: function(elem, match, i, array){ var name = match[2], filter = Expr.setFilters[ name ]; if ( filter ) { return filter( elem, i, match, array ); } } } }; var origPOS = Expr.match.POS; for ( var type in Expr.match ) { Expr.match[ type ] = RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source ); } var makeArray = function(array, results) { array = Array.prototype.slice.call( array ); if ( results ) { results.push.apply( results, array ); return results; } return array; }; // Perform a simple check to determine if the browser is capable of // converting a NodeList to an array using builtin methods. try { Array.prototype.slice.call( document.documentElement.childNodes ); // Provide a fallback method if it does not work } catch(e){ makeArray = function(array, results) { var ret = results || []; if ( toString.call(array) === "[object Array]" ) { Array.prototype.push.apply( ret, array ); } else { if ( typeof array.length === "number" ) { for ( var i = 0, l = array.length; i < l; i++ ) { ret.push( array[i] ); } } else { for ( var i = 0; array[i]; i++ ) { ret.push( array[i] ); } } } return ret; }; } var sortOrder; if ( document.documentElement.compareDocumentPosition ) { sortOrder = function( a, b ) { var ret = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1; if ( ret === 0 ) { hasDuplicate = true; } return ret; }; } else if ( "sourceIndex" in document.documentElement ) { sortOrder = function( a, b ) { var ret = a.sourceIndex - b.sourceIndex; if ( ret === 0 ) { hasDuplicate = true; } return ret; }; } else if ( document.createRange ) { sortOrder = function( a, b ) { var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange(); aRange.selectNode(a); aRange.collapse(true); bRange.selectNode(b); bRange.collapse(true); var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange); if ( ret === 0 ) { hasDuplicate = true; } return ret; }; } // [vsdoc] The following function has been modified for IntelliSense. // Check to see if the browser returns elements by name when // querying by getElementById (and provide a workaround) (function(){ // We're going to inject a fake input element with a specified name ////var form = document.createElement("form"), //// id = "script" + (new Date).getTime(); ////form.innerHTML = "<input name='" + id + "'/>"; // Inject it into the root element, check its status, and remove it quickly ////var root = document.documentElement; ////root.insertBefore( form, root.firstChild ); // The workaround has to do additional checks after a getElementById // Which slows things down for other browsers (hence the branching) ////if ( !!document.getElementById( id ) ) { Expr.find.ID = function(match, context, isXML){ if ( typeof context.getElementById !== "undefined" && !isXML ) { var m = context.getElementById(match[1]); return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : []; } }; Expr.filter.ID = function(elem, match){ var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); return elem.nodeType === 1 && node && node.nodeValue === match; }; ////} ////root.removeChild( form ); })(); // [vsdoc] The following function has been modified for IntelliSense. (function(){ // Check to see if the browser returns only elements // when doing getElementsByTagName("*") // Create a fake element ////var div = document.createElement("div"); ////div.appendChild( document.createComment("") ); // Make sure no comments are found ////if ( div.getElementsByTagName("*").length > 0 ) { Expr.find.TAG = function(match, context){ var results = context.getElementsByTagName(match[1]); // Filter out possible comments if ( match[1] === "*" ) { var tmp = []; for ( var i = 0; results[i]; i++ ) { if ( results[i].nodeType === 1 ) { tmp.push( results[i] ); } } results = tmp; } return results; }; ////} // Check to see if an attribute returns normalized href attributes ////div.innerHTML = "<a href='#'></a>"; ////if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && //// div.firstChild.getAttribute("href") !== "#" ) { Expr.attrHandle.href = function(elem){ return elem.getAttribute("href", 2); }; ////} })(); if ( document.querySelectorAll ) (function(){ var oldSizzle = Sizzle, div = document.createElement("div"); div.innerHTML = "<p class='TEST'></p>"; // Safari can't handle uppercase or unicode characters when // in quirks mode. if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { return; } Sizzle = function(query, context, extra, seed){ context = context || document; // Only use querySelectorAll on non-XML documents // (ID selectors don't work in non-HTML documents) if ( !seed && context.nodeType === 9 && !isXML(context) ) { try { return makeArray( context.querySelectorAll(query), extra ); } catch(e){} } return oldSizzle(query, context, extra, seed); }; Sizzle.find = oldSizzle.find; Sizzle.filter = oldSizzle.filter; Sizzle.selectors = oldSizzle.selectors; Sizzle.matches = oldSizzle.matches; })(); if ( document.getElementsByClassName && document.documentElement.getElementsByClassName ) (function(){ var div = document.createElement("div"); div.innerHTML = "<div class='test e'></div><div class='test'></div>"; // Opera can't find a second classname (in 9.6) if ( div.getElementsByClassName("e").length === 0 ) return; // Safari caches class attributes, doesn't catch changes (in 3.2) div.lastChild.className = "e"; if ( div.getElementsByClassName("e").length === 1 ) return; Expr.order.splice(1, 0, "CLASS"); Expr.find.CLASS = function(match, context, isXML) { if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { return context.getElementsByClassName(match[1]); } }; })(); function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { var sibDir = dir == "previousSibling" && !isXML; for ( var i = 0, l = checkSet.length; i < l; i++ ) { var elem = checkSet[i]; if ( elem ) { if ( sibDir && elem.nodeType === 1 ){ elem.sizcache = doneName; elem.sizset = i; } elem = elem[dir]; var match = false; while ( elem ) { if ( elem.sizcache === doneName ) { match = checkSet[elem.sizset]; break; } if ( elem.nodeType === 1 && !isXML ){ elem.sizcache = doneName; elem.sizset = i; } if ( elem.nodeName === cur ) { match = elem; break; } elem = elem[dir]; } checkSet[i] = match; } } } function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { var sibDir = dir == "previousSibling" && !isXML; for ( var i = 0, l = checkSet.length; i < l; i++ ) { var elem = checkSet[i]; if ( elem ) { if ( sibDir && elem.nodeType === 1 ) { elem.sizcache = doneName; elem.sizset = i; } elem = elem[dir]; var match = false; while ( elem ) { if ( elem.sizcache === doneName ) { match = checkSet[elem.sizset]; break; } if ( elem.nodeType === 1 ) { if ( !isXML ) { elem.sizcache = doneName; elem.sizset = i; } if ( typeof cur !== "string" ) { if ( elem === cur ) { match = true; break; } } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { match = elem; break; } } elem = elem[dir]; } checkSet[i] = match; } } } var contains = document.compareDocumentPosition ? function(a, b){ return a.compareDocumentPosition(b) & 16; } : function(a, b){ return a !== b && (a.contains ? a.contains(b) : true); }; var isXML = function(elem){ return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" || !!elem.ownerDocument && isXML( elem.ownerDocument ); }; var posProcess = function(selector, context){ var tmpSet = [], later = "", match, root = context.nodeType ? [context] : context; // Position selectors must be done after the filter // And so must :not(positional) so we move all PSEUDOs to the end while ( (match = Expr.match.PSEUDO.exec( selector )) ) { later += match[0]; selector = selector.replace( Expr.match.PSEUDO, "" ); } selector = Expr.relative[selector] ? selector + "*" : selector; for ( var i = 0, l = root.length; i < l; i++ ) { Sizzle( selector, root[i], tmpSet ); } return Sizzle.filter( later, tmpSet ); }; // EXPOSE jQuery.find = Sizzle; jQuery.filter = Sizzle.filter; jQuery.expr = Sizzle.selectors; jQuery.expr[":"] = jQuery.expr.filters; Sizzle.selectors.filters.hidden = function(elem){ return elem.offsetWidth === 0 || elem.offsetHeight === 0; }; Sizzle.selectors.filters.visible = function(elem){ return elem.offsetWidth > 0 || elem.offsetHeight > 0; }; Sizzle.selectors.filters.animated = function(elem){ return jQuery.grep(jQuery.timers, function(fn){ return elem === fn.elem; }).length; }; jQuery.multiFilter = function( expr, elems, not ) { /// <summary> /// This member is internal only. /// </summary> /// <private /> if ( not ) { expr = ":not(" + expr + ")"; } return Sizzle.matches(expr, elems); }; jQuery.dir = function( elem, dir ){ /// <summary> /// This member is internal only. /// </summary> /// <private /> // This member is not documented in the jQuery API: http://docs.jquery.com/Special:Search?ns0=1&search=dir var matched = [], cur = elem[dir]; while ( cur && cur != document ) { if ( cur.nodeType == 1 ) matched.push( cur ); cur = cur[dir]; } return matched; }; jQuery.nth = function(cur, result, dir, elem){ /// <summary> /// This member is internal only. /// </summary> /// <private /> // This member is not documented in the jQuery API: http://docs.jquery.com/Special:Search?ns0=1&search=nth result = result || 1; var num = 0; for ( ; cur; cur = cur[dir] ) if ( cur.nodeType == 1 && ++num == result ) break; return cur; }; jQuery.sibling = function(n, elem){ /// <summary> /// This member is internal only. /// </summary> /// <private /> // This member is not documented in the jQuery API: http://docs.jquery.com/Special:Search?ns0=1&search=nth var r = []; for ( ; n; n = n.nextSibling ) { if ( n.nodeType == 1 && n != elem ) r.push( n ); } return r; }; return; window.Sizzle = Sizzle; })(); /* * A number of helper functions used for managing events. * Many of the ideas behind this code originated from * Dean Edwards' addEvent library. */ jQuery.event = { // Bind an event to an element // Original by Dean Edwards add: function(elem, types, handler, data) { /// <summary> /// This method is internal. /// </summary> /// <private /> if ( elem.nodeType == 3 || elem.nodeType == 8 ) return; // For whatever reason, IE has trouble passing the window object // around, causing it to be cloned in the process if ( elem.setInterval && elem != window ) elem = window; // Make sure that the function being executed has a unique ID if ( !handler.guid ) handler.guid = this.guid++; // if data is passed, bind to handler if ( data !== undefined ) { // Create temporary function pointer to original handler var fn = handler; // Create unique handler function, wrapped around original handler handler = this.proxy( fn ); // Store data in unique handler handler.data = data; } // Init the element's event structure var events = jQuery.data(elem, "events") || jQuery.data(elem, "events", {}), handle = jQuery.data(elem, "handle") || jQuery.data(elem, "handle", function(){ // Handle the second event of a trigger and when // an event is called after a page has unloaded return typeof jQuery !== "undefined" && !jQuery.event.triggered ? jQuery.event.handle.apply(arguments.callee.elem, arguments) : undefined; }); // Add elem as a property of the handle function // This is to prevent a memory leak with non-native // event in IE. handle.elem = elem; // Handle multiple events separated by a space // jQuery(...).bind("mouseover mouseout", fn); jQuery.each(types.split(/\s+/), function(index, type) { // Namespaced event handlers var namespaces = type.split("."); type = namespaces.shift(); handler.type = namespaces.slice().sort().join("."); // Get the current list of functions bound to this event var handlers = events[type]; if ( jQuery.event.specialAll[type] ) jQuery.event.specialAll[type].setup.call(elem, data, namespaces); // Init the event handler queue if (!handlers) { handlers = events[type] = {}; // Check for a special event handler // Only use addEventListener/attachEvent if the special // events handler returns false if ( !jQuery.event.special[type] || jQuery.event.special[type].setup.call(elem, data, namespaces) === false ) { // Bind the global event handler to the element if (elem.addEventListener) elem.addEventListener(type, handle, false); else if (elem.attachEvent) elem.attachEvent("on" + type, handle); } } // Add the function to the element's handler list handlers[handler.guid] = handler; // Keep track of which events have been used, for global triggering jQuery.event.global[type] = true; }); // Nullify elem to prevent memory leaks in IE elem = null; }, guid: 1, global: {}, // Detach an event or set of events from an element remove: function(elem, types, handler) { /// <summary> /// This method is internal. /// </summary> /// <private /> // don't do events on text and comment nodes if ( elem.nodeType == 3 || elem.nodeType == 8 ) return; var events = jQuery.data(elem, "events"), ret, index; if ( events ) { // Unbind all events for the element if ( types === undefined || (typeof types === "string" && types.charAt(0) == ".") ) for ( var type in events ) this.remove( elem, type + (types || "") ); else { // types is actually an event object here if ( types.type ) { handler = types.handler; types = types.type; } // Handle multiple events seperated by a space // jQuery(...).unbind("mouseover mouseout", fn); jQuery.each(types.split(/\s+/), function(index, type){ // Namespaced event handlers var namespaces = type.split("."); type = namespaces.shift(); var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)"); if ( events[type] ) { // remove the given handler for the given type if ( handler ) delete events[type][handler.guid]; // remove all handlers for the given type else for ( var handle in events[type] ) // Handle the removal of namespaced events if ( namespace.test(events[type][handle].type) ) delete events[type][handle]; if ( jQuery.event.specialAll[type] ) jQuery.event.specialAll[type].teardown.call(elem, namespaces); // remove generic event handler if no more handlers exist for ( ret in events[type] ) break; if ( !ret ) { if ( !jQuery.event.special[type] || jQuery.event.special[type].teardown.call(elem, namespaces) === false ) { if (elem.removeEventListener) elem.removeEventListener(type, jQuery.data(elem, "handle"), false); else if (elem.detachEvent) elem.detachEvent("on" + type, jQuery.data(elem, "handle")); } ret = null; delete events[type]; } } }); } // Remove the expando if it's no longer used for ( ret in events ) break; if ( !ret ) { var handle = jQuery.data( elem, "handle" ); if ( handle ) handle.elem = null; jQuery.removeData( elem, "events" ); jQuery.removeData( elem, "handle" ); } } }, // bubbling is internal trigger: function( event, data, elem, bubbling ) { /// <summary> /// This method is internal. /// </summary> /// <private /> // Event object or event type var type = event.type || event; if( !bubbling ){ event = typeof event === "object" ? // jQuery.Event object event[expando] ? event : // Object literal jQuery.extend( jQuery.Event(type), event ) : // Just the event type (string) jQuery.Event(type); if ( type.indexOf("!") >= 0 ) { event.type = type = type.slice(0, -1); event.exclusive = true; } // Handle a global trigger if ( !elem ) { // Don't bubble custom events when global (to avoid too much overhead) event.stopPropagation(); // Only trigger if we've ever bound an event for it if ( this.global[type] ) jQuery.each( jQuery.cache, function(){ if ( this.events && this.events[type] ) jQuery.event.trigger( event, data, this.handle.elem ); }); } // Handle triggering a single element // don't do events on text and comment nodes if ( !elem || elem.nodeType == 3 || elem.nodeType == 8 ) return undefined; // Clean up in case it is reused event.result = undefined; event.target = elem; // Clone the incoming data, if any data = jQuery.makeArray(data); data.unshift( event ); } event.currentTarget = elem; // Trigger the event, it is assumed that "handle" is a function var handle = jQuery.data(elem, "handle"); if ( handle ) handle.apply( elem, data ); // Handle triggering native .onfoo handlers (and on links since we don't call .click() for links) if ( (!elem[type] || (jQuery.nodeName(elem, 'a') && type == "click")) && elem["on"+type] && elem["on"+type].apply( elem, data ) === false ) event.result = false; // Trigger the native events (except for clicks on links) if ( !bubbling && elem[type] && !event.isDefaultPrevented() && !(jQuery.nodeName(elem, 'a') && type == "click") ) { this.triggered = true; try { elem[ type ](); // prevent IE from throwing an error for some hidden elements } catch (e) {} } this.triggered = false; if ( !event.isPropagationStopped() ) { var parent = elem.parentNode || elem.ownerDocument; if ( parent ) jQuery.event.trigger(event, data, parent, true); } }, handle: function(event) { /// <summary> /// This method is internal. /// </summary> /// <private /> // returned undefined or false var all, handlers; event = arguments[0] = jQuery.event.fix( event || window.event ); event.currentTarget = this; // Namespaced event handlers var namespaces = event.type.split("."); event.type = namespaces.shift(); // Cache this now, all = true means, any handler all = !namespaces.length && !event.exclusive; var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)"); handlers = ( jQuery.data(this, "events") || {} )[event.type]; for ( var j in handlers ) { var handler = handlers[j]; // Filter the functions by class if ( all || namespace.test(handler.type) ) { // Pass in a reference to the handler function itself // So that we can later remove it event.handler = handler; event.data = handler.data; var ret = handler.apply(this, arguments); if( ret !== undefined ){ event.result = ret; if ( ret === false ) { event.preventDefault(); event.stopPropagation(); } } if( event.isImmediatePropagationStopped() ) break; } } }, props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), fix: function(event) { /// <summary> /// This method is internal. /// </summary> /// <private /> if ( event[expando] ) return event; // store a copy of the original event object // and "clone" to set read-only properties var originalEvent = event; event = jQuery.Event( originalEvent ); for ( var i = this.props.length, prop; i; ){ prop = this.props[ --i ]; event[ prop ] = originalEvent[ prop ]; } // Fix target property, if necessary if ( !event.target ) event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either // check if target is a textnode (safari) if ( event.target.nodeType == 3 ) event.target = event.target.parentNode; // Add relatedTarget, if necessary if ( !event.relatedTarget && event.fromElement ) event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement; // Calculate pageX/Y if missing and clientX/Y available if ( event.pageX == null && event.clientX != null ) { var doc = document.documentElement, body = document.body; event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0); event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0); } // Add which for key events if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) ) event.which = event.charCode || event.keyCode; // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) if ( !event.metaKey && event.ctrlKey ) event.metaKey = event.ctrlKey; // Add which for click: 1 == left; 2 == middle; 3 == right // Note: button is not normalized, so don't use it if ( !event.which && event.button ) event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); return event; }, proxy: function( fn, proxy ){ /// <summary> /// This method is internal. /// </summary> /// <private /> proxy = proxy || function(){ return fn.apply(this, arguments); }; // Set the guid of unique handler to the same of original handler, so it can be removed proxy.guid = fn.guid = fn.guid || proxy.guid || this.guid++; // So proxy can be declared as an argument return proxy; }, special: { ready: { /// <summary> /// This method is internal. /// </summary> /// <private /> // Make sure the ready event is setup setup: bindReady, teardown: function() {} } }, specialAll: { live: { setup: function( selector, namespaces ){ jQuery.event.add( this, namespaces[0], liveHandler ); }, teardown: function( namespaces ){ if ( namespaces.length ) { var remove = 0, name = RegExp("(^|\\.)" + namespaces[0] + "(\\.|$)"); jQuery.each( (jQuery.data(this, "events").live || {}), function(){ if ( name.test(this.type) ) remove++; }); if ( remove < 1 ) jQuery.event.remove( this, namespaces[0], liveHandler ); } } } } }; jQuery.Event = function( src ){ // Allow instantiation without the 'new' keyword if( !this.preventDefault ) return new jQuery.Event(src); // Event object if( src && src.type ){ this.originalEvent = src; this.type = src.type; // Event type }else this.type = src; // timeStamp is buggy for some events on Firefox(#3843) // So we won't rely on the native value this.timeStamp = now(); // Mark it as fixed this[expando] = true; }; function returnFalse(){ return false; } function returnTrue(){ return true; } // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html jQuery.Event.prototype = { preventDefault: function() { this.isDefaultPrevented = returnTrue; var e = this.originalEvent; if( !e ) return; // if preventDefault exists run it on the original event if (e.preventDefault) e.preventDefault(); // otherwise set the returnValue property of the original event to false (IE) e.returnValue = false; }, stopPropagation: function() { this.isPropagationStopped = returnTrue; var e = this.originalEvent; if( !e ) return; // if stopPropagation exists run it on the original event if (e.stopPropagation) e.stopPropagation(); // otherwise set the cancelBubble property of the original event to true (IE) e.cancelBubble = true; }, stopImmediatePropagation:function(){ this.isImmediatePropagationStopped = returnTrue; this.stopPropagation(); }, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse }; // Checks if an event happened on an element within another element // Used in jQuery.event.special.mouseenter and mouseleave handlers var withinElement = function(event) { // Check if mouse(over|out) are still within the same parent element var parent = event.relatedTarget; // Traverse up the tree while ( parent && parent != this ) try { parent = parent.parentNode; } catch(e) { parent = this; } if( parent != this ){ // set the correct event type event.type = event.data; // handle event if we actually just moused on to a non sub-element jQuery.event.handle.apply( this, arguments ); } }; jQuery.each({ mouseover: 'mouseenter', mouseout: 'mouseleave' }, function( orig, fix ){ jQuery.event.special[ fix ] = { setup: function(){ /// <summary> /// This method is internal. /// </summary> /// <private /> jQuery.event.add( this, orig, withinElement, fix ); }, teardown: function(){ /// <summary> /// This method is internal. /// </summary> /// <private /> jQuery.event.remove( this, orig, withinElement ); } }; }); jQuery.fn.extend({ bind: function( type, data, fn ) { /// <summary> /// Binds a handler to one or more events for each matched element. Can also bind custom events. /// </summary> /// <param name="type" type="String">One or more event types separated by a space. Built-in event type values are: blur, focus, load, resize, scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, error .</param> /// <param name="data" optional="true" type="Object">Additional data passed to the event handler as event.data</param> /// <param name="fn" type="Function">A function to bind to the event on each of the set of matched elements. function callback(eventObject) such that this corresponds to the dom element.</param> return type == "unload" ? this.one(type, data, fn) : this.each(function(){ jQuery.event.add( this, type, fn || data, fn && data ); }); }, one: function( type, data, fn ) { /// <summary> /// Binds a handler to one or more events to be executed exactly once for each matched element. /// </summary> /// <param name="type" type="String">One or more event types separated by a space. Built-in event type values are: blur, focus, load, resize, scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, error .</param> /// <param name="data" optional="true" type="Object">Additional data passed to the event handler as event.data</param> /// <param name="fn" type="Function">A function to bind to the event on each of the set of matched elements. function callback(eventObject) such that this corresponds to the dom element.</param> var one = jQuery.event.proxy( fn || data, function(event) { jQuery(this).unbind(event, one); return (fn || data).apply( this, arguments ); }); return this.each(function(){ jQuery.event.add( this, type, one, fn && data); }); }, unbind: function( type, fn ) { /// <summary> /// Unbinds a handler from one or more events for each matched element. /// </summary> /// <param name="type" type="String">One or more event types separated by a space. Built-in event type values are: blur, focus, load, resize, scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, error .</param> /// <param name="fn" type="Function">A function to bind to the event on each of the set of matched elements. function callback(eventObject) such that this corresponds to the dom element.</param> return this.each(function(){ jQuery.event.remove( this, type, fn ); }); }, trigger: function( type, data ) { /// <summary> /// Triggers a type of event on every matched element. /// </summary> /// <param name="type" type="String">One or more event types separated by a space. Built-in event type values are: blur, focus, load, resize, scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, error .</param> /// <param name="data" optional="true" type="Array">Additional data passed to the event handler as additional arguments.</param> /// <param name="fn" type="Function">This parameter is undocumented.</param> return this.each(function(){ jQuery.event.trigger( type, data, this ); }); }, triggerHandler: function( type, data ) { /// <summary> /// Triggers all bound event handlers on an element for a specific event type without executing the browser's default actions. /// </summary> /// <param name="type" type="String">One or more event types separated by a space. Built-in event type values are: blur, focus, load, resize, scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, error .</param> /// <param name="data" optional="true" type="Array">Additional data passed to the event handler as additional arguments.</param> /// <param name="fn" type="Function">This parameter is undocumented.</param> if( this[0] ){ var event = jQuery.Event(type); event.preventDefault(); event.stopPropagation(); jQuery.event.trigger( event, data, this[0] ); return event.result; } }, toggle: function( fn ) { /// <summary> /// Toggles among two or more function calls every other click. /// </summary> /// <param name="fn" type="Function">The functions among which to toggle execution</param> // Save reference to arguments for access in closure var args = arguments, i = 1; // link all the functions, so any of them can unbind this click handler while( i < args.length ) jQuery.event.proxy( fn, args[i++] ); return this.click( jQuery.event.proxy( fn, function(event) { // Figure out which function to execute this.lastToggle = ( this.lastToggle || 0 ) % i; // Make sure that clicks stop event.preventDefault(); // and execute the function return args[ this.lastToggle++ ].apply( this, arguments ) || false; })); }, hover: function(fnOver, fnOut) { /// <summary> /// Simulates hovering (moving the mouse on or off of an object). /// </summary> /// <param name="fnOver" type="Function">The function to fire when the mouse is moved over a matched element.</param> /// <param name="fnOut" type="Function">The function to fire when the mouse is moved off of a matched element.</param> return this.mouseenter(fnOver).mouseleave(fnOut); }, ready: function(fn) { /// <summary> /// Binds a function to be executed whenever the DOM is ready to be traversed and manipulated. /// </summary> /// <param name="fn" type="Function">The function to be executed when the DOM is ready.</param> // Attach the listeners bindReady(); // If the DOM is already ready if ( jQuery.isReady ) // Execute the function immediately fn.call( document, jQuery ); // Otherwise, remember the function for later else // Add the function to the wait list jQuery.readyList.push( fn ); return this; }, live: function( type, fn ){ /// <summary> /// Binds a handler to an event (like click) for all current - and future - matched element. Can also bind custom events. /// </summary> /// <param name="type" type="String">An event type</param> /// <param name="fn" type="Function">A function to bind to the event on each of the set of matched elements</param> var proxy = jQuery.event.proxy( fn ); proxy.guid += this.selector + type; jQuery(document).bind( liveConvert(type, this.selector), this.selector, proxy ); return this; }, die: function( type, fn ){ /// <summary> /// This does the opposite of live, it removes a bound live event. /// You can also unbind custom events registered with live. /// If the type is provided, all bound live events of that type are removed. /// If the function that was passed to live is provided as the second argument, only that specific event handler is removed. /// </summary> /// <param name="type" type="String">A live event type to unbind.</param> /// <param name="fn" type="Function">A function to unbind from the event on each of the set of matched elements.</param> jQuery(document).unbind( liveConvert(type, this.selector), fn ? { guid: fn.guid + this.selector + type } : null ); return this; } }); function liveHandler( event ){ var check = RegExp("(^|\\.)" + event.type + "(\\.|$)"), stop = true, elems = []; jQuery.each(jQuery.data(this, "events").live || [], function(i, fn){ if ( check.test(fn.type) ) { var elem = jQuery(event.target).closest(fn.data)[0]; if ( elem ) elems.push({ elem: elem, fn: fn }); } }); elems.sort(function(a,b) { return jQuery.data(a.elem, "closest") - jQuery.data(b.elem, "closest"); }); jQuery.each(elems, function(){ if ( this.fn.call(this.elem, event, this.fn.data) === false ) return (stop = false); }); return stop; } function liveConvert(type, selector){ return ["live", type, selector.replace(/\./g, "`").replace(/ /g, "|")].join("."); } jQuery.extend({ isReady: false, readyList: [], // Handle when the DOM is ready ready: function() { /// <summary> /// This method is internal. /// </summary> /// <private /> // Make sure that the DOM is not already loaded if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; // If there are functions bound, to execute if ( jQuery.readyList ) { // Execute all of them jQuery.each( jQuery.readyList, function(){ this.call( document, jQuery ); }); // Reset the list of functions jQuery.readyList = null; } // Trigger any bound ready events jQuery(document).triggerHandler("ready"); } } }); var readyBound = false; function bindReady(){ if ( readyBound ) return; readyBound = true; // Mozilla, Opera and webkit nightlies currently support this event if ( document.addEventListener ) { // Use the handy event callback document.addEventListener( "DOMContentLoaded", function(){ document.removeEventListener( "DOMContentLoaded", arguments.callee, false ); jQuery.ready(); }, false ); // If IE event model is used } else if ( document.attachEvent ) { // ensure firing before onload, // maybe late but safe also for iframes document.attachEvent("onreadystatechange", function(){ if ( document.readyState === "complete" ) { document.detachEvent( "onreadystatechange", arguments.callee ); jQuery.ready(); } }); // If IE and not an iframe // continually check to see if the document is ready if ( document.documentElement.doScroll && window == window.top ) (function(){ if ( jQuery.isReady ) return; try { // If IE is used, use the trick by Diego Perini // http://javascript.nwbox.com/IEContentLoaded/ document.documentElement.doScroll("left"); } catch( error ) { setTimeout( arguments.callee, 0 ); return; } // and execute any waiting functions jQuery.ready(); })(); } // A fallback to window.onload, that will always work jQuery.event.add( window, "load", jQuery.ready ); } // [vsdoc] The following section has been denormalized from original sources for IntelliSense. jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave," + "change,select,submit,keydown,keypress,keyup,error").split(","), function(i, name){ // Handle event binding jQuery.fn[name] = function(fn){ return fn ? this.bind(name, fn) : this.trigger(name); }; }); jQuery.fn["blur"] = function(fn) { /// <summary> /// 1: blur() - Triggers the blur event of each matched element. /// 2: blur(fn) - Binds a function to the blur event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("blur", fn) : this.trigger(name); }; jQuery.fn["focus"] = function(fn) { /// <summary> /// 1: focus() - Triggers the focus event of each matched element. /// 2: focus(fn) - Binds a function to the focus event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("focus", fn) : this.trigger(name); }; jQuery.fn["load"] = function(fn) { /// <summary> /// 1: load() - Triggers the load event of each matched element. /// 2: load(fn) - Binds a function to the load event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("load", fn) : this.trigger(name); }; jQuery.fn["resize"] = function(fn) { /// <summary> /// 1: resize() - Triggers the resize event of each matched element. /// 2: resize(fn) - Binds a function to the resize event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("resize", fn) : this.trigger(name); }; jQuery.fn["scroll"] = function(fn) { /// <summary> /// 1: scroll() - Triggers the scroll event of each matched element. /// 2: scroll(fn) - Binds a function to the scroll event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("scroll", fn) : this.trigger(name); }; jQuery.fn["unload"] = function(fn) { /// <summary> /// 1: unload() - Triggers the unload event of each matched element. /// 2: unload(fn) - Binds a function to the unload event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("unload", fn) : this.trigger(name); }; jQuery.fn["click"] = function(fn) { /// <summary> /// 1: click() - Triggers the click event of each matched element. /// 2: click(fn) - Binds a function to the click event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("click", fn) : this.trigger(name); }; jQuery.fn["dblclick"] = function(fn) { /// <summary> /// 1: dblclick() - Triggers the dblclick event of each matched element. /// 2: dblclick(fn) - Binds a function to the dblclick event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("dblclick", fn) : this.trigger(name); }; jQuery.fn["mousedown"] = function(fn) { /// <summary> /// Binds a function to the mousedown event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("mousedown", fn) : this.trigger(name); }; jQuery.fn["mouseup"] = function(fn) { /// <summary> /// Bind a function to the mouseup event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("mouseup", fn) : this.trigger(name); }; jQuery.fn["mousemove"] = function(fn) { /// <summary> /// Bind a function to the mousemove event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("mousemove", fn) : this.trigger(name); }; jQuery.fn["mouseover"] = function(fn) { /// <summary> /// Bind a function to the mouseover event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("mouseover", fn) : this.trigger(name); }; jQuery.fn["mouseout"] = function(fn) { /// <summary> /// Bind a function to the mouseout event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("mouseout", fn) : this.trigger(name); }; jQuery.fn["mouseenter"] = function(fn) { /// <summary> /// Bind a function to the mouseenter event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("mouseenter", fn) : this.trigger(name); }; jQuery.fn["mouseleave"] = function(fn) { /// <summary> /// Bind a function to the mouseleave event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("mouseleave", fn) : this.trigger(name); }; jQuery.fn["change"] = function(fn) { /// <summary> /// 1: change() - Triggers the change event of each matched element. /// 2: change(fn) - Binds a function to the change event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("change", fn) : this.trigger(name); }; jQuery.fn["select"] = function(fn) { /// <summary> /// 1: select() - Triggers the select event of each matched element. /// 2: select(fn) - Binds a function to the select event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("select", fn) : this.trigger(name); }; jQuery.fn["submit"] = function(fn) { /// <summary> /// 1: submit() - Triggers the submit event of each matched element. /// 2: submit(fn) - Binds a function to the submit event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("submit", fn) : this.trigger(name); }; jQuery.fn["keydown"] = function(fn) { /// <summary> /// 1: keydown() - Triggers the keydown event of each matched element. /// 2: keydown(fn) - Binds a function to the keydown event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("keydown", fn) : this.trigger(name); }; jQuery.fn["keypress"] = function(fn) { /// <summary> /// 1: keypress() - Triggers the keypress event of each matched element. /// 2: keypress(fn) - Binds a function to the keypress event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("keypress", fn) : this.trigger(name); }; jQuery.fn["keyup"] = function(fn) { /// <summary> /// 1: keyup() - Triggers the keyup event of each matched element. /// 2: keyup(fn) - Binds a function to the keyup event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("keyup", fn) : this.trigger(name); }; jQuery.fn["error"] = function(fn) { /// <summary> /// 1: error() - Triggers the error event of each matched element. /// 2: error(fn) - Binds a function to the error event of each matched element. /// </summary> /// <param name="fn" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return fn ? this.bind("error", fn) : this.trigger(name); }; // Prevent memory leaks in IE // And prevent errors on refresh with events like mouseover in other browsers // Window isn't included so as not to unbind existing unload events jQuery( window ).bind( 'unload', function(){ for ( var id in jQuery.cache ) // Skip the window if ( id != 1 && jQuery.cache[ id ].handle ) jQuery.event.remove( jQuery.cache[ id ].handle.elem ); }); // [vsdoc] The following function has been modified for IntelliSense. // [vsdoc] Stubbing support properties to "false" since we simulate IE. (function(){ jQuery.support = {}; jQuery.support = { // IE strips leading whitespace when .innerHTML is used leadingWhitespace: false, // Make sure that tbody elements aren't automatically inserted // IE will insert them into empty tables tbody: false, // Make sure that you can get all elements in an <object> element // IE 7 always returns no results objectAll: false, // Make sure that link elements get serialized correctly by innerHTML // This requires a wrapper element in IE htmlSerialize: false, // Get the style information from getAttribute // (IE uses .cssText insted) style: false, // Make sure that URLs aren't manipulated // (IE normalizes it by default) hrefNormalized: false, // Make sure that element opacity exists // (IE uses filter instead) opacity: false, // Verify style float existence // (IE uses styleFloat instead of cssFloat) cssFloat: false, // Will be defined later scriptEval: false, noCloneEvent: false, boxModel: false }; })(); // [vsdoc] The following member has been modified for IntelliSense. var styleFloat = "styleFloat"; jQuery.props = { "for": "htmlFor", "class": "className", "float": styleFloat, cssFloat: styleFloat, styleFloat: styleFloat, readonly: "readOnly", maxlength: "maxLength", cellspacing: "cellSpacing", rowspan: "rowSpan", tabindex: "tabIndex" }; jQuery.fn.extend({ // Keep a copy of the old load _load: jQuery.fn.load, load: function( url, params, callback ) { /// <summary> /// Loads HTML from a remote file and injects it into the DOM. By default performs a GET request, but if parameters are included /// then a POST will be performed. /// </summary> /// <param name="url" type="String">The URL of the HTML page to load.</param> /// <param name="data" optional="true" type="Map">Key/value pairs that will be sent to the server.</param> /// <param name="callback" optional="true" type="Function">The function called when the AJAX request is complete. It should map function(responseText, textStatus, XMLHttpRequest) such that this maps the injected DOM element.</param> /// <returns type="jQuery" /> if ( typeof url !== "string" ) return this._load( url ); var off = url.indexOf(" "); if ( off >= 0 ) { var selector = url.slice(off, url.length); url = url.slice(0, off); } // Default to a GET request var type = "GET"; // If the second parameter was provided if ( params ) // If it's a function if ( jQuery.isFunction( params ) ) { // We assume that it's the callback callback = params; params = null; // Otherwise, build a param string } else if( typeof params === "object" ) { params = jQuery.param( params ); type = "POST"; } var self = this; // Request the remote document jQuery.ajax({ url: url, type: type, dataType: "html", data: params, complete: function(res, status){ // If successful, inject the HTML into all the matched elements if ( status == "success" || status == "notmodified" ) // See if a selector was specified self.html( selector ? // Create a dummy div to hold the results jQuery("<div/>") // inject the contents of the document in, removing the scripts // to avoid any 'Permission Denied' errors in IE .append(res.responseText.replace(/<script(.|\s)*?\/script>/g, "")) // Locate the specified elements .find(selector) : // If not, just inject the full result res.responseText ); if( callback ) self.each( callback, [res.responseText, status, res] ); } }); return this; }, serialize: function() { /// <summary> /// Serializes a set of input elements into a string of data. /// </summary> /// <returns type="String">The serialized result</returns> return jQuery.param(this.serializeArray()); }, serializeArray: function() { /// <summary> /// Serializes all forms and form elements but returns a JSON data structure. /// </summary> /// <returns type="String">A JSON data structure representing the serialized items.</returns> return this.map(function(){ return this.elements ? jQuery.makeArray(this.elements) : this; }) .filter(function(){ return this.name && !this.disabled && (this.checked || /select|textarea/i.test(this.nodeName) || /text|hidden|password|search/i.test(this.type)); }) .map(function(i, elem){ var val = jQuery(this).val(); return val == null ? null : jQuery.isArray(val) ? jQuery.map( val, function(val, i){ return {name: elem.name, value: val}; }) : {name: elem.name, value: val}; }).get(); } }); // [vsdoc] The following section has been denormalized from original sources for IntelliSense. // Attach a bunch of functions for handling common AJAX events // jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){ // jQuery.fn[o] = function(f){ // return this.bind(o, f); // }; // }); jQuery.fn["ajaxStart"] = function(callback) { /// <summary> /// Attach a function to be executed whenever an AJAX request begins and there is none already active. This is an Ajax Event. /// </summary> /// <param name="callback" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return this.bind("ajaxStart", f); }; jQuery.fn["ajaxStop"] = function(callback) { /// <summary> /// Attach a function to be executed whenever all AJAX requests have ended. This is an Ajax Event. /// </summary> /// <param name="callback" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return this.bind("ajaxStop", f); }; jQuery.fn["ajaxComplete"] = function(callback) { /// <summary> /// Attach a function to be executed whenever an AJAX request completes. This is an Ajax Event. /// </summary> /// <param name="callback" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return this.bind("ajaxComplete", f); }; jQuery.fn["ajaxError"] = function(callback) { /// <summary> /// Attach a function to be executed whenever an AJAX request fails. This is an Ajax Event. /// </summary> /// <param name="callback" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return this.bind("ajaxError", f); }; jQuery.fn["ajaxSuccess"] = function(callback) { /// <summary> /// Attach a function to be executed whenever an AJAX request completes successfully. This is an Ajax Event. /// </summary> /// <param name="callback" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return this.bind("ajaxSuccess", f); }; jQuery.fn["ajaxSend"] = function(callback) { /// <summary> /// Attach a function to be executed before an AJAX request is sent. This is an Ajax Event. /// </summary> /// <param name="callback" type="Function">The function to execute.</param> /// <returns type="jQuery" /> return this.bind("ajaxSend", f); }; var jsc = now(); jQuery.extend({ get: function( url, data, callback, type ) { /// <summary> /// Loads a remote page using an HTTP GET request. /// </summary> /// <param name="url" type="String">The URL of the HTML page to load.</param> /// <param name="data" optional="true" type="Map">Key/value pairs that will be sent to the server.</param> /// <param name="callback" optional="true" type="Function">The function called when the AJAX request is complete. It should map function(responseText, textStatus) such that this maps the options for this AJAX request.</param> /// <param name="type" optional="true" type="String">Type of data to be returned to callback function. Valid valiues are xml, html, script, json, text, _default.</param> /// <returns type="XMLHttpRequest" /> // shift arguments if data argument was ommited if ( jQuery.isFunction( data ) ) { callback = data; data = null; } return jQuery.ajax({ type: "GET", url: url, data: data, success: callback, dataType: type }); }, getScript: function( url, callback ) { /// <summary> /// Loads and executes a local JavaScript file using an HTTP GET request. /// </summary> /// <param name="url" type="String">The URL of the script to load.</param> /// <param name="callback" optional="true" type="Function">The function called when the AJAX request is complete. It should map function(data, textStatus) such that this maps the options for the AJAX request.</param> /// <returns type="XMLHttpRequest" /> return jQuery.get(url, null, callback, "script"); }, getJSON: function( url, data, callback ) { /// <summary> /// Loads JSON data using an HTTP GET request. /// </summary> /// <param name="url" type="String">The URL of the JSON data to load.</param> /// <param name="data" optional="true" type="Map">Key/value pairs that will be sent to the server.</param> /// <param name="callback" optional="true" type="Function">The function called when the AJAX request is complete if the data is loaded successfully. It should map function(data, textStatus) such that this maps the options for this AJAX request.</param> /// <returns type="XMLHttpRequest" /> return jQuery.get(url, data, callback, "json"); }, post: function( url, data, callback, type ) { /// <summary> /// Loads a remote page using an HTTP POST request. /// </summary> /// <param name="url" type="String">The URL of the HTML page to load.</param> /// <param name="data" optional="true" type="Map">Key/value pairs that will be sent to the server.</param> /// <param name="callback" optional="true" type="Function">The function called when the AJAX request is complete. It should map function(responseText, textStatus) such that this maps the options for this AJAX request.</param> /// <param name="type" optional="true" type="String">Type of data to be returned to callback function. Valid valiues are xml, html, script, json, text, _default.</param> /// <returns type="XMLHttpRequest" /> if ( jQuery.isFunction( data ) ) { callback = data; data = {}; } return jQuery.ajax({ type: "POST", url: url, data: data, success: callback, dataType: type }); }, ajaxSetup: function( settings ) { /// <summary> /// Sets up global settings for AJAX requests. /// </summary> /// <param name="settings" type="Options">A set of key/value pairs that configure the default Ajax request.</param> jQuery.extend( jQuery.ajaxSettings, settings ); }, ajaxSettings: { url: location.href, global: true, type: "GET", contentType: "application/x-www-form-urlencoded", processData: true, async: true, /* timeout: 0, data: null, username: null, password: null, */ // Create the request object; Microsoft failed to properly // implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available // This function can be overriden by calling jQuery.ajaxSetup xhr:function(){ return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); }, accepts: { xml: "application/xml, text/xml", html: "text/html", script: "text/javascript, application/javascript", json: "application/json, text/javascript", text: "text/plain", _default: "*/*" } }, // Last-Modified header cache for next request lastModified: {}, ajax: function( s ) { /// <summary> /// Load a remote page using an HTTP request. /// </summary> /// <private /> // Extend the settings, but re-extend 's' so that it can be // checked again later (in the test suite, specifically) s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s)); var jsonp, jsre = /=\?(&|$)/g, status, data, type = s.type.toUpperCase(); // convert data if not already a string if ( s.data && s.processData && typeof s.data !== "string" ) s.data = jQuery.param(s.data); // Handle JSONP Parameter Callbacks if ( s.dataType == "jsonp" ) { if ( type == "GET" ) { if ( !s.url.match(jsre) ) s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?"; } else if ( !s.data || !s.data.match(jsre) ) s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?"; s.dataType = "json"; } // Build temporary JSONP function if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) { jsonp = "jsonp" + jsc++; // Replace the =? sequence both in the query string and the data if ( s.data ) s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1"); s.url = s.url.replace(jsre, "=" + jsonp + "$1"); // We need to make sure // that a JSONP style response is executed properly s.dataType = "script"; // Handle JSONP-style loading window[ jsonp ] = function(tmp){ data = tmp; success(); complete(); // Garbage collect window[ jsonp ] = undefined; try{ delete window[ jsonp ]; } catch(e){} if ( head ) head.removeChild( script ); }; } if ( s.dataType == "script" && s.cache == null ) s.cache = false; if ( s.cache === false && type == "GET" ) { var ts = now(); // try replacing _= if it is there var ret = s.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + ts + "$2"); // if nothing was replaced, add timestamp to the end s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : ""); } // If data is available, append data to url for get requests if ( s.data && type == "GET" ) { s.url += (s.url.match(/\?/) ? "&" : "?") + s.data; // IE likes to send both get and post data, prevent this s.data = null; } // Watch for a new set of requests if ( s.global && ! jQuery.active++ ) jQuery.event.trigger( "ajaxStart" ); // Matches an absolute URL, and saves the domain var parts = /^(\w+:)?\/\/([^\/?#]+)/.exec( s.url ); // If we're requesting a remote document // and trying to load JSON or Script with a GET if ( s.dataType == "script" && type == "GET" && parts && ( parts[1] && parts[1] != location.protocol || parts[2] != location.host )){ var head = document.getElementsByTagName("head")[0]; var script = document.createElement("script"); script.src = s.url; if (s.scriptCharset) script.charset = s.scriptCharset; // Handle Script loading if ( !jsonp ) { var done = false; // Attach handlers for all browsers script.onload = script.onreadystatechange = function(){ if ( !done && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete") ) { done = true; success(); complete(); // Handle memory leak in IE script.onload = script.onreadystatechange = null; head.removeChild( script ); } }; } head.appendChild(script); // We handle everything using the script element injection return undefined; } var requestDone = false; // Create the request object var xhr = s.xhr(); // Open the socket // Passing null username, generates a login popup on Opera (#2865) if( s.username ) xhr.open(type, s.url, s.async, s.username, s.password); else xhr.open(type, s.url, s.async); // Need an extra try/catch for cross domain requests in Firefox 3 try { // Set the correct header, if data is being sent if ( s.data ) xhr.setRequestHeader("Content-Type", s.contentType); // Set the If-Modified-Since header, if ifModified mode. if ( s.ifModified ) xhr.setRequestHeader("If-Modified-Since", jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" ); // Set header so the called script knows that it's an XMLHttpRequest xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); // Set the Accepts header for the server, depending on the dataType xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ? s.accepts[ s.dataType ] + ", */*" : s.accepts._default ); } catch(e){} // Allow custom headers/mimetypes and early abort if ( s.beforeSend && s.beforeSend(xhr, s) === false ) { // Handle the global AJAX counter if ( s.global && ! --jQuery.active ) jQuery.event.trigger( "ajaxStop" ); // close opended socket xhr.abort(); return false; } if ( s.global ) jQuery.event.trigger("ajaxSend", [xhr, s]); // Wait for a response to come back var onreadystatechange = function(isTimeout){ // The request was aborted, clear the interval and decrement jQuery.active if (xhr.readyState == 0) { if (ival) { // clear poll interval clearInterval(ival); ival = null; // Handle the global AJAX counter if ( s.global && ! --jQuery.active ) jQuery.event.trigger( "ajaxStop" ); } // The transfer is complete and the data is available, or the request timed out } else if ( !requestDone && xhr && (xhr.readyState == 4 || isTimeout == "timeout") ) { requestDone = true; // clear poll interval if (ival) { clearInterval(ival); ival = null; } status = isTimeout == "timeout" ? "timeout" : !jQuery.httpSuccess( xhr ) ? "error" : s.ifModified && jQuery.httpNotModified( xhr, s.url ) ? "notmodified" : "success"; if ( status == "success" ) { // Watch for, and catch, XML document parse errors try { // process the data (runs the xml through httpData regardless of callback) data = jQuery.httpData( xhr, s.dataType, s ); } catch(e) { status = "parsererror"; } } // Make sure that the request was successful or notmodified if ( status == "success" ) { // Cache Last-Modified header, if ifModified mode. var modRes; try { modRes = xhr.getResponseHeader("Last-Modified"); } catch(e) {} // swallow exception thrown by FF if header is not available if ( s.ifModified && modRes ) jQuery.lastModified[s.url] = modRes; // JSONP handles its own success callback if ( !jsonp ) success(); } else jQuery.handleError(s, xhr, status); // Fire the complete handlers complete(); if ( isTimeout ) xhr.abort(); // Stop memory leaks if ( s.async ) xhr = null; } }; if ( s.async ) { // don't attach the handler to the request, just poll it instead var ival = setInterval(onreadystatechange, 13); // Timeout checker if ( s.timeout > 0 ) setTimeout(function(){ // Check to see if the request is still happening if ( xhr && !requestDone ) onreadystatechange( "timeout" ); }, s.timeout); } // Send the data try { xhr.send(s.data); } catch(e) { jQuery.handleError(s, xhr, null, e); } // firefox 1.5 doesn't fire statechange for sync requests if ( !s.async ) onreadystatechange(); function success(){ // If a local callback was specified, fire it and pass it the data if ( s.success ) s.success( data, status ); // Fire the global callback if ( s.global ) jQuery.event.trigger( "ajaxSuccess", [xhr, s] ); } function complete(){ // Process result if ( s.complete ) s.complete(xhr, status); // The request was completed if ( s.global ) jQuery.event.trigger( "ajaxComplete", [xhr, s] ); // Handle the global AJAX counter if ( s.global && ! --jQuery.active ) jQuery.event.trigger( "ajaxStop" ); } // return XMLHttpRequest to allow aborting the request etc. return xhr; }, handleError: function( s, xhr, status, e ) { /// <summary> /// This method is internal. /// </summary> /// <private /> // If a local callback was specified, fire it if ( s.error ) s.error( xhr, status, e ); // Fire the global callback if ( s.global ) jQuery.event.trigger( "ajaxError", [xhr, s, e] ); }, // Counter for holding the number of active queries active: 0, // Determines if an XMLHttpRequest was successful or not httpSuccess: function( xhr ) { /// <summary> /// This method is internal. /// </summary> /// <private /> try { // IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450 return !xhr.status && location.protocol == "file:" || ( xhr.status >= 200 && xhr.status < 300 ) || xhr.status == 304 || xhr.status == 1223; } catch(e){} return false; }, // Determines if an XMLHttpRequest returns NotModified httpNotModified: function( xhr, url ) { /// <summary> /// This method is internal. /// </summary> /// <private /> try { var xhrRes = xhr.getResponseHeader("Last-Modified"); // Firefox always returns 200. check Last-Modified date return xhr.status == 304 || xhrRes == jQuery.lastModified[url]; } catch(e){} return false; }, httpData: function( xhr, type, s ) { /// <summary> /// This method is internal. /// </summary> /// <private /> var ct = xhr.getResponseHeader("content-type"), xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0, data = xml ? xhr.responseXML : xhr.responseText; if ( xml && data.documentElement.tagName == "parsererror" ) throw "parsererror"; // Allow a pre-filtering function to sanitize the response // s != null is checked to keep backwards compatibility if( s && s.dataFilter ) data = s.dataFilter( data, type ); // The filter can actually parse the response if( typeof data === "string" ){ // If the type is "script", eval it in global context if ( type == "script" ) jQuery.globalEval( data ); // Get the JavaScript object, if JSON is used. if ( type == "json" ) data = window["eval"]("(" + data + ")"); } return data; }, // Serialize an array of form elements or a set of // key/values into a query string param: function( a ) { /// <summary> /// This method is internal. Use serialize() instead. /// </summary> /// <param name="a" type="Map">A map of key/value pairs to serialize into a string.</param>' /// <returns type="String" /> /// <private /> var s = [ ]; function add( key, value ){ s[ s.length ] = encodeURIComponent(key) + '=' + encodeURIComponent(value); }; // If an array was passed in, assume that it is an array // of form elements if ( jQuery.isArray(a) || a.jquery ) // Serialize the form elements jQuery.each( a, function(){ add( this.name, this.value ); }); // Otherwise, assume that it's an object of key/value pairs else // Serialize the key/values for ( var j in a ) // If the value is an array then the key names need to be repeated if ( jQuery.isArray(a[j]) ) jQuery.each( a[j], function(){ add( j, this ); }); else add( j, jQuery.isFunction(a[j]) ? a[j]() : a[j] ); // Return the resulting serialization return s.join("&").replace(/%20/g, "+"); } }); var elemdisplay = {}, timerId, fxAttrs = [ // height animations [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ], // width animations [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ], // opacity animations [ "opacity" ] ]; function genFx( type, num ){ var obj = {}; jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function(){ obj[ this ] = type; }); return obj; } jQuery.fn.extend({ show: function(speed,callback){ /// <summary> /// Show all matched elements using a graceful animation and firing an optional callback after completion. /// </summary> /// <param name="speed" type="String">A string representing one of three predefined speeds ('slow', 'normal', or 'fast'), or /// the number of milliseconds to run the animation</param> /// <param name="callback" optional="true" type="Function">A function to be executed whenever the animation completes, once for each animated element. It should map function callback() such that this is the DOM element being animated.</param> /// <returns type="jQuery" /> if ( speed ) { return this.animate( genFx("show", 3), speed, callback); } else { for ( var i = 0, l = this.length; i < l; i++ ){ var old = jQuery.data(this[i], "olddisplay"); this[i].style.display = old || ""; if ( jQuery.css(this[i], "display") === "none" ) { var tagName = this[i].tagName, display; if ( elemdisplay[ tagName ] ) { display = elemdisplay[ tagName ]; } else { var elem = jQuery("<" + tagName + " />").appendTo("body"); display = elem.css("display"); if ( display === "none" ) display = "block"; elem.remove(); elemdisplay[ tagName ] = display; } jQuery.data(this[i], "olddisplay", display); } } // Set the display of the elements in a second loop // to avoid the constant reflow for ( var i = 0, l = this.length; i < l; i++ ){ this[i].style.display = jQuery.data(this[i], "olddisplay") || ""; } return this; } }, hide: function(speed,callback){ /// <summary> /// Hides all matched elements using a graceful animation and firing an optional callback after completion. /// </summary> /// <param name="speed" type="String">A string representing one of three predefined speeds ('slow', 'normal', or 'fast'), or /// the number of milliseconds to run the animation</param> /// <param name="callback" optional="true" type="Function">A function to be executed whenever the animation completes, once for each animated element. It should map function callback() such that this is the DOM element being animated.</param> /// <returns type="jQuery" /> if ( speed ) { return this.animate( genFx("hide", 3), speed, callback); } else { for ( var i = 0, l = this.length; i < l; i++ ){ var old = jQuery.data(this[i], "olddisplay"); if ( !old && old !== "none" ) jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display")); } // Set the display of the elements in a second loop // to avoid the constant reflow for ( var i = 0, l = this.length; i < l; i++ ){ this[i].style.display = "none"; } return this; } }, // Save the old toggle function _toggle: jQuery.fn.toggle, toggle: function( fn, fn2 ){ /// <summary> /// Toggles displaying each of the set of matched elements. /// </summary> /// <returns type="jQuery" /> var bool = typeof fn === "boolean"; return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ? this._toggle.apply( this, arguments ) : fn == null || bool ? this.each(function(){ var state = bool ? fn : jQuery(this).is(":hidden"); jQuery(this)[ state ? "show" : "hide" ](); }) : this.animate(genFx("toggle", 3), fn, fn2); }, fadeTo: function(speed,to,callback){ /// <summary> /// Fades the opacity of all matched elements to a specified opacity. /// </summary> /// <param name="speed" type="String">A string representing one of three predefined speeds ('slow', 'normal', or 'fast'), or /// the number of milliseconds to run the animation</param> /// <param name="callback" optional="true" type="Function">A function to be executed whenever the animation completes, once for each animated element. It should map function callback() such that this is the DOM element being animated.</param> /// <returns type="jQuery" /> return this.animate({opacity: to}, speed, callback); }, animate: function( prop, speed, easing, callback ) { /// <summary> /// A function for making custom animations. /// </summary> /// <param name="prop" type="Options">A set of style attributes that you wish to animate and to what end.</param> /// <param name="speed" optional="true" type="String">A string representing one of three predefined speeds ('slow', 'normal', or 'fast'), or /// the number of milliseconds to run the animation</param> /// <param name="easing" optional="true" type="String">The name of the easing effect that you want to use. There are two built-in values, 'linear' and 'swing'.</param> /// <param name="callback" optional="true" type="Function">A function to be executed whenever the animation completes, once for each animated element. It should map function callback() such that this is the DOM element being animated.</param> /// <returns type="jQuery" /> var optall = jQuery.speed(speed, easing, callback); return this[ optall.queue === false ? "each" : "queue" ](function(){ var opt = jQuery.extend({}, optall), p, hidden = this.nodeType == 1 && jQuery(this).is(":hidden"), self = this; for ( p in prop ) { if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden ) return opt.complete.call(this); if ( ( p == "height" || p == "width" ) && this.style ) { // Store display property opt.display = jQuery.css(this, "display"); // Make sure that nothing sneaks out opt.overflow = this.style.overflow; } } if ( opt.overflow != null ) this.style.overflow = "hidden"; opt.curAnim = jQuery.extend({}, prop); jQuery.each( prop, function(name, val){ var e = new jQuery.fx( self, opt, name ); if ( /toggle|show|hide/.test(val) ) e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop ); else { var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/), start = e.cur(true) || 0; if ( parts ) { var end = parseFloat(parts[2]), unit = parts[3] || "px"; // We need to compute starting value if ( unit != "px" ) { self.style[ name ] = (end || 1) + unit; start = ((end || 1) / e.cur(true)) * start; self.style[ name ] = start + unit; } // If a +=/-= token was provided, we're doing a relative animation if ( parts[1] ) end = ((parts[1] == "-=" ? -1 : 1) * end) + start; e.custom( start, end, unit ); } else e.custom( start, val, "" ); } }); // For JS strict compliance return true; }); }, stop: function(clearQueue, gotoEnd){ /// <summary> /// Stops all currently animations on the specified elements. /// </summary> /// <param name="clearQueue" optional="true" type="Boolean">True to clear animations that are queued to run.</param> /// <param name="gotoEnd" optional="true" type="Boolean">True to move the element value to the end of its animation target.</param> /// <returns type="jQuery" /> var timers = jQuery.timers; if (clearQueue) this.queue([]); this.each(function(){ // go in reverse order so anything added to the queue during the loop is ignored for ( var i = timers.length - 1; i >= 0; i-- ) if ( timers[i].elem == this ) { if (gotoEnd) // force the next step to be the last timers[i](true); timers.splice(i, 1); } }); // start the next in the queue if the last step wasn't forced if (!gotoEnd) this.dequeue(); return this; } }); // Generate shortcuts for custom animations // jQuery.each({ // slideDown: genFx("show", 1), // slideUp: genFx("hide", 1), // slideToggle: genFx("toggle", 1), // fadeIn: { opacity: "show" }, // fadeOut: { opacity: "hide" } // }, function( name, props ){ // jQuery.fn[ name ] = function( speed, callback ){ // return this.animate( props, speed, callback ); // }; // }); // [vsdoc] The following section has been denormalized from original sources for IntelliSense. jQuery.fn.slideDown = function( speed, callback ){ /// <summary> /// Reveal all matched elements by adjusting their height. /// </summary> /// <param name="speed" type="String">A string representing one of three predefined speeds ('slow', 'normal', or 'fast'), or /// the number of milliseconds to run the animation</param> /// <param name="callback" optional="true" type="Function">A function to be executed whenever the animation completes, once for each animated element. It should map function callback() such that this is the DOM element being animated.</param> /// <returns type="jQuery" /> return this.animate( genFx("show", 1), speed, callback ); }; jQuery.fn.slideUp = function( speed, callback ){ /// <summary> /// Hiding all matched elements by adjusting their height. /// </summary> /// <param name="speed" type="String">A string representing one of three predefined speeds ('slow', 'normal', or 'fast'), or /// the number of milliseconds to run the animation</param> /// <param name="callback" optional="true" type="Function">A function to be executed whenever the animation completes, once for each animated element. It should map function callback() such that this is the DOM element being animated.</param> /// <returns type="jQuery" /> return this.animate( genFx("hide", 1), speed, callback ); }; jQuery.fn.slideToggle = function( speed, callback ){ /// <summary> /// Toggles the visibility of all matched elements by adjusting their height. /// </summary> /// <param name="speed" type="String">A string representing one of three predefined speeds ('slow', 'normal', or 'fast'), or /// the number of milliseconds to run the animation</param> /// <param name="callback" optional="true" type="Function">A function to be executed whenever the animation completes, once for each animated element. It should map function callback() such that this is the DOM element being animated.</param> /// <returns type="jQuery" /> return this.animate( genFx("toggle", 1), speed, callback ); }; jQuery.fn.fadeIn = function( speed, callback ){ /// <summary> /// Fades in all matched elements by adjusting their opacity. /// </summary> /// <param name="speed" type="String">A string representing one of three predefined speeds ('slow', 'normal', or 'fast'), or /// the number of milliseconds to run the animation</param> /// <param name="callback" optional="true" type="Function">A function to be executed whenever the animation completes, once for each animated element. It should map function callback() such that this is the DOM element being animated.</param> /// <returns type="jQuery" /> return this.animate( { opacity: "show" }, speed, callback ); }; jQuery.fn.fadeOut = function( speed, callback ){ /// <summary> /// Fades the opacity of all matched elements to a specified opacity. /// </summary> /// <param name="speed" type="String">A string representing one of three predefined speeds ('slow', 'normal', or 'fast'), or /// the number of milliseconds to run the animation</param> /// <param name="callback" optional="true" type="Function">A function to be executed whenever the animation completes, once for each animated element. It should map function callback() such that this is the DOM element being animated.</param> /// <returns type="jQuery" /> return this.animate( { opacity: "hide" }, speed, callback ); }; jQuery.extend({ speed: function(speed, easing, fn) { /// <summary> /// This member is internal. /// </summary> /// <private /> var opt = typeof speed === "object" ? speed : { complete: fn || !fn && easing || jQuery.isFunction( speed ) && speed, duration: speed, easing: fn && easing || easing && !jQuery.isFunction(easing) && easing }; opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default; // Queueing opt.old = opt.complete; opt.complete = function(){ if ( opt.queue !== false ) jQuery(this).dequeue(); if ( jQuery.isFunction( opt.old ) ) opt.old.call( this ); }; return opt; }, easing: { linear: function( p, n, firstNum, diff ) { /// <summary> /// This member is internal. /// </summary> /// <private /> return firstNum + diff * p; }, swing: function( p, n, firstNum, diff ) { /// <summary> /// This member is internal. /// </summary> /// <private /> return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum; } }, timers: [], fx: function( elem, options, prop ){ /// <summary> /// This member is internal. /// </summary> /// <private /> this.options = options; this.elem = elem; this.prop = prop; if ( !options.orig ) options.orig = {}; } }); jQuery.fx.prototype = { // Simple function for setting a style value update: function(){ /// <summary> /// This member is internal. /// </summary> /// <private /> if ( this.options.step ) this.options.step.call( this.elem, this.now, this ); (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this ); // Set display property to block for height/width animations if ( ( this.prop == "height" || this.prop == "width" ) && this.elem.style ) this.elem.style.display = "block"; }, // Get the current size cur: function(force){ /// <summary> /// This member is internal. /// </summary> /// <private /> if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) return this.elem[ this.prop ]; var r = parseFloat(jQuery.css(this.elem, this.prop, force)); return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0; }, // Start an animation from one number to another custom: function(from, to, unit){ this.startTime = now(); this.start = from; this.end = to; this.unit = unit || this.unit || "px"; this.now = this.start; this.pos = this.state = 0; var self = this; function t(gotoEnd){ return self.step(gotoEnd); } t.elem = this.elem; if ( t() && jQuery.timers.push(t) && !timerId ) { timerId = setInterval(function(){ var timers = jQuery.timers; for ( var i = 0; i < timers.length; i++ ) if ( !timers[i]() ) timers.splice(i--, 1); if ( !timers.length ) { clearInterval( timerId ); timerId = undefined; } }, 13); } }, // Simple 'show' function show: function(){ /// <summary> /// Displays each of the set of matched elements if they are hidden. /// </summary> // Remember where we started, so that we can go back to it later this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop ); this.options.show = true; // Begin the animation // Make sure that we start at a small width/height to avoid any // flash of content this.custom(this.prop == "width" || this.prop == "height" ? 1 : 0, this.cur()); // Start by showing the element jQuery(this.elem).show(); }, // Simple 'hide' function hide: function(){ /// <summary> /// Hides each of the set of matched elements if they are shown. /// </summary> // Remember where we started, so that we can go back to it later this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop ); this.options.hide = true; // Begin the animation this.custom(this.cur(), 0); }, // Each step of an animation step: function(gotoEnd){ /// <summary> /// This method is internal. /// </summary> /// <private /> var t = now(); if ( gotoEnd || t >= this.options.duration + this.startTime ) { this.now = this.end; this.pos = this.state = 1; this.update(); this.options.curAnim[ this.prop ] = true; var done = true; for ( var i in this.options.curAnim ) if ( this.options.curAnim[i] !== true ) done = false; if ( done ) { if ( this.options.display != null ) { // Reset the overflow this.elem.style.overflow = this.options.overflow; // Reset the display this.elem.style.display = this.options.display; if ( jQuery.css(this.elem, "display") == "none" ) this.elem.style.display = "block"; } // Hide the element if the "hide" operation was done if ( this.options.hide ) jQuery(this.elem).hide(); // Reset the properties, if the item has been hidden or shown if ( this.options.hide || this.options.show ) for ( var p in this.options.curAnim ) jQuery.attr(this.elem.style, p, this.options.orig[p]); // Execute the complete function this.options.complete.call( this.elem ); } return false; } else { var n = t - this.startTime; this.state = n / this.options.duration; // Perform the easing function, defaults to swing this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration); this.now = this.start + ((this.end - this.start) * this.pos); // Perform the next step of the animation this.update(); } return true; } }; jQuery.extend( jQuery.fx, { speeds:{ slow: 600, fast: 200, // Default speed _default: 400 }, step: { opacity: function(fx){ jQuery.attr(fx.elem.style, "opacity", fx.now); }, _default: function(fx){ if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) fx.elem.style[ fx.prop ] = fx.now + fx.unit; else fx.elem[ fx.prop ] = fx.now; } } }); if ( document.documentElement["getBoundingClientRect"] ) jQuery.fn.offset = function() { /// <summary> /// Gets the current offset of the first matched element relative to the viewport. /// </summary> /// <returns type="Object">An object with two Integer properties, 'top' and 'left'.</returns> if ( !this[0] ) return { top: 0, left: 0 }; if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] ); var box = this[0].getBoundingClientRect(), doc = this[0].ownerDocument, body = doc.body, docElem = doc.documentElement, clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0, top = box.top + (self.pageYOffset || jQuery.boxModel && docElem.scrollTop || body.scrollTop ) - clientTop, left = box.left + (self.pageXOffset || jQuery.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft; return { top: top, left: left }; }; else jQuery.fn.offset = function() { /// <summary> /// Gets the current offset of the first matched element relative to the viewport. /// </summary> /// <returns type="Object">An object with two Integer properties, 'top' and 'left'.</returns> if ( !this[0] ) return { top: 0, left: 0 }; if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] ); jQuery.offset.initialized || jQuery.offset.initialize(); var elem = this[0], offsetParent = elem.offsetParent, prevOffsetParent = elem, doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement, body = doc.body, defaultView = doc.defaultView, prevComputedStyle = defaultView.getComputedStyle(elem, null), top = elem.offsetTop, left = elem.offsetLeft; while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) { computedStyle = defaultView.getComputedStyle(elem, null); top -= elem.scrollTop, left -= elem.scrollLeft; if ( elem === offsetParent ) { top += elem.offsetTop, left += elem.offsetLeft; if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(elem.tagName)) ) top += parseInt( computedStyle.borderTopWidth, 10) || 0, left += parseInt( computedStyle.borderLeftWidth, 10) || 0; prevOffsetParent = offsetParent, offsetParent = elem.offsetParent; } if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) top += parseInt( computedStyle.borderTopWidth, 10) || 0, left += parseInt( computedStyle.borderLeftWidth, 10) || 0; prevComputedStyle = computedStyle; } if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) top += body.offsetTop, left += body.offsetLeft; if ( prevComputedStyle.position === "fixed" ) top += Math.max(docElem.scrollTop, body.scrollTop), left += Math.max(docElem.scrollLeft, body.scrollLeft); return { top: top, left: left }; }; jQuery.offset = { initialize: function() { if ( this.initialized ) return; var body = document.body, container = document.createElement('div'), innerDiv, checkDiv, table, td, rules, prop, bodyMarginTop = body.style.marginTop, html = '<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"cellpadding="0"cellspacing="0"><tr><td></td></tr></table>'; rules = { position: 'absolute', top: 0, left: 0, margin: 0, border: 0, width: '1px', height: '1px', visibility: 'hidden' }; for ( prop in rules ) container.style[prop] = rules[prop]; container.innerHTML = html; body.insertBefore(container, body.firstChild); innerDiv = container.firstChild, checkDiv = innerDiv.firstChild, td = innerDiv.nextSibling.firstChild.firstChild; this.doesNotAddBorder = (checkDiv.offsetTop !== 5); this.doesAddBorderForTableAndCells = (td.offsetTop === 5); innerDiv.style.overflow = 'hidden', innerDiv.style.position = 'relative'; this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5); body.style.marginTop = '1px'; this.doesNotIncludeMarginInBodyOffset = (body.offsetTop === 0); body.style.marginTop = bodyMarginTop; body.removeChild(container); this.initialized = true; }, bodyOffset: function(body) { jQuery.offset.initialized || jQuery.offset.initialize(); var top = body.offsetTop, left = body.offsetLeft; if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) top += parseInt( jQuery.curCSS(body, 'marginTop', true), 10 ) || 0, left += parseInt( jQuery.curCSS(body, 'marginLeft', true), 10 ) || 0; return { top: top, left: left }; } }; jQuery.fn.extend({ position: function() { /// <summary> /// Gets the top and left positions of an element relative to its offset parent. /// </summary> /// <returns type="Object">An object with two integer properties, 'top' and 'left'.</returns> var left = 0, top = 0, results; if ( this[0] ) { // Get *real* offsetParent var offsetParent = this.offsetParent(), // Get correct offsets offset = this.offset(), parentOffset = /^body|html$/i.test(offsetParent[0].tagName) ? { top: 0, left: 0 } : offsetParent.offset(); // Subtract element margins // note: when an element has margin: auto the offsetLeft and marginLeft // are the same in Safari causing offset.left to incorrectly be 0 offset.top -= num( this, 'marginTop' ); offset.left -= num( this, 'marginLeft' ); // Add offsetParent borders parentOffset.top += num( offsetParent, 'borderTopWidth' ); parentOffset.left += num( offsetParent, 'borderLeftWidth' ); // Subtract the two offsets results = { top: offset.top - parentOffset.top, left: offset.left - parentOffset.left }; } return results; }, offsetParent: function() { /// <summary> /// This method is internal. /// </summary> /// <private /> var offsetParent = this[0].offsetParent || document.body; while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && jQuery.css(offsetParent, 'position') == 'static') ) offsetParent = offsetParent.offsetParent; return jQuery(offsetParent); } }); // Create scrollLeft and scrollTop methods jQuery.each( ['Left'], function(i, name) { var method = 'scroll' + name; jQuery.fn[ method ] = function(val) { /// <summary> /// Gets and optionally sets the scroll left offset of the first matched element. /// </summary> /// <param name="val" type="Number" integer="true" optional="true">A positive number representing the desired scroll left offset.</param> /// <returns type="Number" integer="true">The scroll left offset of the first matched element.</returns> if (!this[0]) return null; return val !== undefined ? // Set the scroll offset this.each(function() { this == window || this == document ? window.scrollTo( !i ? val : jQuery(window).scrollLeft(), i ? val : jQuery(window).scrollTop() ) : this[ method ] = val; }) : // Return the scroll offset this[0] == window || this[0] == document ? self[ i ? 'pageYOffset' : 'pageXOffset' ] || jQuery.boxModel && document.documentElement[ method ] || document.body[ method ] : this[0][ method ]; }; }); // Create scrollLeft and scrollTop methods jQuery.each( ['Top'], function(i, name) { var method = 'scroll' + name; jQuery.fn[ method ] = function(val) { /// <summary> /// Gets and optionally sets the scroll top offset of the first matched element. /// </summary> /// <param name="val" type="Number" integer="true" optional="true">A positive number representing the desired scroll top offset.</param> /// <returns type="Number" integer="true">The scroll top offset of the first matched element.</returns> if (!this[0]) return null; return val !== undefined ? // Set the scroll offset this.each(function() { this == window || this == document ? window.scrollTo( !i ? val : jQuery(window).scrollLeft(), i ? val : jQuery(window).scrollTop() ) : this[ method ] = val; }) : // Return the scroll offset this[0] == window || this[0] == document ? self[ i ? 'pageYOffset' : 'pageXOffset' ] || jQuery.boxModel && document.documentElement[ method ] || document.body[ method ] : this[0][ method ]; }; }); // Create innerHeight, innerWidth, outerHeight and outerWidth methods jQuery.each([ "Height" ], function(i, name){ var tl = i ? "Left" : "Top", // top or left br = i ? "Right" : "Bottom", // bottom or right lower = name.toLowerCase(); // innerHeight and innerWidth jQuery.fn["inner" + name] = function(){ /// <summary> /// Gets the inner height of the first matched element, excluding border but including padding. /// </summary> /// <returns type="Number" integer="true">The outer height of the first matched element.</returns> return this[0] ? jQuery.css( this[0], lower, false, "padding" ) : null; }; // outerHeight and outerWidth jQuery.fn["outer" + name] = function(margin) { /// <summary> /// Gets the outer height of the first matched element, including border and padding by default. /// </summary> /// <param name="margins" type="Map">A set of key/value pairs that specify the options for the method.</param> /// <returns type="Number" integer="true">The outer height of the first matched element.</returns> return this[0] ? jQuery.css( this[0], lower, false, margin ? "margin" : "border" ) : null; }; var type = name.toLowerCase(); jQuery.fn[ type ] = function( size ) { /// <summary> /// Set the CSS height of every matched element. If no explicit unit /// was specified (like 'em' or '%') then &quot;px&quot; is added to the width. If no parameter is specified, it gets /// the current computed pixel height of the first matched element. /// Part of CSS /// </summary> /// <returns type="jQuery" type="jQuery" /> /// <param name="cssProperty" type="String"> /// Set the CSS property to the specified value. Omit to get the value of the first matched element. /// </param> // Get window width or height return this[0] == window ? // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ] : // Get document width or height this[0] == document ? // Either scroll[Width/Height] or offset[Width/Height], whichever is greater Math.max( document.documentElement["client" + name], document.body["scroll" + name], document.documentElement["scroll" + name], document.body["offset" + name], document.documentElement["offset" + name] ) : // Get or set width or height on the element size === undefined ? // Get width or height on the element (this.length ? jQuery.css( this[0], type ) : null) : // Set the width or height on the element (default to pixels if value is unitless) this.css( type, typeof size === "string" ? size : size + "px" ); }; }); // Create innerHeight, innerWidth, outerHeight and outerWidth methods jQuery.each([ "Width" ], function(i, name){ var tl = i ? "Left" : "Top", // top or left br = i ? "Right" : "Bottom", // bottom or right lower = name.toLowerCase(); // innerHeight and innerWidth jQuery.fn["inner" + name] = function(){ /// <summary> /// Gets the inner width of the first matched element, excluding border but including padding. /// </summary> /// <returns type="Number" integer="true">The outer width of the first matched element.</returns> return this[0] ? jQuery.css( this[0], lower, false, "padding" ) : null; }; // outerHeight and outerWidth jQuery.fn["outer" + name] = function(margin) { /// <summary> /// Gets the outer width of the first matched element, including border and padding by default. /// </summary> /// <param name="margins" type="Map">A set of key/value pairs that specify the options for the method.</param> /// <returns type="Number" integer="true">The outer width of the first matched element.</returns> return this[0] ? jQuery.css( this[0], lower, false, margin ? "margin" : "border" ) : null; }; var type = name.toLowerCase(); jQuery.fn[ type ] = function( size ) { /// <summary> /// Set the CSS width of every matched element. If no explicit unit /// was specified (like 'em' or '%') then &quot;px&quot; is added to the width. If no parameter is specified, it gets /// the current computed pixel width of the first matched element. /// Part of CSS /// </summary> /// <returns type="jQuery" type="jQuery" /> /// <param name="cssProperty" type="String"> /// Set the CSS property to the specified value. Omit to get the value of the first matched element. /// </param> // Get window width or height return this[0] == window ? // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ] : // Get document width or height this[0] == document ? // Either scroll[Width/Height] or offset[Width/Height], whichever is greater Math.max( document.documentElement["client" + name], document.body["scroll" + name], document.documentElement["scroll" + name], document.body["offset" + name], document.documentElement["offset" + name] ) : // Get or set width or height on the element size === undefined ? // Get width or height on the element (this.length ? jQuery.css( this[0], type ) : null) : // Set the width or height on the element (default to pixels if value is unitless) this.css( type, typeof size === "string" ? size : size + "px" ); }; }); })();
02cdnth2
trunk/Test/Scripts/jquery-1.3.2-vsdoc2.js
JavaScript
epl
193,070
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage.master" CodeFile="DealDuLich.aspx.cs" Inherits="DealDuLich" %> <%@ Register Assembly="ASPnetPagerV2_8" Namespace="ASPnetControls" TagPrefix="cc1" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:Repeater ID ="repeater1" runat ="server" OnItemDataBound="repeater1_ItemDataBound"> <ItemTemplate > <div class="box" > <div class="sect" > <ul class="deals-list" > <li style =" background-color :White"> <h4><asp:HyperLink ID ="hyp_tensp" runat ="server" ></asp:HyperLink> <span class="time" style="color:#999;"><asp:Literal ID ="lit_ngaythang" runat ="server" ></asp:Literal></span></h4> <div class="pic"> <div class="isopen"></div> <asp:Image ID="img_HinhAnh" runat ="server" Height ="120" Width ="200" /> </a> </div> <div class="info"> <p class="total" align="center"><strong class="count"><asp:Literal ID ="lit_count" runat ="server" ></asp:Literal></strong><br>người đã mua<!--persons have bought--></p> </div> <div class="clear"> <table border="0" width="100%"> <tbody> <tr> <td class="price"><!--Original price:-->Giá gốc: <strong class="old"><asp:Literal ID ="lit_old" runat ="server" ></asp:Literal><span class="money">VNĐ</span></strong></td> <td class="price">Giảm: <strong class="discount"><asp:Literal ID ="lit_discount" runat ="server" ></asp:Literal></strong></td> </tr> <tr> <td class="price">Giá bán: <strong><asp:Literal ID ="lit_giaban" runat ="server" ></asp:Literal> <span class="money">VNĐ</span></strong></td> <td class="price">Tiết kiệm: <strong><asp:Literal ID ="lit_tietkiem" runat ="server" ></asp:Literal> <span class="money">VNĐ</span></strong></td> </tr> </tbody> </table> </div> </li> </ul> </div> </div> </ItemTemplate> </asp:Repeater> <div style="width:100%; "> <div style="float:right ;"> <cc1:PagerV2_8 ID="PagerV2_8_1" runat="server" /> </div> </div> </asp:Content>
02cdnth2
trunk/Test/DealDuLich.aspx
ASP.NET
epl
2,902
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using Entities; using Utility; using BUS; public partial class test : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { LoadData(); } } private void LoadData() { tbSanPhamCollection spCollection = tbSanPhamBUS.GetAll(); tbLoaiSPCollection loaispCollection = tbLoaiSPBUS.GetAll(); Repeater1.DataSource = spCollection; Repeater1.DataBind(); Repeater2.DataSource = loaispCollection; Repeater2.DataBind(); } protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { tbSanPham sanpham = (tbSanPham)e.Item.DataItem; HyperLink hyp_tensp = (HyperLink)e.Item.FindControl("hyp_tensp"); Image img_HinhAnh = (Image)e.Item.FindControl("img_hinhanh"); Literal lit_giaban = (Literal)e.Item.FindControl("lit_giaban"); Literal lit_giatrithuc = (Literal)e.Item.FindControl("lit_giatrithuc"); Literal lit_songuoimua = (Literal)e.Item.FindControl("lit_songuoimua"); HiddenField hf_id = (HiddenField)e.Item.FindControl("hf_id"); HyperLink hyp_xem = (HyperLink)e.Item.FindControl("hyp_xem"); hyp_tensp.Text = sanpham.TenSP; lit_giaban.Text = sanpham.GiaBan.ToString(); lit_giatrithuc.Text = sanpham.GiaTriThuc.ToString(); lit_songuoimua.Text = sanpham.SLDaBan.ToString(); hf_id.Value = sanpham.IdSanPham.ToString(); hyp_xem.NavigateUrl = "Detail.aspx?id=" + sanpham.IdSanPham.ToString(); int Id = 0; int MaHA = tbHinhAnhBUS.FirstImage(int.Parse(sanpham.IdSanPham.ToString()), Id); if (MaHA > 0) { tbHinhAnh hinhAnh = tbHinhAnhBUS.GetById(MaHA); img_HinhAnh.ImageUrl = "~/Photos/" + hinhAnh.TenHinh.ToString(); } else { img_HinhAnh.ImageUrl = "~/Photos/no_images.jpg"; } } } protected void Repeater2_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { tbLoaiSP loaiSP=(tbLoaiSP )e.Item .DataItem ; HyperLink hyp_loaisp = (HyperLink)e.Item.FindControl("hyp_loaisp"); hyp_loaisp.Text = loaiSP.TenLoai; } } }
02cdnth2
trunk/Test/test.aspx.cs
C#
epl
2,944
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using Entities; using BUS; using Utility; public partial class DealGanDay : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { LoadData(); } } private void LoadData() { tbLoaiSP loaiSP = tbLoaiSPBUS.GetId(6); int Total = 0; Criteria Cri = new Criteria(); Cri.add(Condition.AND, tbSanPhamColumns.IdLoaiSP, Condition.EQUAL, loaiSP.IdLoaiSP.ToString()); tbSanPhamCollection sanPhamCollection = tbSanPhamBUS.Get(Cri.Criter, PagerV2_8_1.CurrentIndex, PagerV2_8_1.PageSize, tbSanPhamColumns.IdLoaiSP.ToString(), OrderDirection.ASC.ToString(), out Total); repeater1.DataSource= sanPhamCollection; repeater1.DataBind(); PagerV2_8_1.ItemCount = Total; if (PagerV2_8_1.ItemCount <= PagerV2_8_1.PageSize) PagerV2_8_1.Visible = false; else PagerV2_8_1.Visible = true; } protected void repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { tbSanPham sanPham = (tbSanPham)e.Item.DataItem; HyperLink hyp_tensp = (HyperLink)e.Item.FindControl("hyp_tensp"); Literal lit_old = (Literal)e.Item.FindControl("lit_old"); Literal lit_giaban = (Literal)e.Item.FindControl("lit_giaban"); Literal lit_tietkiem = (Literal)e.Item.FindControl("lit_tietkiem"); Literal lit_count = (Literal)e.Item.FindControl("lit_count"); Image img_HinhAnh = (Image)e.Item.FindControl("img_HinhAnh"); hyp_tensp.Text = sanPham.TenSP; lit_old.Text = sanPham.GiaTriThuc.ToString(); lit_giaban.Text = sanPham.GiaBan.ToString(); lit_count.Text = sanPham.SLDaBan.ToString(); int tietkiem = sanPham.GiaTriThuc - sanPham.GiaBan; lit_tietkiem.Text = tietkiem.ToString(); int Id = 0; int MaHA = tbHinhAnhBUS.FirstImage(int.Parse(sanPham.IdSanPham.ToString()), Id); if (MaHA > 0) { tbHinhAnh hinhAnh = tbHinhAnhBUS.GetById(MaHA); img_HinhAnh.ImageUrl = "~/Photos/" + hinhAnh.TenHinh.ToString(); } else { img_HinhAnh.ImageUrl = "~/Photos/no_images.jpg"; } } } }
02cdnth2
trunk/Test/DealGanDay.aspx.cs
C#
epl
2,931
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Detail.aspx.cs" Inherits="Detail" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <div style="width :94%;" class ="deal_feature"> <div><h3 style="text-align: justify" ><asp:Literal ID="lit_tensp" runat ="server" ></asp:Literal></h3></div> <div style ="width :30% ; float :left; "> <table style="border-left-color: #009933; border-bottom-color: #009933; border-top-style: solid; border-top-color: #009933; border-right-style: solid; border-left-style: solid; border-right-color: #009933; border-bottom-style: solid" > <tr> <td colspan="2" style="height: 17px"> </td> </tr> <tr> <td colspan="2" style="background-color: #99cccc">Giá gốc: <asp:Literal ID ="lit_giagoc" runat ="server"></asp:Literal> </td> </tr> <tr> <td style="background-color: #99cccc">Giảm: 30%</td> <td style="background-color: #99cccc">Tiết kiệm: 2.381.000 VNĐ</td> </tr> </table> </div> <div style ="width :64% ; margin-right :0"> <asp:Image ID ="img_hinh" runat ="server" /> </div> </div> </asp:Content>
02cdnth2
trunk/Test/Detail.aspx
ASP.NET
epl
1,446
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using Entities; using BUS; using Utility; public partial class Homnay : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { LoadData(); } } private void LoadData() { tbSanPhamCollection spCollection = tbSanPhamBUS.GetAll(); repeater1.DataSource = spCollection; repeater1.DataBind(); } protected void repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { tbSanPham sanPham = (tbSanPham)e.Item.DataItem; HyperLink hyp_tensp = (HyperLink)e.Item.FindControl("hyp_tensp"); Literal lit_old = (Literal)e.Item.FindControl("lit_old"); Literal lit_giaban = (Literal)e.Item.FindControl("lit_giaban"); Literal lit_tietkiem = (Literal)e.Item.FindControl("lit_tietkiem"); Literal lit_count = (Literal)e.Item.FindControl("lit_count"); Image img_HinhAnh = (Image)e.Item.FindControl("img_HinhAnh"); hyp_tensp.Text = sanPham.TenSP; lit_old.Text = sanPham.GiaTriThuc.ToString (); lit_giaban.Text = sanPham.GiaBan.ToString (); lit_count.Text = sanPham.SLDaBan.ToString(); int tietkiem= sanPham .GiaTriThuc - sanPham .GiaBan ; lit_tietkiem.Text = tietkiem.ToString(); int Id = 0; int MaHA = tbHinhAnhBUS.FirstImage(int.Parse(sanPham.IdSanPham.ToString()), Id); if (MaHA > 0) { tbHinhAnh hinhAnh = tbHinhAnhBUS.GetById(MaHA); img_HinhAnh.ImageUrl = "~/Photos/" + hinhAnh.TenHinh.ToString(); } else { img_HinhAnh.ImageUrl = "~/Photos/no_images.jpg"; } } } }
02cdnth2
trunk/Test/Homnay.aspx.cs
C#
epl
2,245
<%@ Page Language="C#" MasterPageFile ="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="DoanhNghiepList.aspx.cs" Inherits="Admin_DoanhNghiepList" %> <%@ Register Assembly="ASPnetPagerV2_8" Namespace="ASPnetControls" TagPrefix="cc1" %> <asp:Content ID ="Content1" ContentPlaceHolderID ="menuPlaceHolder" runat ="server" > <h5 >Menu</h5> <ul class ="Actions"> <li > <a href ="sanphamAdd.aspx" >Thêm mới sản phẩm</a></li> <li > <a href ="sanphamList.aspx" >Danh sách Sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="DiaDiemAdd.aspx" >Thêm mới Địa điểm</a></li> <li > <a href ="DiaDiemList.aspx" >Danh sách Đại điểm</a></li> </ul> <ul class ="Actions"> <li > <a href ="DoanhNghiepAdd.aspx" >Thêm mới Doanh nghiệp</a></li> <li class ="Selected"> <a href ="DoanhNghiepList.aspx" >Danh sách Doanh nghiệp</a></li> </ul> <ul class ="Actions"> <li > <a href ="KhachHangAdd.aspx" >Thêm mới Khách hàng</a></li> <li > <a href ="KhachHangList.aspx" >Danh sách Khach hàng</a></li> </ul> <ul class ="Actions"> <li > <a href ="NhanVienAdd.aspx" >Thêm mới Nhân viên</a></li> <li > <a href ="NhanVienList.aspx" >Danh sách Nhân viên</a></li> </ul> <ul class ="Actions"> <li > <a href ="HinhThucTTAdd.aspx" >Thêm mới Hình thức thanh toán</a></li> <li > <a href ="HinhThucTTList.aspx" >Danh sách Hình thức thanh toán</a></li> </ul> <ul class ="Actions"> <li > <a href ="LoaiSPAdd.aspx" >Thêm mới Loại sản phẩm</a></li> <li > <a href ="LoaiSPList.aspx" >Danh sách Loại sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="MaSoSPList.aspx" >Danh sách Mã số sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="TrangThaiSPAdd.aspx" >Thêm mới Trạng thái sản phẩm</a></li> <li > <a href ="TrangThaiSPList.aspx" >Danh sách Trạng thái sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="TrangThaiDHList.aspx" >Danh sách Trạng thái đơn hàng</a></li> <li ><a href ="TTGiaoDichList.aspx" >Danh sách Thông tin giao dịch</a></li> </ul></asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="contentPlaceHolder" Runat="Server"> <div style="padding:12px 12px 12px 12px;"> <div> <div class="title"> Danh sách Doanh Nghiệp </div> <div style="width:100%;"> <div style="display:table-cell; width:70%;float:left;"> Tên doanh nghiệp: <asp:TextBox ID="txt_TenDN" runat="server"></asp:TextBox> <asp:Button ID="btn_Search" runat="server" Text="Tìm kiếm" OnClick="btn_Search_Click" /> </div> <div class="addnewrow" style="display:table-cell; width:25%;float:right;"> <a href ="DoanhNghiepAdd.aspx" >Thêm mới ND</a> | <asp:LinkButton ID="lbt_Delete" runat="server" OnClick="lbt_Delete_Click">Xóa</asp:LinkButton> </div> </div> <ContentTemplate> <div> <asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound"> <HeaderTemplate> <table cellspacing="1" cellpadding="3" width="100%" bgcolor="#cccccc" border="0"> <thead> <tr class="listtableheader"> <th>Mã DN</th> <th>Tên DN</th> <th>Sửa</th> <th><input id="cb_All" type="checkbox" onclick="CheckAll(1);" /><a href="javascript:CheckAll(2)">Chọn hết</a></th> </tr> </thead> <tbody> </HeaderTemplate> <ItemTemplate> <tr> <td><asp:Literal ID="lit_MaDN" runat="server" /></td> <td><asp:HyperLink ID="hyp_TenDN" runat="server"></asp:HyperLink></td> <td><asp:HyperLink ID="hyp_Edit" Text="Edit" runat="server" /></td> <td> <asp:CheckBox ID="cb_Xoa" runat="server" /> <asp:HiddenField ID="hf_id" runat="server" /> </td> </tr> </ItemTemplate> <FooterTemplate> </tbody> </table> </FooterTemplate> </asp:Repeater> </div> <div style="width:100%;"> <div style="float:left;"> <cc1:PagerV2_8 ID="PagerV2_8_1" runat="server" OnCommand="pager_Command" ></cc1:PagerV2_8> </div> </div> </ContentTemplate> </div> </div> </asp:Content>
02cdnth2
trunk/Test/Admin/DoanhNghiepList.aspx
ASP.NET
epl
5,017
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using Utility; using Entities; using BUS; public partial class Admin_NhanVienAdd : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void btn_Add_Click(object sender, EventArgs e) { tbNhanVien nhanvien = new tbNhanVien(); nhanvien.TaiKhoan = txt_TaiKhoan.Text; nhanvien.MatKhau = txt_MatKhau.Text; nhanvien.TenNhanVien = txt_TenNV.Text; nhanvien.DiaChi = txt_DiaChi.Text; nhanvien.DienThoai = txt_DienThoai.Text; tbNhanVienBUS.Insert_NhanVien(nhanvien); Response.Redirect("~/Admin/NhanVienList.aspx"); } }
02cdnth2
trunk/Test/Admin/NhanVienAdd.aspx.cs
C#
epl
926
<%@ Page Language="C#" MasterPageFile ="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="MaSoSPList.aspx.cs" Inherits="Admin_MaSoSPList" %> <%@ Register Assembly="ASPnetPagerV2_8" Namespace="ASPnetControls" TagPrefix="cc1" %> <asp:Content ID ="Content1" ContentPlaceHolderID ="menuPlaceHolder" runat ="server" > <h5 >Menu</h5> <ul class ="Actions"> <li > <a href ="sanphamAdd.aspx" >Thêm mới sản phẩm</a></li> <li > <a href ="sanphamList.aspx" >Danh sách Sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="DiaDiemAdd.aspx" >Thêm mới Địa điểm</a></li> <li > <a href ="DiaDiemList.aspx" >Danh sách Đại điểm</a></li> </ul> <ul class ="Actions"> <li > <a href ="DoanhNghiepAdd.aspx" >Thêm mới Doanh nghiệp</a></li> <li > <a href ="DoanhNghiepList.aspx" >Danh sách Doanh nghiệp</a></li> </ul> <ul class ="Actions"> <li > <a href ="KhachHangAdd.aspx" >Thêm mới Khách hàng</a></li> <li > <a href ="KhachHangList.aspx" >Danh sách Khach hàng</a></li> </ul> <ul class ="Actions"> <li > <a href ="NhanVienAdd.aspx" >Thêm mới Nhân viên</a></li> <li > <a href ="NhanVienList.aspx" >Danh sách Nhân viên</a></li> </ul> <ul class ="Actions"> <li > <a href ="HinhThucTTAdd.aspx" >Thêm mới Hình thức thanh toán</a></li> <li > <a href ="HinhThucTTList.aspx" >Danh sách Hình thức thanh toán</a></li> </ul> <ul class ="Actions"> <li > <a href ="LoaiSPAdd.aspx" >Thêm mới Loại sản phẩm</a></li> <li > <a href ="LoaiSPList.aspx" >Danh sách Loại sản phẩm</a></li> </ul> <ul class ="Actions"> <li class ="Selected"> <a href ="MaSoSPList.aspx" >Danh sách Mã số sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="TrangThaiSPAdd.aspx" >Thêm mới Trạng thái sản phẩm</a></li> <li > <a href ="TrangThaiSPList.aspx" >Danh sách Trạng thái sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="TrangThaiDHList.aspx" >Danh sách Trạng thái đơn hàng</a></li> <li ><a href ="TTGiaoDichList.aspx" >Danh sách Thông tin giao dịch</a></li> </ul></asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="contentPlaceHolder" Runat="Server"> <div style="padding:12px 12px 12px 12px;"> <div> <div class="title"> Danh sách mã số sản phẩm </div> <div style="width:100%;"> <div style="display:table-cell; width:90%;float:left;"> Id Mã số: <asp:TextBox ID="txt_Id" runat="server"></asp:TextBox> Mã số:<asp:TextBox ID ="txt_MaSo" runat ="server" ></asp:TextBox> <asp:Button ID="btn_Search" runat="server" Text="Tìm kiếm" OnClick="btn_Search_Click" /> </div> </div> <div class="addnewrow"> </div> <div> <asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound"> <HeaderTemplate> <table cellspacing="1" cellpadding="3" width="100%" bgcolor="#cccccc" border="0"> <thead> <tr class="listtableheader"> <th>Mã số SP</th> <th>Mã CTDH</th> <th>Mã Số</th> <th>Trạng thái</th> </tr> </thead> <tbody> </HeaderTemplate> <ItemTemplate> <tr> <td> <asp:Literal ID="lit_MaSoSP" runat="server" /> <asp:HiddenField ID="hf_ID" runat="server" /> </td> <td><%#Eval("IdCTDonHang") %></td> <td><%#Eval("MaSo") %></td> <td> <asp:CheckBox ID="cb_DaGiao" runat="server" /> </td> </tr> </ItemTemplate> <FooterTemplate> </tbody> </table> </FooterTemplate> </asp:Repeater> </div> <div style="width:100%;"> <div style="float:left;"> <cc1:PagerV2_8 ID="PagerV2_8_1" runat="server" OnCommand="pager_Command" ></cc1:PagerV2_8> </div> <div style="float:right;"> <asp:Button ID="btn_Update" runat="server" Text="Update" OnClick="btn_Update_Click" /> </div> </div> </div> </div> </asp:Content>
02cdnth2
trunk/Test/Admin/MaSoSPList.aspx
ASP.NET
epl
4,660
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using Entities; using BUS; public partial class Admin_DiaDiemEdit : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { load_data(); } } private void load_data() { try { int iD = int.Parse(Request.QueryString["id"].ToString()); tbDiaDiem diadiem = tbDiaDiemBUS.GetById(iD); if (diadiem != null) { txt_MaDD.Text = diadiem.IdDiaDiem.ToString(); txt_TenDD.Text = diadiem.TenDiaDiem.ToString(); } } catch { Response.Redirect("~/Admin/DiaDiemList.aspx"); } } protected void btn_Update_Click(object sender, EventArgs e) { try { tbDiaDiem diadiem = tbDiaDiemBUS.GetById(int.Parse(txt_MaDD.Text)); diadiem.TenDiaDiem = txt_TenDD.Text; tbDiaDiemBUS.Update(diadiem); Response.Redirect("~/Admin/DiaDiemList.aspx"); } catch { Response.Redirect("~/Admin/DiaDiemList.aspx"); } } }
02cdnth2
trunk/Test/Admin/DiaDiemEdit.aspx.cs
C#
epl
1,471
<%@ Page Language="C#" MasterPageFile ="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="NhanVienList.aspx.cs" Inherits="Admin_NhanVienList" %> <%@ Register Assembly="ASPnetPagerV2_8" Namespace="ASPnetControls" TagPrefix="cc1" %> <asp:Content ID ="Content1" ContentPlaceHolderID ="menuPlaceHolder" runat ="server" > <h5 >Menu</h5> <ul class ="Actions"> <li > <a href ="sanphamAdd.aspx" >Thêm mới sản phẩm</a></li> <li > <a href ="sanphamList.aspx" >Danh sách Sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="DiaDiemAdd.aspx" >Thêm mới Địa điểm</a></li> <li > <a href ="DiaDiemList.aspx" >Danh sách Đại điểm</a></li> </ul> <ul class ="Actions"> <li > <a href ="DoanhNghiepAdd.aspx" >Thêm mới Doanh nghiệp</a></li> <li > <a href ="DoanhNghiepList.aspx" >Danh sách Doanh nghiệp</a></li> </ul> <ul class ="Actions"> <li > <a href ="KhachHangAdd.aspx" >Thêm mới Khách hàng</a></li> <li > <a href ="KhachHangList.aspx" >Danh sách Khach hàng</a></li> </ul> <ul class ="Actions"> <li > <a href ="NhanVienAdd.aspx" >Thêm mới Nhân viên</a></li> <li class ="Selected"> <a href ="NhanVienList.aspx" >Danh sách Nhân viên</a></li> </ul> <ul class ="Actions"> <li > <a href ="HinhThucTTAdd.aspx" >Thêm mới Hình thức thanh toán</a></li> <li > <a href ="HinhThucTTList.aspx" >Danh sách Hình thức thanh toán</a></li> </ul> <ul class ="Actions"> <li > <a href ="LoaiSPAdd.aspx" >Thêm mới Loại sản phẩm</a></li> <li > <a href ="LoaiSPList.aspx" >Danh sách Loại sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="MaSoSPList.aspx" >Danh sách Mã số sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="TrangThaiSPAdd.aspx" >Thêm mới Trạng thái sản phẩm</a></li> <li > <a href ="TrangThaiSPList.aspx" >Danh sách Trạng thái sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="TrangThaiDHList.aspx" >Danh sách Trạng thái đơn hàng</a></li> <li ><a href ="TTGiaoDichList.aspx" >Danh sách Thông tin giao dịch</a></li> </ul></asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="contentPlaceHolder" Runat="Server"> <div style="padding:12px 12px 12px 12px;"> <div> <div class="title"> Danh sách Nhân viên </div> <div style="width:100%;"> <div style="display:table-cell; width:70%;float:left;"> Tên Nhân viên: <asp:TextBox ID="txt_TenNV" runat="server"></asp:TextBox> <asp:Button ID="btn_Search" runat="server" Text="Tìm kiếm" OnClick="btn_Search_Click" /> </div> <div class="addnewrow" style="display:table-cell; width:25%;float:right;"> <a href ="NhanVienAdd.aspx" >Thêm mới NV</a> | <asp:LinkButton ID="lbt_Delete" runat="server" OnClick="lbt_Delete_Click">Xóa</asp:LinkButton> </div> </div> <ContentTemplate> <div> <asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound"> <HeaderTemplate> <table cellspacing="1" cellpadding="3" width="100%" bgcolor="#cccccc" border="0"> <thead> <tr class="listtableheader"> <th>Mã NV</th> <th>Tên NV</th> <th>Sửa</th> <th><input id="cb_All" type="checkbox" onclick="CheckAll(1);" /><a href="javascript:CheckAll(2)">Chọn hết</a></th> </tr> </thead> <tbody> </HeaderTemplate> <ItemTemplate> <tr> <td><asp:Literal ID="lit_MaNV" runat="server" /></td> <td><asp:HyperLink ID="hyp_TenNV" runat="server"></asp:HyperLink></td> <td><asp:HyperLink ID="hyp_Edit" Text="Edit" runat="server" /></td> <td> <asp:CheckBox ID="cb_Xoa" runat="server" /> <asp:HiddenField ID="hf_id" runat="server" /> </td> </tr> </ItemTemplate> <FooterTemplate> </tbody> </table> </FooterTemplate> </asp:Repeater> </div> <div style="width:100%;"> <div style="float:left;"> <cc1:PagerV2_8 ID="PagerV2_8_1" runat="server" OnCommand ="pager_Command"></cc1:PagerV2_8> </div> </div> </ContentTemplate> </div> </div> </asp:Content>
02cdnth2
trunk/Test/Admin/NhanVienList.aspx
ASP.NET
epl
4,999
<%@ Page Language="C#" MasterPageFile ="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="SanPhamDetail.aspx.cs" Inherits="Admin_SanPhamDetail" %> <%@ Register Assembly="ASPnetPagerV2_8" Namespace="ASPnetControls" TagPrefix="cc1" %> <asp:Content ID ="Content1" ContentPlaceHolderID ="menuPlaceHolder" runat ="server" > <h5 >Menu</h5> <ul class="Actions"> <li > <a href ="sanphamadd.aspx" >Thêm mới sản phẩm</a></li> <li ><a href ="sanPhamList.aspx" >Danh sách Sản phẩm</a></li> </ul> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="contentPlaceHolder" Runat="Server"> <div style="padding:12px 12px 12px 12px;"> <div > <div class="title"> Chi tiết Sản phẩm </div> <div> <table width="100%" cellspacing="1" cellpadding="3" border="0" bgcolor="#cccccc"> <tr> <td style="width:30%">Mã Sản Phẩm</td> <td style="width:70%"> <asp:Literal ID="lit_MaSP" runat="server"></asp:Literal> </td> </tr> <tr> <td style="width:30%">Tên Sản Phẩm</td> <td style="width:70%"> <asp:Literal ID="lit_TenSP" runat="server"></asp:Literal> </td> </tr> <tr> <td style="width:30%">Loại</td> <td style="width:70%"> <asp:Literal ID="lit_Loai" runat="server"></asp:Literal> </td> </tr> <tr> <td style="width:30%">Địa Điểm</td> <td style="width:70%"> <asp:Literal ID="lit_DiaDiem" runat="server"></asp:Literal> </td> </tr> <tr> <td style="width:30%">Trạng Thái SP</td> <td style="width:70%"> <asp:Literal ID="lit_TrangThaiSP" runat="server"></asp:Literal> </td> </tr> <tr> <td style="width:30%">Nhân Viên</td> <td style="width:70%"> <asp:Literal ID="lit_NhanVien" runat="server"></asp:Literal> </td> </tr> <tr> <td style="width:30%">Doanh Nghiệp</td> <td style="width:70%"> <asp:Literal ID="lit_DoanhNghiep" runat="server"></asp:Literal> </td> </tr> <tr> <td style="width:30%">Giá Bán</td> <td style="width:70%"> <asp:Literal ID="lit_GiaBan" runat="server"></asp:Literal> </td> </tr> <tr> <td style="width:30%">Giá Trị Thực</td> <td style="width:70%"> <asp:Literal ID="lit_GiaTriThuc" runat="server"></asp:Literal> </td> </tr> <tr> <td style="width:30%">DK Sử dụng</td> <td style="width:70%"> <asp:TextBox ID="txt_DKSuDung" runat="server" TextMode ="MultiLine" ReadOnly ="true" ></asp:TextBox> </td> </tr> <tr> <td style="width:30%">Mô Tả</td> <td style="width:70%"> <asp:TextBox ID="txt_MoTa" runat="server" TextMode ="MultiLine" ReadOnly ="true" ></asp:TextBox> </td> </tr> <tr> <td style="width:30%">Sl Bán</td> <td style="width:70%"> <asp:Literal ID="lit_SLBan" runat="server"></asp:Literal> </td> </tr> <tr> <td style="width:30%">SL Đã Bán</td> <td style="width:70%"> <asp:Literal ID="lit_SLDaBan" runat="server"></asp:Literal> </td> </tr> <tr> <td style="width:30%">Ngày Bắt Đầu Bán</td> <td style="width:70%"> <asp:Literal ID="lit_NgayBDBan" runat="server"></asp:Literal> </td> </tr> <tr> <td style="width:30%">Ngày Kết Thúc Bán</td> <td style="width:70%"> <asp:Literal ID="lit_NgayKTBan" runat="server"></asp:Literal> </td> </tr> <tr> <td style="width:30%">Ngày Cập Nhật</td> <td style="width:70%"> <asp:Literal ID="lit_NgayCapNhat" runat="server"></asp:Literal> </td> </tr> <tr> <td style="width:30%">Ngày Doanh Nghiệp Bán</td> <td style="width:70%"> <asp:Literal ID="lit_NgayDNBan" runat="server"></asp:Literal> </td> </tr> <tr> <td style="width:30%">Tỉ Lệ Hoa Hồng</td> <td style="width:70%"> <asp:Literal ID="lit_TLHoaHong" runat="server"></asp:Literal> </td> </tr> <tr> <td style="width:30%">Hình Ảnh</td> <td style="width:70%"> <div style="padding-top:10px;"> <asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound"> <HeaderTemplate> <table cellspacing="1" cellpadding="3" width="100%" bgcolor="#cccccc" border="0"> <thead> <tr class="listtableheader"> <th>Tên Hình </th> <th>Hình Ảnh</th> </tr> </thead> <tbody> </HeaderTemplate> <ItemTemplate> <tr> <td> <asp:Literal ID="lit_Hinh" runat="server"></asp:Literal></td> <td> <asp:Image ID ="img_HinhAnh" runat ="server" /></td> </tr> </ItemTemplate> <FooterTemplate> </tbody> </table> </FooterTemplate> </asp:Repeater> </div> <div style="width:100%;"> <div style="float:left;"> <cc1:PagerV2_8 ID="PagerV2_8_1" runat="server" OnCommand="pager_Command" ></cc1:PagerV2_8> </div> </div> </td> </tr> </table> </div> </div> </div> </asp:Content>
02cdnth2
trunk/Test/Admin/SanPhamDetail.aspx
ASP.NET
epl
7,399
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using Entities; using BUS; using Utility; public partial class Admin_LoaiSPList : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { load_data(); } } private void load_data() { PagerV2_8_1.PageSize = 5; Criteria cri = new Criteria(); int Total = 0; if (txt_TenLoai.Text != "") { cri.add(Condition.AND, tbLoaiSPColumns.TenLoai.ToString(), Condition.LIKE, txt_TenLoai.Text); } //PagerV2_8_1 .PageSize =int.Parse (ConfigurationManager.AppSettings ["pagesize"].ToString ()); tbLoaiSPCollection loaispcolection= tbLoaiSPBUS .Get (cri .Criter ,PagerV2_8_1 .CurrentIndex , PagerV2_8_1 .PageSize ,tbLoaiSPColumns .IdLoaiSP .ToString (), OrderDirection .ASC .ToString (),out Total ); Repeater1 .DataSource =loaispcolection ; Repeater1.DataBind(); PagerV2_8_1.ItemCount = Total; if (Total <= PagerV2_8_1.PageSize) PagerV2_8_1.Visible = false; } protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { Literal hyp_TenLoai = (Literal)e.Item.FindControl("hyp_TenLoai"); Literal lit_Ma = (Literal)e.Item.FindControl("lit_Ma"); HyperLink hyp_Edit = (HyperLink)e.Item.FindControl("hyp_Edit"); HiddenField hf_id=(HiddenField )e.Item .FindControl ("hf_id"); tbLoaiSP loaisp = (tbLoaiSP)e.Item.DataItem; lit_Ma.Text = loaisp.IdLoaiSP.ToString (); hyp_TenLoai.Text = loaisp.TenLoai; hyp_Edit.NavigateUrl = "LoaiSpEdit.aspx?id=?" + loaisp.IdLoaiSP.ToString(); hf_id.Value = loaisp.IdLoaiSP.ToString(); } } protected void lbt_Delete_Click(object sender, EventArgs e) { foreach (RepeaterItem item in this.Repeater1.Items) { CheckBox chk = (CheckBox)item.FindControl("cb_xoa"); if (chk.Checked == true) { HiddenField hf_id = (HiddenField)item.FindControl("hf_id"); tbLoaiSPBUS.delete(int.Parse(hf_id.Value)); } } load_data(); } protected void pager_Command(object sender, CommandEventArgs e) { PagerV2_8_1.CurrentIndex = int.Parse(e.CommandArgument.ToString()); load_data(); } protected void btn_Search_Click(object sender, EventArgs e) { load_data(); } }
02cdnth2
trunk/Test/Admin/LoaiSPList.aspx.cs
C#
epl
3,069
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using Entities; using Utility; using BUS; public partial class Admin_DoanhNghiepDetail : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { load_data(); } } private void load_data() { try { int iD = int.Parse(Request.QueryString["id"].ToString()); tbDoanhNghiep doanhnghiep = tbDoanhNghiepBUS.GetById(iD); if (doanhnghiep != null) { lit_MaDN.Text = doanhnghiep.IdDoanhNghiep.ToString(); lit_TenDN.Text = doanhnghiep.TenDoanhNghiep.ToString(); lit_DiaChi.Text = doanhnghiep.DiaChi.ToString(); lit_DienThoai.Text = doanhnghiep.DienThoai.ToString(); } } catch { Response.Redirect("~/Admin/DoanhNghiepList.aspx"); } } }
02cdnth2
trunk/Test/Admin/DoanhNghiepDetail.aspx.cs
C#
epl
1,210
<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="NhanVienDetail.aspx.cs" Inherits="Admin_NhanVienDetail" %> <%@ Register Assembly="ASPnetPagerV2_8" Namespace="ASPnetControls" TagPrefix="cc1" %> <asp:Content ID ="Content1" ContentPlaceHolderID ="menuPlaceHolder" runat ="server" > <h5 >Menu</h5> <ul class ="Actions"> <li > <a href ="NhanVienAdd.aspx" >Thêm mới Nhân viên</a></li> <li ><a href ="nhanvienlist.aspx" >Danh sách Nhân viên</a></li> </ul> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="contentPlaceHolder" Runat="Server"> <div style="padding:12px 12px 12px 12px;"> <div> <div class="title"> Chi tiết Nhân viên </div> <div> <table width="100%" cellspacing="1" cellpadding="3" border="0" bgcolor="#cccccc"> <tr> <td style="width:30%">Mã Nhân viên</td> <td style="width:70%"><asp:Literal ID="lit_MaNV" runat="server"></asp:Literal></td> </tr> <tr> <td style="width:30%">Tài Khoản</td> <td style="width:70%"><asp:Literal ID="lit_TaiKhoan" runat="server"></asp:Literal></td> </tr> <tr> <td style="width:30%">Mật Khẩu</td> <td style="width:70%"><asp:Literal ID="lit_MatKhau" runat="server"></asp:Literal></td> </tr> <tr> <td style="width:30%">Tên Nhân viên</td> <td style="width:70%"><asp:Literal ID="lit_TenNV" runat="server"></asp:Literal></td> </tr> <tr> <td style="width:30%">Địa chỉ</td> <td style="width:70%"><asp:Literal ID="lit_DiaChi" runat="server"></asp:Literal></td> </tr> <tr> <td style="width:30%">Điện thoại</td> <td style="width:70%"><asp:Literal ID="lit_DienThoai" runat="server"></asp:Literal></td> </tr> </table> </div> </div> </div> </asp:Content>
02cdnth2
trunk/Test/Admin/NhanVienDetail.aspx
ASP.NET
epl
2,347
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using Utility; using Entities; using BUS; public partial class Admin_LoaiSPAdd : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void btn_Add_Click(object sender, EventArgs e) { tbLoaiSP loaisp = new tbLoaiSP(); loaisp.TenLoai = txt_TenLoai.Text; tbLoaiSPBUS.Insert(loaisp); Response.Redirect("~/Admin/LoaiSPList.aspx"); } }
02cdnth2
trunk/Test/Admin/LoaiSPAdd.aspx.cs
C#
epl
712
<%@ Page Language="C#" MasterPageFile ="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="LoaiSPAdd.aspx.cs" Inherits="Admin_LoaiSPAdd" %> <%@ Register Assembly="ASPnetPagerV2_8" Namespace="ASPnetControls" TagPrefix="cc1" %> <asp:Content ID ="Content1" ContentPlaceHolderID ="menuPlaceHolder" runat ="server" > <h5 >Menu</h5> <ul class ="Actions"> <li > <a href ="sanphamAdd.aspx" >Thêm mới sản phẩm</a></li> <li > <a href ="sanphamList.aspx" >Danh sách Sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="DiaDiemAdd.aspx" >Thêm mới Địa điểm</a></li> <li > <a href ="DiaDiemList.aspx" >Danh sách Đại điểm</a></li> </ul> <ul class ="Actions"> <li > <a href ="DoanhNghiepAdd.aspx" >Thêm mới Doanh nghiệp</a></li> <li > <a href ="DoanhNghiepList.aspx" >Danh sách Doanh nghiệp</a></li> </ul> <ul class ="Actions"> <li > <a href ="KhachHangAdd.aspx" >Thêm mới Khách hàng</a></li> <li > <a href ="KhachHangList.aspx" >Danh sách Khach hàng</a></li> </ul> <ul class ="Actions"> <li > <a href ="NhanVienAdd.aspx" >Thêm mới Nhân viên</a></li> <li > <a href ="NhanVienList.aspx" >Danh sách Nhân viên</a></li> </ul> <ul class ="Actions"> <li > <a href ="HinhThucTTAdd.aspx" >Thêm mới Hình thức thanh toán</a></li> <li > <a href ="HinhThucTTList.aspx" >Danh sách Hình thức thanh toán</a></li> </ul> <ul class ="Actions"> <li class ="Selected"> <a href ="LoaiSPAdd.aspx" >Thêm mới Loại sản phẩm</a></li> <li > <a href ="LoaiSPList.aspx" >Danh sách Loại sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="MaSoSPList.aspx" >Danh sách Mã số sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="TrangThaiSPAdd.aspx" >Thêm mới Trạng thái sản phẩm</a></li> <li > <a href ="TrangThaiSPList.aspx" >Danh sách Trạng thái sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="TrangThaiDHList.aspx" >Danh sách Trạng thái đơn hàng</a></li> <li ><a href ="TTGiaoDichList.aspx" >Danh sách Thông tin giao dịch</a></li> </ul></asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="contentPlaceHolder" Runat="Server"> <div style="padding:12px 12px 12px 12px;"> <div> <div class="title"> Thêm mới Loại SP </div> <div> <table width="100%" cellspacing="1" cellpadding="3" border="0" bgcolor="#cccccc"> <tr> <td style="width:30%">Tên Loại</td> <td style="width:70%"><asp:TextBox ID="txt_TenLoai" runat="server"></asp:TextBox></td> </tr> <tr> <td style="width:30%"></td> <td style="width:70%"><asp:Button ID="btn_Add" runat="server" Text="Thêm mới" OnClick="btn_Add_Click" /></td> </tr> </table> </div> </div> </div> </asp:Content>
02cdnth2
trunk/Test/Admin/LoaiSPAdd.aspx
ASP.NET
epl
3,278
function $(str){ return document.getElementById(str); } function CheckAll(obj) { var checkAll = true; var checkList = document.getElementsByTagName("input"); if(obj == 2) { $("cb_All").checked = !$("cb_All").checked; } if(!$("cb_All").checked) checkAll = false; for(var i = 0 ; i < checkList.length ; i++) { if(checkList[i].type == 'checkbox' && checkList[i].id.indexOf("cb_Xoa") >= 0 ) { checkList[i].checked = checkAll; } } } function Message_confirm(Content) { var result = confirm(Content); if(result) { return true; } return false; }
02cdnth2
trunk/Test/Admin/js/JScript.js
JavaScript
epl
692
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using Utility; using Entities; using BUS; public partial class Admin_NhanVienEdit : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { load_data(); } } private void load_data() { try { int id = int.Parse(Request.QueryString["id"].ToString()); tbNhanVien nhanvien = tbNhanVienBUS .GetId (id); if (nhanvien != null) { txt_MaNV .Text = nhanvien.IdNhanVien .ToString(); txt_TaiKhoan.Text = nhanvien.TaiKhoan.ToString(); txt_MatKhau.Text = nhanvien.MatKhau.ToString(); txt_TenNV.Text = nhanvien.TenNhanVien.ToString(); txt_DiaChi.Text = nhanvien.DiaChi.ToString(); txt_DienThoai.Text = nhanvien.DienThoai.ToString(); } } catch { Response.Redirect("~/Admin/NhanVienList.aspx"); } } protected void btn_Update_Click(object sender, EventArgs e) { try { tbNhanVien nhanVien = tbNhanVienBUS.GetId(int.Parse(txt_MaNV.Text)); nhanVien.IdNhanVien = int.Parse (txt_MaNV.Text); nhanVien.TaiKhoan = txt_TaiKhoan.Text; nhanVien.MatKhau = txt_MatKhau.Text; nhanVien.TenNhanVien = txt_TenNV.Text; nhanVien.DiaChi = txt_DiaChi.Text; nhanVien.DienThoai = txt_DienThoai.Text; tbNhanVienBUS.Update_NhanVien(nhanVien); Response.Redirect("~/Admin/SanPhamList.aspx"); } catch { Response.Redirect("~/Admin/SanPhamList.aspx"); } } }
02cdnth2
trunk/Test/Admin/NhanVienEdit.aspx.cs
C#
epl
2,031
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using Entities; using BUS; using Utility; using System.IO; public partial class Admin_SanPhamList : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Load_DropdownList(); load_data(); } } protected void load_data() { PagerV2_8_1 .PageSize = 5; Criteria c = new Criteria(); if (txt_TenSP.Text != "") { c.add(Condition.AND, tbSanPhamColumns.TenSP.ToString (), Condition.LIKE, txt_TenSP .Text); } if (txt_GiaBan .Text != "") { c.add(Condition.AND, tbSanPhamColumns.GiaBan.ToString (), Condition.LIKE, txt_GiaBan.Text); } if (ddl_LoaiSP.SelectedValue != "0") { c.add(Condition.AND, tbSanPhamColumns.IdLoaiSP.ToString (), Condition.LIKE, int.Parse(ddl_LoaiSP.SelectedValue)); } int total = 0; tbSanPhamCollection sanphamcolection = tbSanPhamBUS.Get(c.Criter.ToString(), PagerV2_8_1.CurrentIndex, PagerV2_8_1.PageSize, tbSanPhamColumns.IdSanPham.ToString(), OrderDirection.ASC.ToString(), out total); Repeater1.DataSource = sanphamcolection; Repeater1.DataBind(); PagerV2_8_1.ItemCount = total; if (total <= PagerV2_8_1.PageSize) { PagerV2_8_1.Visible = false; } } protected void Load_DropdownList() { tbLoaiSPCollection loaispColection = tbLoaiSPBUS.GetAll(); ddl_LoaiSP.DataTextField = tbLoaiSPColumns.TenLoai.ToString(); ddl_LoaiSP.DataValueField = tbLoaiSPColumns.IdLoaiSP.ToString(); ddl_LoaiSP.DataSource = loaispColection; ddl_LoaiSP.DataBind(); ddl_LoaiSP.Items.Insert(0, new ListItem("All", "0")); } protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item) { tbSanPham sanPham = (tbSanPham)e.Item.DataItem; HyperLink hyp_TenSP = (HyperLink)e.Item.FindControl("hyp_TenSP"); Literal lit_LoaiSP = (Literal)e.Item.FindControl("lit_LoaiSP"); Image img_HinhAnh = (Image)e.Item.FindControl("img_HinhAnh"); HiddenField hf_id = (HiddenField)e.Item.FindControl("hf_id"); hyp_TenSP.Text = sanPham.TenSP; hyp_TenSP.NavigateUrl = "SanPhamDetail.aspx?id=" + sanPham.IdSanPham.ToString(); tbLoaiSP loaiSP=tbLoaiSPBUS .GetId (int.Parse (sanPham .IdLoaiSP.ToString ())); lit_LoaiSP.Text = loaiSP.TenLoai; int Id = 0; int MaHA = tbHinhAnhBUS.FirstImage (int.Parse(sanPham.IdSanPham.ToString()),Id); if (MaHA > 0) { tbHinhAnh hinhAnh = tbHinhAnhBUS.GetById(MaHA); img_HinhAnh.ImageUrl = "~/Photos/Thumb/" + hinhAnh.TenHinh.ToString(); } else { img_HinhAnh.ImageUrl = "~/Photos/Thumb/no_images.jpg"; } HyperLink hyp_Edit = (HyperLink)e.Item.FindControl("hyp_Edit"); hyp_Edit.NavigateUrl = "SanPhamEdit.aspx?id=" + sanPham.IdSanPham.ToString(); hf_id.Value = sanPham.IdSanPham.ToString(); } } protected void pager_Command(object sender, CommandEventArgs e) { PagerV2_8_1 .CurrentIndex = int.Parse(e.CommandArgument.ToString()); load_data(); } protected void btn_Search_Click(object sender, EventArgs e) { load_data(); } protected void lbt_Delete_Click(object sender, EventArgs e) { foreach (RepeaterItem item in this.Repeater1.Items) { CheckBox chk = (CheckBox)item.FindControl("cb_xoa"); if (chk.Checked == true) { HiddenField hf_id = (HiddenField)item.FindControl("hf_id"); Criteria cri = new Criteria(); int Total = 0; cri.add(Condition.AND, tbCTDonHangColumns.IdSanPham.ToString(), Condition.EQUAL, int.Parse(hf_id.Value)); tbCTDonHangCollection ctdhCollection = tbCTDonHangBUS .Get(cri.Criter, 0, 0, tbDonHangColumns.IdDH.ToString(), OrderDirection.ASC.ToString(), out Total); if (ctdhCollection.Count > 0) { ShowMessage("không thể xóa sản phẩm này"); } else { //gan gia tri cho mang ten hinh string[] array = tbHinhAnhBUS.DeleteImageByIdSP(int.Parse(hf_id.Value)); //xoa hinh anh cua san pham tbHinhAnhBUS.DeleteIdSP(int.Parse(hf_id.Value)); //xoa san pham tbSanPhamBUS.Delete_SP(int.Parse(hf_id.Value)); //xoa hinh trong thu muc Photos foreach (string tenhinh in array) { if (tenhinh == null) { break; } else { File.Delete(Server.MapPath("~/Photos/" + tenhinh.ToString())); File.Delete(Server.MapPath("~/Photos/Thumb/" + tenhinh.ToString())); } } } } } load_data(); } public void ShowMessage(string Content) { ClientScript.RegisterClientScriptBlock(this.GetType(), "", "<script language='javascript'>alert('" + Content + "');</script>"); } }
02cdnth2
trunk/Test/Admin/SanPhamList.aspx.cs
C#
epl
6,134
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using Utility; using Entities; using BUS; public partial class KhachHangList : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { load_data(); } } private void load_data() { PagerV2_8_1.PageSize = 5; int Total = 0; Criteria cri = new Criteria(); if (txt_TenKH.Text != "") { cri.add(Condition.AND, tbKhachHangColumns .HoTen .ToString(), Condition.EQUAL, txt_TenKH.Text); } tbKhachHangCollection KHCollection = tbKhachHangBUS .Get(cri.Criter, PagerV2_8_1.CurrentIndex, PagerV2_8_1.PageSize, tbKhachHangColumns .IdKhachHang .ToString(), OrderDirection.ASC.ToString(), out Total); Repeater1.DataSource = KHCollection; Repeater1.DataBind(); PagerV2_8_1.ItemCount = Total; if (Total <= PagerV2_8_1.PageSize) { PagerV2_8_1.Visible = false; } } protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { HyperLink hyp_TenKH = (HyperLink)e.Item.FindControl("hyp_TenKH"); Literal lit_MaKH = (Literal)e.Item.FindControl("lit_MaKH"); Literal lit_Email = (Literal)e.Item.FindControl("lit_Email"); HyperLink hyp_Edit = (HyperLink)e.Item.FindControl("hyp_Edit"); HiddenField hf_id = (HiddenField)e.Item.FindControl("hf_id"); tbKhachHang khachhang = (tbKhachHang)e.Item.DataItem; lit_MaKH.Text = khachhang .IdKhachHang .ToString(); lit_Email.Text = khachhang.Email.ToString(); hyp_TenKH.NavigateUrl = "KhachHangDetail.aspx?id=" + khachhang.IdKhachHang.ToString(); hyp_Edit.NavigateUrl = "KhachHangEdit.aspx?id=" + khachhang.IdKhachHang.ToString(); hf_id.Value = khachhang.IdKhachHang.ToString(); hyp_TenKH.Text = khachhang.HoTen .ToString(); } } protected void btn_Search_Click(object sender, EventArgs e) { load_data(); } protected void lbt_Delete_Click(object sender, EventArgs e) { foreach (RepeaterItem item in this.Repeater1.Items) { CheckBox chk = (CheckBox)item.FindControl("cb_xoa"); if (chk.Checked == true) { HiddenField hf_id = (HiddenField)item.FindControl("hf_id"); tbKhachHangBUS .Delete (int.Parse(hf_id.Value)); } } load_data(); } protected void pager_Command(object sender, CommandEventArgs e) { PagerV2_8_1.CurrentIndex = int.Parse(e.CommandArgument.ToString()); load_data(); } }
02cdnth2
trunk/Test/Admin/KhachHangList.aspx.cs
C#
epl
3,229
<%@ Page Language="C#" MasterPageFile ="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="KhachHangDetail.aspx.cs" Inherits="Admin_KhachHangDetail" %> <%@ Register Assembly="ASPnetPagerV2_8" Namespace="ASPnetControls" TagPrefix="cc1" %> <asp:Content ID ="Content1" ContentPlaceHolderID ="menuPlaceHolder" runat ="server" > <h5 >Menu</h5> <ul class ="Actions"> <li > <a href ="khachHangAdd.aspx" >Thêm mới Khách Hàng</a></li> <li ><a href ="khachHangList.aspx" >Danh sách Khách Hàng</a></li> </ul> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="contentPlaceHolder" Runat="Server"> <div style="padding:12px 12px 12px 12px;"> <div> <div class="title"> Chi tiết Khách hàng </div> <div> <table width="100%" cellspacing="1" cellpadding="3" border="0" bgcolor="#cccccc"> <tr> <td style="width:30%">Mã khách hàng</td> <td style="width:70%"><asp:Literal ID="lit_MaKH" runat="server"></asp:Literal></td> </tr> <tr> <td style="width:30%">Tên khách hàng</td> <td style="width:70%"><asp:Literal ID="lit_TenKH" runat="server"></asp:Literal></td> </tr> <tr> <td style="width:30%">Email</td> <td style="width:70%"><asp:Literal ID="lit_Email" runat="server"></asp:Literal></td> </tr> <tr> <td style="width:30%">Mật Khẩu</td> <td style="width:70%"><asp:Literal ID="lit_MatKhau" runat="server"></asp:Literal></td> </tr> <tr> <td style="width:30%">Địa chỉ</td> <td style="width:70%"><asp:Literal ID="lit_DiaChi" runat="server"></asp:Literal></td> </tr> <tr> <td style="width:30%">Điện thoại</td> <td style="width:70%"><asp:Literal ID="lit_DienThoai" runat="server"></asp:Literal></td> </tr> </table> </div> </div> </div> </asp:Content>
02cdnth2
trunk/Test/Admin/KhachHangDetail.aspx
ASP.NET
epl
2,341
<%@ Page Language="C#" MasterPageFile ="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="HinhThucTTList.aspx.cs" Inherits="Admin_HinhThucTTList" %> <%@ Register Assembly="ASPnetPagerV2_8" Namespace="ASPnetControls" TagPrefix="cc1" %> <asp:Content ID ="Content1" ContentPlaceHolderID ="menuPlaceHolder" runat ="server" > <h5 >Menu</h5> <ul class ="Actions"> <li > <a href ="sanphamAdd.aspx" >Thêm mới sản phẩm</a></li> <li > <a href ="sanphamList.aspx" >Danh sách Sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="DiaDiemAdd.aspx" >Thêm mới Địa điểm</a></li> <li > <a href ="DiaDiemList.aspx" >Danh sách Đại điểm</a></li> </ul> <ul class ="Actions"> <li > <a href ="DoanhNghiepAdd.aspx" >Thêm mới Doanh nghiệp</a></li> <li > <a href ="DoanhNghiepList.aspx" >Danh sách Doanh nghiệp</a></li> </ul> <ul class ="Actions"> <li > <a href ="KhachHangAdd.aspx" >Thêm mới Khách hàng</a></li> <li > <a href ="KhachHangList.aspx" >Danh sách Khach hàng</a></li> </ul> <ul class ="Actions"> <li > <a href ="NhanVienAdd.aspx" >Thêm mới Nhân viên</a></li> <li > <a href ="NhanVienList.aspx" >Danh sách Nhân viên</a></li> </ul> <ul class ="Actions"> <li > <a href ="HinhThucTTAdd.aspx" >Thêm mới Hình thức thanh toán</a></li> <li class ="Selected"> <a href ="HinhThucTTList.aspx" >Danh sách Hình thức thanh toán</a></li> </ul> <ul class ="Actions"> <li > <a href ="LoaiSPAdd.aspx" >Thêm mới Loại sản phẩm</a></li> <li > <a href ="LoaiSPList.aspx" >Danh sách Loại sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="MaSoSPList.aspx" >Danh sách Mã số sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="TrangThaiSPAdd.aspx" >Thêm mới Trạng thái sản phẩm</a></li> <li > <a href ="TrangThaiSPList.aspx" >Danh sách Trạng thái sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="TrangThaiDHList.aspx" >Danh sách Trạng thái đơn hàng</a></li> <li ><a href ="TTGiaoDichList.aspx" >Danh sách Thông tin giao dịch</a></li> </ul></asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="contentPlaceHolder" Runat="Server"> <div style="padding:12px 12px 12px 12px;"> <div> <div class="title"> Danh sách hình thức thanh toán </div> <div style="width:100%;"> <div style="display:table-cell; width:70%;float:left;"> Tên hình thức: <asp:TextBox ID="txt_TenHT" runat="server"></asp:TextBox> <asp:Button ID="btn_Search" runat="server" Text="Tìm kiếm" OnClick="btn_Search_Click" /> </div> <div class="addnewrow" style="display:table-cell; width:25%;float:right;"> <a href ="hinhThucTTAdd.aspx" >Thêm mới HT TT</a> | <asp:LinkButton ID="lbt_Delete" runat="server" OnClick="lbt_Delete_Click">Xóa</asp:LinkButton> </div> </div> <ContentTemplate> <div> <asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound"> <HeaderTemplate> <table cellspacing="1" cellpadding="3" width="100%" bgcolor="#cccccc" border="0"> <thead> <tr class="listtableheader"> <th>Mã HT</th> <th>Tên HT</th> <th>Sửa</th> <th><input id="cb_All" type="checkbox" onclick="CheckAll(1);" /><a href="javascript:CheckAll(2)">Chọn hết</a></th> </tr> </thead> <tbody> </HeaderTemplate> <ItemTemplate> <tr> <td><asp:Literal ID="lit_MaHT" runat="server" /></td> <td><asp:Literal ID="lit_TenHT" runat="server"/></td> <td><asp:HyperLink ID="hyp_Edit" Text="Edit" runat="server" /></td> <td> <asp:CheckBox ID="cb_Xoa" runat="server" /> <asp:HiddenField ID="hf_id" runat="server" /> </td> </tr> </ItemTemplate> <FooterTemplate> </tbody> </table> </FooterTemplate> </asp:Repeater> </div> <div style="width:100%;"> <div style="float:left;"> <cc1:PagerV2_8 ID="PagerV2_8_1" runat="server" GenerateFirstLastSection="true" OnCommand="pager_Command" GeneratePagerInfoSection="false" GenerateSmartShortCuts="false" GenerateHiddenHyperlinks="false" NormalModePageCount="5" ></cc1:PagerV2_8> </div> </div> </ContentTemplate> </div> </div> </asp:Content>
02cdnth2
trunk/Test/Admin/HinhThucTTList.aspx
ASP.NET
epl
5,196
<%@ Page Language="C#" MasterPageFile ="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="DoanhNghiepAdd.aspx.cs" Inherits="Admin_DoanhNghiepAdd" %> <%@ Register Assembly="ASPnetPagerV2_8" Namespace="ASPnetControls" TagPrefix="cc1" %> <asp:Content ID ="Content1" ContentPlaceHolderID ="menuPlaceHolder" runat ="server" > <h5 >Menu</h5> <ul class ="Actions"> <li > <a href ="sanphamAdd.aspx" >Thêm mới sản phẩm</a></li> <li > <a href ="sanphamList.aspx" >Danh sách Sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="DiaDiemAdd.aspx" >Thêm mới Địa điểm</a></li> <li > <a href ="DiaDiemList.aspx" >Danh sách Đại điểm</a></li> </ul> <ul class ="Actions"> <li class ="Selected"> <a href ="DoanhNghiepAdd.aspx" >Thêm mới Doanh nghiệp</a></li> <li > <a href ="DoanhNghiepList.aspx" >Danh sách Doanh nghiệp</a></li> </ul> <ul class ="Actions"> <li > <a href ="KhachHangAdd.aspx" >Thêm mới Khách hàng</a></li> <li > <a href ="KhachHangList.aspx" >Danh sách Khach hàng</a></li> </ul> <ul class ="Actions"> <li > <a href ="NhanVienAdd.aspx" >Thêm mới Nhân viên</a></li> <li > <a href ="NhanVienList.aspx" >Danh sách Nhân viên</a></li> </ul> <ul class ="Actions"> <li > <a href ="HinhThucTTAdd.aspx" >Thêm mới Hình thức thanh toán</a></li> <li > <a href ="HinhThucTTList.aspx" >Danh sách Hình thức thanh toán</a></li> </ul> <ul class ="Actions"> <li > <a href ="LoaiSPAdd.aspx" >Thêm mới Loại sản phẩm</a></li> <li > <a href ="LoaiSPList.aspx" >Danh sách Loại sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="MaSoSPList.aspx" >Danh sách Mã số sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="TrangThaiSPAdd.aspx" >Thêm mới Trạng thái sản phẩm</a></li> <li > <a href ="TrangThaiSPList.aspx" >Danh sách Trạng thái sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="TrangThaiDHList.aspx" >Danh sách Trạng thái đơn hàng</a></li> <li ><a href ="TTGiaoDichList.aspx" >Danh sách Thông tin giao dịch</a></li> </ul></asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="contentPlaceHolder" Runat="Server"> <div style="padding:12px 12px 12px 12px;"> <div> <div class="title"> Thêm mới doanh nghiệp </div> <div> <table width="100%" cellspacing="1" cellpadding="3" border="0" bgcolor="#cccccc"> <tr> <td style="width:30%">Tên doanh nghiệp</td> <td style="width:70%"><asp:TextBox ID="txt_TenDN" runat="server"></asp:TextBox></td> </tr> <tr> <td style="width:30%">Địa chỉ</td> <td style="width:70%"><asp:TextBox ID="txt_diachi" runat="server"></asp:TextBox></td> </tr> <tr> <td style="width:30%">Điện thoại</td> <td style="width:70%"><asp:TextBox ID="txt_dienthoai" runat="server"></asp:TextBox></td> </tr> <tr> <td style="width:30%"></td> <td style="width:70%"><asp:Button ID="btn_Add" runat="server" Text="Thêm mới" OnClick="btn_Add_Click" /></td> </tr> </table> </div> </div> </div> </asp:Content>
02cdnth2
trunk/Test/Admin/DoanhNghiepAdd.aspx
ASP.NET
epl
3,715
<%@ Page Language="C#" MasterPageFile ="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="HinhThucTTAdd.aspx.cs" Inherits="Admin_HinhThucTTAdd" %> <%@ Register Assembly="ASPnetPagerV2_8" Namespace="ASPnetControls" TagPrefix="cc1" %> <asp:Content ID ="Content1" ContentPlaceHolderID ="menuPlaceHolder" runat ="server" > <h5 >Menu</h5> <ul class ="Actions"> <li > <a href ="sanphamAdd.aspx" >Thêm mới sản phẩm</a></li> <li > <a href ="sanphamList.aspx" >Danh sách Sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="DiaDiemAdd.aspx" >Thêm mới Địa điểm</a></li> <li > <a href ="DiaDiemList.aspx" >Danh sách Đại điểm</a></li> </ul> <ul class ="Actions"> <li > <a href ="DoanhNghiepAdd.aspx" >Thêm mới Doanh nghiệp</a></li> <li > <a href ="DoanhNghiepList.aspx" >Danh sách Doanh nghiệp</a></li> </ul> <ul class ="Actions"> <li > <a href ="KhachHangAdd.aspx" >Thêm mới Khách hàng</a></li> <li > <a href ="KhachHangList.aspx" >Danh sách Khach hàng</a></li> </ul> <ul class ="Actions"> <li > <a href ="NhanVienAdd.aspx" >Thêm mới Nhân viên</a></li> <li > <a href ="NhanVienList.aspx" >Danh sách Nhân viên</a></li> </ul> <ul class ="Actions"> <li class ="Selected"> <a href ="HinhThucTTAdd.aspx" >Thêm mới Hình thức thanh toán</a></li> <li > <a href ="HinhThucTTList.aspx" >Danh sách Hình thức thanh toán</a></li> </ul> <ul class ="Actions"> <li > <a href ="LoaiSPAdd.aspx" >Thêm mới Loại sản phẩm</a></li> <li > <a href ="LoaiSPList.aspx" >Danh sách Loại sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="MaSoSPList.aspx" >Danh sách Mã số sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="TrangThaiSPAdd.aspx" >Thêm mới Trạng thái sản phẩm</a></li> <li > <a href ="TrangThaiSPList.aspx" >Danh sách Trạng thái sản phẩm</a></li> </ul> <ul class ="Actions"> <li > <a href ="TrangThaiDHList.aspx" >Danh sách Trạng thái đơn hàng</a></li> <li ><a href ="TTGiaoDichList.aspx" >Danh sách Thông tin giao dịch</a></li> </ul></asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="contentPlaceHolder" Runat="Server"> <div style="padding:12px 12px 12px 12px;"> <div> <div class="title"> Thêm mới hình thức thanh toán </div> <div> <table width="100%" cellspacing="1" cellpadding="3" border="0" bgcolor="#cccccc"> <tr> <td style="width:30%">Tên hình thưc TT</td> <td style="width:70%"><asp:TextBox ID="txt_TenHT" runat="server"></asp:TextBox></td> </tr> <tr> <td style="width:30%"></td> <td style="width:70%"><asp:Button ID="btn_Add" runat="server" Text="Thêm mới" OnClick="btn_Add_Click" /></td> </tr> </table> </div> </div> </div> </asp:Content>
02cdnth2
trunk/Test/Admin/HinhThucTTAdd.aspx
ASP.NET
epl
3,309