JS for closing alerts works

This commit is contained in:
Rob Harrington
2014-10-09 13:21:30 +11:00
parent 49c8e2f8cb
commit 31c4aad9e1
2 changed files with 11 additions and 11 deletions

View File

@@ -1,6 +1,7 @@
Darkswarm.directive "ofnInlineFlash", ->
restrict: 'E'
controller: ($scope) ->
$scope.visible = true
$scope.closeFlash = ->
$scope.visible = false
Darkswarm.directive "ofnInlineAlert", ->
restrict: 'A'
scope: true
link: (scope, elem, attrs) ->
scope.visible = true
scope.close = ->
scope.visible = false

View File

@@ -12,13 +12,12 @@
%form{ name: 'about', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "update('images',about)" } }
.row
.small-12.columns
.alert-box.alert{"data-alert" => ""}
.alert-box.alert{ "ofn-inline-alert" => true, ng: { show: "visible" } }
{{ enterprise.name }} won't be visible on the Open Food Network until you enter a long and short description.
%a.close{:href => "#"} ×
.alert-box.info{"data-alert" => ""}
%a.close{ ng: { click: "close()" } } ×
.alert-box.info{ "ofn-inline-alert" => true, ng: { show: "visible" } }
{{ enterprise.name }} has been created on the Open Food Network. If you leave at any point from here onwards, your enterprise will be saved, and you can always login to the admin section to update or continue filling out your enterprise details.
%a.close{:href => "#"} ×
%a.close{ ng: { click: "close()" } } ×
.small-12.large-8.columns
.row