1
0
Fork 0
forked from 0x2620/oxjs

some fixes for filters and form elements

This commit is contained in:
rlx 2011-09-08 08:16:31 +00:00
commit 3f3edac8c7
9 changed files with 113 additions and 79 deletions

View file

@ -454,27 +454,35 @@ Ox.load('Geo', function() {
{
options: {
elements: [
new Ox.Label({
Ox.Label({
title: "Match",
overlap: "right",
}),
new Ox.Select({
id: "select_",
items: [
{id: "all", title: "all"},
{id: "any", title: "any"},
],
overlap: "right",
width: 48
}),
new Ox.Label({
title: "of the following conditions",
}),
Ox.FormElementGroup({
elements: [
Ox.Select({
id: "select_",
items: [
{id: "all", title: "all"},
{id: "any", title: "any"},
],
width: 48
}),
Ox.Label({
overlap: "left",
title: "of the following conditions",
width: 160
})
],
float: 'right',
width: 208
})
],
float: "left",
id: "formElementGroupLabels"
},
title: "foo"
title: "FormElementGroup (Select and Labels)"
},
{
options: {
@ -1086,7 +1094,7 @@ Ox.load('Geo', function() {
{
options: {
id: "timeInput",
width: 72
//width: 72
},
title: "TimeInput"
},
@ -1094,7 +1102,7 @@ Ox.load('Geo', function() {
options: {
id: "timeInputSeconds",
seconds: true,
width: 112
//width: 112
},
title: "TimeInput with Seconds"
},
@ -1111,7 +1119,7 @@ Ox.load('Geo', function() {
ampm: true,
id: "timeInputAmPm",
seconds: true,
width: 152
//width: 152
},
title: "TimeInput with am/pm"
},
@ -1119,8 +1127,8 @@ Ox.load('Geo', function() {
options: {
id: "timeInputValue",
seconds: true,
value: "00:00:00",
width: 112
value: "23:59:59",
//width: 112
},
title: "TimeInput with Value"
}
@ -1154,27 +1162,27 @@ Ox.load('Geo', function() {
} catch(error) {
}
$element = new Ox[object](element.options)
$element = Ox[object](element.options)
.addClass("margin")
.appendTo($div);
if (object != "Button" && object != "Label") {
$button = new Ox.Button({
$button = Ox.Button({
id: "id" + Ox.uid(),
title: "Value"
})
.addClass("margin")
.bindEvent("click", function() {
var value = $element.options("value"),
$dialog = new Ox.Dialog({
$dialog = Ox.Dialog({
buttons: [
new Ox.Button({
Ox.Button({
id: 'close',
title: 'Close'
}).bindEvent({
click: function() { $dialog.close(); }
})
],
content: Ox.isUndefined(value) ? "undefined" : value,
content: $('<div>').html(Ox.isUndefined(value) ? "undefined" : value),
height: 128,
id: "value",
title: "Value",

View file

@ -7,19 +7,21 @@ Ox.load('Image', function() {
select = Ox.element('<select>').appendTo(body);
[
'Method...', 'blur(1)', 'blur(2)', 'blur(3)',
'channel("r")', 'channel("g")', 'channel("b")',
'channel("r")', 'channel("g")', 'channel("b")', 'channel("a")',
'channel("h")', 'channel("s")', 'channel("l")',
'contour()', 'edges()', 'emboss()',
'encode("some secret stuff")', 'decode()',
'encode("some secret stuff", true)', 'decode(true)',
'encode("some secret stuff", 1)', 'decode(1)',
'encode("some secret stuff", 127)', 'decode(127)',
'hue(0)', 'hue(120)', 'hue(240)',
'hue(-60)', 'hue(60)',
'invert()',
'lightness(-0.5)', 'lightness(0.5)',
'motionBlur()', 'posterize()',
'resize(256, 256)', 'resize(512, 512)',
'saturation(-0.5)', 'saturation(0.5)',
'sharpen()', 'solarize()', 'src("png/Lenna.png")'
'sharpen()', 'solarize()',
'src("png/Lenna.png")', 'src("png/OxJS.png")'
].forEach(function(filter) {
Ox.element('<option>').html(filter).appendTo(select);
});