Admin Columns - Version 2.5.2

Version Description

  • [Fixed] Fixes an issue where some of the WordPress default columns did not display correctly
Download this release

Release Info

Developer tschutter
Plugin Icon 128x128 Admin Columns
Version 2.5.2
Comparing to
See all releases

Code changes from version 2.4.10 to 2.5.2

Files changed (67) hide show
  1. api.php +0 -37
  2. assets/css/admin-column.css +140 -38
  3. assets/css/admin-column.min.css +1 -1
  4. assets/css/column.css +24 -1
  5. assets/css/column.min.css +1 -1
  6. assets/images/switch_bw.png +0 -0
  7. assets/js/admin-settings.js +365 -265
  8. assets/js/admin-settings.min.js +1 -1
  9. classes/column.php +78 -78
  10. classes/column/actions.php +22 -19
  11. classes/column/comment/approved.php +5 -3
  12. classes/column/comment/status.php +50 -0
  13. classes/column/comment/type.php +4 -2
  14. classes/column/custom-field.php +11 -10
  15. classes/column/default.php +3 -4
  16. classes/column/media/actions.php +4 -0
  17. classes/column/media/description.php +3 -4
  18. classes/column/media/dimensions.php +3 -2
  19. classes/column/media/full-path.php +8 -10
  20. classes/column/media/height.php +8 -17
  21. classes/column/media/width.php +7 -17
  22. classes/column/post/actions.php +17 -12
  23. classes/column/post/attachment-count.php +11 -24
  24. classes/column/post/author-name.php +11 -16
  25. classes/column/post/comment-count.php +2 -10
  26. classes/column/post/comment-status.php +7 -11
  27. classes/column/post/depth.php +1 -6
  28. classes/column/post/estimated-reading-time.php +14 -22
  29. classes/column/post/featured-image.php +8 -12
  30. classes/column/post/formats.php +4 -11
  31. classes/column/post/order.php +1 -3
  32. classes/column/post/page-template.php +4 -11
  33. classes/column/post/parent.php +7 -9
  34. classes/column/post/ping-status.php +7 -11
  35. classes/column/post/shortcodes.php +24 -6
  36. classes/column/post/sticky.php +5 -18
  37. classes/column/post/word-count.php +3 -10
  38. classes/column/used-by-menu.php +5 -9
  39. classes/column/user/ID.php +3 -6
  40. classes/column/user/actions.php +16 -9
  41. classes/column/user/comment-count.php +4 -7
  42. classes/column/user/description.php +3 -8
  43. classes/column/user/display-name.php +0 -4
  44. classes/column/user/first-name.php +3 -6
  45. classes/column/user/last-name.php +3 -6
  46. classes/column/user/nickname.php +4 -6
  47. classes/column/user/post-count.php +15 -16
  48. classes/column/user/registered.php +3 -6
  49. classes/column/user/rich-editing.php +4 -17
  50. classes/column/user/url.php +3 -6
  51. classes/column/wc-placeholder.php +7 -8
  52. classes/settings.php +246 -126
  53. classes/storage_model.php +537 -323
  54. classes/storage_model/comment.php +10 -2
  55. classes/storage_model/link.php +7 -8
  56. classes/storage_model/media.php +30 -9
  57. classes/storage_model/post.php +14 -2
  58. classes/storage_model/user.php +10 -1
  59. classes/third_party.php +1 -4
  60. classes/third_party/all-in-seo.php +0 -13
  61. classes/third_party/bbpress.php +0 -21
  62. classes/third_party/wpml.php +23 -35
  63. classes/third_party/yoast_seo.php +0 -40
  64. classes/utility.php +28 -13
  65. codepress-admin-columns.php +116 -147
  66. languages/codepress-admin-columns.pot +359 -319
  67. readme.txt +51 -1
