1
0
Fork 0
forked from 0x2620/oxjs

remove Ox.each, , $.extend, $.map and $.merge

This commit is contained in:
rolux 2011-09-17 20:36:09 +02:00
commit 4cc754a28d
35 changed files with 104 additions and 131 deletions

View file

@ -45,7 +45,7 @@ Ox.Range = function(options, self) {
value: 0,
valueNames: null,
})
.options($.extend(options, {
.options(Ox.extend(options, {
arrowStep: options.arrowStep ?
options.arrowStep : options.step,
trackImages: $.makeArray(options.trackImages || [])
@ -55,7 +55,7 @@ Ox.Range = function(options, self) {
width: self.options.size + 'px'
});
$.extend(self, {
Ox.extend(self, {
trackColors: self.options.trackColors.length,
trackImages: self.options.trackImages.length,
values: (self.options.max - self.options.min + self.options.step) /
@ -86,7 +86,7 @@ Ox.Range = function(options, self) {
self.$track = Ox.Element()
.addClass('OxTrack')
.css($.extend({
.css(Ox.extend({
width: (self.trackSize - 2) + 'px'
}, self.trackImages == 1 ? {
background: 'rgb(0, 0, 0)'
@ -224,11 +224,11 @@ Ox.Range = function(options, self) {
self.$track.css({
backgroundImage: $.browser.mozilla ?
('-moz-linear-gradient(left, ' +
self.options.trackColors[0] + ' 0%, ' + $.map(self.options.trackColors, function(v, i) {
self.options.trackColors[0] + ' 0%, ' + self.options.trackColors.map(function(v, i) {
return v + ' ' + ((self.trackColorsStart + self.trackColorsStep * i) * 100) + '%';
}).join(', ') + ', ' + self.options.trackColors[self.trackColors - 1] + ' 100%)') :
('-webkit-gradient(linear, left top, right top, color-stop(0, ' +
self.options.trackColors[0] + '), ' + $.map(self.options.trackColors, function(v, i) {
self.options.trackColors[0] + '), ' + self.options.trackColors.map(function(v, i) {
return 'color-stop(' + (self.trackColorsStart + self.trackColorsStep * i) + ', ' + v + ')';
}).join(', ') + ', color-stop(1, ' + self.options.trackColors[self.trackColors - 1] + '))')
});