Workspaces.js

Save and load workspaces.  The Workspaces emulate Adobe Illustrator functionality remembering what windows are open and where they are positioned.  There will be two versions, a limited version that saves state to a cookie, and a fully functional version that saves state to a database.

Copyright

Copyright © 2007-2008 Greg Houston, http://greghoustondesign.com/.

License

MIT-style license.

Requires

Core.js, Window.js

To do

  • Move to Window
Summary
Workspaces.jsSave and load workspaces.
Functions
saveWorkspaceSave the current workspace.
loadWorkspaceLoad the saved workspace.

Functions

saveWorkspace

saveWorkspace: function()

Save the current workspace.

Syntax

MochaUI.saveWorkspace();

Notes

This is experimental.  This version saves the ID of each open window to a cookie, and reloads those windows using the functions in mocha-init.js.  This requires that each window have a function in mocha-init.js used to open them.  Functions must be named the windowID + “Window”.  So if your window is called mywindow, it needs a function called mywindowWindow in mocha-init.js.

loadWorkspace

loadWorkspace: function()

Load the saved workspace.

Syntax

MochaUI.loadWorkspace();
saveWorkspace: function()
Save the current workspace.
loadWorkspace: function()
Load the saved workspace.
Close