|
|
@ -41,6 +41,10 @@ $(function() { |
|
|
|
$('#publish_btn').click(function(){ |
|
|
|
if($('.publish-dropdown').hasClass('hidden')) { |
|
|
|
$('.publish-dropdown').removeClass('hidden'); |
|
|
|
$('#publish-confirm').show(); |
|
|
|
$('#publish-success').addClass('hidden'); |
|
|
|
$('#publish-error').addClass('hidden'); |
|
|
|
$('#publish-help').removeClass('hidden'); |
|
|
|
} else { |
|
|
|
$('.publish-dropdown').addClass('hidden'); |
|
|
|
} |
|
|
@ -89,7 +93,9 @@ $(function() { |
|
|
|
|
|
|
|
function reset_page() { |
|
|
|
$("#post-name").val(''); |
|
|
|
$("#content").html(''); |
|
|
|
$("#draft-status").text("New"); |
|
|
|
$("#publish-confirm").hide(); |
|
|
|
return localforage.setItem('currentdraft', {}); |
|
|
|
} |
|
|
|
|
|
|
@ -128,6 +134,8 @@ $(function(){ |
|
|
|
$("#post-name").val(val.title); |
|
|
|
$("#content").html(val.body); |
|
|
|
$("#draft-status").text("Restored"); |
|
|
|
// drop the cursor into the editor which clears the placeholder text
|
|
|
|
$("#content").focus().click(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|