Commit 18d062f8 authored by Randall Leeds's avatar Randall Leeds

Fix a bug in tabReveal directive

That syntax was not what I thought it was and had nasty issues when
there were no panes.
parent ad89b707
...@@ -123,8 +123,8 @@ tabReveal = ['$parse', ($parse) -> ...@@ -123,8 +123,8 @@ tabReveal = ['$parse', ($parse) ->
element: element element: element
attr: attr attr: attr
=> =>
for i in [0..panes.length] for i, pane of panes
if panes[i].element is element if pane.element is element
panes.splice i, 1 panes.splice i, 1
break break
removePane() removePane()
...@@ -138,8 +138,7 @@ tabReveal = ['$parse', ($parse) -> ...@@ -138,8 +138,7 @@ tabReveal = ['$parse', ($parse) ->
hiddenPanes = hiddenPanesGet scope hiddenPanes = hiddenPanesGet scope
return unless angular.isArray hiddenPanes return unless angular.isArray hiddenPanes
for i in [0..panes.length-1] for i, pane of panes
pane = panes[i]
value = pane.attr.value || pane.attr.title value = pane.attr.value || pane.attr.title
if value == ngModel.$viewValue if value == ngModel.$viewValue
pane.element.css 'display', '' pane.element.css 'display', ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment