source/joosy/form.coffee in joosy-1.2.0.beta.4 vs source/joosy/form.coffee in joosy-1.2.0.rc.1
- old
+ new
@@ -15,14 +15,14 @@
# form.progress = (percent) -> console.log "Uploaded by #{percent}%"
# form.fill @resource
#
# @include Joosy.Modules.Log
# @include Joosy.Modules.Events
-# @include Joosy.Modules.DOM
+# @concern Joosy.Modules.DOM
#
class Joosy.Form extends Joosy.Module
- @include Joosy.Modules.DOM
+ @concern Joosy.Modules.DOM
@include Joosy.Modules.Log
@include Joosy.Modules.Events
#
# Marks the CSS class to use to mark invalidated fields
@@ -105,11 +105,11 @@
@__assignElements()
@__delegateEvents()
method = @$container.get(0).getAttribute('method')?.toLowerCase()
- if method && !['get', 'post'].indexOf(method) != -1
+ if method && ['get', 'post'].indexOf(method) == -1
@__markMethod method
@$container.attr 'method', 'POST'
@$container.ajaxForm
dataType: 'json'
@@ -296,10 +296,10 @@
findField: (field) ->
@$fields().filter("[name='#{field}']")
#
# Simulates REST methods by adding hidden _method input with real method
- # while setting POST as the transport method
+ # while setting POST as the transport method.
#
# @param [String] method Real method to simulate
#
__markMethod: (method='PUT') ->
method = $('<input/>',
\ No newline at end of file