caboose-cms 0.9.102 → 0.9.103

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef5b831397616ceab55b63831af8c97df6a08e32
4
- data.tar.gz: 1f0bd288510663667254c086db2faeb1bc6c6a9b
3
+ metadata.gz: 43f666995cd62795fe414e658802c53543b323aa
4
+ data.tar.gz: 2c96b156909f2fd0e7122b93a7542cbe5067e044
5
5
  SHA512:
6
- metadata.gz: dabbd1344c89276247799819b61802f1c1944e8410a6826ac185d1b436dc357b5849049c804965954807e3ba414690c01ee9ccb839548ea35ed19ea755cf1ad0
7
- data.tar.gz: 00f95351e87719665f34eae87024474c99fc681c75b017d1065005bc8c6de23833f3f1bc0f4682e7fa68b084e7be4543bbd6e0c908086697b628b6a8cfb38db7
6
+ metadata.gz: da4ffb224221ab582a94d56d30d01c5955cd0af76576c0df68d449eaa3a1bc0060023e38280186b35c93013d2cabb54a8bc5837dc9adee3b28c424c47885691f
7
+ data.tar.gz: 724759e8178c789952ad2a299a71aab71c317d9420a90cab855cdd592dea1e8f7d5c697b7b79b340e9db5dee69f494bc0dc5d479a33f55c70ee336343ccbe5f6
@@ -61,26 +61,37 @@ Attribute.prototype = {
61
61
  }
62
62
  });
63
63
  },
64
-
65
- populate_options: function(after, refresh) {
66
- if (!this.options_url)
67
- return;
68
- if (this.options && !refresh)
64
+
65
+ populate_options: function(after, refresh)
66
+ {
67
+ var that = this;
68
+ if (that.options)
69
+ that.verify_options();
70
+ if (!that.options_url || (that.options && !refresh))
69
71
  {
70
72
  if (after) after();
71
73
  return;
72
- }
73
- var this2 = this;
74
+ }
74
75
  $.ajax({
75
- url: this.options_url,
76
+ url: that.options_url,
76
77
  type: 'get',
77
- success: function(resp) {
78
- this2.options = resp;
79
- if (after) after();
80
- },
81
- error: function() {
82
- if (after) after();
83
- }
84
- });
78
+ success: function(resp) {
79
+ that.options = resp;
80
+ that.verify_options();
81
+ if (after) after();
82
+ },
83
+ error: function() {
84
+ if (after) after();
85
+ }
86
+ });
87
+ },
88
+
89
+ verify_options: function()
90
+ {
91
+ var that = this;
92
+ if (!that.options) return;
93
+ var arr = $.map(that.options, function(x) { return (typeof(x) == 'string' ? { value: x, text: x } : x); });
94
+ that.options = arr;
85
95
  }
96
+
86
97
  };
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.9.102'
2
+ VERSION = '0.9.103'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.102
4
+ version: 0.9.103
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-27 00:00:00.000000000 Z
11
+ date: 2018-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg