comparison media/js/forums.js @ 127:2d299909e074

Adding markdown help to comments and forums. Still need to add it to a few other places that use the markItUp editor.
author Brian Neal <bgneal@gmail.com>
date Mon, 16 Nov 2009 01:00:28 +0000
parents b0d62247c3e4
children 13330e1836f3
comparison
equal deleted inserted replaced
126:b0d62247c3e4 127:2d299909e074
108 } 108 }
109 }); 109 });
110 } 110 }
111 return false; 111 return false;
112 }); 112 });
113 $('#markdown_help_dialog').dialog({autoOpen: false, width: 720, height: 600});
114 var firstTimeMd = true;
115 $('#markdown_help').click(function () {
116 $('#markdown_help_dialog').dialog('open');
117 if (firstTimeMd) {
118 $.ajax({
119 url: '/core/markdown_help/',
120 type: 'GET',
121 dataType: 'html',
122 success: function(data, textStatus) {
123 var img = $('#markdown_busy');
124 img.hide();
125 img.after(data);
126 firstTimeMd = false;
127 },
128 error: function (xhr, textStatus, ex) {
129 alert('Oops, an error occurred: ' + xhr.statusText + ' - ' + xhr.responseText);
130 }
131 });
132 }
133 return false;
134 });
113 }); 135 });