. "Javascript Library"^^ . . "Overlay"^^ . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e86 . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e86 . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e86 "2" . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e85 . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e85 "1" . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e85 . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e84 . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e86 . . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e83 . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e82 . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e84 . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e84 "1" . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e84 . . "StatusMessage allows to add/remove status messages (e.g. saving) to an overlay (absolut positioned div) which follows the mouse pointer. During a ajax request a status message can be added and after the response the message can be removed. Each message is added to an array.\n

\n

\nExample:\n\n

\n
\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>\n <link type=\"text/css\" href=\"/style/style.css\" rel=\"stylesheet\" />\n\t\t<script src=\"/jquery/jquery-1.3.2.min.js\" type=\"text/javascript\" />\n\t\t<script src=\"/scripts/status-message.js\" type=\"text/javascript\" />\n\n <title>Simple</title>\n </head>\n <body>\n <div>\n <a href=\"#\" onclick=\"statusMessage.add('id-of-message', 'text to display');\">click here to add the message </a> <br/>\n <a href=\"#\" onclick=\"statusMessage.remove('id-of-message');\">click here to remove the message </a>\n </div>\n </body>\n</html>\n

\n
"^^ . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e81 . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e81 . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e81 "1" . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e80 . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e80 "1" . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e80 . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7f . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7f "0" . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7f . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e82 . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e82 "3" . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e82 . . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7e . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e85 . . "The ModificationStatus is a global object with a field isModified indicating if some saveable information has been changed on the page. \n

\n

\nThe isModified field can be set by client code (see example: if the user clicks on the div with the blue background color isModified is set to true), or alternatively elements that fire change events can be registered for being monitored using watchElements (the following example adds listeners to all input fields).watchElements takes a jquery selector string to specify the elements to be watched.



\n

\nExample:\n\n

\n
\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>\n\t\t<script src=\"/jquery/jquery-1.3.2.min.js\"\n\t\t\t\ttype=\"text/javascript\" />\n\t\t<script src=\"/scripts/modification-status.js\" type=\"text/javascript\" />\n\t\t<script type=\"text/javascript\">\n\t\t\tModificationStatus.watchElements(\"input\");\n\t\t</script>\n <title>Simple</title>\n </head>\n <body>\n <div>\n <div>click to modify:\n <div style=\"background-color: blue\" \n onclick=\"this.style.backgroundColor = 'red'; ModificationStatus.isModified = true\">\n </div>\n </div>\n\t\t<a href=\"http://clerezza.org/\">clerezza.org</a>\n\t\t<a href=\"http://clerezza.org/\">clerezza.org</a>\n\t\t<input type=\"text\" / >\n </body>\n</html>\n

\n
"^^ . . "The Overlay behave similarly to an OS window. Unlike true browser popup windows, the overlay is floating DHTML elements embedded directly within the page context. The Overlay is positioned above the flow of a page and is draggable, resizable and has a close button. The Overlay has a method show with arguments body, header, width and height, which renders the overlay. The body and the header can be html elements or text. The width (default value: 46em) and height (default value: 37em) can be defined absolutely or relatively.\n

\n

\nThe following css and scripts have to be included:\n
\n <link href=\"/yui/container/assets/container-core.css\" rel=\"stylesheet\" type=\"text/css\"/>\n <script src=\"/yui/yahoo-dom-event/yahoo-dom-event.js\" type=\"text/javascript\"/>\n <script src=\"/yui/element/element-min.js\" type=\"text/javascript\"/>\n <script src=\"/yui/container/container-min.js\" type=\"text/javascript\"/>\n <script src=\"/yui/dragdrop/dragdrop-min.js\" type=\"text/javascript\"/>\n <script src=\"/yui/resize/resize-min.js\" type=\"text/javascript\"/>\n <script src=\"/yui/utilities/utilities.js\" type=\"text/javascript\"/>\n <script src=\"/scripts/overlay.js\" type=\"text/javascript\"/>\n
\n

\n

\nExample;:\n\n

\n
\n...\n <body>\n <div style=\"display: none\">\n <div id=\"myOverlayBody\">body</div>\n </div>\n <div>\n <a href=\"#\" onclick=\"Overlay.show($('#myOverlayBody').html(),'header', '20em', '10em');\">click here to add the overlay </a> <br/>\n </div>\n </body>\n...\n

\n
\n"^^ . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7d . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7c . . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7b . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7b "1" . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7b . . "Alert Message"^^ . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7a . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7a . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7a "0" . . "AlertMessage shows a dialog box on top of a page. AlertMessage has a method show, which creates and renders a dialog box. This method takes as argument a callback function, which is executed when the \"accept\"-button is pressed, message, a header message, text for the \"accept\"-button and text for the \"decline\"-button. The message, header message, text for \"accept\"-button, text for the \"decline\"-button are optional. The default values are shown in the following example.\n

\n

\nAlertMessage needs the following css and javascript:\n
\n<link href=\"/yui/container/assets/container-core.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script src=\"/jquery/jquery-1.3.2.min.js\" type=\"text/javascript\" />\n<script src=\"/yui/yahoo-dom-event/yahoo-dom-event.js\" type=\"text/javascript\"/>\n<script src=\"/yui/element/element-min.js\" type=\"text/javascript\"/>\n<script src=\"/yui/container/container-min.js\" type=\"text/javascript\"/>\n<script src=\"/scripts/alert-message.js\" type=\"text/javascript\"/>\n
\n

\n

\n
\nAlertMessage.show(function(){alert(\"done\");}, \"Are you sure you want to lose the unsaved changes\", \"Unsaved changes\", \"Yes\", \"No\");\n
"^^ . "Status Message"^^ . . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7e . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7e "0" . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7e . "Modification Status"^^ . . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e79 . . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e80 . . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7a . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e81 . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e79 . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e79 "0" . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e79 . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7c "0" . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7c . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7c . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e83 . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e83 "0" . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e83 . . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7f . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7b . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7d . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7d "1" . _:AX2dX304e41c0X3aX1274283458aX3aXX2dX7e7d .