Skip to content

Commit dd00a75

Browse files
committed
fix missing XSRF cookie warning
1 parent 5548fc9 commit dd00a75

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

app/index.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,16 @@
5858

5959

6060
<div ng-controller="AlertController">
61-
<alert class="alert-error alert-reduced-margin" ng-show="cookie_problem() && iframed">
61+
62+
<!-- use DIV rather than ALERT so ng-show works -->
63+
<div class="alert alert-error alert-reduced-margin" ng-show="cookie_problem() && iframed">
6264
<b>As a first time user</b> you will need to briefly open the Cloud Playground in a
6365
<a href="." target="_blank">separate window</a>.<br>
6466
Once you've done that, please reload this page.
65-
</alert>
66-
<alert class="alert-error alert-reduced-margin" ng-show="cookie_problem()">
67+
</div>
68+
69+
<!-- use DIV rather than ALERT so ng-show works -->
70+
<div class="alert alert-error alert-reduced-margin" ng-show="cookie_problem()">
6771
Cloud Playground is having trouble with your browser cookies.<br>
6872
<br>
6973
Here are some other things you can try to resolve this:
@@ -72,7 +76,9 @@
7276
<li>Make sure your browser is configured to allow cookies.</li>
7377
<li>Clear your browser cookies.</li>
7478
</ol>
75-
</alert>
79+
</div>
80+
81+
<!-- use ALERT here so CLOSE attribute triggers close widget -->
7682
<alert ng-repeat="alert in alerts()" close="closeAlert($index)" class="alert-{{alert.type}} alert-pre alert-reduced-margin"><i class="{{alert.icon}}"></i> {{alert.msg}}</alert>
7783
</div>
7884

app/js/controllers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function AlertController($scope, Alert) {
1313

1414
$scope.cookie_problem = function() {
1515
return Alert.cookie_problem();
16-
}
16+
};
1717

1818
$scope.$on('$routeChangeStart', function() {
1919
Alert.clear();

0 commit comments

Comments
 (0)