dlegr250_material_design 0.5.47 → 0.5.48

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: 37c5aeee13e79284c7dbde9a55321b811ad128c1
4
- data.tar.gz: f60afab728f9f32ae8c17b8eaa2f26ff77e613f5
3
+ metadata.gz: 1092094d06c179ad2ad938890cc40a53a7d5d3d6
4
+ data.tar.gz: ba2631af9544ab55cc6853745d8a79210d8b2c79
5
5
  SHA512:
6
- metadata.gz: 29899681fb3e0175a2b8e5c2a60d2a7794b85347f45c740e6dd2f4d0fd85a0f325c8ff1240ecf46c2b13b8516c9dd97b9162d60e59c62eb37804a7b99fb08862
7
- data.tar.gz: 7ae01958d1de458aaef380db35d801d7bf40d10e573aac1ee02884399339cbfe1e64b72456b199788f3a0859d5ea114e72cd78a3d9cbeda617150262b10c0db8
6
+ metadata.gz: d528e46cc7f6e797feda3ea92ba7422de9659633c681a3e73129273da935af941d238137e9377d036c359388b2570dace58d7d2a23feacc0cf1ea74cea3ea30c
7
+ data.tar.gz: 1174fa19baac2be0cd163a59725916fd99811299438ab7454df106272b696670f4f974703ac3ebc512c5d7c97088d6e4ed7ae898766026806d286a0e1446b13a
@@ -1,3 +1,3 @@
1
1
  module Dlegr250MaterialDesign
2
- VERSION = "0.5.47"
2
+ VERSION = "0.5.48"
3
3
  end
@@ -51,6 +51,17 @@ class App.MD.Dialog
51
51
  element.hide().show()
52
52
  element.addClass("visible")
53
53
  element.find("input[autofocus]").focus()
54
+
55
+ # Add shadow on dialog appbar when scrolling contents
56
+ $("[data-scroll-shadow]").on "scroll", (e) ->
57
+ $this = $(this)
58
+ $dialogAppbar = $this.parents(".dialog").find(".dialog-appbar")
59
+
60
+ if $this.scrollTop()
61
+ $dialogAppbar.addClass("scroll-shadow")
62
+ else
63
+ $dialogAppbar.removeClass("scroll-shadow")
64
+
54
65
  false
55
66
 
56
67
  @closeDialog: (element) ->
@@ -10,10 +10,20 @@ class App.MD.Toggles
10
10
 
11
11
  @setEvents: () ->
12
12
  # Toggle to show/hide elements
13
- $("body").on "click select", "[data-show-element]", (event) =>
14
- domId = $(event.target).data("show-element")
15
- $("#{domId}").removeClass("hidden")
13
+ $("body").on "click select", "[data-show-element]", (e) =>
14
+ # domId = $(event.target).data("show-element")
15
+ # $("#{domId}").removeClass("hidden")
16
+ $($(this).attr("data-show-element")).show()
16
17
 
17
- $("body").on "click select", "[data-hide-element]", (event) =>
18
- domId = $(event.target).data("hide-element")
19
- $("#{domId}").addClass("hidden")
18
+ $(document).on "click", "[data-remove-element]", (e) ->
19
+ $($(this).attr("data-remove-element")).remove()
20
+
21
+ $(document).on "click", "[role='remove-element']", (e) ->
22
+ $this = $(this)
23
+ $elementToRemove = $this.attr("data-element")
24
+ $this.closest($elementToRemove).remove()
25
+
26
+ $("body").on "click select", "[data-hide-element]", (e) =>
27
+ # domId = $(e.target).data("hide-element")
28
+ # $("#{domId}").addClass("hidden")
29
+ $($(this).attr("data-hide-element")).hide()
@@ -40,3 +40,26 @@ jQuery.extend jQuery.fn,
40
40
  spinner = $("<div class='spinner-container'><div class='spinner spinner-#{color} spinner-#{size}'></div></div>")
41
41
  element.html(spinner)
42
42
  element
43
+
44
+ # Increment / decrement integer values
45
+ #----------------------------------------------------------------------
46
+
47
+ jQuery.extend jQuery.fn,
48
+ increment: ->
49
+ @each ->
50
+ $element = $(this)
51
+ $value = parseInt($element.text())
52
+ if $value != NaN
53
+ $element.text($value + 1)
54
+ $element
55
+
56
+ decrement: ->
57
+ @each ->
58
+ $element = $(this)
59
+ $value = parseInt($element.text())
60
+ if $value != NaN
61
+ if $value <= 0
62
+ $element.text(0)
63
+ else
64
+ $element.text($value - 1)
65
+ $element
@@ -12,6 +12,21 @@
12
12
  .color-#{$color-name} { color: #{$hex-value} !important; }
13
13
  }
