Admin Columns - Version 2.1.2

Version Description

  • [Updated] Added ajax check and improved loading.
  • [Updated] Menu is split between posttypes and media, comments and users.
  • [Added] WooCommerce 2.1 columns support
  • [Fixed] Filters for column_path
Download this release

Release Info

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

Code changes from version 2.1.1 to 2.1.2

README.md ADDED
File without changes
assets/css/admin-column.css CHANGED
@@ -1,1003 +1,826 @@
1
- /* =General
2
- -------------------------------------------------------------- */
3
- #icon-codepress-admin-columns {
4
- background: transparent url('../images/icon.png') no-repeat 0 0;
5
- }
6
- .cpac-settings-link {
7
- float: right;
8
- margin: 12px 14px 5px 0;
9
- background: transparent url('../images/settings.png') no-repeat 0 0;
10
- padding-left: 20px;
11
- text-decoration: none;
12
- display: inline-block;
13
- line-height: 16px;
14
- }
15
- .rtl .cpac-settings-link {
16
- float: left;
17
- margin: 12px 0 5px 14px;
18
- padding-right: 20px;
19
- padding-left: 0;
20
- }
21
- .cpac-settings-link.current {
22
- font-weight: bold;
23
- }
24
- a.help {
25
- background: transparent url('../images/help.png') no-repeat 0 0;
26
- display: inline-block;
27
- width: 16px;
28
- height: 16px;
29
- }
30
- #cpac a:focus, #cpac a:active {
31
- outline: none;
32
- }
33
- .button.loading {
34
- padding-right: 25px;
35
- position: relative;
36
- }
37
- .rtl .button.loading {
38
- padding-left: 25px;
39
- padding-right: 0;
40
- }
41
- .button.loading span {
42
- position: absolute;
43
- top: 2px;
44
- right: 6px;
45
- background: transparent url('../images/loading.gif') no-repeat right 50%;
46
- width: 16px;
47
- height: 16px;
48
- display: inline-block;
49
- }
50
- .rtl .button.loading span {
51
- left: 6px;
52
- right: auto;
53
- }
54
- /* =Icons
55
- -------------------------------------------------------------- */
56
- .icon-yes {
57
- background: transparent url(../images/yes.png) no-repeat 0 0;
58
- width: 16px;
59
- height: 16px;
60
- display: inline-block;
61
- position: relative;
62
- top: 2px;
63
- }
64
- .icon-no {
65
- background: transparent url(../images/no.png) no-repeat 0 0;
66
- width: 16px;
67
- height: 16px;
68
- display: inline-block;
69
- position: relative;
70
- top: 2px;
71
- }
72
-
73
- /* =Menu
74
- -------------------------------------------------------------- */
75
- .cpac-menu {
76
- clear: both;
77
- overflow: hidden;
78
- }
79
- .cpac-menu .subsubsub {
80
- white-space: normal;
81
- margin-right: 14px;
82
- }
83
- .rtl .cpac-menu .subsubsub {
84
- margin-left: 14px;
85
- margin-right: 0;
86
- }
87
-
88
- /* =Structure
89
- -------------------------------------------------------------- */
90
- .columns-container {
91
- margin-right: 300px;
92
- max-width: 700px;
93
- }
94
- .rtl .columns-container {
95
- margin-left: 300px;
96
- margin-right: 0;
97
- }
98
- .columns-left {
99
- float: left;
100
- width: 100%;
101
- }
102
- .rtl .columns-left {
103
- float: right;
104
- }
105
- .columns-right {
106
- float: right;
107
- margin-right: -300px;
108
- width: 280px;
109
- }
110
- .rtl .columns-right {
111
- float: left;
112
- margin-left: -300px;
113
- margin-right: 0;
114
- }
115
- .columns-right-inside.fixed {
116
- position: fixed;
117
- top: 40px;
118
- width: 280px;
119
- }
120
-
121
- /* =Columns
122
- -------------------------------------------------------------- */
123
- .add-new-h2 {
124
- color: #828282;
125
- }
126
- .cpac-boxes form {
127
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
128
- }
129
- .ui-sortable-helper {
130
- -webkit-box-shadow: 1px 3px 6px 0px rgba(1, 1, 1, 0.4);
131
- box-shadow: 1px 3px 6px 0px rgba(1, 1, 1, 0.4);
132
- }
133
- .ui-sortable-helper .column-meta {
134
- border-width: 1px;
135
- }
136
- .cpac-placeholder {
137
- visibility: visible !important;
138
- }
139
-
140
- /* @todo: placeholder styling v2 */
141
-
142
- .cpac-placeholder {
143
- border-top: 1px solid #dfdfdf;
144
- padding: 5px 4px 7px 0;
145
- }
146
- .rtl .cpac-placeholder {
147
- padding: 5px 0 7px 4px;
148
- }
149
- .cpac-placeholder .inner-placeholder {
150
- border: 1px dashed #808080;
151
- background: #eee;
152
- width: 100%;
153
- height: 100%;
154
- }
155
- .cpac-columns .cpac-placeholder:first-child {
156
- border: none;
157
- }
158
- .cpac-column.deleting {}
159
-
160
- /* placeholder styling v1 */
161
-
162
- /*
163
- .cpac-placeholder {
164
- visibility: visible !important;
165
- background: transparent url('../images/border.png') repeat 0 0;
166
- padding: 2px;
167
- }
168
- .cpac-placeholder .inner-placeholder {
169
- box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
170
- background: #ededed;
171
- width: 100%;
172
- height: 100%;
173
- }
174
- .ui-sortable-helper .column-meta {
175
- border-width: 1px;
176
- }
177
- */
178
-
179
-
180
- /* =Column Header
181
- -------------------------------------------------------------- */
182
- .table-header {
183
- border-radius: 3px 3px 0 0;
184
- border-width: 1px 1px 0;
185
- }
186
-
187
- /* =Column Meta
188
- -------------------------------------------------------------- */
189
- .column-meta {
190
- border-style: solid;
191
- border-color: #dfdfdf;
192
- border-width: 1px 1px 0;
193
- background: #fcfcfc;
194
- }
195
- .cpac-column:nth-child(2n) .column-meta {
196
- background: #f9f9f9;
197
- }
198
- .column-meta table {
199
- border: none;
200
- background: transparent;
201
- border-radius: 0;
202
- }
203
- .column-meta table tr td {
204
- vertical-align: top;
205
- height: 18px;
206
- border: none;
207
- padding: 11px 8px;
208
- border-width: 1px 0 0;
209
- border-style: solid;
210
- border-color: transparent;
211
- }
212
- .column-meta img {
213
- margin-right: 3px;
214
- }
215
- .rtl .column-meta img {
216
- margin-left: 3px;
217
- margin-right: 0;
218
- }
219
- .column-meta .column_sort {
220
- width: 10px;
221
- background: transparent url('../images/drag.png') no-repeat 8px 8px;
222
- cursor: move;
223
- }
224
- .column-meta td.column_label {
225
- width: 55%;
226
- font-weight: bold;
227
- vertical-align: middle;
228
- position: relative;
229
- }
230
- .column-meta .column_label .inner {
231
- position: relative;
232
- overflow: hidden;
233
- height: 18px;
234
- }
235
- .column-meta .column_label .inner > a {
236
- color: #5a5a5a;
237
- }
238
- .column-meta .column_label .inner > a:hover {
239
- color: #333333;
240
- }
241
- .column-meta .column_label .inner > a.remove-button {
242
- display: none;
243
- color: #BC0B0B;
244
- text-decoration: none;
245
- text-shadow: none;
246
- font-weight: normal;
247
- margin-left: 12px;
248
- font-size: 12px;
249
- }
250
- .rtl .column-meta .column_label .inner > a.remove-button {
251
- margin-right: 12px;
252
- margin-left: 0;
253
- }
254
- .column-meta .column_label .inner > a.remove-button:hover {
255
- background-color: #BC0B0B;
256
- color: #FFFFFF;
257
- text-decoration: none;
258
- }
259
- .column-meta:hover .column_label .inner > a.remove-button {
260
- display: inline-block;
261
- }
262
- .column-meta .column_label .inner .meta {
263
- display: inline-block;
264
- float: right;
265
- font-weight: normal;
266
- color: #999999;
267
- font-size: 12px;
268
- }
269
- .rtl .column-meta .column_label .inner .meta {
270
- float: left;
271
- }
272
- .column-meta .column_type {
273
- width: auto;
274
- text-align: right;
275
- vertical-align: middle;
276
- color: #999999;
277
- padding-right: 0;
278
- }
279
- .rtl .column-meta .column_type {
280
- text-align: left;
281
- padding-left: 0;
282
- padding-right: auto;
283
- }
284
- .column-meta .column_edit {
285
- width: 38px;
286
- background: transparent url('../images/arrow.png') no-repeat 23px 18px;
287
- cursor: pointer;
288
- }
289
-
290
- /* opened state */
291
- .cpac-column.opened .column-meta {
292
- background-color: #c7c7c7;
293
- background-image: -ms-linear-gradient(top, #e9e9e9, #c7c7c7);
294
- background-image: -moz-linear-gradient(top, #e9e9e9, #c7c7c7);
295
- background-image: -o-linear-gradient(top, #e9e9e9, #c7c7c7);
296
- background-image: -webkit-gradient(linear, left top, left bottom, from(#e9e9e9), to(#c7c7c7));
297
- background-image: -webkit-linear-gradient(top, #e9e9e9, #c7c7c7);
298
- background-image: linear-gradient(top, #e9e9e9, #c7c7c7);
299
- border-color: #aeaeae;
300
- }
301
- .cpac-column.opened .column-meta table {
302
- background: transparent;
303
- }
304
- .cpac-column.opened .column-meta td {
305
- border-color: #f8f8f8;
306
- }
307
- .cpac-column.opened .column-meta td,
308
- .cpac-column.opened .column-meta td a{
309
- color: #333;
310
- text-shadow: 0 1px 0 #FFFFFF;
311
- }
312
- .cpac-column.opened .column-meta .column_sort {
313
- background-position: 8px -39px;
314
- }
315
- .cpac-column.opened .column-meta .column_type {
316
- color: #5C5C5C;
317
- }
318
- .cpac-column.opened .column-meta .column_label .inner .meta {
319
- color: #808080;
320
- }
321
- tr.column_image_size td.input .custom_image_size {
322
- display: inline-block;
323
- }
324
- tr.column_image_size td.input label {
325
- display: inline-block;
326
- margin-top: 4px;
327
- margin-bottom: 4px;
328
- }
329
- tr.column_image_size td.input label input {
330
- margin-right: 3px;
331
- }
332
- .rtl tr.column_image_size td.input label input {
333
- margin-left: 3px;
334
- margin-right: 0;
335
- }
336
- tr.column_image_size td.input label.custom-size-w,
337
- tr.column_image_size td.input label.custom-size-h {
338
- margin: 0;
339
- }
340
- tr.column_image_size td.input label.custom-size-w.hidden,
341
- tr.column_image_size td.input label.custom-size-h.hidden {
342
- display: none;
343
- }
344
- tr.column_image_size td.input label.custom-size-w input,
345
- tr.column_image_size td.input label.custom-size-h input {
346
- width: 30px;
347
- }
348
- tr.column_image_size.hidden {
349
- display: none;
350
- }
351
-
352
- /* =Column Meta: WP Default columns
353
- -------------------------------------------------------------- */
354
- .column-meta span.vers {
355
- padding-top: 2px;
356
- }
357
- .column-meta span.vers .comment-grey-bubble {
358
- background: transparent url("../images/comment-grey-bubble.png") no-repeat 0 0;
359
- height: 12px;
360
- width: 12px;
361
- float: right;
362
- }
363
- .rtl .column-meta span.vers .comment-grey-bubble {
364
- float: left;
365
- }
366
- .column-meta .column_label span.vers {
367
- float: left;
368
- }
369
- .rtl .column-meta .column_label span.vers {
370
- float: right;
371
- }
372
-
373
- /* =Column Form
374
- -------------------------------------------------------------- */
375
- .column-form {
376
- display: none;
377
- border-width: 1px 1px 0;
378
- border-style: solid;
379
- border-color: #dfdfdf;
380
- }
381
- .column-form table {
382
- border: none;
383
- background: #fcfcfc;
384
- }
385
- .column-form tr td {
386
- vertical-align: top;
387
- border: none;
388
- padding: 8px;
389
- background: #ffffff;
390
- }
391
- .column-form tr td.label {
392
- position: relative;
393
- overflow: visible;
394
- background: #F9F9F9;
395
- background: #f5f5f5;
396
- border-right: 1px solid #E1E1E1;
397
- vertical-align: top;
398
- width: 34%;
399
- border-top: 1px solid #F0F0F0;
400
- }
401
- .column-form tr td {
402
- border-top: 1px solid #F5F5F5;
403
- }
404
- .column-form tr:first-child td {
405
- border-top: none;
406
- }
407
- .column-form tr td.label label {
408
- font-weight: bold;
409
- color: #333333;
410
- display: block;
411
- position: relative;
412
- }
413
- .column-form tr td.label p {
414
- color: #666666;
415
- display: block;
416
- font-size: 12px;
417
- font-style: normal;
418
- line-height: 16px;
419
- margin: 0 !important;
420
- }
421
- .column-form tr td.label p.description {
422
- display: none;
423
- position: absolute;
424
- z-index: 99;
425
- top: 30px;
426
- left: 0;
427
- background: #eaf2fa;
428
- border-radius: 5px;
429
- border: 1px solid #c7d7e2;
430
- padding: 5px 8px !important;
431
- font-weight: normal;
432
- }
433
- .column-form tr td.label p.description em {
434
- display: block;
435
- color: #999;
436
- }
437
- .rtl .column-form tr td.label p.description {
438
- right: 0;
439
- left: auto;
440
- }
441
- .column-form tr td.label a.more-info {
442
- display: none;
443
- width: 14px; height: 14px;
444
- line-height: 14px;
445
- font-size: 10px;
446
- color: #fff;
447
- text-align: center;
448
- font-weight: bold;
449
- background: transparent url(../images/info.png) no-repeat 0 0;
450
- float: right;
451
- }
452
- .rtl .column-form tr td.label a.more-info {
453
- float: left;
454
- }
455
- .column-form tr td select,
456
- .column-form tr td input[type=text] {
457
- width: 99.95%; /* excl padding */
458
- }
459
- .column-form div.description {
460
- font-size: 11px;
461
- width: 12%;
462
- float: left;
463
- text-align: middle;
464
- }
465
- .rtl .column-form div.description {
466
- float: right;
467
- }
468
- .column-form div.input-width-range {
469
- float: left;
470
- position: relative;
471
- width: 87%;
472
- margin-top: 4px;
473
- }
474
- .rtl .column-form div.input-width-range {
475
- float: right;
476
- }
477
- .column-form div.input-width-range .ui-slider-handle {
478
- cursor:ew-resize;
479
- }
480
- .column-form tr td.input label {
481
- padding-right: 10px;
482
- }
483
- .rtl .column-form tr td.input label {
484
- padding-left: 10px;
485
- padding-right: 0;
486
- }
487
- .column-form tr td.input p.description {
488
- /*display: none;*/
489
- margin-top: 4px;
490
- color: #888888;
491
- }
492
- .column-form a.help {
493
- vertical-align: middle;
494
- float: right;
495
- }
496
- .rtl .column-form a.help {
497
- float: left;
498
- }
499
- .column-form div.msg {
500
- margin-top: 5px;
501
- display: none;
502
- color: #333;
503
- padding: 6px 8px;
504
- background-color: #ffebe8;
505
- border: 1px solid #fff;
506
- -moz-border-radius: 3px;
507
- -webkit-border-radius: 3px;
508
- border-radius: 3px;
509
- }
510
- .column-form select optgroup:nth-child(2n) {
511
- background: #F9F9F9;
512
- }
513
-
514
- /* =Column Footer
515
- -------------------------------------------------------------- */
516
- .column-footer {
517
- background: #EAF2FA;
518
- border: 1px solid #c7d7e2;
519
- min-height: 26px;
520
- padding: 8px;
521
- overflow: hidden;
522
- }
523
- .column-footer .order-message {
524
- background: transparent url('../images/order_arrow.png') no-repeat 0 0;
525
- color: #7A9BBE;
526
- float: left;
527
- font-family: Comic Sans MS,sans-serif;
528
- font-size: 11px;
529
- height: 13px;
530
- line-height: 1em;
531
- margin-left: 4px;
532
- padding: 7px 0 0 22px;
533
- text-shadow: 0 1px 0 #FFFFFF;
534
- display: inline-block;
535
- }
536
- .rtl .column-footer .order-message {
537
- float: right;
538
- padding-right: 22px;
539
- padding-left: 0;
540
- background: transparent url('../images/order_arrow-rtl.png') no-repeat right top;
541
- }
542
-
543
- /* =Sidebar
544
- -------------------------------------------------------------- */
545
- .columns-right {
546
- margin-top: 52px;
547
- }
548
- .sidebox {
549
- background: none repeat scroll 0 0 #FFFFFF;
550
- border: 1px solid #E1E1E1;
551
- border-radius: 0 0 0 0;
552
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
553
- position: relative;
554
- margin-bottom: 14px;
555
- }
556
- .sidebox h3 {
557
- padding: 10px;
558
- margin: 0;
559
- }
560
- .sidebox h3.title {
561
- font-family: Georgia,"Times New Roman","Bitstream Charter",Times,serif;
562
- font-size: 15px;
563
- font-weight: normal;
564
- line-height: 1;
565
- margin: 0;
566
- padding: 7px 10px;
567
- background: #f1f1f1;
568
- background-image: -webkit-gradient(linear, left bottom, left top, from(#ececec), to(#f9f9f9));
569
- background-image: -webkit-linear-gradient(bottom, #ececec, #f9f9f9);
570
- background-image: -moz-linear-gradient(bottom, #ececec, #f9f9f9);
571
- background-image: -o-linear-gradient(bottom, #ececec, #f9f9f9);
572
- background-image: linear-gradient(to top, #ececec, #f9f9f9);
573
- border-bottom-color: #dfdfdf;
574
- text-shadow: #fff 0 1px 0;
575
- -webkit-box-shadow: 0 1px 0 #fff;
576
- box-shadow: 0 1px 0 #fff;
577
- border-bottom-style: solid;
578
- border-bottom-width: 1px;
579
- }
580
- .sidebox .inside {
581
- padding: 10px;
582
- }
583
- .sidebox .inside p {
584
- margin-top: 0;
585
- }
586
- #form-actions .form-reset {
587
- border-bottom: 1px solid #F5F5F5;
588
- padding: 8px;
589
- }
590
- #form-actions .reset-column-type {
591
- text-decoration: none;
592
- color: #BC0B0B;
593
- line-height: 25px;
594
- display: inline-block;
595
- }
596
- #form-actions .reset-column-type:hover {
597
- color: #FF0000
598
- }
599
- #form-actions .form-update {
600
- padding: 8px;
601
- }
602
- #form-actions .submit-update {
603
- display: block;
604
- width: 100%;
605
- height: 28px;
606
- line-height: 28px;
607
- text-align: center;
608
- }
609
-
610
- /* =Sidebar: Pro
611
- --------------------------------*/
612
- #pro-version .cta {
613
- background: transparent url(../images/get_the_addon.png) no-repeat 0 0;
614
- }
615
- #pro-version .padding-box {
616
- padding: 8px 15px 0;
617
- }
618
- #pro-version a {
619
- color: red;
620
- }
621
- #pro-version h3 a {
622
- color: #fff;
623
- font-size: 19px;
624
- text-decoration: none;
625
- font-weight: normal;
626
- margin-top: 6px;
627
- }
628
- #pro-version .inside ul {
629
- margin: 0 0 10px 0;
630
- }
631
- #pro-version .inside ul li {
632
- margin: 0;
633
- padding: 0;
634
- }
635
- #pro-version .inside ul li a {
636
- display: inline-block;
637
- height: 24px;
638
- font-size: 19px;
639
- line-height: 24px;
640
- margin-bottom: 1px;
641
- padding: 0 5px;
642
- background: #000;
643
- color: #fff;
644
- text-decoration: none;
645
- }
646
-
647
- #pro-version .inside p {
648
- color: #fff;
649
- font-size: 12px;
650
- }
651
- #pro-version .inside p a {
652
- color: #fff;
653
- display: inline-block;
654
- background: #a4c518;
655
- padding: 0 2px;
656
- font-size: 15px;
657
- text-decoration: none;
658
- }
659
-
660
-
661
- /* =Sidebar: Addons
662
- --------------------------------*/
663
- #addon-state {}
664
- #addon-state .inside {
665
- overflow: hidden;
666
- }
667
- #addon-state ul {
668
- margin: 0 0 8px;
669
- }
670
- #addon-state ul li {
671
- background: transparent url('../images/checkmark_single.png') no-repeat 0 0;
672
- padding-left: 25px;
673
- margin-bottom: 4px;
674
- }
675
- .rtl #addon-state ul li {
676
- padding-right: 25px;
677
- padding-left: 0;
678
- }
679
- #addon-state a.find-more-addons {
680
- float: right;
681
- }
682
- .rtl #addon-state a.find-more-addons {
683
- float: left;
684
- }
685
-
686
- /* =Settings Page
687
- -------------------------------------------------------------- */
688
- table.cpac-form-table {
689
- max-width: 1100px;
690
- margin-top: 20px;
691
- }
692
- .col-25, .col-30, .col-35, .col-65, .col-70, .col-75 {
693
- float: left;
694
- }
695
- .rtl .col-25, .rtl .col-30, .rtl .col-35, .rtl .col-65, .rtl .col-70, .rtl .col-75 {
696
- float: right;
697
- }
698
- .col-25 { width: 25%; }
699
- .col-30 { width: 30%; }
700
- .col-35 { width: 35%; }
701
- .col-65 { width: 65%; }
702
- .col-70 { width: 70%; }
703
- .col-75 { width: 75%; }
704
- table.cpac-form-table > tbody > tr > td,
705
- table.cpac-form-table > tbody > tr > th {
706
- vertical-align: top;
707
- padding-bottom: 20px;
708
- }
709
- table.addons tr {
710
- background: #fff;
711
- }
712
- tr td.padding-22 {
713
- padding-top: 22px;
714
- }
715
- .ms-list li {
716
- margin: 0;
717
- padding-top: 5px;
718
- padding-bottom: 5px;
719
- }
720
- /* =Column: Button
721
- -------------------------------------------------------------- */
722
- .column-form tr.column_action td a.remove-button {
723
- border-bottom: 1px solid #FF0000;
724
- color: #FF0000;
725
- display: inline-block;
726
- padding: 0 3px;
727
- text-decoration: none;
728
- text-shadow: none;
729
- }
730
- .column-form tr.column_action td a.remove-button:hover {
731
- background-color: #FF0000;
732
- border-bottom-color: #FF0000;
733
- color: #FFFFFF;
734
- text-decoration: none;
735
- }
736
-
737
- /* =Column: Action
738
- -------------------------------------------------------------- */
739
- .column-form tr.column_action td {
740
- background: #f9f9f9;
741
- }
742
-
743
- /* =Column: Footer
744
- -------------------------------------------------------------- */
745
- .column-footer .button-container {
746
- float: right;
747
- display: inline-block;
748
- margin-top: -5px;
749
- }
750
- .rtl .column-footer .button-container {
751
- float: left;
752
- }
753
- .column-footer .button-container p {
754
- margin: 4px;
755
- color: #7A9BBE;
756
- }
757
- .column-footer .button-container a {
758
- display: inline-block;
759
- margin-top: 5px;
760
- }
761
-
762
- /* =Welcome Screen
763
- -------------------------------------------------------------- */
764
-
765
- .cpac-content-body hr {
766
- -moz-border-bottom-colors: none;
767
- -moz-border-left-colors: none;
768
- -moz-border-right-colors: none;
769
- -moz-border-top-colors: none;
770
- background: none repeat scroll 0 0 transparent;
771
- border-color: #DFDFDF -moz-use-text-color -moz-use-text-color;
772
- border-image: none;
773
- border-right: 0 none;
774
- border-style: solid none none;
775
- border-width: 1px 0 0;
776
- clear: both;
777
- margin: 30px 0;
778
- opacity: 0.2;
779
- }
780
- #cpac-welcome.about-wrap div.error {
781
- display: block !important;
782
- }
783
- .cpac-alert {
784
- display: inline-block;
785
- background: none repeat scroll 0 0 #FCF8E3;
786
- border: 1px solid #FBEED5;
787
- border-radius: 4px 4px 4px 4px;
788
- color: #C09853;
789
- margin: 20px 0;
790
- padding: 16px 14px;
791
- text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
792
- }
793
- .cpac-alert p {
794
- margin: 0;
795
- }
796
- .cpac-alert.cpac-alert-success {
797
- background-color: #DFF0D8;
798
- border-color: #D6E9C6;
799
- color: #468847;
800
- }
801
- .cpac-alert.cpac-alert-error {
802
- background-color: #F2DEDE;
803
- border-color: #EED3D7;
804
- color: #B94A48;
805
- }
806
- .cpac-alert a.button-primary {
807
-
808
- height: 28px;
809
- line-height: 28px;
810
- display: inline-block;
811
- }
812
- #cpac-download-add-ons-table {
813
- max-width: 600px;
814
- }
815
- .wp-core-ui .button-large {
816
- height: 40px;
817
- line-height: 40px;
818
- font-size: 16px;
819
- padding: 0 15px;
820
- text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
821
- }
822
-
823
- /* =Import / Export
824
- -------------------------------------------------------------- */
825
- #cpac_export_types {
826
- width: 95%;
827
- }
828
- #cpac_export_output {
829
- display: none;
830
- }
831
- #cpac_export_output textarea {
832
- width: 100%;
833
- height: 80%;
834
- }
835
- #cpac_export_submit {
836
- display: inline-block;
837
- margin: 10px 8px;
838
- padding: 4px 14px;
839
- height: auto;
840
- }
841
- #cpac_import_input {}
842
- #cpac_import_input textarea {
843
- width: 100%;
844
- height: 200px;
845
- }
846
- #cpac_import_submit {
847
- display: inline-block;
848
- margin: 10px 0;
849
- }
850
- .export-message,
851
- .import-message {
852
- background-color: #FFFFE0;
853
- border: 1px solid #E6DB55;
854
- padding: 4px 6px;
855
- border-radius: 3px;
856
- display: none;
857
- }
858
- #import-submit {
859
- margin-top: 10px;
860
- display: block;
861
- }
862
- .cpac_export .ms-container {
863
- background: transparent url('../images/switch_bw.png') no-repeat 50% 50%;
864
- }
865
- .cpac_export .ms-container .ms-selectable {
866
- width: 48%;
867
- margin-right: 0;
868
- }
869
- .cpac_export .ms-container .ms-selection {
870
- float: right;
871
- width: 48%;
872
- }
873
- .rtl .cpac_export .ms-container .ms-selection {
874
- float: left;
875
- }
876
- .cpac_export .ms-container ul.ms-list {
877
- width: 100%;
878
- }
879
- a.export-select {
880
- display: inline-block;
881
- padding: 8px 8px;
882
- text-decoration: none;
883
- }
884
-
885
- /* =Addons Page
886
- -------------------------------------------------------------- */
887
- ul.addons {
888
- margin-bottom: 0;
889
- padding: 0;
890
- overflow: hidden;
891
- }
892
- ul.addons li {
893
- background: none repeat scroll 0 0 #FFFFFF;
894
- border: 1px solid #E1E1E1;
895
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
896
- position: relative;
897
- float: left;
898
- margin: 10px 15px 20px;
899
-
900
- padding: 13px 13px 30px 13px;
901
- width: 180px;
902
- min-height: 300px;
903
- }
904
- .rtl ul.addons li {
905
- float: right;
906
- }
907
- ul.addons li h3 {
908
- font-size: 13px;
909
- }
910
- ul.addons li p {
911
- color: #666666;
912
- }
913
- ul.addons li .button {
914
- bottom: 15px;
915
- right: 15px;
916
- position: absolute;
917
- }
918
- .rtl ul.addons li .button {
919
- left: 15px;
920
- right: auto;
921
- }
922
- ul.addons li span.state {
923
- display: none;
924
- position: absolute;
925
- bottom: 0;
926
- width: 100%;
927
- text-indent: 29px;
928
- height: 30px;
929
- line-height: 30px;
930
- margin-left: -13px;
931
- background: #73a8d0 url('../images/checkmark_white.png') no-repeat 6px 7px;
932
- color: #fff;
933
- font-weight: bold;
934
- }
935
- .rtl ul.addons li span.state {
936
- margin-right: -13px;
937
- margin-left: 0;
938
- }
939
- ul.addons li img {
940
- margin: -15px 0 0 -13px;
941
- }
942
- .rtl ul.addons li img {
943
- margin: -15px -13px 0 0;
944
- }
945
- ul.addons li.active .button {
946
- display: none;
947
- }
948
- ul.addons li.active span.state {
949
- display: block;
950
- }
951
-
952
- /* =WP Pointer
953
- -------------------------------------------------------------- */
954
- .wp-pointer-content {
955
- overflow: hidden;
956
- }
957
- .wp-pointer-content ol {
958
- margin-left: 1.5em;
959
- padding: 0 15px;
960
- }
961
- .rtl .wp-pointer-content ol {
962
- margin-right: 1.5em;
963
- margin-left: 0;
964
- }
965
- .wp-pointer-right {
966
- margin-right: 15px;
967
- }
968
- .rtl .wp-pointer-right {
969
- margin-left: 15px;
970
- margin-right: 0;
971
- }
972
-
973
- /* =Responsive
974
- -------------------------------------------------------------- */
975
- @media only screen and (max-width: 850px) {
976
- .columns-container {
977
- margin-right: 0;
978
- }
979
- .rtl .columns-container {
980
- margin-left: 0;
981
- margin-right: auto;
982
- }
983
- .columns-right {
984
- margin-top: 0;
985
- margin-right: 0;
986
- width: 100%;
987
- }
988
- .rtl .columns-right {
989
- margin-left: 0;
990
- margin-right: auto;
991
- }
992
- .columns-right-inside.fixed {
993
- position: relative;
994
- top: 0;
995
- width: 100%;
996
- }
997
- .columns-right #addon-state {
998
- display: none;
999
- }
1000
- .columns-right #plugin-support {
1001
- display: none;
1002
- }
1003
- }
1
+ #cpac a:focus,
2
+ #cpac a:active {
3
+ outline: none;
4
+ }
5
+ /**
6
+ * General
7
+ * ----------------------------------------------------------------------------
8
+ */
9
+ #icon-codepress-admin-columns {
10
+ background: transparent url('../images/icon.png') no-repeat 0 0;
11
+ }
12
+ .cpac-settings-link {
13
+ float: right;
14
+ margin: 12px 14px 5px 0;
15
+ background: transparent url('../images/settings.png') no-repeat 0 0;
16
+ padding-left: 20px;
17
+ text-decoration: none;
18
+ display: inline-block;
19
+ line-height: 16px;
20
+ }
21
+ .cpac-settings-link.current {
22
+ font-weight: bold;
23
+ }
24
+ .rtl .cpac-settings-link {
25
+ float: left;
26
+ margin: 12px 0 5px 14px;
27
+ padding-right: 20px;
28
+ padding-left: 0;
29
+ }
30
+ a.help {
31
+ background: transparent url('../images/help.png') no-repeat 0 0;
32
+ display: inline-block;
33
+ width: 16px;
34
+ height: 16px;
35
+ }
36
+ .button.loading {
37
+ padding-right: 25px;
38
+ position: relative;
39
+ }
40
+ .rtl .button.loading {
41
+ padding-left: 25px;
42
+ padding-right: 0;
43
+ }
44
+ .button.loading span {
45
+ position: absolute;
46
+ top: 2px;
47
+ right: 6px;
48
+ background: transparent url('../images/loading.gif') no-repeat right 50%;
49
+ width: 16px;
50
+ height: 16px;
51
+ display: inline-block;
52
+ }
53
+ .rtl .button.loading span {
54
+ left: 6px;
55
+ right: auto;
56
+ }
57
+ /**
58
+ * Icons
59
+ * ----------------------------------------------------------------------------
60
+ */
61
+ .icon-yes {
62
+ background: transparent url(../images/yes.png) no-repeat 0 0;
63
+ width: 16px;
64
+ height: 16px;
65
+ display: inline-block;
66
+ position: relative;
67
+ top: 2px;
68
+ }
69
+ .icon-no {
70
+ background: transparent url(../images/no.png) no-repeat 0 0;
71
+ width: 16px;
72
+ height: 16px;
73
+ display: inline-block;
74
+ position: relative;
75
+ top: 2px;
76
+ }
77
+ /**
78
+ * Header
79
+ * ----------------------------------------------------------------------------
80
+ */
81
+ h2.cpac-nav-tab-wrapper {
82
+ margin-bottom: 10px;
83
+ }
84
+ /**
85
+ * Menu
86
+ * ----------------------------------------------------------------------------
87
+ */
88
+ .cpac-menu {
89
+ clear: both;
90
+ overflow: hidden;
91
+ margin-bottom: 10px;
92
+ }
93
+ .cpac-menu .subsubsub {
94
+ white-space: normal;
95
+ margin-right: 14px;
96
+ width: 100%;
97
+ margin: 0 14px 0 0;
98
+ }
99
+ .cpac-menu .subsubsub li.first {
100
+ font-weight: bold;
101
+ min-width: 90px;
102
+ }
103
+ /**
104
+ * Structure
105
+ * ----------------------------------------------------------------------------
106
+ */
107
+ .columns-container {
108
+ margin-right: 300px;
109
+ max-width: 700px;
110
+ }
111
+ .columns-container .columns-left {
112
+ float: left;
113
+ width: 100%;
114
+ }
115
+ .columns-container .columns-right {
116
+ float: right;
117
+ margin-right: -300px;
118
+ width: 280px;
119
+ }
120
+ .columns-container .columns-right .columns-right-inside.fixed {
121
+ position: fixed;
122
+ top: 40px;
123
+ width: 280px;
124
+ }
125
+ /**
126
+ * UI Sortable Plugin
127
+ * ----------------------------------------------------------------------------
128
+ */
129
+ .ui-sortable-helper {
130
+ -webkit-box-shadow: 1px 3px 6px 0px rgba(1, 1, 1, 0.4);
131
+ box-shadow: 1px 3px 6px 0px rgba(1, 1, 1, 0.4);
132
+ }
133
+ .ui-sortable-helper .column-meta {
134
+ border-width: 1px;
135
+ }
136
+ .cpac-placeholder {
137
+ visibility: visible !important;
138
+ border-top: 1px solid #dfdfdf;
139
+ padding: 5px 4px 7px 0;
140
+ }
141
+ .cpac-placeholder .inner-placeholder {
142
+ border: 1px dashed #808080;
143
+ background: #eee;
144
+ width: 100%;
145
+ height: 100%;
146
+ }
147
+ .cpac-placeholder :first-child {
148
+ border: none;
149
+ }
150
+ /**
151
+ * Columns
152
+ * ----------------------------------------------------------------------------
153
+ */
154
+ .columns-left .cpac-boxes .cpac-columns form {
155
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
156
+ }
157
+ /**
158
+ * Column
159
+ * ----------------------------------------------------------------------------
160
+ */
161
+ .cpac-column .column-meta {
162
+ border-style: solid;
163
+ border-color: #dfdfdf;
164
+ border-width: 1px 1px 0;
165
+ background: #fcfcfc;
166
+ }
167
+ .cpac-column .column-meta:nth-child(2n) .column-meta {
168
+ background: #f9f9f9;
169
+ }
170
+ .cpac-column .column-meta img {
171
+ margin-right: 3px;
172
+ }
173
+ .cpac-column .column-meta table {
174
+ border: none;
175
+ background: transparent;
176
+ border-radius: 0;
177
+ }
178
+ .cpac-column .column-meta table tr td {
179
+ vertical-align: top;
180
+ height: 18px;
181
+ border: none;
182
+ padding: 11px 8px;
183
+ border-width: 1px 0 0;
184
+ border-style: solid;
185
+ border-color: transparent;
186
+ }
187
+ .cpac-column .column-meta table tr td.column_sort {
188
+ width: 10px;
189
+ background: transparent url('../images/drag.png') no-repeat 8px 8px;
190
+ cursor: move;
191
+ }
192
+ .cpac-column .column-meta table tr td.column_label {
193
+ width: 55%;
194
+ font-weight: bold;
195
+ vertical-align: middle;
196
+ position: relative;
197
+ }
198
+ .cpac-column .column-meta table tr td.column_label .inner {
199
+ position: relative;
200
+ overflow: hidden;
201
+ height: 18px;
202
+ }
203
+ .cpac-column .column-meta table tr td.column_label .inner > a {
204
+ color: #5a5a5a;
205
+ padding: 0 4px;
206
+ }
207
+ .cpac-column .column-meta table tr td.column_label .inner > a:hover {
208
+ color: #333333;
209
+ }
210
+ .cpac-column .column-meta table tr td.column_label .inner > a.edit-button,
211
+ .cpac-column .column-meta table tr td.column_label .inner > a.remove-button {
212
+ display: none;
213
+ color: #a00;
214
+ text-decoration: none;
215
+ text-shadow: none;
216
+ font-weight: normal;
217
+ margin-left: 5px;
218
+ font-size: 12px;
219
+ }
220
+ .cpac-column .column-meta table tr td.column_label .inner > a.edit-button:hover,
221
+ .cpac-column .column-meta table tr td.column_label .inner > a.remove-button:hover {
222
+ color: #f00;
223
+ }
224
+ .cpac-column .column-meta table tr td.column_label .inner > a.edit-button {
225
+ color: #0074a2;
226
+ }
227
+ .cpac-column .column-meta table tr td.column_label .inner > a.edit-button:hover {
228
+ color: #2ea2cc;
229
+ }
230
+ .cpac-column .column-meta table tr td.column_label .inner .meta {
231
+ display: inline-block;
232
+ float: right;
233
+ font-weight: normal;
234
+ color: #b2b2b2;
235
+ font-size: 12px;
236
+ }
237
+ .cpac-column .column-meta table tr td.column_label .inner .meta span {
238
+ cursor: pointer;
239
+ }
240
+ .cpac-column .column-meta table tr td.column_label span.vers {
241
+ float: left;
242
+ }
243
+ .cpac-column .column-meta table tr td.column_type {
244
+ width: auto;
245
+ text-align: right;
246
+ vertical-align: middle;
247
+ color: #999999;
248
+ padding-right: 0;
249
+ }
250
+ .cpac-column .column-meta table tr td.column_type a {
251
+ color: #999999;
252
+ }
253
+ .cpac-column .column-meta table tr td.column_edit {
254
+ width: 38px;
255
+ background: transparent url('../images/arrow.png') no-repeat 23px 18px;
256
+ cursor: pointer;
257
+ }
258
+ .cpac-column .column-meta:hover .column_label .inner > a.remove-button {
259
+ display: inline-block;
260
+ }
261
+ .cpac-column .column-meta:hover .column_label .inner > a.edit-button {
262
+ display: inline-block;
263
+ }
264
+ .cpac-column .column-meta span.vers {
265
+ padding-top: 2px;
266
+ }
267
+ .cpac-column .column-meta span.vers .comment-grey-bubble {
268
+ background: transparent url("../images/comment-grey-bubble.png") no-repeat 0 0;
269
+ height: 12px;
270
+ width: 12px;
271
+ float: right;
272
+ }
273
+ .cpac-column .column-form {
274
+ display: none;
275
+ border-width: 1px 1px 0;
276
+ border-style: solid;
277
+ border-color: #dfdfdf;
278
+ position: relative;
279
+ }
280
+ .cpac-column .column-form table {
281
+ border: none;
282
+ background: #fcfcfc;
283
+ }
284
+ .cpac-column .column-form table tr td {
285
+ vertical-align: top;
286
+ border: none;
287
+ padding: 8px;
288
+ background: #ffffff;
289
+ border-top: 1px solid #F5F5F5;
290
+ }
291
+ .cpac-column .column-form table tr td select,
292
+ .cpac-column .column-form table tr td input[type=text] {
293
+ width: 99.95%;
294
+ }
295
+ .cpac-column .column-form table tr td select optgroup:nth-child(2n) {
296
+ background: #F9F9F9;
297
+ }
298
+ .cpac-column .column-form table tr td.label {
299
+ position: relative;
300
+ overflow: visible;
301
+ background: #F9F9F9;
302
+ background: #f5f5f5;
303
+ border-right: 1px solid #E1E1E1;
304
+ vertical-align: top;
305
+ width: 34%;
306
+ border-top: 1px solid #F0F0F0;
307
+ }
308
+ .cpac-column .column-form table tr td.label label {
309
+ font-weight: bold;
310
+ color: #333333;
311
+ display: block;
312
+ position: relative;
313
+ }
314
+ .cpac-column .column-form table tr td.label p {
315
+ color: #666666;
316
+ display: block;
317
+ font-size: 12px;
318
+ font-style: normal;
319
+ line-height: 16px;
320
+ margin: 0 !important;
321
+ }
322
+ .cpac-column .column-form table tr td.label p.description {
323
+ display: none;
324
+ position: absolute;
325
+ z-index: 99;
326
+ top: 30px;
327
+ left: 0;
328
+ background: #eaf2fa;
329
+ border-radius: 5px;
330
+ border: 1px solid #c7d7e2;
331
+ padding: 5px 8px !important;
332
+ font-weight: normal;
333
+ }
334
+ .cpac-column .column-form table tr td.label p.description em {
335
+ display: block;
336
+ color: #999;
337
+ }
338
+ .cpac-column .column-form table tr td.input label {
339
+ padding-left: 10px;
340
+ padding-right: 0;
341
+ }
342
+ .cpac-column .column-form table tr td.input div.msg {
343
+ margin-top: 5px;
344
+ display: none;
345
+ color: #333;
346
+ padding: 6px 8px;
347
+ background-color: #ffebe8;
348
+ border: 1px solid #fff;
349
+ -moz-border-radius: 3px;
350
+ -webkit-border-radius: 3px;
351
+ border-radius: 3px;
352
+ }
353
+ .cpac-column .column-form table tr.column_width div.description {
354
+ font-size: 11px;
355
+ width: 12%;
356
+ float: left;
357
+ text-align: middle;
358
+ }
359
+ .cpac-column .column-form table tr.column_width div.input-width-range {
360
+ float: left;
361
+ position: relative;
362
+ width: 87%;
363
+ margin-top: 4px;
364
+ }
365
+ .cpac-column .column-form table tr.column_width div.input-width-range .ui-slider-handle {
366
+ cursor: ew-resize;
367
+ }
368
+ .cpac-column .column-form table tr.column_image_size {
369
+ border: 10px solid red;
370
+ }
371
+ .cpac-column .column-form table tr.column_image_size td.input label.custom-size {
372
+ display: inline-block;
373
+ margin-top: 4px;
374
+ margin-bottom: 4px;
375
+ }
376
+ .cpac-column .column-form table tr.column_image_size td.input label.custom-size input {
377
+ margin-right: 3px;
378
+ }
379
+ .cpac-column .column-form table tr.column_image_size td.input .custom_image_size {
380
+ display: inline-block;
381
+ }
382
+ .cpac-column .column-form table tr.column_image_size td.input .custom_image_size .hidden {
383
+ display: none;
384
+ }
385
+ .cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-w,
386
+ .cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-h {
387
+ margin: 0;
388
+ }
389
+ .cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-w.hidden,
390
+ .cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-h.hidden {
391
+ display: none;
392
+ }
393
+ .cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-w input[type="text"],
394
+ .cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-h input[type="text"] {
395
+ margin-right: 3px;
396
+ width: 30px !important;
397
+ }
398
+ .cpac-column .column-form table tr.column_action td {
399
+ background: #f9f9f9;
400
+ }
401
+ .cpac-column .column-form table tr.column_action td p {
402
+ margin: 0;
403
+ }
404
+ .cpac-column .column-form table tr.column_action td p a.remove-button {
405
+ color: #a00;
406
+ text-decoration: none;
407
+ text-shadow: none;
408
+ font-weight: normal;
409
+ margin-left: 5px;
410
+ font-size: 12px;
411
+ padding: 0 5px;
412
+ }
413
+ .cpac-column .column-form table tr.column_action td p a.remove-button:hover {
414
+ color: #fff;
415
+ background: #f00;
416
+ }
417
+ .cpac-column .column-form table tr:first-child td {
418
+ border-top: none;
419
+ }
420
+ .cpac-column.loading .column-form > .spinner {
421
+ position: absolute;
422
+ left: 50%;
423
+ top: 50%;
424
+ z-index: 200;
425
+ margin-left: -10px;
426
+ margin-top: -10px;
427
+ display: block;
428
+ }
429
+ .cpac-column.loading .column-form:before {
430
+ content: '';
431
+ position: absolute;
432
+ width: 100%;
433
+ height: 100%;
434
+ background: #FFF;
435
+ z-index: 100;
436
+ opacity: 0.5;
437
+ }
438
+ .cpac-column.opened .column-meta {
439
+ background-color: #c7c7c7;
440
+ background-image: -ms-linear-gradient(top, #e9e9e9, #c7c7c7);
441
+ background-image: -moz-linear-gradient(top, #e9e9e9, #c7c7c7);
442
+ background-image: -o-linear-gradient(top, #e9e9e9, #c7c7c7);
443
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#e9e9e9), to(#c7c7c7));
444
+ background-image: -webkit-linear-gradient(top, #e9e9e9, #c7c7c7);
445
+ background-image: linear-gradient(top, #e9e9e9, #c7c7c7);
446
+ border-color: #aeaeae;
447
+ }
448
+ .cpac-column.opened .column-meta table {
449
+ background: transparent;
450
+ }
451
+ .cpac-column.opened .column-meta table td {
452
+ border-color: #f8f8f8;
453
+ color: #333;
454
+ text-shadow: 0 1px 0 #FFFFFF;
455
+ }
456
+ .cpac-column.opened .column-meta table td a {
457
+ color: #333;
458
+ text-shadow: 0 1px 0 #FFFFFF;
459
+ }
460
+ .cpac-column.opened .column-meta table td.column_sort {
461
+ background-position: 8px -39px;
462
+ }
463
+ .cpac-column.opened .column-meta table td.column_label .inner .meta {
464
+ color: #808080;
465
+ }
466
+ .cpac-column.opened .column-meta table td.column_type {
467
+ color: #5C5C5C;
468
+ }
469
+ /**
470
+ * Column: Footer
471
+ * ----------------------------------------------------------------------------
472
+ */
473
+ .column-footer {
474
+ background: #EAF2FA;
475
+ border: 1px solid #c7d7e2;
476
+ min-height: 26px;
477
+ padding: 8px;
478
+ overflow: hidden;
479
+ }
480
+ .column-footer .order-message {
481
+ background: transparent url('../images/order_arrow.png') no-repeat 0 0;
482
+ color: #7A9BBE;
483
+ float: left;
484
+ font-family: Comic Sans MS, sans-serif;
485
+ font-size: 11px;
486
+ height: 13px;
487
+ line-height: 1em;
488
+ margin-left: 4px;
489
+ padding: 7px 0 0 22px;
490
+ text-shadow: 0 1px 0 #FFFFFF;
491
+ display: inline-block;
492
+ }
493
+ .column-footer .button-container {
494
+ float: right;
495
+ display: inline-block;
496
+ margin-top: -5px;
497
+ }
498
+ .column-footer .button-container a {
499
+ display: inline-block;
500
+ margin-top: 5px;
501
+ }
502
+ /**
503
+ * Welcome Screen
504
+ * ----------------------------------------------------------------------------
505
+ */
506
+ .cpac-content-body hr {
507
+ -moz-border-bottom-colors: none;
508
+ -moz-border-left-colors: none;
509
+ -moz-border-right-colors: none;
510
+ -moz-border-top-colors: none;
511
+ background: none repeat scroll 0 0 transparent;
512
+ border-color: #dfdfdf -moz-use-text-color -moz-use-text-color;
513
+ border-image: none;
514
+ border-right: 0 none;
515
+ border-style: solid none none;
516
+ border-width: 1px 0 0;
517
+ clear: both;
518
+ margin: 30px 0;
519
+ opacity: 0.2;
520
+ }
521
+ #cpac-welcome.about-wrap div.error {
522
+ display: block !important;
523
+ }
524
+ .cpac-alert {
525
+ display: inline-block;
526
+ background: none repeat scroll 0 0 #FCF8E3;
527
+ border: 1px solid #FBEED5;
528
+ border-radius: 4px 4px 4px 4px;
529
+ color: #C09853;
530
+ margin: 20px 0;
531
+ padding: 16px 14px;
532
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
533
+ }
534
+ .cpac-alert p {
535
+ margin: 0;
536
+ }
537
+ .cpac-alert.cpac-alert-success {
538
+ background-color: #DFF0D8;
539
+ border-color: #D6E9C6;
540
+ color: #468847;
541
+ }
542
+ .cpac-alert.cpac-alert-error {
543
+ background-color: #F2DEDE;
544
+ border-color: #EED3D7;
545
+ color: #B94A48;
546
+ }
547
+ .cpac-alert a.button-primary {
548
+ height: 28px;
549
+ line-height: 28px;
550
+ display: inline-block;
551
+ }
552
+ #cpac-download-add-ons-table {
553
+ max-width: 600px;
554
+ }
555
+ .wp-core-ui .button-large {
556
+ height: 40px;
557
+ line-height: 40px;
558
+ font-size: 16px;
559
+ padding: 0 15px;
560
+ text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
561
+ }
562
+ /**
563
+ * Sidebar
564
+ * ----------------------------------------------------------------------------
565
+ */
566
+ .columns-right {
567
+ margin-top: 54px;
568
+ }
569
+ .columns-right .sidebox {
570
+ background: none repeat scroll 0 0 #FFFFFF;
571
+ border: 1px solid #E1E1E1;
572
+ border-radius: 0 0 0 0;
573
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
574
+ position: relative;
575
+ margin-bottom: 14px;
576
+ }
577
+ .columns-right .sidebox h3 {
578
+ padding: 10px;
579
+ margin: 0;
580
+ }
581
+ .columns-right .sidebox h3.title {
582
+ font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
583
+ font-size: 15px;
584
+ font-weight: normal;
585
+ line-height: 1;
586
+ margin: 0;
587
+ padding: 7px 10px;
588
+ background: #f1f1f1;
589
+ background-image: -webkit-gradient(linear, left bottom, left top, from(#ececec), to(#f9f9f9));
590
+ background-image: -webkit-linear-gradient(bottom, #ececec, #f9f9f9);
591
+ background-image: -moz-linear-gradient(bottom, #ececec, #f9f9f9);
592
+ background-image: -o-linear-gradient(bottom, #ececec, #f9f9f9);
593
+ background-image: linear-gradient(to top, #ececec, #f9f9f9);
594
+ border-bottom-color: #dfdfdf;
595
+ text-shadow: #fff 0 1px 0;
596
+ -webkit-box-shadow: 0 1px 0 #fff;
597
+ box-shadow: 0 1px 0 #fff;
598
+ border-bottom-style: solid;
599
+ border-bottom-width: 1px;
600
+ }
601
+ .columns-right .sidebox .inside {
602
+ padding: 10px;
603
+ }
604
+ .columns-right .sidebox .inside p {
605
+ margin-top: 0;
606
+ }
607
+ .columns-right .sidebox#form-actions .form-reset {
608
+ border-bottom: 1px solid #F5F5F5;
609
+ padding: 8px;
610
+ }
611
+ .columns-right .sidebox#form-actions .reset-column-type {
612
+ text-decoration: none;
613
+ color: #BC0B0B;
614
+ line-height: 25px;
615
+ display: inline-block;
616
+ }
617
+ .columns-right .sidebox#form-actions .form-update {
618
+ padding: 8px;
619
+ overflow: hidden;
620
+ }
621
+ .columns-right .sidebox#form-actions .submit-update {
622
+ display: block;
623
+ width: 100%;
624
+ height: 28px;
625
+ line-height: 28px;
626
+ text-align: center;
627
+ }
628
+ .columns-right .sidebox#pro-version .cta {
629
+ background: transparent url(../images/get_the_addon.png) no-repeat 0 0;
630
+ }
631
+ .columns-right .sidebox#pro-version .padding-box {
632
+ padding: 8px 15px 0;
633
+ }
634
+ .columns-right .sidebox#pro-version h3 a {
635
+ color: #fff;
636
+ font-size: 19px;
637
+ text-decoration: none;
638
+ font-weight: normal;
639
+ margin-top: 6px;
640
+ }
641
+ .columns-right .sidebox#pro-version .inside ul {
642
+ margin: 0 0 10px 0;
643
+ }
644
+ .columns-right .sidebox#pro-version .inside ul li {
645
+ margin: 0;
646
+ padding: 0;
647
+ }
648
+ .columns-right .sidebox#pro-version .inside ul li a {
649
+ display: inline-block;
650
+ height: 24px;
651
+ font-size: 19px;
652
+ line-height: 24px;
653
+ margin-bottom: 1px;
654
+ padding: 0 5px;
655
+ background: #000;
656
+ color: #fff;
657
+ text-decoration: none;
658
+ }
659
+ .columns-right .sidebox#pro-version .inside p {
660
+ color: #fff;
661
+ font-size: 12px;
662
+ }
663
+ .columns-right .sidebox#pro-version .inside p a {
664
+ color: #fff;
665
+ display: inline-block;
666
+ background: #a4c518;
667
+ padding: 0 2px;
668
+ font-size: 15px;
669
+ text-decoration: none;
670
+ }
671
+ /**
672
+ * Setting Tab
673
+ * ----------------------------------------------------------------------------
674
+ */
675
+ table.cpac-form-table {
676
+ max-width: 1100px;
677
+ margin-top: 20px;
678
+ }
679
+ table.cpac-form-table > tbody > tr > td,
680
+ table.cpac-form-table > tbody > tr > th {
681
+ vertical-align: top;
682
+ }
683
+ table.cpac-form-table td.padding-22 {
684
+ padding-top: 22px;
685
+ }
686
+ table.cpac-form-table td .cpac_export .ms-container {
687
+ background: transparent url('../images/switch_bw.png') no-repeat 50% 50%;
688
+ }
689
+ table.cpac-form-table td .cpac_export .ms-container .ms-selectable {
690
+ width: 48%;
691
+ margin-right: 0;
692
+ }
693
+ table.cpac-form-table td .cpac_export .ms-container .ms-selection {
694
+ float: right;
695
+ width: 48%;
696
+ }
697
+ table.cpac-form-table td .cpac_export .ms-container ul.ms-list {
698
+ width: 100%;
699
+ }
700
+ table.cpac-form-table td .cpac_export .ms-container ul.ms-list li {
701
+ margin: 0;
702
+ padding-top: 5px;
703
+ padding-bottom: 5px;
704
+ }
705
+ /**
706
+ * WP Pointer
707
+ * ----------------------------------------------------------------------------
708
+ */
709
+ .wp-pointer-content {
710
+ overflow: hidden;
711
+ }
712
+ .wp-pointer-content ol {
713
+ margin-left: 1.5em;
714
+ padding: 0 15px;
715
+ }
716
+ .wp-pointer-right {
717
+ margin-right: 15px;
718
+ }
719
+ /* =RTL language
720
+ -------------------------------------------------------------- */
721
+ body.rtl .wp-pointer-right {
722
+ margin-left: 15px;
723
+ margin-right: 0;
724
+ }
725
+ body.rtl .wp-pointer-right ol {
726
+ margin-right: 1.5em;
727
+ margin-left: 0;
728
+ }
729
+ body.rtl .cpac-menu .subsubsub {
730
+ margin-left: 14px;
731
+ margin-right: 0;
732
+ }
733
+ body.rtl .columns-container {
734
+ margin-left: 300px;
735
+ margin-right: 0;
736
+ }
737
+ body.rtl .columns-left {
738
+ float: right;
739
+ }
740
+ body.rtl .columns-left .cpac-columns .cpac-column .column-meta img {
741
+ margin-left: 3px;
742
+ margin-right: 0;
743
+ }
744
+ body.rtl .columns-left .cpac-columns .cpac-column .column-meta .column_label .inner > a.remove-button {
745
+ margin-right: 12px;
746
+ margin-left: 0;
747
+ }
748
+ body.rtl .columns-left .cpac-columns .cpac-column .column-meta .column_label .inner .meta {
749
+ float: left;
750
+ }
751
+ body.rtl .columns-left .cpac-columns .cpac-column .column-meta .column_label span.vers {
752
+ float: right;
753
+ }
754
+ body.rtl .columns-left .cpac-columns .cpac-column .column-meta .column_type {
755
+ text-align: left;
756
+ padding-left: 0;
757
+ padding-right: auto;
758
+ }
759
+ body.rtl .columns-left .cpac-columns .cpac-column .column-meta span.vers .comment-grey-bubble {
760
+ float: left;
761
+ }
762
+ body.rtl .columns-left .cpac-columns .cpac-column .column-form table tr.column_image_size td.input label input {
763
+ margin-left: 3px;
764
+ margin-right: 0;
765
+ }
766
+ body.rtl .columns-left .cpac-columns .cpac-column .column-form table tr td.label p.description {
767
+ right: 0;
768
+ left: auto;
769
+ }
770
+ body.rtl .columns-left .cpac-columns .cpac-column .column-form table tr td.label a.more-info {
771
+ float: left;
772
+ }
773
+ body.rtl .columns-left .cpac-columns .cpac-column .column-form div.description {
774
+ float: right;
775
+ }
776
+ body.rtl .columns-left .cpac-columns .cpac-column .column-form div.input-width-range {
777
+ float: right;
778
+ }
779
+ body.rtl .columns-left .cpac-columns .cpac-column .column-form tr td.input label {
780
+ padding-left: 10px;
781
+ padding-right: 0;
782
+ }
783
+ body.rtl .columns-left .cpac-columns .cpac-column .column-form a.help {
784
+ float: left;
785
+ }
786
+ body.rtl .columns-left .column-footer .order-message {
787
+ float: right;
788
+ padding-right: 22px;
789
+ padding-left: 0;
790
+ background: transparent url('../images/order_arrow-rtl.png') no-repeat right top;
791
+ }
792
+ body.rtl .columns-left .column-footer .button-container {
793
+ float: left;
794
+ }
795
+ body.rtl .columns-right {
796
+ float: left;
797
+ margin-left: -300px;
798
+ margin-right: 0;
799
+ }
800
+ body.rtl .cpac-placeholder {
801
+ padding: 5px 0 7px 4px;
802
+ }
803
+ body.rtl .cpac_export .ms-container .ms-selection {
804
+ float: left;
805
+ }
806
+ /* =Responsive
807
+ -------------------------------------------------------------- */
808
+ @media only screen and (max-width: 900px) {
809
+ .columns-container {
810
+ margin-right: 0;
811
+ }
812
+ .columns-container .columns-left {
813
+ float: none;
814
+ }
815
+ .columns-container .columns-right {
816
+ float: none;
817
+ margin-top: 0;
818
+ margin-right: 0;
819
+ width: 100%;
820
+ }
821
+ .columns-container .columns-right .columns-right-inside.fixed {
822
+ position: relative;
823
+ top: 0;
824
+ width: 100%;
825
+ }
826
+ }
assets/css/column.css CHANGED
@@ -1,76 +1,72 @@
1
- /* =General
2
- -------------------------------------------------------------- */
3
- .cpac-divider {
4
- display: inline-block;
5
- width: 14px;
6
- height: 12px;
7
- background: transparent url(../images/square.png) no-repeat 50% 7px;
8
- }
9
- span.status-open {}
10
- span.status-closed {
11
- color: red;
12
- }
13
- .tablenav.top .cpac-edit {
14
- top: 0;
15
- display: inline-block;
16
- vertical-align: bottom;
17
- }
18
-
19
- /* =Images Column
20
- -------------------------------------------------------------- */
21
- .cpac-column-value-image {
22
- display: inline-block;
23
- background: transparent;
24
- margin-right: 2px;
25
- overflow: hidden;
26
- }
27
- .rtl .cpac-column-value-image {
28
- margin-left: 2px;
29
- margin-right: 0;
30
- }
31
- .cpac-column-value-image img {
32
- display: block;
33
- margin: 0 auto;
34
- }
35
- .column-column-attachment img {
36
- padding-right: 5px;
37
- padding-bottom: 4px;
38
- }
39
- .rtl .column-column-attachment img {
40
- padding-left: 5px;
41
- padding-right: 0;
42
- }
43
-
44
- /* =Color Column
45
- -------------------------------------------------------------- */
46
- div.cpac-color {
47
- line-height: 26px;
48
- }
49
- div.cpac-color span {
50
- display: block;
51
- -webkit-border-radius: 3px;
52
- border-radius: 3px;
53
- color: #ffffff;
54
- float: left;
55
- height: 16px;
56
- line-height: 16px;
57
- margin-right: 12px;
58
- min-width: 30px;
59
- overflow: hidden;
60
- padding: 4px 5px;
61
- font-size: 10px;
62
- font-family: Monaco,Menlo,Consolas,"Courier New",monospace;
63
- min-width: 47px;
64
- text-align: center;
65
- }
66
- .rtl div.cpac-color span {
67
- float: right;
68
- margin-left: 12px;
69
- margin-right: 0;
70
- }
71
-
72
- /* =Available Sizes column
73
- -------------------------------------------------------------- */
74
- div.sizes span.not-available {
75
- color: #999;
76
- }
1
+ /* =General
2
+ -------------------------------------------------------------- */
3
+ .cpac-divider {
4
+ display: inline-block;
5
+ width: 14px;
6
+ height: 12px;
7
+ background: transparent url(../images/square.png) no-repeat 50% 7px;
8
+ }
9
+ span.status-closed {
10
+ color: red;
11
+ }
12
+ .tablenav.top .cpac-edit {
13
+ top: 0;
14
+ display: inline-block;
15
+ vertical-align: bottom;
16
+ }
17
+ /* =Images Column
18
+ -------------------------------------------------------------- */
19
+ .cpac-column-value-image {
20
+ display: inline-block;
21
+ background: transparent;
22
+ margin-right: 2px;
23
+ overflow: hidden;
24
+ }
25
+ .rtl .cpac-column-value-image {
26
+ margin-left: 2px;
27
+ margin-right: 0;
28
+ }
29
+ .cpac-column-value-image img {
30
+ display: block;
31
+ margin: 0 auto;
32
+ }
33
+ .column-column-attachment img {
34
+ padding-right: 5px;
35
+ padding-bottom: 4px;
36
+ }
37
+ .rtl .column-column-attachment img {
38
+ padding-left: 5px;
39
+ padding-right: 0;
40
+ }
41
+ /* =Color Column
42
+ -------------------------------------------------------------- */
43
+ div.cpac-color {
44
+ line-height: 26px;
45
+ }
46
+ div.cpac-color span {
47
+ display: block;
48
+ -webkit-border-radius: 3px;
49
+ border-radius: 3px;
50
+ color: #ffffff;
51
+ float: left;
52
+ height: 16px;
53
+ line-height: 16px;
54
+ margin-right: 12px;
55
+ min-width: 30px;
56
+ overflow: hidden;
57
+ padding: 4px 5px;
58
+ font-size: 10px;
59
+ font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
60
+ min-width: 47px;
61
+ text-align: center;
62
+ }
63
+ .rtl div.cpac-color span {
64
+ float: right;
65
+ margin-left: 12px;
66
+ margin-right: 0;
67
+ }
68
+ /* =Available Sizes column
69
+ -------------------------------------------------------------- */
70
+ div.sizes span.not-available {
71
+ color: #999;
72
+ }
assets/css/custom-fields.css DELETED
@@ -1,2 +0,0 @@
1
- /* =Custom Fields
2
- -------------------------------------------------------------- */
assets/js/admin-columns.js CHANGED
@@ -7,7 +7,6 @@ jQuery(document).ready(function() {
7
if ( jQuery('#cpac').length === 0 )
8
return false;
9
10
-
11
// General
12
cpac_pointer();
13
cpac_submit_form();
@@ -22,10 +21,11 @@ jQuery(document).ready(function() {
22
cpac_add_column();
23
cpac_sidebar_scroll();
24
25
- /** we start by binding the toggle and remove events. */
26
- jQuery('.cpac-column').each( function(i,col) {
27
- jQuery(col).column_bind_toggle();
28
- jQuery(col).column_bind_remove();
29
});
30
});
31
@@ -53,18 +53,20 @@ jQuery.fn.column_bind_toggle = function() {
53
54
var column = jQuery(this);
55
56
- column.find('td.column_edit, td.column_label a.toggle' ).click( function(){
57
-
58
- column.toggleClass('opened').find('.column-form').slideToggle(150);
59
60
- if ( !column.hasClass('events-binded') )
61
column.column_bind_events();
62
63
column.addClass('events-binded');
64
65
// hook for addons
66
- jQuery(document).trigger( 'column_init', column );
67
- });
68
};
69
70
/*
@@ -81,6 +83,35 @@ jQuery.fn.column_bind_remove = function() {
81
});
82
};
83
84
/*
85
* Form Events
86
*
@@ -88,58 +119,50 @@ jQuery.fn.column_bind_remove = function() {
88
*/
89
jQuery.fn.column_bind_events = function() {
90
91
- var column = jQuery(this);
92
- var container = column.closest('.columns-container');
93
- var storage_model = container.attr('data-type');
94
-
95
- /** select column type */
96
- var default_value = column.find('.column_type select option:selected').val();
97
98
- column.find('.column_type select').change( function() {
99
100
- var option = jQuery('optgroup', this).children(":selected");
101
var type = option.val();
102
var label = option.text();
103
- var msg = jQuery(this).next('.msg').hide();
104
-
105
- // create clone
106
- var clone = container.find(".for-cloning-only .cpac-column[data-type='" + type + "']").clone();
107
- if ( clone.length > 0 ) {
108
-
109
- // column can have only one instance of itself and should not have another instance present?
110
- if ( 'undefined' === typeof clone.attr('data-clone') ) {
111
- if ( jQuery( '.cpac-columns', container ).find("[data-type='" + type + "']").length > 0 ) {
112
- msg.html( cpac_i18n.clone.replace( '%s', '<strong>' + label + '</strong>' ) ).show();
113
-
114
- // set to default
115
- jQuery(this).find('option').removeAttr('selected');
116
- jQuery(this).find('option[value="' + default_value + '"]').attr('selected', 'selected');
117
- return;
118
- }
119
- }
120
121
- // open settings
122
- clone.addClass('opened').find('.column-form').show();
123
124
- // increment clone id
125
- clone.cpac_update_clone_id( storage_model );
126
127
- // add to DOM
128
- column.replaceWith( clone );
129
130
- // rebind toggle events
131
- clone.column_bind_toggle();
132
133
- // rebind remove events
134
- clone.column_bind_remove();
135
136
- // rebind all other events
137
- clone.column_bind_events();
138
139
- // hook for addons
140
- jQuery(document).trigger( 'column_change', clone );
141
}
142
- });
143
144
/** change label */
145
column.find('.column_label .input input').bind( 'keyup change', function() {
@@ -249,6 +272,7 @@ jQuery.fn.cpac_update_clone_id = function( storage_model ) {
249
// set clone ID
250
el.attr( 'data-clone', id );
251
el.find( 'input.clone' ).val( id );
252
253
// update input names with clone ID
254
var inputs = el.find( 'input, select, label' );
@@ -478,8 +502,10 @@ function cpac_sortable() {
478
* @since 1.5
479
*/
480
function cpac_menu() {
481
// click
482
- jQuery('#cpac div.cpac-menu a').click( function(e, el) {
483
484
var id = jQuery(this).attr('href');
485
@@ -493,11 +519,72 @@ function cpac_menu() {
493
494
// set current
495
jQuery(this).addClass('current');
496
- jQuery('.columns-container[data-type="' + type + '"]').show();
497
}
498
499
e.preventDefault();
500
});
501
}
502
503
7
if ( jQuery('#cpac').length === 0 )
8
return false;
9
10
// General
11
cpac_pointer();
12
cpac_submit_form();
21
cpac_add_column();
22
cpac_sidebar_scroll();
23
24
+ // we start by binding the toggle and remove events.
25
+ jQuery('.cpac-column').each( function( i, col ) {
26
+ jQuery( col ).column_bind_toggle();
27
+ jQuery( col ).column_bind_remove();
28
+ jQuery( col ).cpac_bind_container_addon_events();
29
});
30
});
31
53
54
var column = jQuery(this);
55
56
+ column.find( 'td.column_type a, td.column_edit, td.column_label a.toggle, td.column_label .edit-button' ).click( function( e ) {
57
+ e.preventDefault();
58
+
59
+ column.toggleClass( 'opened' ).find( '.column-form' ).slideToggle( 150 );
60
61
+ if ( ! column.hasClass( 'events-binded' ) ) {
62
column.column_bind_events();
63
+ }
64
65
column.addClass('events-binded');
66
67
// hook for addons
68
+ jQuery( document ).trigger( 'column_init', column );
69
+ } );
70
};
71
72
/*
83
});
84
};
85
86
+ jQuery.fn.cpac_column_refresh = function() {
87
+ var el = jQuery( this );
88
+
89
+ // Mark column as loading
90
+ el.addClass( 'loading' );
91
+ el.find( '.column-form' ).prepend( '<span class="spinner" />' );
92
+
93
+ // Fetch new form HTML
94
+ jQuery.post( ajaxurl, {
95
+ action: 'cpac_column_refresh',
96
+ column: jQuery( this ).find( 'input.column-name' ).val(),
97
+ formdata: jQuery( this ).parents( 'form' ).serialize()
98
+ }, function( data ) {
99
+ // Replace current form by new form
100
+ el.html( data );
101
+
102
+ // Bind events
103
+ el.column_bind_toggle();
104
+ el.column_bind_remove();
105
+ el.column_bind_events();
106
+
107
+ // Remove "loading" marking from column
108
+ el.removeClass( 'loading' ).addClass( 'opened' ).find( '.column-form' ).show();
109
+
110
+ // Allow plugins to hook into this event
111
+ jQuery( document ).trigger( 'column_change', el );
112
+ } );
113
+ };
114
+
115
/*
116
* Form Events
117
*
119
*/
120
jQuery.fn.column_bind_events = function() {
121
122
+ var column = jQuery( this );
123
+ var container = column.closest( '.columns-container ');
124
+ var storage_model = container.attr( 'data-type' );
125
126
+ // Current column type
127
+ var default_value = column.find( '.column_type select option:selected' ).val();
128
129
+ column.find( '.column_type select' ).change( function() {
130
+ var option = jQuery( 'optgroup', this ).children( ':selected' );
131
var type = option.val();
132
var label = option.text();
133
+ var msg = jQuery( this ).next( '.msg' ).hide();
134
135
+ // Find template element for this field type
136
+ var template = container.find( '.for-cloning-only .cpac-column[data-type="' + type + '"]' );
137
138
+ if ( template.length ) {
139
+ // Prevent column types that do not allow it to have multiple instances
140
+ if ( typeof template.attr( 'data-clone' ) === 'undefined' && jQuery( '.cpac-columns', container ).find( '[data-type="' + type + '"]' ).length ) {
141
+ msg.html( cpac_i18n.clone.replace( '%s', '<strong>' + label + '</strong>' ) ).show();
142
143
+ // Set to default
144
+ jQuery(this).find('option').removeAttr('selected');
145
+ jQuery(this).find('option[value="' + default_value + '"]').attr('selected', 'selected');
146
147
+ return;
148
+ }
149
+ else {
150
+ var clone = template.clone();
151
152
+ // Open settings
153
+ clone.addClass('opened').find('.column-form').show();
154
+ clone.find( '.column-meta' ).replaceWith( column.find( '.column-meta' ) );
155
+ clone.find( '.column-form' ).replaceWith( column.find( '.column-form' ) );
156
157
+ // Increment clone id
158
+ clone.cpac_update_clone_id( storage_model );
159
160
+ // Load clone
161
+ column.replaceWith( clone );
162
+ clone.cpac_column_refresh();
163
+ }
164
}
165
+ } );
166
167
/** change label */
168
column.find('.column_label .input input').bind( 'keyup change', function() {
272
// set clone ID
273
el.attr( 'data-clone', id );
274
el.find( 'input.clone' ).val( id );
275
+ el.find( 'input.column-name' ).val( type + '-' + id );
276
277
// update input names with clone ID
278
var inputs = el.find( 'input, select, label' );
502
* @since 1.5
503
*/
504
function cpac_menu() {
505
+
506
+ var menu = jQuery('#cpac div.cpac-menu');
507
// click
508
+ menu.find('a').click( function(e, el) {
509
510
var id = jQuery(this).attr('href');
511
519
520
// set current
521
jQuery(this).addClass('current');
522
+ var container = jQuery('.columns-container[data-type="' + type + '"]').show();
523
+ var columns = container.find( '.cpac-columns' );
524
+
525
+ // hook for addons
526
+ jQuery( document ).trigger( 'cac_menu_change', columns );
527
}
528
529
e.preventDefault();
530
});
531
+
532
+ // activate first menu
533
+ menu.find('a.current').trigger('click');
534
}
535
536
+ /*
537
+ * Bind events: triggered after column is init, changed or added
538
+ *
539
+ */
540
+ jQuery( document ).bind('column_init column_change column_add', function( e, column ){
541
+ jQuery( column ).cpac_bind_column_addon_events();
542
+ jQuery( column ).cpac_bind_container_addon_events();
543
+ });
544
+
545
+ /*
546
+ * Radio Click events
547
+ *
548
+ */
549
+ jQuery.fn.cpac_bind_column_addon_events = function() {
550
+
551
+ var column = jQuery( this );
552
+ var inputs = column.find('[data-toggle-id] label');
553
+
554
+ // Enable editing: radio button
555
+ inputs.click( function(){
556
+
557
+ var id = jQuery( this ).closest('td.input').data('toggle-id');
558
+ var label = column.find('[data-indicator-id="' + id + '"]' ).removeClass( 'on' );
559
+ var status = jQuery( 'input', this ).val();
560
+
561
+ if ( 'on' == status ) {
562
+ label.addClass( 'on' );
563
+ }
564
+ });
565
+ };
566
+
567
+ /*
568
+ * Indicator Click Events
569
+ *
570
+ */
571
+ jQuery.fn.cpac_bind_container_addon_events = function() {
572
+
573
+ var column = jQuery( this );
574
+ var indicator = column.find('[data-indicator-id]');
575
576
+ indicator.unbind('click').click( function() {
577
+
578
+ var id = jQuery( this ).data('indicator-id');
579
+ var radio = column.find('[data-toggle-id="' + id + '"] input' );
580
+
581
+ if ( jQuery( this ).hasClass('on') ) {
582
+ jQuery( this ).removeClass('on').addClass('off');
583
+ radio.filter('[value=off]').prop('checked', true);
584
+ }
585
+ else {
586
+ jQuery( this ).removeClass('off').addClass('on');
587
+ radio.filter('[value=on]').prop('checked', true);
588
+ }
589
+ });
590
+ };
assets/js/admin-columns.min.js ADDED
@@ -0,0 +1,4 @@
1
+ /*
2
+ * Fires when the dom is ready
3
+ *
4
+ */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_add_column(){jQuery("#cpac .add_column").click(function(e){var t=jQuery(this).closest(".columns-container"),n=jQuery(".for-cloning-only .cpac-column",t).first().clone(),r=t.attr("data-type");if(n.length>0){n.cpac_update_clone_id(r);jQuery(".cpac-columns form",t).append(n);n.column_bind_toggle();n.column_bind_remove();n.column_bind_events();n.addClass("opened").find(".column-form").slideDown(150,function(){jQuery("html, body").animate({scrollTop:n.offset().top-58},300)});jQuery(document).trigger("column_add",n)}e.preventDefault()})}function cpac_sidebar_scroll(){if(jQuery(".columns-right-inside").length===0)return;if(jQuery(".columns-right-inside:visible").offset()){var e=jQuery(".columns-right-inside:visible").offset().top-parseFloat(jQuery(".columns-right-inside:visible").css("margin-top").replace(/auto/,0))-70;jQuery(window).scroll(function(t){var n=jQuery(this).scrollTop(),r=jQuery("#cpac").offset().top-parseFloat(jQuery("#cpac").css("margin-top").replace(/auto/,0));n>=e+r?jQuery(".columns-right-inside:visible").addClass("fixed"):jQuery(".columns-right-inside:visible").removeClass("fixed")})}}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 t=jQuery("#contextual-help-wrap");t.parent().show();jQuery('a[href="#tab-panel-cpac-'+jQuery(this).attr("data-help")+'"]',t).trigger("click");t.slideDown("fast",function(){t.focus()})})}function cpac_pointer(){jQuery(".cpac-pointer").each(function(){var e=jQuery(this),t=e.attr("rel"),n=e.attr("data-pos"),r={at:"left top",my:"right top",edge:"right",offset:"0 0"};"right"==n&&(r={at:"right middle",my:"left middle",edge:"left"});e.pointer({content:jQuery("#"+t).html(),position:r,pointerWidth:250,close:function(){e.removeClass("open")},pointerClass:"wp-pointer wp-pointer-"+r.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").sortable({items:".cpac-column",revert:250,handle:"td.column_sort",placeholder:"cpac-placeholder",forcePlaceholderSize:!0,sort:function(e,t){jQuery(t.placeholder).is(":empty")&&jQuery(t.placeholder).html('<div class="inner-placeholder"></div>')}})}function cpac_menu(){var e=jQuery("#cpac div.cpac-menu");e.find("a").click(function(e,t){var n=jQuery(this).attr("href");if(n){var r=n.replace("#cpac-box-","");jQuery(".cpac-menu a").removeClass("current");jQuery(".columns-container").hide();jQuery(this).addClass("current");var i=jQuery('.columns-container[data-type="'+r+'"]').show(),s=i.find(".cpac-columns");jQuery(document).trigger("cac_menu_change",s)}e.preventDefault()});e.find("a.current").trigger("click")}jQuery(document).ready(function(){if(jQuery("#cpac").length===0)return!1;cpac_pointer();cpac_submit_form();cpac_clear_input_defaults();cpac_sortable();cpac_menu();cpac_help();cpac_add_column();cpac_sidebar_scroll();jQuery(".cpac-column").each(function(e,t){jQuery(t).column_bind_toggle();jQuery(t).column_bind_remove();jQuery(t).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(t){t.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.cpac_column_refresh=function(){var e=jQuery(this);e.addClass("loading");e.find(".column-form").prepend('<span class="spinner" />');jQuery.post(ajaxurl,{action:"cpac_column_refresh",column:jQuery(this).find("input.column-name").val(),formdata:jQuery(this).parents("form").serialize()},function(t){e.html(t);e.column_bind_toggle();e.column_bind_remove();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),t=e.closest(".columns-container "),n=t.attr("data-type"),r=e.find(".column_type select option:selected").val();e.find(".column_type select").change(function(){var i=jQuery("optgroup",this).children(":selected"),s=i.val(),o=i.text(),u=jQuery(this).next(".msg").hide(),a=t.find('.for-cloning-only .cpac-column[data-type="'+s+'"]');if(a.length){if(typeof a.attr("data-clone")=="undefined"&&jQuery(".cpac-columns",t).find('[data-type="'+s+'"]').length){u.html(cpac_i18n.clone.replace("%s","<strong>"+o+"</strong>")).show();jQuery(this).find("option").removeAttr("selected");jQuery(this).find('option[value="'+r+'"]').attr("selected","selected");return}var f=a.clone();f.addClass("opened").find(".column-form").show();f.find(".column-meta").replaceWith(e.find(".column-meta"));f.find(".column-form").replaceWith(e.find(".column-form"));f.cpac_update_clone_id(n);e.replaceWith(f);f.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.find(".input-width-range").each(function(){var e=jQuery(this).closest("td").find(".input-width"),t=jQuery(this).closest("td").find(".width-decription"),n=jQuery(e)[0].defaultValue,r=t.attr("title");jQuery(this).slider({range:"min",min:0,max:100,value:n,slide:function(n,i){var s=i.value>0?i.value+"%":r;jQuery(e).val(i.value);jQuery(t).text(s)}})});e.find(".column_image_size label.custom-size").click(function(){var e=jQuery(this).closest(".input");if(jQuery(this).hasClass("image-size-custom")){jQuery(".custom-size-w",e).removeClass("hidden");jQuery(".custom-size-h",e).removeClass("hidden")}else{jQuery(".custom-size-w",e).addClass("hidden");jQuery(".custom-size-h",e).addClass("hidden")}});e.find(".column-form .label label").hover(function(){jQuery(this).find("p.description").show()},function(){jQuery(this).find("p.description").hide()})};jQuery.fn.column_remove=function(){jQuery(this).addClass("deleting").animate({opacity:0,height:0},350,function(e){jQuery(this).remove()})};jQuery.fn.cpac_update_clone_id=function(e){var t=jQuery(this),n=t.attr("data-type"),r=jQuery('.columns-container[data-type="'+e+'"]').find(".cpac-columns"),i=jQuery(r).find('*[data-type="'+n+'"]').not(t),s=jQuery.map(i,function(e,t){return jQuery(e).attr("data-clone")?parseInt(jQuery(e).attr("data-clone"),10):0});s.sort();var o=Math.max.apply(null,s)+1;for(var u=0;u<=o;u++)if(-1===jQuery.inArray(u,s))break;if(0===u)return;t.attr("data-clone",u);t.find("input.clone").val(u);t.find("input.column-name").val(n+"-"+u);var a=t.find("input, select, label");jQuery(a).each(function(e,t){var r=n+"-"+u;jQuery(t).attr("name")&&jQuery(t).attr("name",jQuery(t).attr("name").replace(n,r));jQuery(t).attr("for")&&jQuery(t).attr("for",jQuery(t).attr("for").replace(n,r));jQuery(t).attr("id")&&jQuery(t).attr("id",jQuery(t).attr("id").replace(n,r))})};jQuery(document).bind("column_init column_change column_add",function(e,t){jQuery(t).cpac_bind_column_addon_events();jQuery(t).cpac_bind_container_addon_events()});jQuery.fn.cpac_bind_column_addon_events=function(){var e=jQuery(this),t=e.find("[data-toggle-id] label");t.click(function(){var t=jQuery(this).closest("td.input").data("toggle-id"),n=e.find('[data-indicator-id="'+t+'"]').removeClass("on"),r=jQuery("input",this).val();"on"==r&&n.addClass("on")})};jQuery.fn.cpac_bind_container_addon_events=function(){var e=jQuery(this),t=e.find("[data-indicator-id]");t.unbind("click").click(function(){var t=jQuery(this).data("indicator-id"),n=e.find('[data-toggle-id="'+t+'"] input');if(jQuery(this).hasClass("on")){jQuery(this).removeClass("on").addClass("off");n.filter("[value=off]").prop("checked",!0)}else{jQuery(this).removeClass("off").addClass("on");n.filter("[value=on]").prop("checked",!0)}})};
assets/js/custom-fields.js DELETED
@@ -1,53 +0,0 @@
1
- /*
2
- * Bind events: triggered by main plugin
3
- *
4
- */
5
- jQuery(document).bind('column_init', function( e, column ){
6
- jQuery(column).column_bind_custom_field_events();
7
- });
8
- jQuery(document).bind('column_change', function( e, clone ){
9
- jQuery(clone).column_bind_custom_field_events();
10
- });
11
- jQuery(document).bind('column_add', function( e, clone ){
12
- jQuery(clone).column_bind_custom_field_events();
13
- });
14
-
15
- /*
16
- * Form Events
17
- *
18
- * @since 2.0.0
19
- */
20
- jQuery.fn.column_bind_custom_field_events = function() {
21
-
22
- jQuery(this).find( '.column_field_type .input select' ).change( function() {
23
-
24
- var value = jQuery(this).children(":selected").attr('value');
25
-
26
- // image size
27
- var image_size = jQuery(this).closest('table').find('.column_image_size').show();
28
- if( 'image' == value || 'library_id' == value ) {
29
- image_size.show();
30
- }
31
- else {
32
- image_size.hide();
33
- }
34
-
35
- // excerpt length
36
- var excerpt_length = jQuery(this).closest('table').find('.column_excerpt_length').show();
37
- if( 'excerpt' == value ) {
38
- excerpt_length.show();
39
- }
40
- else {
41
- excerpt_length.hide();
42
- }
43
-
44
- // date format
45
- var date_format = jQuery(this).closest('table').find('.column_date_format').show();
46
- if( 'date' == value ) {
47
- date_format.show();
48
- }
49
- else {
50
- date_format.hide();
51
- }
52
- });
53
- };
assets/less/admin-column.less ADDED
@@ -0,0 +1,1028 @@