$.get(url, function(data) {\r
var $dialog = show_dialog({\r
html: data,\r
- //extra_class: 'warning',\r
+ extra_class: 'prompt',\r
event: evt,\r
yes_callback: function() {\r
- $.post(url, {prompt: $dialog.find('.prompt-return').val()}, function(data) {\r
+ var postvars = {};\r
+ $dialog.find('input, textarea, select').each(function() {\r
+ postvars[$(this).attr('name')] = $(this).val();\r
+ });\r
+ $.post(url, postvars, function(data) {\r
$dialog.fadeOut('fast', function() {\r
$dialog.remove();\r
});\r
return false\r
});\r
\r
+ $('.context-menu').each(function() {\r
+ var $menu = $(this);\r
+ var $trigger = $menu.find('.context-menu-trigger');\r
+ var $dropdown = $menu.find('.context-menu-dropdown');\r
+\r
+ $trigger.click(function() {\r
+ $dropdown.slideToggle('fast', function() {\r
+ if ($dropdown.is(':visible')) {\r
+ $dropdown.one('clickoutside', function() {\r
+ $dropdown.slideUp('fast')\r
+ });\r
+ }\r
+ }); \r
+ });\r
+ });\r
+\r
$('div.comment-form-container').each(function() {\r
var $container = $(this);\r
var $form = $container.find('form');\r