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 © 2007-2008 Greg Houston, http://greghoustondesign.com/.
MIT-style license.
Core.js, Window.js
| Workspaces.js | Save and load workspaces. |
| Functions | |
| saveWorkspace | Save the current workspace. |
| loadWorkspace | Load the saved workspace. |
saveWorkspace: function()
Save the current workspace.
MochaUI.saveWorkspace();
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.
Save the current workspace.
saveWorkspace: function()
Load the saved workspace.
loadWorkspace: function()