scrivito_advanced_editors 1.2.4.1 → 1.3.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/scripts/scrivito_responsive_tab.js +54 -0
- data/app/assets/javascripts/scripts/scrivito_tabs.js +10 -1
- data/app/assets/stylesheets/scrivito_advanced_editors/colapsable.css +5 -5
- data/app/assets/stylesheets/scrivito_advanced_editors/scrivito_tabs.scss +129 -0
- data/lib/scrivito_advanced_editors/version.rb +1 -1
- metadata +6 -5
- data/app/assets/stylesheets/scrivito_advanced_editors/scrivito_tabs.css +0 -53
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1e02f0509860f0cc0b3bc8fc9236262b6cfa1e9
|
4
|
+
data.tar.gz: 86caca8bebfd2068334a044adfb5450862bd1226
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebe0b5e7b16168296b1fb3442adb8a85c8ebd14944f27eeee278500cfe0d2b901e8f0fe13e3078c2e5b6867ec1569c90f84d809cf391eb8d35b8a8a9c096dee9
|
7
|
+
data.tar.gz: ef3d92c98e756ae599f1335f737ef53620cc8fa8cd882efd69d5965fc49b94816fe0a8483e91e46dbfc261d01af3817311eb1a3781d17b2ef63f3536a7871f1e
|
@@ -0,0 +1,54 @@
|
|
1
|
+
(function($, App) {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
var check_for_accordion, tab_as_accordion, as_accordion;
|
5
|
+
|
6
|
+
scrivito.on('load', function() {
|
7
|
+
check_for_accordion()
|
8
|
+
tab_as_accordion();
|
9
|
+
$(window).on('resize', function() {
|
10
|
+
check_for_accordion();
|
11
|
+
})
|
12
|
+
});
|
13
|
+
|
14
|
+
check_for_accordion = function() {
|
15
|
+
if(as_accordion()) {
|
16
|
+
$('.scrivito_dialog').addClass('scrivito-mobile-view');
|
17
|
+
} else {
|
18
|
+
$('.scrivito_dialog').removeClass('scrivito-mobile-view');
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
tab_as_accordion = function() {
|
23
|
+
$.each($('.tab-list').find('li'), function(i, l) {
|
24
|
+
var target = $(l).data('panel-target');
|
25
|
+
var inactive = $(l).hasClass('inactive') ? 'inactive' : '';
|
26
|
+
var headline = $("<h4 class="+ inactive +">"+ $(l).html() +"</h4>");
|
27
|
+
headline.addClass('accordion-headline').data('panel-target', target).insertBefore($(target));
|
28
|
+
if(!$(l).hasClass('inactive')) {
|
29
|
+
headline.on('click', function() {
|
30
|
+
var next = headline.next();
|
31
|
+
|
32
|
+
if(next.is(':visible')) {
|
33
|
+
headline.removeClass('active');
|
34
|
+
headline.next().removeClass('active');
|
35
|
+
$(l).removeClass('active');
|
36
|
+
} else {
|
37
|
+
headline.siblings().removeClass('active');
|
38
|
+
$(l).siblings().removeClass('active');
|
39
|
+
headline.addClass('active');
|
40
|
+
headline.next().addClass('active');
|
41
|
+
$(l).addClass('active');
|
42
|
+
$('html,body').animate({
|
43
|
+
scrollTop: $(headline).offset().top - 10
|
44
|
+
}, 300);
|
45
|
+
}
|
46
|
+
});
|
47
|
+
}
|
48
|
+
});
|
49
|
+
};
|
50
|
+
|
51
|
+
as_accordion = function() {
|
52
|
+
return $(document).width() < 750;
|
53
|
+
}
|
54
|
+
})(jQuery, this);
|
@@ -1,11 +1,17 @@
|
|
1
1
|
(function($, App) {
|
2
2
|
'use strict';
|
3
3
|
|
4
|
+
var as_accordion;
|
5
|
+
|
4
6
|
scrivito.on('content', function(content) {
|
5
7
|
var tab_list = $(content).find('.tab-list');
|
6
8
|
var active = tab_list.find('.active');
|
7
9
|
|
8
|
-
|
10
|
+
if(!as_accordion()) {
|
11
|
+
$.each(active, function(i,e) {
|
12
|
+
$($(e).data('panel-target')).addClass('active');
|
13
|
+
});
|
14
|
+
}
|
9
15
|
|
10
16
|
tab_list.on('click', 'li', function() {
|
11
17
|
var target = $(this).data('panel-target');
|
@@ -18,4 +24,7 @@
|
|
18
24
|
});
|
19
25
|
});
|
20
26
|
|
27
|
+
as_accordion = function() {
|
28
|
+
return $(document).width() < 750;
|
29
|
+
}
|
21
30
|
})(jQuery, this);
|
@@ -5,7 +5,7 @@ div.scrivito_colapsable_for_container {
|
|
5
5
|
transition: background 0.3s;
|
6
6
|
}
|
7
7
|
|
8
|
-
.scrivito_colapsable_for_container h4.scrivito_colapsable_headline {
|
8
|
+
.scrivito_colapsable_for_container > h4.scrivito_colapsable_headline {
|
9
9
|
cursor: pointer;
|
10
10
|
margin: 0 !important;
|
11
11
|
padding: 7px 0px 7px 25px;
|
@@ -20,7 +20,7 @@ div.scrivito_colapsable_for_container {
|
|
20
20
|
left: 0;
|
21
21
|
}
|
22
22
|
|
23
|
-
.in .scrivito_colapsable_headline i {
|
23
|
+
.in > .scrivito_colapsable_headline i {
|
24
24
|
transform: rotate(180deg);
|
25
25
|
}
|
26
26
|
|
@@ -47,15 +47,15 @@ div.scrivito_colapsable_for_container {
|
|
47
47
|
}
|
48
48
|
|
49
49
|
.scrivito_colapsable_for_container.small,
|
50
|
-
.scrivito_colapsable_for_container.small h4.scrivito_colapsable_headline {
|
50
|
+
.scrivito_colapsable_for_container.small > h4.scrivito_colapsable_headline {
|
51
51
|
font-size: 12px;
|
52
52
|
}
|
53
53
|
|
54
|
-
.scrivito_colapsable_for_container.small .scrivito_colapsable_headline i {
|
54
|
+
.scrivito_colapsable_for_container.small > .scrivito_colapsable_headline i {
|
55
55
|
left: 2px;
|
56
56
|
}
|
57
57
|
|
58
|
-
.scrivito_colapsable_for_container.small h4.scrivito_colapsable_headline {
|
58
|
+
.scrivito_colapsable_for_container.small> h4.scrivito_colapsable_headline {
|
59
59
|
padding: 3px 0 3px 25px;
|
60
60
|
}
|
61
61
|
|
@@ -0,0 +1,129 @@
|
|
1
|
+
.tab-list {
|
2
|
+
overflow: hidden;
|
3
|
+
list-style: none;
|
4
|
+
margin: 0;
|
5
|
+
padding: 3px 3px 0 3px;
|
6
|
+
}
|
7
|
+
|
8
|
+
.tab-list li[data-panel-target] {
|
9
|
+
float: left;
|
10
|
+
cursor: pointer;
|
11
|
+
color: #666;
|
12
|
+
padding: 8px 14px;
|
13
|
+
margin: 5px 5px 0 0px;
|
14
|
+
border-radius: 5px 5px 0 0;
|
15
|
+
}
|
16
|
+
|
17
|
+
.tab-list li[data-panel-target]:hover {
|
18
|
+
background: #eee;
|
19
|
+
box-shadow: 0 0 5px rgba(0,0,0,0.2);
|
20
|
+
}
|
21
|
+
|
22
|
+
.tab-list li[data-panel-target].inactive:hover {
|
23
|
+
box-shadow: none;
|
24
|
+
background: transparent;
|
25
|
+
cursor: auto;
|
26
|
+
}
|
27
|
+
|
28
|
+
.tab-list li[data-panel-target].active {
|
29
|
+
background-color: #fff;
|
30
|
+
box-shadow: 0 0 5px rgba(0,0,0,0.2);
|
31
|
+
}
|
32
|
+
|
33
|
+
.tab-list li.inactive {
|
34
|
+
color: #aaa;
|
35
|
+
float: left;
|
36
|
+
padding: 8px;
|
37
|
+
margin: 5px 5px 0 0px;
|
38
|
+
}
|
39
|
+
|
40
|
+
.tab-panels {
|
41
|
+
background-color: white;
|
42
|
+
padding: 11px;
|
43
|
+
box-shadow: rgba(0, 0, 0, 0.298039) 0px 0px 5px;
|
44
|
+
margin: 0px 3px 5px;
|
45
|
+
}
|
46
|
+
|
47
|
+
.tab-panels .tab-panel {
|
48
|
+
display: none;
|
49
|
+
}
|
50
|
+
|
51
|
+
.tab-panels .tab-panel.active {
|
52
|
+
display: block;
|
53
|
+
}
|
54
|
+
|
55
|
+
ul.tab-list.vertical {
|
56
|
+
float: left;
|
57
|
+
width: 20%;
|
58
|
+
padding-bottom: 3px 0 3px 3px;
|
59
|
+
li[data-panel-target] {
|
60
|
+
float: none;
|
61
|
+
margin: 5px 0;
|
62
|
+
border-radius: 5px 0 0 5px;
|
63
|
+
&:hover {
|
64
|
+
box-shadow: none;
|
65
|
+
color: #658b51;
|
66
|
+
background-color: transparent;
|
67
|
+
}
|
68
|
+
&.active {
|
69
|
+
background-color: transparent;
|
70
|
+
box-shadow: none;
|
71
|
+
font-weight: bold;
|
72
|
+
color: #658b51;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
ul.tab-list.vertical + .tab-panels {
|
78
|
+
position: relative;
|
79
|
+
z-index: 1;
|
80
|
+
float: right;
|
81
|
+
width: 80%;
|
82
|
+
margin: 0;
|
83
|
+
}
|
84
|
+
|
85
|
+
.accordion-headline {
|
86
|
+
display: none;
|
87
|
+
margin: 10px 0 0;
|
88
|
+
cursor: pointer;
|
89
|
+
background: #fff;
|
90
|
+
padding: 10px;
|
91
|
+
border-radius: 5px;
|
92
|
+
box-shadow: 0 0 3px rgba(0,0,0, 0.3);
|
93
|
+
color: #666;
|
94
|
+
&:first-child {
|
95
|
+
margin: 0;
|
96
|
+
}
|
97
|
+
&.active {
|
98
|
+
font-weight: bold;
|
99
|
+
color: #658b51;
|
100
|
+
}
|
101
|
+
&.inactive {
|
102
|
+
color: #aaa !important;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
.scrivito-mobile-view {
|
107
|
+
ul.tab-list {
|
108
|
+
display: none;
|
109
|
+
}
|
110
|
+
|
111
|
+
.accordion-headline {
|
112
|
+
display: block;
|
113
|
+
}
|
114
|
+
|
115
|
+
div.tab-panels {
|
116
|
+
float: none !important;
|
117
|
+
width: 100% !important;
|
118
|
+
background-color: transparent;
|
119
|
+
box-shadow: none;
|
120
|
+
padding: 0;
|
121
|
+
.tab-panel {
|
122
|
+
background-color: #fff;
|
123
|
+
box-shadow: 0 0 3px rgba(0,0,0, 0.3);
|
124
|
+
border-radius: 5px;
|
125
|
+
margin: 10px 0 20px;
|
126
|
+
padding: 10px;
|
127
|
+
}
|
128
|
+
}
|
129
|
+
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scrivito_advanced_editors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scrivito
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -81,6 +81,7 @@ files:
|
|
81
81
|
- app/assets/javascripts/scripts/create_obj.js
|
82
82
|
- app/assets/javascripts/scripts/details_accordion.js
|
83
83
|
- app/assets/javascripts/scripts/multi_select_button.js
|
84
|
+
- app/assets/javascripts/scripts/scrivito_responsive_tab.js
|
84
85
|
- app/assets/javascripts/scripts/scrivito_tabs.js
|
85
86
|
- app/assets/javascripts/scripts/scrivito_toggle_button.js
|
86
87
|
- app/assets/javascripts/scrivito_advanced_editors.js
|
@@ -89,7 +90,7 @@ files:
|
|
89
90
|
- app/assets/stylesheets/scrivito_advanced_editors/color_picker.css
|
90
91
|
- app/assets/stylesheets/scrivito_advanced_editors/create_obj.css
|
91
92
|
- app/assets/stylesheets/scrivito_advanced_editors/scrivito_dialog.css
|
92
|
-
- app/assets/stylesheets/scrivito_advanced_editors/scrivito_tabs.
|
93
|
+
- app/assets/stylesheets/scrivito_advanced_editors/scrivito_tabs.scss
|
93
94
|
- app/assets/stylesheets/scrivito_advanced_editors/scrivito_toggle_button.css
|
94
95
|
- app/assets/stylesheets/scrivito_advanced_editors/textarea_editor.css
|
95
96
|
- app/helpers/scrivito_advanced_editors/scrivito_advanced_tag_helper.rb
|
@@ -113,9 +114,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
113
114
|
version: '0'
|
114
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
116
|
requirements:
|
116
|
-
- - "
|
117
|
+
- - ">"
|
117
118
|
- !ruby/object:Gem::Version
|
118
|
-
version:
|
119
|
+
version: 1.3.1
|
119
120
|
requirements: []
|
120
121
|
rubyforge_project:
|
121
122
|
rubygems_version: 2.4.5
|
@@ -1,53 +0,0 @@
|
|
1
|
-
.tab-list {
|
2
|
-
overflow: hidden;
|
3
|
-
list-style: none;
|
4
|
-
margin: 0;
|
5
|
-
padding: 3px 3px 0 3px;
|
6
|
-
}
|
7
|
-
|
8
|
-
.tab-list li[data-panel-target] {
|
9
|
-
float: left;
|
10
|
-
cursor: pointer;
|
11
|
-
color: #666;
|
12
|
-
padding: 8px 14px;
|
13
|
-
margin: 5px 5px 0 0px;
|
14
|
-
border-radius: 5px 5px 0 0;
|
15
|
-
}
|
16
|
-
|
17
|
-
.tab-list li[data-panel-target]:hover {
|
18
|
-
background: #eee;
|
19
|
-
box-shadow: 0 0 5px rgba(0,0,0,0.2);
|
20
|
-
}
|
21
|
-
|
22
|
-
.tab-list li[data-panel-target].inactive:hover {
|
23
|
-
box-shadow: none;
|
24
|
-
background: transparent;
|
25
|
-
cursor: auto;
|
26
|
-
}
|
27
|
-
|
28
|
-
.tab-list li[data-panel-target].active {
|
29
|
-
background-color: #fff;
|
30
|
-
box-shadow: 0 0 5px rgba(0,0,0,0.2);
|
31
|
-
}
|
32
|
-
|
33
|
-
.tab-list li.inactive {
|
34
|
-
color: #aaa;
|
35
|
-
float: left;
|
36
|
-
padding: 8px;
|
37
|
-
margin: 5px 5px 0 0px;
|
38
|
-
}
|
39
|
-
|
40
|
-
.tab-panels {
|
41
|
-
background-color: white;
|
42
|
-
padding: 11px;
|
43
|
-
box-shadow: rgba(0, 0, 0, 0.298039) 0px 0px 5px;
|
44
|
-
margin: 0px 3px 5px;
|
45
|
-
}
|
46
|
-
|
47
|
-
.tab-panels .tab-panel {
|
48
|
-
display: none;
|
49
|
-
}
|
50
|
-
|
51
|
-
.tab-panels .tab-panel.active {
|
52
|
-
display: block;
|
53
|
-
}
|