public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
mephisto / vendor / plugins / dialog_helper
name age message
..
file README Sat Apr 01 17:26:31 -0800 2006 freeze plugins [technoweenie]
file init.rb Sat Apr 01 17:26:31 -0800 2006 freeze plugins [technoweenie]
file install.rb Sat Apr 01 17:26:31 -0800 2006 freeze plugins [technoweenie]
directory javascripts/ Sat Sep 09 07:00:50 -0700 2006 bye bye svn:externals [technoweenie]
directory lib/ Sat Apr 01 17:26:31 -0800 2006 freeze plugins [technoweenie]
directory tasks/ Sat Apr 01 17:26:31 -0800 2006 freeze plugins [technoweenie]
directory test/ Sat Apr 01 17:26:31 -0800 2006 freeze plugins [technoweenie]
README
DIALOG HELPER

Dialog is a simple script for displaying styled dialog windows in browsers.  It builds on the excellent Prototype and 
Scriptaculous libraries.  The look and feel is CSS driven, and it's easy to create your own custom dialogs.  
Be sure to include dialog.js and add the appropriate styles.
  
  Project Page - http://weblog.techno-weenie.net/projects/dialog
  Javascript Subversion Location - http://techno-weenie.net/svn/projects/javascripts/dialog
  Rails Helper Plugin - http://techno-weenie.net/svn/projects/plugins/dialog_helper

If install.rb did not copy the latest dialog.js, use the rake task:

  rake update_dialog_helper

Here are some examples from the docs:

  <%= create_dialog(:confirm, 
        :message => 'Are you sure?', 
        :okay_test => 'Sure!', 
        :on_okay => "function() { alert('whoa'); }") %>
 
  new Dialog.Confirm({message:'Are you sure?', okayTest:'Sure!', onOkay:function() { alert('whoa'); }});

  <%= link_to_dialog('Open', {:confirm, 
        :message => 'Are you sure?', 
        :on_okay => "function() { alert('whoa'); }"},
       {:title => 'Click to open dialog'}) %>
  
  <a href="#" title="Click to open dialog"
    onclick="new Dialog.Confirm({message:'Are you sure?', onOkay:function() { alert('whoa'); }});; return false;">
    Open
  </a>