graph_starter 0.6.3 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: abe93e3b4485fb11e6b234575e8956264806d8a0
4
- data.tar.gz: 8ea84aec1685d6a9579d5cf6771e8ca7fb3a8374
3
+ metadata.gz: 607af2e39ee8bab6805a2ddbe049eae9e2ef60ae
4
+ data.tar.gz: bd9ab7766e43b64d055f9c782e03c289c6db9f7b
5
5
  SHA512:
6
- metadata.gz: 0648dcc302d23cb371ee7aaebf85ffd275715a0021e4de5705ae90513db2bda5397c3eae3e2b7c7ba5a1aec49faf10811b29c0a2113bfcd173a07ba60a003a2e
7
- data.tar.gz: 49e4d8570fb841d8d025cb8903463eab61c3e9a799216d4109e04fecdf8125e3ef75c80d121c12d628895a8ec3898853d8999791a9b73ab913b17ce31758678a
6
+ metadata.gz: 09a163db74319019480d65cbd712146aa745ab4094d3b56cbb22a42209e029216fa36f001a48e6621de44b15a85bca872aef667ad87f1744acc0bdb5b47b60bd
7
+ data.tar.gz: 85acb28502748349cd67f66f0e3294d543b2cb53b119047f2a973374ab08da6ba52cf5ef3a4f991c5755eb21aad2ea165566facb5e1cfa8dc359894593e2f54d
@@ -8,6 +8,8 @@
8
8
 
9
9
 
10
10
  ready = ->
11
+ $('#loading-spinner').hide()
12
+
11
13
  $("img").error ->
12
14
  console.log 'imgError!!!!'
13
15
 
@@ -23,3 +25,7 @@ ready = ->
23
25
 
24
26
  $(document).ready ready
25
27
  $(document).on 'page:load', ready
28
+
29
+ $(document).on 'page:fetch', (e) ->
30
+ $('#loading-spinner').css 'display', 'inline-block'
31
+
@@ -6,4 +6,12 @@
6
6
 
7
7
  #menu {
8
8
  margin-top: 0;
9
- }
9
+ }
10
+
11
+ #loading-spinner {
12
+ position: absolute;
13
+ width: 100%;
14
+ display: none;
15
+ margin-top: 2em;
16
+ z-index: 1000;
17
+ }
@@ -58,6 +58,14 @@ module GraphStarter
58
58
  end
59
59
  end
60
60
 
61
+ def image_array
62
+ if self.class.has_images?
63
+ images.to_a
64
+ elsif self.class.has_image?
65
+ [image].compact
66
+ end
67
+ end
68
+
61
69
  def first_image_source_url
62
70
  first_image && first_image.source_url
63
71
  end
@@ -17,7 +17,7 @@ module GraphStarter
17
17
  end
18
18
 
19
19
  def main_column_exists?
20
- @main_column_exists ||= asset.class.has_images? && asset.images.present? || asset.body.present?
20
+ @main_column_exists ||= ((asset.class.has_images? || asset.class.has_image?) && asset.image_array.present?) || asset.body.present?
21
21
  end
22
22
  end
23
23
  end
@@ -1,8 +1,8 @@
1
1
  - if asset.body.present?
2
2
  = asset.body
3
- - if asset.images.present?
3
+ - if asset.image_array.present?
4
4
  .ui.link.cards
5
- - asset.images.each do |image|
5
+ - asset.image_array.each do |image|
6
6
  .card
7
7
  .image = image_tag image.source_url, class: 'ui image tiny rounded'
8
8
  .content
@@ -23,6 +23,8 @@ html
23
23
 
24
24
  body
25
25
 
26
+ i#loading-spinner.ui.massive.loading.spinner.icon
27
+
26
28
  = render partial: 'layouts/graph_starter/menu'
27
29
 
28
30
  - if notice.present?
@@ -1,3 +1,3 @@
1
1
  module GraphStarter
2
- VERSION = "0.6.3"
2
+ VERSION = "0.6.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graph_starter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Underwood