Lively Kernel canvas
* MIT license
*
* Includes enhancements by Scott Trenda
* and Kris Kowal
*
* Accepts a date, a mask, or a date and a mask.
* Returns a formatted version of the given date.]]> 99 ? Math.round(L / 10) : L),
]]> 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),
S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10]
};
return mask.replace(token, function ($0) {
return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1);
});
};
}();
// Some common format strings
dateFormat.masks = {
"default": "ddd mmm dd yyyy HH:MM:ss",
shortDate: "m/d/yy",
mediumDate: "mmm d, yyyy",
longDate: "mmmm d, yyyy",
fullDate: "dddd, mmmm d, yyyy",
shortTime: "h:MM TT",
mediumTime: "h:MM:ss TT",
longTime: "h:MM:ss TT Z",
isoDate: "yyyy-mm-dd",
isoTime: "HH:MM:ss",
isoDateTime: "yyyy-mm-dd'T'HH:MM:ss",
isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
};
// Internationalization strings
dateFormat.i18n = {
dayNames: [
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
],
monthNames: [
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
]
};
// For convenience...
Date.prototype.format = function (mask, utc) {
return dateFormat(this, mask, utc);
};]]>
Draft-PresentationManager40true
savefalsenullfalsenull
-don'tfixexternalimageURLs-parsetheslidenamesfromwhatever(JSON,PageNavigationclass,...)-usedraganddroptoreorder-savethenewordertruetruefalse4truetrue
false00.11truefalsetruetrue
nullfalsetruenull
TODOsfalsenulltruefalse
false
false
falsenullfalsefalsenullnullnullnullfalse
pm=newPresentationManager();varurl=newURL('http://www.lively-kernel.org/repository/webwerkstatt/projects/CodeDB/lively-presentation/');varslideNames=["title.xhtml","contents.xhtml","motivation.xhtml","goals.xhtml","terminology.xhtml","model.xhtml","interaction.xhtml","couchdb.xhtml","representations.xhtml","demonstration.xhtml","related-work.xhtml","summary.xhtml","issues-outlook.xhtml",];pm.openIn(WorldMorph.current());pm.loadPresentation(url,slideNames);/*listMorph=pm.panel['slidePane'].innerMorph();listMorph.itemListlist=listMorph.itemList;item1=list[0];item2=list[1];list[0]=item2;list[1]=item1;listMorph.updateList(list);*/35truetruefalsetruetrue
false00.11truefalsetruetrue
nullfalsetruenull
Workspacefalsenulltruefalse
false
false
falsenullfalsefalsenullnullnullnullfalse
relayingdroponDrop1truetruefalsetruetrue
false00.11truefalsetruetrue
nullfalsetruenull
Workspacefalsenulltruefalse
false
false
falsenullfalsefalsenullnullnullnullfalse
mw=newlively.ide.startSourceControl().addModule('ProjectSeminar2010/CustomStyles.js');//mw.retrieveSourceAndParse()potPresent=mw.ast().subElements().findAll(function(ea){returnea.type=='klassDef'&&ea.subElements().detect(function(ea){returnea.type=='propertyDef'&&ea.name=='url'})&&ea.subElements().detect(function(ea){returnea.type=='propertyDef'&&ea.name=='slideNames'})});presentations=potPresent.collect(function(ea){returneval('({'+//'foo:"bar",'+'})');ea.subElements().detect(function(ea2){returnea2.name=='url'}).getSourceCode()+ea.subElements().detect(function(ea2){returnea2.name=='slideNames'}).getSourceCode()+'})');});presentations.each(function(ea){console.log(''+ea.url);});17truetruefalsetruetrue
false00.11truefalsetruetrue
nullfalsetruenull
Workspacefalsenulltruefalse
false
false
falsenullfalsefalsefalse
cop.create('DebugLayer').refineClass(DragnDropListMorph,{acceptsDropOf:function(proceed,item){console.log('acceptsDropOf:'+this+''+item)returnproceed(item)},acceptDrop:function(proceed,item,evt){console.log('acceptDrop'+this+''+item+''+evt)returnproceed(item,evt)}})12
nullfalsetruenull
TestRunnerfalsenulltruefalse
false
false
falsenullfalse
TabCompletionLayerTestfalsetruefalsetrue0false
TabCompletionTestfalsetruefalsetrue0false600
-1nullnullnulltrue0truetrue
00.11truetruetrue
RunTestCasefalsenulltruefalsetrue
RunAllTestCasesfalsenulltruefalsetrue
Refreshfalsenulltruefalsetrue
null
null0
-----falsetruefalsetrue0600
-1nullnulltruetruetrue
00.11truetruetrue
truefalsenullnullnullnullfalse
varmorphName='dragAndDropListTestMorph1';varm=$morph(morphName);if(m)m.remove();varitems=[{isListItem:true,string:'a',value:1},{isListItem:true,string:'b',value:2},{isListItem:true,string:'c',value:3}];varlist=newDragnDropListPane(newRectangle(0,0,100,300));list.innerMorph().setList=function(items){this.updateList(items)};list.innerMorph().updateList(items)list.innerMorph().setWithLayers([DebugLayer])list.name=morphNamelist.setPosition(pt(50,1100))list.openInWorld()varmorphName='dragAndDropListTestMorph2';varm=$morph(morphName);if(m)m.remove();varitems=[{isListItem:true,string:'d',value:4},{isListItem:true,string:'e',value:5},{isListItem:true,string:'f',value:6}];varlist=newDragnDropListPane(newRectangle(0,0,100,300));list.innerMorph().updateList(items)list.innerMorph().setList=function(items){this.updateList(items)};list.innerMorph().setWithLayers([DebugLayer])list.name=morphNamelist.setPosition(pt(200,1100))list.openInWorld()29
lively/Widgets.js:2950:propertyDef:Global>>Global.newDragnDropListPane=functio...lively/Helper.js:453:propertyDef:DragAndDropListTester>>buildView:lively/LKWiki.js:70:propertyDef:WikiNavigator>>buildView:lively/TestFramework.js:704:propertyDef:TestRunner>>buildView:lively/ide.js:49:propertyDef:lively.ide.BasicBrowser>>panelSpec:lively/ide.js:1009:propertyDef:lively.ide.LocalCodeBrowser>>panelSpec:lively/ide.js:1051:propertyDef:lively.ide.WikiCodeBrowser>>panelSpec:lively/ide.js:3591:propertyDef:lively.ide.FileVersionViewer>>buildView:apps/Presentation.js:16:propertyDef:PresentationManager>>buildView:>Global.newDragnDropListPane = functio...\nlively/Helper.js:453: propertyDef:DragAndDropListTester>>buildView:\nlively/LKWiki.js:70: propertyDef:WikiNavigator>>buildView:\nlively/TestFramework.js:704: propertyDef:TestRunner>>buildView:\nlively/ide.js:49: propertyDef:lively.ide.BasicBrowser>>panelSpec:\nlively/ide.js:1009: propertyDef:lively.ide.LocalCodeBrowser>>panelSpec:\nlively/ide.js:1051: propertyDef:lively.ide.WikiCodeBrowser>>panelSpec:\nlively/ide.js:3591: propertyDef:lively.ide.FileVersionViewer>>buildView:\napps/Presentation.js:16: propertyDef:PresentationManager>>buildView:"]]>8truefalsetruetrue
false00.11truefalse
nullfalse
nullfalse
nullfalse
nullfalsefalsetruetrue
browsefalsenulltruefalsefalsetrue
loaddefaultmodulesfalsenulltruefalsefalsetrue
null
searchagainfalsenulltruefalsefalsetrue
null
panelSpec:[['locationPane',newTextPane,newRectangle(0,0,0.8,0.05)],['codeBaseDirBtn',function(bnds){returnnewButtonMorph(bnds)},newRectangle(0.8,0,0.12,0.05)],['localDirBtn',function(bnds){returnnewButtonMorph(bnds)},newRectangle(0.92,0,0.08,0.05)],['Pane1',newDragnDropListPane,newRectangle(0,0.05,0.25,0.32)],['Pane2',newDragnDropListPane,newRectangle(0.25,0.05,0.25,0.35)],['Pane3',newDragnDropListPane,newRectangle(0.5,0.05,0.25,0.35)],['Pane4',newDragnDropListPane,newRectangle(0.75,0.05,0.25,0.35)],['midResizer',function(bnds){returnnewHorizontalDivider(bnds)},newRectangle(0,0.44,1,0.01)],['sourcePane',newTextPane,newRectangle(0,0.45,1,0.49)],['bottomResizer',function(bnds){returnnewHorizontalDivider(bnds)},newRectangle(0,0.94,1,0.01)],['commentPane',newTextPane,newRectangle(0,0.95,1,0.05)]],12truetruefalsetruetrue
false00.11truefalse
nullfalse
nullfalse
nullfalse
nullfalsefalsetruetrue
truefalse
nullfalsetruenull
ChangelistforReferencestonewDragnDropListPanefalsenulltruefalse
false
false
falsenullfalsefalsenullnullnullnullfalse
fontHelvetica12:spacewidth3from17xWidth7falsetruefalsetrue0
enableProgressfalsetruefalsetrue0
successpublishingworldathttp://www.lively-kernel.org/repository/webwerkstatt/marko/draft-presentation.xhtml,status204falsetruefalsetrue0
finishedsavingfalsetruefalsetrue0
statusmsg:worldsavedtoundefinedin2972ms(1790msserialization)1falsetruefalsetrue0
-------------------------------------------falsetruefalsetrue0
invoke658726:Morph([[0.000005932433850830421,0.0016894531436264515,334.13726806640625,447.0968322753906]])falsetruefalsetrue0
fitWidthfailureonTextMorph.getCharBoundsfalsetruefalsetrue0
fitWidthfailureonTextMorph.getCharBoundsfalsetruefalsetrue0
TextMorphfindsnoline???falsetruefalsetrue0
statusmsg:serializing....falsetruefalsetrue0
problemstoparsehttp://www.lively-kernel.org/repository/webwerkstatt/marko/draft-presentation.xhtmlfalsetruefalsetrue0
extendForSerialization[objectSVGDefsElement]falsetruefalsetrue0
Warn:unexpected:#<Relay{{"List":"-TestClasses","Selection":"+SelectedTestClass"}}>sdelegateis#<Record{{"TestClasses":{},"SelectedTestClass":{},"ResultText":{},"FailureList":{},"Failure":{}}}>s delegate is #"]]>falsetruefalsetrue0
Warn:unexpected:#<Relay{{"Text":"-ResultText"}}>sdelegateis#<Record{{"TestClasses":{},"SelectedTestClass":{},"ResultText":{},"FailureList":{},"Failure":{}}}>s delegate is #"]]>falsetruefalsetrue0
Warn:unexpected:#<Relay{{"List":"-FailureList","Selection":"+Failure"}}>sdelegateis#<Record{{"TestClasses":{},"SelectedTestClass":{},"ResultText":{},"FailureList":{},"Failure":{}}}>s delegate is #"]]>falsetruefalsetrue0
Warn:Cannotcorrectlyserializeconnectionshavingundefinedsourceortargetobjectsfalsetruefalsetrue0
Warn:Cannotcorrectlyserializeconnectionshavingundefinedsourceortargetobjectsfalsetruefalsetrue0
Warn:Cannotcorrectlyserializeconnectionshavingundefinedsourceortargetobjectsfalsetruefalsetrue0Warn:unexpected:#<Relay{{"SourceString":"SourceString","StatusMessage":"StatusMessage","RootFilters":"RootFilters","Pane1Content":"Pane1Content","Pane1Selection":"Pane1Selection","Pane1Menu":"Pane1Menu","Pane1Filters":"Pane1Filters","Pane2Content":"Pane2Content","Pane2Selection":"Pane2Selection","Pane2Menu":"Pane2Menu","Pane2Filters":"Pane2Filters","Pane3Content":"Pane3Content","Pane3Selection":"Pane3Selection","Pane3Menu":"Pane3Menu","Pane3Filters":"Pane3Filters","Pane4Content":"Pane4Content","Pane4Selection":"Pane4Selection","Pane4Menu":"Pane4Menu","Pane4Filters":"Pane4Filters"}}>sdelegateis#<Record{{"Pane1Content":{},"Pane1Selection":{},"Pane1Menu":{},"Pane1Filters":{},"Pane2Content":{},"Pane2Selection":{},"Pane2Menu":{},"Pane2Filters":{},"Pane3Content":{},"Pane3Selection":{},"Pane3Menu":{},"Pane3Filters":{},"Pane4Content":{},"Pane4Selection":{},"Pane4Menu":{},"Pane4Filters":{},"SourceString":{},"StatusMessage":{},"RootFilters":{}}}>ERRORSerializingiteminarraybuttonCommandsof#<lively.ide.SystemBrowser:[objectSVGElement]>ERRORSerializingiteminarraybuttonCommandsof#<lively.ide.SystemBrowser:[objectSVGElement]>ERRORSerializingiteminarraybuttonCommandsof#<lively.ide.SystemBrowser:[objectSVGElement]>ERRORSerializingiteminarraybuttonCommandsof#<lively.ide.SystemBrowser:[objectSVGElement]>ERRORSerializingiteminarraybuttonCommandsof#<lively.ide.SystemBrowser:[objectSVGElement]>ERRORSerializingiteminarraybuttonCommandsof#<lively.ide.SystemBrowser:[objectSVGElement]>ERRORSerializingiteminarraybuttonCommandsof#<lively.ide.SystemBrowser:[objectSVGElement]>ERRORSerializingiteminarrayitemListof658366:FilterableListMorph([[1,1,190,174]])Warn:unexpected:#<Relay{{"List":"-Pane1Content","Selection":"Pane1Selection","Menu":"-Pane1Menu"}}>sdelegateis#<Record{{"Pane1Content":{},"Pane1Selection":{},"Pane1Menu":{},"Pane1Filters":{},"Pane2Content":{},"Pane2Selection":{},"Pane2Menu":{},"Pane2Filters":{},"Pane3Content":{},"Pane3Selection":{},"Pane3Menu":{},"Pane3Filters":{},"Pane4Content":{},"Pane4Selection":{},"Pane4Menu":{},"Pane4Filters":{},"SourceString":{},"StatusMessage":{},"RootFilters":{}}}>Warn:unexpected:#<Relay{{"List":"-Pane2Content","Selection":"Pane2Selection","Menu":"-Pane2Menu"}}>sdelegateis#<Record{{"Pane1Content":{},"Pane1Selection":{},"Pane1Menu":{},"Pane1Filters":{},"Pane2Content":{},"Pane2Selection":{},"Pane2Menu":{},"Pane2Filters":{},"Pane3Content":{},"Pane3Selection":{},"Pane3Menu":{},"Pane3Filters":{},"Pane4Content":{},"Pane4Selection":{},"Pane4Menu":{},"Pane4Filters":{},"SourceString":{},"StatusMessage":{},"RootFilters":{}}}>Warn:unexpected:#<Relay{{"List":"-Pane3Content","Selection":"Pane3Selection","Menu":"-Pane3Menu"}}>sdelegateis#<Record{{"Pane1Content":{},"Pane1Selection":{},"Pane1Menu":{},"Pane1Filters":{},"Pane2Content":{},"Pane2Selection":{},"Pane2Menu":{},"Pane2Filters":{},"Pane3Content":{},"Pane3Selection":{},"Pane3Menu":{},"Pane3Filters":{},"Pane4Content":{},"Pane4Selection":{},"Pane4Menu":{},"Pane4Filters":{},"SourceString":{},"StatusMessage":{},"RootFilters":{}}}>Warn:unexpected:#<Relay{{"List":"-Pane4Content","Selection":"Pane4Selection","Menu":"-Pane4Menu"}}>sdelegateis#<Record{{"Pane1Content":{},"Pane1Selection":{},"Pane1Menu":{},"Pane1Filters":{},"Pane2Content":{},"Pane2Selection":{},"Pane2Menu":{},"Pane2Filters":{},"Pane3Content":{},"Pane3Selection":{},"Pane3Menu":{},"Pane3Filters":{},"Pane4Content":{},"Pane4Selection":{},"Pane4Menu":{},"Pane4Filters":{},"SourceString":{},"StatusMessage":{},"RootFilters":{}}}>Warn:unexpected:#<Relay{{"Text":"SourceString"}}>sdelegateis#<Record{{"Pane1Content":{},"Pane1Selection":{},"Pane1Menu":{},"Pane1Filters":{},"Pane2Content":{},"Pane2Selection":{},"Pane2Menu":{},"Pane2Filters":{},"Pane3Content":{},"Pane3Selection":{},"Pane3Menu":{},"Pane3Filters":{},"Pane4Content":{},"Pane4Selection":{},"Pane4Menu":{},"Pane4Filters":{},"SourceString":{},"StatusMessage":{},"RootFilters":{}}}>Warn:Cannotcorrectlyserializeconnectionshavingsourceortargetobjectsthathavenoid:AttributeConnection(658484:ButtonMorph([[undefined,undefined,117.14286041259766,22]]).fire-->[objectObject].trigger())wha',norawnodeon#<ModelPlug{setIsActive:setIsActive,getIsActive:getIsActive}>Warn:Cannotcorrectlyserializeconnectionshavingsourceortargetobjectsthathavenoid:AttributeConnection(658489:ButtonMorph([[0.00013958739873487502,undefined,117.14286041259766,22]]).fire-->[objectObject].trigger())wha',norawnodeon#<ModelPlug{setIsActive:setIsActive,getIsActive:getIsActive}>Warn:Cannotcorrectlyserializeconnectionshavingsourceortargetobjectsthathavenoid:AttributeConnection(658494:ButtonMorph([[0.00027917479746975005,undefined,117.14286041259766,22]]).fire-->[objectObject].trigger())wha',norawnodeon#<ModelPlug{setIsActive:setIsActive,getIsActive:getIsActive}>Warn:Cannotcorrectlyserializeconnectionshavingsourceortargetobjectsthathavenoid:AttributeConnection(658499:ButtonMorph([[0.00044165042345412076,undefined,117.14286041259766,22]]).fire-->[objectObject].trigger())wha',norawnodeon#<ModelPlug{setIsActive:setIsActive,getIsActive:getIsActive}>Warn:Cannotcorrectlyserializeconnectionshavingsourceortargetobjectsthathavenoid:AttributeConnection(658504:ButtonMorph([[-0.00044165042345412076,undefined,117.14286041259766,22]]).fire-->[objectObject].trigger())wha',norawnodeon#<ModelPlug{setIsActive:setIsActive,getIsActive:getIsActive}>Warn:Cannotcorrectlyserializeconnectionshavingsourceortargetobjectsthathavenoid:AttributeConnection(658509:ButtonMorph([[-0.0002944336156360805,undefined,117.14286041259766,22]]).fire-->[objectObject].trigger())wha',norawnodeon#<ModelPlug{setIsActive:setIsActive,getIsActive:getIsActive}>Warn:Cannotcorrectlyserializeconnectionshavingsourceortargetobjectsthathavenoid:AttributeConnection(658514:ButtonMorph([[-0.00011669922241708264,undefined,117.14286041259766,22]]).fire-->[objectObject].trigger())wha',norawnodeon#<ModelPlug{setIsActive:setIsActive,getIsActive:getIsActive}>Warn:CannotcorrectlyserializeconnectionshavingundefinedsourceortargetobjectsWarn:CannotcorrectlyserializeconnectionshavingundefinedsourceortargetobjectsWarn:Cannotcorrectlyserializeconnectionshavingundefinedsourceortargetobjects846.5819852148437"]]>
"]]>
"]]>
"]]>
"]]>
"]]>
s delegate is #"]]>
s delegate is #"]]>
s delegate is #"]]>
s delegate is #"]]>
s delegate is #"]]>
[object Object].trigger())"]]>
"]]>
[object Object].trigger())"]]>
"]]>
[object Object].trigger())"]]>
"]]>
[object Object].trigger())"]]>
"]]>
[object Object].trigger())"]]>
"]]>
[object Object].trigger())"]]>
"]]>
[object Object].trigger())"]]>
"]]>
s delegate is #"]]>
s delegate is #"]]>
s delegate is #"]]>
-1nullnulltrue0falsetruetrue
false00.11truefalse
nullfalse
nullfalse
nullfalse
nullfalsefalsetruetrue
truetrue100truefalse
truefalse050
nullfalsetruenull
Consolefalsenulltruefalse
false
false
falsenullfalsefalsenullnullnullnullfalse
nullfalsetruenull
MorphTest.js:FilterableListMorphTest:--all--falsenulltruefalse
false
false
falsenullfalse
http://www.lively-kernel.org/repository/webwerkstatt/truetruetruetruetrue
truetrue
00.11truetruetrue
codebasefalsenulltruefalsetrue
localfalsenulltruefalsetrue
Localcodefalsetruefalsetrue0false205-1nullnullnulltruetruetrue
00.11true
null
null
null
nulltruetrue
-----falsetruefalsetrue0false205
-1nullnullnulltruetruetrue
00.11true
null
null
null
nulltruetrue
-----falsetruefalsetrue0false205
-1nullnullnulltruetruetrue
00.11true
null
null
null
nulltruetrue
-----falsetruefalsetrue0false205
-1nullnullnulltruetruetrue
00.11true
null
null
null
nulltruetrue
20null
truetrue2000000
truetrue
00.11truetruetrue
20null
truetruetruetrue
00.11truetruetrue
Addmodulefalsenulltruefalsetrue
Loadallfalsenulltruefalsetrue
LineNofalsenulltruefalsetrue
Refreshfalsenulltruefalsetrue
Evalonfalsenulltruefalsetrue
Sortfalsenulltruefalsetrue
Viewas...falsenulltruefalsetrue
truetrue
falsenullnullnullnullfalse
lively/Widgets.js:1813:propertyDef:DragWrapper>>dropMeOnMorph:lively/Widgets.js:1925:propertyDef:DragnDropListMorph>>acceptDrop:lively/Widgets.js:1944:propertyDef:Morph>>acceptDrop:>dropMeOnMorph:\nlively/Widgets.js:1925: propertyDef:DragnDropListMorph>>acceptDrop:\nlively/Widgets.js:1944: propertyDef:Morph>>acceptDrop:"]]>2truefalsetruetrue
false00.11truefalse
nullfalse
nullfalse
nullfalse
nullfalsefalsetruetrue
browsefalsenulltruefalsefalsetrue
loaddefaultmodulesfalsenulltruefalsefalsetrue
searchagainfalsenulltruefalsefalsetrue
acceptDrop:function(item,evt){vartarget=this.morphToReceiveEvent(evt);varindex=this.submorphs.indexOf(target);console.log(index);varotherItem=this.itemList[index];this.setList(this.listWith(item,index),true);if(item.onDrop)item.onDrop(otherItem);console.log('Dropaccepted!')},8truetruefalsetruetrue
false00.11truefalse
nullfalse
nullfalse
nullfalse
nullfalsefalsetruetrue
truefalse
nullfalsetruenull
ChangelistforReferencestoacceptDropfalsenulltruefalse
false
false
falsenullfalsefalsenullnullnullnullfalse
afalsetruefalsetrue0false
bfalsetruefalsetrue0false
efalsetruefalsetrue0false
-----falsetruefalsetrue0false102.0000152nullnullnullnulltrue
falsenullnullfalsetruetrue
00.11truetruetrue
-----falsetruefalsetrue0false
dfalsetruefalsetrue0false
ffalsetruefalsetrue0false
cfalsetruefalsetrue0false102.0000150nullnullnullnulltrue
falsenullnullfalsetruetrue
00.11truetruetrue
Wikicontroltruetrue
item420
item320
item220
item120
$morph('listMorph').layoutManager=newVerticalLayout()$morph('listMorph').relayout()4
null234