1
0
Fork 0
forked from 0x2620/oxjs

new build system: build in /build, dev version in /dev; split up Ox.js; fix tests

This commit is contained in:
rolux 2011-10-07 03:04:47 +02:00
commit d0fe279a0f
366 changed files with 8165 additions and 161926 deletions

View file

@ -1,7 +1,6 @@
Ox.load.UI = function(options, callback) {
options = Ox.extend({
debug: false,
hideScreen: true,
loadImages: true,
showScreen: false,
@ -198,16 +197,10 @@ Ox.load.UI = function(options, callback) {
function loadFiles() {
Ox.loadFile(Ox.PATH + 'jquery/jquery' + (options.debug ? '' : '.min') + '.js', function() {
Ox.loadFile(Ox.PATH + '/Ox.UI/jquery/jquery.js', function() {
initUI();
Ox.getJSON(Ox.UI.PATH + 'json/Ox.UI.files.json', function(files) {
var promises = [];
if (options.debug == false) {
files = files.filter(function(file) {
return !Ox.startsWith(file, 'Ox.UI/js/');
});
files.push('Ox.UI/js/Ox.UI.js');
}
files.forEach(function(file) {
var dfd = new $.Deferred();
promises.push(dfd.promise());

View file

@ -92,14 +92,14 @@ Ox.Resizebar = function(options, self) {
// fixme: send {size: x}, not x
if (self.isLeftOrTop) {
self.options.elements[0]
.css(self.dimensions[1], self.options.size + 'px')
.css(self.dimensions[1], self.options.size + 'px');
self.options.elements[1]
.css(self.edges[2], (self.options.size + 1) + 'px')
.css(self.edges[2], (self.options.size + 1) + 'px');
} else {
self.options.elements[0]
.css(self.edges[3], (self.options.size + 1) + 'px')
.css(self.edges[3], (self.options.size + 1) + 'px');
self.options.elements[1]
.css(self.dimensions[1], self.options.size + 'px')
.css(self.dimensions[1], self.options.size + 'px');
}
triggerEvents('resize');
self.options.parent.updateSize(self.isLeftOrTop ? 0 : 1, self.options.size); // fixme: listen to event instead?

View file

@ -745,14 +745,14 @@ Ox.Calendar = function(options, self) {
var deltaZ = 0;
if (!self.mousewheel && deltaY && Math.abs(deltaY) > Math.abs(deltaX)) {
if (deltaY < 0 && self.options.zoom > 0) {
deltaZ = -1
deltaZ = -1;
} else if (deltaY > 0 && self.options.zoom < self.maxZoom) {
deltaZ = 1
deltaZ = 1;
}
if (deltaZ) {
self.options.date = deltaZ == -1 ?
new Date(2 * +self.options.date - +getMouseDate(e)) :
new Date((+self.options.date + +getMouseDate(e)) / 2)
new Date((+self.options.date + +getMouseDate(e)) / 2);
zoomBy(deltaZ);
}
}

View file

@ -1,10 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256">
<g transform="translate(128, 128)">
<circle cx="0" cy="0" r="16" fill="#404040"/>
<rect x="-16" y="-16" width="32" height="32" fill="#404040"/>
<polygon points="-112,-48 -48,0 -112,48" fill="#404040" transform="rotate(0)"/>
<polygon points="-112,-48 -48,0 -112,48" fill="#404040" transform="rotate(90)"/>
<polygon points="-112,-48 -48,0 -112,48" fill="#404040" transform="rotate(180)"/>
<polygon points="-112,-48 -48,0 -112,48" fill="#404040" transform="rotate(270)"/>
</g>
</svg>
<circle cx="128" cy="128" r="80" fill="#404040"/>
</svg>

Before

Width:  |  Height:  |  Size: 603 B

After

Width:  |  Height:  |  Size: 126 B

Before After
Before After

View file

@ -1,10 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256">
<g transform="translate(128, 128)">
<circle cx="0" cy="0" r="16" fill="#404040"/>
<rect x="-16" y="-16" width="32" height="32" fill="#404040"/>
<polygon points="-128,-0 -64,-48 -64,48" fill="#404040" transform="rotate(0)"/>
<polygon points="-128,-0 -64,-48 -64,48" fill="#404040" transform="rotate(90)"/>
<polygon points="-128,-0 -64,-48 -64,48" fill="#404040" transform="rotate(180)"/>
<polygon points="-128,-0 -64,-48 -64,48" fill="#404040" transform="rotate(270)"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 603 B

View file

@ -1,10 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256">
<g transform="translate(128, 128)">
<circle cx="0" cy="0" r="16" fill="#C0C0C0"/>
<rect x="-16" y="-16" width="32" height="32" fill="#C0C0C0"/>
<polygon points="-112,-48 -48,0 -112,48" fill="#C0C0C0" transform="rotate(0)"/>
<polygon points="-112,-48 -48,0 -112,48" fill="#C0C0C0" transform="rotate(90)"/>
<polygon points="-112,-48 -48,0 -112,48" fill="#C0C0C0" transform="rotate(180)"/>
<polygon points="-112,-48 -48,0 -112,48" fill="#C0C0C0" transform="rotate(270)"/>
</g>
</svg>
<circle cx="128" cy="128" r="80" fill="#C0C0C0"/>
</svg>

Before

Width:  |  Height:  |  Size: 603 B

After

Width:  |  Height:  |  Size: 126 B

Before After
Before After