rocky 0.1.2.pre → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -133
- data/lib/rocky/version.rb +1 -1
- data/vendor/assets/javascripts/backbone.js +589 -505
- data/vendor/assets/javascripts/middleware/component/json_form.js.coffee +8 -13
- data/vendor/assets/javascripts/middleware/system/env.js.coffee +9 -0
- data/vendor/assets/javascripts/middleware.js.coffee +4 -1
- metadata +5 -5
- data/vendor/assets/javascripts/middleware/component/modal.js.coffee +0 -10
@@ -12,12 +12,10 @@ class Middleware.Component.JsonForm extends Middleware.System.Base
|
|
12
12
|
if @form.length == 0
|
13
13
|
return false
|
14
14
|
|
15
|
-
@
|
16
|
-
|
17
|
-
@form.on "
|
18
|
-
@form.on "
|
19
|
-
@form.on "request:failed", @updateForm
|
20
|
-
@form.on "request:cancel", @cancelForm
|
15
|
+
@form.on "ajax:success", @createResponse
|
16
|
+
@form.on "response:success", @completeForm
|
17
|
+
@form.on "response:error", @updateForm
|
18
|
+
@form.on "response:cancel", @cancelForm
|
21
19
|
|
22
20
|
@submitButton = @form.find("*[data-action='submit']")
|
23
21
|
@submitButton.on "click", =>
|
@@ -30,16 +28,13 @@ class Middleware.Component.JsonForm extends Middleware.System.Base
|
|
30
28
|
|
31
29
|
@cancelButton = @form.find("*[data-action='cancel']")
|
32
30
|
@cancelButton.on "click", =>
|
33
|
-
@form.trigger("
|
34
|
-
|
35
|
-
setCompletedStatusName: (status_name = "completed") =>
|
36
|
-
@completedStatusName = status_name
|
31
|
+
@form.trigger("response:cancel")
|
37
32
|
|
38
33
|
createResponse: (event, json) =>
|
39
|
-
if json[
|
40
|
-
@form.trigger("
|
34
|
+
if json[Middleware.Env.getSuccessStatus()] == true
|
35
|
+
@form.trigger("response:success", json)
|
41
36
|
else
|
42
|
-
@form.trigger("
|
37
|
+
@form.trigger("response:error", json)
|
43
38
|
|
44
39
|
completeForm: (event, json) =>
|
45
40
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rocky
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.2
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juri Semjonov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coffee-script
|
@@ -78,8 +78,8 @@ files:
|
|
78
78
|
- lib/generators/rocky/install/templates/app.coffee
|
79
79
|
- lib/generators/rocky/resource_helpers.rb
|
80
80
|
- lib/rocky/version.rb
|
81
|
+
- vendor/assets/javascripts/middleware/system/env.js.coffee
|
81
82
|
- vendor/assets/javascripts/middleware/system/base.js.coffee
|
82
|
-
- vendor/assets/javascripts/middleware/component/modal.js.coffee
|
83
83
|
- vendor/assets/javascripts/middleware/component/puppet.js.coffee
|
84
84
|
- vendor/assets/javascripts/middleware/component/json_form.js.coffee
|
85
85
|
- vendor/assets/javascripts/underscore.js
|
@@ -102,9 +102,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
102
102
|
version: '0'
|
103
103
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
104
|
requirements:
|
105
|
-
- - '
|
105
|
+
- - '>='
|
106
106
|
- !ruby/object:Gem::Version
|
107
|
-
version:
|
107
|
+
version: '0'
|
108
108
|
requirements: []
|
109
109
|
rubyforge_project:
|
110
110
|
rubygems_version: 2.0.2
|
@@ -1,10 +0,0 @@
|
|
1
|
-
class Middleware.Component.Modal extends Middleware.System.Base
|
2
|
-
@create: (selector) ->
|
3
|
-
$("body").append("<div class='modal' data-block='#{selector}'></div>")
|
4
|
-
Middleware.Component.Modal.bindOne("*[data-block='#{selector}']")
|
5
|
-
|
6
|
-
constructor: (@container) ->
|
7
|
-
super(@container)
|
8
|
-
|
9
|
-
fill: (content) =>
|
10
|
-
@container.append(content)
|