diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2013-09-14 00:27:31 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2013-09-14 00:27:31 +0200 |
commit | f475f0095f2b4af1acab8cfe3d6c866a71b73bf1 (patch) | |
tree | f43d5ca41f17765c56bf00afb0a523ffef805b2f /static/js/kosten.ls | |
parent | 9b358a4a3e6ce5cad229ba2fa6da9218e88b61e0 (diff) | |
download | kosten-f475f0095f2b4af1acab8cfe3d6c866a71b73bf1.tar.gz kosten-f475f0095f2b4af1acab8cfe3d6c866a71b73bf1.tar.bz2 kosten-f475f0095f2b4af1acab8cfe3d6c866a71b73bf1.zip |
Replaced current JS by LS and generated JS
Diffstat (limited to 'static/js/kosten.ls')
-rw-r--r-- | static/js/kosten.ls | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/static/js/kosten.ls b/static/js/kosten.ls index 443210a..8bf746d 100644 --- a/static/js/kosten.ls +++ b/static/js/kosten.ls @@ -1,7 +1,7 @@ jQuery.fn.extend do copy : -> @clone!remove-attr 'id class' -jq = (f) -> $ !-> f +jq = (f) -> !-> $ f # Add export addJS = jq -> @@ -27,26 +27,26 @@ export showJS = jq -> # Categories export catsJS = jq -> counter = 0 - add_img = $ \image#add + add_img = $ \img#add new_input = $ \input#new new_image = (new_name) -> # we need to copy the image to get the correct URL add_img.copy! - .. .attr \src -> @src.replace \add new_name + ..attr \src -> @src.replace \add new_name $ "li > span" .click -> span = $ @ input = span.next! img = new_image \undo - .. .click -> - $ @ .remove! + ..click -> + $ @ .remove! - # reset text - input.val span.text! + # reset text + input.val span.text! - <- input.fade-out \slow - span.toggle! + <- input.fade-out \slow + span.toggle! span.toggle! <- input.fade-in \slow @@ -55,9 +55,9 @@ export catsJS = jq -> add_img.click -> input = new_input.copy! img = new_image \minus - .. .click -> - <- $ @ .parent!fade-out \slow - $ @ .remove! + ..click -> + <- $ @ .parent!fade-out \slow + $ @ .remove! input.attr \name -> @name + counter .remove-attr \style @@ -66,6 +66,6 @@ export catsJS = jq -> .append img .hide! .insert-before add_img.parent! - .fade-in \slow input.focus + .fade-in \slow -> input.focus! counter++ |