Add some heroku deployment requirements

This commit is contained in:
R. Tyler Croy 2012-03-01 22:25:10 -08:00
parent 17643d1a29
commit d7bafc4393
9 changed files with 347 additions and 265 deletions

View File

@ -2,3 +2,4 @@ source :gemcutter
gem 'rake'
gem 'resin', '~> 0.0.3'
gem 'foreman'

36
Gemfile.lock Normal file
View File

@ -0,0 +1,36 @@
GEM
remote: http://rubygems.org/
specs:
daemons (1.1.8)
eventmachine (0.12.10)
foreman (0.40.0)
term-ansicolor (~> 1.0.7)
thor (>= 0.13.6)
haml (3.1.4)
rack (1.4.1)
rack-protection (1.2.0)
rack
rake (0.9.2.2)
resin (0.0.3)
haml
sinatra
thin
sinatra (1.3.2)
rack (~> 1.3, >= 1.3.6)
rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
term-ansicolor (1.0.7)
thin (1.3.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.14.6)
tilt (1.3.3)
PLATFORMS
ruby
DEPENDENCIES
foreman
rake
resin (~> 0.0.3)

1
Procfile Normal file
View File

@ -0,0 +1 @@
web: bundle exec runresin

View File

@ -21,7 +21,7 @@ var self=this;
smalltalk.send(self, "_clear", []);
(($receiver = self['@list']) == nil || $receiver == undefined) ? (function(){(self['@list']=smalltalk.send((smalltalk.JQList || JQList), "_new", []));return smalltalk.send(self['@list'], "_appendToJQuery_", [smalltalk.send(unescape("%23niles-content"), "_asJQuery", [])]);})() : $receiver;
smalltalk.send((smalltalk.Jenkins || Jenkins), "_fetchFor_depth_onSuccess_onError_", [aUrl, (1), (function(data){return smalltalk.send(smalltalk.send(data, "_jobs", []), "_do_", [(function(job){var item=nil;
(item=(function($rec){smalltalk.send($rec, "_withLabel_", [smalltalk.send(job, "_name", [])]);return smalltalk.send($rec, "_withOnClick_", [(function(event){return smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", [smalltalk.send("Navigating to: ", "__comma", [smalltalk.send(job, "_name", [])])]);})]);})(smalltalk.send((smalltalk.JQListItem || JQListItem), "_new", [])));((($receiver = smalltalk.send(smalltalk.send(job, "_color", []), "__eq", ["yellow"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(item, "_turnYellow", []);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(item, "_turnYellow", []);})]));return smalltalk.send(self['@list'], "_addItem_", [item]);})]);}), (function(){return smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", ["Fucking fuck"]);})]);
(item=(function($rec){smalltalk.send($rec, "_withLabel_", [smalltalk.send(job, "_name", [])]);smalltalk.send($rec, "_withHref_", [smalltalk.send(job, "_url", [])]);return smalltalk.send($rec, "_withOnClick_", [(function(event){smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", [smalltalk.send("Navigating to: ", "__comma", [smalltalk.send(job, "_name", [])])]);return smalltalk.send(event, "_preventDefault", []);})]);})(smalltalk.send((smalltalk.JQListItem || JQListItem), "_new", [])));((($receiver = smalltalk.send(smalltalk.send(job, "_color", []), "__eq", ["yellow"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(item, "_turnYellow", []);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(item, "_turnYellow", []);})]));((($receiver = ((($receiver = smalltalk.send(smalltalk.send(job, "_description", []), "_size", [])).klass === smalltalk.Number) ? $receiver >(0) : smalltalk.send($receiver, "__gt", [(0)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(item, "_withDescription_", [smalltalk.send(job, "_description", [])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(item, "_withDescription_", [smalltalk.send(job, "_description", [])]);})]));return smalltalk.send(self['@list'], "_addItem_", [item]);})]);}), (function(){return smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", ["Fucking fuck"]);})]);
return self;}
}),
smalltalk.NilesApp);

View File

@ -27,11 +27,11 @@ var self=this;
smalltalk.send(self, "_clear", []);
(($receiver = self['@list']) == nil || $receiver == undefined) ? (function(){(self['@list']=smalltalk.send((smalltalk.JQList || JQList), "_new", []));return smalltalk.send(self['@list'], "_appendToJQuery_", [smalltalk.send(unescape("%23niles-content"), "_asJQuery", [])]);})() : $receiver;
smalltalk.send((smalltalk.Jenkins || Jenkins), "_fetchFor_depth_onSuccess_onError_", [aUrl, (1), (function(data){return smalltalk.send(smalltalk.send(data, "_jobs", []), "_do_", [(function(job){var item=nil;
(item=(function($rec){smalltalk.send($rec, "_withLabel_", [smalltalk.send(job, "_name", [])]);return smalltalk.send($rec, "_withOnClick_", [(function(event){return smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", [smalltalk.send("Navigating to: ", "__comma", [smalltalk.send(job, "_name", [])])]);})]);})(smalltalk.send((smalltalk.JQListItem || JQListItem), "_new", [])));((($receiver = smalltalk.send(smalltalk.send(job, "_color", []), "__eq", ["yellow"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(item, "_turnYellow", []);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(item, "_turnYellow", []);})]));return smalltalk.send(self['@list'], "_addItem_", [item]);})]);}), (function(){return smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", ["Fucking fuck"]);})]);
(item=(function($rec){smalltalk.send($rec, "_withLabel_", [smalltalk.send(job, "_name", [])]);smalltalk.send($rec, "_withHref_", [smalltalk.send(job, "_url", [])]);return smalltalk.send($rec, "_withOnClick_", [(function(event){smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", [smalltalk.send("Navigating to: ", "__comma", [smalltalk.send(job, "_name", [])])]);return smalltalk.send(event, "_preventDefault", []);})]);})(smalltalk.send((smalltalk.JQListItem || JQListItem), "_new", [])));((($receiver = smalltalk.send(smalltalk.send(job, "_color", []), "__eq", ["yellow"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(item, "_turnYellow", []);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(item, "_turnYellow", []);})]));((($receiver = ((($receiver = smalltalk.send(smalltalk.send(job, "_description", []), "_size", [])).klass === smalltalk.Number) ? $receiver >(0) : smalltalk.send($receiver, "__gt", [(0)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(item, "_withDescription_", [smalltalk.send(job, "_description", [])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(item, "_withDescription_", [smalltalk.send(job, "_description", [])]);})]));return smalltalk.send(self['@list'], "_addItem_", [item]);})]);}), (function(){return smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", ["Fucking fuck"]);})]);
return self;},
args: ["aUrl"],
source: unescape('load%3A%20aUrl%0A%09self%20clear.%0A%09list%20ifNil%3A%20%5B%20%0A%09%09list%20%3A%3D%20JQList%20new.%0A%09%09list%20appendToJQuery%3A%20%27%23niles-content%27%20asJQuery%5D.%0A%0A%09Jenkins%20fetchFor%3A%20aUrl%0A%09%09depth%3A%201%0A%09%09onSuccess%3A%20%5B%20%3Adata%20%7C%20data%20jobs%20do%3A%20%5B%20%3Ajob%20%7C%0A%09%09%09%7C%20item%20%7C%0A%09%09%09item%20%3A%3D%20JQListItem%20new%20withLabel%3A%20job%20name%3B%20withOnClick%3A%20%5B%20%3Aevent%20%7C%20window%20alert%3A%20%28%27Navigating%20to%3A%20%27%2C%20job%20name%29%20%5D.%0A%09%09%09job%20color%20%3D%20%27yellow%27%20ifTrue%3A%20%5B%20item%20turnYellow%20%5D.%0A%09%09%09%22%28job%20healthReport%20size%29%20%3E%200%0A%09%09%09%09ifTrue%3A%20%5Bitem%20addIcon%3A%20%27http%3A//ci.jenkins-ci.org/images/48x48/%27%2C%20%28%28job%20healthReport%20at%3A%201%29%20at%3A%20%27iconUrl%27%29%5D.%0A%09%09%09%22list%20addItem%3A%20item.%5D%5D%0A%09%09onError%3A%20%5B%20window%20alert%3A%20%27Fucking%20fuck%27%20%5D.'),
messageSends: ["clear", "ifNil:", "new", "appendToJQuery:", "asJQuery", "fetchFor:depth:onSuccess:onError:", "do:", "jobs", "withLabel:", "name", "withOnClick:", "alert:", unescape("%2C"), "ifTrue:", unescape("%3D"), "color", "turnYellow", "addItem:"],
source: unescape('load%3A%20aUrl%0A%09self%20clear.%0A%09list%20ifNil%3A%20%5B%20%0A%09%09list%20%3A%3D%20JQList%20new.%0A%09%09list%20appendToJQuery%3A%20%27%23niles-content%27%20asJQuery%5D.%0A%0A%09Jenkins%20fetchFor%3A%20aUrl%0A%09%09depth%3A%201%0A%09%09onSuccess%3A%20%5B%20%3Adata%20%7C%20data%20jobs%20do%3A%20%5B%20%3Ajob%20%7C%0A%09%09%09%7C%20item%20%7C%0A%09%09%09item%20%3A%3D%20JQListItem%20new%0A%09%09%09%09%09withLabel%3A%20job%20name%3B%0A%09%09%09%09%09withHref%3A%20job%20url%3B%0A%09%09%09%09%09withOnClick%3A%20%5B%20%3Aevent%20%7C%20window%20alert%3A%20%28%27Navigating%20to%3A%20%27%2C%20job%20name%29.%20event%20preventDefault%20%5D.%0A%09%09%09job%20color%20%3D%20%27yellow%27%20ifTrue%3A%20%5B%20item%20turnYellow%20%5D.%0A%09%09%09job%20description%20size%20%3E%200%0A%09%09%09%09ifTrue%3A%20%5B%20item%20withDescription%3A%20job%20description%20%5D.%0A%09%09%09%22%28job%20healthReport%20size%29%20%3E%200%0A%09%09%09%09ifTrue%3A%20%5Bitem%20addIcon%3A%20%27http%3A//ci.jenkins-ci.org/images/48x48/%27%2C%20%28%28job%20healthReport%20at%3A%201%29%20at%3A%20%27iconUrl%27%29%5D.%0A%09%09%09%22list%20addItem%3A%20item.%5D%5D%0A%09%09onError%3A%20%5B%20window%20alert%3A%20%27Fucking%20fuck%27%20%5D.'),
messageSends: ["clear", "ifNil:", "new", "appendToJQuery:", "asJQuery", "fetchFor:depth:onSuccess:onError:", "do:", "jobs", "withLabel:", "name", "withHref:", "url", "withOnClick:", "alert:", unescape("%2C"), "preventDefault", "ifTrue:", unescape("%3D"), "color", "turnYellow", unescape("%3E"), "size", "description", "withDescription:", "addItem:"],
referencedClasses: ["JQList", "Jenkins", "JQListItem"]
}),
smalltalk.NilesApp);

View File

@ -1,91 +1,4 @@
smalltalk.addPackage('jQueryMobile', {});
smalltalk.addClass('JQPage', smalltalk.Widget, ['elementId'], 'jQueryMobile');
smalltalk.addClass('JQListItem', smalltalk.Widget, ['elementId', 'href', 'label', 'clickBlock', 'theme', 'iconUrl'], 'jQueryMobile');
smalltalk.addMethod(
unescape('_renderOn_'),
smalltalk.method({
selector: unescape('renderOn%3A'),
fn: function (html){
var self=this;
(function($rec){smalltalk.send($rec, "_at_put_", [unescape("data-theme"), self['@theme']]);return smalltalk.send($rec, "_with_", [(function(){return (function($rec){smalltalk.send($rec, "_href_", [self['@href']]);smalltalk.send($rec, "_onClick_", [self['@clickBlock']]);return smalltalk.send($rec, "_with_", [(function(){(($receiver = self['@iconUrl']) != nil && $receiver != undefined) ? (function(){return (function($rec){smalltalk.send($rec, "_src_", [self['@iconUrl']]);return smalltalk.send($rec, "_class_", [unescape("ui-li-thumb%20ui-corner-tl")]);})(smalltalk.send(html, "_img", []));})() : nil;return smalltalk.send(html, "_with_", [self['@label']]);})]);})(smalltalk.send(html, "_a", []));})]);})(smalltalk.send(html, "_li", []));
return self;}
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_initialize'),
smalltalk.method({
selector: unescape('initialize'),
fn: function (){
var self=this;
(self['@href']=unescape("%23"));
(self['@label']="");
(self['@clickBlock']=(function(){return nil;}));
(self['@theme']="");
(self['@iconUrl']=nil);
return self;}
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_withLabel_'),
smalltalk.method({
selector: unescape('withLabel%3A'),
fn: function (aLabelString){
var self=this;
(self['@label']=smalltalk.send(aLabelString, "_asString", []));
return self;}
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_turnYellow'),
smalltalk.method({
selector: unescape('turnYellow'),
fn: function (){
var self=this;
(self['@theme']="e");
return self;}
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_addIcon_'),
smalltalk.method({
selector: unescape('addIcon%3A'),
fn: function (aUrl){
var self=this;
(self['@iconUrl']=smalltalk.send(aUrl, "_asString", []));
return self;}
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_withHref_'),
smalltalk.method({
selector: unescape('withHref%3A'),
fn: function (aUrlString){
var self=this;
(self['@href']=aUrlString);
return self;}
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_withOnClick_'),
smalltalk.method({
selector: unescape('withOnClick%3A'),
fn: function (aBlock){
var self=this;
(self['@clickBlock']=aBlock);
return self;}
}),
smalltalk.JQListItem);
smalltalk.addClass('JQList', smalltalk.Widget, ['elementId'], 'jQueryMobile');
smalltalk.addMethod(
unescape('_renderOn_'),
@ -180,3 +93,102 @@ smalltalk.JQList);
smalltalk.addClass('JQListItem', smalltalk.Widget, ['elementId', 'href', 'label', 'clickBlock', 'theme', 'iconUrl', 'description'], 'jQueryMobile');
smalltalk.addMethod(
unescape('_renderOn_'),
smalltalk.method({
selector: unescape('renderOn%3A'),
fn: function (html){
var self=this;
(function($rec){smalltalk.send($rec, "_at_put_", [unescape("data-theme"), self['@theme']]);return smalltalk.send($rec, "_with_", [(function(){return (function($rec){smalltalk.send($rec, "_href_", [self['@href']]);smalltalk.send($rec, "_onClick_", [self['@clickBlock']]);return smalltalk.send($rec, "_with_", [(function(){(($receiver = self['@iconUrl']) != nil && $receiver != undefined) ? (function(){return (function($rec){smalltalk.send($rec, "_src_", [self['@iconUrl']]);return smalltalk.send($rec, "_class_", [unescape("ui-li-thumb%20ui-corner-tl")]);})(smalltalk.send(html, "_img", []));})() : nil;return (function($rec){(($receiver = $rec) != nil && $receiver != undefined) ? (function(){(function($rec){smalltalk.send($rec, "_class_", [unescape("ui-li-heading")]);return smalltalk.send($rec, "_with_", [self['@label']]);})(smalltalk.send(html, "_h3", []));return (function($rec){smalltalk.send($rec, "_class_", [unescape("ui-li-desc")]);return smalltalk.send($rec, "_with_", [self['@description']]);})(smalltalk.send(html, "_p", []));})() : nil;return (($receiver = $rec) == nil || $receiver == undefined) ? (function(){return smalltalk.send(html, "_with_", [self['@label']]);})() : $receiver;})(self['@description']);})]);})(smalltalk.send(html, "_a", []));})]);})(smalltalk.send(html, "_li", []));
return self;}
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_initialize'),
smalltalk.method({
selector: unescape('initialize'),
fn: function (){
var self=this;
(self['@href']=unescape("%23"));
(self['@label']="");
(self['@clickBlock']=(function(){return nil;}));
(self['@theme']="");
(self['@iconUrl']=nil);
(self['@description']=nil);
return self;}
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_withLabel_'),
smalltalk.method({
selector: unescape('withLabel%3A'),
fn: function (aLabelString){
var self=this;
(self['@label']=smalltalk.send(aLabelString, "_asString", []));
return self;}
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_turnYellow'),
smalltalk.method({
selector: unescape('turnYellow'),
fn: function (){
var self=this;
(self['@theme']="e");
return self;}
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_addIcon_'),
smalltalk.method({
selector: unescape('addIcon%3A'),
fn: function (aUrl){
var self=this;
(self['@iconUrl']=smalltalk.send(aUrl, "_asString", []));
return self;}
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_withHref_'),
smalltalk.method({
selector: unescape('withHref%3A'),
fn: function (aUrlString){
var self=this;
(self['@href']=aUrlString);
return self;}
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_withOnClick_'),
smalltalk.method({
selector: unescape('withOnClick%3A'),
fn: function (aBlock){
var self=this;
(self['@clickBlock']=aBlock);
return self;}
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_withDescription_'),
smalltalk.method({
selector: unescape('withDescription%3A'),
fn: function (aDescriptionString){
var self=this;
(self['@description']=aDescriptionString);
return self;}
}),
smalltalk.JQListItem);
smalltalk.addClass('JQPage', smalltalk.Widget, ['elementId'], 'jQueryMobile');

View File

@ -1,126 +1,4 @@
smalltalk.addPackage('jQueryMobile', {});
smalltalk.addClass('JQPage', smalltalk.Widget, ['elementId'], 'jQueryMobile');
smalltalk.addClass('JQListItem', smalltalk.Widget, ['elementId', 'href', 'label', 'clickBlock', 'theme', 'iconUrl'], 'jQueryMobile');
smalltalk.addMethod(
unescape('_renderOn_'),
smalltalk.method({
selector: unescape('renderOn%3A'),
category: 'not yet classified',
fn: function (html){
var self=this;
(function($rec){smalltalk.send($rec, "_at_put_", [unescape("data-theme"), self['@theme']]);return smalltalk.send($rec, "_with_", [(function(){return (function($rec){smalltalk.send($rec, "_href_", [self['@href']]);smalltalk.send($rec, "_onClick_", [self['@clickBlock']]);return smalltalk.send($rec, "_with_", [(function(){(($receiver = self['@iconUrl']) != nil && $receiver != undefined) ? (function(){return (function($rec){smalltalk.send($rec, "_src_", [self['@iconUrl']]);return smalltalk.send($rec, "_class_", [unescape("ui-li-thumb%20ui-corner-tl")]);})(smalltalk.send(html, "_img", []));})() : nil;return smalltalk.send(html, "_with_", [self['@label']]);})]);})(smalltalk.send(html, "_a", []));})]);})(smalltalk.send(html, "_li", []));
return self;},
args: ["html"],
source: unescape('renderOn%3A%20html%0A%09html%20li%20%0A%09%09at%3A%20%27data-theme%27%20put%3A%20theme%3B%0A%09%09with%3A%20%5B%0A%09%09%09html%20a%0A%09%09%09%09href%3A%20href%3B%0A%09%09%09%09onClick%3A%20clickBlock%3B%0A%09%09%09%09with%3A%20%5B%0A%09%09%09%09%09iconUrl%20ifNotNil%3A%20%5B%20html%20img%20src%3A%20iconUrl%3B%20class%3A%20%27ui-li-thumb%20ui-corner-tl%27%20%5D.%0A%09%09%09%09%09html%20with%3A%20label%5D%5D.'),
messageSends: ["at:put:", "with:", "href:", "onClick:", "ifNotNil:", "src:", "class:", "img", "a", "li"],
referencedClasses: []
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_initialize'),
smalltalk.method({
selector: unescape('initialize'),
category: 'not yet classified',
fn: function (){
var self=this;
(self['@href']=unescape("%23"));
(self['@label']="");
(self['@clickBlock']=(function(){return nil;}));
(self['@theme']="");
(self['@iconUrl']=nil);
return self;},
args: [],
source: unescape('initialize%0A%09href%20%3A%3D%20%27%23%27.%0A%09label%20%3A%3D%20%27%27.%0A%09clickBlock%20%3A%3D%20%5B%5D.%0A%09theme%20%3A%3D%20%27%27.%0A%09iconUrl%20%3A%3D%20nil.'),
messageSends: [],
referencedClasses: []
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_withLabel_'),
smalltalk.method({
selector: unescape('withLabel%3A'),
category: 'not yet classified',
fn: function (aLabelString){
var self=this;
(self['@label']=smalltalk.send(aLabelString, "_asString", []));
return self;},
args: ["aLabelString"],
source: unescape('withLabel%3A%20aLabelString%0A%09label%20%3A%3D%20aLabelString%20asString.%0A'),
messageSends: ["asString"],
referencedClasses: []
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_turnYellow'),
smalltalk.method({
selector: unescape('turnYellow'),
category: 'not yet classified',
fn: function (){
var self=this;
(self['@theme']="e");
return self;},
args: [],
source: unescape('turnYellow%0A%09%22%20The%20%27e%27%20theme%20in%20jQuery%20Mobile%20is%20yellowish%20%22%0A%09theme%20%3A%3D%20%27e%27.'),
messageSends: [],
referencedClasses: []
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_addIcon_'),
smalltalk.method({
selector: unescape('addIcon%3A'),
category: 'not yet classified',
fn: function (aUrl){
var self=this;
(self['@iconUrl']=smalltalk.send(aUrl, "_asString", []));
return self;},
args: ["aUrl"],
source: unescape('addIcon%3A%20aUrl%0A%09iconUrl%20%3A%3D%20aUrl%20asString.'),
messageSends: ["asString"],
referencedClasses: []
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_withHref_'),
smalltalk.method({
selector: unescape('withHref%3A'),
category: 'not yet classified',
fn: function (aUrlString){
var self=this;
(self['@href']=aUrlString);
return self;},
args: ["aUrlString"],
source: unescape('withHref%3A%20aUrlString%0A%09href%20%3A%3D%20aUrlString.'),
messageSends: [],
referencedClasses: []
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_withOnClick_'),
smalltalk.method({
selector: unescape('withOnClick%3A'),
category: 'not yet classified',
fn: function (aBlock){
var self=this;
(self['@clickBlock']=aBlock);
return self;},
args: ["aBlock"],
source: unescape('withOnClick%3A%20aBlock%0A%09clickBlock%20%3A%3D%20aBlock.'),
messageSends: [],
referencedClasses: []
}),
smalltalk.JQListItem);
smalltalk.addClass('JQList', smalltalk.Widget, ['elementId'], 'jQueryMobile');
smalltalk.addMethod(
unescape('_renderOn_'),
@ -255,3 +133,142 @@ smalltalk.JQList);
smalltalk.addClass('JQListItem', smalltalk.Widget, ['elementId', 'href', 'label', 'clickBlock', 'theme', 'iconUrl', 'description'], 'jQueryMobile');
smalltalk.addMethod(
unescape('_renderOn_'),
smalltalk.method({
selector: unescape('renderOn%3A'),
category: 'not yet classified',
fn: function (html){
var self=this;
(function($rec){smalltalk.send($rec, "_at_put_", [unescape("data-theme"), self['@theme']]);return smalltalk.send($rec, "_with_", [(function(){return (function($rec){smalltalk.send($rec, "_href_", [self['@href']]);smalltalk.send($rec, "_onClick_", [self['@clickBlock']]);return smalltalk.send($rec, "_with_", [(function(){(($receiver = self['@iconUrl']) != nil && $receiver != undefined) ? (function(){return (function($rec){smalltalk.send($rec, "_src_", [self['@iconUrl']]);return smalltalk.send($rec, "_class_", [unescape("ui-li-thumb%20ui-corner-tl")]);})(smalltalk.send(html, "_img", []));})() : nil;return (function($rec){(($receiver = $rec) != nil && $receiver != undefined) ? (function(){(function($rec){smalltalk.send($rec, "_class_", [unescape("ui-li-heading")]);return smalltalk.send($rec, "_with_", [self['@label']]);})(smalltalk.send(html, "_h3", []));return (function($rec){smalltalk.send($rec, "_class_", [unescape("ui-li-desc")]);return smalltalk.send($rec, "_with_", [self['@description']]);})(smalltalk.send(html, "_p", []));})() : nil;return (($receiver = $rec) == nil || $receiver == undefined) ? (function(){return smalltalk.send(html, "_with_", [self['@label']]);})() : $receiver;})(self['@description']);})]);})(smalltalk.send(html, "_a", []));})]);})(smalltalk.send(html, "_li", []));
return self;},
args: ["html"],
source: unescape('renderOn%3A%20html%0A%09html%20li%20%0A%09%09at%3A%20%27data-theme%27%20put%3A%20theme%3B%0A%09%09with%3A%20%5B%0A%09%09%09html%20a%0A%09%09%09%09href%3A%20href%3B%0A%09%09%09%09onClick%3A%20clickBlock%3B%0A%09%09%09%09with%3A%20%5B%0A%09%09%09%09%09iconUrl%0A%09%09%09%09%09%09ifNotNil%3A%20%5B%20html%20img%20src%3A%20iconUrl%3B%20class%3A%20%27ui-li-thumb%20ui-corner-tl%27%20%5D.%0A%09%09%09%09%09description%0A%09%09%09%09%09%09ifNotNil%3A%20%5B%0A%09%09%09%09%09%09%09html%20h3%20class%3A%20%27ui-li-heading%27%3B%20with%3A%20label.%0A%09%09%09%09%09%09%09html%20p%20class%3A%20%27ui-li-desc%27%3B%20with%3A%20description%5D%3B%0A%09%09%09%09%09%09ifNil%3A%20%5B%20html%20with%3A%20label%20%5D%5D%5D.'),
messageSends: ["at:put:", "with:", "href:", "onClick:", "ifNotNil:", "src:", "class:", "img", "h3", "p", "ifNil:", "a", "li"],
referencedClasses: []
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_initialize'),
smalltalk.method({
selector: unescape('initialize'),
category: 'not yet classified',
fn: function (){
var self=this;
(self['@href']=unescape("%23"));
(self['@label']="");
(self['@clickBlock']=(function(){return nil;}));
(self['@theme']="");
(self['@iconUrl']=nil);
(self['@description']=nil);
return self;},
args: [],
source: unescape('initialize%0A%09href%20%3A%3D%20%27%23%27.%0A%09label%20%3A%3D%20%27%27.%0A%09clickBlock%20%3A%3D%20%5B%5D.%0A%09theme%20%3A%3D%20%27%27.%0A%09iconUrl%20%3A%3D%20nil.%0A%09description%20%3A%3D%20nil.'),
messageSends: [],
referencedClasses: []
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_withLabel_'),
smalltalk.method({
selector: unescape('withLabel%3A'),
category: 'not yet classified',
fn: function (aLabelString){
var self=this;
(self['@label']=smalltalk.send(aLabelString, "_asString", []));
return self;},
args: ["aLabelString"],
source: unescape('withLabel%3A%20aLabelString%0A%09label%20%3A%3D%20aLabelString%20asString.%0A'),
messageSends: ["asString"],
referencedClasses: []
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_turnYellow'),
smalltalk.method({
selector: unescape('turnYellow'),
category: 'not yet classified',
fn: function (){
var self=this;
(self['@theme']="e");
return self;},
args: [],
source: unescape('turnYellow%0A%09%22%20The%20%27e%27%20theme%20in%20jQuery%20Mobile%20is%20yellowish%20%22%0A%09theme%20%3A%3D%20%27e%27.'),
messageSends: [],
referencedClasses: []
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_addIcon_'),
smalltalk.method({
selector: unescape('addIcon%3A'),
category: 'not yet classified',
fn: function (aUrl){
var self=this;
(self['@iconUrl']=smalltalk.send(aUrl, "_asString", []));
return self;},
args: ["aUrl"],
source: unescape('addIcon%3A%20aUrl%0A%09iconUrl%20%3A%3D%20aUrl%20asString.'),
messageSends: ["asString"],
referencedClasses: []
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_withHref_'),
smalltalk.method({
selector: unescape('withHref%3A'),
category: 'not yet classified',
fn: function (aUrlString){
var self=this;
(self['@href']=aUrlString);
return self;},
args: ["aUrlString"],
source: unescape('withHref%3A%20aUrlString%0A%09href%20%3A%3D%20aUrlString.'),
messageSends: [],
referencedClasses: []
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_withOnClick_'),
smalltalk.method({
selector: unescape('withOnClick%3A'),
category: 'not yet classified',
fn: function (aBlock){
var self=this;
(self['@clickBlock']=aBlock);
return self;},
args: ["aBlock"],
source: unescape('withOnClick%3A%20aBlock%0A%09clickBlock%20%3A%3D%20aBlock.'),
messageSends: [],
referencedClasses: []
}),
smalltalk.JQListItem);
smalltalk.addMethod(
unescape('_withDescription_'),
smalltalk.method({
selector: unescape('withDescription%3A'),
category: 'not yet classified',
fn: function (aDescriptionString){
var self=this;
(self['@description']=aDescriptionString);
return self;},
args: ["aDescriptionString"],
source: unescape('withDescription%3A%20aDescriptionString%0A%09description%20%3A%3D%20aDescriptionString.'),
messageSends: [],
referencedClasses: []
}),
smalltalk.JQListItem);
smalltalk.addClass('JQPage', smalltalk.Widget, ['elementId'], 'jQueryMobile');

View File

@ -20,8 +20,13 @@ load: aUrl
depth: 1
onSuccess: [ :data | data jobs do: [ :job |
| item |
item := JQListItem new withLabel: job name; withOnClick: [ :event | window alert: ('Navigating to: ', job name) ].
item := JQListItem new
withLabel: job name;
withHref: job url;
withOnClick: [ :event | window alert: ('Navigating to: ', job name). event preventDefault ].
job color = 'yellow' ifTrue: [ item turnYellow ].
job description size > 0
ifTrue: [ item withDescription: job description ].
"(job healthReport size) > 0
ifTrue: [item addIcon: 'http://ci.jenkins-ci.org/images/48x48/', ((job healthReport at: 1) at: 'iconUrl')].
"list addItem: item.]]

View File

@ -1,55 +1,4 @@
Smalltalk current createPackage: 'jQueryMobile' properties: #{}!
Widget subclass: #JQPage
instanceVariableNames: 'elementId'
category: 'jQueryMobile'!
Widget subclass: #JQListItem
instanceVariableNames: 'elementId href label clickBlock theme iconUrl'
category: 'jQueryMobile'!
!JQListItem methodsFor: 'not yet classified'!
renderOn: html
html li
at: 'data-theme' put: theme;
with: [
html a
href: href;
onClick: clickBlock;
with: [
iconUrl ifNotNil: [ html img src: iconUrl; class: 'ui-li-thumb ui-corner-tl' ].
html with: label]].
!
initialize
href := '#'.
label := ''.
clickBlock := [].
theme := ''.
iconUrl := nil.
!
withLabel: aLabelString
label := aLabelString asString.
!
turnYellow
" The 'e' theme in jQuery Mobile is yellowish "
theme := 'e'.
!
addIcon: aUrl
iconUrl := aUrl asString.
!
withHref: aUrlString
href := aUrlString.
!
withOnClick: aBlock
clickBlock := aBlock.
! !
Widget subclass: #JQList
instanceVariableNames: 'elementId'
category: 'jQueryMobile'!
@ -101,3 +50,64 @@ addItem: aListItem
self asJQuery listview: 'refresh'.
! !
Widget subclass: #JQListItem
instanceVariableNames: 'elementId href label clickBlock theme iconUrl description'
category: 'jQueryMobile'!
!JQListItem methodsFor: 'not yet classified'!
renderOn: html
html li
at: 'data-theme' put: theme;
with: [
html a
href: href;
onClick: clickBlock;
with: [
iconUrl
ifNotNil: [ html img src: iconUrl; class: 'ui-li-thumb ui-corner-tl' ].
description
ifNotNil: [
html h3 class: 'ui-li-heading'; with: label.
html p class: 'ui-li-desc'; with: description];
ifNil: [ html with: label ]]].
!
initialize
href := '#'.
label := ''.
clickBlock := [].
theme := ''.
iconUrl := nil.
description := nil.
!
withLabel: aLabelString
label := aLabelString asString.
!
turnYellow
" The 'e' theme in jQuery Mobile is yellowish "
theme := 'e'.
!
addIcon: aUrl
iconUrl := aUrl asString.
!
withHref: aUrlString
href := aUrlString.
!
withOnClick: aBlock
clickBlock := aBlock.
!
withDescription: aDescriptionString
description := aDescriptionString.
! !
Widget subclass: #JQPage
instanceVariableNames: 'elementId'
category: 'jQueryMobile'!