14
14
 
15
+ // Scroll shadow
16
+ //----------------------------------------------------------------------
17
+
18
+ .scroll-shadow {
19
+ @include box-shadow(0 2px 5px rgba(0, 0, 0, 0.30));
20
+ }
21
+
22
+ // Simple dot divider
23
+ //----------------------------------------------------------------------
24
+
25
+ .dot-divider {
26
+ padding: 0 $spacing-xsmall;
27
+ text-align: center;
28
+ }
29
+
15
30
  // Alignments
16
31
  //----------------------------------------------------------------------
17
32
 
@@ -391,3 +391,22 @@ $buttons: ".button";
391
391
  width: inherit;
392
392
  }
393
393
  }
394
+
395
+ // Buttons - button group
396
+ //----------------------------------------------------------------------
397
+
398
+ .button-group {
399
+ @include flex-parent-row();
400
+
401
+ .button {
402
+ @include rounded-corners(0);
403
+ }
404
+
405
+ .button:first-child {
406
+ @include rounded-left-corners();
407
+ }
408
+
409
+ .button:last-child {
410
+ @include rounded-right-corners();
411
+ }
412
+ }
@@ -12,6 +12,9 @@
12
12
  border-bottom: 1px solid color("divider");
13
13
  }
14
14
 
15
+ // Comment header
16
+ //----------------------------------------------------------------------
17
+
15
18
  .comment-header {
16
19
  color: color("helper");
17
20
  font-size: $font-size-small;
@@ -19,20 +22,26 @@
19
22
  }
20
23
 
21
24
  .comment-header-author {
22
- color: color("text");
25
+ color: color("helper");
23
26
  font-weight: bold;
24
- padding-right: $spacing-xsmall;
27
+ padding-right: 0;
25
28
  }
26
29
 
27
30
  .comment-header-timestamp {
28
31
  color: color("helper");
29
- padding-left: $spacing-xsmall;
32
+ padding-left: 0;
30
33
  }
31
34
 
35
+ // Comment content
36
+ //----------------------------------------------------------------------
37
+
32
38
  .comment-content {
33
39
  line-height: 1.3;
34
40
  }
35
41
 
42
+ // Comment actions
43
+ //----------------------------------------------------------------------
44
+
36
45
  .comment-actions {
37
46
  color: color("helper");
38
47
  font-size: $font-size-small;
@@ -40,7 +49,7 @@
40
49
 
41
50
  a {
42
51
  color: color("helper");
43
- padding: $spacing-xsmall;
52
+ padding: $spacing-xsmall 0;
44
53
 
45
54
  &:hover {
46
55
  text-decoration: underline;
@@ -51,3 +60,12 @@
51
60
  .comment.highlighted .comment-content {
52
61
  background-color: color("highlight");
53
62
  }
63
+
64
+ // Comment form actions
65
+ //----------------------------------------------------------------------
66
+
67
+ .comment-form-actions,
68
+ .new-comment-actions {
69
+ padding-top: $spacing-small;
70
+ text-align: right;
71
+ }
@@ -84,6 +84,7 @@
84
84
  border-bottom: 1px solid color("divider");
85
85
  height: $appbar-height;
86
86
  padding: 0 $spacing-small;
87
+ position: relative;
87
88
  }
88
89
 
89
90
  .dialog-appbar-icon {
@@ -125,6 +126,8 @@
125
126
 
126
127
  .dialog-appbar-secondary-actions {
127
128
  @include list-item-secondary-actions();
129
+ text-align: right;
130
+ @include flex-parent-row();
128
131
  }
129
132
 
130
133
  // Dialogs - header
@@ -138,6 +141,7 @@
138
141
 
139
142
  .dialog-header-icon {
140
143
  padding-top: $spacing-small;
144
+ text-align: center;
141
145
  width: $appbar-button-height;
142
146
 
143
147
  // To match up with .appbar-button
@@ -30,6 +30,7 @@
30
30
 
31
31
  textarea {
32
32
  padding: $spacing-small;
33
+ resize: none;
33
34
  }
34
35
 
35
36
  // Underline text fields
@@ -27,7 +27,8 @@
27
27
 
28
28
  .tab-primary {
29
29
  align-items: center;
30
- display: flex;
30
+ // display: flex;
31
+ display: inline-block;
31
32
  flex: 1 1 auto;
32
33
  justify-content: center;
33
34
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dlegr250_material_design
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.47
4
+ version: 0.5.48
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel LeGrand
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-04 00:00:00.000000000 Z
11
+ date: 2017-03-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'WARNING: ALPHA CODE, NOT PRODUCTION READY. ACTIVELY UNDER DEVELOPMENT
14
14
  AS OF AUG 2016. Implement Google Material Design spec with modern browsers in mind