formize 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.13
1
+ 0.0.14
@@ -6,11 +6,11 @@
6
6
  $.behaviours = [];
7
7
  $.behave = function (selector, eventType, handler) {
8
8
  if (eventType == "load") {
9
- $(document).ready(function(event) {
9
+ $(document).ready(function(event) {
10
10
  $(selector).each(handler);
11
11
  $(selector).prop('alreadyBound', true);
12
- });
13
- $.behaviours.push({selector: selector, handler: handler});
12
+ });
13
+ $.behaviours.push({selector: selector, handler: handler});
14
14
  } else {
15
15
  $(selector).live(eventType, handler);
16
16
  }
@@ -41,7 +41,7 @@
41
41
  $.ajax(url, {
42
42
  data: {dialog: frame_id},
43
43
  success: function(data, textStatus, jqXHR) {
44
- var frame = $(document.createElement('div')), h1, title=null;
44
+ var frame = $(document.createElement('div'));
45
45
  frame.attr({id: frame_id, 'class': 'dialog ajax-dialog', style: 'display:none;'});
46
46
  $('body').append(frame);
47
47
  frame.html(data);
@@ -50,8 +50,8 @@
50
50
  autoOpen: false,
51
51
  show: 'fade',
52
52
  modal: true,
53
- width: (width > 1024 ? width *0.6 : width*0.9),
54
- minWidth: (width*0.3 < 150 ? 150 : width*0.3)
53
+ width: 'auto',
54
+ height: 'auto'
55
55
  });
56
56
  $.ajaxDialogInitialize(frame);
57
57
  frame.dialog("open");
@@ -6,7 +6,6 @@ module Formize
6
6
  base.extend(ClassMethods)
7
7
  end
8
8
 
9
-
10
9
  # Adds method to provides a default response for create/update actions
11
10
  # It saves the record/resource and return response with good status and headers
12
11
  def save_and_respond(resource, options={}, &block)
@@ -18,12 +18,17 @@ module Formize
18
18
  #
19
19
  # @option options [TrueClass, FalseClass] :skip_stylesheet
20
20
  # Skip the inclusion of default stylesheet: formize.css
21
+ #
22
+ # @option options [TrueClass, FalseClass] :with_formize
23
+ # Include main javascript formize.js
24
+ #
25
+ # @deprecated
21
26
  def formize_include_tag(options={})
22
27
  options[:locale] ||= ::I18n.locale
23
28
  html = ""
24
29
  html << javascript_include_tag('jquery.ui.formize') if options[:special_ui]
25
30
  html << javascript_include_tag('locales/jquery.ui.datepicker-' + locale.to_s)
26
- html << javascript_include_tag('formize')
31
+ html << javascript_include_tag('formize') if options[:with_formize]
27
32
  unless options[:skip_stylesheet]
28
33
  html << stylesheet_link_tag('jquery-ui')
29
34
  html << stylesheet_link_tag('formize')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-14 00:00:00.000000000Z
12
+ date: 2011-09-15 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &13456920 !ruby/object:Gem::Requirement
16
+ requirement: &17846020 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *13456920
24
+ version_requirements: *17846020
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: jquery-rails
27
- requirement: &13455880 !ruby/object:Gem::Requirement
27
+ requirement: &17844600 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *13455880
35
+ version_requirements: *17844600
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: fastercsv
38
- requirement: &13454620 !ruby/object:Gem::Requirement
38
+ requirement: &17843480 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *13454620
46
+ version_requirements: *17843480
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: jeweler
49
- requirement: &13453320 !ruby/object:Gem::Requirement
49
+ requirement: &17841520 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.6.4
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *13453320
57
+ version_requirements: *17841520
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rcov
60
- requirement: &13398260 !ruby/object:Gem::Requirement
60
+ requirement: &17839740 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *13398260
68
+ version_requirements: *17839740
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rdoc
71
- requirement: &13396340 !ruby/object:Gem::Requirement
71
+ requirement: &17826960 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: 2.4.2
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *13396340
79
+ version_requirements: *17826960
80
80
  description: Like simple_form or formtastic, it aims to handle easily forms but taking
81
81
  in account AJAX and HTML5 on depending fields mainly.
82
82
  email: brice.texier@ekylibre.org