new project
1450
static/js/plugins/datePicker/mobiscroll.css
Normal file
1
static/js/plugins/datePicker/mobiscroll.js
Normal file
1
static/js/plugins/jquery.flexslider-min.js
vendored
Normal file
473
static/js/plugins/jquery.raty.js
Normal file
@@ -0,0 +1,473 @@
|
||||
/*!
|
||||
* jQuery Raty - A Star Rating Plugin
|
||||
* ------------------------------------------------------------------
|
||||
*
|
||||
* jQuery Raty is a plugin that generates a customizable star rating.
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
*
|
||||
* @version 2.5.2
|
||||
* @since 2010.06.11
|
||||
* @author Washington Botelho
|
||||
* @documentation wbotelhos.com/raty
|
||||
*
|
||||
* ------------------------------------------------------------------
|
||||
*
|
||||
* <div id="star"></div>
|
||||
*
|
||||
* $('#star').raty();
|
||||
*
|
||||
*/
|
||||
|
||||
;(function($) {
|
||||
|
||||
var methods = {
|
||||
init: function(settings) {
|
||||
return this.each(function() {
|
||||
methods.destroy.call(this);
|
||||
|
||||
this.opt = $.extend(true, {}, $.fn.raty.defaults, settings);
|
||||
|
||||
var that = $(this),
|
||||
inits = ['number', 'readOnly', 'score', 'scoreName'];
|
||||
|
||||
methods._callback.call(this, inits);
|
||||
|
||||
if (this.opt.precision) {
|
||||
methods._adjustPrecision.call(this);
|
||||
}
|
||||
|
||||
this.opt.number = methods._between(this.opt.number, 0, this.opt.numberMax)
|
||||
|
||||
this.opt.path = this.opt.path || '';
|
||||
|
||||
if (this.opt.path && this.opt.path.slice(this.opt.path.length - 1, this.opt.path.length) !== '/') {
|
||||
this.opt.path += '/';
|
||||
}
|
||||
|
||||
this.stars = methods._createStars.call(this);
|
||||
this.score = methods._createScore.call(this);
|
||||
|
||||
methods._apply.call(this, this.opt.score);
|
||||
|
||||
var space = this.opt.space ? 4 : 0,
|
||||
width = this.opt.width || (this.opt.number * this.opt.size + this.opt.number * space);
|
||||
|
||||
if (this.opt.cancel) {
|
||||
this.cancel = methods._createCancel.call(this);
|
||||
|
||||
width += (this.opt.size + space);
|
||||
}
|
||||
|
||||
if (this.opt.readOnly) {
|
||||
methods._lock.call(this);
|
||||
} else {
|
||||
that.css('cursor', 'pointer');
|
||||
methods._binds.call(this);
|
||||
}
|
||||
|
||||
if (this.opt.width !== false) {
|
||||
that.css('width', width);
|
||||
}
|
||||
|
||||
methods._target.call(this, this.opt.score);
|
||||
|
||||
that.data({ 'settings': this.opt, 'raty': true });
|
||||
});
|
||||
}, _adjustPrecision: function() {
|
||||
this.opt.targetType = 'score';
|
||||
this.opt.half = true;
|
||||
}, _apply: function(score) {
|
||||
if (score && score > 0) {
|
||||
score = methods._between(score, 0, this.opt.number);
|
||||
this.score.val(score);
|
||||
}
|
||||
|
||||
methods._fill.call(this, score);
|
||||
|
||||
if (score) {
|
||||
methods._roundStars.call(this, score);
|
||||
}
|
||||
}, _between: function(value, min, max) {
|
||||
return Math.min(Math.max(parseFloat(value), min), max);
|
||||
}, _binds: function() {
|
||||
if (this.cancel) {
|
||||
methods._bindCancel.call(this);
|
||||
}
|
||||
|
||||
methods._bindClick.call(this);
|
||||
methods._bindOut.call(this);
|
||||
methods._bindOver.call(this);
|
||||
}, _bindCancel: function() {
|
||||
methods._bindClickCancel.call(this);
|
||||
methods._bindOutCancel.call(this);
|
||||
methods._bindOverCancel.call(this);
|
||||
}, _bindClick: function() {
|
||||
var self = this,
|
||||
that = $(self);
|
||||
|
||||
self.stars.on('click.raty', function(evt) {
|
||||
self.score.val((self.opt.half || self.opt.precision) ? that.data('score') : this.alt);
|
||||
|
||||
if (self.opt.click) {
|
||||
self.opt.click.call(self, parseFloat(self.score.val()), evt);
|
||||
}
|
||||
});
|
||||
}, _bindClickCancel: function() {
|
||||
var self = this;
|
||||
|
||||
self.cancel.on('click.raty', function(evt) {
|
||||
self.score.removeAttr('value');
|
||||
|
||||
if (self.opt.click) {
|
||||
self.opt.click.call(self, null, evt);
|
||||
}
|
||||
});
|
||||
}, _bindOut: function() {
|
||||
var self = this;
|
||||
|
||||
$(this).on('mouseleave.raty', function(evt) {
|
||||
var score = parseFloat(self.score.val()) || undefined;
|
||||
|
||||
methods._apply.call(self, score);
|
||||
methods._target.call(self, score, evt);
|
||||
|
||||
if (self.opt.mouseout) {
|
||||
self.opt.mouseout.call(self, score, evt);
|
||||
}
|
||||
});
|
||||
}, _bindOutCancel: function() {
|
||||
var self = this;
|
||||
|
||||
self.cancel.on('mouseleave.raty', function(evt) {
|
||||
$(this).attr('src', self.opt.path + self.opt.cancelOff);
|
||||
|
||||
if (self.opt.mouseout) {
|
||||
self.opt.mouseout.call(self, self.score.val() || null, evt);
|
||||
}
|
||||
});
|
||||
}, _bindOverCancel: function() {
|
||||
var self = this;
|
||||
|
||||
self.cancel.on('mouseover.raty', function(evt) {
|
||||
$(this).attr('src', self.opt.path + self.opt.cancelOn);
|
||||
|
||||
self.stars.attr('src', self.opt.path + self.opt.starOff);
|
||||
|
||||
methods._target.call(self, null, evt);
|
||||
|
||||
if (self.opt.mouseover) {
|
||||
self.opt.mouseover.call(self, null);
|
||||
}
|
||||
});
|
||||
}, _bindOver: function() {
|
||||
var self = this,
|
||||
that = $(self),
|
||||
action = self.opt.half ? 'mousemove.raty' : 'mouseover.raty';
|
||||
|
||||
self.stars.on(action, function(evt) {
|
||||
var score = parseInt(this.alt, 10);
|
||||
|
||||
if (self.opt.half) {
|
||||
var position = parseFloat((evt.pageX - $(this).offset().left) / self.opt.size),
|
||||
plus = (position > .5) ? 1 : .5;
|
||||
|
||||
score = score - 1 + plus;
|
||||
|
||||
methods._fill.call(self, score);
|
||||
|
||||
if (self.opt.precision) {
|
||||
score = score - plus + position;
|
||||
}
|
||||
|
||||
methods._roundStars.call(self, score);
|
||||
|
||||
that.data('score', score);
|
||||
} else {
|
||||
methods._fill.call(self, score);
|
||||
}
|
||||
|
||||
methods._target.call(self, score, evt);
|
||||
|
||||
if (self.opt.mouseover) {
|
||||
self.opt.mouseover.call(self, score, evt);
|
||||
}
|
||||
});
|
||||
}, _callback: function(options) {
|
||||
for (i in options) {
|
||||
if (typeof this.opt[options[i]] === 'function') {
|
||||
this.opt[options[i]] = this.opt[options[i]].call(this);
|
||||
}
|
||||
}
|
||||
}, _createCancel: function() {
|
||||
var that = $(this),
|
||||
icon = this.opt.path + this.opt.cancelOff,
|
||||
cancel = $('<img />', { src: icon, alt: 'x', title: this.opt.cancelHint, 'class': 'raty-cancel' });
|
||||
|
||||
if (this.opt.cancelPlace == 'left') {
|
||||
that.prepend(' ').prepend(cancel);
|
||||
} else {
|
||||
that.append(' ').append(cancel);
|
||||
}
|
||||
|
||||
return cancel;
|
||||
}, _createScore: function() {
|
||||
return $('<input />', { type: 'hidden', name: this.opt.scoreName }).appendTo(this);
|
||||
}, _createStars: function() {
|
||||
var that = $(this);
|
||||
|
||||
for (var i = 1; i <= this.opt.number; i++) {
|
||||
var title = methods._getHint.call(this, i),
|
||||
icon = (this.opt.score && this.opt.score >= i) ? 'starOn' : 'starOff';
|
||||
|
||||
icon = this.opt.path + this.opt[icon];
|
||||
|
||||
$('<img />', { src : icon, alt: i, title: title }).appendTo(this);
|
||||
|
||||
if (this.opt.space) {
|
||||
that.append((i < this.opt.number) ? ' ' : '');
|
||||
}
|
||||
}
|
||||
|
||||
return that.children('img');
|
||||
}, _error: function(message) {
|
||||
$(this).html(message);
|
||||
|
||||
$.error(message);
|
||||
}, _fill: function(score) {
|
||||
var self = this,
|
||||
hash = 0;
|
||||
|
||||
for (var i = 1; i <= self.stars.length; i++) {
|
||||
var star = self.stars.eq(i - 1),
|
||||
select = self.opt.single ? (i == score) : (i <= score);
|
||||
|
||||
if (self.opt.iconRange && self.opt.iconRange.length > hash) {
|
||||
var irange = self.opt.iconRange[hash],
|
||||
on = irange.on || self.opt.starOn,
|
||||
off = irange.off || self.opt.starOff,
|
||||
icon = select ? on : off;
|
||||
|
||||
if (i <= irange.range) {
|
||||
star.attr('src', self.opt.path + icon);
|
||||
}
|
||||
|
||||
if (i == irange.range) {
|
||||
hash++;
|
||||
}
|
||||
} else {
|
||||
var icon = select ? 'starOn' : 'starOff';
|
||||
|
||||
star.attr('src', this.opt.path + this.opt[icon]);
|
||||
}
|
||||
}
|
||||
}, _getHint: function(score) {
|
||||
var hint = this.opt.hints[score - 1];
|
||||
return (hint === '') ? '' : (hint || score);
|
||||
}, _lock: function() {
|
||||
var score = parseInt(this.score.val(), 10), // TODO: 3.1 >> [['1'], ['2'], ['3', '.1', '.2']]
|
||||
hint = score ? methods._getHint.call(this, score) : this.opt.noRatedMsg;
|
||||
|
||||
$(this).data('readonly', true).css('cursor', '').attr('title', hint);
|
||||
|
||||
this.score.attr('readonly', 'readonly');
|
||||
this.stars.attr('title', hint);
|
||||
|
||||
if (this.cancel) {
|
||||
this.cancel.hide();
|
||||
}
|
||||
}, _roundStars: function(score) {
|
||||
var rest = (score - Math.floor(score)).toFixed(2);
|
||||
|
||||
if (rest > this.opt.round.down) {
|
||||
var icon = 'starOn'; // Up: [x.76 .. x.99]
|
||||
|
||||
if (this.opt.halfShow && rest < this.opt.round.up) { // Half: [x.26 .. x.75]
|
||||
icon = 'starHalf';
|
||||
} else if (rest < this.opt.round.full) { // Down: [x.00 .. x.5]
|
||||
icon = 'starOff';
|
||||
}
|
||||
|
||||
this.stars.eq(Math.ceil(score) - 1).attr('src', this.opt.path + this.opt[icon]);
|
||||
} // Full down: [x.00 .. x.25]
|
||||
}, _target: function(score, evt) {
|
||||
if (this.opt.target) {
|
||||
var target = $(this.opt.target);
|
||||
|
||||
if (target.length === 0) {
|
||||
methods._error.call(this, 'Target selector invalid or missing!');
|
||||
}
|
||||
|
||||
if (this.opt.targetFormat.indexOf('{score}') < 0) {
|
||||
methods._error.call(this, 'Template "{score}" missing!');
|
||||
}
|
||||
|
||||
var mouseover = evt && evt.type == 'mouseover';
|
||||
|
||||
if (score === undefined) {
|
||||
score = this.opt.targetText;
|
||||
} else if (score === null) {
|
||||
score = mouseover ? this.opt.cancelHint : this.opt.targetText;
|
||||
} else {
|
||||
if (this.opt.targetType == 'hint') {
|
||||
score = methods._getHint.call(this, Math.ceil(score));
|
||||
} else if (this.opt.precision) {
|
||||
score = parseFloat(score).toFixed(1);
|
||||
}
|
||||
|
||||
if (!mouseover && !this.opt.targetKeep) {
|
||||
score = this.opt.targetText;
|
||||
}
|
||||
}
|
||||
|
||||
if (score) {
|
||||
score = this.opt.targetFormat.toString().replace('{score}', score);
|
||||
}
|
||||
|
||||
if (target.is(':input')) {
|
||||
target.val(score);
|
||||
} else {
|
||||
target.html(score);
|
||||
}
|
||||
}
|
||||
}, _unlock: function() {
|
||||
$(this).data('readonly', false).css('cursor', 'pointer').removeAttr('title');
|
||||
|
||||
this.score.removeAttr('readonly', 'readonly');
|
||||
|
||||
for (var i = 0; i < this.opt.number; i++) {
|
||||
this.stars.eq(i).attr('title', methods._getHint.call(this, i + 1));
|
||||
}
|
||||
|
||||
if (this.cancel) {
|
||||
this.cancel.css('display', '');
|
||||
}
|
||||
}, cancel: function(click) {
|
||||
return this.each(function() {
|
||||
if ($(this).data('readonly') !== true) {
|
||||
methods[click ? 'click' : 'score'].call(this, null);
|
||||
this.score.removeAttr('value');
|
||||
}
|
||||
});
|
||||
}, click: function(score) {
|
||||
return $(this).each(function() {
|
||||
if ($(this).data('readonly') !== true) {
|
||||
methods._apply.call(this, score);
|
||||
|
||||
if (!this.opt.click) {
|
||||
methods._error.call(this, 'You must add the "click: function(score, evt) { }" callback.');
|
||||
}
|
||||
|
||||
this.opt.click.call(this, score, { type: 'click' });
|
||||
|
||||
methods._target.call(this, score);
|
||||
}
|
||||
});
|
||||
}, destroy: function() {
|
||||
return $(this).each(function() {
|
||||
var that = $(this),
|
||||
raw = that.data('raw');
|
||||
|
||||
if (raw) {
|
||||
that.off('.raty').empty().css({ cursor: raw.style.cursor, width: raw.style.width }).removeData('readonly');
|
||||
} else {
|
||||
that.data('raw', that.clone()[0]);
|
||||
}
|
||||
});
|
||||
}, getScore: function() {
|
||||
var score = [],
|
||||
value ;
|
||||
|
||||
$(this).each(function() {
|
||||
value = this.score.val();
|
||||
|
||||
score.push(value ? parseFloat(value) : undefined);
|
||||
});
|
||||
|
||||
return (score.length > 1) ? score : score[0];
|
||||
}, readOnly: function(readonly) {
|
||||
return this.each(function() {
|
||||
var that = $(this);
|
||||
|
||||
if (that.data('readonly') !== readonly) {
|
||||
if (readonly) {
|
||||
that.off('.raty').children('img').off('.raty');
|
||||
|
||||
methods._lock.call(this);
|
||||
} else {
|
||||
methods._binds.call(this);
|
||||
methods._unlock.call(this);
|
||||
}
|
||||
|
||||
that.data('readonly', readonly);
|
||||
}
|
||||
});
|
||||
}, reload: function() {
|
||||
return methods.set.call(this, {});
|
||||
}, score: function() {
|
||||
return arguments.length ? methods.setScore.apply(this, arguments) : methods.getScore.call(this);
|
||||
}, set: function(settings) {
|
||||
return this.each(function() {
|
||||
var that = $(this),
|
||||
actual = that.data('settings'),
|
||||
news = $.extend({}, actual, settings);
|
||||
|
||||
that.raty(news);
|
||||
});
|
||||
}, setScore: function(score) {
|
||||
return $(this).each(function() {
|
||||
if ($(this).data('readonly') !== true) {
|
||||
methods._apply.call(this, score);
|
||||
methods._target.call(this, score);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.raty = function(method) {
|
||||
if (methods[method]) {
|
||||
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
|
||||
} else if (typeof method === 'object' || !method) {
|
||||
return methods.init.apply(this, arguments);
|
||||
} else {
|
||||
$.error('Method ' + method + ' does not exist!');
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.raty.defaults = {
|
||||
cancel : false,
|
||||
cancelHint : 'Cancel this rating!',
|
||||
cancelOff : 'cancel-off.png',
|
||||
cancelOn : 'cancel-on.png',
|
||||
cancelPlace : 'left',
|
||||
click : undefined,
|
||||
half : false,
|
||||
halfShow : true,
|
||||
hints : ['bad', 'poor', 'regular', 'good', 'gorgeous'],
|
||||
iconRange : undefined,
|
||||
mouseout : undefined,
|
||||
mouseover : undefined,
|
||||
noRatedMsg : 'Not rated yet!',
|
||||
number : 5,
|
||||
numberMax : 20,
|
||||
path : '',
|
||||
precision : false,
|
||||
readOnly : false,
|
||||
round : { down: .25, full: .6, up: .76 },
|
||||
score : undefined,
|
||||
scoreName : 'score',
|
||||
single : false,
|
||||
size : 16,
|
||||
space : true,
|
||||
starHalf : 'star-half.png',
|
||||
starOff : 'star-off.png',
|
||||
starOn : 'star-on.png',
|
||||
target : undefined,
|
||||
targetFormat : '{score}',
|
||||
targetKeep : false,
|
||||
targetText : '',
|
||||
targetType : 'hint',
|
||||
width : undefined
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
1
static/js/plugins/jquery.scrollLoading.js
Normal file
@@ -0,0 +1 @@
|
||||
(function(a){a.fn.scrollLoading=function(b){var c={attr:"data-url",container:a(window),callback:a.noop};var d=a.extend({},c,b||{});d.cache=[];a(this).each(function(){var h=this.nodeName.toLowerCase(),g=a(this).attr(d.attr);var i={obj:a(this),tag:h,url:g};d.cache.push(i)});var f=function(g){if(a.isFunction(d.callback)){d.callback.call(g.get(0))}};var e=function(){var g=d.container.height();if(d.container.get(0)===window){contop=a(window).scrollTop()}else{contop=d.container.offset().top}a.each(d.cache,function(m,n){var p=n.obj,j=n.tag,k=n.url,l,h;if(p){l=p.offset().top-contop,h=l+p.height();if((l>=0&&l<g)||(h>0&&h<=g)){if(k){if(j==="img"){f(p.attr("src",k))}else{p.load(k,{},function(){f(p)})}}else{f(p)}n.obj=null}}})};e();d.container.bind("scroll",e)}})(jQuery);
|
||||
61
static/js/plugins/jquery.timer.js
Normal file
@@ -0,0 +1,61 @@
|
||||
var fnTimeCountDown = function(d, o){
|
||||
var f = {
|
||||
zero: function(n){
|
||||
var n = parseInt(n, 10);
|
||||
if(n > 0){
|
||||
if(n <= 9){
|
||||
n = "0" + n;
|
||||
}
|
||||
return String(n);
|
||||
}else{
|
||||
return "00";
|
||||
}
|
||||
},
|
||||
dv: function(){
|
||||
d = d || Date.UTC(2050, 0, 1); //如果未定义时间,则我们设定倒计时日期是2050年1月1日
|
||||
var future = new Date(d), now = new Date();
|
||||
//现在将来秒差值
|
||||
var dur = Math.round((future.getTime() - now.getTime()) / 1000) + future.getTimezoneOffset() * 60, pms = {
|
||||
sec: "00",
|
||||
mini: "00",
|
||||
hour: "00",
|
||||
day: "00",
|
||||
month: "00",
|
||||
year: "00"
|
||||
};
|
||||
if(dur > 0){
|
||||
pms.sec = f.zero(dur % 60);
|
||||
pms.mini = Math.floor((dur / 60)) > 0? f.zero(Math.floor((dur / 60)) % 60) : "00";
|
||||
pms.hour = Math.floor((dur / 3600)) > 0? f.zero(Math.floor((dur / 3600)) % 24) : "00";
|
||||
pms.day = Math.floor((dur / 86400)) > 0? f.zero(Math.floor((dur / 86400))) : "00";
|
||||
//月份,以实际平均每月秒数计算
|
||||
pms.month = Math.floor((dur / 2629744)) > 0? f.zero(Math.floor((dur / 2629744)) % 12) : "00";
|
||||
//年份,按按回归年365天5时48分46秒算
|
||||
pms.year = Math.floor((dur / 31556926)) > 0? Math.floor((dur / 31556926)) : "00";
|
||||
}
|
||||
return pms;
|
||||
},
|
||||
ui: function(){
|
||||
if(o.sec){
|
||||
o.sec.innerHTML = f.dv().sec;
|
||||
}
|
||||
if(o.mini){
|
||||
o.mini.innerHTML = f.dv().mini;
|
||||
}
|
||||
if(o.hour){
|
||||
o.hour.innerHTML = f.dv().hour;
|
||||
}
|
||||
if(o.day){
|
||||
o.day.innerHTML = f.dv().day;
|
||||
}
|
||||
if(o.month){
|
||||
o.month.innerHTML = f.dv().month;
|
||||
}
|
||||
if(o.year){
|
||||
o.year.innerHTML = f.dv().year;
|
||||
}
|
||||
setTimeout(f.ui, 1000);
|
||||
}
|
||||
};
|
||||
f.ui();
|
||||
};
|
||||
63
static/js/plugins/jquery.upload.js
Normal file
@@ -0,0 +1,63 @@
|
||||
jQuery.fn.extend({
|
||||
uploadPreview: function (opts) {
|
||||
$(this).each(function(){
|
||||
var _self = this,
|
||||
_this = $(this);
|
||||
opts = jQuery.extend({
|
||||
Img: "ImgPr",
|
||||
Width: 100,
|
||||
Height: 100,
|
||||
ImgType: ["gif", "jpeg", "jpg", "bmp", "png"],
|
||||
Callback: function () {}
|
||||
}, opts || {});
|
||||
_self.getObjectURL = function (file) {
|
||||
var url = null;
|
||||
if (window.createObjectURL != undefined) {
|
||||
url = window.createObjectURL(file)
|
||||
} else if (window.URL != undefined) {
|
||||
url = window.URL.createObjectURL(file)
|
||||
} else if (window.webkitURL != undefined) {
|
||||
url = window.webkitURL.createObjectURL(file)
|
||||
}
|
||||
return url
|
||||
};
|
||||
_this.change(function () {
|
||||
if (this.value) {
|
||||
if (!RegExp("\.(" + opts.ImgType.join("|") + ")$", "i").test(this.value.toLowerCase())) {
|
||||
alert("选择文件错误,图片类型必须是" + opts.ImgType.join(",") + "中的一种");
|
||||
this.value = "";
|
||||
return false
|
||||
}
|
||||
var obj = _this.parent().siblings().children(opts.Img),
|
||||
imgBox = obj.parent("span"),
|
||||
imgBoxDom = imgBox[0];
|
||||
if ($.browser.msie) {
|
||||
try {
|
||||
obj.attr('src', _self.getObjectURL(this.files[0]))
|
||||
} catch (e) {
|
||||
var src = "";
|
||||
_self.select();
|
||||
if (top != self) {
|
||||
window.parent.document.body.focus()
|
||||
} else {
|
||||
_self.blur()
|
||||
}
|
||||
src = document.selection.createRange().text;
|
||||
document.selection.empty();
|
||||
obj.hide();
|
||||
imgBox.css({
|
||||
'filter': 'progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale)',
|
||||
'width': opts.Width + 'px',
|
||||
'height': opts.Height + 'px'
|
||||
});
|
||||
imgBoxDom.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = src
|
||||
}
|
||||
} else {
|
||||
obj.attr('src', _self.getObjectURL(this.files[0]))
|
||||
}
|
||||
opts.Callback()
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
11
static/js/plugins/laydate/laydate.js
Normal file
73
static/js/plugins/laydate/need/laydate.css
Normal file
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
|
||||
@Name: laydate 核心样式
|
||||
@Author:贤心
|
||||
@Site:http://sentsin.com/layui/laydate
|
||||
|
||||
**/
|
||||
|
||||
html{_background-image:url(about:blank); _background-attachment:fixed;}
|
||||
.laydate_body .laydate_box, .laydate_body .laydate_box *{margin:0; padding:0; -moz-box-sizing:content-box; -webkit-box-sizing:content-box; box-sizing:content-box;}
|
||||
.laydate-icon,
|
||||
.laydate-icon-default,
|
||||
.laydate-icon-danlan,
|
||||
.laydate-icon-dahong,
|
||||
.laydate-icon-molv{height:22px; line-height:22px; padding-right:20px; border:1px solid #C6C6C6; background-repeat:no-repeat; background-position:right center; background-color:#fff; outline:0;}
|
||||
.laydate-icon-default{ background-image:url(../skins/default/icon.png)}
|
||||
.laydate-icon-danlan{border:1px solid #B1D2EC; background-image:url(../skins/danlan/icon.png)}
|
||||
.laydate-icon-dahong{background-image:url(../skins/dahong/icon.png)}
|
||||
.laydate-icon-molv{background-image:url(../skins/molv/icon.png)}
|
||||
.laydate_body .laydate_box{width:240px; font:12px '\5B8B\4F53'; z-index:99999999; *margin:-2px 0 0 -2px; *overflow:hidden; _margin:0; _position:absolute!important; background-color:#fff;}
|
||||
.laydate_body .laydate_box li{list-style:none;}
|
||||
.laydate_body .laydate_box .laydate_void{cursor:text!important;}
|
||||
.laydate_body .laydate_box a, .laydate_body .laydate_box a:hover{text-decoration:none; blr:expression(this.onFocus=this.blur()); cursor:pointer;}
|
||||
.laydate_body .laydate_box a:hover{text-decoration:none;}
|
||||
.laydate_body .laydate_box cite, .laydate_body .laydate_box label{position:absolute; width:0; height:0; border-width:5px; border-style:dashed; border-color:transparent; overflow:hidden; cursor:pointer;}
|
||||
.laydate_body .laydate_box .laydate_yms, .laydate_body .laydate_box .laydate_time{display:none;}
|
||||
.laydate_body .laydate_box .laydate_show{display:block;}
|
||||
.laydate_body .laydate_box input{outline:0; font-size:14px; background-color:#fff;}
|
||||
.laydate_body .laydate_top{position:relative; height:26px; padding:5px; *width:100%; z-index:99;}
|
||||
.laydate_body .laydate_ym{position:relative; float:left; height:24px; cursor:pointer;}
|
||||
.laydate_body .laydate_ym input{float:left; height:24px; line-height:24px; text-align:center; border:none; cursor:pointer;}
|
||||
.laydate_body .laydate_ym .laydate_yms{position:absolute; left: -1px; top: 24px; height:181px;}
|
||||
.laydate_body .laydate_y{width:121px; margin-right:6px;}
|
||||
.laydate_body .laydate_y input{width:64px; margin-right:15px;}
|
||||
.laydate_body .laydate_y .laydate_yms{width:121px; text-align:center;}
|
||||
.laydate_body .laydate_y .laydate_yms a{position:relative; display:block; height:20px;}
|
||||
.laydate_body .laydate_y .laydate_yms ul{height:139px; padding:0; *overflow:hidden;}
|
||||
.laydate_body .laydate_y .laydate_yms ul li{float:left; width:60px; height:20px; line-height: 20px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;}
|
||||
.laydate_body .laydate_m{width:99px;}
|
||||
.laydate_body .laydate_m .laydate_yms{width:99px; padding:0;}
|
||||
.laydate_body .laydate_m input{width:42px; margin-right:15px;}
|
||||
.laydate_body .laydate_m .laydate_yms span{display:block; float:left; width:42px; margin: 5px 0 0 5px; line-height:24px; text-align:center; _display:inline;}
|
||||
.laydate_body .laydate_choose{display:block; float:left; position:relative; width:20px; height:24px;}
|
||||
.laydate_body .laydate_choose cite, .laydate_body .laydate_tab cite{left:50%; top:50%;}
|
||||
.laydate_body .laydate_chtop cite{margin:-7px 0 0 -5px; border-bottom-style:solid;}
|
||||
.laydate_body .laydate_chdown cite, .laydate_body .laydate_ym label{top:50%; margin:-2px 0 0 -5px; border-top-style:solid;}
|
||||
.laydate_body .laydate_chprev cite{margin:-5px 0 0 -7px;}
|
||||
.laydate_body .laydate_chnext cite{margin:-5px 0 0 -2px;}
|
||||
.laydate_body .laydate_ym label{right:28px;}
|
||||
.laydate_body .laydate_table{ width:230px; margin:0 5px; border-collapse:collapse; border-spacing:0px; }
|
||||
.laydate_body .laydate_table td{width:31px; height:19px; line-height:19px; text-align: center; cursor:pointer; font-size: 12px;}
|
||||
.laydate_body .laydate_table thead{height:22px; line-height:22px;}
|
||||
.laydate_body .laydate_table thead th{font-weight:400; font-size:12px; text-align:center;}
|
||||
.laydate_body .laydate_bottom{position:relative; height:22px; line-height:20px; padding:5px; font-size:12px;}
|
||||
.laydate_body .laydate_bottom #laydate_hms{position: relative; z-index: 1; float:left; }
|
||||
.laydate_body .laydate_time{ position:absolute; left:5px; bottom: 26px; width:129px; height:125px; *overflow:hidden;}
|
||||
.laydate_body .laydate_time .laydate_hmsno{ padding:5px 0 0 5px;}
|
||||
.laydate_body .laydate_time .laydate_hmsno span{display:block; float:left; width:24px; height:19px; line-height:19px; text-align:center; cursor:pointer; *margin-bottom:-5px;}
|
||||
.laydate_body .laydate_time1{width:228px; height:154px;}
|
||||
.laydate_body .laydate_time1 .laydate_hmsno{padding: 6px 0 0 8px;}
|
||||
.laydate_body .laydate_time1 .laydate_hmsno span{width:21px; height:20px; line-height:20px;}
|
||||
.laydate_body .laydate_msg{left:49px; bottom:67px; width:141px; height:auto; overflow: hidden;}
|
||||
.laydate_body .laydate_msg p{padding:5px 10px;}
|
||||
.laydate_body .laydate_bottom li{float:left; height:20px; line-height:20px; border-right:none; font-weight:900;}
|
||||
.laydate_body .laydate_bottom .laydate_sj{width:33px; text-align:center; font-weight:400;}
|
||||
.laydate_body .laydate_bottom input{float:left; width:21px; height:20px; line-height:20px; border:none; text-align:center; cursor:pointer; font-size:12px; font-weight:400;}
|
||||
.laydate_body .laydate_bottom .laydte_hsmtex{height:20px; line-height:20px; text-align:center;}
|
||||
.laydate_body .laydate_bottom .laydte_hsmtex span{position:absolute; width:20px; top:0; right:0px; cursor:pointer;}
|
||||
.laydate_body .laydate_bottom .laydte_hsmtex span:hover{font-size:14px;}
|
||||
.laydate_body .laydate_bottom .laydate_btn{position:absolute; right:5px; top:5px;}
|
||||
.laydate_body .laydate_bottom .laydate_btn a{float:left; height:20px; padding:0 6px; _padding:0 5px;}
|
||||
.laydate_body .laydate_bottom .laydate_v{position:absolute; left:10px; top:6px; font-family:Courier; z-index:0;}
|
||||
|
||||
BIN
static/js/plugins/laydate/skins/default/icon.png
Normal file
|
After Width: | Height: | Size: 314 B |
68
static/js/plugins/laydate/skins/default/laydate.css
Normal file
@@ -0,0 +1,68 @@
|
||||
/**
|
||||
|
||||
@Name: laydate皮肤:默认
|
||||
@Author:贤心
|
||||
@Site:http://sentsin.com/layui/laydate
|
||||
|
||||
**/
|
||||
|
||||
.laydate-icon{border:1px solid #C6C6C6; background-image:url(icon.png)}
|
||||
|
||||
.laydate_body .laydate_box,
|
||||
.laydate_body .laydate_ym,
|
||||
.laydate_body .laydate_ym .laydate_yms,
|
||||
.laydate_body .laydate_table,
|
||||
.laydate_body .laydate_table td,
|
||||
.laydate_body .laydate_bottom #laydate_hms,
|
||||
.laydate_body .laydate_time,
|
||||
.laydate_body .laydate_bottom .laydate_btn a{border:1px solid #ccc;}
|
||||
|
||||
.laydate_body .laydate_y .laydate_yms a,
|
||||
.laydate_body .laydate_choose,
|
||||
.laydate_body .laydate_table thead,
|
||||
.laydate_body .laydate_bottom .laydte_hsmtex{background-color:#F6F6F6;}
|
||||
|
||||
.laydate_body .laydate_box,
|
||||
.laydate_body .laydate_ym .laydate_yms,
|
||||
.laydate_body .laydate_time{box-shadow: 2px 2px 5px rgba(0,0,0,.1);}
|
||||
|
||||
.laydate_body .laydate_box{border-top:none; border-bottom:none; background-color:#fff; color:#333;}
|
||||
.laydate_body .laydate_box input{color:#333;}
|
||||
.laydate_body .laydate_box .laydate_void{color:#ccc!important; /*text-decoration:line-through;*/}
|
||||
.laydate_body .laydate_box .laydate_void:hover{background-color:#fff!important}
|
||||
.laydate_body .laydate_box a, .laydate_body .laydate_box a:hover{color:#333;}
|
||||
.laydate_body .laydate_box a:hover{color:#666;}
|
||||
.laydate_body .laydate_click{background-color:#eee!important;}
|
||||
.laydate_body .laydate_top{border-top:1px solid #C6C6C6;}
|
||||
.laydate_body .laydate_ym .laydate_yms{border:1px solid #C6C6C6; background-color:#fff;}
|
||||
.laydate_body .laydate_y .laydate_yms a{border-bottom:1px solid #C6C6C6;}
|
||||
.laydate_body .laydate_y .laydate_yms .laydate_chdown{border-top:1px solid #C6C6C6; border-bottom:none;}
|
||||
.laydate_body .laydate_choose{border-left:1px solid #C6C6C6;}
|
||||
.laydate_body .laydate_chprev{border-left:none; border-right:1px solid #C6C6C6;}
|
||||
.laydate_body .laydate_choose:hover,
|
||||
.laydate_body .laydate_y .laydate_yms a:hover{background-color:#fff;}
|
||||
.laydate_body .laydate_chtop cite{border-bottom-color:#666;}
|
||||
.laydate_body .laydate_chdown cite, .laydate_body .laydate_ym label{border-top-color:#666;}
|
||||
.laydate_body .laydate_chprev cite{border-right-style:solid; border-right-color:#666;}
|
||||
.laydate_body .laydate_chnext cite{border-left-style:solid; border-left-color:#666;}
|
||||
.laydate_body .laydate_table td{border:none; height:21px!important; line-height:21px!important; background-color:#fff;}
|
||||
.laydate_body .laydate_table .laydate_nothis{color:#999;}
|
||||
.laydate_body .laydate_table thead{height:21px!important; line-height:21px!important;}
|
||||
.laydate_body .laydate_table thead th{border-bottom:1px solid #ccc;}
|
||||
.laydate_body .laydate_bottom{border-bottom:1px solid #C6C6C6;}
|
||||
.laydate_body .laydate_bottom #laydate_hms{background-color:#fff;}
|
||||
.laydate_body .laydate_time{background-color:#fff;}
|
||||
.laydate_body .laydate_bottom .laydate_sj{border-right:1px solid #C6C6C6; background-color:#F6F6F6;}
|
||||
.laydate_body .laydate_bottom input{background-color:#fff;}
|
||||
.laydate_body .laydate_bottom .laydte_hsmtex{border-bottom:1px solid #C6C6C6;}
|
||||
.laydate_body .laydate_bottom .laydate_btn{border-right:1px solid #C6C6C6;}
|
||||
.laydate_body .laydate_bottom .laydate_v{color:#999}
|
||||
.laydate_body .laydate_bottom .laydate_btn a{border-right:none; background-color:#F6F6F6;}
|
||||
.laydate_body .laydate_bottom .laydate_btn a:hover{color:#000; background-color:#fff;}
|
||||
|
||||
.laydate_body .laydate_m .laydate_yms span:hover,
|
||||
.laydate_body .laydate_y .laydate_yms ul li:hover,
|
||||
.laydate_body .laydate_table td:hover,
|
||||
.laydate_body .laydate_time .laydate_hmsno span:hover{background-color:#F3F3F3}
|
||||
|
||||
|
||||
2
static/js/plugins/layer/extend/layer.ext.js
Normal file
@@ -0,0 +1,2 @@
|
||||
/*! layer弹层组件拓展类 */
|
||||
;!function(){layer.use("skin/layer.ext.css",function(){layer.layui_layer_extendlayerextjs=!0});var a=layer.cache||{},b=function(b){return a.skin?" "+a.skin+" "+a.skin+"-"+b:""};layer.prompt=function(a,c){a=a||{},"function"==typeof a&&(c=a);var d,e=2==a.formType?'<textarea class="layui-layer-input">'+(a.value||"")+"</textarea>":function(){return'<input type="'+(1==a.formType?"password":"text")+'" class="layui-layer-input" value="'+(a.value||"")+'">'}();return layer.open($.extend({btn:["确定","取消"],content:e,skin:"layui-layer-prompt"+b("prompt"),success:function(a){d=a.find(".layui-layer-input"),d.focus()},yes:function(b){var e=d.val();""===e?d.focus():e.length>(a.maxlength||500)?layer.tips("最多输入"+(a.maxlength||500)+"个字数",d,{tips:1}):c&&c(e,b,d)}},a))},layer.tab=function(a){a=a||{};var c=a.tab||{};return layer.open($.extend({type:1,skin:"layui-layer-tab"+b("tab"),title:function(){var a=c.length,b=1,d="";if(a>0)for(d='<span class="layui-layer-tabnow">'+c[0].title+"</span>";a>b;b++)d+="<span>"+c[b].title+"</span>";return d}(),content:'<ul class="layui-layer-tabmain">'+function(){var a=c.length,b=1,d="";if(a>0)for(d='<li class="layui-layer-tabli xubox_tab_layer">'+(c[0].content||"no content")+"</li>";a>b;b++)d+='<li class="layui-layer-tabli">'+(c[b].content||"no content")+"</li>";return d}()+"</ul>",success:function(a){var b=a.find(".layui-layer-title").children(),c=a.find(".layui-layer-tabmain").children();b.on("mousedown",function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0;var b=$(this),d=b.index();b.addClass("layui-layer-tabnow").siblings().removeClass("layui-layer-tabnow"),c.eq(d).show().siblings().hide()})}},a))},layer.photos=function(a,c,d){function e(a,b,c){var d=new Image;d.onload=function(){d.onload=null,b(d)},d.onerror=function(a){d.onerror=null,c(a)},d.src=a}var f={};if(a=a||{},a.photos){var g=a.photos.constructor===Object,h=g?a.photos:{},i=h.data||[],j=h.start||0;if(f.imgIndex=j+1,g){if(0===i.length)return void layer.msg("没有图片")}else{var k=$(a.photos),l=k.find(a.img||"img");if(0===l.length)return;if(c||k.find(h.img||"img").each(function(b){var c=$(this);i.push({alt:c.attr("alt"),pid:c.attr("layer-pid"),src:c.attr("layer-src")||c.attr("src"),thumb:c.attr("src")}),c.on("click",function(){layer.photos($.extend(a,{photos:{start:b,data:i,tab:a.tab},full:a.full}),!0)})}),!c)return}f.imgprev=function(a){f.imgIndex--,f.imgIndex<1&&(f.imgIndex=i.length),f.tabimg(a)},f.imgnext=function(a,b){f.imgIndex++,f.imgIndex>i.length&&(f.imgIndex=1,b)||f.tabimg(a)},f.keyup=function(a){if(!f.end){var b=a.keyCode;a.preventDefault(),37===b?f.imgprev(!0):39===b?f.imgnext(!0):27===b&&layer.close(f.index)}},f.tabimg=function(b){i.length<=1||(h.start=f.imgIndex-1,layer.close(f.index),layer.photos(a,!0,b))},f.event=function(){f.bigimg.hover(function(){f.imgsee.show()},function(){f.imgsee.hide()}),f.bigimg.find(".layui-layer-imgprev").on("click",function(a){a.preventDefault(),f.imgprev()}),f.bigimg.find(".layui-layer-imgnext").on("click",function(a){a.preventDefault(),f.imgnext()}),$(document).on("keyup",f.keyup)},f.loadi=layer.load(1,{shade:"shade"in a?!1:.9,scrollbar:!1}),e(i[j].src,function(c){layer.close(f.loadi),f.index=layer.open($.extend({type:1,area:function(){var b=[c.width,c.height],d=[$(window).width()-100,$(window).height()-100];return!a.full&&b[0]>d[0]&&(b[0]=d[0],b[1]=b[0]*d[1]/b[0]),[b[0]+"px",b[1]+"px"]}(),title:!1,shade:.9,shadeClose:!0,closeBtn:!1,move:".layui-layer-phimg img",moveType:1,scrollbar:!1,moveOut:!0,shift:5*Math.random()|0,skin:"layui-layer-photos"+b("photos"),content:'<div class="layui-layer-phimg"><img src="'+i[j].src+'" alt="'+(i[j].alt||"")+'" layer-pid="'+i[j].pid+'"><div class="layui-layer-imgsee">'+(i.length>1?'<span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span>':"")+'<div class="layui-layer-imgbar" style="display:'+(d?"block":"")+'"><span class="layui-layer-imgtit"><a href="javascript:;">'+(i[j].alt||"")+"</a><em>"+f.imgIndex+"/"+i.length+"</em></span></div></div></div>",success:function(b,c){f.bigimg=b.find(".layui-layer-phimg"),f.imgsee=b.find(".layui-layer-imguide,.layui-layer-imgbar"),f.event(b),a.tab&&a.tab(i[j],b)},end:function(){f.end=!0,$(document).off("keyup",f.keyup)}},a))},function(){layer.close(f.loadi),layer.msg("当前图片地址异常<br>是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){i.length>1&&f.imgnext(!0,!0)}})})}}}();
|
||||
2
static/js/plugins/layer/layer.js
Normal file
BIN
static/js/plugins/layer/skin/default/icon-ext.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
static/js/plugins/layer/skin/default/icon.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
static/js/plugins/layer/skin/default/loading-0.gif
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
static/js/plugins/layer/skin/default/loading-1.gif
Normal file
|
After Width: | Height: | Size: 701 B |
BIN
static/js/plugins/layer/skin/default/loading-2.gif
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
7
static/js/plugins/layer/skin/layer.css
Normal file
8
static/js/plugins/layer/skin/layer.ext.css
Normal file
@@ -0,0 +1,8 @@
|
||||
/*!
|
||||
|
||||
@Name: layer拓展样式
|
||||
@Date: 2012.12.13
|
||||
@Author: 贤心
|
||||
@blog: sentsin.com
|
||||
|
||||
*/.layui-layer-imgbar,.layui-layer-imgtit a,.layui-layer-tab .layui-layer-title span{text-overflow:ellipsis;white-space:nowrap}.layui-layer-iconext{background:url(default/icon-ext.png) no-repeat}html #layui_layer_skinlayerextcss{display:none;position:absolute;width:1989px}.layui-layer-prompt .layui-layer-input{display:block;width:220px;height:30px;margin:0 auto;line-height:30px;padding:0 5px;border:1px solid #ccc;box-shadow:1px 1px 5px rgba(0,0,0,.1) inset;color:#333}.layui-layer-prompt textarea.layui-layer-input{width:300px;height:100px;line-height:20px}.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4)}.layui-layer-tab .layui-layer-title{padding-left:0;border-bottom:1px solid #ccc;background-color:#eee;overflow:visible}.layui-layer-tab .layui-layer-title span{position:relative;float:left;min-width:80px;max-width:260px;padding:0 20px;text-align:center;cursor:default;overflow:hidden}.layui-layer-tab .layui-layer-title span.layui-layer-tabnow{height:43px;border-left:1px solid #ccc;border-right:1px solid #ccc;background-color:#fff;z-index:10}.layui-layer-tab .layui-layer-title span:first-child{border-left:none}.layui-layer-tabmain{line-height:24px;clear:both}.layui-layer-tabmain .layui-layer-tabli{display:none}.layui-layer-tabmain .layui-layer-tabli.xubox_tab_layer{display:block}.xubox_tabclose{position:absolute;right:10px;top:5px;cursor:pointer}.layui-layer-photos{-webkit-animation-duration:1s;animation-duration:1s;}.layui-layer-photos .layui-layer-content{overflow:hidden;text-align:center}.layui-layer-photos .layui-layer-phimg img{position:relative;width:100%;display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-imgbar,.layui-layer-imguide{display:none}.layui-layer-imgnext,.layui-layer-imgprev{position:absolute;top:50%;width:27px;_width:44px;height:44px;margin-top:-22px;outline:0;blr:expression(this.onFocus=this.blur())}.layui-layer-imgprev{left:10px;background-position:-5px -5px;_background-position:-70px -5px}.layui-layer-imgprev:hover{background-position:-33px -5px;_background-position:-120px -5px}.layui-layer-imgnext{right:10px;_right:8px;background-position:-5px -50px;_background-position:-70px -50px}.layui-layer-imgnext:hover{background-position:-33px -50px;_background-position:-120px -50px}.layui-layer-imgbar{position:absolute;left:0;bottom:0;width:100%;height:32px;line-height:32px;background-color:rgba(0,0,0,.8);background-color:#000\9;filter:Alpha(opacity=80);color:#fff;overflow:hidden;font-size:0}.layui-layer-imgtit *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:12px}.layui-layer-imgtit a{max-width:65%;overflow:hidden;color:#fff}.layui-layer-imgtit a:hover{color:#fff;text-decoration:underline}.layui-layer-imgtit em{padding-left:10px;font-style:normal}
|
||||
1
static/js/plugins/queryCity/css/cityLayout.css
Normal file
BIN
static/js/plugins/queryCity/images/bg_mc_0113_1.png
Normal file
|
After Width: | Height: | Size: 199 B |
BIN
static/js/plugins/queryCity/images/bg_mc_0113_2.png
Normal file
|
After Width: | Height: | Size: 115 B |
BIN
static/js/plugins/queryCity/images/bg_mc_0113_3.png
Normal file
|
After Width: | Height: | Size: 334 B |
BIN
static/js/plugins/queryCity/images/bg_mc_0113_4.png
Normal file
|
After Width: | Height: | Size: 579 B |
BIN
static/js/plugins/queryCity/images/bg_mc_0130_1.png
Normal file
|
After Width: | Height: | Size: 290 B |
BIN
static/js/plugins/queryCity/images/bg_mc_0130_2.png
Normal file
|
After Width: | Height: | Size: 545 B |
BIN
static/js/plugins/queryCity/images/ts-indexcity.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
1077
static/js/plugins/queryCity/js/public.js
Normal file
1076
static/js/plugins/queryCity/js/public2.js
Normal file
1
static/js/plugins/queryCity/js/queryAllAreas.js
Normal file
1
static/js/plugins/queryCity/js/queryAllProvinces.js
Normal file
@@ -0,0 +1 @@
|
||||
{"success":true,"isException":false,"exception":false,"province":null,"provinceId":null,"provinces":[{"id":"8E6iYOwATjmULsiKbixqFrHzfPg=","updateTime":1335186852000,"provinceName":"北京","indexId":"01"},{"id":"+W2g+8qeTH6SltX2muGzhLHzfPg=","updateTime":1335186852000,"provinceName":"上海","indexId":"02"},{"id":"W6ZCkC/1TB+ELTOYT66r1bHzfPg=","updateTime":1335186852000,"provinceName":"天津","indexId":"03"},{"id":"QuK3YXHMRDWy/6ZxM3JJp7HzfPg=","updateTime":1335186852000,"provinceName":"重庆","indexId":"04"},{"id":"WU1jBeGuQz6vL3LlpRFahbHzfPg=","updateTime":1335186852000,"provinceName":"安徽省","indexId":"05"},{"id":"soZRdg+qTJaUug6AW/IFBrHzfPg=","updateTime":1335186852000,"provinceName":"澳门特别行政区","indexId":"06"},{"id":"UwCVDwGmQym3fJJi0iPPdrHzfPg=","updateTime":1335186852000,"provinceName":"福建省","indexId":"07"},{"id":"dCZODbNVRK6VwJ11YYZwvLHzfPg=","updateTime":1335186852000,"provinceName":"甘肃省","indexId":"08"},{"id":"PzCHIKYNS329xfDXC4pUMLHzfPg=","updateTime":1335186852000,"provinceName":"广东省","indexId":"09"},{"id":"2SXnGb0dSB21dEsXsNUCorHzfPg=","updateTime":1335186852000,"provinceName":"广西壮族自治区","indexId":"10"},{"id":"4TIEBp1mQ5+ZJIQu0pUFqbHzfPg=","updateTime":1335186852000,"provinceName":"贵州省","indexId":"11"},{"id":"kPkdjTfQQ4yWdy+rAPiiOLHzfPg=","updateTime":1335186852000,"provinceName":"海南省","indexId":"12"},{"id":"FfNaSEmfQwesQsLyNsrmKLHzfPg=","updateTime":1335186852000,"provinceName":"河北省","indexId":"13"},{"id":"3M9MR+uWQH6kCj+nJ3IZ1bHzfPg=","updateTime":1335186852000,"provinceName":"河南省","indexId":"14"},{"id":"ypkm4wxjRIGSlfwEPIlqNrHzfPg=","updateTime":1335186852000,"provinceName":"黑龙江省","indexId":"15"},{"id":"6kNcb9U2TnmkbIEeONIiE7HzfPg=","updateTime":1335186852000,"provinceName":"湖北省","indexId":"16"},{"id":"pfIJhOh5Rp+zBzhLL6hTxLHzfPg=","updateTime":1335186852000,"provinceName":"湖南省","indexId":"17"},{"id":"2fb+5/04TjyQMnR3/xqIq7HzfPg=","updateTime":1335186852000,"provinceName":"吉林省","indexId":"18"},{"id":"6cXBgfuUSnu/GlSpYgbw6bHzfPg=","updateTime":1335186852000,"provinceName":"江苏省","indexId":"19"},{"id":"dznX31WZT5ys2wrrsO7F1rHzfPg=","updateTime":1335186852000,"provinceName":"江西省","indexId":"20"},{"id":"No6+46CfTgyf/wOS7qLIsrHzfPg=","updateTime":1335186852000,"provinceName":"辽宁省","indexId":"21"},{"id":"9lII0N1jQpu+XFNbUMA3CbHzfPg=","updateTime":1335186852000,"provinceName":"内蒙古自治区","indexId":"22"},{"id":"A0sRKrBjR266CdFzGdTK9rHzfPg=","updateTime":1335186852000,"provinceName":"宁夏回族自治区","indexId":"23"},{"id":"gU1mo564Tj2UgR6+O13jTrHzfPg=","updateTime":1335186852000,"provinceName":"青海省","indexId":"24"},{"id":"oQhQ18JJQMeunth02Y2wT7HzfPg=","updateTime":1335186852000,"provinceName":"山东省","indexId":"25"},{"id":"kv07bTt8Sae3BCQ5Fn09U7HzfPg=","updateTime":1335186852000,"provinceName":"山西省","indexId":"26"},{"id":"NDR1ZkkZS92B4Dxbj9cqyrHzfPg=","updateTime":1335186852000,"provinceName":"陕西省","indexId":"27"},{"id":"SD4W5AlLTlmmXhf7MhNRyrHzfPg=","updateTime":1335186852000,"provinceName":"四川省","indexId":"28"},{"id":"HVJsEer/Tves4Ezqe9ILALHzfPg=","updateTime":1335186852000,"provinceName":"台湾省","indexId":"29"},{"id":"amYXBXeoQXaGiDTA/xX2ybHzfPg=","updateTime":1335186852000,"provinceName":"西藏自治区","indexId":"30"},{"id":"yl2+ugwyQsGlPPka2bSRMLHzfPg=","updateTime":1335186852000,"provinceName":"香港特别行政区","indexId":"31"},{"id":"3EXrQzvVTX+onQ3ZqDd6XrHzfPg=","updateTime":1335186852000,"provinceName":"新疆维吾尔自治区","indexId":"32"},{"id":"EHVzDXPPRMSSsA5mHhuzjbHzfPg=","updateTime":1335186852000,"provinceName":"云南省","indexId":"33"},{"id":"AUCdSfxFQ7G7z/5+P+3TbrHzfPg=","updateTime":1335186852000,"provinceName":"浙江省","indexId":"34"}],"successResultValue":null}
|
||||
1
static/js/plugins/queryCity/js/queryCities.js
Normal file
159
static/js/plugins/upload.js
Normal file
@@ -0,0 +1,159 @@
|
||||
/*******************************************************************************
|
||||
* 异步上传文件兼容IE8,火狐和谷歌可用
|
||||
* 实现单个多次上传不刷新
|
||||
* 修改自:http://www.ponxu.com
|
||||
* @author 柳伟伟 <702295399@qq.com>
|
||||
* @version 1.3 (2015-6-14)
|
||||
*******************************************************************************/
|
||||
(function ($) {
|
||||
|
||||
var frameCount = 0;
|
||||
var formName = "";
|
||||
|
||||
var iframeObj = null;
|
||||
var state = {};
|
||||
|
||||
|
||||
//var fileHtml = "";
|
||||
var colfile = null;
|
||||
|
||||
//清空值
|
||||
function clean(target) {
|
||||
|
||||
var file = $(target);
|
||||
var col = file.clone(true).val("");
|
||||
file.after(col);
|
||||
file.remove();
|
||||
//关键说明
|
||||
//先得到当前的对象和参数,接着进行克隆(同时克隆事件)
|
||||
//将克隆好的副本放在原先的之后,按照顺序逐个删除,最后初始化克隆的副本
|
||||
}
|
||||
function ajaxSubmit(target) {
|
||||
|
||||
var options = state.options;
|
||||
|
||||
if (options.url == '' || options.url == null) {
|
||||
alert("无上传地址");
|
||||
return;
|
||||
}
|
||||
if ($(target).val() == '' || $(target).val() == null) {
|
||||
alert("请选择文件");
|
||||
return;
|
||||
}
|
||||
|
||||
if (iframeObj == null) {
|
||||
|
||||
var frameName = 'upload_frame_' + (frameCount++);
|
||||
var iframe = $('<iframe style="position:absolute;top:-9999px" ><script type="text/javascript"></script></iframe>').attr('name', frameName);
|
||||
formName = 'form_' + frameName;
|
||||
var form = $('<form method="post" style="display:none;" enctype="multipart/form-data" />').attr('name', formName);
|
||||
form.attr("target", frameName).attr('action', options.url);
|
||||
//
|
||||
|
||||
var fileHtml = $(target).prop("outerHTML");
|
||||
|
||||
|
||||
colfile = $(target).clone(true);
|
||||
|
||||
|
||||
$(target).replaceWith(colfile)
|
||||
|
||||
var formHtml = "";
|
||||
// form中增加数据域
|
||||
for (key in options.params) {
|
||||
formHtml += '<input type="hidden" name="' + key + '" value="' + options.params[key] + '">';
|
||||
}
|
||||
|
||||
form.append(formHtml);
|
||||
|
||||
form.append(target);
|
||||
|
||||
iframe.appendTo("body");
|
||||
|
||||
form.appendTo("body");
|
||||
|
||||
|
||||
iframeObj = iframe;
|
||||
}
|
||||
//禁用
|
||||
$(colfile).attr("disabled", "disabled");
|
||||
|
||||
|
||||
var canSend = options.onSend($(target), $(target).val());
|
||||
if (!canSend) {
|
||||
return;
|
||||
}
|
||||
|
||||
var form = $("form[name=" + formName + "]");
|
||||
|
||||
//加载事件
|
||||
iframeObj.bind("load", function () {
|
||||
var contents = $(this).contents().get(0);
|
||||
var data = $(contents).find('body').text();
|
||||
if ('json' == options.dataType) {
|
||||
data = window.eval('(' + data + ')');
|
||||
}
|
||||
|
||||
options.onComplate(data);
|
||||
|
||||
iframeObj.remove();
|
||||
form.remove();
|
||||
iframeObj = null;
|
||||
|
||||
//启用
|
||||
$(colfile).removeAttr("disabled")
|
||||
});
|
||||
|
||||
try {
|
||||
form.submit();
|
||||
} catch (Eobject) {
|
||||
console.log(Eobject)
|
||||
//alert(Eobject)
|
||||
}
|
||||
};
|
||||
//构造
|
||||
$.fn.upload = function (options) {
|
||||
if (typeof options == "string") {
|
||||
return $.fn.upload.methods[options](this);
|
||||
}
|
||||
options = options || {};
|
||||
state = $.data(this, "upload");
|
||||
if (state)
|
||||
$.extend(state.options, options);
|
||||
else {
|
||||
state = $.data(this, "upload", {
|
||||
options: $.extend({}, $.fn.upload.defaults, options)
|
||||
});
|
||||
}
|
||||
|
||||
//var opts = state.options;
|
||||
|
||||
//if (opts.url == '') {
|
||||
// return;
|
||||
//}
|
||||
};
|
||||
//方法
|
||||
$.fn.upload.methods = {
|
||||
clean: function (jq) {
|
||||
return jq.each(function () {
|
||||
clean(jq);
|
||||
});
|
||||
},
|
||||
ajaxSubmit: function (jq) {
|
||||
return jq.each(function () {
|
||||
ajaxSubmit(jq);
|
||||
});
|
||||
},
|
||||
getFileVal: function (jq) {
|
||||
return jq.val()
|
||||
}
|
||||
};
|
||||
//默认项
|
||||
$.fn.upload.defaults = $.extend({}, {
|
||||
url: '',
|
||||
dataType: 'json',
|
||||
params: {},
|
||||
onSend: function (obj, str) { return true; },
|
||||
onComplate: function () { return true; }
|
||||
});
|
||||
})(jQuery);
|
||||