Skip to content

Instantly share code, notes, and snippets.

@nelsonlaquet
Created November 12, 2010 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nelsonlaquet/674705 to your computer and use it in GitHub Desktop.
Save nelsonlaquet/674705 to your computer and use it in GitHub Desktop.
UpdateSaveMessage = () ->
[cls, message] =
if $("#Entry_Status").val() == "Draft"
["warning", "saved as a draft"]
else
[
"info",
"posted to your blog, and published " +
if $("#publish-on-date").val().length
"on " + $("#publish-on-date").val() + " at " + ($("#publish-on-time").val() || "12:00 pm")
else
"immediately"
]
$("#save-message")
.text(message)
.parent(".submit-row")
.attr("class", cls + " submit-row")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment