PluginProbe ʕ •ᴥ•ʔ
Ocean Extra / 2.5.3
Ocean Extra v2.5.3
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.4.1 1.1.4.2 1.1.5 1.1.5.1 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.0.1 1.2.1 1.2.1.1 1.2.1.2 1.2.10 1.2.2 1.2.2.1 1.2.2.2 1.2.2.3 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.10 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 1.4.14 1.4.15 1.4.16 1.4.17 1.4.18 1.4.19 1.4.2 1.4.20 1.4.21 1.4.22 1.4.23 1.4.24 1.4.25 1.4.26 1.4.27 1.4.28 1.4.29 1.4.3 1.4.30 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.12 1.5.13 1.5.14 1.5.15 1.5.16 1.5.17 1.5.18 1.5.19 1.5.2 1.5.20 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3.0 2.3.1 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6
ocean-extra / includes / metabox / assets / js / metabox.js
ocean-extra / includes / metabox / assets / js Last commit date
metabox.js 5 years ago metabox.min.js 4 years ago
metabox.js
202 lines
1 ( function( $ ) {
2 "use strict";
3
4 $( function() {
5
6 // Show/hide both sidebars options
7 var bothSidebarsField = $( '#butterbean-control-ocean_post_layout select' ),
8 bothSidebarsFieldVal = bothSidebarsField.val(),
9 bothSidebarsSetting = $( '#butterbean-control-ocean_both_sidebars_style, #butterbean-control-ocean_both_sidebars_content_width, #butterbean-control-ocean_both_sidebars_sidebars_width, #butterbean-control-ocean_second_sidebar' );
10
11 bothSidebarsSetting.hide();
12
13 if ( bothSidebarsFieldVal === 'both-sidebars' ) {
14 bothSidebarsSetting.show();
15 }
16
17 bothSidebarsField.change( function () {
18
19 bothSidebarsSetting.hide();
20
21 if ( $( this ).val() == 'both-sidebars' ) {
22 bothSidebarsSetting.show();
23 }
24
25 } );
26
27 // Show/hide header options
28 var headerField = $( '#butterbean-control-ocean_display_header .buttonset-input' ),
29 headerMainSettings = $( '#butterbean-control-ocean_header_style' );
30
31 if ( $( '#butterbean-control-ocean_display_header #butterbean_oceanwp_mb_settings_setting_ocean_display_header_off' ).is( ':checked' ) ) {
32 headerMainSettings.hide();
33 } else {
34 headerMainSettings.show();
35 }
36
37 headerField.change( function () {
38
39 if ( $( this ).val() === 'off' ) {
40 headerMainSettings.hide();
41 } else {
42 headerMainSettings.show();
43 }
44
45 } );
46
47 // Show/hide custom header template field
48 var headerStyleField = $( '#butterbean-control-ocean_header_style select' ),
49 headerStyleFieldVal = headerStyleField.val(),
50 customHeaderSetting = $( '#butterbean-control-ocean_custom_header_template' );
51
52 customHeaderSetting.hide();
53
54 if ( headerStyleFieldVal === 'custom' ) {
55 customHeaderSetting.show();
56 }
57
58 if ( $( '#butterbean-control-ocean_display_header #butterbean_oceanwp_mb_settings_setting_ocean_display_header_off' ).is( ':checked' ) ) {
59 customHeaderSetting.hide();
60 }
61
62 headerField.change( function () {
63
64 if ( $( this ).val() === 'off' ) {
65 customHeaderSetting.hide();
66 } else {
67 var headerStyleFieldVal = headerStyleField.val();
68
69 if ( headerStyleFieldVal === 'custom' ) {
70 customHeaderSetting.show();
71 }
72 }
73
74 } );
75
76 headerStyleField.change( function () {
77
78 customHeaderSetting.hide();
79
80 if ( $( this ).val() == 'custom' ) {
81 customHeaderSetting.show();
82 }
83
84 } );
85
86 // Show/hide left menu for center header style
87 var leftMenuSetting = $( '#butterbean-control-ocean_center_header_left_menu' );
88
89 leftMenuSetting.hide();
90
91 if ( headerStyleFieldVal === 'center' ) {
92 leftMenuSetting.show();
93 }
94
95 if ( $( '#butterbean-control-ocean_display_header #butterbean_oceanwp_mb_settings_setting_ocean_display_header_off' ).is( ':checked' ) ) {
96 leftMenuSetting.hide();
97 }
98
99 headerField.change( function () {
100
101 if ( $( this ).val() === 'off' ) {
102 leftMenuSetting.hide();
103 } else {
104 var headerStyleFieldVal = headerStyleField.val();
105
106 if ( headerStyleFieldVal === 'center' ) {
107 leftMenuSetting.show();
108 }
109 }
110
111 } );
112
113 headerStyleField.change( function () {
114
115 leftMenuSetting.hide();
116
117 if ( $( this ).val() == 'center' ) {
118 leftMenuSetting.show();
119 }
120
121 } );
122
123 // Show/hide title options
124 var titleField = $( '#butterbean-control-ocean_disable_title .buttonset-input' ),
125 titleMainSettings = $( '#butterbean-control-ocean_disable_heading, #butterbean-control-ocean_post_title, #butterbean-control-ocean_post_subheading, #butterbean-control-ocean_post_title_style' ),
126 titleStyleField = $( '#butterbean-control-ocean_post_title_style select' ),
127 titleStyleFieldVal = titleStyleField.val(),
128 pageTitleBgSettings = $( '#butterbean-control-ocean_post_title_background, #butterbean-control-ocean_post_title_bg_image_position, #butterbean-control-ocean_post_title_bg_image_attachment, #butterbean-control-ocean_post_title_bg_image_repeat, #butterbean-control-ocean_post_title_bg_image_size, #butterbean-control-ocean_post_title_height, #butterbean-control-ocean_post_title_bg_overlay, #butterbean-control-ocean_post_title_bg_overlay_color' ),
129 solidColorElements = $( '#butterbean-control-ocean_post_title_background_color' );
130
131 pageTitleBgSettings.hide();
132 solidColorElements.hide();
133
134 if ( titleStyleFieldVal === 'background-image' ) {
135 pageTitleBgSettings.show();
136 } else if ( titleStyleFieldVal === 'solid-color' ) {
137 solidColorElements.show();
138 }
139
140 if ( $( '#butterbean-control-ocean_disable_title #butterbean_oceanwp_mb_settings_setting_ocean_disable_title_on' ).is( ':checked' ) ) {
141 titleMainSettings.hide();
142 pageTitleBgSettings.hide();
143 solidColorElements.hide();
144 } else {
145 titleMainSettings.show();
146 }
147
148 titleField.change( function () {
149
150 if ( $( this ).val() === 'on' ) {
151 titleMainSettings.hide();
152 pageTitleBgSettings.hide();
153 solidColorElements.hide();
154 } else {
155 titleMainSettings.show();
156 var titleStyleFieldVal = titleStyleField.val();
157
158 if ( titleStyleFieldVal === 'background-image' ) {
159 pageTitleBgSettings.show();
160 } else if ( titleStyleFieldVal === 'solid-color' ) {
161 solidColorElements.show();
162 }
163 }
164
165 } );
166
167 titleStyleField.change( function () {
168
169 pageTitleBgSettings.hide();
170 solidColorElements.hide();
171
172 if ( $( this ).val() == 'background-image' ) {
173 pageTitleBgSettings.show();
174 } else if ( $( this ).val() === 'solid-color' ) {
175 solidColorElements.show();
176 }
177
178 } );
179
180 // Show/hide breadcrumbs options
181 var breadcrumbsField = $( '#butterbean-control-ocean_disable_breadcrumbs .buttonset-input' ),
182 breadcrumbsSettings = $( '#butterbean-control-ocean_breadcrumbs_color, #butterbean-control-ocean_breadcrumbs_separator_color, #butterbean-control-ocean_breadcrumbs_links_color, #butterbean-control-ocean_breadcrumbs_links_hover_color' );
183
184 if ( $( '#butterbean-control-ocean_disable_breadcrumbs #butterbean_oceanwp_mb_settings_setting_ocean_disable_breadcrumbs_off' ).is( ':checked' ) ) {
185 breadcrumbsSettings.hide();
186 } else {
187 breadcrumbsSettings.show();
188 }
189
190 breadcrumbsField.change( function () {
191
192 if ( $( this ).val() === 'off' ) {
193 breadcrumbsSettings.hide();
194 } else {
195 breadcrumbsSettings.show();
196 }
197
198 } );
199
200 } );
201
202 } ) ( jQuery );