appointments 1.3.0 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,7 +32,7 @@ This will install the necessary model, view, and controller files
32
32
 
33
33
  (The MIT License)
34
34
 
35
- Copyright (c) 2012 FIX
35
+ Copyright (c) 2012 Michael Leveton
36
36
 
37
37
  Permission is hereby granted, free of charge, to any person obtaining
38
38
  a copy of this software and associated documentation files (the
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "appointments"
5
- s.version = "1.3.0"
5
+ s.version = "1.3.2"
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.summary = "Schedule appointments with Rails 3 and the jQuery-UI"
8
8
  s.email = "mleveton@prepcloud.com"
@@ -5,36 +5,6 @@ $(function () {
5
5
  $('#cal_previous2').hide();
6
6
  });
7
7
 
8
- function findHours(current_date){
9
- $.ajax({
10
- url: "/../appointments",
11
- cache: false,
12
- data: {matched_date:current_date},
13
- success: function(html){
14
- var hours_array = [];
15
- $("#hidden_hour_div").append(html);
16
- var hours_string = $("#hidden_hour_div").html()
17
- var one = hours_string.substring(2, 6);
18
- var two = hours_string.substring(10, 14);
19
- var three = hours_string.substring(18, 22);
20
- var four = hours_string.substring(26, 30);
21
- var five = hours_string.substring(34, 38);
22
- var six = hours_string.substring(42, 46);
23
- var seven = hours_string.substring(50, 54);
24
- var eight = hours_string.substring(58, 62);
25
- var nine = hours_string.substring(66, 70);
26
- var ten = hours_string.substring(74, 78);
27
- var eleven = hours_string.substring(82, 86);
28
- var twelve = hours_string.substring(90, 94);
29
- hours_array.push(one,two,three,four,five,six,seven,eight,nine,ten,eleven,twelve);
30
- for (var j in hours_array) {
31
- (final_array = '\.'+ hours_array[j]);
32
- $(final_array).hide();
33
- }
34
- }
35
- });
36
- }
37
-
38
8
  var disabledDays = [];
39
9
 
40
10
  $(function () {
@@ -64,8 +34,8 @@ $(function () {
64
34
  $("#datepicker").datepicker({
65
35
  minDate: new Date(year, month, day),
66
36
  dateFormat: 'yy-mm-dd',
67
- onSelect: function(dateText, inst) {
68
- setFinalDate = dateText;
37
+ onSelect: function(dateText) {
38
+ setFinalDate = dateText
69
39
  $('#hour_picker').show();
70
40
  $('#datepicker').hide();
71
41
  findHours(setFinalDate);
@@ -76,24 +46,44 @@ $(function () {
76
46
  });
77
47
  });
78
48
 
49
+ function findHours(chosen_date){
50
+ $.ajax({
51
+ url: "/../appointments",
52
+ cache: false,
53
+ data: {matched_date:chosen_date},
54
+ success: function(html){
55
+ var hours_array = [];
56
+ $("#hidden_hour_div").append(html);
57
+ var hours_string = $("#hidden_hour_div").html()
58
+ var one = hours_string.substring(2, 6);
59
+ var two = hours_string.substring(10, 14);
60
+ var three = hours_string.substring(18, 22);
61
+ var four = hours_string.substring(26, 30);
62
+ var five = hours_string.substring(34, 38);
63
+ var six = hours_string.substring(42, 46);
64
+
65
+ hours_array.push(one,two,three,four,five,six);
66
+ for (var j in hours_array) {
67
+ (final_array = '\.'+ hours_array[j]);
68
+ $(final_array).hide();
69
+ }
70
+ }
71
+ });
72
+ }
79
73
 
80
- function nextPage(hour, id){
81
- setFinalHour = hour;
82
- if (setFinalHour == null || setFinalHour == "") return false;
83
- else {
74
+
75
+ function nextPage(hour, id){
84
76
  $('#hour_picker').hide();
85
77
  $("#appointment_form").show();
86
- document.getElementById('schedules_date').value = setFinalDate;
87
- document.getElementById('schedules_hour').value = setFinalHour;
78
+ document.getElementById('appointments_date').value = setFinalDate;
79
+ document.getElementById('appointments_hour').value = hour;
88
80
  $('#cal_previous2').show();
89
81
  document.getElementById('subData').style.display = 'block'
90
82
  $('#final_date h2').append(setFinalDate);
91
83
  $('#final_hour h2').append(id);
92
84
  pageNo = '3';
93
85
  return true;
94
- }
95
-
96
- }
86
+ }
97
87
 
98
88
  function prevPage() {
99
89
 
@@ -56,15 +56,15 @@
56
56
  <%%=form_tag(@appointments) %>
57
57
 
58
58
  <br />
59
- <label for="schedules_date">scheduled date</label><br /><br />
59
+ <label for="appointments_date">scheduled date</label><br /><br />
60
60
  <div id = "final_date"><h2></h2></div>
61
61
  <input id="schedules_date" name="appointments[date]" type="hidden" />
62
62
  <br />
63
63
  <br />
64
64
 
65
- <label for="schedules_hour">scheduled hour</label><br /><br />
65
+ <label for="appointments_hour">scheduled hour</label><br /><br />
66
66
  <div id = "final_hour"><h2></h2></div>
67
- <input id="schedules_hour" name="appointments[hour]" type="hidden" />
67
+ <input id="appointments_hour" name="appointments[hour]" type="hidden" />
68
68
  <br />
69
69
  <br />
70
70
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appointments
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.2
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: 2012-02-19 00:00:00.000000000Z
12
+ date: 2012-02-21 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
- requirement: &24035840 !ruby/object:Gem::Requirement
16
+ requirement: &23403520 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *24035840
24
+ version_requirements: *23403520
25
25
  description: Schedule appointments with Rails 3 and the jQuery-UI
26
26
  email: mleveton@prepcloud.com
27
27
  executables: []
@@ -30,10 +30,8 @@ extra_rdoc_files: []
30
30
  files:
31
31
  - .autotest
32
32
  - Manifest.txt
33
- - README
34
33
  - README.rdoc
35
34
  - Rakefile
36
- - appointments-1.2.9.gem
37
35
  - appointments.gemspec
38
36
  - lib/generators/appointments/install/install_generator.rb
39
37
  - lib/generators/appointments/templates/appointment.js
data/README DELETED
File without changes
Binary file