myg 2.8.0 → 2.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/app/views/mozaic/myg/_checkbox.html.erb +1 -1
  4. data/app/views/mozaic/myg/_input.html.erb +1 -1
  5. data/app/views/mozaic/myg/_label.html.erb +1 -1
  6. data/app/views/mozaic/myg/_radio.html.erb +1 -1
  7. data/app/views/mozaic/myg/_switch.html.erb +1 -1
  8. data/lib/generators/templates/install/javascripts/action-button.js +6 -2
  9. data/lib/generators/templates/install/javascripts/button.js +6 -2
  10. data/lib/generators/templates/install/javascripts/card.js +6 -2
  11. data/lib/generators/templates/install/javascripts/checkbox.js +6 -2
  12. data/lib/generators/templates/install/javascripts/dialog.js +6 -2
  13. data/lib/generators/templates/install/javascripts/drawer.js +6 -2
  14. data/lib/generators/templates/install/javascripts/dropdown.js +6 -2
  15. data/lib/generators/templates/install/javascripts/footer.js +6 -2
  16. data/lib/generators/templates/install/javascripts/form-field.js +6 -2
  17. data/lib/generators/templates/install/javascripts/icon.js +6 -2
  18. data/lib/generators/templates/install/javascripts/input.js +6 -2
  19. data/lib/generators/templates/install/javascripts/menu.js +6 -2
  20. data/lib/generators/templates/install/javascripts/modal.js +6 -2
  21. data/lib/generators/templates/install/javascripts/progress.js +6 -2
  22. data/lib/generators/templates/install/javascripts/radio.js +6 -2
  23. data/lib/generators/templates/install/javascripts/select.js +6 -2
  24. data/lib/generators/templates/install/javascripts/sidebar.js +6 -2
  25. data/lib/generators/templates/install/javascripts/slide.js +6 -2
  26. data/lib/generators/templates/install/javascripts/slider.js +6 -2
  27. data/lib/generators/templates/install/javascripts/tabs.js +6 -2
  28. data/lib/generators/templates/install/javascripts/text.js +6 -2
  29. data/lib/generators/templates/install/javascripts/theme.js +6 -2
  30. data/lib/generators/templates/install/javascripts/titlebar.js +6 -2
  31. data/lib/generators/templates/install/javascripts/toast.js +6 -2
  32. data/lib/generators/templates/install/javascripts/toolbar.js +6 -2
  33. data/lib/generators/templates/install/javascripts/tooltip.js +6 -2
  34. data/lib/myg/version.rb +1 -1
  35. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0937cd38045815e560f8ded6c453a74e26161dbdde4691b73ffab3304efb2592'
4
- data.tar.gz: f81786ef6b57c306c0ebd927c49d1ebd76ca68ce6227538b523693389dffd31e
3
+ metadata.gz: d73d141e0399ee34c932b0b6ae90c9ef4069956c65b74e00823dbf9859c7f8ea
4
+ data.tar.gz: 7d6113e328dccf9202b8b4cc60a4b8a3893c5afb1cb5a8f2fb64e77c5094e58f
5
5
  SHA512:
6
- metadata.gz: 8d75557e81cca423422f549a8c77a406efc19389c954e031390a459a5b17ce0521786ce81ac74fde229cbf2e444c15d5d74099072a903aa89af1c5cef6507e64
7
- data.tar.gz: 16c64180d567121ffdce95cbb207445148650350cae3d7fc19856a7ba609044b8d498e2734c6bafcba25cb3de30808ada4026eaebcd790bc0499b08a46624d04
6
+ metadata.gz: 5a8f981672933425d5c6c5c802669e4f22a7fa464043b832ae9423f87828d660524e5047ef7e7c4ad3404165b64336808be4d7e1f6e82d02d9ce63673ad50bf6
7
+ data.tar.gz: 4af3e452a621e80eaad33ad11e2d6a99ec360858f873cc279f3aebd562c745392a724a54d16c2b8aab925af8b61dace9748e38b2468c736999201cc380e8c5fc
data/CHANGELOG.md CHANGED
@@ -4,6 +4,11 @@
4
4
 
5
5
  * nothing yet
6
6
 
7
+ ### 2.8.1 - 2018/03/26
8
+
9
+ * bugfixes
10
+ * fixed IDs of form components
11
+
7
12
  ### 2.8.0 - 2018/03/17
8
13
 
9
14
  * enhancements
@@ -3,7 +3,7 @@
3
3
  <% identifier = options.delete :identifier %>
4
4
  <% values = options.delete(:values) || [0, 1] %>
5
5
  <% name = class_name ? "#{class_name.to_s.downcase}[#{attribute}]" : "#{attribute}" %>
