dlegr250_material_design 0.4.90 → 0.4.91

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: 9e279a7f0da68894aeebc152eea0193c102755e5
4
- data.tar.gz: de9172c789ddf2c8a78a798b93bdec5fa58dadae
3
+ metadata.gz: a16f816faf773b0ffcfefc193e4d856905f2d53e
4
+ data.tar.gz: a75693e9ebdfa0a0f62f0f4fdfaecd35ae8a770d
5
5
  SHA512:
6
- metadata.gz: 97726c10a4c75472cee053d2bb4b296e95d04eb44082a04376f752e735312e48bba928c97c8387e476cce1ab52dbf779fa89e4cabf095ba7966c85665d6ac07d
7
- data.tar.gz: 702d8784983a7042a4195c7e3f57bee84d4413be91f954c790cbb1d0ee0ffb4a6f7c287623ad42ed4b0e4e235165f8ed2deca98fcbb73e6ed36d3abe5a67a8f4
6
+ metadata.gz: 013a7ba8011d7476d1689eed07f32b56123d49c986bb507d439fe3e9a3291676848050aa189b05894ff3324d2e22de4d2435b2d93b6ed159d34dedb12675105b
7
+ data.tar.gz: 97e7261cc12608d45948cb2bfc74472e14e2f52d12f589bf095d91b7475c00d51b9a2d0ac784abcb234ff8e55c4dfbda6cd9eef01f0045ef560a347935492aef
@@ -1,3 +1,3 @@
1
1
  module Dlegr250MaterialDesign
2
- VERSION = "0.4.90"
2
+ VERSION = "0.4.91"
3
3
  end
@@ -15,3 +15,4 @@ $(document).on "turbolinks:load", ->
15
15
  App.MD.InputMasks.init()
16
16
  App.MD.Toggles.init()
17
17
  App.MD.Snackbar.init()
18
+ App.MD.ScrollScope.init()
@@ -49,54 +49,3 @@ class App.MD.Dialog
49
49
  element.remove()
50
50
  , 500
51
51
  false
52
-
53
-
54
- # class App.MD.Dialog
55
- # @init: () ->
56
- # @setVariables()
57
- # @setEvents()
58
- #
59
- # @setVariables: () ->
60
- # @$dialog = $("#dialog")
61
- #
62
- # @setEvents: () ->
63
- # $("body").on "click", "a[data-custom-confirm]", (event) =>
64
- # $trigger = $(event.target).closest("a[data-custom-confirm]")
65
- # $triggerTemplateId = $trigger.data("custom-confirm")["template"]
66
- # $triggerLinkClone = $trigger.clone().removeAttr("data-custom-confirm")
67
- # $triggerLinkClone.attr("id", "dialog-trigger-original-link")
68
- #
69
- # # Replace dialog content with trigger template
70
- # $templateHtml = $("##{$triggerTemplateId}").html()
71
- # @$dialog.html($templateHtml)
72
- #
73
- # # Copy over original link to dialog
74
- # @$dialog.find(".dialog-actions").append($triggerLinkClone.hide())
75
- #
76
- # @.showDialog()
77
- # false
78
- #
79
- # @$dialog.on "click", "[role='cancel']", =>
80
- # @.hideDialog()
81
- # false
82
- #
83
- # @$dialog.on "click", "[role='confirm']", =>
84
- # @$dialog.find("#dialog-trigger-original-link").click()
85
- # @.hideDialog()
86
- #
87
- # @call: (html_content) ->
88
- # @$dialog.html(html_content)
89
- # @.showDialog()
90
- #
91
- # @isVisible: () ->
92
- # @$dialog.hasClass("visible")
93
- #
94
- # @showDialog: () ->
95
- # App.MD.Layout.showOverlay()
96
- # App.MD.Menus.hideMenus()
97
- # @$dialog.addClass("visible")
98
- #
99
- # @hideDialog: () ->
100
- # @$dialog.removeClass("visible")
101
- # if App.MD.Layout.isOverlayVisible()
102
- # App.MD.Layout.hideOverlay()
@@ -0,0 +1,11 @@
1
+ #======================================================================
2
+ # Stops scrolling in child element from bleeding into parent.
3
+ #======================================================================
4
+ class App.MD.ScrollScope
5
+ @init: () ->
6
+ @setEvents()
7
+
8
+ @setEvents: () ->
9
+ $(document).scrollScope({
10
+ elements: ".menu, [data-scroll-scope]"
11
+ })
@@ -10,6 +10,7 @@
10
10
  //= require third_party/handlebars.latest
