summaryrefslogtreecommitdiff
path: root/static/js/kosten.ls
diff options
context:
space:
mode:
Diffstat (limited to 'static/js/kosten.ls')
-rw-r--r--static/js/kosten.ls26
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++