lib/assets/javascripts/outpost/publishing_helper.js.coffee in outpost-publishing-1.0.0 vs lib/assets/javascripts/outpost/publishing_helper.js.coffee in outpost-publishing-1.0.1

- old
+ new

@@ -5,11 +5,11 @@ # class outpost.PublishingHelper defaults: statusPending: "3" statusPublished: "5" - + constructor: (@options={}) -> _.defaults @options, @defaults @statusPending = @options.statusPending @statusPublished = @options.statusPublished @@ -23,46 +23,46 @@ # Event for when the status field is changed @statusField.on change: (event) => @setStatus() @notify() - + #---------- # Get the current status from the dropdown setStatus: -> @status = $("option:selected", @statusField).val() - + #---------- # Helpers for finding current and original status isPending: -> @status is @statusPending - + isPublished: -> @status is @statusPublished - + wasPending: -> @originalStatus is @statusPending - + wasPublished: -> @originalStatus is @statusPublished - + #---------- # Handles scenarios notify: -> # Override me #---------- # Render the notification alert: (key) -> @alerts[key].render() - + #---------- # Mass-Detach all of the alerts clearAlerts: -> alert.detach() for name,alert of @alerts #---------- - + showFields: -> @container.show() #----------