Demisauce Comment notifications and Help System
A lot of work on the Demisauce Help system, using facebox jquery plugin for the popup page, or at least a heavily modifed version of Facebox. I had to implement quite a few changes to allow for content to be gathered from the Demisauce server, which would be a different domain. Therefore, the traditional ajax get in the Facebox wouldn't work, and i had to modify it to do a Document.write instead.
I added this method to Facebox to route requests via an inserted script.
// in facebox.js
function fillFaceboxFromDocumentWrite(href, klass) {
if ($('#facebox .content').attr('src') == href){
$.facebox.reveal(null, klass,href);
}else {
var ds_html_script = document.createElement('script');
ds_html_script.type = 'text/javascript';
ds_html_script.src = $.facebox.settings.base_url + href;
document.getElementById('facebox').appendChild(ds_html_script)
$.facebox.reveal(null, klass,href);
}
}
The script that gets called is dynamically generated to produce javascript, which will get inserted into the Dom of the remote server.
// python code to generate ds_help_output
document.getElementById('facebox_content_holder').innerHTML = ds_help_output;
The end result is this help system. You can edit content at the Demisauce Hosted Server or can host a version of demisauce, then include a line of javascript in your apps to get built in help system. Here is a screenshot.
Also, modified Demisauce to allow for Comment notification's.
test...