Skip to content

Commit

Permalink
Upgrade to use/expect jQuery 3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
larspetrus committed Mar 10, 2017
1 parent 7aa201b commit c9e0d8b
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 16 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Roofpig is an animated, programmable and interactive Rubik's Cube for the modern
It should work on most [any modern browser](http://caniuse.com/canvas).

##1. Usage
All you need is one file and a web server. Put [`roofpig_and_three.min.js`](https://raw.githubusercontent.com/larspetrus/Roofpig/master/roofpig_and_three.min.js) on your server. Include it, and jQuery 1.11.3 in your HTML:
All you need is one file and a web server. Put [`roofpig_and_three.min.js`](https://raw.githubusercontent.com/larspetrus/Roofpig/master/roofpig_and_three.min.js) on your server. Include it, and jQuery 3.1.1 in your HTML:

```html
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="roofpig_and_three.min.js"></script>
```
#####Static creation
Expand Down Expand Up @@ -42,7 +42,7 @@ Valid properties are: `alg`, `algdisplay`, `base`, `colored`, `colors`, `flags`,
Define the animated algorithm like this: `alg=R F' x2 R D Lw'`. It handles standard cube notation and some more. If no alg is given, the playback buttons don't appear.

#####Standard notation
Roofpig supports (almost) all standard cube notation. Layer(s): **F, B, R, L, U, D. M, E, S. x, y, z. Fw, Bw, Rw, Lw, Uw, Dw**. Turns: **2, ', 2'**. You can also use **², Z, 1** and **3**.
Roofpig supports (almost) all standard cube notation. Layer(s): **F, B, R, L, U, D. M, E, S. x, y, z. Fw, Bw, Rw, Lw, Uw, Dw, f, b, r, l, u, d**. Turns: **2, ', 2'**. You can also use **², Z, 1** and **3**.


#####Rotation notation
Expand Down
5 changes: 0 additions & 5 deletions lib/jquery-1.11.3.min.js

This file was deleted.

4 changes: 4 additions & 0 deletions lib/jquery-3.1.1.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion misc/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h3>Official release version</h3>
</table>
</div>

<script src="../lib/jquery-1.11.3.min.js"></script>
<script src="../lib/jquery-3.1.1.min.js"></script>
<script src="../roofpig_and_three.min.js"></script>

</body>
2 changes: 1 addition & 1 deletion misc/demo_local.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h3>Local build version</h3>
</table>
</div>

<script src="../lib/jquery-1.11.3.min.js"></script>
<script src="../lib/jquery-3.1.1.min.js"></script>
<script src="../local/build/roofpig_and_three.min.js"></script>

</body>
2 changes: 1 addition & 1 deletion misc/rptest_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<body>
<div id="mocha"></div>

<script src="lib/jquery-1.11.3.min.js"></script>
<script src="lib/jquery-3.1.1.min.js"></script>
<script src="https://cdn.rawgit.com/chaijs/chai/2.3.0/chai.js"></script>
<script src="https://cdn.rawgit.com/mochajs/mocha/2.2.5/mocha.js"></script>

Expand Down
4 changes: 2 additions & 2 deletions src/Dom.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ class Dom
_show: (button, enabled) ->
button.show()
if enabled
button.removeAttr("disabled")
button.prop("disabled", false)
button.addClass('roofpig-button-enabled')
else
button.attr("disabled", "disabled")
button.prop("disabled", true)
button.removeClass('roofpig-button-enabled')

_make_button: (text, name) ->
Expand Down
4 changes: 2 additions & 2 deletions src/document.coffee
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#= require Css

$(document).ready ->
console.log("Roofpig version 1.3.☂ (@@BUILT_WHEN@@). Expecting jQuery 1.11.3 and Three.js 71.")
console.log("Roofpig version 1.4 (WIP).☂ (@@BUILT_WHEN@@). Expecting jQuery 3.1.1 and Three.js 71.")
console.log("jQuery version", $.fn.jquery)

$('head').append(Css.CODE)

CubeAnimation.initialize()

pigs = $('.roofpig')
console.log("Found #{pigs.size()} .roofpig divs")
console.log("Found #{pigs.length} .roofpig divs")
for roofpig_div in pigs
new CubeAnimation($(roofpig_div))
2 changes: 1 addition & 1 deletion test/CubeAnimation_spec.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#= require three.min
#= require jquery-1.11.3.min.js
#= require jquery-3.1.1.min.js
#= require Camera
#= require CubeAnimation
#= require EventHandlers
Expand Down

0 comments on commit c9e0d8b

Please sign in to comment.