weeler 1.0.1 → 1.0.2

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: 510bfeea734279d6a69e655c195b32f36732ddf4
4
- data.tar.gz: f249eca43957610f851a1f85263b9524170a257b
3
+ metadata.gz: 5d993ac60b9d9f338a01a5c51836b905e86928e0
4
+ data.tar.gz: 015863705f2c4761a02ff6cecb710d2e36f3e2e7
5
5
  SHA512:
6
- metadata.gz: f752d4521e6ebe92f7d3e8ad9cad210776619bde701dd631146dca914a1ea9069646656f6da3e5ffa2464e24389f7e320aa9e55d3453ce01225898848712f5ba
7
- data.tar.gz: 04b1046910eb5267d4744c503abb203bbe3c052c379223416587bd4b29e06077e5f9dbe1b1595001138263804cb795bd98787d1a3afee8baa0a8e61cae090829
6
+ metadata.gz: 85b6eeb35a6054b99706961f0276bd2836b763102962b2808f3119824d4a1d6eaad5af890d4c6fb5b1fdcc9c4a911dcf7ed6b10e4ddd8804992005e564d13bba
7
+ data.tar.gz: dd7a5a7c0956b906cb8ae3eb9d53b1eedd91c284500f8a95f78704eae0c899b3ed67add13b787153f332383d9debc63d17c340092fb12795a24f47bbe76d2535
data/CHANGELOG.md CHANGED
@@ -1,10 +1,22 @@
1
+ ## 1.0.2
2
+
3
+ ### Bug Fixes
4
+
5
+ * Require jquery turbolinks
6
+ * Update dependencies
7
+ * Using boostrap flash instead jquery notify
8
+
9
+ ### Contributors
10
+
11
+ * Arturs Braucs
12
+
1
13
  ## 1.0.1
2
14
 
3
15
  ### Bug Fixes
4
16
 
5
17
  * Fixed turbo links not workin
6
18
  * Fixed seo translation wrong locale
7
- * Fixed empty image with image_upload_field
19
+ * Fixed empty image with image_upload_field
8
20
 
9
21
  ### Contributors
10
22
 
@@ -12,9 +12,10 @@ app = {
12
12
  boot: () ->
13
13
  $('.weeler-file-inputs').bootstrapFileInput()
14
14
  sortable.init()
15
+ flash.init();
15
16
  $('[data-provide="rowlink"],[data-provides="rowlink"]').each () ->
16
17
  $(this).rowlink($(this).data())
17
18
  }
18
19
 
19
20
  $(document).ready () ->
20
- app.boot()
21
+ app.boot()
@@ -0,0 +1,7 @@
1
+ var flash = {
2
+ init: function() {
3
+ $(".flash").fadeTo(4000, 6000).slideUp(500, function(){
4
+ $(".flash").alert('close');
5
+ });
6
+ }
7
+ }
@@ -0,0 +1,12 @@
1
+ module Weeler
2
+ module FlashHelper
3
+ def alert_class_for(flash_type)
4
+ {
5
+ :success => 'alert-success',
6
+ :error => 'alert-danger',
7
+ :alert => 'alert-warning',
8
+ :notice => 'alert-info'
9
+ }[flash_type.to_sym] || "alert-info"
10
+ end
11
+ end
12
+ end
@@ -13,10 +13,10 @@
13
13
  %body{data: {controller: controller_name, action: action_name, name_space: 'weeler', tag: "#{yield :weeler_body_tag}" }}
14
14
  = render "header_navbar"
15
15
  .container
16
+ = render "flash"
16
17
  .row.row-offcanvas.row-offcanvas-right
17
18
  = render "side_navbar"
18
19
  .col-xs-12.col-sm-9
19
20
  = yield
20
21
  %hr
21
22
  = render "footer"
22
- = render "flash"
@@ -1,3 +1,8 @@
1
- - flash.each do |name, message|
2
- :javascript
3
- notify.show("#{name}", "#{message}");
1
+ .row
2
+ .col-xs-12.col-sm-12.col-md-12.col-lg-12
3
+ - flash.each do |type, message|
4
+ .flash.alert.alert-dismissible{:role => "alert", class: "#{alert_class_for(type)}"}
5
+ %button.close{"data-dismiss" => "alert", :type => "button"}
6
+ %span{"aria-hidden" => "true"} ×
7
+ %span.sr-only= t('general.close')
8
+ = raw message
@@ -2,7 +2,7 @@ module Weeler
2
2
  module VERSION
3
3
  MAJOR = 1
4
4
  MINOR = 0
5
- TINY = 1
5
+ TINY = 2
6
6
  PRE = nil
7
7
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
8
8
  end
data/lib/weeler.rb CHANGED
@@ -11,6 +11,7 @@ require "haml"
11
11
  require "kaminari"
12
12
  require "globalize"
13
13
  require "jquery-ui-rails"
14
+ require "jquery-turbolinks"
14
15
  require "rails-settings-cached"
15
16
 
16
17
  module Weeler