promethee 1.11.20 → 1.11.21

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
  SHA256:
3
- metadata.gz: cd328fc503800de8373a50c835b28bb99048a41e7387b094b57d54f3e698c526
4
- data.tar.gz: deeb3982b534b43e841c9dc2706580ba2442c6c42fec2ae385389b247c6299c5
3
+ metadata.gz: 1c5ac12984c0f18a397b927570ab358c5179f8c284910a23a621f385b9412f79
4
+ data.tar.gz: c3e55e7d075042906d6a502081b53fea50f8e27400d42b4f0173d389721b1143
5
5
  SHA512:
6
- metadata.gz: f76f92dc7eb89b93e0151a7737e3187866b50b90b2b2274307804c77b88fa680948a051980f914d70eb4a9672a43319fccbed34d58c13f5fd8d90c6c5b0dce14
7
- data.tar.gz: 0cdefd55ed05f28c427d20b3338c48e2d7045f9e2f2d082d0e6cdd63c2807eaa88248d5d979a37ce5e4251067df2b13c31725455e0c5189ef1938586b928a4b0
6
+ metadata.gz: c809b1f127361b0510b10a0eb0f592372ae6b30bdfe2bc5b633187dda83d9e6fdf32d0616e6d7b2efad6b0c19b66d0d39c320b6f963b4f183e043af7eb841004
7
+ data.tar.gz: 6f647605f17f0937be6f40489f1098702c192856e93c478dfc6fdb701ae867808663dae8c6c1b3f608b60741306c592d5889ddd4a8bc61fb26dde9da8f147daf
@@ -14,6 +14,11 @@
14
14
  enabled: false,
15
15
  size: 12,
16
16
  offset: 0
17
+ },
18
+ tablet: {
19
+ enabled: false,
20
+ size: 12,
21
+ offset: 0
17
22
  }
18
23
  },
19
24
  children: []
@@ -1,9 +1,18 @@
1
1
  <script type="text/ng-template" id="promethee/components/column/edit/inspect">
2
+
3
+ <datalist id="tickmarks">
4
+ <% 12.times do |index| %>
5
+ <option value="<%= index+1 %>" label="<%= index+1 %>">
6
+ <% end %>
7
+ </datalist>
8
+
2
9
  <b>Desktop</b>
3
10
  <div class="form-group">
4
11
  <label class="label-control">Size: {{promethee.inspected.attributes.size}}</label><br/>
5
12
  <input ng-model="promethee.inspected.attributes.size"
6
13
  type="range"
14
+ class="btn-block"
15
+ list="tickmarks"
7
16
  min="1"
8
17
  max="12">
9
18
  </div>
@@ -11,6 +20,8 @@
11
20
  <label class="label-control">Offset: {{promethee.inspected.attributes.offset}}</label><br/>
12
21
  <input ng-model="promethee.inspected.attributes.offset"
13
22
  type="range"
23
+ class="btn-block"
24
+ list="tickmarks"
14
25
  min="0"
15
26
  max="{{12-promethee.inspected.attributes.size}}">
16
27
  </div>
@@ -28,6 +39,8 @@
28
39
  <label class="label-control">Size: {{promethee.inspected.attributes.mobile.size}}</label><br/>
29
40
  <input ng-model="promethee.inspected.attributes.mobile.size"
30
41
  type="range"
42
+ class="btn-block"
43
+ list="tickmarks"
31
44
  min="1"
32
45
  max="12">
33
46
  </div>
@@ -35,9 +48,39 @@
35
48
  <label class="label-control">Offset: {{promethee.inspected.attributes.mobile.offset}}</label><br/>
36
49
  <input ng-model="promethee.inspected.attributes.mobile.offset"
37
50
  type="range"
51
+ class="btn-block"
52
+ list="tickmarks"
38
53
  min="0"
39
54
  max="{{12-promethee.inspected.attributes.mobile.size}}">
40
55
  </div>
41
56
  </div>
57
+
58
+ <div class="form-group">
59
+ <input id="column_edit_inspect_tablet_enabled"
60
+ ng-model="promethee.inspected.attributes.tablet.enabled"
61
+ type="checkbox" />
62
+ <label class="label-control"
63
+ for="column_edit_inspect_tablet_enabled"> <b>Tablette</b></label>
64
+ </div>
65
+ <div ng-show="promethee.inspected.attributes.tablet.enabled">
66
+ <div class="form-group">
67
+ <label class="label-control">Size: {{promethee.inspected.attributes.tablet.size}}</label><br/>
68
+ <input ng-model="promethee.inspected.attributes.tablet.size"
69
+ type="range"
70
+ class="btn-block"
71
+ list="tickmarks"
72
+ min="1"
73
+ max="12">
74
+ </div>
75
+ <div class="form-group">
76
+ <label class="label-control">Offset: {{promethee.inspected.attributes.tablet.offset}}</label><br/>
77
+ <input ng-model="promethee.inspected.attributes.tablet.offset"
78
+ type="range"
79
+ class="btn-block"
80
+ list="tickmarks"
81
+ min="0"
82
+ max="{{12-promethee.inspected.attributes.tablet.size}}">
83
+ </div>
84
+ </div>
42
85
  </div>
43
86
  </script>
@@ -1,13 +1,41 @@
1
1
  <%
2
+ # 576 768 992 1200
3
+ # | | | |
4
+ # BS4 xs | sm | md | lg | xl
5
+ # BS3 xs | sm | md | lg
6
+
7
+ # Docs:
8
+ # BS4 : https://getbootstrap.com/docs/4.1/layout/overview/#responsive-breakpoints
9
+ # BS3 : https://getbootstrap.com/docs/3.3/css/#grid
10
+
11
+ # Basic idea is: default layout concerns desktop and tablet.
12
+ # There is a small difference between 3 and 4 regarding tablets:
13
+ # - BS4 treats tablets as desktop (expected behaviour)
14
+ # - BS3 treats tablets as mobile (wrong behaviour for us)
15
+
16
+ # Desktop
2
17
  size = component[:attributes][:size]
3
18
  offset = component[:attributes][:offset]
4
- classes = "col-md-#{size}"
5
- classes += " offset-md-#{offset} col-md-offset-#{offset}"
19
+ classes = " col-md-#{size} offset-md-#{offset} col-md-offset-#{offset}" # BS4 tablet+, BS3 desktop only
20
+
21
+ # Tablet override
22
+ # - md for BS4
23
+ # - sm for BS3
24
+ if component[:attributes][:tablet] && component[:attributes][:tablet][:enabled]
25
+ size = component[:attributes][:tablet][:size]
26
+ offset = component[:attributes][:tablet][:offset]
27
+ classes += " col-md-#{size} col-md-offset-#{offset}" # BS4, breaks small desktop for BS3
28
+ classes += " col-sm-#{size} offset-sm-#{offset}" # BS3, breaks mobile landscape for BS4
29
+ end
30
+
31
+ # Mobile override
32
+ # - no class for BS4 (xs disappears, sm is treated in the same way)
33
+ # - xs for BS3
6
34
  if component[:attributes][:mobile] && component[:attributes][:mobile][:enabled]
7
- mobile_size = component[:attributes][:mobile][:size]
8
- mobile_offset = component[:attributes][:mobile][:offset]
9
- classes += " col-#{mobile_size} col-xs-#{mobile_size}"
10
- classes += " offset-#{mobile_offset} col-xs-offset-#{mobile_offset}"
35
+ size = component[:attributes][:mobile][:size]
36
+ offset = component[:attributes][:mobile][:offset]
37
+ classes += " col-#{size} offset-#{offset}" # BS4, does nothing for BS3
38
+ classes += " col-xs-#{size} col-xs-offset-#{offset}" # BS3, does nothing for BS4
11
39
  end
12
40
  %>
13
41
  <div class="<%= classes %> <%= promethee_class_for component %>">
@@ -1,5 +1,5 @@
1
1
  module Promethee
2
2
  module Rails
3
- VERSION = '1.11.20'
3
+ VERSION = '1.11.21'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: promethee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.20
4
+ version: 1.11.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sébastien Gaya
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2018-12-20 00:00:00.000000000 Z
17
+ date: 2018-12-21 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: rails