api.php DELETED
@@ -1,37 +0,0 @@
1
- <?php
2
- /**
3
- * If you like to register a column of your own please have a look at our documentation.
4
- * We also have a free start-kit available, which contains all the necessary files.
5
- *
6
- * Documentation: https://www.admincolumns.com/documentation/developer-docs/creating-new-column-type/
7
- * Starter-kit: https://github.com/codepress/cac-column-template/
8
- *
9
- */
10
-
11
- /**
12
- * Manually set the columns for a storage model
13
- * This overrides the database settings and thus renders the settings screen for this storage model useless
14
- *
15
- * @since 2.2
16
- *
17
- * @param string $storage_model Storage model key
18
- * @param array $columns List of columns ([column_name] => [column_options])
19
- */
20
- function ac_register_columns( $storage_model, $columns ) {
21
- global $cpac;
22
-
23
- $storage_models = (array) $storage_model;
24
-
25
- foreach ( $storage_models as $storage_model ) {
26
- if ( isset( $cpac->exported_columns[ $storage_model ] ) ) {
27
- $cpac->exported_columns[ $storage_model ] = array_merge( $cpac->exported_columns[ $storage_model ], $columns );
28
- }
29
- else {
30
- $cpac->exported_columns[ $storage_model ] = $columns;
31
- }
32
- }
33
- }
34
-
35
- function cpac_set_storage_model_columns( $storage_model, $columns ) {
36
- ac_register_columns( $storage_model, $columns );
37
- }
assets/css/admin-column.css CHANGED
@@ -64,6 +64,9 @@ a.help {
64
.cpac_message.error.warning {
65
border-left: 4px solid #ffba00;
66
}
67
/**
68
* Icons
69
* ----------------------------------------------------------------------------
@@ -129,6 +132,15 @@ a.help {
129
font-weight: bold;
130
min-width: 100px;
131
}
132
/**
133
* Structure
134
* ----------------------------------------------------------------------------
@@ -141,16 +153,35 @@ a.help {
141
float: left;
142
width: 100%;
143
}
144
.columns-container .columns-right {
145
float: right;
146
margin-right: -300px;
147
width: 280px;
148
}
149
.columns-container .columns-right .columns-right-inside.fixed {
150
- position: fixed;
151
- top: 40px;
152
width: 280px;
153
}
154
/**
155
* UI Sortable Plugin
156
* ----------------------------------------------------------------------------
@@ -176,12 +207,65 @@ a.help {
176
.cpac-placeholder :first-child {
177
border: none;
178
}
179
/**
180
* Columns
181
* ----------------------------------------------------------------------------
182
*/
183
.columns-left .cpac-boxes .cpac-columns form {
184
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
185
}
186
/**
187
* Column
@@ -275,6 +359,9 @@ a.help {
275
cursor: auto;
276
color: #737373;
277
}
278
.cpac-column .column-meta table tr td.column_label span.vers {
279
float: left;
280
}
@@ -461,10 +548,10 @@ a.help {
461
font-size: 12px;
462
}
463
.cpac-column .column-form table tr.column_width .input div.width-slider {
464
- margin-left: 60px;
465
- margin-right: 100px;
466
position: relative;
467
- margin-top: 4px;
468
}
469
.cpac-column .column-form table tr.column_width .input div.width-slider .ui-slider-handle {
470
cursor: ew-resize;
@@ -510,6 +597,7 @@ a.help {
510
width: 40px !important;
511
}
512
.cpac-column .column-form table tr.column_action td {
513
background: #f9f9f9;
514
}
515
.cpac-column .column-form table tr.column_action td p {
@@ -613,6 +701,7 @@ a.help {
613
.column-footer .button-container a {
614
display: inline-block;
615
margin-top: 5px;
616
}
617
/**
618
* Welcome Screen
@@ -693,9 +782,6 @@ a.help {
693
* Sidebar
694
* ----------------------------------------------------------------------------
695
*/
696
- .columns-right {
697
- margin-top: 54px;
698
- }
699
.columns-right .sidebox {
700
background: none repeat scroll 0 0 #FFFFFF;
701
border: 1px solid #E1E1E1;
@@ -707,6 +793,7 @@ a.help {
707
.columns-right .sidebox h3 {
708
padding: 10px;
709
margin: 0;
710
}
711
.columns-right .sidebox h3.title {
712
font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
@@ -728,33 +815,63 @@ a.help {
728
border-bottom-style: solid;
729
border-bottom-width: 1px;
730
}
731
.columns-right .sidebox .inside {
732
padding: 10px;
733
}
734
.columns-right .sidebox .inside p {
735
margin-top: 0;
736
}
737
- .columns-right .sidebox#form-actions .form-reset {
738
border-bottom: 1px solid #F5F5F5;
739
padding: 8px;
740
}
741
- .columns-right .sidebox#form-actions .reset-column-type {
742
text-decoration: none;
743
color: #BC0B0B;
744
line-height: 25px;
745
display: inline-block;
746
}
747
- .columns-right .sidebox#form-actions .form-update {
748
padding: 8px;
749
overflow: hidden;
750
}
751
- .columns-right .sidebox#form-actions .submit-update {
752
- display: block;
753
width: 100%;
754
height: 28px;
755
line-height: 28px;
756
text-align: center;
757
}
758
.columns-right .sidebox#pro-version .cta {
759
background: transparent url(../images/get_the_addon.png) no-repeat 0 0;
760
background-size: cover;
@@ -838,6 +955,7 @@ a.help {
838
height: 120px;
839
}
840
.columns-right .sidebox#direct-feedback .inside form input[type="submit"] {
841
float: right;
842
border-radius: 4px;
843
border: 1px solid #CCC;
@@ -848,7 +966,6 @@ a.help {
848
font-size: 12px;
849
padding: 0 32px;
850
color: #CCC;
851
- display: inline-block;
852
background: none;
853
text-decoration: none;
854
cursor: pointer;
@@ -905,25 +1022,6 @@ table.cpac-form-table > tbody > tr > th {
905
table.cpac-form-table td.padding-22 {
906
padding-top: 22px;
907
}
908
- table.cpac-form-table td .cpac_export .ms-container {
909
- background: transparent url('../images/switch_bw.png') no-repeat 50% 50%;
910
- }
911
- table.cpac-form-table td .cpac_export .ms-container .ms-selectable {
912
- width: 48%;
913
- margin-right: 0;
914
- }
915
- table.cpac-form-table td .cpac_export .ms-container .ms-selection {
916
- float: right;
917
- width: 48%;
918
- }
919
- table.cpac-form-table td .cpac_export .ms-container ul.ms-list {
920
- width: 100%;
921
- }
922
- table.cpac-form-table td .cpac_export .ms-container ul.ms-list li {
923
- margin: 0;
924
- padding-top: 5px;
925
- padding-bottom: 5px;
926
- }
927
table.cpac-form-table.settings tr td {
928
padding-top: 74px;
929
}
@@ -947,6 +1045,9 @@ table.cpac-form-table.settings tr:first-child td {
947
.wp-pointer-right {
948
margin-right: 15px;
949
}
950
/* =RTL language
951
-------------------------------------------------------------- */
952
body.rtl .wp-pointer-right {
@@ -1023,6 +1124,9 @@ body.rtl .columns-left .column-footer .order-message {
1023
body.rtl .columns-left .column-footer .button-container {
1024
float: left;
1025
}
1026
body.rtl .columns-right {
1027
float: left;
1028
margin-left: -300px;
@@ -1040,6 +1144,9 @@ body.rtl .cpac_export .ms-container .ms-selection {
1040
.columns-container {
1041
margin-right: 0;
1042
}
1043
.columns-container .columns-left {
1044
float: none;
1045
}
@@ -1049,11 +1156,6 @@ body.rtl .cpac_export .ms-container .ms-selection {
1049
margin-right: 0;
1050
width: 100%;
1051
}
1052
- .columns-container .columns-right .columns-right-inside.fixed {
1053
- position: relative;
1054
- top: 0;
1055
- width: 100%;
1056
- }
1057
}
1058
/* =Addons
1059
-------------------------------------------------------------- */
64
.cpac_message.error.warning {
65
border-left: 4px solid #ffba00;
66
}
67
+ .ajax-message {
68
+ display: none;
69
+ }
70
/**
71
* Icons
72
* ----------------------------------------------------------------------------
132
font-weight: bold;
133
min-width: 100px;
134
}
135
+ .cpac-menu label {
136
+ font-weight: bold;
137
+ margin-right: 5px;
138
+ }
139
+ .cpac-menu .spinner {
140
+ float: none;
141
+ margin-top: 0;
142
+ margin-left: 0;
143
+ }
144
/**
145
* Structure
146
* ----------------------------------------------------------------------------
153
float: left;
154
width: 100%;
155
}
156
+ .columns-container .columns-left .column-footer .submit.save {
157
+ display: inline-block;
158
+ }
159
+ .columns-container .columns-left .column-footer .submit.update {
160
+ display: none;
161
+ }
162
.columns-container .columns-right {
163
float: right;
164
margin-right: -300px;
165
width: 280px;
166
}
167
.columns-container .columns-right .columns-right-inside.fixed {
168
width: 280px;
169
}
170
+ .columns-container.stored .columns-right .sidebox.form-actions .submit.save {
171
+ display: none;
172
+ }
173
+ .columns-container.stored .columns-right .sidebox.form-actions .submit.update {
174
+ display: block;
175
+ }
176
+ .columns-container.stored .columns-right .sidebox.form-actions .form-reset {
177
+ display: block;
178
+ }
179
+ .columns-container.stored .column-footer .submit.save {
180
+ display: none;
181
+ }
182
+ .columns-container.stored .column-footer .submit.update {
183
+ display: inline-block;
184
+ }
185
/**
186
* UI Sortable Plugin
187
* ----------------------------------------------------------------------------
207
.cpac-placeholder :first-child {
208
border: none;
209
}
210
+ .menu {
211
+ position: relative;
212
+ margin-bottom: 16px;
213
+ }
214
+ .menu select {
215
+ display: inline-block;
216
+ margin: 0;
217
+ }
218
+ .menu .spinner {
219
+ display: none;
220
+ float: none;
221
+ visibility: visible;
222
+ margin: 0 0 0 14px;
223
+ }
224
+ .menu .view-link,
225
+ .menu .view-link:active {
226
+ display: inline-block;
227
+ margin: 0 0 0 12px;
228
+ top: 2px;
229
+ }
230
/**
231
* Columns
232
* ----------------------------------------------------------------------------
233
*/
234
+ .columns-left .cpac-notice {
235
+ background: #fff;
236
+ border-left: 4px solid #ffba00;
237
+ -webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
238
+ box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
239
+ margin-bottom: 15px;
240
+ padding: 1px 12px;
241
+ }
242
.columns-left .cpac-boxes .cpac-columns form {
243
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
244
+ margin: 0;
245
+ }
246
+ .columns-left .cpac-boxes.disabled {
247
+ opacity: 0.7;
248
+ }
249
+ .columns-left .cpac-boxes.disabled a.edit-button,
250
+ .columns-left .cpac-boxes.disabled a.remove-button,
251
+ .columns-left .cpac-boxes.disabled a.clone-button,
252
+ .columns-left .cpac-boxes.disabled .column_action {
253
+ display: none !important;
254
+ }
255
+ .columns-left .cpac-boxes.disabled .column-meta td.column_sort {
256
+ display: none;
257
+ }
258
+ .columns-left .cpac-boxes.disabled .meta span {
259
+ cursor: default !important;
260
+ }
261
+ .columns-left .cpac-boxes.disabled .meta span:before {
262
+ color: #808080 !important;
263
+ }
264
+ .columns-left .cpac-boxes.disabled .meta span.off {
265
+ opacity: 0.5;
266
+ }
267
+ .columns-left .cpac-boxes.disabled .column-footer {
268
+ display: none;
269
}
270
/**
271
* Column
359
cursor: auto;
360
color: #737373;
361
}
362
+ .cpac-column .column-meta table tr td.column_label .inner .meta span.disabled {
363
+ cursor: default;
364
+ }
365
.cpac-column .column-meta table tr td.column_label span.vers {
366
float: left;
367
}
548
font-size: 12px;
549
}
550
.cpac-column .column-form table tr.column_width .input div.width-slider {
551
+ margin-left: 68px;
552
+ margin-right: 90px;
553
position: relative;
554
+ margin-top: 5px;
555
}
556
.cpac-column .column-form table tr.column_width .input div.width-slider .ui-slider-handle {
557
cursor: ew-resize;
597
width: 40px !important;
598
}
599
.cpac-column .column-form table tr.column_action td {
600
+ border-top: 1px solid #ebebeb;
601
background: #f9f9f9;
602
}
603
.cpac-column .column-form table tr.column_action td p {
701
.column-footer .button-container a {
702
display: inline-block;
703
margin-top: 5px;
704
+ margin-left: 5px;
705
}
706
/**
707
* Welcome Screen
782
* Sidebar
783
* ----------------------------------------------------------------------------
784
*/
785
.columns-right .sidebox {
786
background: none repeat scroll 0 0 #FFFFFF;
787
border: 1px solid #E1E1E1;
793
.columns-right .sidebox h3 {
794
padding: 10px;
795
margin: 0;
796
+ position: relative;
797
}
798
.columns-right .sidebox h3.title {
799
font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
815
border-bottom-style: solid;
816
border-bottom-width: 1px;
817
}
818
+ .columns-right .sidebox h3 span.left {
819
+ position: relative;
820
+ background: #fff;
821
+ z-index: 2;
822
+ padding-right: 8px;
823
+ }
824
+ .columns-right .sidebox h3 span.right {
825
+ position: absolute;
826
+ display: inline-block;
827
+ line-height: 20px;
828
+ z-index: 1;
829
+ right: 10px;
830
+ font-size: 12px;
831
+ text-transform: uppercase;
832
+ color: #808080;
833
+ text-align: right;
834
+ }
835
.columns-right .sidebox .inside {
836
padding: 10px;
837
}
838
.columns-right .sidebox .inside p {
839
margin-top: 0;
840
}
841
+ .columns-right .sidebox.form-actions .form-reset {
842
+ display: none;
843
border-bottom: 1px solid #F5F5F5;
844
padding: 8px;
845
}
846
+ .columns-right .sidebox.form-actions .reset-column-type {
847
text-decoration: none;
848
color: #BC0B0B;
849
line-height: 25px;
850
display: inline-block;
851
+ background: none;
852
+ border: none;
853
+ padding: 0;
854
+ font-size: 13px;
855
+ cursor: pointer;
856
+ margin: 0;
857
}
858
+ .columns-right .sidebox.form-actions .reset-column-type:hover {
859
+ color: #f00;
860
+ }
861
+ .columns-right .sidebox.form-actions .form-update {
862
padding: 8px;
863
overflow: hidden;
864
}
865
+ .columns-right .sidebox.form-actions .submit {
866
+ display: none;
867
width: 100%;
868
height: 28px;
869
line-height: 28px;
870
text-align: center;
871
}
872
+ .columns-right .sidebox.form-actions .submit.save {
873
+ display: block;
874
+ }
875
.columns-right .sidebox#pro-version .cta {
876
background: transparent url(../images/get_the_addon.png) no-repeat 0 0;
877
background-size: cover;
955
height: 120px;
956
}
957
.columns-right .sidebox#direct-feedback .inside form input[type="submit"] {
958
+ display: inline-block;
959
float: right;
960
border-radius: 4px;
961
border: 1px solid #CCC;
966
font-size: 12px;
967
padding: 0 32px;
968
color: #CCC;
969
background: none;
970
text-decoration: none;
971
cursor: pointer;
1022
table.cpac-form-table td.padding-22 {
1023
padding-top: 22px;
1024
}
1025
table.cpac-form-table.settings tr td {
1026
padding-top: 74px;
1027
}
1045
.wp-pointer-right {
1046
margin-right: 15px;
1047
}
1048
+ .wp-pointer.noclick .wp-pointer-buttons {
1049
+ display: none;
1050
+ }
1051
/* =RTL language
1052
-------------------------------------------------------------- */
1053
body.rtl .wp-pointer-right {
1124
body.rtl .columns-left .column-footer .button-container {
1125
float: left;
1126
}
1127
+ body.rtl .columns-left .column-footer .submit {
1128
+ display: none;
1129
+ }
1130
body.rtl .columns-right {
1131
float: left;
1132
margin-left: -300px;
1144
.columns-container {
1145
margin-right: 0;
1146
}
1147
+ .columns-container .menu {
1148
+ float: none;
1149
+ }
1150
.columns-container .columns-left {
1151
float: none;
1152
}
1156
margin-right: 0;
1157
width: 100%;
1158
}
1159
}
1160
/* =Addons
1161
-------------------------------------------------------------- */
assets/css/admin-column.min.css CHANGED
@@ -1 +1 @@
1
- .button.loading span,.cpac-column .comment-grey-bubble,.icon-no,.icon-yes,a.help{height:16px;width:16px}#cpac a:active,#cpac a:focus{outline:0}#cpac h2.cpac-nav-tab-wrapper{margin-bottom:10px}#icon-codepress-admin-columns{background:url(../images/icon.png) no-repeat}.cpac-settings-link{float:right;margin:12px 14px 5px 0;background:url(../images/settings.png) no-repeat;padding-left:20px;text-decoration:none;display:inline-block;line-height:16px}.cpac-settings-link.current{font-weight:700}.rtl .cpac-settings-link{float:left;margin:12px 0 5px 14px;padding-right:20px;padding-left:0}a.help{background:url(../images/help.png) no-repeat;display:inline-block}.button.loading{padding-right:25px;position:relative}.rtl .button.loading{padding-left:25px;padding-right:0}.button.loading span{position:absolute;top:2px;right:6px;background:url(../images/loading.gif) right 50% no-repeat;display:inline-block}.icon-no,.icon-yes{display:inline-block;position:relative}.rtl .button.loading span{left:6px;right:auto}.cpac_message.error.warning{border-left:4px solid #ffba00}.icon-yes{background:url(../images/yes.png) no-repeat;top:2px}.icon-no{background:url(../images/no.png) no-repeat;top:2px}.cpac-column .comment-grey-bubble:before{content:'\f101';font:400 20px/.5 dashicons;speak:none;display:inline-block;padding:0;top:4px;left:0;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.rtl .cpac-column .comment-grey-bubble:before{right:0;left:auto}.cpac-menu{clear:both;overflow:hidden;margin-bottom:10px}.cpac-menu .subsubsub{white-space:normal;width:100%;margin:0 14px 0 0}.cpac-menu .subsubsub li.first{font-weight:700;min-width:100px}.columns-container{margin-right:300px;max-width:700px}.columns-container .columns-left{float:left;width:100%}.columns-container .columns-right{float:right;margin-right:-300px;width:280px}.columns-container .columns-right .columns-right-inside.fixed{position:fixed;top:40px;width:280px}.ui-sortable-helper{-webkit-box-shadow:1px 3px 6px 0 rgba(1,1,1,.4);box-shadow:1px 3px 6px 0 rgba(1,1,1,.4)}.columns-left .cpac-boxes .cpac-columns form,.columns-right .sidebox{box-shadow:0 1px 3px rgba(0,0,0,.1)}.ui-sortable-helper .column-meta{border-width:1px}.cpac-placeholder{visibility:visible!important;border-top:1px solid #dfdfdf;padding:5px 4px 7px 0}.cpac-placeholder .inner-placeholder{border:1px dashed grey;background:#eee;width:100%;height:100%}.cpac-placeholder :first-child{border:none}.cpac-column .column-meta{border-style:solid;border-color:#dfdfdf;border-width:1px 1px 0;background:#fcfcfc}.cpac-column .column-meta:nth-child(2n) .column-meta{background:#f9f9f9}.cpac-column .column-meta img{margin-right:3px}.cpac-column .column-meta table{border:none;background:0 0;border-radius:0}.cpac-column .column-meta table tr td{vertical-align:top;height:18px;border:none solid transparent;padding:11px 8px;border-width:1px 0 0}.cpac-column .column-meta table tr td.column_sort{width:10px;background:url(../images/drag.png) 8px 8px no-repeat;cursor:move}.cpac-column .column-meta table tr td.column_label{width:70%;font-weight:700;vertical-align:middle;position:relative}.cpac-column .column-meta table tr td.column_label .inner{position:relative;overflow:hidden;height:18px}.cpac-column .column-meta table tr td.column_label .inner>a{color:#5a5a5a;padding:0 4px}.cpac-column .column-meta table tr td.column_label .inner>a:hover{color:#333}.cpac-column .column-meta table tr td.column_label .inner>a.clone-button,.cpac-column .column-meta table tr td.column_label .inner>a.edit-button,.cpac-column .column-meta table tr td.column_label .inner>a.remove-button{display:none;color:#a00;text-decoration:none;text-shadow:none;font-weight:400;margin-left:5px;font-size:12px}.cpac-column .column-meta table tr td.column_label .inner>a.clone-button:hover,.cpac-column .column-meta table tr td.column_label .inner>a.edit-button:hover,.cpac-column .column-meta table tr td.column_label .inner>a.remove-button:hover{color:red}.cpac-column .column-meta table tr td.column_label .inner>a.clone-button,.cpac-column .column-meta table tr td.column_label .inner>a.edit-button{color:#0074a2}.cpac-column .column-meta table tr td.column_label .inner>a.clone-button:hover,.cpac-column .column-meta table tr td.column_label .inner>a.edit-button:hover{color:#2ea2cc}.cpac-column .column-meta table tr td.column_label .inner .meta{display:inline-block;float:right;font-weight:400;color:#b2b2b2;font-size:12px}.cpac-column .column-meta table tr td.column_label .inner .meta span{cursor:pointer}.cpac-column .column-meta table tr td.column_label .inner .meta span.width{margin-right:5px;cursor:auto;color:#737373}.cpac-column .column-meta table tr td.column_label span.vers{float:left}.cpac-column .column-meta table tr td.column_type{width:auto;min-width:120px;text-align:right;vertical-align:middle;color:#999;padding-right:0}.cpac-column .column-meta table tr td.column_type .inner{height:18px;overflow:hidden}.cpac-column .column-meta table tr td.column_type .inner a{color:#999}.cpac-column .column-meta table tr td.column_edit{width:38px;min-width:38px;background:url(../images/arrow.png) 23px 18px no-repeat;cursor:pointer}.cpac-column .column-meta:hover .column_label .inner>a.clone-button,.cpac-column .column-meta:hover .column_label .inner>a.edit-button,.cpac-column .column-meta:hover .column_label .inner>a.remove-button{display:inline-block}.cpac-column .column-meta span.vers{padding-top:2px}.cpac-column .column-meta span.vers .comment-grey-bubble{float:right}.cpac-column .column-form{display:none;border-width:1px 1px 0;border-style:solid;border-color:#dfdfdf;position:relative}.cpac-column .column-form table{border:none;background:#fcfcfc}.cpac-column .column-form table tr.hide{display:none}.cpac-column .column-form table tr td{vertical-align:top;border:none;padding:8px;background:#fff;border-top:1px solid #F5F5F5}.cpac-column .column-form table tr td input[type=text],.cpac-column .column-form table tr td select{width:99.95%}.cpac-column .column-form table tr td input[type=text].small,.cpac-column .column-form table tr td select.small{width:100px}.cpac-column .column-form table tr td span.suffix{line-height:40px;color:grey}.cpac-column .column-form table tr td select optgroup:nth-child(2n){background:#F9F9F9}.cpac-column .column-form table tr td.label{position:relative;overflow:visible;background:#f5f5f5;border-right:1px solid #E1E1E1;vertical-align:top;width:34%;border-top:1px solid #F0F0F0}.column-footer,.wp-pointer-content{overflow:hidden}.cpac-column .column-form table tr td.label label{font-weight:700;color:#333;display:block;position:relative}.cpac-column .column-form table tr td.label p{color:#666;display:block;font-size:12px;font-style:normal;line-height:16px;margin:0!important}.cpac-column .column-form table tr td.label p.description{display:none;position:absolute;z-index:99;top:30px;left:0;background:#eaf2fa;border-radius:5px;border:1px solid #c7d7e2;padding:5px 8px!important;font-weight:400}.cpac-column .column-form table tr td.label p.description em{display:block;color:#999}.cpac-column .column-form table tr td.label .info{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.cpac-column .column-form table tr td.label .info:before{position:absolute;z-index:1;right:10px;top:50%;margin-top:-7px;content:'';display:block;border-radius:32px;border:1px solid #E6E6E6;width:12px;height:12px}.cpac-column .column-form table tr td.label .info:after{position:absolute;z-index:1;right:10px;top:50%;margin-top:-6px;content:'?';display:block;width:14px;height:14px;color:#E6E6E6;font:700 10px Arial;text-align:center;vertical-align:middle;line-height:14px}.cpac-column .column-form table tr td.input label{padding-left:10px;padding-right:0}.cpac-column .column-form table tr td.input div.msg{margin-top:5px;display:none;color:#333;padding:6px 8px;background-color:#ffebe8;border:1px solid #fff;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.cpac-column .column-form table tr td.input .section{padding:12px}.cpac-column .column-form table tr.column_width .input{position:relative}.cpac-column .column-form table tr.column_width .input div.description{font-size:11px;width:54px;position:absolute;left:10px;text-align:middle}.cpac-column .column-form table tr.column_width .input div.description input{background:#efefef;border:none;height:20px;line-height:20px;text-align:right;width:36px;font-size:12px}.cpac-column .column-form table tr.column_width .input div.width-slider{margin-left:60px;margin-right:100px;position:relative;margin-top:4px}.cpac-column .column-form table tr.column_width .input div.width-slider .ui-slider-handle{cursor:ew-resize}.cpac-column .column-form table tr.column_width .input div.unit-select{position:absolute;top:8px;right:10px;width:90px;text-align:right}.cpac-column .column-form table tr.column_width .input div.unit-select label{padding-left:5px}.cpac-column .column-form table tr.column_image_size{border:10px solid red}.cpac-column .column-form table tr.column_image_size td.input label.custom-size{display:inline-block;margin-top:4px;margin-bottom:4px}.cpac-column .column-form table tr.column_image_size td.input label.custom-size input{margin-right:3px}.cpac-column .column-form table tr.column_image_size td.input .custom_image_size{display:inline-block}.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-h.hidden,.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-w.hidden,.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .hidden{display:none}.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-h,.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-w{margin:0}.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-h input[type=text],.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-w input[type=text]{margin-right:3px;width:40px!important}.cpac-column .column-form table tr.column_action td{background:#f9f9f9}.cpac-column .column-form table tr.column_action td p{margin:0}.cpac-column .column-form table tr.column_action td p a.remove-button{color:#a00;text-decoration:none;text-shadow:none;font-weight:400;margin-left:5px;font-size:12px;padding:0 5px}.cpac-column .column-form table tr.column_action td p a.remove-button:hover{color:#fff;background:red}.cpac-column .column-form table tr:first-child td{border-top:none}.cpac-column.loading .column-form>.spinner{position:absolute;left:50%;top:50%;z-index:200;margin-left:-10px;margin-top:-10px;display:block}.cpac-column.loading .column-form:before{content:'';position:absolute;width:100%;height:100%;background:#FFF;z-index:100;opacity:.5}.cpac-column.opened .column-meta{background-color:#c7c7c7;background-image:-ms-linear-gradient(top,#e9e9e9,#c7c7c7);background-image:-moz-linear-gradient(top,#e9e9e9,#c7c7c7);background-image:-o-linear-gradient(top,#e9e9e9,#c7c7c7);background-image:-webkit-gradient(linear,left top,left bottom,from(#e9e9e9),to(#c7c7c7));background-image:-webkit-linear-gradient(top,#e9e9e9,#c7c7c7);background-image:linear-gradient(top,#e9e9e9,#c7c7c7);border-color:#aeaeae}.cpac-column.opened .column-meta table{background:0 0}.cpac-column.opened .column-meta table td{border-color:#f8f8f8;color:#333;text-shadow:0 1px 0 #FFF}.cpac-column.opened .column-meta table td a{color:#333;text-shadow:0 1px 0 #FFF}.cpac-column.opened .column-meta table td.column_sort{background-position:8px -39px}.cpac-column.opened .column-meta table td.column_label .inner .meta span{color:grey;text-shadow:none}.cpac-column.opened .column-meta table td.column_type{color:#5C5C5C}.column-footer{background:#EAF2FA;border:1px solid #c7d7e2;min-height:26px;padding:8px}.column-footer .order-message{background:url(../images/order_arrow.png) no-repeat;color:#7A9BBE;float:left;font-family:Comic Sans MS,sans-serif;font-size:11px;height:13px;line-height:1em;margin-left:4px;padding:7px 0 0 22px;text-shadow:0 1px 0 #FFF;display:inline-block}.column-footer .button-container{float:right;display:inline-block;margin-top:-5px}.column-footer .button-container a{display:inline-block;margin-top:5px}.cpac-content-body hr{-moz-border-bottom-colors:none;-moz-border-left-colors:none;-moz-border-right-colors:none;-moz-border-top-colors:none;background:none;border-color:#DFDFDF -moz-use-text-color -moz-use-text-color;border-image:none;border-right:0 none;border-style:solid none none;border-width:1px 0 0;clear:both;margin:30px 0;opacity:.2}#cpac-welcome.about-wrap div.error{display:block!important}.cpac-alert{display:inline-block;background:#FCF8E3;border:1px solid #FBEED5;border-radius:4px;color:#C09853;margin:20px 0;padding:16px 14px;text-shadow:0 1px 0 rgba(255,255,255,.5)}.cpac-alert p{margin:0}.cpac-alert.cpac-alert-success{background-color:#DFF0D8;border-color:#D6E9C6;color:#468847}.cpac-alert.cpac-alert-error{background-color:#F2DEDE;border-color:#EED3D7;color:#B94A48}.cpac-alert a.button-primary{height:28px;line-height:28px;display:inline-block}#cpac-download-add-ons-table{max-width:600px}.wp-core-ui .button-large{height:40px;line-height:40px;font-size:16px;padding:0 15px;text-shadow:0 1px 0 rgba(0,0,0,.5)}.cac-notification.updated{border-left-color:#0071aa}.cac-notification.updated .learnmore{float:right}.cac-notification.updated .learnmore:after{content:"\f139";font:400 20px/1 dashicons;float:right}.columns-right{margin-top:54px}.columns-right .sidebox{background:#FFF;border:1px solid #E1E1E1;border-radius:0;position:relative;margin-bottom:14px}.columns-right .sidebox h3{padding:10px;margin:0}.columns-right .sidebox h3.title{font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-size:15px;font-weight:400;line-height:1;margin:0;padding:7px 10px;background:#f1f1f1;background-image:-webkit-gradient(linear,left bottom,left top,from(#ececec),to(#f9f9f9));background-image:-webkit-linear-gradient(bottom,#ececec,#f9f9f9);background-image:-moz-linear-gradient(bottom,#ececec,#f9f9f9);background-image:-o-linear-gradient(bottom,#ececec,#f9f9f9);background-image:linear-gradient(to top,#ececec,#f9f9f9);border-bottom-color:#dfdfdf;text-shadow:#fff 0 1px 0;-webkit-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff;border-bottom-style:solid;border-bottom-width:1px}.columns-right .sidebox .inside{padding:10px}.columns-right .sidebox .inside p{margin-top:0}.columns-right .sidebox#form-actions .form-reset{border-bottom:1px solid #F5F5F5;padding:8px}.columns-right .sidebox#form-actions .reset-column-type{text-decoration:none;color:#BC0B0B;line-height:25px;display:inline-block}.columns-right .sidebox#form-actions .form-update{padding:8px;overflow:hidden}.columns-right .sidebox#form-actions .submit-update{display:block;width:100%;height:28px;line-height:28px;text-align:center}.columns-right .sidebox#pro-version .cta{background:url(../images/get_the_addon.png) no-repeat;background-size:cover}.columns-right .sidebox#pro-version .padding-box{padding:8px 15px 0}.columns-right .sidebox#pro-version h3 a{color:#fff;font-size:19px;text-decoration:none;font-weight:400;margin-top:6px}.columns-right .sidebox#pro-version .inside ul{margin:0 0 10px}.columns-right .sidebox#pro-version .inside ul li{margin:0;padding:0}.columns-right .sidebox#pro-version .inside ul li a{display:inline-block;min-height:24px;font-size:19px;line-height:24px;margin-bottom:1px;padding:0 5px;background:#000;color:#fff;text-decoration:none}.columns-right .sidebox#pro-version .inside ul li.acf a{background-color:#5ee8bf;color:grey}.columns-right .sidebox#pro-version .inside p{color:#fff;font-size:12px}.columns-right .sidebox#pro-version .inside p a{color:#fff;display:inline-block;background:#a4c518;padding:0 2px;font-size:15px;text-decoration:none}.columns-right .sidebox#add-acf{background-color:#5ee8bf}.columns-right .sidebox#add-acf h3{padding:0}.columns-right .sidebox#add-acf h3 a{color:#fff;text-decoration:none;font-size:15px}.columns-right .sidebox#direct-feedback #feedback-rate,.columns-right .sidebox#direct-feedback #feedback-support{display:none}.columns-right .sidebox#direct-feedback .inside>a{border-radius:4px;border:1px solid #CCC;width:48%;height:64px;text-align:center;line-height:64px;font-weight:700;color:#222;display:inline-block;text-decoration:none}.columns-right .sidebox#direct-feedback .inside>a:hover{background:#FAFAFA}.columns-right .sidebox#direct-feedback .inside form textarea{width:100%;height:120px}.columns-right .sidebox#direct-feedback .inside form input[type=submit]{float:right;border-radius:4px;border:1px solid #CCC;height:32px;text-align:center;line-height:32px;font-weight:700;font-size:12px;padding:0 32px;color:#CCC;display:inline-block;background:0 0;text-decoration:none;cursor:pointer}.columns-right .sidebox#direct-feedback .inside form input[type=submit]:hover,.columns-right .sidebox#direct-feedback .inside ul.share li a:hover{background:#FAFAFA}.columns-right .sidebox#direct-feedback .inside form p.description{float:left;font-size:10px}.columns-right .sidebox#direct-feedback .inside ul{margin:0}.columns-right .sidebox#direct-feedback .inside ul.share li{margin:0 0 0 9px;display:block;float:left;width:30%}.columns-right .sidebox#direct-feedback .inside ul.share li a{text-decoration:none;vertical-align:middle;line-height:20px;padding:16px 0;width:100%;text-align:center;border:1px solid #CCC;border-radius:4px;display:block}.columns-right .sidebox#direct-feedback .inside ul.share li:first-child{margin-left:0}.columns-right .sidebox#direct-feedback #feedback-support .inside ul.share li{width:48%}table.cpac-form-table{max-width:1100px;margin-top:20px}table.cpac-form-table>tbody>tr>td,table.cpac-form-table>tbody>tr>th{vertical-align:top}table.cpac-form-table td.padding-22{padding-top:22px}table.cpac-form-table td .cpac_export .ms-container{background:url(../images/switch_bw.png) 50% 50% no-repeat}table.cpac-form-table td .cpac_export .ms-container .ms-selectable{width:48%;margin-right:0}table.cpac-form-table td .cpac_export .ms-container .ms-selection{float:right;width:48%}table.cpac-form-table td .cpac_export .ms-container ul.ms-list{width:100%}table.cpac-form-table td .cpac_export .ms-container ul.ms-list li{margin:0;padding-top:5px;padding-bottom:5px}table.cpac-form-table.settings tr td{padding-top:74px}table.cpac-form-table.settings tr:first-child th{padding-top:0}table.cpac-form-table.settings tr:first-child td{padding-top:54px}.wp-pointer-content ol{margin-left:1.5em;padding:0 15px}.wp-pointer-right{margin-right:15px}body.rtl .wp-pointer-right{margin-left:15px;margin-right:0}body.rtl .wp-pointer-right ol{margin-right:1.5em;margin-left:0}body.rtl .cpac-menu .subsubsub{margin-left:14px;margin-right:0}body.rtl .columns-container{margin-left:300px;margin-right:0}body.rtl .columns-left{float:right}body.rtl .columns-left .cpac-columns .cpac-column .column-meta img{margin-left:3px;margin-right:0}body.rtl .columns-left .cpac-columns .cpac-column .column-meta .column_label .inner>a.remove-button{margin-right:12px;margin-left:0}body.rtl .columns-left .cpac-columns .cpac-column .column-meta .column_label .inner .meta{float:left}body.rtl .columns-left .cpac-columns .cpac-column .column-meta .column_label span.vers{float:right}body.rtl .columns-left .cpac-columns .cpac-column .column-form table tr td.label a.more-info,body.rtl .columns-left .cpac-columns .cpac-column .column-meta span.vers .comment-grey-bubble{float:left}body.rtl .columns-left .cpac-columns .cpac-column .column-meta .column_type{text-align:left;padding-left:0;padding-right:auto}body.rtl .columns-left .cpac-columns .cpac-column .column-form table tr.column_image_size td.input label input{margin-left:3px;margin-right:0}body.rtl .columns-left .cpac-columns .cpac-column .column-form table tr td.label p.description{right:0;left:auto}body.rtl .columns-left .cpac-columns .cpac-column .column-form div.description,body.rtl .columns-left .cpac-columns .cpac-column .column-form div.input-width-range{float:right}body.rtl .columns-left .cpac-columns .cpac-column .column-form tr td.input label{padding-left:10px;padding-right:0}body.rtl .columns-left .cpac-columns .cpac-column .column-form a.help{float:left}body.rtl .columns-left .column-footer .order-message{float:right;padding-right:22px;padding-left:0;background:url(../images/order_arrow-rtl.png) right top no-repeat}body.rtl .columns-left .column-footer .button-container,body.rtl .cpac_export .ms-container .ms-selection{float:left}body.rtl .columns-right{float:left;margin-left:-300px;margin-right:0}body.rtl .cpac-placeholder{padding:5px 0 7px 4px}@media only screen and (max-width:900px){.columns-container{margin-right:0}.columns-container .columns-left{float:none}.columns-container .columns-right{float:none;margin-top:0;margin-right:0;width:100%}.columns-container .columns-right .columns-right-inside.fixed{position:relative;top:0;width:100%}}.cpac-addons li{width:200px;background:#FFF;float:left;margin-right:16px;margin-bottom:16px;border:1px solid #DDD;-webkit-box-shadow:0 3px 10px 0 rgba(0,0,0,.15);-moz-box-shadow:0 3px 10px 0 rgba(0,0,0,.15);box-shadow:0 3px 10px 0 rgba(0,0,0,.15)}.cpac-addons li:hover{-webkit-box-shadow:0 3px 10px 0 rgba(0,0,0,.25);-moz-box-shadow:0 3px 10px 0 rgba(0,0,0,.25);box-shadow:0 3px 10px 0 rgba(0,0,0,.25)}.cpac-addons li a{color:#444}.cpac-addons li .cpac-addon-content{display:table;width:100%;height:125px;text-align:center;vertical-align:middle;border-top:1px solid #DDD;background:#0069a4;background:-moz-radial-gradient(center,ellipse cover,#0069a4 0,#085079 100%);background:-webkit-gradient(radial,center center,0,center center,100%,color-stop(0,#0069a4),color-stop(100%,#085079));background:-webkit-radial-gradient(center,ellipse cover,#0069a4 0,#085079 100%);background:-o-radial-gradient(center,ellipse cover,#0069a4 0,#085079 100%);background:-ms-radial-gradient(center,ellipse cover,#0069a4 0,#085079 100%);background:radial-gradient(ellipse at center,#0069a4 0,#085079 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0069a4', endColorstr='#085079', GradientType=1)}.cpac-addons li .cpac-addon-content>*{display:table-cell;vertical-align:middle}.cpac-addons li .cpac-addon-content h3{padding:0 16px;color:#FFF;line-height:150%}.cpac-addons li .cpac-addon-content img{width:100%}.cpac-addons li .cpac-addon-header{width:100%;padding:25px 15px;-moz-box-sizing:border-box;box-sizing:border-box}.cpac-addons li .cpac-addon-header>:first-child{margin-top:0}.cpac-addons li .cpac-addon-header>:last-child{margin-bottom:0}.cpac-addons li .cpac-addon-actions{background:#EEE;border-top:1px solid #DDD;padding:8px}.cpac-addons li .cpac-addon-actions .cpac-installed:before{content:"\f147";font-family:dashicons;vertical-align:middle;margin-left:-5px;margin-right:3px}
1
+ .button.loading span,.cpac-column .comment-grey-bubble,.icon-no,.icon-yes,a.help{height:16px;width:16px}#cpac a:active,#cpac a:focus{outline:0}#cpac h2.cpac-nav-tab-wrapper{margin-bottom:10px}#icon-codepress-admin-columns{background:url(../images/icon.png) no-repeat}.cpac-settings-link{float:right;margin:12px 14px 5px 0;background:url(../images/settings.png) no-repeat;padding-left:20px;text-decoration:none;display:inline-block;line-height:16px}.cpac-settings-link.current{font-weight:700}.rtl .cpac-settings-link{float:left;margin:12px 0 5px 14px;padding-right:20px;padding-left:0}a.help{background:url(../images/help.png) no-repeat;display:inline-block}.button.loading{padding-right:25px;position:relative}.rtl .button.loading{padding-left:25px;padding-right:0}.button.loading span{position:absolute;top:2px;right:6px;background:url(../images/loading.gif) right 50% no-repeat;display:inline-block}.rtl .button.loading span{left:6px;right:auto}.cpac_message.error.warning{border-left:4px solid #ffba00}.ajax-message{display:none}.columns-container .columns-left .column-footer .submit.save,.icon-no,.icon-yes{display:inline-block}.icon-yes{background:url(../images/yes.png) no-repeat;position:relative;top:2px}.icon-no{background:url(../images/no.png) no-repeat;position:relative;top:2px}.cpac-column .comment-grey-bubble:before{content:'\f101';font:400 20px/.5 dashicons;speak:none;display:inline-block;padding:0;top:4px;left:0;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.rtl .cpac-column .comment-grey-bubble:before{right:0;left:auto}.cpac-menu{clear:both;overflow:hidden;margin-bottom:10px}.cpac-menu .subsubsub{white-space:normal;width:100%;margin:0 14px 0 0}.cpac-menu .subsubsub li.first{font-weight:700;min-width:100px}.cpac-menu label{font-weight:700;margin-right:5px}.cpac-menu .spinner{float:none;margin-top:0;margin-left:0}.columns-container{margin-right:300px;max-width:700px}.columns-container .columns-left{float:left;width:100%}.columns-container .columns-left .column-footer .submit.update,.columns-container.stored .columns-right .sidebox.form-actions .submit.save{display:none}.columns-container .columns-right{float:right;margin-right:-300px;width:280px}.columns-container .columns-right .columns-right-inside.fixed{width:280px}.columns-container.stored .columns-right .sidebox.form-actions .form-reset,.columns-container.stored .columns-right .sidebox.form-actions .submit.update{display:block}.columns-container.stored .column-footer .submit.save{display:none}.columns-container.stored .column-footer .submit.update,.menu select{display:inline-block}.ui-sortable-helper{-webkit-box-shadow:1px 3px 6px 0 rgba(1,1,1,.4);box-shadow:1px 3px 6px 0 rgba(1,1,1,.4)}.ui-sortable-helper .column-meta{border-width:1px}.cpac-placeholder{visibility:visible!important;border-top:1px solid #dfdfdf;padding:5px 4px 7px 0}.cpac-placeholder .inner-placeholder{border:1px dashed grey;background:#eee;width:100%;height:100%}.cpac-placeholder :first-child{border:none}.menu{position:relative;margin-bottom:16px}.menu select{margin:0}.menu .spinner{display:none;float:none;visibility:visible;margin:0 0 0 14px}.menu .view-link,.menu .view-link:active{display:inline-block;margin:0 0 0 12px;top:2px}.columns-left .cpac-notice{background:#fff;border-left:4px solid #ffba00;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);margin-bottom:15px;padding:1px 12px}.columns-left .cpac-boxes .cpac-columns form{box-shadow:0 1px 3px rgba(0,0,0,.1);margin:0}.columns-left .cpac-boxes.disabled{opacity:.7}.columns-left .cpac-boxes.disabled .column_action,.columns-left .cpac-boxes.disabled a.clone-button,.columns-left .cpac-boxes.disabled a.edit-button,.columns-left .cpac-boxes.disabled a.remove-button{display:none!important}.columns-left .cpac-boxes.disabled .column-footer,.columns-left .cpac-boxes.disabled .column-meta td.column_sort{display:none}.columns-left .cpac-boxes.disabled .meta span{cursor:default!important}.columns-left .cpac-boxes.disabled .meta span:before{color:grey!important}.columns-left .cpac-boxes.disabled .meta span.off{opacity:.5}.cpac-column .column-meta{border-style:solid;border-color:#dfdfdf;border-width:1px 1px 0;background:#fcfcfc}.cpac-column .column-meta:nth-child(2n) .column-meta{background:#f9f9f9}.cpac-column .column-meta img{margin-right:3px}.cpac-column .column-meta table{border:none;background:0 0;border-radius:0}.cpac-column .column-meta table tr td{vertical-align:top;height:18px;border:solid transparent;padding:11px 8px;border-width:1px 0 0}.cpac-column .column-meta table tr td.column_sort{width:10px;background:url(../images/drag.png) 8px 8px no-repeat;cursor:move}.cpac-column .column-meta table tr td.column_label{width:70%;font-weight:700;vertical-align:middle;position:relative}.cpac-column .column-meta table tr td.column_label .inner{position:relative;overflow:hidden;height:18px}.cpac-column .column-meta table tr td.column_label .inner>a{color:#5a5a5a;padding:0 4px}.cpac-column .column-meta table tr td.column_label .inner>a:hover{color:#333}.cpac-column .column-meta table tr td.column_label .inner>a.clone-button,.cpac-column .column-meta table tr td.column_label .inner>a.edit-button,.cpac-column .column-meta table tr td.column_label .inner>a.remove-button{display:none;color:#a00;text-decoration:none;text-shadow:none;font-weight:400;margin-left:5px;font-size:12px}.cpac-column .column-meta table tr td.column_label .inner>a.clone-button:hover,.cpac-column .column-meta table tr td.column_label .inner>a.edit-button:hover,.cpac-column .column-meta table tr td.column_label .inner>a.remove-button:hover{color:red}.cpac-column .column-meta table tr td.column_label .inner>a.clone-button,.cpac-column .column-meta table tr td.column_label .inner>a.edit-button{color:#0074a2}.cpac-column .column-meta table tr td.column_label .inner>a.clone-button:hover,.cpac-column .column-meta table tr td.column_label .inner>a.edit-button:hover{color:#2ea2cc}.cpac-column .column-meta table tr td.column_label .inner .meta{display:inline-block;float:right;font-weight:400;color:#b2b2b2;font-size:12px}.cpac-column .column-meta table tr td.column_label .inner .meta span{cursor:pointer}.cpac-column .column-meta table tr td.column_label .inner .meta span.width{margin-right:5px;cursor:auto;color:#737373}.cpac-column .column-meta table tr td.column_label .inner .meta span.disabled{cursor:default}.cpac-column .column-meta table tr td.column_label span.vers{float:left}.cpac-column .column-meta table tr td.column_type{width:auto;min-width:120px;text-align:right;vertical-align:middle;color:#999;padding-right:0}.cpac-column .column-meta table tr td.column_type .inner{height:18px;overflow:hidden}.cpac-column .column-meta table tr td.column_type .inner a{color:#999}.cpac-column .column-meta table tr td.column_edit{width:38px;min-width:38px;background:url(../images/arrow.png) 23px 18px no-repeat;cursor:pointer}.cpac-column .column-meta:hover .column_label .inner>a.clone-button,.cpac-column .column-meta:hover .column_label .inner>a.edit-button,.cpac-column .column-meta:hover .column_label .inner>a.remove-button{display:inline-block}.cpac-column .column-meta span.vers{padding-top:2px}.cpac-column .column-meta span.vers .comment-grey-bubble{float:right}.cpac-column .column-form{display:none;border-width:1px 1px 0;border-style:solid;border-color:#dfdfdf;position:relative}.cpac-column .column-form table{border:none;background:#fcfcfc}.cpac-column .column-form table tr.hide{display:none}.cpac-column .column-form table tr td{vertical-align:top;border:none;padding:8px;background:#fff;border-top:1px solid #F5F5F5}.cpac-column .column-form table tr td input[type=text],.cpac-column .column-form table tr td select{width:99.95%}.cpac-column .column-form table tr td input[type=text].small,.cpac-column .column-form table tr td select.small{width:100px}.cpac-column .column-form table tr td span.suffix{line-height:40px;color:grey}.cpac-column .column-form table tr td select optgroup:nth-child(2n){background:#F9F9F9}.cpac-column .column-form table tr td.label{position:relative;overflow:visible;background:#f5f5f5;border-right:1px solid #E1E1E1;vertical-align:top;width:34%;border-top:1px solid #F0F0F0}.column-footer,.wp-pointer-content{overflow:hidden}.cpac-column .column-form table tr td.label label{font-weight:700;color:#333;display:block;position:relative}.cpac-column .column-form table tr td.label p{color:#666;display:block;font-size:12px;font-style:normal;line-height:16px;margin:0!important}.cpac-column .column-form table tr td.label p.description{display:none;position:absolute;z-index:99;top:30px;left:0;background:#eaf2fa;border-radius:5px;border:1px solid #c7d7e2;padding:5px 8px!important;font-weight:400}.cpac-column .column-form table tr td.label p.description em{display:block;color:#999}.cpac-column .column-form table tr td.label .info{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.cpac-column .column-form table tr td.label .info:before{position:absolute;z-index:1;right:10px;top:50%;margin-top:-7px;content:'';display:block;border-radius:32px;border:1px solid #E6E6E6;width:12px;height:12px}.cpac-column .column-form table tr td.label .info:after{position:absolute;z-index:1;right:10px;top:50%;margin-top:-6px;content:'?';display:block;width:14px;height:14px;color:#E6E6E6;font:700 10px Arial;text-align:center;vertical-align:middle;line-height:14px}.cpac-column .column-form table tr td.input label{padding-left:10px;padding-right:0}.cpac-column .column-form table tr td.input div.msg{margin-top:5px;display:none;color:#333;padding:6px 8px;background-color:#ffebe8;border:1px solid #fff;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.cpac-column .column-form table tr td.input .section{padding:12px}.cpac-column .column-form table tr.column_width .input{position:relative}.cpac-column .column-form table tr.column_width .input div.description{font-size:11px;width:54px;position:absolute;left:10px;text-align:middle}.cpac-column .column-form table tr.column_width .input div.description input{background:#efefef;border:none;height:20px;line-height:20px;text-align:right;width:36px;font-size:12px}.cpac-column .column-form table tr.column_width .input div.width-slider{margin-left:68px;margin-right:90px;position:relative;margin-top:5px}.cpac-column .column-form table tr.column_width .input div.width-slider .ui-slider-handle{cursor:ew-resize}.cpac-column .column-form table tr.column_width .input div.unit-select{position:absolute;top:8px;right:10px;width:90px;text-align:right}.cpac-column .column-form table tr.column_width .input div.unit-select label{padding-left:5px}.cpac-column .column-form table tr.column_image_size{border:10px solid red}.cpac-column .column-form table tr.column_image_size td.input label.custom-size{display:inline-block;margin-top:4px;margin-bottom:4px}.cpac-column .column-form table tr.column_image_size td.input label.custom-size input{margin-right:3px}.cpac-column .column-form table tr.column_image_size td.input .custom_image_size{display:inline-block}.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-h.hidden,.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-w.hidden,.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .hidden{display:none}.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-h,.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-w{margin:0}.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-h input[type=text],.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-w input[type=text]{margin-right:3px;width:40px!important}.cpac-column .column-form table tr.column_action td{border-top:1px solid #ebebeb;background:#f9f9f9}.cpac-column .column-form table tr.column_action td p{margin:0}.cpac-column .column-form table tr.column_action td p a.remove-button{color:#a00;text-decoration:none;text-shadow:none;font-weight:400;margin-left:5px;font-size:12px;padding:0 5px}.cpac-column .column-form table tr.column_action td p a.remove-button:hover{color:#fff;background:red}.cpac-column .column-form table tr:first-child td{border-top:none}.cpac-column.loading .column-form>.spinner{position:absolute;left:50%;top:50%;z-index:200;margin-left:-10px;margin-top:-10px;display:block}.cpac-column.loading .column-form:before{content:'';position:absolute;width:100%;height:100%;background:#FFF;z-index:100;opacity:.5}.cpac-column.opened .column-meta{background-color:#c7c7c7;background-image:-ms-linear-gradient(top,#e9e9e9,#c7c7c7);background-image:-moz-linear-gradient(top,#e9e9e9,#c7c7c7);background-image:-o-linear-gradient(top,#e9e9e9,#c7c7c7);background-image:-webkit-gradient(linear,left top,left bottom,from(#e9e9e9),to(#c7c7c7));background-image:-webkit-linear-gradient(top,#e9e9e9,#c7c7c7);background-image:linear-gradient(top,#e9e9e9,#c7c7c7);border-color:#aeaeae}.cpac-column.opened .column-meta table{background:0 0}.cpac-column.opened .column-meta table td{border-color:#f8f8f8;color:#333;text-shadow:0 1px 0 #FFF}.cpac-column.opened .column-meta table td a{color:#333;text-shadow:0 1px 0 #FFF}.cpac-column.opened .column-meta table td.column_sort{background-position:8px -39px}.cpac-column.opened .column-meta table td.column_label .inner .meta span{color:grey;text-shadow:none}.cpac-column.opened .column-meta table td.column_type{color:#5C5C5C}.column-footer{background:#EAF2FA;border:1px solid #c7d7e2;min-height:26px;padding:8px}.column-footer .order-message{background:url(../images/order_arrow.png) no-repeat;color:#7A9BBE;float:left;font-family:Comic Sans MS,sans-serif;font-size:11px;height:13px;line-height:1em;margin-left:4px;padding:7px 0 0 22px;text-shadow:0 1px 0 #FFF;display:inline-block}.column-footer .button-container{float:right;display:inline-block;margin-top:-5px}.column-footer .button-container a{display:inline-block;margin-top:5px;margin-left:5px}.cpac-content-body hr{-moz-border-bottom-colors:none;-moz-border-left-colors:none;-moz-border-right-colors:none;-moz-border-top-colors:none;background:none;border-color:#DFDFDF -moz-use-text-color -moz-use-text-color;border-image:none;border-right:0 none;border-style:solid none none;border-width:1px 0 0;clear:both;margin:30px 0;opacity:.2}#cpac-welcome.about-wrap div.error{display:block!important}.cpac-alert{display:inline-block;background:#FCF8E3;border:1px solid #FBEED5;border-radius:4px;color:#C09853;margin:20px 0;padding:16px 14px;text-shadow:0 1px 0 rgba(255,255,255,.5)}.cpac-alert p{margin:0}.cpac-alert.cpac-alert-success{background-color:#DFF0D8;border-color:#D6E9C6;color:#468847}.cpac-alert.cpac-alert-error{background-color:#F2DEDE;border-color:#EED3D7;color:#B94A48}.cpac-alert a.button-primary{height:28px;line-height:28px;display:inline-block}#cpac-download-add-ons-table{max-width:600px}.wp-core-ui .button-large{height:40px;line-height:40px;font-size:16px;padding:0 15px;text-shadow:0 1px 0 rgba(0,0,0,.5)}.cac-notification.updated{border-left-color:#0071aa}.cac-notification.updated .learnmore{float:right}.cac-notification.updated .learnmore:after{content:"\f139";font:400 20px/1 dashicons;float:right}.columns-right .sidebox{background:#FFF;border:1px solid #E1E1E1;border-radius:0;box-shadow:0 1px 3px rgba(0,0,0,.1);position:relative;margin-bottom:14px}.columns-right .sidebox h3{padding:10px;margin:0;position:relative}.columns-right .sidebox h3.title{font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-size:15px;font-weight:400;line-height:1;margin:0;padding:7px 10px;background:#f1f1f1;background-image:-webkit-gradient(linear,left bottom,left top,from(#ececec),to(#f9f9f9));background-image:-webkit-linear-gradient(bottom,#ececec,#f9f9f9);background-image:-moz-linear-gradient(bottom,#ececec,#f9f9f9);background-image:-o-linear-gradient(bottom,#ececec,#f9f9f9);background-image:linear-gradient(to top,#ececec,#f9f9f9);border-bottom-color:#dfdfdf;text-shadow:#fff 0 1px 0;-webkit-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff;border-bottom-style:solid;border-bottom-width:1px}.columns-right .sidebox h3 span.left{position:relative;background:#fff;z-index:2;padding-right:8px}.columns-right .sidebox h3 span.right{position:absolute;display:inline-block;line-height:20px;z-index:1;right:10px;font-size:12px;text-transform:uppercase;color:grey;text-align:right}.columns-right .sidebox .inside{padding:10px}.columns-right .sidebox .inside p{margin-top:0}.columns-right .sidebox.form-actions .form-reset{display:none;border-bottom:1px solid #F5F5F5;padding:8px}.columns-right .sidebox.form-actions .reset-column-type{text-decoration:none;color:#BC0B0B;line-height:25px;display:inline-block;background:0 0;border:none;padding:0;font-size:13px;cursor:pointer;margin:0}.columns-right .sidebox.form-actions .reset-column-type:hover{color:red}.columns-right .sidebox.form-actions .form-update{padding:8px;overflow:hidden}.columns-right .sidebox.form-actions .submit{display:none;width:100%;height:28px;line-height:28px;text-align:center}.columns-right .sidebox.form-actions .submit.save{display:block}.columns-right .sidebox#pro-version .cta{background:url(../images/get_the_addon.png) no-repeat;background-size:cover}.columns-right .sidebox#pro-version .padding-box{padding:8px 15px 0}.columns-right .sidebox#pro-version h3 a{color:#fff;font-size:19px;text-decoration:none;font-weight:400;margin-top:6px}.columns-right .sidebox#pro-version .inside ul{margin:0 0 10px}.columns-right .sidebox#pro-version .inside ul li{margin:0;padding:0}.columns-right .sidebox#pro-version .inside ul li a{display:inline-block;min-height:24px;font-size:19px;line-height:24px;margin-bottom:1px;padding:0 5px;background:#000;color:#fff;text-decoration:none}.columns-right .sidebox#pro-version .inside ul li.acf a{background-color:#5ee8bf;color:grey}.columns-right .sidebox#pro-version .inside p{color:#fff;font-size:12px}.columns-right .sidebox#pro-version .inside p a{color:#fff;display:inline-block;background:#a4c518;padding:0 2px;font-size:15px;text-decoration:none}.columns-right .sidebox#add-acf{background-color:#5ee8bf}.columns-right .sidebox#add-acf h3{padding:0}.columns-right .sidebox#add-acf h3 a{color:#fff;text-decoration:none;font-size:15px}.columns-right .sidebox#direct-feedback #feedback-rate,.columns-right .sidebox#direct-feedback #feedback-support{display:none}.columns-right .sidebox#direct-feedback .inside>a{border-radius:4px;border:1px solid #CCC;width:48%;height:64px;text-align:center;line-height:64px;font-weight:700;color:#222;display:inline-block;text-decoration:none}.columns-right .sidebox#direct-feedback .inside>a:hover{background:#FAFAFA}.columns-right .sidebox#direct-feedback .inside form textarea{width:100%;height:120px}.columns-right .sidebox#direct-feedback .inside form input[type=submit]{display:inline-block;float:right;border-radius:4px;border:1px solid #CCC;height:32px;text-align:center;line-height:32px;font-weight:700;font-size:12px;padding:0 32px;color:#CCC;background:0 0;text-decoration:none;cursor:pointer}.columns-right .sidebox#direct-feedback .inside form input[type=submit]:hover,.columns-right .sidebox#direct-feedback .inside ul.share li a:hover{background:#FAFAFA}.columns-right .sidebox#direct-feedback .inside form p.description{float:left;font-size:10px}.columns-right .sidebox#direct-feedback .inside ul{margin:0}.columns-right .sidebox#direct-feedback .inside ul.share li{margin:0 0 0 9px;display:block;float:left;width:30%}.columns-right .sidebox#direct-feedback .inside ul.share li a{text-decoration:none;vertical-align:middle;line-height:20px;padding:16px 0;width:100%;text-align:center;border:1px solid #CCC;border-radius:4px;display:block}.wp-pointer.noclick .wp-pointer-buttons,body.rtl .columns-left .column-footer .submit{display:none}.columns-right .sidebox#direct-feedback .inside ul.share li:first-child{margin-left:0}.columns-right .sidebox#direct-feedback #feedback-support .inside ul.share li{width:48%}table.cpac-form-table{max-width:1100px;margin-top:20px}table.cpac-form-table>tbody>tr>td,table.cpac-form-table>tbody>tr>th{vertical-align:top}table.cpac-form-table td.padding-22{padding-top:22px}table.cpac-form-table.settings tr td{padding-top:74px}table.cpac-form-table.settings tr:first-child th{padding-top:0}table.cpac-form-table.settings tr:first-child td{padding-top:54px}.wp-pointer-content ol{margin-left:1.5em;padding:0 15px}.wp-pointer-right{margin-right:15px}body.rtl .wp-pointer-right{margin-left:15px;margin-right:0}body.rtl .wp-pointer-right ol{margin-right:1.5em;margin-left:0}body.rtl .cpac-menu .subsubsub{margin-left:14px;margin-right:0}body.rtl .columns-container{margin-left:300px;margin-right:0}body.rtl .columns-left{float:right}body.rtl .columns-left .cpac-columns .cpac-column .column-meta img{margin-left:3px;margin-right:0}body.rtl .columns-left .cpac-columns .cpac-column .column-meta .column_label .inner>a.remove-button{margin-right:12px;margin-left:0}body.rtl .columns-left .cpac-columns .cpac-column .column-meta .column_label .inner .meta{float:left}body.rtl .columns-left .cpac-columns .cpac-column .column-meta .column_label span.vers{float:right}body.rtl .columns-left .cpac-columns .cpac-column .column-form table tr td.label a.more-info,body.rtl .columns-left .cpac-columns .cpac-column .column-meta span.vers .comment-grey-bubble{float:left}body.rtl .columns-left .cpac-columns .cpac-column .column-meta .column_type{text-align:left;padding-left:0;padding-right:auto}body.rtl .columns-left .cpac-columns .cpac-column .column-form table tr.column_image_size td.input label input{margin-left:3px;margin-right:0}body.rtl .columns-left .cpac-columns .cpac-column .column-form table tr td.label p.description{right:0;left:auto}body.rtl .columns-left .cpac-columns .cpac-column .column-form div.description,body.rtl .columns-left .cpac-columns .cpac-column .column-form div.input-width-range{float:right}body.rtl .columns-left .cpac-columns .cpac-column .column-form tr td.input label{padding-left:10px;padding-right:0}body.rtl .columns-left .cpac-columns .cpac-column .column-form a.help{float:left}body.rtl .columns-left .column-footer .order-message{float:right;padding-right:22px;padding-left:0;background:url(../images/order_arrow-rtl.png) right top no-repeat}body.rtl .columns-left .column-footer .button-container,body.rtl .cpac_export .ms-container .ms-selection{float:left}body.rtl .columns-right{float:left;margin-left:-300px;margin-right:0}body.rtl .cpac-placeholder{padding:5px 0 7px 4px}@media only screen and (max-width:900px){.columns-container{margin-right:0}.columns-container .columns-left,.columns-container .menu{float:none}.columns-container .columns-right{float:none;margin-top:0;margin-right:0;width:100%}}.cpac-addons li{width:200px;background:#FFF;float:left;margin-right:16px;margin-bottom:16px;border:1px solid #DDD;-webkit-box-shadow:0 3px 10px 0 rgba(0,0,0,.15);-moz-box-shadow:0 3px 10px 0 rgba(0,0,0,.15);box-shadow:0 3px 10px 0 rgba(0,0,0,.15)}.cpac-addons li:hover{-webkit-box-shadow:0 3px 10px 0 rgba(0,0,0,.25);-moz-box-shadow:0 3px 10px 0 rgba(0,0,0,.25);box-shadow:0 3px 10px 0 rgba(0,0,0,.25)}.cpac-addons li a{color:#444}.cpac-addons li .cpac-addon-content{display:table;width:100%;height:125px;text-align:center;vertical-align:middle;border-top:1px solid #DDD;background:#0069a4;background:-moz-radial-gradient(center,ellipse cover,#0069a4 0,#085079 100%);background:-webkit-gradient(radial,center center,0,center center,100%,color-stop(0,#0069a4),color-stop(100%,#085079));background:-webkit-radial-gradient(center,ellipse cover,#0069a4 0,#085079 100%);background:-o-radial-gradient(center,ellipse cover,#0069a4 0,#085079 100%);background:-ms-radial-gradient(center,ellipse cover,#0069a4 0,#085079 100%);background:radial-gradient(ellipse at center,#0069a4 0,#085079 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0069a4', endColorstr='#085079', GradientType=1)}.cpac-addons li .cpac-addon-content>*{display:table-cell;vertical-align:middle}.cpac-addons li .cpac-addon-content h3{padding:0 16px;color:#FFF;line-height:150%}.cpac-addons li .cpac-addon-content img{width:100%}.cpac-addons li .cpac-addon-header{width:100%;padding:25px 15px;-moz-box-sizing:border-box;box-sizing:border-box}.cpac-addons li .cpac-addon-header>:first-child{margin-top:0}.cpac-addons li .cpac-addon-header>:last-child{margin-bottom:0}.cpac-addons li .cpac-addon-actions{background:#EEE;border-top:1px solid #DDD;padding:8px}.cpac-addons li .cpac-addon-actions .cpac-installed:before{content:"\f147";font-family:dashicons;vertical-align:middle;margin-left:-5px;margin-right:3px}
assets/css/column.css CHANGED
@@ -21,6 +21,20 @@ span.status-closed {
21
float: left;
22
margin-bottom: 4px;
23
}
24
@media screen and (max-width: 782px) {
25
.tablenav.top .actions {
26
display: block !important;
@@ -46,9 +60,18 @@ body.upload-php .tablenav.top .cpac-edit {
46
height: 20px;
47
background-color: #e0e0e0;
48
text-align: center;
49
- margin-left: 8px;
50
font-size: 12px;
51
}
52
/* =Images Column
53
-------------------------------------------------------------- */
54
.cpac-column-value-image {
21
float: left;
22
margin-bottom: 4px;
23
}
24
+ body.edit-tags-php .tablenav.top .cpac-edit {
25
+ float: none;
26
+ }
27
+ .cpac_status_yes {
28
+ color: #46b450;
29
+ }
30
+ .cpac_status_no {
31
+ color: #dc3232;
32
+ }
33
+ body.users-php .tablenav .actions a.add-new-h2 {
34
+ float: none;
35
+ vertical-align: middle !important;
36
+ top: 2px !important;
37
+ }
38
@media screen and (max-width: 782px) {
39
.tablenav.top .actions {
40
display: block !important;
60
height: 20px;
61
background-color: #e0e0e0;
62
text-align: center;
63
+ margin-left: 7px;
64
font-size: 12px;
65
}
66
+ .cpac-spacing {
67
+ display: inline-block;
68
+ margin-right: 10px;
69
+ margin-bottom: 4px;
70
+ }
71
+ .cpac-suffix {
72
+ margin-left: 8px;
73
+ color: #808080;
74
+ }
75
/* =Images Column
76
-------------------------------------------------------------- */
77
.cpac-column-value-image {
assets/css/column.min.css CHANGED
@@ -1 +1 @@
1
- .actions #post-query-submit,.tablenav.top .cpac-edit{vertical-align:middle;float:left;margin-bottom:4px}.cpac-divider{display:inline-block;width:14px;height:12px;background:url(../images/square.png) 50% 7px no-repeat}span.status-closed{color:red}.tablenav.top .cpac-edit{top:2px;display:inline-block}@media screen and (max-width:782px){.tablenav.top .actions{display:block!important;margin-bottom:4px}.tablenav.top .actions *{display:none}.tablenav.top .actions .cpac-edit{display:inline-block}}body.upload-php .tablenav.top .cpac-edit{float:none}.cpac-rounded{display:inline-block;border-radius:10px;min-width:8px;padding:0 6px;height:20px;background-color:#e0e0e0;text-align:center;margin-left:8px;font-size:12px}.cpac-column-value-image{display:inline-block;background:0 0;margin-right:2px;overflow:hidden;max-width:100%}.rtl .cpac-column-value-image{margin-left:2px;margin-right:0}.cpac-column-value-image img{display:block;margin:0 auto}.column-column-attachment img{padding-right:5px;padding-bottom:4px}.rtl .column-column-attachment img{padding-left:5px;padding-right:0}div.cpac-color{line-height:26px}div.cpac-color span{display:block;-webkit-border-radius:3px;border-radius:3px;color:#fff;float:left;height:16px;line-height:16px;margin-right:12px;overflow:hidden;padding:4px 5px;font-size:10px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;min-width:47px;text-align:center}.rtl div.cpac-color span{float:right;margin-left:12px;margin-right:0}div.sizes span.not-available{color:#999}.button.cpac-button-action{position:relative;text-indent:9999px;margin-right:4px;padding:0 13px;overflow:hidden}.button.cpac-button-action:before{position:absolute;top:0;left:0;width:100%;height:100%;text-indent:0}.cpac-tip{display:inline-block}.qtip.qtip-tipsy{background:rgba(0,0,0,.75);font-weight:400;min-width:25px}
1
+ .actions #post-query-submit,.tablenav.top .cpac-edit{vertical-align:middle;float:left;margin-bottom:4px}.cpac-divider{display:inline-block;width:14px;height:12px;background:url(../images/square.png) 50% 7px no-repeat}span.status-closed{color:red}.tablenav.top .cpac-edit{top:2px;display:inline-block}body.edit-tags-php .tablenav.top .cpac-edit,body.upload-php .tablenav.top .cpac-edit{float:none}.cpac_status_yes{color:#46b450}.cpac_status_no{color:#dc3232}body.users-php .tablenav .actions a.add-new-h2{float:none;vertical-align:middle!important;top:2px!important}@media screen and (max-width:782px){.tablenav.top .actions{display:block!important;margin-bottom:4px}.tablenav.top .actions *{display:none}.tablenav.top .actions .cpac-edit{display:inline-block}}.cpac-rounded{display:inline-block;border-radius:10px;min-width:8px;padding:0 6px;height:20px;background-color:#e0e0e0;text-align:center;margin-left:7px;font-size:12px}.cpac-spacing{display:inline-block;margin-right:10px;margin-bottom:4px}.cpac-suffix{margin-left:8px;color:grey}.cpac-column-value-image{display:inline-block;background:0 0;margin-right:2px;overflow:hidden;max-width:100%}.rtl .cpac-column-value-image{margin-left:2px;margin-right:0}.cpac-column-value-image img{display:block;margin:0 auto}.column-column-attachment img{padding-right:5px;padding-bottom:4px}.rtl .column-column-attachment img{padding-left:5px;padding-right:0}div.cpac-color{line-height:26px}div.cpac-color span{display:block;-webkit-border-radius:3px;border-radius:3px;color:#fff;float:left;height:16px;line-height:16px;margin-right:12px;overflow:hidden;padding:4px 5px;font-size:10px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;min-width:47px;text-align:center}.rtl div.cpac-color span{float:right;margin-left:12px;margin-right:0}div.sizes span.not-available{color:#999}.button.cpac-button-action{position:relative;text-indent:9999px;margin-right:4px;padding:0 13px;overflow:hidden}.button.cpac-button-action:before{position:absolute;top:0;left:0;width:100%;height:100%;text-indent:0}.cpac-tip{display:inline-block}.qtip.qtip-tipsy{background:rgba(0,0,0,.75);font-weight:400;min-width:25px}
assets/images/switch_bw.png DELETED
Binary file
assets/js/admin-settings.js CHANGED
@@ -2,13 +2,14 @@
2
* Fires when the dom is ready
3
*
4
*/
5
- jQuery(document).ready(function() {
6
7
- if ( jQuery('#cpac').length === 0 ) {
8
return false;
9
}
10
11
// General
12
cpac_pointer();
13
cpac_submit_form();
14
@@ -16,21 +17,12 @@ jQuery(document).ready(function() {
16
cpac_clear_input_defaults();
17
18
// Columns Page
19
- cpac_sortable();
20
- cpac_menu();
21
cpac_help();
22
cpac_add_column();
23
cpac_importexport();
24
cpac_sidebar_feedback();
25
-
26
- // we start by binding the toggle and remove events.
27
- jQuery('.cpac-column').each( function( i, col ) {
28
- jQuery( col ).column_bind_toggle();
29
- jQuery( col ).column_bind_remove();
30
- jQuery( col ).column_bind_clone();
31
- jQuery( col ).cpac_bind_container_addon_events();
32
- });
33
- });
34
35
function cpac_importexport() {
36
jQuery( '#php-export-results textarea' ).on( 'focus, mouseup', function() {
@@ -44,11 +36,67 @@ function cpac_importexport() {
44
* @since 2.0.2
45
*/
46
function cpac_submit_form() {
47
- jQuery('.form-update a.submit-update').click( function(e){
48
- e.preventDefault();
49
50
- jQuery(this).closest('.columns-container').find('.cpac-columns form').submit();
51
- });
52
}
53
54
/*
@@ -60,18 +108,23 @@ function cpac_submit_form() {
60
*/
61
jQuery.fn.column_bind_toggle = function() {
62
63
- var column = jQuery(this);
64
65
column.find( 'td.column_type a, td.column_edit, td.column_label a.toggle, td.column_label .edit-button' ).click( function( e ) {
66
e.preventDefault();
67
68
column.toggleClass( 'opened' ).find( '.column-form' ).slideToggle( 150 );
69
70
- if ( ! column.hasClass( 'events-binded' ) ) {
71
column.column_bind_events();
72
}
73
74
- column.addClass('events-binded');
75
76
// hook for addons
77
jQuery( document ).trigger( 'column_init', column );
@@ -85,11 +138,11 @@ jQuery.fn.column_bind_toggle = function() {
85
*/
86
jQuery.fn.column_bind_remove = function() {
87
88
- jQuery(this).find('.remove-button').click( function(e) {
89
- jQuery(this).closest('.cpac-column').column_remove();
90
91
e.preventDefault();
92
- });
93
};
94
95
/**
@@ -116,35 +169,63 @@ jQuery.fn.column_bind_clone = function() {
116
117
jQuery.fn.cpac_column_refresh = function() {
118
var el = jQuery( this );
119
120
// Mark column as loading
121
el.addClass( 'loading' );
122
- el.find( '.column-form' ).prepend( '<span class="spinner" />' );
123
124
// Fetch new form HTML
125
- jQuery.post( ajaxurl, {
126
- plugin_id: 'cpac',
127
- action: 'cpac_column_refresh',
128
- column: jQuery( this ).find( 'input.column-name' ).val(),
129
- formdata: jQuery( this ).parents( 'form' ).serialize()
130
}, function( data ) {
131
132
- // Replace current form by new form
133
- var newel = jQuery( '<div>' + data + '</div>' ).children();
134
- el.replaceWith( newel );
135
- el = newel;
136
137
- // Bind events
138
- el.column_bind_toggle();
139
- el.column_bind_remove();
140
- el.column_bind_clone();
141
- el.column_bind_events();
142
143
- // Remove "loading" marking from column
144
- el.removeClass( 'loading' ).addClass( 'opened' ).find( '.column-form' ).show();
145
146
- // Allow plugins to hook into this event
147
- jQuery( document ).trigger( 'column_change', el );
148
} );
149
};
150
@@ -155,18 +236,18 @@ jQuery.fn.cpac_column_refresh = function() {
155
*/
156
jQuery.fn.column_bind_events = function() {
157
158
- var column = jQuery( this );
159
- var container = column.closest( '.columns-container ');
160
- var storage_model = container.attr( 'data-type' );
161
162
// Current column type
163
- var default_value = column.find( '.column_type select option:selected' ).val();
164
165
column.find( '.column_type select' ).change( function() {
166
- var option = jQuery( 'optgroup', this ).children( ':selected' );
167
- var type = option.val();
168
- var label = option.text();
169
- var msg = jQuery( this ).next( '.msg' ).hide();
170
171
// Find template element for this field type
172
var template = container.find( '.for-cloning-only .cpac-column[data-type="' + type + '"]' );
@@ -176,16 +257,16 @@ jQuery.fn.column_bind_events = function() {
176
msg.html( template.find( '.is-disabled' ).html() ).show();
177
178
// Set to default
179
- jQuery(this).find( 'option' ).removeAttr( 'selected' );
180
- jQuery(this).find( 'option[value="' + default_value + '"]' ).attr( 'selected', 'selected' );
181
}
182
// Prevent column types that do not allow it to have multiple instances
183
else if ( typeof template.attr( 'data-clone' ) === 'undefined' && jQuery( '.cpac-columns', container ).find( '[data-type="' + type + '"]' ).length ) {
184
msg.html( cpac_i18n.clone.replace( '%s', '<strong>' + label + '</strong>' ) ).show();
185
186
// Set to default
187
- jQuery(this).find('option').removeAttr('selected');
188
- jQuery(this).find('option[value="' + default_value + '"]').attr('selected', 'selected');
189
190
return;
191
}
@@ -193,7 +274,7 @@ jQuery.fn.column_bind_events = function() {
193
var clone = template.clone();
194
195
// Open settings
196
- clone.addClass('opened').find('.column-form').show();
197
clone.find( '.column-meta' ).replaceWith( column.find( '.column-meta' ) );
198
clone.find( '.column-form' ).replaceWith( column.find( '.column-form' ) );
199
@@ -208,87 +289,87 @@ jQuery.fn.column_bind_events = function() {
208
} );
209
210
/** change label */
211
- column.find('.column_label .input input').bind( 'keyup change', function() {
212
213
var value = jQuery( this ).val();
214
- jQuery(this).closest('.cpac-column').find( 'td.column_label .inner > a.toggle' ).text( value );
215
- });
216
217
/** width */
218
219
- // slider
220
column.column_width_slider();
221
222
// indicator
223
- var width_indicator = column.find('.column-meta span.width');
224
- width_indicator.on( 'update', function(){
225
- var _width = column.find('input.width').val();
226
- var _unit = column.find('input.unit').filter(':checked').val();
227
- if ( _width > 0 ) {
228
- jQuery(this).text( _width + _unit );
229
} else {
230
- jQuery(this).text('');
231
}
232
- });
233
234
// unit selector
235
- var width_unit_select = column.find('.column_width .unit-select label');
236
- width_unit_select.on( 'click', function(){
237
238
- column.find('span.unit').text( jQuery(this).find('input').val() );
239
column.column_width_slider(); // re-init slider
240
- width_indicator.trigger('update'); // update indicator
241
- });
242
243
// width_input
244
- var width_input = column.find('input.width')
245
- .on( 'keyup', function() {
246
- column.column_width_slider(); // re-init slider
247
- jQuery(this).trigger('validate'); // validate input
248
- width_indicator.trigger('update'); // update indicator
249
- })
250
-
251
- // width_input:validate
252
- .on( 'validate', function() {
253
- var _width = width_input.val();
254
- var _new_width = jQuery.trim( _width );
255
-
256
- if ( ! jQuery.isNumeric( _new_width ) ) {
257
- _new_width = _new_width.replace(/\D/g,'');
258
- }
259
- if ( _new_width.length > 3 ) {
260
- _new_width = _new_width.substring(0, 3);
261
- }
262
- if ( _new_width <= 0 ) {
263
- _new_width = '';
264
- }
265
- if ( _new_width !== _width ) {
266
- width_input.val( _new_width );
267
- }
268
- });
269
270
/** display custom image size */
271
- column.find('.column_image_size label.custom-size').click( function(){
272
273
- var parent = jQuery(this).closest('.input');
274
275
- if ( jQuery(this).hasClass('image-size-custom') ) {
276
- jQuery('.custom-size-w', parent).removeClass('hidden');
277
- jQuery('.custom-size-h', parent).removeClass('hidden');
278
}
279
280
else {
281
- jQuery('.custom-size-w', parent).addClass('hidden');
282
- jQuery('.custom-size-h', parent).addClass('hidden');
283
}
284
- });
285
286
- /** tooltip */
287
- column.find('.column-form .label label, .column-form .label .info').hover(function(){
288
- jQuery(this).parents( '.label' ).find('p.description').show();
289
- },function(){
290
- jQuery(this).parents( '.label' ).find('p.description').hide();
291
- });
292
293
// refresh column and re-bind all events
294
column.find( '[data-refresh="1"] select' ).change( function() {
@@ -302,9 +383,9 @@ jQuery.fn.column_bind_events = function() {
302
* @since 2.0
303
*/
304
jQuery.fn.column_remove = function() {
305
- jQuery(this).addClass('deleting').animate({ opacity : 0, height: 0 }, 350, function(e) {
306
- jQuery(this).remove();
307
- });
308
};
309
310
/*
@@ -314,14 +395,14 @@ jQuery.fn.column_remove = function() {
314
*/
315
jQuery.fn.column_width_slider = function() {
316
317
- var column_width = jQuery(this).find('.column_width');
318
319
- var input_width = column_width.find('input.width'),
320
- input_unit = column_width.find('input.unit'),
321
- unit = input_unit.filter(':checked').val(),
322
width = input_width.val(),
323
- slider = column_width.find('.width-slider'),
324
- indicator = jQuery(this).find('.column-meta span.width');
325
326
// width
327
if ( '%' == unit && width > 100 ) {
@@ -330,18 +411,18 @@ jQuery.fn.column_width_slider = function() {
330
331
input_width.val( width );
332
333
- slider.slider({
334
- range: 'min',
335
- min: 0,
336
- max: '%' == unit ? 100 : 500,
337
- value: width,
338
- slide: function( event, ui ) {
339
340
input_width.val( ui.value );
341
- indicator.trigger('update');
342
- input_width.trigger('validate');
343
}
344
- });
345
};
346
347
/*
@@ -353,6 +434,7 @@ jQuery.fn.column_clone = function() {
353
354
var container = jQuery( this ).closest( '.columns-container' );
355
var column = jQuery( this );
356
357
if ( typeof column.attr( 'data-clone' ) === 'undefined' ) {
358
var message = cpac_i18n.clone.replace( '%s', '<strong>' + column.find( '.column_label .toggle' ).text() + '</strong>' );
@@ -381,7 +463,7 @@ jQuery.fn.column_clone = function() {
381
clone.column_bind_events();
382
383
// reinitialize sortability
384
- cpac_sortable();
385
386
// hook for addons
387
jQuery( document ).trigger( 'column_add', clone );
@@ -398,24 +480,24 @@ jQuery.fn.cpac_update_clone_id = function( storage_model ) {
398
399
var el = jQuery( this );
400
401
- var type = el.attr( 'data-type' );
402
- var all_columns = jQuery( '.columns-container[data-type="' + storage_model + '"]').find( '.cpac-columns' );
403
- var columns = jQuery( all_columns ).find( '*[data-type="' + type + '"]' ).not( el );
404
405
// get clone ID
406
- var ids = jQuery.map( columns, function( e, i ) {
407
- if ( jQuery(e).attr('data-clone') ){
408
return parseInt( jQuery( e ).attr( 'data-clone' ), 10 );
409
}
410
return 0;
411
- });
412
413
ids.sort();
414
var max_id = Math.max.apply( null, ids ) + 1;
415
- for ( var id=0; id<=max_id; id++ ) {
416
if ( -1 === jQuery.inArray( id, ids ) ) {
417
- break;
418
- }
419
}
420
421
// only increment when needed
@@ -442,26 +524,27 @@ jQuery.fn.cpac_update_clone_id = function( storage_model ) {
442
var new_name = type + '-' + id;
443
444
// name
445
- if( jQuery(v).attr( 'name' ) ) {
446
- jQuery(v).attr( 'name', jQuery(v).attr( 'name' ).replace( type + clone_suffix, new_name) );
447
}
448
449
// for
450
- if( jQuery(v).attr( 'for' ) ) {
451
- jQuery(v).attr( 'for', jQuery(v).attr( 'for' ).replace( type + clone_suffix, new_name ) );
452
}
453
454
// id
455
- if( jQuery(v).attr( 'id' ) ) {
456
- jQuery(v).attr( 'id', jQuery(v).attr( 'id' ).replace( type + clone_suffix, new_name ) );
457
}
458
- });
459
};
460
461
function cpac_create_column( container ) {
462
463
- var clone = jQuery( '.for-cloning-only .cpac-column', container ).first().clone();
464
var storage_model = container.attr( 'data-type' );
465
466
if ( clone.length > 0 ) {
467
// increment clone id ( before adding to DOM, otherwise radio buttons will reset )
@@ -470,20 +553,8 @@ function cpac_create_column( container ) {
470
// add to DOM
471
jQuery( '.cpac-columns form', container ).append( clone );
472
473
- // rebind toggle events
474
- clone.column_bind_toggle();
475
-
476
- // rebind remove events
477
- clone.column_bind_remove();
478
-
479
- // rebind clone events
480
- clone.column_bind_clone();
481
-
482
- // rebind all other events
483
- clone.column_bind_events();
484
-
485
- // reinitialize sortability
486
- cpac_sortable();
487
488
// hook for addons
489
jQuery( document ).trigger( 'column_add', clone );
@@ -504,12 +575,12 @@ function cpac_add_column() {
504
var clone = cpac_create_column( container );
505
506
// open settings
507
- clone.addClass('opened').find('.column-form').slideDown(150, function(){
508
- jQuery('html, body').animate({ scrollTop: clone.offset().top - 58 }, 300);
509
- });
510
511
e.preventDefault();
512
- });
513
}
514
515
/**
@@ -541,17 +612,17 @@ function cpac_sidebar_feedback() {
541
*/
542
function cpac_clear_input_defaults() {
543
jQuery.fn.cleardefault = function() {
544
- return this.focus(function() {
545
- if( this.value == this.defaultValue ) {
546
this.value = "";
547
}
548
- }).blur(function() {
549
- if( !this.value.length ) {
550
this.value = this.defaultValue;
551
}
552
- });
553
};
554
- jQuery("#cpac-box-plugin_settings .addons input").cleardefault();
555
}
556
557
/*
@@ -560,17 +631,17 @@ function cpac_clear_input_defaults() {
560
* usage: <a href="javascript:;" class="help" data-help="tab-2"></a>
561
*/
562
function cpac_help() {
563
- jQuery('#cpac a.help').click( function(e) {
564
e.preventDefault();
565
566
- var panel = jQuery('#contextual-help-wrap');
567
568
panel.parent().show();
569
- jQuery('a[href="#tab-panel-cpac-' + jQuery(this).attr('data-help') + '"]', panel).trigger('click');
570
panel.slideDown( 'fast', function() {
571
panel.focus();
572
- });
573
- });
574
}
575
576
/*
@@ -578,62 +649,75 @@ function cpac_help() {
578
*
579
*/
580
function cpac_pointer() {
581
- jQuery('.cpac-pointer').each(function(){
582
583
// vars
584
- var el = jQuery(this),
585
- html = el.attr('rel'),
586
- pos = el.attr('data-pos');
587
588
var position = {
589
- at: 'left top', // position of wp-pointer relative to the element which triggers the pointer event
590
- my: 'right top', // position of wp-pointer relative to the at-coordinates
591
- edge: 'right', // position of arrow
592
- offset: '0 0' // offset for wp-pointer
593
};
594
595
if ( 'right' == pos ) {
596
position = {
597
- at: 'right middle',
598
- my: 'left middle',
599
- edge: 'left'
600
};
601
}
602
603
// create pointer
604
- el.pointer({
605
- content: jQuery('#' + html).html(),
606
- position: position,
607
- pointerWidth: 250,
608
- close: function() {
609
- el.removeClass('open');
610
},
611
612
// bug fix. with an arrow on the right side the position of wp-pointer is incorrect. it does not take
613
// into account the padding of the arrow. adding "wp-pointer-' + position.edge" will fix that.
614
- pointerClass: 'wp-pointer wp-pointer-' + position.edge
615
- });
616
617
// click
618
- el.click( function() {
619
- if( el.hasClass('open') ) {
620
- el.removeClass('open');
621
- }
622
- else {
623
- el.addClass('open');
624
- }
625
- });
626
627
// show on hover
628
el.hover( function() {
629
- jQuery(this).pointer('open');
630
}, function() {
631
- if( ! el.hasClass('open') ) {
632
- jQuery(this).pointer('close');
633
}
634
635
- });
636
- });
637
}
638
639
/*
@@ -641,8 +725,8 @@ function cpac_pointer() {
641
*
642
* @since 1.5
643
*/
644
- function cpac_sortable() {
645
- jQuery( 'div.cpac-columns' ).each( function() {
646
if ( jQuery( this ).hasClass( 'ui-sortable' ) ) {
647
jQuery( this ).sortable( 'refresh' );
648
}
@@ -652,56 +736,72 @@ function cpac_sortable() {
652
} );
653
}
654
} );
655
- }
656
-
657
- /*
658
- * Menu
659
- *
660
- * @since 1.5
661
- */
662
- function cpac_menu() {
663
664
- var menu = jQuery('#cpac div.cpac-menu');
665
- // click
666
- menu.find('a').click( function(e, el) {
667
668
- var id = jQuery(this).attr('href');
669
670
- if ( id ) {
671
672
- var type = id.replace('#cpac-box-','');
673
674
- // remove current
675
- jQuery('.cpac-menu a').removeClass('current');
676
- jQuery('.columns-container').hide();
677
678
- // set current
679
- jQuery(this).addClass('current');
680
- var container = jQuery('.columns-container[data-type="' + type + '"]').show();
681
- var columns = container.find( '.cpac-columns' );
682
683
- // hook for addons
684
- jQuery( document ).trigger( 'cac_menu_change', columns );
685
- }
686
687
- // re init sidebar scroll
688
- //cpac_sidebar_scroll();
689
690
- e.preventDefault();
691
- });
692
693
- // activate first menu
694
- menu.find('a.current').trigger('click');
695
}
696
697
/*
698
* Bind events: triggered after column is init, changed or added
699
*
700
*/
701
- jQuery( document ).bind('column_init column_change column_add', function( e, column ){
702
jQuery( column ).cpac_bind_column_addon_events();
703
- jQuery( column ).cpac_bind_container_addon_events();
704
- });
705
706
/*
707
* Optional Radio Click events
@@ -710,56 +810,56 @@ jQuery( document ).bind('column_init column_change column_add', function( e, col
710
jQuery.fn.cpac_bind_column_addon_events = function() {
711
712
var column = jQuery( this );
713
- var inputs = column.find('[data-toggle-id] label');
714
715
- inputs.on( 'click', function(){
716
717
- var id = jQuery( this ).closest('td.input').data('toggle-id');
718
var state = jQuery( 'input', this ).val();
719
720
// Toggle indicator icon
721
- var label = column.find('[data-indicator-id="' + id + '"]' ).removeClass( 'on' );
722
if ( 'on' == state ) {
723
label.addClass( 'on' );
724
}
725
726
// Toggle additional options
727
- var additional = column.find('[data-additional-option-id="' + id + '"]' ).addClass( 'hide' );
728
if ( 'on' == state ) {
729
additional.removeClass( 'hide' );
730
}
731
- });
732
733
- // Hide additonal options on ready
734
- column.find('[data-toggle-id]').each( function(){
735
- var additional = column.find('[data-additional-option-id="' + jQuery( this ).data('toggle-id') + '"]' ).addClass( 'hide' );
736
if ( 'on' == jQuery( 'input:checked', this ).val() ) {
737
additional.removeClass( 'hide' );
738
}
739
- });
740
};
741
742
/*
743
* Indicator Click Events
744
*
745
*/
746
- jQuery.fn.cpac_bind_container_addon_events = function() {
747
748
var column = jQuery( this );
749
- var indicator = column.find('[data-indicator-id]');
750
751
- indicator.unbind('click').click( function() {
752
753
- var id = jQuery( this ).data('indicator-id');
754
- var radio = column.find('[data-toggle-id="' + id + '"] input' );
755
756
- if ( jQuery( this ).hasClass('on') ) {
757
- jQuery( this ).removeClass('on').addClass('off');
758
- radio.filter('[value=off]').prop('checked', true);
759
}
760
else {
761
- jQuery( this ).removeClass('off').addClass('on');
762
- radio.filter('[value=on]').prop('checked', true);
763
}
764
- });
765
- };
2
* Fires when the dom is ready
3
*
4
*/
5
+ jQuery( document ).ready( function() {
6
7
+ if ( jQuery( '#cpac' ).length === 0 ) {
8
return false;
9
}
10
11
// General
12
+ cpac_init();
13
cpac_pointer();
14
cpac_submit_form();
15
17
cpac_clear_input_defaults();
18
19
// Columns Page
20
+ cpac_menu(); // trigger for all other column events
21
cpac_help();
22
cpac_add_column();
23
cpac_importexport();
24
cpac_sidebar_feedback();
25
+ } );
26
27
function cpac_importexport() {
28
jQuery( '#php-export-results textarea' ).on( 'focus, mouseup', function() {
36
* @since 2.0.2
37
*/
38
function cpac_submit_form() {
39
40
+ var $save_buttons = jQuery( '.sidebox a.submit, .column-footer a.submit' );
41
+
42
+ $save_buttons.click( function( e ) {
43
+
44
+ var $button = jQuery( this );
45
+ var $container = $button.closest( '.columns-container' ).addClass( 'saving' );
46
+ var columns_data = $container.find( '.cpac-columns form' ).serialize();
47
+ var $msg = $container.find( '.ajax-message' );
48
+
49
+ $save_buttons.attr( 'disabled', 'disabled' );
50
+
51
+ // reset
52
+ $container.find( '.ajax-message' ).hide().removeClass( 'error updated' );
53
+ jQuery( '.cpac_message' ).remove(); // placed by restore button
54
+
55
+ var xhr = jQuery.post( ajaxurl, {
56
+ action : 'cpac_columns_update',
57
+ data : columns_data,
58
+ _ajax_nonce : cpac._ajax_nonce,
59
+ storage_model : $container.data( 'type' ),
60
+ layout : $container.data( 'layout' )
61
+ },
62
+
63
+ // JSON repsonse
64
+ function( response ) {
65
+ if ( response ) {
66
+ if ( response.success ) {
67
+ $msg.addClass( 'updated' ).find( 'p' ).html( response.data );
68
+ $msg.slideDown();//.delay( 2000 ).slideUp();
69
+
70
+ $container.addClass( 'stored' );
71
+ }
72
+
73
+ // Error message
74
+ else if ( response.data ) {
75
+ $msg.addClass( 'error' ).find( 'p' ).html( response.data );
76
+ $msg.slideDown();
77
+ }
78
+ }
79
+
80
+ // No response
81
+ else {
82
+ }
83
+
84
+ }, 'json' );
85
+
86
+ // No JSON
87
+ xhr.fail( function( error ) {
88
+ // We choose not to notify the user of errors, because the settings will have
89
+ // been saved correctly despite of PHP notices/errors from plugin or themes.
90
+ } );
91
+
92
+ // Always
93
+ xhr.always( function() {
94
+ $save_buttons.removeAttr( 'disabled', 'disabled' );
95
+ $container.removeClass( 'saving' );
96
+ } );
97
+
98
+ jQuery( document ).trigger( 'cac_update', $container );
99
+ } );
100
}
101
102
/*
108
*/
109
jQuery.fn.column_bind_toggle = function() {
110
111
+ var column = jQuery( this );
112
+ var is_disabled = column.closest( 'cpac-boxes' ).hasClass( 'disabled' );
113
114
column.find( 'td.column_type a, td.column_edit, td.column_label a.toggle, td.column_label .edit-button' ).click( function( e ) {
115
e.preventDefault();
116
117
column.toggleClass( 'opened' ).find( '.column-form' ).slideToggle( 150 );
118
119
+ if ( is_disabled ) {
120
+ return;
121
+ }
122
+
123
+ if ( !column.hasClass( 'events-binded' ) ) {
124
column.column_bind_events();
125
}
126
127
+ column.addClass( 'events-binded' );
128
129
// hook for addons
130
jQuery( document ).trigger( 'column_init', column );
138
*/
139
jQuery.fn.column_bind_remove = function() {
140
141
+ jQuery( this ).find( '.remove-button' ).click( function( e ) {
142
+ jQuery( this ).closest( '.cpac-column' ).column_remove();
143
144
e.preventDefault();
145
+ } );
146
};
147
148
/**
169
170
jQuery.fn.cpac_column_refresh = function() {
171
var el = jQuery( this );
172
+ var select = el.find( '.column_type select' );
173
+ var $container = jQuery( this ).closest( '.columns-container' );
174
175
// Mark column as loading
176
el.addClass( 'loading' );
177
+ select.prop( 'disabled', 1 );
178
179
// Fetch new form HTML
180
+ var xhr = jQuery.post( ajaxurl, {
181
+ plugin_id : 'cpac',
182
+ action : 'cpac_column_refresh',
183
+ _ajax_nonce : cpac._ajax_nonce,
184
+ column : jQuery( this ).find( 'input.column-name' ).val(),
185
+ formdata : jQuery( this ).parents( 'form' ).serialize(),
186
+ storage_model : $container.data( 'type' ),
187
+ layout : $container.data( 'layout' ),
188
}, function( data ) {
189
190
+ if ( data ) {
191
+ // Replace current form by new form
192
+ var newel = jQuery( '<div>' + data.data + '</div>' ).children();
193
+ el.replaceWith( newel );
194
+ el = newel;
195
196
+ // Bind events
197
+ el.column_bind_toggle();
198
+ el.column_bind_remove();
199
+ el.column_bind_clone();
200
+ el.column_bind_events();
201
202
+ el.addClass( 'opened' ).find( '.column-form' ).show();
203
+
204
+ // Allow plugins to hook into this event
205
+ jQuery( document ).trigger( 'column_change', el );
206
+ }
207
+
208
+ // Do nothing
209
+ else {
210
+
211
+ }
212
+ }, 'json' );
213
+
214
+ xhr.fail( function( error ) {
215
+ var $msg = el.closest( '.columns-container' ).find( '.ajax-message' );
216
+
217
+ $msg.addClass( 'error' ).find( 'p' ).html( cpac_i18n.error );
218
+ $msg.slideDown();
219
+
220
+ el.slideUp( function() { el.remove() } );
221
222
+ console.log( error.responseText );
223
+ } );
224
+
225
+ xhr.always( function() {
226
+ // Remove "loading" marking from column
227
+ el.removeClass( 'loading' );
228
+ select.prop( 'disabled', false );
229
} );
230
};
231
236
*/
237
jQuery.fn.column_bind_events = function() {
238
239
+ var column = jQuery( this );
240
+ var container = column.closest( '.columns-container ' );
241
+ var storage_model = container.attr( 'data-type' );
242
243
// Current column type
244
+ var default_value = column.find( '.column_type select option:selected' ).val();
245
246
column.find( '.column_type select' ).change( function() {
247
+ var option = jQuery( 'optgroup', this ).children( ':selected' );
248
+ var type = option.val();
249
+ var label = option.text();
250
+ var msg = jQuery( this ).next( '.msg' ).hide();
251
252
// Find template element for this field type
253
var template = container.find( '.for-cloning-only .cpac-column[data-type="' + type + '"]' );
257
msg.html( template.find( '.is-disabled' ).html() ).show();
258
259
// Set to default
260
+ jQuery( this ).find( 'option' ).removeAttr( 'selected' );
261
+ jQuery( this ).find( 'option[value="' + default_value + '"]' ).attr( 'selected', 'selected' );
262
}
263
// Prevent column types that do not allow it to have multiple instances
264
else if ( typeof template.attr( 'data-clone' ) === 'undefined' && jQuery( '.cpac-columns', container ).find( '[data-type="' + type + '"]' ).length ) {
265
msg.html( cpac_i18n.clone.replace( '%s', '<strong>' + label + '</strong>' ) ).show();
266
267
// Set to default
268
+ jQuery( this ).find( 'option' ).removeAttr( 'selected' );
269
+ jQuery( this ).find( 'option[value="' + default_value + '"]' ).attr( 'selected', 'selected' );
270
271
return;
272
}
274
var clone = template.clone();
275
276
// Open settings
277
+ clone.addClass( 'opened' ).find( '.column-form' ).show();
278
clone.find( '.column-meta' ).replaceWith( column.find( '.column-meta' ) );
279
clone.find( '.column-form' ).replaceWith( column.find( '.column-form' ) );
280
289
} );
290
291
/** change label */
292
+ column.find( '.column_label .input input' ).bind( 'keyup change', function() {
293
294
var value = jQuery( this ).val();
295
+ jQuery( this ).closest( '.cpac-column' ).find( 'td.column_label .inner > a.toggle' ).text( value );
296
+ } );
297
298
/** width */
299
300
+ // slider
301
column.column_width_slider();
302
303
// indicator
304
+ var width_indicator = column.find( '.column-meta span.width' );
305
+ width_indicator.on( 'update', function() {
306
+ var _width = column.find( 'input.width' ).val();
307
+ var _unit = column.find( 'input.unit' ).filter( ':checked' ).val();
308
+ if ( _width > 0 ) {
309
+ jQuery( this ).text( _width + _unit );
310
} else {
311
+ jQuery( this ).text( '' );
312
}
313
+ } );
314
315
// unit selector
316
+ var width_unit_select = column.find( '.column_width .unit-select label' );
317
+ width_unit_select.on( 'click', function() {
318
319
+ column.find( 'span.unit' ).text( jQuery( this ).find( 'input' ).val() );
320
column.column_width_slider(); // re-init slider
321
+ width_indicator.trigger( 'update' ); // update indicator
322
+ } );
323
324
// width_input
325
+ var width_input = column.find( 'input.width' )
326
+ .on( 'keyup', function() {
327
+ column.column_width_slider(); // re-init slider
328
+ jQuery( this ).trigger( 'validate' ); // validate input
329
+ width_indicator.trigger( 'update' ); // update indicator
330
+ } )
331
+
332
+ // width_input:validate
333
+ .on( 'validate', function() {
334
+ var _width = width_input.val();
335
+ var _new_width = jQuery.trim( _width );
336
+
337
+ if ( !jQuery.isNumeric( _new_width ) ) {
338
+ _new_width = _new_width.replace( /\D/g, '' );
339
+ }
340
+ if ( _new_width.length > 3 ) {
341
+ _new_width = _new_width.substring( 0, 3 );
342
+ }
343
+ if ( _new_width <= 0 ) {
344
+ _new_width = '';
345
+ }
346
+ if ( _new_width !== _width ) {
347
+ width_input.val( _new_width );
348
+ }
349
+ } );
350
351
/** display custom image size */
352
+ column.find( '.column_image_size label.custom-size' ).click( function() {
353
354
+ var parent = jQuery( this ).closest( '.input' );
355
356
+ if ( jQuery( this ).hasClass( 'image-size-custom' ) ) {
357
+ jQuery( '.custom-size-w', parent ).removeClass( 'hidden' );
358
+ jQuery( '.custom-size-h', parent ).removeClass( 'hidden' );
359
}
360
361
else {
362
+ jQuery( '.custom-size-w', parent ).addClass( 'hidden' );
363
+ jQuery( '.custom-size-h', parent ).addClass( 'hidden' );
364
}
365
+ } );
366
367
+ /** tooltip */
368
+ column.find( '.column-form .label label, .column-form .label .info' ).hover( function() {
369
+ jQuery( this ).parents( '.label' ).find( 'p.description' ).show();
370
+ }, function() {
371
+ jQuery( this ).parents( '.label' ).find( 'p.description' ).hide();
372
+ } );
373
374
// refresh column and re-bind all events
375
column.find( '[data-refresh="1"] select' ).change( function() {
383
* @since 2.0
384
*/
385
jQuery.fn.column_remove = function() {
386
+ jQuery( this ).addClass( 'deleting' ).animate( { opacity : 0, height : 0 }, 350, function( e ) {
387
+ jQuery( this ).remove();
388
+ } );
389
};
390
391
/*
395
*/
396
jQuery.fn.column_width_slider = function() {
397
398
+ var column_width = jQuery( this ).find( '.column_width' );
399
400
+ var input_width = column_width.find( 'input.width' ),
401
+ input_unit = column_width.find( 'input.unit' ),
402
+ unit = input_unit.filter( ':checked' ).val(),
403
width = input_width.val(),
404
+ slider = column_width.find( '.width-slider' ),
405
+ indicator = jQuery( this ).find( '.column-meta span.width' );
406
407
// width
408
if ( '%' == unit && width > 100 ) {
411
412
input_width.val( width );
413
414
+ slider.slider( {
415
+ range : 'min',
416
+ min : 0,
417
+ max : '%' == unit ? 100 : 500,
418
+ value : width,
419
+ slide : function( event, ui ) {
420
421
input_width.val( ui.value );
422
+ indicator.trigger( 'update' );
423
+ input_width.trigger( 'validate' );
424
}
425
+ } );
426
};
427
428
/*
434
435
var container = jQuery( this ).closest( '.columns-container' );
436
var column = jQuery( this );
437
+ var columns = jQuery( this ).closest( 'cpac-columns' );
438
439
if ( typeof column.attr( 'data-clone' ) === 'undefined' ) {
440
var message = cpac_i18n.clone.replace( '%s', '<strong>' + column.find( '.column_label .toggle' ).text() + '</strong>' );
463
clone.column_bind_events();
464
465
// reinitialize sortability
466
+ columns.cpac_bind_ordering();
467
468
// hook for addons
469
jQuery( document ).trigger( 'column_add', clone );
480
481
var el = jQuery( this );
482
483
+ var type = el.attr( 'data-type' );
484
+ var all_columns = jQuery( '.columns-container[data-type="' + storage_model + '"]' ).find( '.cpac-columns' );
485
+ var columns = jQuery( all_columns ).find( '*[data-type="' + type + '"]' ).not( el );
486
487
// get clone ID
488
+ var ids = jQuery.map( columns, function( e, i ) {
489
+ if ( jQuery( e ).attr( 'data-clone' ) ) {
490
return parseInt( jQuery( e ).attr( 'data-clone' ), 10 );
491
}
492
return 0;
493
+ } );
494
495
ids.sort();
496
var max_id = Math.max.apply( null, ids ) + 1;
497
+ for ( var id = 0; id <= max_id; id++ ) {
498
if ( -1 === jQuery.inArray( id, ids ) ) {
499
+ break;
500
+ }
501
}
502
503
// only increment when needed
524
var new_name = type + '-' + id;
525
526
// name
527
+ if ( jQuery( v ).attr( 'name' ) ) {
528
+ jQuery( v ).attr( 'name', jQuery( v ).attr( 'name' ).replace( type + clone_suffix, new_name ) );
529
}
530
531
// for
532
+ if ( jQuery( v ).attr( 'for' ) ) {
533
+ jQuery( v ).attr( 'for', jQuery( v ).attr( 'for' ).replace( type + clone_suffix, new_name ) );
534
}
535
536
// id
537
+ if ( jQuery( v ).attr( 'id' ) ) {
538
+ jQuery( v ).attr( 'id', jQuery( v ).attr( 'id' ).replace( type + clone_suffix, new_name ) );
539
}
540
+ } );
541
};
542
543
function cpac_create_column( container ) {
544
545
+ var clone = jQuery( '.for-cloning-only .cpac-column', container ).not( '[data-default="1"]' ).first().clone();
546
var storage_model = container.attr( 'data-type' );
547
+ var columns = container.find( 'cpac-columns' );
548
549
if ( clone.length > 0 ) {
550
// increment clone id ( before adding to DOM, otherwise radio buttons will reset )
553
// add to DOM
554
jQuery( '.cpac-columns form', container ).append( clone );
555
556
+ // refresh column
557
+ clone.cpac_column_refresh();
558
559
// hook for addons
560
jQuery( document ).trigger( 'column_add', clone );
575
var clone = cpac_create_column( container );
576
577
// open settings
578
+ clone.addClass( 'opened' ).find( '.column-form' ).slideDown( 150, function() {
579
+ jQuery( 'html, body' ).animate( { scrollTop : clone.offset().top - 58 }, 300 );
580
+ } );
581
582
e.preventDefault();
583
+ } );
584
}
585
586
/**
612
*/
613
function cpac_clear_input_defaults() {
614
jQuery.fn.cleardefault = function() {
615
+ return this.focus( function() {
616
+ if ( this.value == this.defaultValue ) {
617
this.value = "";
618
}
619
+ } ).blur( function() {
620
+ if ( !this.value.length ) {
621
this.value = this.defaultValue;
622
}
623
+ } );
624
};
625
+ jQuery( "#cpac-box-plugin_settings .addons input" ).cleardefault();
626
}
627
628
/*
631
* usage: <a href="javascript:;" class="help" data-help="tab-2"></a>
632
*/
633
function cpac_help() {
634
+ jQuery( '#cpac a.help' ).click( function( e ) {
635
e.preventDefault();
636
637
+ var panel = jQuery( '#contextual-help-wrap' );
638
639
panel.parent().show();
640
+ jQuery( 'a[href="#tab-panel-cpac-' + jQuery( this ).attr( 'data-help' ) + '"]', panel ).trigger( 'click' );
641
panel.slideDown( 'fast', function() {
642
panel.focus();
643
+ } );
644
+ } );
645
}
646
647
/*
649
*
650
*/
651
function cpac_pointer() {
652
+ jQuery( '.cpac-pointer' ).each( function() {
653
654
// vars
655
+ var el = jQuery( this ),
656
+ html = el.attr( 'rel' ),
657
+ pos = el.attr( 'data-pos' ),
658
+ w = el.attr( 'data-width' ),
659
+ noclick = el.attr( 'data-noclick' );
660
661
var position = {
662
+ at : 'left top', // position of wp-pointer relative to the element which triggers the pointer event
663
+ my : 'right top', // position of wp-pointer relative to the at-coordinates
664
+ edge : 'right', // position of arrow
665
};
666
667
+ var width = w ? w : 250;
668
+
669
if ( 'right' == pos ) {
670
position = {
671
+ at : 'right middle',
672
+ my : 'left middle',
673
+ edge : 'left'
674
+ };
675
+ }
676
+
677
+ if ( 'left' == pos ) {
678
+ position = {
679
+ at : 'left middle',
680
+ my : 'right middle',
681
+ edge : 'right'
682
};
683
}
684
685
// create pointer
686
+ el.pointer( {
687
+ content : jQuery( '#' + html ).html(),
688
+ position : position,
689
+ pointerWidth : width,
690
+ close : function() {
691
+ el.removeClass( 'open' );
692
},
693
694
// bug fix. with an arrow on the right side the position of wp-pointer is incorrect. it does not take
695
// into account the padding of the arrow. adding "wp-pointer-' + position.edge" will fix that.
696
+ pointerClass : 'wp-pointer wp-pointer-' + position.edge + ( noclick ? ' noclick' : '' )
697
+ } );
698
699
// click
700
+ if ( !noclick ) {
701
+ el.click( function() {
702
+ if ( el.hasClass( 'open' ) ) {
703
+ el.removeClass( 'open' );
704
+ }
705
+ else {
706
+ el.addClass( 'open' );
707
+ }
708
+ } );
709
+ }
710
711
// show on hover
712
el.hover( function() {
713
+ jQuery( this ).pointer( 'open' );
714
}, function() {
715
+ if ( !el.hasClass( 'open' ) ) {
716
+ jQuery( this ).pointer( 'close' );
717
}
718
719
+ } );
720
+ } );
721
}
722
723
/*
725
*
726
* @since 1.5
727
*/
728
+ jQuery.fn.cpac_bind_ordering = function() {
729
+ jQuery( this ).each( function() {
730
if ( jQuery( this ).hasClass( 'ui-sortable' ) ) {
731
jQuery( this ).sortable( 'refresh' );
732
}
736
} );
737
}
738
} );
739
+ };
740
741
+ function cpac_init() {
742
743
+ var container = jQuery( '.columns-container' );
744
+ var boxes = container.find( '.cpac-boxes' );
745
746
+ // Written for PHP Export
747
+ if ( boxes.hasClass( 'disabled' ) ) {
748
+ boxes.find( '.cpac-column' ).each( function( i, col ) {
749
+ jQuery( col ).column_bind_toggle();
750
+ jQuery( col ).find( 'input, select' ).prop( 'disabled', true );
751
+ } );
752
+ }
753
754
+ else {
755
+ var columns = boxes.find( '.cpac-columns' );
756
757
+ // we start by binding the toggle and remove events.
758
+ columns.find( '.cpac-column' ).each( function( i, col ) {
759
+ jQuery( col ).column_bind_toggle();
760
+ jQuery( col ).column_bind_remove();
761
+ jQuery( col ).column_bind_clone();
762
+ jQuery( col ).cpac_bind_indicator_events();
763
+ } );
764
765
+ // ordering of columns
766
+ columns.cpac_bind_ordering();
767
+ }
768
769
+ // hook for addons
770
+ jQuery( document ).trigger( 'cac_menu_change', columns ); // deprecated
771
+ jQuery( document ).trigger( 'cac_model_ready', container.data( 'type' ) );
772
+ }
773
774
+ /*
775
+ * Menu
776
+ *
777
+ * @since 1.5
778
+ */
779
+ function cpac_menu() {
780
781
+ //jQuery( '.spinner' ).css( 'visibility', 'visible' );
782
783
+ jQuery( '#cpac_storage_modal_select' ).on( 'change', function() {
784
+ jQuery( this ).prop( 'disabled', true ).next( '.spinner' ).css( 'display', 'inline-block' );
785
+ jQuery( '.view-link' ).hide();
786
+ window.location = jQuery( this ).val();
787
+ } );
788
}
789
790
/*
791
* Bind events: triggered after column is init, changed or added
792
*
793
*/
794
+ jQuery( document ).bind( 'column_init column_change column_add', function( e, column ) {
795
+
796
+ var is_disabled = jQuery( column ).closest( '.cpac-boxes' ).hasClass( 'disabled' );
797
+
798
+ if ( is_disabled ) {
799
+ return;
800
+ }
801
+
802
jQuery( column ).cpac_bind_column_addon_events();
803
+ jQuery( column ).cpac_bind_indicator_events();
804
+ } );
805
806
/*
807
* Optional Radio Click events
810
jQuery.fn.cpac_bind_column_addon_events = function() {
811
812
var column = jQuery( this );
813
+ var inputs = column.find( '[data-toggle-id] label' );
814
815
+ inputs.on( 'click', function() {
816
817
+ var id = jQuery( this ).closest( 'td.input' ).data( 'toggle-id' );
818
var state = jQuery( 'input', this ).val();
819
820
// Toggle indicator icon
821
+ var label = column.find( '[data-indicator-id="' + id + '"]' ).removeClass( 'on' );
822
if ( 'on' == state ) {
823
label.addClass( 'on' );
824
}
825
826
// Toggle additional options
827
+ var additional = column.find( '[data-additional-option-id="' + id + '"]' ).addClass( 'hide' );
828
if ( 'on' == state ) {
829
additional.removeClass( 'hide' );
830
}
831
+ } );
832
833
+ // Toggle additional column settings
834
+ column.find( '[data-toggle-id]' ).each( function() {
835
+ var additional = column.find( '[data-additional-option-id="' + jQuery( this ).data( 'toggle-id' ) + '"]' ).addClass( 'hide' );
836
if ( 'on' == jQuery( 'input:checked', this ).val() ) {
837
additional.removeClass( 'hide' );
838
}
839
+ } );
840
};
841
842
/*
843
* Indicator Click Events
844
*
845
*/
846
+ jQuery.fn.cpac_bind_indicator_events = function() {
847
848
var column = jQuery( this );
849
+ var indicator = column.find( '[data-indicator-id]' );
850
851
+ indicator.unbind( 'click' ).click( function() {
852
853
+ var id = jQuery( this ).data( 'indicator-id' );
854
+ var radio = column.find( '[data-toggle-id="' + id + '"] input' );
855
856
+ if ( jQuery( this ).hasClass( 'on' ) ) {
857
+ jQuery( this ).removeClass( 'on' ).addClass( 'off' );
858
+ radio.filter( '[value=off]' ).prop( 'checked', true );
859
}
860
else {
861
+ jQuery( this ).removeClass( 'off' ).addClass( 'on' );
862
+ radio.filter( '[value=on]' ).prop( 'checked', true );
863
}
864
+ } );
865
+ };
assets/js/admin-settings.min.js CHANGED
@@ -1 +1 @@
1
- function cpac_importexport(){jQuery("#php-export-results textarea").on("focus, mouseup",function(){jQuery(this).select()}).select().focus()}function cpac_submit_form(){jQuery(".form-update a.submit-update").click(function(e){e.preventDefault(),jQuery(this).closest(".columns-container").find(".cpac-columns form").submit()})}function cpac_create_column(e){var n=jQuery(".for-cloning-only .cpac-column",e).first().clone(),t=e.attr("data-type");return n.length>0&&(n.cpac_update_clone_id(t),jQuery(".cpac-columns form",e).append(n),n.column_bind_toggle(),n.column_bind_remove(),n.column_bind_clone(),n.column_bind_events(),cpac_sortable(),jQuery(document).trigger("column_add",n)),n}function cpac_add_column(){jQuery("#cpac .add_column").click(function(e){var n=jQuery(this).closest(".columns-container"),t=cpac_create_column(n);t.addClass("opened").find(".column-form").slideDown(150,function(){jQuery("html, body").animate({scrollTop:t.offset().top-58},300)}),e.preventDefault()})}function cpac_sidebar_feedback(){jQuery(function(e){var n=e(".sidebox#direct-feedback");n.find("#feedback-choice a.no").click(function(e){e.preventDefault(),n.find("#feedback-choice").slideUp(),n.find("#feedback-support").slideDown()}),n.find("#feedback-choice a.yes").click(function(e){e.preventDefault(),n.find("#feedback-choice").slideUp(),n.find("#feedback-rate").slideDown()})})}function cpac_clear_input_defaults(){jQuery.fn.cleardefault=function(){return this.focus(function(){this.value==this.defaultValue&&(this.value="")}).blur(function(){this.value.length||(this.value=this.defaultValue)})},jQuery("#cpac-box-plugin_settings .addons input").cleardefault()}function cpac_help(){jQuery("#cpac a.help").click(function(e){e.preventDefault();var n=jQuery("#contextual-help-wrap");n.parent().show(),jQuery('a[href="#tab-panel-cpac-'+jQuery(this).attr("data-help")+'"]',n).trigger("click"),n.slideDown("fast",function(){n.focus()})})}function cpac_pointer(){jQuery(".cpac-pointer").each(function(){var e=jQuery(this),n=e.attr("rel"),t=e.attr("data-pos"),i={at:"left top",my:"right top",edge:"right",offset:"0 0"};"right"==t&&(i={at:"right middle",my:"left middle",edge:"left"}),e.pointer({content:jQuery("#"+n).html(),position:i,pointerWidth:250,close:function(){e.removeClass("open")},pointerClass:"wp-pointer wp-pointer-"+i.edge}),e.click(function(){e.hasClass("open")?e.removeClass("open"):e.addClass("open")}),e.hover(function(){jQuery(this).pointer("open")},function(){e.hasClass("open")||jQuery(this).pointer("close")})})}function cpac_sortable(){jQuery("div.cpac-columns").each(function(){jQuery(this).hasClass("ui-sortable")?jQuery(this).sortable("refresh"):jQuery(this).sortable({items:".cpac-column"})})}function cpac_menu(){var e=jQuery("#cpac div.cpac-menu");e.find("a").click(function(e,n){var t=jQuery(this).attr("href");if(t){var i=t.replace("#cpac-box-","");jQuery(".cpac-menu a").removeClass("current"),jQuery(".columns-container").hide(),jQuery(this).addClass("current");var c=jQuery('.columns-container[data-type="'+i+'"]').show(),a=c.find(".cpac-columns");jQuery(document).trigger("cac_menu_change",a)}e.preventDefault()}),e.find("a.current").trigger("click")}jQuery(document).ready(function(){return 0===jQuery("#cpac").length?!1:(cpac_pointer(),cpac_submit_form(),cpac_clear_input_defaults(),cpac_sortable(),cpac_menu(),cpac_help(),cpac_add_column(),cpac_importexport(),cpac_sidebar_feedback(),void jQuery(".cpac-column").each(function(e,n){jQuery(n).column_bind_toggle(),jQuery(n).column_bind_remove(),jQuery(n).column_bind_clone(),jQuery(n).cpac_bind_container_addon_events()}))}),jQuery.fn.column_bind_toggle=function(){var e=jQuery(this);e.find("td.column_type a, td.column_edit, td.column_label a.toggle, td.column_label .edit-button").click(function(n){n.preventDefault(),e.toggleClass("opened").find(".column-form").slideToggle(150),e.hasClass("events-binded")||e.column_bind_events(),e.addClass("events-binded"),jQuery(document).trigger("column_init",e)})},jQuery.fn.column_bind_remove=function(){jQuery(this).find(".remove-button").click(function(e){jQuery(this).closest(".cpac-column").column_remove(),e.preventDefault()})},jQuery.fn.column_bind_clone=function(){jQuery(this).find(".clone-button").click(function(e){var n,t;e.preventDefault(),n=jQuery(this).closest(".cpac-column"),t=n.column_clone(),"undefined"!=typeof t&&t.removeClass("loading").hide().slideDown()})},jQuery.fn.cpac_column_refresh=function(){var e=jQuery(this);e.addClass("loading"),e.find(".column-form").prepend('<span class="spinner" />'),jQuery.post(ajaxurl,{plugin_id:"cpac",action:"cpac_column_refresh",column:jQuery(this).find("input.column-name").val(),formdata:jQuery(this).parents("form").serialize()},function(n){var t=jQuery("<div>"+n+"</div>").children();e.replaceWith(t),e=t,e.column_bind_toggle(),e.column_bind_remove(),e.column_bind_clone(),e.column_bind_events(),e.removeClass("loading").addClass("opened").find(".column-form").show(),jQuery(document).trigger("column_change",e)})},jQuery.fn.column_bind_events=function(){var e=jQuery(this),n=e.closest(".columns-container "),t=n.attr("data-type"),i=e.find(".column_type select option:selected").val();e.find(".column_type select").change(function(){var c=jQuery("optgroup",this).children(":selected"),a=c.val(),o=c.text(),r=jQuery(this).next(".msg").hide(),u=n.find('.for-cloning-only .cpac-column[data-type="'+a+'"]');if(u.length)if(u.find(".is-disabled").length)r.html(u.find(".is-disabled").html()).show(),jQuery(this).find("option").removeAttr("selected"),jQuery(this).find('option[value="'+i+'"]').attr("selected","selected");else{if("undefined"==typeof u.attr("data-clone")&&jQuery(".cpac-columns",n).find('[data-type="'+a+'"]').length)return r.html(cpac_i18n.clone.replace("%s","<strong>"+o+"</strong>")).show(),jQuery(this).find("option").removeAttr("selected"),void jQuery(this).find('option[value="'+i+'"]').attr("selected","selected");var l=u.clone();l.addClass("opened").find(".column-form").show(),l.find(".column-meta").replaceWith(e.find(".column-meta")),l.find(".column-form").replaceWith(e.find(".column-form")),l.cpac_update_clone_id(t),e.replaceWith(l),l.cpac_column_refresh()}}),e.find(".column_label .input input").bind("keyup change",function(){var e=jQuery(this).val();jQuery(this).closest(".cpac-column").find("td.column_label .inner > a.toggle").text(e)}),e.column_width_slider();var c=e.find(".column-meta span.width");c.on("update",function(){var n=e.find("input.width").val(),t=e.find("input.unit").filter(":checked").val();n>0?jQuery(this).text(n+t):jQuery(this).text("")});var a=e.find(".column_width .unit-select label");a.on("click",function(){e.find("span.unit").text(jQuery(this).find("input").val()),e.column_width_slider(),c.trigger("update")});var o=e.find("input.width").on("keyup",function(){e.column_width_slider(),jQuery(this).trigger("validate"),c.trigger("update")}).on("validate",function(){var e=o.val(),n=jQuery.trim(e);jQuery.isNumeric(n)||(n=n.replace(/\D/g,"")),n.length>3&&(n=n.substring(0,3)),0>=n&&(n=""),n!==e&&o.val(n)});e.find(".column_image_size label.custom-size").click(function(){var e=jQuery(this).closest(".input");jQuery(this).hasClass("image-size-custom")?(jQuery(".custom-size-w",e).removeClass("hidden"),jQuery(".custom-size-h",e).removeClass("hidden")):(jQuery(".custom-size-w",e).addClass("hidden"),jQuery(".custom-size-h",e).addClass("hidden"))}),e.find(".column-form .label label, .column-form .label .info").hover(function(){jQuery(this).parents(".label").find("p.description").show()},function(){jQuery(this).parents(".label").find("p.description").hide()}),e.find('[data-refresh="1"] select').change(function(){e.cpac_column_refresh()})},jQuery.fn.column_remove=function(){jQuery(this).addClass("deleting").animate({opacity:0,height:0},350,function(e){jQuery(this).remove()})},jQuery.fn.column_width_slider=function(){var e=jQuery(this).find(".column_width"),n=e.find("input.width"),t=e.find("input.unit"),i=t.filter(":checked").val(),c=n.val(),a=e.find(".width-slider"),o=jQuery(this).find(".column-meta span.width");"%"==i&&c>100&&(c=100),n.val(c),a.slider({range:"min",min:0,max:"%"==i?100:500,value:c,slide:function(e,t){n.val(t.value),o.trigger("update"),n.trigger("validate")}})},jQuery.fn.column_clone=function(){var e=jQuery(this).closest(".columns-container"),n=jQuery(this);if("undefined"==typeof n.attr("data-clone")){var t=cpac_i18n.clone.replace("%s","<strong>"+n.find(".column_label .toggle").text()+"</strong>");return n.addClass("opened").find(".column-form").slideDown(150),void n.find(".msg").html(t).show()}var i=jQuery(this).clone();return i.cpac_update_clone_id(e.attr("data-type")),jQuery(this).after(i),i.column_bind_toggle(),i.column_bind_remove(),i.column_bind_clone(),i.column_bind_events(),cpac_sortable(),jQuery(document).trigger("column_add",i),i},jQuery.fn.cpac_update_clone_id=function(e){var n=jQuery(this),t=n.attr("data-type"),i=jQuery('.columns-container[data-type="'+e+'"]').find(".cpac-columns"),c=jQuery(i).find('*[data-type="'+t+'"]').not(n),a=jQuery.map(c,function(e,n){return jQuery(e).attr("data-clone")?parseInt(jQuery(e).attr("data-clone"),10):0});a.sort();for(var o=Math.max.apply(null,a)+1,r=0;o>=r&&-1!==jQuery.inArray(r,a);r++);var u=n.attr("data-clone"),l="";u&&(l="-"+u),n.attr("data-clone",r),n.find("input.clone").val(r),n.find("input.column-name").val(t+"-"+r);var d=n.find("input, select, label");jQuery(d).each(function(e,n){var i=t+"-"+r;jQuery(n).attr("name")&&jQuery(n).attr("name",jQuery(n).attr("name").replace(t+l,i)),jQuery(n).attr("for")&&jQuery(n).attr("for",jQuery(n).attr("for").replace(t+l,i)),jQuery(n).attr("id")&&jQuery(n).attr("id",jQuery(n).attr("id").replace(t+l,i))})},jQuery(document).bind("column_init column_change column_add",function(e,n){jQuery(n).cpac_bind_column_addon_events(),jQuery(n).cpac_bind_container_addon_events()}),jQuery.fn.cpac_bind_column_addon_events=function(){var e=jQuery(this),n=e.find("[data-toggle-id] label");n.on("click",function(){var n=jQuery(this).closest("td.input").data("toggle-id"),t=jQuery("input",this).val(),i=e.find('[data-indicator-id="'+n+'"]').removeClass("on");"on"==t&&i.addClass("on");var c=e.find('[data-additional-option-id="'+n+'"]').addClass("hide");"on"==t&&c.removeClass("hide")}),e.find("[data-toggle-id]").each(function(){var n=e.find('[data-additional-option-id="'+jQuery(this).data("toggle-id")+'"]').addClass("hide");"on"==jQuery("input:checked",this).val()&&n.removeClass("hide")})},jQuery.fn.cpac_bind_container_addon_events=function(){var e=jQuery(this),n=e.find("[data-indicator-id]");n.unbind("click").click(function(){var n=jQuery(this).data("indicator-id"),t=e.find('[data-toggle-id="'+n+'"] input');jQuery(this).hasClass("on")?(jQuery(this).removeClass("on").addClass("off"),t.filter("[value=off]").prop("checked",!0)):(jQuery(this).removeClass("off").addClass("on"),t.filter("[value=on]").prop("checked",!0))})};
1
+ function cpac_importexport(){jQuery("#php-export-results textarea").on("focus, mouseup",function(){jQuery(this).select()}).select().focus()}function cpac_submit_form(){var e=jQuery(".sidebox a.submit, .column-footer a.submit");e.click(function(n){var t=jQuery(this),a=t.closest(".columns-container").addClass("saving"),i=a.find(".cpac-columns form").serialize(),c=a.find(".ajax-message");e.attr("disabled","disabled"),a.find(".ajax-message").hide().removeClass("error updated"),jQuery(".cpac_message").remove();var o=jQuery.post(ajaxurl,{action:"cpac_columns_update",data:i,_ajax_nonce:cpac._ajax_nonce,storage_model:a.data("type"),layout:a.data("layout")},function(e){e&&(e.success?(c.addClass("updated").find("p").html(e.data),c.slideDown(),a.addClass("stored")):e.data&&(c.addClass("error").find("p").html(e.data),c.slideDown()))},"json");o.fail(function(e){}),o.always(function(){e.removeAttr("disabled","disabled"),a.removeClass("saving")}),jQuery(document).trigger("cac_update",a)})}function cpac_create_column(e){var n=jQuery(".for-cloning-only .cpac-column",e).not('[data-default="1"]').first().clone(),t=e.attr("data-type");e.find("cpac-columns");return n.length>0&&(n.cpac_update_clone_id(t),jQuery(".cpac-columns form",e).append(n),n.cpac_column_refresh(),jQuery(document).trigger("column_add",n)),n}function cpac_add_column(){jQuery("#cpac .add_column").click(function(e){var n=jQuery(this).closest(".columns-container"),t=cpac_create_column(n);t.addClass("opened").find(".column-form").slideDown(150,function(){jQuery("html, body").animate({scrollTop:t.offset().top-58},300)}),e.preventDefault()})}function cpac_sidebar_feedback(){jQuery(function(e){var n=e(".sidebox#direct-feedback");n.find("#feedback-choice a.no").click(function(e){e.preventDefault(),n.find("#feedback-choice").slideUp(),n.find("#feedback-support").slideDown()}),n.find("#feedback-choice a.yes").click(function(e){e.preventDefault(),n.find("#feedback-choice").slideUp(),n.find("#feedback-rate").slideDown()})})}function cpac_clear_input_defaults(){jQuery.fn.cleardefault=function(){return this.focus(function(){this.value==this.defaultValue&&(this.value="")}).blur(function(){this.value.length||(this.value=this.defaultValue)})},jQuery("#cpac-box-plugin_settings .addons input").cleardefault()}function cpac_help(){jQuery("#cpac a.help").click(function(e){e.preventDefault();var n=jQuery("#contextual-help-wrap");n.parent().show(),jQuery('a[href="#tab-panel-cpac-'+jQuery(this).attr("data-help")+'"]',n).trigger("click"),n.slideDown("fast",function(){n.focus()})})}function cpac_pointer(){jQuery(".cpac-pointer").each(function(){var e=jQuery(this),n=e.attr("rel"),t=e.attr("data-pos"),a=e.attr("data-width"),i=e.attr("data-noclick"),c={at:"left top",my:"right top",edge:"right"},o=a?a:250;"right"==t&&(c={at:"right middle",my:"left middle",edge:"left"}),"left"==t&&(c={at:"left middle",my:"right middle",edge:"right"}),e.pointer({content:jQuery("#"+n).html(),position:c,pointerWidth:o,close:function(){e.removeClass("open")},pointerClass:"wp-pointer wp-pointer-"+c.edge+(i?" noclick":"")}),i||e.click(function(){e.hasClass("open")?e.removeClass("open"):e.addClass("open")}),e.hover(function(){jQuery(this).pointer("open")},function(){e.hasClass("open")||jQuery(this).pointer("close")})})}function cpac_init(){var e=jQuery(".columns-container"),n=e.find(".cpac-boxes");if(n.hasClass("disabled"))n.find(".cpac-column").each(function(e,n){jQuery(n).column_bind_toggle(),jQuery(n).find("input, select").prop("disabled",!0)});else{var t=n.find(".cpac-columns");t.find(".cpac-column").each(function(e,n){jQuery(n).column_bind_toggle(),jQuery(n).column_bind_remove(),jQuery(n).column_bind_clone(),jQuery(n).cpac_bind_indicator_events()}),t.cpac_bind_ordering()}jQuery(document).trigger("cac_menu_change",t),jQuery(document).trigger("cac_model_ready",e.data("type"))}function cpac_menu(){jQuery("#cpac_storage_modal_select").on("change",function(){jQuery(this).prop("disabled",!0).next(".spinner").css("display","inline-block"),jQuery(".view-link").hide(),window.location=jQuery(this).val()})}jQuery(document).ready(function(){return 0===jQuery("#cpac").length?!1:(cpac_init(),cpac_pointer(),cpac_submit_form(),cpac_clear_input_defaults(),cpac_menu(),cpac_help(),cpac_add_column(),cpac_importexport(),void cpac_sidebar_feedback())}),jQuery.fn.column_bind_toggle=function(){var e=jQuery(this),n=e.closest("cpac-boxes").hasClass("disabled");e.find("td.column_type a, td.column_edit, td.column_label a.toggle, td.column_label .edit-button").click(function(t){t.preventDefault(),e.toggleClass("opened").find(".column-form").slideToggle(150),n||(e.hasClass("events-binded")||e.column_bind_events(),e.addClass("events-binded"),jQuery(document).trigger("column_init",e))})},jQuery.fn.column_bind_remove=function(){jQuery(this).find(".remove-button").click(function(e){jQuery(this).closest(".cpac-column").column_remove(),e.preventDefault()})},jQuery.fn.column_bind_clone=function(){jQuery(this).find(".clone-button").click(function(e){var n,t;e.preventDefault(),n=jQuery(this).closest(".cpac-column"),t=n.column_clone(),"undefined"!=typeof t&&t.removeClass("loading").hide().slideDown()})},jQuery.fn.cpac_column_refresh=function(){var e=jQuery(this),n=e.find(".column_type select"),t=jQuery(this).closest(".columns-container");e.addClass("loading"),n.prop("disabled",1);var a=jQuery.post(ajaxurl,{plugin_id:"cpac",action:"cpac_column_refresh",_ajax_nonce:cpac._ajax_nonce,column:jQuery(this).find("input.column-name").val(),formdata:jQuery(this).parents("form").serialize(),storage_model:t.data("type"),layout:t.data("layout")},function(n){if(n){var t=jQuery("<div>"+n.data+"</div>").children();e.replaceWith(t),e=t,e.column_bind_toggle(),e.column_bind_remove(),e.column_bind_clone(),e.column_bind_events(),e.addClass("opened").find(".column-form").show(),jQuery(document).trigger("column_change",e)}},"json");a.fail(function(n){var t=e.closest(".columns-container").find(".ajax-message");t.addClass("error").find("p").html(cpac_i18n.error),t.slideDown(),e.slideUp(function(){e.remove()}),console.log(n.responseText)}),a.always(function(){e.removeClass("loading"),n.prop("disabled",!1)})},jQuery.fn.column_bind_events=function(){var e=jQuery(this),n=e.closest(".columns-container "),t=n.attr("data-type"),a=e.find(".column_type select option:selected").val();e.find(".column_type select").change(function(){var i=jQuery("optgroup",this).children(":selected"),c=i.val(),o=i.text(),r=jQuery(this).next(".msg").hide(),l=n.find('.for-cloning-only .cpac-column[data-type="'+c+'"]');if(l.length)if(l.find(".is-disabled").length)r.html(l.find(".is-disabled").html()).show(),jQuery(this).find("option").removeAttr("selected"),jQuery(this).find('option[value="'+a+'"]').attr("selected","selected");else{if("undefined"==typeof l.attr("data-clone")&&jQuery(".cpac-columns",n).find('[data-type="'+c+'"]').length)return r.html(cpac_i18n.clone.replace("%s","<strong>"+o+"</strong>")).show(),jQuery(this).find("option").removeAttr("selected"),void jQuery(this).find('option[value="'+a+'"]').attr("selected","selected");var d=l.clone();d.addClass("opened").find(".column-form").show(),d.find(".column-meta").replaceWith(e.find(".column-meta")),d.find(".column-form").replaceWith(e.find(".column-form")),d.cpac_update_clone_id(t),e.replaceWith(d),d.cpac_column_refresh()}}),e.find(".column_label .input input").bind("keyup change",function(){var e=jQuery(this).val();jQuery(this).closest(".cpac-column").find("td.column_label .inner > a.toggle").text(e)}),e.column_width_slider();var i=e.find(".column-meta span.width");i.on("update",function(){var n=e.find("input.width").val(),t=e.find("input.unit").filter(":checked").val();n>0?jQuery(this).text(n+t):jQuery(this).text("")});var c=e.find(".column_width .unit-select label");c.on("click",function(){e.find("span.unit").text(jQuery(this).find("input").val()),e.column_width_slider(),i.trigger("update")});var o=e.find("input.width").on("keyup",function(){e.column_width_slider(),jQuery(this).trigger("validate"),i.trigger("update")}).on("validate",function(){var e=o.val(),n=jQuery.trim(e);jQuery.isNumeric(n)||(n=n.replace(/\D/g,"")),n.length>3&&(n=n.substring(0,3)),0>=n&&(n=""),n!==e&&o.val(n)});e.find(".column_image_size label.custom-size").click(function(){var e=jQuery(this).closest(".input");jQuery(this).hasClass("image-size-custom")?(jQuery(".custom-size-w",e).removeClass("hidden"),jQuery(".custom-size-h",e).removeClass("hidden")):(jQuery(".custom-size-w",e).addClass("hidden"),jQuery(".custom-size-h",e).addClass("hidden"))}),e.find(".column-form .label label, .column-form .label .info").hover(function(){jQuery(this).parents(".label").find("p.description").show()},function(){jQuery(this).parents(".label").find("p.description").hide()}),e.find('[data-refresh="1"] select').change(function(){e.cpac_column_refresh()})},jQuery.fn.column_remove=function(){jQuery(this).addClass("deleting").animate({opacity:0,height:0},350,function(e){jQuery(this).remove()})},jQuery.fn.column_width_slider=function(){var e=jQuery(this).find(".column_width"),n=e.find("input.width"),t=e.find("input.unit"),a=t.filter(":checked").val(),i=n.val(),c=e.find(".width-slider"),o=jQuery(this).find(".column-meta span.width");"%"==a&&i>100&&(i=100),n.val(i),c.slider({range:"min",min:0,max:"%"==a?100:500,value:i,slide:function(e,t){n.val(t.value),o.trigger("update"),n.trigger("validate")}})},jQuery.fn.column_clone=function(){var e=jQuery(this).closest(".columns-container"),n=jQuery(this),t=jQuery(this).closest("cpac-columns");if("undefined"==typeof n.attr("data-clone")){var a=cpac_i18n.clone.replace("%s","<strong>"+n.find(".column_label .toggle").text()+"</strong>");return n.addClass("opened").find(".column-form").slideDown(150),void n.find(".msg").html(a).show()}var i=jQuery(this).clone();return i.cpac_update_clone_id(e.attr("data-type")),jQuery(this).after(i),i.column_bind_toggle(),i.column_bind_remove(),i.column_bind_clone(),i.column_bind_events(),t.cpac_bind_ordering(),jQuery(document).trigger("column_add",i),i},jQuery.fn.cpac_update_clone_id=function(e){var n=jQuery(this),t=n.attr("data-type"),a=jQuery('.columns-container[data-type="'+e+'"]').find(".cpac-columns"),i=jQuery(a).find('*[data-type="'+t+'"]').not(n),c=jQuery.map(i,function(e,n){return jQuery(e).attr("data-clone")?parseInt(jQuery(e).attr("data-clone"),10):0});c.sort();for(var o=Math.max.apply(null,c)+1,r=0;o>=r&&-1!==jQuery.inArray(r,c);r++);var l=n.attr("data-clone"),d="";l&&(d="-"+l),n.attr("data-clone",r),n.find("input.clone").val(r),n.find("input.column-name").val(t+"-"+r);var u=n.find("input, select, label");jQuery(u).each(function(e,n){var a=t+"-"+r;jQuery(n).attr("name")&&jQuery(n).attr("name",jQuery(n).attr("name").replace(t+d,a)),jQuery(n).attr("for")&&jQuery(n).attr("for",jQuery(n).attr("for").replace(t+d,a)),jQuery(n).attr("id")&&jQuery(n).attr("id",jQuery(n).attr("id").replace(t+d,a))})},jQuery.fn.cpac_bind_ordering=function(){jQuery(this).each(function(){jQuery(this).hasClass("ui-sortable")?jQuery(this).sortable("refresh"):jQuery(this).sortable({items:".cpac-column"})})},jQuery(document).bind("column_init column_change column_add",function(e,n){var t=jQuery(n).closest(".cpac-boxes").hasClass("disabled");t||(jQuery(n).cpac_bind_column_addon_events(),jQuery(n).cpac_bind_indicator_events())}),jQuery.fn.cpac_bind_column_addon_events=function(){var e=jQuery(this),n=e.find("[data-toggle-id] label");n.on("click",function(){var n=jQuery(this).closest("td.input").data("toggle-id"),t=jQuery("input",this).val(),a=e.find('[data-indicator-id="'+n+'"]').removeClass("on");"on"==t&&a.addClass("on");var i=e.find('[data-additional-option-id="'+n+'"]').addClass("hide");"on"==t&&i.removeClass("hide")}),e.find("[data-toggle-id]").each(function(){var n=e.find('[data-additional-option-id="'+jQuery(this).data("toggle-id")+'"]').addClass("hide");"on"==jQuery("input:checked",this).val()&&n.removeClass("hide")})},jQuery.fn.cpac_bind_indicator_events=function(){var e=jQuery(this),n=e.find("[data-indicator-id]");n.unbind("click").click(function(){var n=jQuery(this).data("indicator-id"),t=e.find('[data-toggle-id="'+n+'"] input');jQuery(this).hasClass("on")?(jQuery(this).removeClass("on").addClass("off"),t.filter("[value=off]").prop("checked",!0)):(jQuery(this).removeClass("off").addClass("on"),t.filter("[value=on]").prop("checked",!0))})};
classes/column.php CHANGED
@@ -15,7 +15,7 @@ class CPAC_Column {
15
* @since 2.0
16
* @var CPAC_Storage_Model $storage_model contains a CPAC_Storage_Model object which the column belongs too.
17
*/
18
- public $storage_model;
19
20
/**
21
* @since 2.0
@@ -23,12 +23,6 @@ class CPAC_Column {
23
*/
24
public $options = array();
25
26
- /**
27
- * @since 2.0
28
- * @var object $options_default contains the options for the CPAC_Column object before they are populated with user input.
29
- */
30
- protected $options_default;
31
-
32
/**
33
* @since 2.0
34
* @var array $properties describes the fixed properties for the CPAC_Column object.
@@ -113,6 +107,10 @@ class CPAC_Column {
113
return true;
114
}
115
116
/**
117
* Overwrite this function in child class.
118
* Adds (optional) scripts to the listings screen.
@@ -134,12 +132,21 @@ class CPAC_Column {
134
$this->properties = clone $this->properties;
135
}
136
137
/**
138
* @since 2.0
139
*
140
* @param object $storage_model CPAC_Storage_Model
141
*/
142
- public function __construct( CPAC_Storage_Model $storage_model ) {
143
144
$this->storage_model = $storage_model;
145
@@ -163,7 +170,7 @@ class CPAC_Column {
163
'is_registered' => true, // Should the column be registered based on conditional logic, example usage see: 'post/page-template.php'
164
'is_cloneable' => true, // Should the column be cloneable
165
'default' => false, // Is this a WP default column,
166
- 'group' => 'custom',
167
'hidden' => false,
168
'use_before_after' => false
169
);
@@ -231,7 +238,7 @@ class CPAC_Column {
231
* @since 2.0
232
* @see Filter cac/column/properties
233
*/
234
- $this->properties = apply_filters( "cac/column/properties/storage_key={$this->storage_model->key}", $this->properties, $this ); // do not pass $this because object is not ready
235
236
// Column label defaults to column type label
237
if ( ! isset( $this->options['label'] ) ) {
@@ -273,7 +280,7 @@ class CPAC_Column {
273
/**
274
* @since 2.4.7
275
*/
276
- public function set_filter( $filtering_model ) {
277
$this->filtering_model = $filtering_model;
278
279
return $this;
@@ -289,7 +296,7 @@ class CPAC_Column {
289
/**
290
* @since 2.4.8
291
*/
292
- public function set_editable( $editable_model ) {
293
$this->editable_model = $editable_model;
294
295
return $this;
@@ -372,6 +379,15 @@ class CPAC_Column {
372
return $this->properties->label;
373
}
374
375
/**
376
* Get the column options set by the user
377
*
@@ -419,28 +435,28 @@ class CPAC_Column {
419
* @since 2.1.1
420
*/
421
public function get_post_type() {
422
- return $this->storage_model->get_post_type();
423
}
424
425
/**
426
* @since 2.3.4
427
*/
428
public function get_storage_model() {
429
- return $this->storage_model;
430
}
431
432
/**
433
* @since 2.3.4
434
*/
435
public function get_storage_model_type() {
436
- return $this->storage_model->get_type();
437
}
438
439
/**
440
* @since 2.3.4
441
*/
442
- public function get_storage_model_meta_type() {
443
- return $this->storage_model->get_meta_type();
444
}
445
446
/**
@@ -453,7 +469,7 @@ class CPAC_Column {
453
}
454
455
public function get_attr_name( $field_name ) {
456
- return "{$this->storage_model->key}[{$this->properties->name}][{$field_name}]";
457
}
458
459
/**
@@ -462,7 +478,7 @@ class CPAC_Column {
462
* @return string Attribute Name
463
*/
464
public function get_attr_id( $field_name ) {
465
- return "cpac-{$this->storage_model->key}-{$this->properties->name}-{$field_name}";
466
}
467
468
public function attr_id( $field_name ) {
@@ -495,21 +511,20 @@ class CPAC_Column {
495
if ( isset( $options['excerpt_length'] ) ) {
496
$options['excerpt_length'] = trim( $options['excerpt_length'] );
497
if ( empty( $options['excerpt_length'] ) || ! is_numeric( $options['excerpt_length'] ) ) {
498
- $options['excerpt_length'] = $this->options_default->excerpt_length;
499
}
500
}
501
502
if ( ! empty( $options['label'] ) ) {
503
- $options['label'] = str_replace( 'data:', '%%data%%', $options['label'] ); // Temporary replace data: urls for image sources. Replace it back later
504
505
// Label can not contains the character ":"" and "'", because
506
// CPAC_Column::get_sanitized_label() will return an empty string
507
// and make an exception for site_url()
508
- if ( false === strpos( $options['label'], site_url() ) ) {
509
$options['label'] = str_replace( ':', '', $options['label'] );
510
$options['label'] = str_replace( "'", '', $options['label'] );
511
}
512
- $options['label'] = str_replace( '%%data%%', 'data:', $options['label'] ); // Enable data:image url's
513
}
514
515
// used by child classes for additional sanitizing
@@ -544,12 +559,17 @@ class CPAC_Column {
544
* @return string Sanitized string
545
*/
546
public function get_sanitized_label() {
547
548
- $string = $this->options->label;
549
- $string = strip_tags( $string );
550
- $string = preg_replace( "/[^a-zA-Z0-9]+/", "", $string );
551
- $string = str_replace( 'http://', '', $string );
552
- $string = str_replace( 'https://', '', $string );
553
554
return $string;
555
}
@@ -837,7 +857,8 @@ class CPAC_Column {
837
$r = hexdec( substr( $hex, 0, 1 ) . substr( $hex, 0, 1 ) );
838
$g = hexdec( substr( $hex, 1, 1 ) . substr( $hex, 1, 1 ) );
839
$b = hexdec( substr( $hex, 2, 1 ) . substr( $hex, 2, 1 ) );
840
- } else {
841
$r = hexdec( substr( $hex, 0, 2 ) );
842
$g = hexdec( substr( $hex, 2, 2 ) );
843
$b = hexdec( substr( $hex, 4, 2 ) );
@@ -878,6 +899,13 @@ class CPAC_Column {
878
return preg_match_all( $patterns[ $type ], $input, $matches ) + 1;
879
}
880
881
/**
882
* @since 1.0
883
*
@@ -896,7 +924,8 @@ class CPAC_Column {
896
if ( is_string( $images ) || is_numeric( $images ) ) {
897
if ( strpos( $images, ',' ) !== false ) {
898
$images = array_filter( explode( ',', $this->strip_trim( str_replace( ' ', '', $images ) ) ) );
899
- } else {
900
$images = array( $images );
901
}
902
}
@@ -976,7 +1005,8 @@ class CPAC_Column {
976
977
$thumbnails[] = "<span class='cpac-column-value-image' style='width:{$width}px;height:{$height}px; background-size: cover; background-image: url({$src}); background-position: center;'></span>";
978
979
- } else {
980
$max = max( array( $width, $height ) );
981
$thumbnails[] = "<span class='cpac-column-value-image' style='width:{$width}px;height:{$height}px;'><img style='max-width:{$max}px;max-height:{$max}px;' src='{$src}' alt=''/></span>";
982
}
@@ -1001,7 +1031,8 @@ class CPAC_Column {
1001
foreach ( $pieces as $r_pieces ) {
1002
if ( is_array( $r_pieces ) ) {
1003
$retVal[] = $this->recursive_implode( $glue, $r_pieces );
1004
- } else {
1005
$retVal[] = $r_pieces;
1006
}
1007
}
@@ -1115,7 +1146,8 @@ class CPAC_Column {
1115
$first = ! empty( $userdata->first_name ) ? $userdata->first_name : '';
1116
$last = ! empty( $userdata->last_name ) ? " {$userdata->last_name}" : '';
1117
$name = $first . $last;
1118
- } elseif ( ! empty( $userdata->{$display_as} ) ) {
1119
$name = $userdata->{$display_as};
1120
}
1121
}
@@ -1154,7 +1186,6 @@ class CPAC_Column {
1154
$field_key = 'date_format';
1155
$label = __( 'Date Format', 'codepress-admin-columns' );
1156
$description = __( 'This will determine how the date will be displayed.', 'codepress-admin-columns' );
1157
-
1158
?>
1159
<tr class="column_<?php echo $field_key; ?>">
1160
<?php $this->label_view( $label, $description, $field_key ); ?>
@@ -1222,9 +1253,10 @@ class CPAC_Column {
1222
<?php $this->label_view( $label, '', $field_key ); ?>
1223
1224
<td class="input">
1225
- <?php foreach ( $sizes = $this->get_all_image_sizes() as $id => $image_label ) : ?>
1226
<label for="<?php $this->attr_id( $field_key ); ?>-<?php echo $id ?>" class="custom-size">
1227
- <input type="radio" value="<?php echo $id; ?>" name="<?php $this->attr_name( $field_key ); ?>" id="<?php $this->attr_id( $field_key ); ?>-<?php echo $id ?>"<?php checked( $this->options->image_size, $id ); ?>>
1228
<?php echo $image_label; ?>
1229
</label>
1230
<?php endforeach; ?>
@@ -1365,42 +1397,6 @@ class CPAC_Column {
1365
<?php
1366
}
1367
1368
- /**
1369
- * @since 2.0
1370
- *
1371
- * @param array Column Objects
1372
- *
1373
- * @return string HTML List
1374
- */
1375
- public function get_column_list( $columns = array(), $label = '' ) {
1376
-
1377
- if ( empty( $columns ) ) {
1378
- return false;
1379
- }
1380
-
1381
- // sort by alphabet
1382
- $_columns = array();
1383
-
1384
- foreach ( $columns as $column ) {
1385
- if ( $column->properties->hidden ) {
1386
- continue;
1387
- }
1388
-
1389
- $_columns[ $column->properties->type ] = ( 0 === strlen( strip_tags( $column->properties->label ) ) ) ? ucfirst( $column->properties->type ) : $column->properties->label;
1390
- }
1391
-
1392
- asort( $_columns );
1393
-
1394
- $list = "<optgroup label='{$label}'>";
1395
- foreach ( $_columns as $type => $label ) {
1396
- $selected = selected( $this->properties->type, $type, false );
1397
- $list .= "<option value='{$type}'{$selected}>{$label}</option>";
1398
- }
1399
- $list .= "</optgroup>";
1400
-
1401
- return $list;
1402
- }
1403
-
1404
/**
1405
* @since 2.0
1406
*/
@@ -1408,19 +1404,23 @@ class CPAC_Column {
1408
1409
$classes = implode( ' ', array_filter( array( "cpac-box-{$this->properties->type}", $this->properties->classes ) ) );
1410
1411
- // column list
1412
$column_list = '';
1413
-
1414
- $groups = $this->storage_model->get_column_type_groups();
1415
- foreach ( $groups as $group => $label ) {
1416
- $column_list .= $this->get_column_list( $this->storage_model->column_types[ $group ], $label );
1417
}
1418
1419
// clone attribute
1420
$data_clone = $this->properties->is_cloneable ? " data-clone='{$this->properties->clone}'" : '';
1421
1422
?>
1423
- <div class="cpac-column <?php echo $classes; ?>" data-type="<?php echo $this->properties->type; ?>"<?php echo $data_clone; ?>>
1424
<input type="hidden" class="column-name" name="<?php echo $this->attr_name( 'column-name' ); ?>" value="<?php echo esc_attr( $this->properties->name ); ?>"/>
1425
<input type="hidden" class="type" name="<?php echo $this->attr_name( 'type' ); ?>" value="<?php echo $this->properties->type; ?>"/>
1426
<input type="hidden" class="clone" name="<?php echo $this->attr_name( 'clone' ); ?>" value="<?php echo $this->properties->clone; ?>"/>
15
* @since 2.0
16
* @var CPAC_Storage_Model $storage_model contains a CPAC_Storage_Model object which the column belongs too.
17
*/
18
+ private $storage_model;
19
20
/**
21
* @since 2.0
23
*/
24
public $options = array();
25
26
/**
27
* @since 2.0
28
* @var array $properties describes the fixed properties for the CPAC_Column object.
107
return true;
108
}
109
110
+ public function is_default() {
111
+ return isset( $this->properties->default ) && $this->properties->default;
112
+ }
113
+
114
/**
115
* Overwrite this function in child class.
116
* Adds (optional) scripts to the listings screen.
132
$this->properties = clone $this->properties;
133
}
134
135
+ /**
136
+ * @since 2.5
137
+ */
138
+ public function __get( $key ) {
139
+ if ( 'storage_model' == $key ) {
140
+ return $this->{"get_$key"}();
141
+ }
142
+ }
143
+
144
/**
145
* @since 2.0
146
*
147
* @param object $storage_model CPAC_Storage_Model
148
*/
149
+ public function __construct( $storage_model ) {
150
151
$this->storage_model = $storage_model;
152
170
'is_registered' => true, // Should the column be registered based on conditional logic, example usage see: 'post/page-template.php'
171
'is_cloneable' => true, // Should the column be cloneable
172
'default' => false, // Is this a WP default column,
173
+ 'group' => __( 'Custom', 'codepress-admin-columns' ),
174
'hidden' => false,
175
'use_before_after' => false
176
);
238
* @since 2.0
239
* @see Filter cac/column/properties
240
*/
241
+ $this->properties = apply_filters( "cac/column/properties/storage_key={$this->get_storage_model()->key}", $this->properties, $this ); // do not pass $this because object is not ready
242
243
// Column label defaults to column type label
244
if ( ! isset( $this->options['label'] ) ) {
280
/**
281
* @since 2.4.7
282
*/
283
+ public function set_filter( CAC_Filtering_Model $filtering_model ) {
284
$this->filtering_model = $filtering_model;
285
286
return $this;
296
/**
297
* @since 2.4.8
298
*/
299
+ public function set_editable( CACIE_Editable_Model $editable_model ) {
300
$this->editable_model = $editable_model;
301
302
return $this;
379
return $this->properties->label;
380
}
381
382
+ /**
383
+ * Get the type of the column.
384
+ *
385
+ * @since 2.5
386
+ */
387
+ public function is_registered() {
388
+ return $this->properties->is_registered;
389
+ }
390
+
391
/**
392
* Get the column options set by the user
393
*
435
* @since 2.1.1
436
*/
437
public function get_post_type() {
438
+ return $this->get_storage_model()->get_post_type();
439
}
440
441
/**
442
* @since 2.3.4
443
*/
444
public function get_storage_model() {
445
+ return cpac()->get_storage_model( $this->storage_model );
446
}
447
448
/**
449
* @since 2.3.4
450
*/
451
public function get_storage_model_type() {
452
+ return $this->get_storage_model()->get_type();
453
}
454
455
/**
456
* @since 2.3.4
457
*/
458
+ public function get_meta_type() {
459
+ return $this->get_storage_model()->get_meta_type();
460
}
461
462
/**
469
}
470
471
public function get_attr_name( $field_name ) {
472
+ return "{$this->get_storage_model()->key}[{$this->properties->name}][{$field_name}]";
473
}
474
475
/**
478
* @return string Attribute Name
479
*/
480
public function get_attr_id( $field_name ) {
481
+ return "cpac-{$this->get_storage_model()->key}-{$this->properties->name}-{$field_name}";
482
}
483
484
public function attr_id( $field_name ) {
511
if ( isset( $options['excerpt_length'] ) ) {
512
$options['excerpt_length'] = trim( $options['excerpt_length'] );
513
if ( empty( $options['excerpt_length'] ) || ! is_numeric( $options['excerpt_length'] ) ) {
514
+ $options['excerpt_length'] = 30;
515
}
516
}
517
518
if ( ! empty( $options['label'] ) ) {
519
520
// Label can not contains the character ":"" and "'", because
521
// CPAC_Column::get_sanitized_label() will return an empty string
522
// and make an exception for site_url()
523
+ // Enable data:image url's
524
+ if ( false === strpos( $options['label'], site_url() ) && false === strpos( $options['label'], 'data:' ) ) {
525
$options['label'] = str_replace( ':', '', $options['label'] );
526
$options['label'] = str_replace( "'", '', $options['label'] );
527
}
528
}
529
530
// used by child classes for additional sanitizing
559
* @return string Sanitized string
560
*/
561
public function get_sanitized_label() {
562
+ if ( $this->properties->default ) {
563
+ $string = $this->properties->name;
564
+ }
565
566
+ else {
567
+ $string = $this->options->label;
568
+ $string = strip_tags( $string );
569
+ $string = preg_replace( "/[^a-zA-Z0-9]+/", "", $string );
570
+ $string = str_replace( 'http://', '', $string );
571
+ $string = str_replace( 'https://', '', $string );
572
+ }
573
574
return $string;
575
}
857
$r = hexdec( substr( $hex, 0, 1 ) . substr( $hex, 0, 1 ) );
858
$g = hexdec( substr( $hex, 1, 1 ) . substr( $hex, 1, 1 ) );
859
$b = hexdec( substr( $hex, 2, 1 ) . substr( $hex, 2, 1 ) );
860
+ }
861
+ else {
862
$r = hexdec( substr( $hex, 0, 2 ) );
863
$g = hexdec( substr( $hex, 2, 2 ) );
864
$b = hexdec( substr( $hex, 4, 2 ) );
899
return preg_match_all( $patterns[ $type ], $input, $matches ) + 1;
900
}
901
902
+ /**
903
+ * @since 2.5
904
+ */
905
+ public function get_empty_char() {
906
+ return '&ndash;'; // dash
907
+ }
908
+
909
/**
910
* @since 1.0
911
*
924
if ( is_string( $images ) || is_numeric( $images ) ) {
925
if ( strpos( $images, ',' ) !== false ) {
926
$images = array_filter( explode( ',', $this->strip_trim( str_replace( ' ', '', $images ) ) ) );
927
+ }
928
+ else {
929
$images = array( $images );
930
}
931
}
1005
1006
$thumbnails[] = "<span class='cpac-column-value-image' style='width:{$width}px;height:{$height}px; background-size: cover; background-image: url({$src}); background-position: center;'></span>";
1007
1008
+ }
1009
+ else {
1010
$max = max( array( $width, $height ) );
1011
$thumbnails[] = "<span class='cpac-column-value-image' style='width:{$width}px;height:{$height}px;'><img style='max-width:{$max}px;max-height:{$max}px;' src='{$src}' alt=''/></span>";
1012
}
1031
foreach ( $pieces as $r_pieces ) {
1032
if ( is_array( $r_pieces ) ) {
1033
$retVal[] = $this->recursive_implode( $glue, $r_pieces );
1034
+ }
1035
+ else {
1036
$retVal[] = $r_pieces;
1037
}
1038
}
1146
$first = ! empty( $userdata->first_name ) ? $userdata->first_name : '';
1147
$last = ! empty( $userdata->last_name ) ? " {$userdata->last_name}" : '';
1148
$name = $first . $last;
1149
+ }
1150
+ elseif ( ! empty( $userdata->{$display_as} ) ) {
1151
$name = $userdata->{$display_as};
1152
}
1153
}
1186
$field_key = 'date_format';
1187
$label = __( 'Date Format', 'codepress-admin-columns' );
1188
$description = __( 'This will determine how the date will be displayed.', 'codepress-admin-columns' );
1189
?>
1190
<tr class="column_<?php echo $field_key; ?>">
1191
<?php $this->label_view( $label, $description, $field_key ); ?>
1253
<?php $this->label_view( $label, '', $field_key ); ?>
1254
1255
<td class="input">
1256
+ <?php foreach ( $sizes = $this->get_all_image_sizes() as $id => $image_label ) : $_sizes = array_keys( $sizes ); ?>
1257
+ <?php $selected = $this->options->image_size ? $this->options->image_size : $_sizes[0]; ?>
1258
<label for="<?php $this->attr_id( $field_key ); ?>-<?php echo $id ?>" class="custom-size">
1259
+ <input type="radio" value="<?php echo $id; ?>" name="<?php $this->attr_name( $field_key ); ?>" id="<?php $this->attr_id( $field_key ); ?>-<?php echo $id ?>"<?php checked( $selected, $id ); ?>>
1260
<?php echo $image_label; ?>
1261
</label>
1262
<?php endforeach; ?>
1397
<?php
1398
}
1399
1400
/**
1401
* @since 2.0
1402
*/
1404
1405
$classes = implode( ' ', array_filter( array( "cpac-box-{$this->properties->type}", $this->properties->classes ) ) );
1406
1407
+ // Selector
1408
$column_list = '';
1409
+ if ( $grouped_columns = $this->get_storage_model()->get_grouped_columns() ) {
1410
+ foreach ( $grouped_columns as $group => $columns ) {
1411
+ $column_list .= '<optgroup label="' . $group . '">';
1412
+ foreach ( $columns as $type => $label ) {
1413
+ $column_list .= '<option value="' . $type . '"' . selected( $this->properties->type, $type, false ) . '>' . $label . '</option>';
1414
+ }
1415
+ $column_list .= '</optgroup>';
1416
+ }
1417
}
1418
1419
// clone attribute
1420
$data_clone = $this->properties->is_cloneable ? " data-clone='{$this->properties->clone}'" : '';
1421
1422
?>
1423
+ <div class="cpac-column <?php echo $classes; ?>" data-type="<?php echo $this->properties->type; ?>"<?php echo $data_clone; ?> data-default="<?php echo $this->is_default(); ?>">
1424
<input type="hidden" class="column-name" name="<?php echo $this->attr_name( 'column-name' ); ?>" value="<?php echo esc_attr( $this->properties->name ); ?>"/>
1425
<input type="hidden" class="type" name="<?php echo $this->attr_name( 'type' ); ?>" value="<?php echo $this->properties->type; ?>"/>
1426
<input type="hidden" class="clone" name="<?php echo $this->attr_name( 'clone' ); ?>" value="<?php echo $this->properties->clone; ?>"/>
classes/column/actions.php CHANGED
@@ -1,4 +1,5 @@
1
<?php
2
/**
3
* Base class for columns containing action links for items.
4
*
@@ -12,6 +13,7 @@ abstract class CPAC_Column_Actions extends CPAC_Column {
12
* @since 2.2.6
13
*
14
* @param int $id Item ID to get the list of actions for.
15
* @return array List of actions ([action name] => [action link]).
16
*/
17
abstract public function get_actions( $id );
@@ -21,7 +23,6 @@ abstract class CPAC_Column_Actions extends CPAC_Column {