Skip to content

Commit

Permalink
2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Brewster committed Mar 10, 2015
1 parent b71df2e commit f435871
Show file tree
Hide file tree
Showing 11 changed files with 80 additions and 57 deletions.
34 changes: 19 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
#### CHANGE LOG
###### 0.0.1
* Responsive Image
###### 2.0.1
* DOM Jquery
* Fallback to parent element when interpolating

###### 2.0.0
* removed jquery (except for dom handler)
* Responsive Background Image
* combined into Responsive Image

###### 0.1.0
###### 1.0.2
* Core
* Implemented class pattern for extending
* Added interpolation for getting dom attributes for responsive values
* Interpolation accepts a scope as 2nd argument for better element selection control

###### 0.1.1
* Bugfix and cleanup
###### 1.0.1
* Responsive Background Image
* Passes temp image with loaded event

###### 1.0.0
* Core
* Interpolation now uses css selectors instead of just an element id

###### 1.0.1
* Responsive Background Image
* Passes temp image with loaded event
###### 0.1.1
* Bugfix and cleanup

###### 1.0.2
###### 0.1.0
* Core
* Interpolation accepts a scope as 2nd argument for better element selection control
* Implemented class pattern for extending
* Added interpolation for getting dom attributes for responsive values

###### 2.0.0
* removed jquery (except for dom handler)
###### 0.0.1
* Responsive Image
* Responsive Background Image
* combined into Responsive Image
2 changes: 1 addition & 1 deletion demo/bumper_demo.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions lib/bumper-core.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions lib/bumper-dom-jquery.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions lib/bumper-responsive-breakpoint.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/bumper-responsive-image.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 26 additions & 9 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,32 @@
<link rel="stylesheet" href="/.tmp/bumper_spec.css">

<!-- Testing Dependencies -->
<script src="/vendor/jquery/dist/jquery.js"></script>
<script src="/vendor/mocha/mocha.js"></script>
<script src="/vendor/chai/chai.js"></script>
<script src="/vendor/sinon/lib/sinon.js"></script>
<script src="/vendor/sinon/lib/sinon/call.js"></script>
<script src="/vendor/sinon/lib/sinon/spy.js"></script>
<script src="/vendor/sinon/lib/sinon/stub.js"></script>
<script src="/vendor/sinon-chai/lib/sinon-chai.js"></script>
<script src="/testem.js"></script>
<script type="text/javascript" src="/vendor/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="/vendor/mocha/mocha.js"></script>
<script type="text/javascript" src="/vendor/chai/chai.js"></script>

<!-- Sinon -->
<script type="text/javascript" src="/vendor/sinon/lib/sinon.js"></script>
<script type="text/javascript" src="/vendor/sinon/lib/sinon/util/core.js"></script>
<script type="text/javascript" src="/vendor/sinon/lib/sinon/extend.js"></script>
<script type="text/javascript" src="/vendor/sinon/lib/sinon/typeOf.js"></script>
<script type="text/javascript" src="/vendor/sinon/lib/sinon/times_in_words.js"></script>
<script type="text/javascript" src="/vendor/sinon/lib/sinon/spy.js"></script>
<script type="text/javascript" src="/vendor/sinon/lib/sinon/call.js"></script>
<script type="text/javascript" src="/vendor/sinon/lib/sinon/behavior.js"></script>
<script type="text/javascript" src="/vendor/sinon/lib/sinon/stub.js"></script>
<script type="text/javascript" src="/vendor/sinon/lib/sinon/mock.js"></script>
<script type="text/javascript" src="/vendor/sinon/lib/sinon/collection.js"></script>
<script type="text/javascript" src="/vendor/sinon/lib/sinon/assert.js"></script>
<script type="text/javascript" src="/vendor/sinon/lib/sinon/sandbox.js"></script>
<script type="text/javascript" src="/vendor/sinon/lib/sinon/test.js"></script>
<script type="text/javascript" src="/vendor/sinon/lib/sinon/test_case.js"></script>
<script type="text/javascript" src="/vendor/sinon/lib/sinon/match.js"></script>
<script type="text/javascript" src="/vendor/sinon/lib/sinon/format.js"></script>
<script type="text/javascript" src="/vendor/sinon/lib/sinon/log_error.js"></script>

<script type="text/javascript" src="/vendor/sinon-chai/lib/sinon-chai.js"></script>
<script type="text/javascript" src="/testem.js"></script>

<!-- Header Libraries -->
<script src="/lib/bumper-core.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions src/bumper-core.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# * bumper core
# * https://github.com/brewster1134/bumper
# *
# * @version 2.0.0
# * @version 2.0.1
# * @author Ryan Brewster
# * Copyright (c) 2014
# * Licensed under the MIT license.
Expand All @@ -27,7 +27,7 @@

# check for breakpoint changes on window resize
window.onresize = requestAnimationFrame ->
window.Bumper.Responsive.Breakpoint.checkBreakpointChange()
window.Bumper.Responsive?.Breakpoint?.checkBreakpointChange()

# Creates a mutation observor for bumper modules when new elements are added to the dom
# Register a module into the switch statement with how to handle the new element
Expand Down
15 changes: 8 additions & 7 deletions src/bumper-dom-jquery.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# * bumper | dom | jquery
# * https://github.com/brewster1134/bumper
# *
# * @version 2.0.0
# * @version 2.0.1
# * @author Ryan Brewster
# * Copyright (c) 2014
# * Licensed under the MIT license.
Expand Down Expand Up @@ -31,13 +31,14 @@
# extract each interpolation declaration
splitArray = match.replace(/[{}]/g, '').split ':'

# find first match within elements parents
if $rootEl
$element = $rootEl.closest("#{splitArray[0]}")
# find match within element's parent chain
$element = $rootEl.closest("#{splitArray[0]}")

# add any matching elements anywhere on the dom
if !$element || !$element.length
$element = $("#{splitArray[0]}").first()
# find first matching elemnt anywhere in the dom
$element = $("#{splitArray[0]}").first() unless $element.length

# use the direct parent
$element = $rootEl.parent() unless $element.length

throw "No element for `#{splitArray[0]}` found." unless $element.length

Expand Down
2 changes: 1 addition & 1 deletion src/bumper-responsive-breakpoint.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# * bumper | responsive | breakpoint
# * https://github.com/brewster1134/bumper
# *
# * @version 2.0.0
# * @version 2.0.1
# * @author Ryan Brewster
# * Copyright (c) 2014
# * Licensed under the MIT license.
Expand Down
2 changes: 1 addition & 1 deletion src/bumper-responsive-image.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# * bumper | responsive | image
# * https://github.com/brewster1134/bumper
# *
# * @version 2.0.0
# * @version 2.0.1
# * @author Ryan Brewster
# * Copyright (c) 2014
# * Licensed under the MIT license.
Expand Down

0 comments on commit f435871

Please sign in to comment.