6
- <% id = [class_name, identifier, attribute].map { |s| s.to_s.downcase }.join('_') %>
6
+ <% id = [class_name, identifier, attribute].map { |s| s.to_s.downcase }.join('_').tr('[', '_').tr(']', '_') %>
7
7
  <% wrapper_html = {
8
8
  class: ['myg-checkbox mdc-checkbox', options.dig(:wrapper_html, :class), ('mdc-checkbox--disabled' if options.dig(:input_html, :disabled))].join(' ')
9
9
  } %>
@@ -2,7 +2,7 @@
2
2
  <% attribute = options.delete :attribute %>
3
3
  <% identifier = options.delete :identifier %>
4
4
  <% name = class_name ? "#{class_name.to_s.downcase}[#{attribute}]" : "#{attribute}" %>
5
- <% id = [class_name, identifier, attribute].map { |s| s.to_s.downcase }.join('_') %>
5
+ <% id = [class_name, identifier, attribute].map { |s| s.to_s.downcase }.join('_').tr('[', '_').tr(']', '_') %>
6
6
  <% html = {
7
7
  class: ['myg-input', options[:class]].join(' '),
8
8
  name: name,
@@ -1,7 +1,7 @@
1
1
  <% class_name = options.delete :class_name %>
2
2
  <% attribute = options.delete :attribute %>
3
3
  <% identifier = options.delete :identifier %>
4
- <% id = [class_name, identifier, attribute].map { |s| s.to_s.downcase }.join('_') %>
4
+ <% id = [class_name, identifier, attribute].map { |s| s.to_s.downcase }.join('_').tr('[', '_').tr(']', '_') %>
5
5
  <% html = {
6
6
  class: ['myg-label', options[:class]].join(' '),
7
7
  for: id
@@ -3,7 +3,7 @@
3
3
  <% identifier = options.delete :identifier %>
4
4
  <% value = options.delete :value %>
5
5
  <% name = class_name ? "#{class_name.to_s.downcase}[#{attribute}]" : "#{attribute}" %>
6
- <% id = [class_name, identifier, attribute, value].map { |s| s.to_s.downcase }.join('_') %>
6
+ <% id = [class_name, identifier, attribute, value].map { |s| s.to_s.downcase }.join('_').tr('[', '_').tr(']', '_') %>
7
7
  <% wrapper_html = {
8
8
  class: ['myg-radio mdc-radio', options.dig(:wrapper_html, :class), ('mdc-radio--disabled' if options.dig(:input_html, :disabled))].join(' ')
9
9
  } %>
@@ -3,7 +3,7 @@
3
3
  <% identifier = options.delete :identifier %>
4
4
  <% values = options.delete(:values) || [0, 1] %>
5
5
  <% name = class_name ? "#{class_name.to_s.downcase}[#{attribute}]" : "#{attribute}" %>
6
- <% id = [class_name, identifier, attribute].map { |s| s.to_s.downcase }.join('_') %>
6
+ <% id = [class_name, identifier, attribute].map { |s| s.to_s.downcase }.join('_').tr('[', '_').tr(']', '_') %>
7
7
  <% wrapper_html = {
8
8
  class: ['myg-switch mdc-switch', options.dig(:wrapper_html, :class)].join(' ')
9
9
  } %>
@@ -1,5 +1,9 @@
1
1
  import MygActionButton from 'myg-action-button';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygActionButton = MygActionButton.init( document.querySelector('.myg-action-button'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygActionButton = MygActionButton.init( document.querySelector('.myg-action-button'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygButton from 'myg-button';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygButtons = MygButton.initAll( document.querySelectorAll('.myg-button'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygButtons = MygButton.initAll( document.querySelectorAll('.myg-button'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygCard from 'myg-card';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygCards = MygCard.initAll( document.querySelectorAll('.myg-card'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygCards = MygCard.initAll( document.querySelectorAll('.myg-card'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygCheckbox from 'myg-checkbox';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygCheckboxes = MygCheckbox.initAll( document.querySelectorAll('.myg-checkbox'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygCheckboxes = MygCheckbox.initAll( document.querySelectorAll('.myg-checkbox'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygDialog from 'myg-dialog';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygDialogs = MygDialog.initAll( document.querySelectorAll('.myg-dialog'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygDialogs = MygDialog.initAll( document.querySelectorAll('.myg-dialog'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygDrawer from 'myg-drawer';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygDrawer = MygDrawer.init( document.querySelector('.myg-drawer'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygDrawer = MygDrawer.init( document.querySelector('.myg-drawer'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygDropdown from 'myg-dropdown';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygDropdowns = MygDropdown.initAll( document.querySelectorAll('.myg-dropdown'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygDropdowns = MygDropdown.initAll( document.querySelectorAll('.myg-dropdown'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygFooter from 'myg-footer';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygFooter = MygFooter.init( document.querySelector('.myg-footer'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygFooter = MygFooter.init( document.querySelector('.myg-footer'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygFormField from 'myg-form-field';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygFormFields = MygFormField.initAll( document.querySelectorAll('.myg-form-field'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygFormFields = MygFormField.initAll( document.querySelectorAll('.myg-form-field'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygIcon from 'myg-icon';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygIcons = MygIcon.initAll( document.querySelectorAll('.myg-icon'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygIcons = MygIcon.initAll( document.querySelectorAll('.myg-icon'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygInput from 'myg-input';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygInputs = MygInput.initAll( document.querySelectorAll('.myg-input'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygInputs = MygInput.initAll( document.querySelectorAll('.myg-input'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygMenu from 'myg-menu';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygMenu = MygMenu.init( document.querySelector('.myg-menu'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygMenu = MygMenu.init( document.querySelector('.myg-menu'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygModal from 'myg-modal';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygModals = MygModal.initAll( document.querySelectorAll('.myg-modal'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygModals = MygModal.initAll( document.querySelectorAll('.myg-modal'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygProgress from 'myg-progress';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygProgresses = MygProgress.initAll( document.querySelectorAll('.myg-progress'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygProgresses = MygProgress.initAll( document.querySelectorAll('.myg-progress'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygRadio from 'myg-radio';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygRadios = MygRadio.initAll( document.querySelectorAll('.myg-radio'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygRadios = MygRadio.initAll( document.querySelectorAll('.myg-radio'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygSelect from 'myg-select';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygSelects = MygSelect.initAll( document.querySelectorAll('.myg-select'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygSelects = MygSelect.initAll( document.querySelectorAll('.myg-select'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygSidebar from 'myg-sidebar';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygSidebar = MygSidebar.init( document.querySelector('.myg-sidebar'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygSidebar = MygSidebar.init( document.querySelector('.myg-sidebar'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygSlide from 'myg-slide';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygSlides = MygSlide.initAll( document.querySelectorAll('.myg-slide'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygSlides = MygSlide.initAll( document.querySelectorAll('.myg-slide'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygSlider from 'myg-slider';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygSliders = MygSlider.initAll( document.querySelectorAll('.myg-slider'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygSliders = MygSlider.initAll( document.querySelectorAll('.myg-slider'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygTabs from 'myg-tabs';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygTabs = MygTabs.init( document.querySelector('.myg-tabs'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygTabs = MygTabs.init( document.querySelector('.myg-tabs'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygText from 'myg-text';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygTexts = MygText.initAll( document.querySelectorAll('.myg-text'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygTexts = MygText.initAll( document.querySelectorAll('.myg-text'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygTheme from 'myg-theme';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygTheme = MygTheme.init( document.querySelector('html'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygTheme = MygTheme.init( document.querySelector('html'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygTitlebar from 'myg-titlebar';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygTitlebar = MygTitlebar.init( document.querySelector('.myg-titlebar'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygTitlebar = MygTitlebar.init( document.querySelector('.myg-titlebar'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygToast from 'myg-toast';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygToast = MygToast.init( document.querySelector('.myg-toast'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygToast = MygToast.init( document.querySelector('.myg-toast'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygToolbar from 'myg-toolbar';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygToolbar = MygToolbar.init( document.querySelector('.myg-toolbar'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygToolbar = MygToolbar.init( document.querySelector('.myg-toolbar'), {} );
9
+ }
@@ -1,5 +1,9 @@
1
1
  import MygTooltip from 'myg-tooltip';
2
2
 
3
- document.addEventListener( 'turbolinks:load', () => {
4
- const mygTooltips = MygTooltip.initAll( document.querySelectorAll('[data-myg-tooltip]'), {} );
3
+ ['turbolinks:load', 'modalist:render', 'myg-tabs:render'].forEach( (event) => {
4
+ document.removeEventListener( event, init );
5
+ document.addEventListener( event, init );
5
6
  })
7
+ function init() {
8
+ const mygTooltips = MygTooltip.initAll( document.querySelectorAll('[data-myg-tooltip]'), {} );
9
+ }
data/lib/myg/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Myg
2
2
 
3
- VERSION = '2.8.0'
3
+ VERSION = '2.8.1'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: myg
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Hübotter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-17 00:00:00.000000000 Z
11
+ date: 2018-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties