/* Prototype JavaScript framework, version 1.4.0
* (c) 2005 Sam Stephenson <sam@conio.net>
*
* THIS FILE IS AUTOMATICALLY GENERATED. When sending patches, please diff
* against the source tree, available from the Prototype darcs repository.
*
* Prototype is freely distributable under the terms of an MIT-style license.
*
* For details, see the Prototype web site: http://prototype.conio.net/
*
/*--------------------------------------------------------------------------*/
var Prototype = {
Version: '1.4.0',
ScriptFragment: '(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)',
emptyFunction: function() {},
K: function(x) {return x}
}
var Class = {
create: function() {
return function() {
this.initialize.apply(this, arguments);
}
}
}
var Abstract = new Object();
Object.extend = function(destination, source) {
for (property in source) {
destination[property] = source[property];
}
return destination;
}
Object.inspect = function(object) {
try {
if (object == undefined) return 'undefined';
if (object == null) return 'null';
return object.inspect ? object.inspect() : object.toString();
} catch (e) {
if (e instanceof RangeError) return '...';
throw e;
}
}
Function.prototype.bind = function() {
var __method = this, args = $A(arguments), object = args.shift();
return function() {
return __method.apply(object, args.concat($A(arguments)));
}
}
Function.prototype.bindAsEventListener = function(object) {
var __method = this;
return function(event) {
return __method.call(object, event || window.event);
}
}
Object.extend(Number.prototype, {
toColorPart: function() {
var digits = this.toString(16);
if (this < 16) return '0' + digits;
return digits;
},
succ: function() {
return this + 1;
},
times: function(iterator) {
$R(0, this, true).each(iterator);
return this;
}
});
var Try = {
these: function() {
var returnValue;
for (var i = 0; i < arguments.length; i++) {
var lambda = arguments[i];
try {
returnValue = lambda();
break;
} catch (e) {}
}
return returnValue;
}
}
/*--------------------------------------------------------------------------*/
var PeriodicalExecuter = Class.create();
PeriodicalExecuter.prototype = {
initialize: function(callback, frequency) {
this.callback = callback;
this.frequency = frequency;
this.currentlyExecuting = false;
this.registerCallback();
},
registerCallback: function() {
setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
},
onTimerEvent: function() {
if (!this.currentlyExecuting) {
try {
this.currentlyExecuting = true;
this.callback();
} finally {
this.currentlyExecuting = false;
}
}
}
}
/*--------------------------------------------------------------------------*/
function $() {
var elements = new Array();
for (var i = 0; i < arguments.length; i++) {
var element = arguments[i];
if (typeof element == 'string')
element = document.getElementById(element);
if (arguments.length == 1)
return element;
elements.push(element);
}
return elements;
}
Object.extend(String.prototype, {
stripTags: function() {
return this.replace(/<\/?[^>]+>/gi, '');
},
stripScripts: function() {
return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
},
extractScripts: function() {
var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
return (this.match(matchAll) || []).map(function(scriptTag) {
return (scriptTag.match(matchOne) || ['', ''])[1];
});
},
evalScripts: function() {
return this.extractScripts().map(eval);
},
escapeHTML: function() {
var div = document.createElement('div');
var text = document.createTextNode(this);
div.appendChild(text);
return div.innerHTML;
},
unescapeHTML: function() {
var div = document.createElement('div');
div.innerHTML = this.stripTags();
return div.childNodes[0] ? div.childNodes[0].nodeValue : '';
},
toQueryParams: function() {
var pairs = this.match(/^\??(.*)$/)[1].split('&');
return pairs.inject({}, function(params, pairString) {
var pair = pairString.split('=');
params[pair[0]] = pair[1];
return params;
});
},
toArray: function() {
return this.split('');
},
camelize: function() {
var oStringList = this.split('-');
if (oStringList.length == 1) return oStringList[0];
var camelizedString = this.indexOf('-') == 0
? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1)
: oStringList[0];
for (var i = 1, len = oStringList.length; i < len; i++) {
var s = oStringList[i];
camelizedString += s.charAt(0).toUpperCase() + s.substring(1);
}
return camelizedString;
},
inspect: function() {
return "'" + this.replace('\\', '\\\\').replace("'", '\\\'') + "'";
}
});
String.prototype.parseQuery = String.prototype.toQueryParams;
var $break = new Object();
var $continue = new Object();
var Enumerable = {
each: function(iterator) {
var index = 0;
try {
this._each(function(value) {
try {
iterator(value, index++);
} catch (e) {
if (e != $continue) throw e;
}
});
} catch (e) {
if (e != $break) throw e;
}
},
all: function(iterator) {
var result = true;
this.each(function(value, index) {
result = result && !!(iterator || Prototype.K)(value, index);
if (!result) throw $break;
});
return result;
},
any: function(iterator) {
var result = true;
this.each(function(value, index) {
if (result = !!(iterator || Prototype.K)(value, index))
throw $break;
});
return result;
},
collect: function(iterator) {
var results = [];
this.each(function(value, index) {
results.push(iterator(value, index));
});
return results;
},
detect: function (iterator) {
var result;
this.each(function(value, index) {
if (iterator(value, index)) {
result = value;
throw $break;
}
});
return result;
},
findAll: function(iterator) {
var results = [];
this.each(function(value, index) {
if (iterator(value, index))
results.push(value);
});
return results;
},
grep: function(pattern, iterator) {
var results = [];
this.each(function(value, index) {
var stringValue = value.toString();
if (stringValue.match(pattern))
results.push((iterator || Prototype.K)(value, index));
})
return results;
},
include: function(object) {
var found = false;
this.each(function(value) {
if (value == object) {
found = true;
throw $break;
}
});
return found;
},
inject: function(memo, iterator) {
this.each(function(value, index) {
memo = iterator(memo, value, index);
});
return memo;
},
invoke: function(method) {
var args = $A(arguments).slice(1);
return this.collect(function(value) {
return value[method].apply(value, args);
});
},
max: function(iterator) {
var result;
this.each(function(value, index) {
value = (iterator || Prototype.K)(value, index);
if (value >= (result || value))
result = value;
});
return result;
},
min: function(iterator) {
var result;
this.each(function(value, index) {
value = (iterator || Prototype.K)(value, index);
if (value <= (result || value))
result = value;
});
return result;
},
partition: function(iterator) {
var trues = [], falses = [];
this.each(function(value, index) {
((iterator || Prototype.K)(value, index) ?
trues : falses).push(value);
});
return [trues, falses];
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
挑战ASP.NET 2.0 for C#动态网站开发 ( 邓文渊) 源码第7章。 (190个子文件)
albumAdminFix.aspx 12KB
albumAdminFix.aspx 12KB
albumAdmin.aspx 9KB
albumAdmin.aspx 9KB
albumAdminCategory.aspx 9KB
albumAdminCategory.aspx 9KB
albumAdminPost.aspx 7KB
albumAdminPost.aspx 7KB
albumCategory.aspx 5KB
albumCategory.aspx 5KB
album.aspx 5KB
album.aspx 5KB
albumDetail.aspx 5KB
albumDetail.aspx 5KB
albumAdminMain.aspx 5KB
albumAdminMain.aspx 5KB
web.config 3KB
web.config 3KB
albumAdminFix.aspx.cs 6KB
albumCategory.aspx.cs 5KB
album.aspx.cs 5KB
albumDetail.aspx.cs 2KB
albumAdminMain.aspx.cs 2KB
albumAdminCategory.aspx.cs 1KB
albumAdminPost.aspx.cs 1KB
albumAdmin.aspx.cs 840B
albumAdminFix.aspx.cs 383B
albumAdminCategory.aspx.cs 347B
albumAdminMain.aspx.cs 343B
albumAdminPost.aspx.cs 343B
albumCategory.aspx.cs 342B
albumDetail.aspx.cs 340B
albumAdmin.aspx.cs 339B
album.aspx.cs 332B
style.css 6KB
style.css 6KB
lightbox.css 2KB
lightbox.css 2KB
Thumbs.db 119KB
Thumbs.db 73KB
Thumbs.db 66KB
loading.gif 3KB
loading.gif 3KB
photoback.gif 2KB
photoback.gif 2KB
icon_stop.gif 1KB
icon_stop.gif 1KB
closelabel.gif 979B
closelabel.gif 979B
rss1.gif 684B
rss1.gif 684B
prevlabel.gif 371B
prevlabel.gif 371B
nextlabel.gif 354B
nextlabel.gif 354B
prev.gif 307B
prev.gif 307B
next.gif 305B
next.gif 305B
close.gif 222B
close.gif 222B
dwblogtbg.gif 153B
dwblogtbg.gif 153B
email.gif 100B
email.gif 100B
comments.gif 97B
comments.gif 97B
people.gif 93B
people.gif 93B
arrow.gif 57B
arrow.gif 57B
blank.gif 43B
blank.gif 43B
getImage2.jpg 220KB
IMG7-1.JPG 67KB
IMG7-1.JPG 67KB
IMG12-5.JPG 63KB
IMG12-5.JPG 63KB
IMG12-1.JPG 63KB
IMG12-3.JPG 62KB
IMG12-3.JPG 62KB
IMG12-6.JPG 57KB
IMG12-6.JPG 57KB
IMG7-2.JPG 56KB
IMG7-2.JPG 56KB
6666.jpg 54KB
66666.jpg 54KB
5555.jpg 53KB
55555.jpg 53KB
IMG5-1.JPG 52KB
IMG5-1.JPG 52KB
IMG6-2.JPG 51KB
IMG6-2.JPG 51KB
IMG11-2.JPG 49KB
IMG11-2.JPG 49KB
attach21.jpg 48KB
IMG12-2.JPG 45KB
IMG11-1.JPG 44KB
IMG11-1.JPG 44KB
1.jpg 43KB
共 190 条
- 1
- 2
资源评论
thb86
- 粉丝: 4
- 资源: 19
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功