11
11
  //= require third_party/jquery.inputmask.min.3.2.8-11
12
12
  //= require third_party/jquery.autonumeric.1-9-44
13
+ //= require third_party/jquery.scroll_scope.min.0.1.0
13
14
  //= require components/layout
14
15
  //= require components/menus
15
16
  //= require components/dialog
@@ -0,0 +1,4 @@
1
+ /*! scroll-scope.js 0.1.0, MIT
2
+ https://github.com/Eiskis/scroll-scope
3
+ */
4
+ jQuery&&!function(e){"use strict";var t=function(t){var n=this;n.mainContainer=null,n.selector=null,n.settings=e.extend({elements:"[data-scroll-scope]",forcedElements:'[data-scroll-scope="force"]',events:"DOMMouseScroll mousewheel scroll touchstart touchmove"},t&&(t.elements||t.forcedElements||t.events)?t:{}),n.getTargetedElements=function(){return n.mainContainer.find(n.selector)},n.getSelector=function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&e[n].length&&t.push(e[n]);return t.length?t.join(", "):null},n.normalizeJqueryObject=function(t){return t?t instanceof jQuery?t:e(t):null},n.killScrolling=function(e,t){return t||"touchmove"!==e.type&&"touchstart"!==e.type?(e.preventDefault(),e.stopPropagation(),e.returnValue=!1,!1):void 0},n.onScroll=function(t){if(t.isLegitScroll)return!0;var o=e(this),l=n.settings.forcedElements&&o.is(n.settings.forcedElements),r=this.scrollHeight,i=o.outerHeight(),s=r-i-this.scrollTop;if(i>=r)return l&&"touchstart"!==t.type?n.killScrolling(t,l):!0;var c=t.originalEvent.wheelDelta;l&&"undefined"==typeof c&&"touchstart"===t.type&&(this.scrollTop<=0?o.scrollTop(1):0>=s&&o.scrollTop(r-i-1));var u=c>0;return!u&&-c>s?(o.scrollTop(this.scrollHeight),n.killScrolling(t,l)):u&&c>this.scrollTop?(o.scrollTop(0),n.killScrolling(t,l)):(t.isLegitScroll=!0,!0)},n.unbind=function(){return n.mainContainer&&n.mainContainer.off(n.settings.events,n.selector,n.onScroll),n},n.bind=function(e){return e=n.normalizeJqueryObject(e),e&&n.unbind(),n.mainContainer=e,n.mainContainer.on(n.settings.events,n.selector,n.onScroll),n},n.settings.elements=n.getSelector([n.settings.elements]),n.settings.forcedElements=n.getSelector([n.settings.forcedElements]),n.selector=n.getSelector([n.settings.elements,n.settings.forcedElements])};"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return t}):"undefined"!=typeof module&&module.exports?module.exports=t:(window.ScrollScope=t,function(e){e.fn.scrollScope=function(e){var n=new t(e);return n.bind(this),n.mainContainer}}(e))}(jQuery);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dlegr250_material_design
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.90
4
+ version: 0.4.91
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel LeGrand
@@ -43,6 +43,7 @@ files:
43
43
  - vendor/assets/javascripts/components/input_masks.coffee
44
44
  - vendor/assets/javascripts/components/layout.coffee
45
45
  - vendor/assets/javascripts/components/menus.coffee
46
+ - vendor/assets/javascripts/components/scroll_scope.coffee
46
47
  - vendor/assets/javascripts/components/snackbar.coffee
47
48
  - vendor/assets/javascripts/components/tabs.coffee
48
49
  - vendor/assets/javascripts/components/toggles.coffee
@@ -53,6 +54,7 @@ files:
53
54
  - vendor/assets/javascripts/third_party/handlebars.latest.js
54
55
  - vendor/assets/javascripts/third_party/jquery.autonumeric.1-9-44.js
55
56
  - vendor/assets/javascripts/third_party/jquery.inputmask.min.3.2.8-11.js
57
+ - vendor/assets/javascripts/third_party/jquery.scroll_scope.min.0.1.0.js
56
58
  - vendor/assets/stylesheets/base/base.scss
57
59
  - vendor/assets/stylesheets/base/global_classes.scss
58
60
  - vendor/assets/stylesheets/base/mixins.scss