rrule_form 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rrule_form/version.rb +1 -1
- data/vendor/assets/javascripts/rrule-gui.js +13 -13
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6523de7ea2c3a6d6f7e19a709ea8361e297bdbc7eab8951790b989ccf188edc7
|
4
|
+
data.tar.gz: 3f9a0bc9fc50b3c932a1d27b7fce569a0b3ea577d5c79bff27209a4c32abb2b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ef34b0a3d70816a34ad74a9ac23ea431adb5f3fe157853d3a1268888366516aeaa4a4048805a474167c5ac30430f966b6d5a46adc1ef5a189adc5da50874e97
|
7
|
+
data.tar.gz: efd1bb4423270e964732eba5a0775f851dad46959b706594974f89d53f326e00cbb559f04288a0543c42854031301df722ea3bcde65f300bf3b6c908c880f81d
|
data/lib/rrule_form/version.rb
CHANGED
@@ -29,11 +29,11 @@ SOFTWARE.
|
|
29
29
|
RruleForm = {
|
30
30
|
readRule: function(rrule) {
|
31
31
|
|
32
|
-
|
32
|
+
rruleObj = typeof rruleObj !== 'undefined' ? rruleObj : '';
|
33
33
|
|
34
|
-
if (
|
34
|
+
if (rruleObj != '') {
|
35
35
|
// Break down the rule by semi-colons first
|
36
|
-
var items =
|
36
|
+
var items = rruleObj.split(';');
|
37
37
|
var recur = [];
|
38
38
|
for (i = 0; i < items.length; i++) {
|
39
39
|
if (items[i] !== '') {
|
@@ -373,7 +373,7 @@ RruleForm = {
|
|
373
373
|
},
|
374
374
|
rruleGenerate: function() {
|
375
375
|
// Produce RRULE state to feed to rrule.js
|
376
|
-
|
376
|
+
rruleObj = "";
|
377
377
|
|
378
378
|
// Check to be sure there is a count value or until date selected
|
379
379
|
if (recurringRule.count == "" && recurringRule.until == "") {
|
@@ -383,15 +383,15 @@ RruleForm = {
|
|
383
383
|
for (var key in recurringRule) {
|
384
384
|
if (recurringRule.hasOwnProperty(key)) {
|
385
385
|
if (recurringRule[key] != '') {
|
386
|
-
|
386
|
+
rruleObj += key + '=' + recurringRule[key] + ';';
|
387
387
|
}
|
388
388
|
}
|
389
389
|
}
|
390
390
|
// Remove the last semicolon from the end of RRULE
|
391
|
-
|
391
|
+
rruleObj = rruleObj.replace(/;\s*$/, "");
|
392
392
|
|
393
393
|
// Convert to Uppercase and return
|
394
|
-
return
|
394
|
+
return rruleObj.toUpperCase();
|
395
395
|
},
|
396
396
|
initialize: function(selector, callback) {
|
397
397
|
if (!$(selector).length) return;
|
@@ -532,7 +532,7 @@ RruleForm = {
|
|
532
532
|
// Store Selected Days in the BYDAY rule
|
533
533
|
$('#weekday-select button').each(function() {
|
534
534
|
|
535
|
-
// Active class is the selected day, store the ID of active days which contains the short day name for the
|
535
|
+
// Active class is the selected day, store the ID of active days which contains the short day name for the rruleObj (ex. MO, TU, WE, etc)
|
536
536
|
if ($(this).hasClass('active')) {
|
537
537
|
byday.push($(this).attr('id'));
|
538
538
|
}
|
@@ -550,7 +550,7 @@ RruleForm = {
|
|
550
550
|
// Store Selected Days in the BYDAY rule
|
551
551
|
$('#monthday-select button').each(function() {
|
552
552
|
|
553
|
-
// Active class is the selected day, store the ID of active days which contains the short day name for the
|
553
|
+
// Active class is the selected day, store the ID of active days which contains the short day name for the rruleObj (ex. MO, TU, WE, etc)
|
554
554
|
if ($(this).hasClass('active')) {
|
555
555
|
bymonthday.push($(this).attr('data-day-num'));
|
556
556
|
}
|
@@ -573,7 +573,7 @@ RruleForm = {
|
|
573
573
|
// Store Selected Days in the BYDAY rule
|
574
574
|
$('#bymonth-select button').each(function() {
|
575
575
|
|
576
|
-
// Active class is the selected day, store the ID of active days which contains the short day name for the
|
576
|
+
// Active class is the selected day, store the ID of active days which contains the short day name for the rruleObj (ex. MO, TU, WE, etc)
|
577
577
|
if ($(this).hasClass('active')) {
|
578
578
|
bymonth.push($(this).attr('data-month-num'));
|
579
579
|
}
|
@@ -740,7 +740,7 @@ RruleForm = {
|
|
740
740
|
// Store Selected Days in the BYDAY rule
|
741
741
|
$('.yearly-multiple-months button').each(function() {
|
742
742
|
|
743
|
-
// Active class is the selected day, store the ID of active days which contains the short day name for the
|
743
|
+
// Active class is the selected day, store the ID of active days which contains the short day name for the rruleObj (ex. MO, TU, WE, etc)
|
744
744
|
if ($(this).hasClass('active')) {
|
745
745
|
bymonth.push($(this).attr('data-month-num'));
|
746
746
|
}
|
@@ -839,9 +839,9 @@ RruleForm = {
|
|
839
839
|
$('#rrule-' + selector.replace(/[^\w\s]/g, '_')).submit(function(e) {
|
840
840
|
e.preventDefault();
|
841
841
|
if (callback === '') {
|
842
|
-
$(selector).val(RruleForm.rruleGenerate());
|
842
|
+
$(selector).val(RruleForm.rruleGenerate()).trigger('change');
|
843
843
|
} else {
|
844
|
-
callback(RruleForm.rruleGenerate())
|
844
|
+
eval(callback + '("'+RruleForm.rruleGenerate() +'")');
|
845
845
|
}
|
846
846
|
$('.modal.in').modal('hide');
|
847
847
|
});
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rrule_form
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ravi-ture
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|