Swap parameter ordering - follows convention Rails.logger.error 'foo'

This commit is contained in:
Rohan Mitchell
2014-12-04 17:14:28 +11:00
parent 9c4c0f87e3
commit a8e1265a58
2 changed files with 6 additions and 6 deletions

View File

@@ -180,7 +180,7 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
if productsToSubmit.length > 0
$scope.updateProducts productsToSubmit # Don't submit an empty list
else
StatusMessage.display 'No changes to save.', 'alert'
StatusMessage.display 'alert', 'No changes to save.'
$scope.updateProducts = (productsToSubmit) ->
@@ -248,21 +248,21 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
$scope.displayUpdating = ->
StatusMessage.display 'Saving...', 'progress'
StatusMessage.display 'progress', 'Saving...'
$scope.displaySuccess = ->
StatusMessage.display 'Changes saved.', 'success'
StatusMessage.display 'success', 'Changes saved.'
$scope.displayFailure = (failMessage) ->
StatusMessage.display "Saving failed. #{failMessage}", 'failure'
StatusMessage.display 'failure', "Saving failed. #{failMessage}"
$scope.displayDirtyProducts = ->
if DirtyProducts.count() > 0
message = if DirtyProducts.count() == 1 then "one product" else DirtyProducts.count() + " products"
StatusMessage.display "Changes to #{message} remain unsaved.", 'notice'
StatusMessage.display 'notice', "Changes to #{message} remain unsaved."
else
StatusMessage.clear()

View File

@@ -11,7 +11,7 @@ angular.module("ofn.admin").factory "StatusMessage", ($timeout) ->
text: ""
style: {}
display: (text, type) ->
display: (type, text) ->
@statusMessage.text = text
@statusMessage.style = @types[type].style
$timeout.cancel @statusMessage.timeout if @statusMessage.timeout