/*####################################################################### # This script is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # Author: Andrzej Kardaƛ # License: GPLv3 # The full version of the licencse can be obtainted by visiting: # http://www.gnu.org/licenses/gpl.html #######################################################################*/ $(document).ready(function() { $('a.sms_link').each(function() { var $link = $(this); var $dialog = $('
') .dialog({ autoOpen: false, width: 780, height: 'auto', title: $link.attr('title'), resizable: false, modal: true, position: 'center', show: 'blind', hide: 'explode' }); $link.click(function() { $('#overlay').show(); $('#ajax-indicator').show(); var options = { target: '#sms_form', success: function() { $('#sms_form > #form-indicator').hide(); $('#sms_form > form').ajaxForm(options); }, beforeSubmit: function() { $('#sms_form > #form-indicator').show(); } }; $dialog.load($link.attr('href'),function(){ $('#sms_form > form').ajaxForm(options); $('#ajax-indicator').hide(); $('#overlay').hide(); $dialog.dialog('open'); }); return false; }); }); });