/clog/tool/src/webapp/js/clog_utils.js +++ b/clog/tool/src/webapp/js/clog_utils.js @@ -198,6 +198,10 @@ var ClogUtils; var title = $('#clog_title_field').val(); + var content = SakaiUtils.getEditorData(wysiwygEditor,'clog_content_editor'); + + if (!content) content = " "; + if(title.length < 4) { if('AUTOSAVE' !== visibility) { alert(clog_short_title_warning); @@ -216,7 +220,7 @@ var ClogUtils; 'visibility':visibility, 'commentable':$('#clog_commentable_checkbox').attr('checked') === 'checked', 'title':title, - 'content':SakaiUtils.getEditorData(wysiwygEditor,'clog_content_editor'), + 'content':content, 'siteId':clogSiteId }; @@ -234,8 +238,10 @@ var ClogUtils; switchState(clogHomeState); } else { - clogCurrentPost.id = id; - $('#clog_post_id_field').val(id); + if (id != 'FAIL') { + clogCurrentPost.id = id; + $('#clog_post_id_field').val(id); + } } success = true;