Sure, here is the whole page:
isc.defineClass("DragPiece", "Img").addProperties({
width:32, height:32,
cursor: "move",
appImgDir: "icons/pastel/",
canDrag: true,
canDrop: true,
dragAppearance: "tracker",
setDragTracker: "isc.Event.setDragTracker(isc.Canvas.imgHTML('icons/pastel/' + this.src,16,16),24,24,15,15)"
})
isc.defineClass("LiferaBook", "Window").addProperties({
width:"100%", height: "100%",
overflow:"hidden",
title: "My Book",
dropTypes:"dropTypeSection",
showEdges: true,
keepInParentRect:true,
canDragReposition:true,
canDragResize:true,
dragAppearance:"target",
edgeImage:"[SKIN]/rounded/frame/FFFFFF/4.png",
edgeSize: 4,
animateMinimize: true,
contextMenu: isc.Menu.create({
autoDraw:false,
width:150,
data:[
{title:"Rename Book", click:"isc.say('OK')"},
{title:"Delete Book", click:"isc.say('OK')"}
]
}),
canAcceptDrop: true,
dropOver: "if (this.willAcceptDrop()) this.setBackgroundColor('#ffff80')",
dropOut: "this.setBackgroundColor('#ffffff')",
drop: function () {
//Item 0 is the note stack
this.items[0].addSection({
title: "New Section",
canDragReposition:true,
expanded: true,
contextMenu: isc.Menu.create({
autoDraw:false,
width:150,
data:[
{title:"Rename Section", click:"isc.say('OK')"},
{title:"Delete Section", click:"isc.say('OK')"}
]
}),
items: [
isc.HStack.create({
width:"100%", height:"100%",
overflow:"hidden",
dropTypes: ["dropTypeTextNote", "dropTypeVideoNote", "dropTypeMusicNote", "dropTypeScheduleNote"],
dragAppearance:"target",
edgeSize: 4,
showContextMenu: "return false",
canAcceptDrop: true,
dropOver: "if (this.willAcceptDrop()) this.setBackgroundColor('#ffff80')",
dropOut: "this.setBackgroundColor('#ffffff')",
drop: function () {
var dragType = isc.Event.getDragTarget().dragType;
if(dragType == "dropTypeTextNote") {
this.addChild(
isc.RichTextEditor.create({
autoDraw:false,
height: "200",
width: "100%",
overflow:"auto",
canDragResize:true,
showEdges:true,
// Standard control group options include
// "fontControls", "formatControls", "styleControls" and "colorControls"
controlGroups:["fontControls", "formatControls", "styleControls", "colorControls"],
value: "<html>test</html>"
})
)
} else if(dragType == "dropTypeVideoNote") {
this.addChild(
isc.VideoNote.create({
autoDraw:false,
height: "200",
width: "100%",
overflow:"auto",
showEdges:false
})
)
}
}
})
]
})
},
items: [
isc.SectionStack.create({
visibilityMode: "multiple",
dropLineProperties:{backgroundColor:"#40c040"},
membersMargin:2, layoutMargin:2,
animateSections: "true",
width: "100%",
height: "100%"
})
]
})
isc.defineClass("DroppedPiece", "Canvas").addProperties({
width:100, height:100,
overflow:"hidden",
showEdges: true,
keepInParentRect:true,
canDragReposition:true,
canDragResize:true,
dragAppearance:"target",
edgeImage:"[SKIN]/rounded/frame/FFFFFF/4.png",
edgeSize: 4,
showContextMenu: "return false",
canAcceptDrop: true,
dropOver: "if (this.willAcceptDrop()) this.setBackgroundColor('#ffff80')",
dropOut: "this.setBackgroundColor('#ffffff')",
drop: function () {
this.addChild(isc.LiferaBook.create({
src: isc.Event.getDragTarget().src,
left: this.getOffsetX()-15-this.edgeSize,
top: this.getOffsetY()-15-this.edgeSize
}))
}
})
isc.defineClass("VideoNote", "Canvas").addProperties({
width:100, height:100,
contents:
'<p id="player1"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>' +
' <script type="text/javascript">' +
' var s1 = new SWFObject("libs/jw_flv_player/flvplayer.swf","single","300","170","7");' +
' s1.addParam("allowfullscreen","true");' +
' s1.addVariable("file","Longgreen-TheLongGreenLineMovieSample629.flv");' +
' s1.addVariable("image","libs/jw_flv_player/preview.jpg");' +
' s1.addVariable("width","300");' +
' s1.addVariable("height","170");' +
' s1.write("player1");' +
' </script>'
})
isc.defineClass("PieceBin", "Canvas").addProperties({
width:"100%", height:"100%",
overflow:"hidden",
showEdges: true,
keepInParentRect:true,
canDragReposition:true,
canDragResize:true,
dragAppearance:"target",
edgeImage:"[SKIN]/rounded/frame/FFFFFF/4.png",
edgeSize: 4,
showContextMenu: "return false",
canAcceptDrop: true,
dropOver: "if (this.willAcceptDrop()) this.setBackgroundColor('#ffff80')",
dropOut: "this.setBackgroundColor('#ffffff')",
drop: function () {
this.addChild(isc.DroppedPiece.create({
src: isc.Event.getDragTarget().src,
left: this.getOffsetX()-15-this.edgeSize,
top: this.getOffsetY()-15-this.edgeSize
}))
}
})
isc.VStack.create({
ID:"diaryTools",
width: "50",
height: "50",
showEdges: true,
animateMembers:true,
edgeImage:"[SKIN]/rounded/frame/FFFFFF/4.png",
edgeSize: 4,
layoutMargin:20, membersMargin:20,
layoutAlign:"top",
members:[
isc.DragPiece.create({src:"docs-32x32.png", dragType:"dropTypeBook"}),
isc.DragPiece.create({src:"folder-open-32x32.png", dragType:"dropTypeSection"}),
isc.DragPiece.create({src:"text-file-32x32.png", dragType:"dropTypeTextNote"}),
isc.DragPiece.create({src:"video-clip-32x32.png", dragType:"dropTypeVideoNote"}),
isc.DragPiece.create({src:"wave-file-32x32.png", dragType:"dropTypeMusicNote"}),
isc.DragPiece.create({src:"scheduled-tasks-32x32.png", dragType:"dropTypeScheduleNote"})
]
})
isc.HStack.create(
{
ID:"diaryBook",
membersMargin:20,
members:[
isc.PieceBin.create({ dropTypes:["b","y"]})
]})
isc.HLayout.create({
ID:"diaryForm",
width: "100%",
height: "100%",
showResizeBar: false,
canAcceptDrop: false,
members: [
diaryTools,
isc.Canvas.create({
width:"100%", height:"100%",
overflow:"hidden",
dropTypes:"dropTypeBook",
dragAppearance:"target",
edgeSize: 4,
showContextMenu: "return false",
canAcceptDrop: true,
dropOver: "if (this.willAcceptDrop()) this.setBackgroundColor('#ffff80')",
dropOut: "this.setBackgroundColor('#ffffff')",
drop: function () {
this.addChild(isc.LiferaBook.create({
// src: isc.Event.getDragTarget().src,
// left: this.getOffsetX()-15-this.edgeSize,
// top: this.getOffsetY()-15-this.edgeSize
}))
}
})
]
});