Skip to content

Instantly share code, notes, and snippets.

View wittemann's full-sized avatar

Martin Wittemann wittemann

  • Karlsruhe, Germany
View GitHub Profile
@wittemann
wittemann / fiddle.js
Created November 26, 2012 14:12
qx.Website Hello-World
q.ready(function() {
var div = q.create("<div>")
.setHtml("Hello...")
.appendTo(document.body);
div.on("click", function(e) {
div.fadeOut().once("animationEnd", function() {
div.setHtml("... World!");
div.fadeIn();
});
@wittemann
wittemann / gist:734673
Created December 9, 2010 12:41
Paging widget [qx]
qx.Class.define("View", {
extend : qx.ui.core.Widget,
construct : function() {
this.base(arguments);
this._setLayout(new qx.ui.layout.VBox());
for (var i = 0; i < 10; i++) {
this._add(new qx.ui.form.ListItem());
}
@wittemann
wittemann / gist:619077
Created October 10, 2010 08:08
qx.data.controller.Table [qx]
qx.Class.define("qx.data.controller.Table", {
extend : qx.core.Object,
construct : function(model, target, columns, columnsPaths) {
this.base(arguments);
if (model) {
this.setModel(model);
}
@wittemann
wittemann / gist:549299
Created August 25, 2010 11:09
List-Form Binding [qx]
var listData = [];
for (var i = 0; i < 10; i++) {
listData.push({name: "name " + i, model: "model" + i});
}
var listModel = qx.data.marshal.Json.createModel(listData);
var selectBox = new qx.ui.form.SelectBox();
var listControler = new qx.data.controller.List(null, selectBox);
listControler.setDelegate({bindItem: function(c, item, index) {
c.bindProperty("name", "label", null, item, index);
@wittemann
wittemann / TextField.js
Created July 20, 2010 11:10
TextField [qx]
var tx = new qx.ui.form.TextField("affe");
this.getRoot().add(tx);
tx.setLiveUpdate(true);
tx.addListener("changeValue", function(e) {
console.log(e.getData());
}, this);
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Array Performance</title>
<meta name="author" content="Martin Wittemann">
<meta name="author" content="Fabian Jakobs">
<!-- Date: 2010-03-09 -->
@wittemann
wittemann / generator.json
Created January 18, 2010 12:41
generator.json
// generator json config file
{
"jobs" : {
"source-script" : {
"compile-options" : {
"code" : {
"decode-uris-plug" : "/Users/mw/.qooxdoo/decode.js"
}
}
},
@wittemann
wittemann / RadioButtonGroup.js
Created January 18, 2010 10:31
RadioButtonGroup [qx]
rc = new qx.ui.form.RadioButtonGroup();
for (var i = 0; i < 10; i++) {
var rb = new qx.ui.form.RadioButton("r" + i);
rb.setModel("r" + i);
rc.add(rb);
}
this.getRoot().add(rc);
@wittemann
wittemann / resetter.js
Created January 18, 2010 09:15
resetter [qx]
// create a textfield
var textField = new qx.ui.form.TextField("acb");
this.getRoot().add(textField, {left: 10, top: 10});
// create a checkbox
var checkBox = new qx.ui.form.CheckBox("box");
this.getRoot().add(checkBox, {left: 10, top: 40});
// create a list
var list = new qx.ui.form.List();