harry's fix, announcement still broken

This commit is contained in:
Matt committed 2012-10-01 17:21:23 +08:00
1 parent edcef5a8f7
commit b65d785834
3 files changed
+7 -5

No files matched your search

+5 -3
View File
@@ -25,14 +25,16 @@ $(document).ready(function() {
// form.submit();
// //return false;
// });
var clicked_what = null;
$("button.post_preview").click(function(){
clicked_what = $(this);
var btn = document.getElementById("button_for_preview");
var attrs = btn.attributes;
var url = attrs['url'];
// url = url.replace("url=","");
$("form.nccu_ajax_form").ajaxSubmit({
beforeSubmit: function(a,f,o){
$("#main-wrap").after("<span id='show_preview'></span>");
o.dataType = 'script';
o.url = clicked_what.attr("url");
o.url = url.nodeValue;
o.type = 'post';
}
});