rewrite loader.js in coffeescript
This commit is contained in:
parent
08d9421dd9
commit
f8b588808e
2 changed files with 5 additions and 11 deletions
|
@ -1,11 +0,0 @@
|
||||||
var Loader = {
|
|
||||||
img_src: "/assets/ajax-loader.gif",
|
|
||||||
|
|
||||||
html:
|
|
||||||
function(width) {
|
|
||||||
img = $("<img>");
|
|
||||||
img.attr("width", width);
|
|
||||||
img.attr("src", this.img_src);
|
|
||||||
return img;
|
|
||||||
}
|
|
||||||
}
|
|
5
app/assets/javascripts/loader.js.coffee
Normal file
5
app/assets/javascripts/loader.js.coffee
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
Loader =
|
||||||
|
html: (width) ->
|
||||||
|
$('<img>').attr src: '/assets/ajax-loader.gif', width: width
|
||||||
|
|
||||||
|
window.Loader = Loader
|
Loading…
Add table
Reference in a new issue