ChillDev.JS development
Even thought I'm quite busy with my business projects I still working hard on ChillDev.JS. I would like to present next huge step - applications mechanism. jQuery has it's jQuery-UI and so my beloved Prototype has it's Scripty2 (still in it's beta). But they are relatively simple libraries, that provide just UI widgets. For something more, you have to look for additional extensions. For jQuery you will probably find mbContainerPlus (looks beautifull, but it's a piece of crappy code, using it will be pain in your ass), but how about Prototype-based libraries? There is LivePipe UI, old Prototype-UI, but they still provide just simple dialog boxes widgets. Now, ChillDev.JS brings full windowing and applications stack for Prototype!
New feature - windowing and applications
Entire mechanism is divided into two parts. First is windowing mechanism, which is just an extension to S2.UI.Dialog class done with ChillDev.UI.Control.Window - it introduces additional dialog features like collapsing, moving window (including method to center window on viewport), managing display stack of dialogs (bringing window on top of display stack, always-on-top feature). Here is a short example code that should illustrate usage of these features:
var dialog1 = new ChillDev.UI.Control.Window( { title: "Window 1", contnet: $("container1") } ); var dialog2 = new ChillDev.UI.Control.Window( { title: "Window 2", contnet: $("container2") } ); var dialog3 = new ChillDev.UI.Control.Window( { title: "Window 3", contnet: $("container3") } ); // make windows visible dialog1.open(); dialog2.open(); dialog3.open(); // manage display stack dialog2.alwaysOnTop(); // will put dialog1 over dialog3, but not over dialog2 dialog1.bringToFront(); // moves dialog1 to certain point on the viewport dialog1.moveTo(10, 10); // moves dialog2 to the middle of viewport dialog2.center(); // collapses dialog3 - rolls it up to titlebar dialog3.collapse();
The second part brings entire applications stack. Namespace ChillDev.Application provides basic application class, which handles advanved windowing, like iconizing, restoring window, handles icon and title changing, and delegates window content drawing and application manager class, which brings windows management mechanisms like task bar for iconized windows, applications aggregation etc. I would take quite long time to describe it in details - I've created simple demonstration, which is available here.
ChillDev.JS @ github
ChillDev.JS project is hosted on github at https://github.com/chilloutdevelopment/ChillDev.JS. Feel free to contribute.
Tagi: skrypty, kod, javascript, prototype, scripty2, chilldevjs.
Aby pisać komentarze musisz być zalogowany.