forked from 0x2620/oxjs
upgrading to jquery 1.4
This commit is contained in:
parent
5b8b31271c
commit
200caeb60b
6 changed files with 6169 additions and 26 deletions
|
|
@ -3,7 +3,7 @@
|
|||
ox.ui.js
|
||||
|
||||
requires
|
||||
jquery.js
|
||||
jquery-1.4.js
|
||||
ox.js
|
||||
################################################################################
|
||||
*/
|
||||
|
|
@ -34,11 +34,11 @@ requires
|
|||
};
|
||||
return sizes[size];
|
||||
},
|
||||
jqueryFunctions: function() {
|
||||
jQueryFunctions: function() {
|
||||
var functions = [],
|
||||
$element = $("<div/>");
|
||||
delete $element.length;
|
||||
$.each($element, function(k, v) {
|
||||
$element = $("<div>");
|
||||
//delete $element.length;
|
||||
Ox.each($element, function(k, v) {
|
||||
if (typeof v == "function") {
|
||||
functions.push(k);
|
||||
}
|
||||
|
|
@ -167,6 +167,7 @@ requires
|
|||
*/
|
||||
|
||||
(function() {
|
||||
|
||||
var buffer = "",
|
||||
bufferTime = 0,
|
||||
bufferTimeout = 1000,
|
||||
|
|
@ -292,7 +293,8 @@ requires
|
|||
document.keydown(keydown);
|
||||
function keydown(e) {
|
||||
var key = [],
|
||||
ret = true;
|
||||
ret = true,
|
||||
time;
|
||||
$.each(modifierNames, function(k, v) {
|
||||
if (e[k]) {
|
||||
key.push(v);
|
||||
|
|
@ -304,7 +306,7 @@ requires
|
|||
}
|
||||
key = key.join(" ");
|
||||
if (key.match(/^[\w\d-]$|SPACE/)) {
|
||||
var time = Ox.time();
|
||||
time = Ox.time();
|
||||
if (time - bufferTime > bufferTimeout) {
|
||||
buffer = "";
|
||||
}
|
||||
|
|
@ -370,18 +372,7 @@ requires
|
|||
|
||||
Ox.Element = function() {
|
||||
|
||||
var elements = {},
|
||||
jQueryFunctions = function() {
|
||||
var functions = [],
|
||||
$element = $("<div/>");
|
||||
delete $element.length;
|
||||
$.each($element, function(k, v) {
|
||||
if (typeof v == "function") {
|
||||
functions.push(k);
|
||||
}
|
||||
});
|
||||
return functions.sort();
|
||||
}();
|
||||
var elements = {};
|
||||
|
||||
return function(options, self) {
|
||||
|
||||
|
|
@ -400,15 +391,18 @@ requires
|
|||
}
|
||||
that.ox = Ox.version;
|
||||
that.id = Ox.uid();
|
||||
that.$element = $("<" + (options.element || "div") + "/>")
|
||||
.data("ox", that.id);
|
||||
that.$element = $("<" + (options.element || "div") + "/>", {
|
||||
data: {
|
||||
ox: that.id
|
||||
}
|
||||
});
|
||||
elements[that.id] = that;
|
||||
wrapjQuery();
|
||||
})();
|
||||
|
||||
// private
|
||||
function wrapjQuery() {
|
||||
$.each(jQueryFunctions, function(i, v) {
|
||||
$.each(oxui.jQueryFunctions, function(i, v) {
|
||||
that[v] = function() {
|
||||
var args = arguments,
|
||||
length = args.length,
|
||||
|
|
@ -947,8 +941,7 @@ requires
|
|||
type: "text"
|
||||
})
|
||||
.options(options || {});
|
||||
that
|
||||
.attr({
|
||||
that.attr({
|
||||
type: self.options.type,
|
||||
placeholder: self.options.placeholder
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue