This repository has been archived by the owner on Dec 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #850 from cfpb/update-sidebar-alert
Add update-in-progress alert to sidebar of all regulation pages
- Loading branch information
Showing
12 changed files
with
135 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
regulations/static/regulations/js/source/views/sidebar/alert-view.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
'use strict'; | ||
var $ = require( 'jquery' ); | ||
var _ = require( 'underscore' ); | ||
var Backbone = require( 'backbone' ); | ||
Backbone.$ = $; | ||
|
||
var AlertView = Backbone.View.extend( { | ||
el: '#update-alert' | ||
} ); | ||
|
||
module.exports = AlertView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
regulations/static/regulations/js/unittests/specs/views/sidebar/alert-view-spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
require('../../../setup'); | ||
var sinon = require( 'sinon' ); | ||
|
||
describe('Alert View:', function() { | ||
|
||
var view, definition, $, AlertView; | ||
|
||
before(function() { | ||
$ = require('jquery'); | ||
AlertView = require('../../../../source/views/sidebar/alert-view'); | ||
}); | ||
|
||
beforeEach(function(){ | ||
// create a new instance of the view | ||
view = new AlertView(); | ||
}); | ||
|
||
it('should construct a view', function() { | ||
expect(view).to.be.defined; | ||
}); | ||
|
||
}); |
12 changes: 11 additions & 1 deletion
12
regulations/templates/regulations/chrome-empty-sidebar.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{% comment %} | ||
The alert displayed on all pages of a regulation while updates are in progress. | ||
{% endcomment %} | ||
|
||
<div class="alert_section group"> | ||
<strong> | ||
We’re working on incorporating amendments to this regulation. | ||
</strong> | ||
In the meantime, please review | ||
<a href="https://www.consumerfinance.gov/policy-compliance/rulemaking/final-rules/" class="standard"> | ||
CFPB rules recently published in the Federal Register</a>. | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters