modeljs 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,57 @@
1
+ /*
2
+ Class: Model.Form
3
+ Author: William Barry (william@nine.is)
4
+ Description: Abstract form class to encapsulate add and edit forms for models.
5
+ */
6
+
7
+ Model.Form = Class.extend({
8
+
9
+ class_name: 'Model.Form',
10
+ model: false,
11
+ message: false,
12
+ adding_message: null,
13
+ deleting_message: null,
14
+ delete_message: null,
15
+ listing_models: false,
16
+
17
+ init: function(model, params)
18
+
19
+ // Returns the form for adding the model or false for an embedded form.
20
+ add: function()
21
+ post_add_display: function() {},
22
+
23
+ // Returns the form for editing a model or false for an embedded form.
24
+ edit: function()
25
+ post_edit_display: function() {},
26
+
27
+ listing_view: function()
28
+ post_listing_view_display: function() {},
29
+
30
+ // Returns a listing table of models or false for an embedded listing
31
+ listing_form: function()
32
+ post_listing_form_display: function() {},
33
+
34
+ listing_view: function()
35
+ post_listing_view_display: function() {},
36
+
37
+ // Gets the latest rows for the listing
38
+ refresh_listing_models: function(done)
39
+ refresh_listing_models_helper: function(models)
40
+
41
+ // Returns the values of the add form that will be sent to model.ajax_add
42
+ add_values: function()
43
+
44
+ // Show a confirmation screen
45
+ confirm: function(params)
46
+
47
+ ajax_success: function(resp)
48
+
49
+ ajax_error: function(str) { this.error(str); },
50
+
51
+ // Notes
52
+ loading: function(str) { this.show_message('loading' , str); },
53
+ note: function(str) { this.show_message('note' , str); },
54
+ success: function(str) { this.show_message('note success' , str); },
55
+ error: function(str) { this.show_message('note error' , str); },
56
+ show_message: function(class_names, str) { $('#' + this.message).empty().append($('<p/>').addClass(class_names).html(str)); }
57
+ });
@@ -0,0 +1,20 @@
1
+ //= require class
2
+ //= require model
3
+ //= require attribute
4
+ //= require form
5
+ //= require form/embedded
6
+ //= require attribute/checkbox-multiple
7
+ //= require attribute/checkbox
8
+ //= require attribute/date-time
9
+ //= require attribute/file
10
+ //= require attribute/hidden
11
+ //= require attribute/image
12
+ //= require attribute/password
13
+ //= require attribute/radio
14
+ //= require attribute/rich-text
15
+ //= require attribute/select
16
+ //= require attribute/texarea
17
+ //= require attribute/textjs
18
+ //= require attribute/h1
19
+ //= require attribute/time
20
+ //= require attribute/video
@@ -1,3 +1,3 @@
1
1
  module Modeljs
2
- VERSION = "0.0.4"
2
+ VERSION = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modeljs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-03 00:00:00.000000000 Z
12
+ date: 2013-06-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -68,6 +68,7 @@ extra_rdoc_files: []
68
68
  files:
69
69
  - app/assets/images/loading.gif
70
70
  - app/assets/images/loading_small.gif
71
+ - app/assets/javascripts/#Untitled-1#
71
72
  - app/assets/javascripts/attribute/checkbox-multiple.js
72
73
  - app/assets/javascripts/attribute/checkbox.js
73
74
  - app/assets/javascripts/attribute/date-time.js
@@ -88,6 +89,7 @@ files:
88
89
  - app/assets/javascripts/form/embedded.js
89
90
  - app/assets/javascripts/form.js
90
91
  - app/assets/javascripts/model.js
92
+ - app/assets/javascripts/modeljs.js
91
93
  - app/assets/stylesheets/modeljs.css
92
94
  - lib/modeljs/engine.rb
93
95
  - lib/modeljs/version.rb