effective_regions 1.5.0 → 1.6.0

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: 15a12c4c0892f7745ebdcf1c7d4dcc1579f2bd55
4
- data.tar.gz: 0b4df973cc2b19d3b36807d75eadf1fa42610c7f
3
+ metadata.gz: 842e9996a7447adc9e1f92a6c07cd00741689a36
4
+ data.tar.gz: f29291a7456d709be4180f9c0dc40826ddf3fbcd
5
5
  SHA512:
6
- metadata.gz: 75a07e7f38c10add091da4690401d996e0cbe5d17cc7c3a3f4bbe4d62b585a0cf3c29e20874a15d5cdb995e633dea6540c881f249babf41512aa24a2e2ffb6ab
7
- data.tar.gz: ddf6233e56df292961e492580f707fc0b9c5a9f1a967d89ff04ec810a55fd774b5521e60c7d5dabbc6250132b5402b25f9b8eb6c1c6244f8d3ba610d7895de07
6
+ metadata.gz: fa1d3ff025cbd20ea2b288a1088dfd96e922b1abd365a1b139ac7f868d0f52e79083064aeb27bad7ae89c4de9b860043ab1d39821c76bbfd7214c367e1028ab3
7
+ data.tar.gz: d0b9b57580ae5392c38158b5c2750fb083d331de3c970aa421bddaa4267c9eea93d88f018f4e1ba1e63b6eafb8dc3ea06afa765a3465dbfb51b7d433e69ad3a0
@@ -0,0 +1,23 @@
1
+ CKEDITOR.dialog.add 'current_date_time', (editor) ->
2
+ title: 'Current Date / Time',
3
+ minWidth: 250,
4
+ minHeight: 200,
5
+ contents: [
6
+ {
7
+ id: 'current_date_time',
8
+ elements: [
9
+ {
10
+ id: 'format',
11
+ type: 'text',
12
+ label: 'Date / Time Format',
13
+ setup: (widget) -> this.setValue(widget.data.format),
14
+ commit: (widget) -> widget.setData('format', this.getValue())
15
+ },
16
+ {
17
+ id: 'help-text',
18
+ type: 'html',
19
+ html: '<p>Examples:</p><br><table width="100%"><tr><td>%Y-%m-%d</td><td width="100%">&nbsp;&nbsp;&nbsp;</td><td>2015-12-25</td></tr><tr><td>%d-%b-%Y</td><td>&nbsp;&nbsp;&nbsp;</td><td>25-Dec-2015</td></tr><tr><td>&nbsp;</td><td></td><td></td></tr><tr><td>%H:%M:%S</td><td>&nbsp;&nbsp;&nbsp;</td><td>18:30:15</td></tr><tr><td>%I:%M%P</td><td>&nbsp;&nbsp;&nbsp;</td><td>6:30pm</td></tr></table><br><p>For a complete reference, please visit:<br><a href="http://apidock.com/ruby/DateTime/strftime" target="_blank">http://apidock.com/ruby/DateTime/strftime</a></p>'
20
+ }
21
+ ]
22
+ }
23
+ ]
@@ -2,7 +2,7 @@ module Effective
2
2
  class Region < ActiveRecord::Base
3
3
  self.table_name = EffectiveRegions.regions_table_name.to_s
4
4
 
5
- belongs_to :regionable, :polymorphic => true, :touch => true
5
+ belongs_to :regionable, :polymorphic => true
6
6
 
7
7
  structure do
8
8
  title :string, :validates => [:presence]
@@ -0,0 +1,12 @@
1
+ module Effective
2
+ module Snippets
3
+ class CurrentDateTime < Snippet
4
+ attribute :format, String
5
+
6
+ def snippet_tag
7
+ :span
8
+ end
9
+
10
+ end
11
+ end
12
+ end
@@ -0,0 +1 @@
1
+ = (Time.zone.now.strftime(current_date_time.format.to_s) rescue 'invalid date format string')
@@ -1,3 +1,3 @@
1
1
  module EffectiveRegions
2
- VERSION = '1.5.0'.freeze
2
+ VERSION = '1.6.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_regions
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-20 00:00:00.000000000 Z
11
+ date: 2015-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -78,6 +78,7 @@ files:
78
78
  - README.md
79
79
  - Rakefile
80
80
  - app/assets/images/effective/templates/image_and_title.png
81
+ - app/assets/javascripts/effective/snippets/current_date_time.js.coffee
81
82
  - app/assets/javascripts/effective/snippets/current_user_info.js.coffee
82
83
  - app/controllers/effective/regions_controller.rb
83
84
  - app/helpers/effective_regions_controller_helper.rb
@@ -85,10 +86,12 @@ files:
85
86
  - app/models/concerns/acts_as_regionable.rb
86
87
  - app/models/effective/access_denied.rb
87
88
  - app/models/effective/region.rb
89
+ - app/models/effective/snippets/current_date_time.rb
88
90
  - app/models/effective/snippets/current_user_info.rb
89
91
  - app/models/effective/snippets/snippet.rb
90
92
  - app/models/effective/templates/image_and_title.rb
91
93
  - app/models/effective/templates/template.rb
94
+ - app/views/effective/snippets/_current_date_time.html.haml
92
95
  - app/views/effective/snippets/_current_user_info.html.haml
93
96
  - app/views/effective/templates/_image_and_title.html.haml
94
97
  - app/views/effective_regions/_include_tags_javascript.html.haml