Admin Columns - Version 2.0.0

Version Description

  • [Notice] Database needs an update, make sure to backup first
  • [Changed] Sortorder licence is now an Pro Add-on
  • [Changed] Some filters and hooks have been changed, see online documentation
  • [Updated] Extensive refactoring of the code with improved API
  • [Updated] New UI with responsive design
  • [Updated] Hooks and filters has been replaced with one that follows the correct naming conventions with underscores.
  • [Updated] Columns menu will only display posttypes which have show_ui set to true
  • [Updated] Admin Columns will have a tabbed settings panel
  • [Added] Added settings page.
  • [Added] Added import/export capabilities
  • [Added] Column: Available_Sizes for media
  • [Added] Default sorting for Users, Comments, Media
  • [Added] Column: Parent for posts
  • [Added] Set your own excerpt length per column
  • [Added] Set your own image size per column
  • [Added] Restore settings per type
  • [Added] Column support for WooCommerce
  • [Added] Support for image headings by other plugin columns
  • [Added] Added edit/view-button for easy switching between overview screen and admin columns
  • [Added] Added capability manage_admin_columns to control which roles can set columns
  • [Removed] Column: Actions for comments
  • [Removed] Calling get_column_headers() interfered with storing columns
  • [Fixed] Issue: Sorting was not working when label contains the ':' character
  • [Addon] Added Pro add-on
  • [Addon] Pro add-on includes Sorting, Filtering and Import/Export
Download this release

Release Info

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

Code changes from version 1.4.9 to 2.0.0

Files changed (186) hide show
  1. assets/css/admin-column.css +701 -451
  2. assets/css/column.css +27 -30
  3. assets/css/custom-fields.css +2 -0
  4. assets/images/_drag.png +0 -0
  5. assets/images/addon_multiplecustomfields.png +0 -0
  6. assets/images/addon_sortable_1.png +0 -0
  7. assets/images/arrow.png +0 -0
  8. assets/images/arrows.png +0 -0
  9. assets/images/border.png +0 -0
  10. assets/images/checkbox.png +0 -0
  11. assets/images/checkmark.png +0 -0
  12. assets/images/checkmark_single.png +0 -0
  13. assets/images/checkmark_white.png +0 -0
  14. assets/images/comment-grey-bubble.png +0 -0
  15. assets/images/comment_edit.png +0 -0
  16. assets/images/cross.png +0 -0
  17. assets/images/drag.png +0 -0
  18. assets/images/facebook.png +0 -0
  19. assets/images/get_the_addon.png +0 -0
  20. assets/images/help.png +0 -0
  21. assets/images/icon.png +0 -0
  22. assets/images/icon_20.png +0 -0
  23. assets/images/import_export.png +0 -0
  24. assets/images/info.png +0 -0
  25. assets/images/information.png +0 -0
  26. assets/images/layout_edit.png +0 -0
  27. assets/images/loading.gif +0 -0
  28. assets/images/more_info.png +0 -0
  29. assets/images/no.png +0 -0
  30. assets/images/order_arrow.png +0 -0
  31. assets/images/reorder.png +0 -0
  32. assets/images/reorder_arrow.png +0 -0
  33. assets/images/settings.png +0 -0
  34. assets/images/sort.png +0 -0
  35. assets/images/square.png +0 -0
  36. assets/images/status.png +0 -0
  37. assets/images/switch_blue.png +0 -0
  38. assets/images/switch_bw.png +0 -0
  39. assets/images/trash.png +0 -0
  40. assets/images/twitter.png +0 -0
  41. assets/images/yes.png +0 -0
  42. assets/js/admin-column.js +0 -634
  43. assets/js/admin-columns.js +482 -0
  44. assets/js/custom-fields.js +53 -0
  45. assets/js/jquery.qtip.js +0 -19
  46. assets/js/upgrade.js +53 -0
  47. assets/ui-theme/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  48. assets/ui-theme/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  49. assets/ui-theme/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  50. assets/ui-theme/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  51. assets/ui-theme/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  52. assets/ui-theme/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  53. assets/ui-theme/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  54. assets/ui-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  55. assets/ui-theme/images/ui-icons_222222_256x240.png +0 -0
  56. assets/ui-theme/images/ui-icons_2e83ff_256x240.png +0 -0
  57. assets/ui-theme/images/ui-icons_454545_256x240.png +0 -0
  58. assets/ui-theme/images/ui-icons_888888_256x240.png +0 -0
  59. assets/ui-theme/images/ui-icons_cd0a0a_256x240.png +0 -0
  60. assets/ui-theme/jquery-ui-1.8.18.custom.css +0 -0
  61. classes/api.php +25 -0
  62. classes/column.php +997 -0
  63. classes/column/comment/ID.php +25 -0
  64. classes/{values/comments.php → column/comment/actions.php} +20 -144
  65. classes/column/comment/agent.php +27 -0
  66. classes/column/comment/approved.php +33 -0
  67. classes/column/comment/author-avatar.php +27 -0
  68. classes/column/comment/author-email.php +27 -0
  69. classes/column/comment/author-ip.php +27 -0
  70. classes/column/comment/author-url.php +27 -0
  71. classes/column/comment/author.php +27 -0
  72. classes/column/comment/date-gmt.php +33 -0
  73. classes/column/comment/date.php +33 -0
  74. classes/column/comment/excerpt.php +40 -0
  75. classes/column/comment/reply-to.php +34 -0
  76. classes/column/comment/word-count.php +27 -0
  77. classes/column/custom-field.php +394 -0
  78. classes/column/link/ID.php +25 -0
  79. classes/column/link/actions.php +50 -0
  80. classes/column/link/description.php +27 -0
  81. classes/column/link/image.php +41 -0
  82. classes/column/link/length.php +27 -0
  83. classes/column/link/notes.php +40 -0
  84. classes/column/link/owner.php +35 -0
  85. classes/column/link/rss.php +27 -0
  86. classes/column/link/target.php +27 -0
  87. classes/column/media/ID.php +25 -0
  88. classes/column/media/actions.php +57 -0
  89. classes/column/media/alternate-text.php +25 -0
  90. classes/column/media/available-sizes.php +61 -0
  91. classes/column/media/caption.php +25 -0
  92. classes/column/media/description.php +25 -0
  93. classes/column/media/dimensions.php +32 -0
  94. classes/column/media/exif-data.php +105 -0
  95. classes/column/media/file-name.php +28 -0
  96. classes/column/media/file-size.php +47 -0
  97. classes/column/media/full-path.php +34 -0
  98. classes/column/media/height.php +32 -0
  99. classes/column/media/mime-type.php +25 -0
  100. classes/column/media/width.php +32 -0
  101. classes/column/post/ID.php +24 -0
  102. classes/column/post/actions.php +70 -0
  103. classes/column/post/attachment-count.php +33 -0
  104. classes/column/post/attachment.php +47 -0
  105. classes/column/post/author-name.php +117 -0
  106. classes/column/post/before-moretag.php +48 -0
  107. classes/column/post/comment-count.php +89 -0
  108. classes/column/post/comment-status.php +33 -0
  109. classes/column/post/excerpt.php +38 -0
  110. classes/column/post/featured-image.php +46 -0
  111. classes/column/post/formats.php +42 -0
  112. classes/column/post/modified.php +29 -0
  113. classes/column/post/order.php +39 -0
  114. classes/column/post/page-template.php +39 -0
  115. classes/column/post/parent.php +45 -0
  116. classes/column/post/ping-status.php +34 -0
  117. classes/column/post/roles.php +32 -0
  118. classes/column/post/slug.php +25 -0
  119. classes/column/post/status.php +43 -0
  120. classes/column/post/sticky.php +41 -0
  121. classes/column/post/taxonomy.php +80 -0
  122. classes/column/post/word-count.php +38 -0
  123. classes/column/user/ID.php +27 -0
  124. classes/column/user/actions.php +69 -0
  125. classes/column/user/comment-count.php +32 -0
  126. classes/column/user/description.php +39 -0
  127. classes/column/user/first-name.php +29 -0
  128. classes/column/user/last-name.php +29 -0
  129. classes/column/user/nickname.php +29 -0
  130. classes/column/user/post-count.php +103 -0
  131. classes/column/user/registered.php +40 -0
  132. classes/column/user/url.php +29 -0
  133. classes/deprecated.php +62 -0
  134. classes/export_import.php +179 -0
  135. classes/license.php +0 -95
  136. classes/settings.php +768 -0
  137. classes/sortable.php +0 -1250
  138. classes/storage_model.php +597 -0
  139. classes/storage_model/comment.php +79 -0
  140. classes/storage_model/link.php +73 -0
  141. classes/storage_model/media.php +78 -0
  142. classes/storage_model/post.php +124 -0
  143. classes/storage_model/user.php +88 -0
  144. classes/third_party.php +97 -24
  145. classes/upgrade.php +366 -0
  146. classes/utility.php +36 -0
  147. classes/values.php +0 -539
  148. classes/values/link.php +0 -124
  149. classes/values/media.php +0 -212
  150. classes/values/posts.php +0 -343
  151. classes/values/users.php +0 -159
  152. codepress-admin-columns.php +197 -2504
  153. languages/codepress-admin-columns-da_DK.mo +0 -0
  154. languages/codepress-admin-columns-da_DK.po +0 -699
  155. languages/codepress-admin-columns-de_DE.mo +0 -0
  156. languages/codepress-admin-columns-de_DE.po +0 -700
  157. languages/codepress-admin-columns-fr_FR.mo +0 -0
  158. languages/codepress-admin-columns-fr_FR.po +0 -530
  159. languages/codepress-admin-columns-nl_NL.mo +0 -0
  160. languages/codepress-admin-columns-nl_NL.po +0 -1042
  161. languages/codepress-admin-columns-pl_PL.mo +0 -0
  162. languages/codepress-admin-columns-pl_PL.po +0 -762
  163. languages/codepress-admin-columns.po +0 -694
  164. languages/cpac-da_DK.mo +0 -0
  165. languages/cpac-da_DK.po +1437 -0
  166. languages/cpac-de_DE.mo +0 -0
  167. languages/cpac-de_DE.po +1440 -0
  168. languages/cpac-fr_FR.mo +0 -0
  169. languages/cpac-fr_FR.po +1384 -0
  170. languages/cpac-nl_NL.mo +0 -0
  171. languages/cpac-nl_NL.po +1475 -0
  172. languages/cpac-pl_PL.mo +0 -0
  173. languages/cpac-pl_PL.po +1455 -0
  174. languages/cpac-sv_SE.mo +0 -0
  175. languages/cpac-sv_SE.po +1446 -0
  176. languages/cpac.mo +0 -0
  177. languages/cpac.po +1186 -0
  178. readme.txt +144 -115
  179. screenshot-1.png +0 -0
  180. screenshot-2.png +0 -0
  181. screenshot-3.png +0 -0
  182. screenshot-4.png +0 -0
  183. screenshot-5.png +0 -0
  184. screenshot-6.png +0 -0
  185. screenshot-7.png +0 -0
  186. screenshot-8.png +0 -0
assets/css/admin-column.css CHANGED
@@ -1,20 +1,9 @@
1
- #cpac {
2
- /* overflow: hidden; */
3
- }
4
- #cpac .postbox {
5
- margin: 0 10px 10px 0;
6
- }
7
- #cpac .cpac-menu {
8
- clear: both;
9
- overflow: hidden;
10
- margin-right: 276px;
11
- }
12
- #cpac .cpac-menu .subsubsub {
13
- white-space: normal;
14
- margin-right: 14px;
15
}
16
- #cpac .cpac-settings-link {
17
- float: right;
18
float: right;
19
margin: 12px 14px 5px 0;
20
background: transparent url('../images/settings.png') no-repeat 0 0;
@@ -23,519 +12,732 @@
23
display: inline-block;
24
line-height: 16px;
25
}
26
- #cpac .cpac-settings-link.current {
27
font-weight: bold;
28
}
29
- #cpac .cpac-col-left {
30
- /* width: 70%; */
31
- clear: left;
32
- float: left;
33
- margin-right: -2000px;
34
- width: 100%;
35
}
36
- #cpac .cpac-col-left .metabox-holder {
37
- margin-right: 276px;
38
}
39
- #cpac .cpac-col-right {
40
- /* width: 20%; */
41
- margin-right: auto;
42
- width: 266px;
43
- float: right;
44
- position: relative;
45
- clear: right;
46
}
47
- #cpac .cpac-col-right .inside {
48
- padding: 0 10px;
49
}
50
- #icon-codepress-admin-columns {
51
- background: transparent url('../images/icon.png') no-repeat 0 0;
52
}
53
54
- /* =General settings
55
-------------------------------------------------------------- */
56
- #general-cpac-settings > .inside {
57
- padding: 0;
58
- margin: 0;
59
}
60
- #general-cpac-settings table.form-table {
61
- margin: 0;
62
- padding: 0;
63
- border-collapse: separate;
64
- border-spacing: 0;
65
}
66
- #general-cpac-settings table th,
67
- #general-cpac-settings table td {
68
- vertical-align: top;
69
- border-bottom: 1px solid #DFDFDF;
70
- border-top: 1px solid #FFFFFF;
71
}
72
- #general-cpac-settings table th.cpac_post_type {
73
- width: 18%;
74
- font-weight: bold;
75
}
76
- #general-cpac-settings table.form-table tr.bottom th,
77
- #general-cpac-settings table.form-table tr.bottom td {
78
- border-bottom: none;
79
}
80
- #general-cpac-settings a.go-to-screen {
81
- display: block;
82
- padding: 5px 0;
83
- font-weight: normal;
84
- text-decoration: none;
85
}
86
- #general-cpac-settings .cpac-box {
87
- position: relative;
88
}
89
- #general-cpac-settings .cpac-option-list {
90
- overflow: hidden;
91
- width: 360px;
92
- margin-bottom: 5px;
93
}
94
- #general-cpac-settings .cpac-reorder-msg {
95
- background: transparent url('../images/reorder_arrow.png') no-repeat scroll 0 0;
96
- margin-left: 5px;
97
- height: 23px;
98
- line-height: 25px;
99
- padding-left: 25px;
100
- color: #727272;
101
- font-size: 12px;
102
- font-family: 'Trebuchet MS', Arial, Verdana;
103
- font-style: italic;
104
- clear: both;
105
}
106
- #general-cpac-settings .cpac-option-list li {
107
- margin: 5px 0;
108
- position: relative;
109
- overflow: hidden;
110
- width: 320px;
111
- box-shadow: 1px #FFFFFF;
112
- text-shadow: 0 1px 0 #FFFFFF;
113
- background-color: #F1F1F1;
114
- background-image: -ms-linear-gradient(top, #f9f9f9, #ececec);
115
- background-image: -moz-linear-gradient(top, #f9f9f9, #ececec);
116
- background-image: -o-linear-gradient(top, #f9f9f9, #ececec);
117
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec));
118
- background-image: -webkit-linear-gradient(top, #f9f9f9, #ececec);
119
- background-image: linear-gradient(top, #f9f9f9, #ececec);
120
- border-radius: 3px 3px 3px 3px;
121
- border: 1px solid #cbcbcb;
122
- margin-top: 1px;
123
- }
124
- #general-cpac-settings .cpac-option-list li .cpac-sort-handle {
125
- background: transparent url('../images/sort.png') no-repeat 5px 5px;
126
- width: 20px;
127
- height: 26px;
128
- float: left;
129
- cursor: move;
130
- position: relative; z-index: 10;
131
}
132
- #general-cpac-settings .cpac-option-list li .cpac-checkbox {
133
- margin-top: 5px;
134
- width: 16px;
135
- height: 15px;
136
- cursor: pointer;
137
- background: transparent url('../images/checkbox.png') no-repeat 0 0;
138
}
139
- #general-cpac-settings .cpac-option-list li.active .cpac-checkbox {
140
- background-position: 0 -15px;
141
}
142
- #general-cpac-settings .cpac-option-list li .cpac-type-options {
143
- float: left;
144
- padding: 0;
145
- position: relative;
146
- width: 222px;
147
- overflow: hidden;
148
- height: 26px;
149
}
150
- #general-cpac-settings .cpac-option-list li .cpac-type-options label {
151
- position: absolute;
152
- left: 22px;
153
- top: 5px;
154
- display: block;
155
- margin-right: 30px;
156
- overflow: hidden;
157
- height: 17px;
158
- line-height: 17px;
159
}
160
- #general-cpac-settings .cpac-option-list li .cpac-type-options input {
161
- margin-top: 6px;
162
- cursor: pointer;
163
}
164
- #general-cpac-settings .cpac-option-list li div.cpac-meta-title {
165
- position: absolute;
166
- right: 0;
167
- top: 0;
168
- color: #999999;
169
}
170
- #general-cpac-settings .cpac-option-list li a.cpac-action {
171
- background: transparent url('../images/arrows.png') no-repeat scroll 50% 5px;
172
- height: 26px;
173
- width: 24px;
174
- float: right;
175
- display: block;
176
- text-indent: -999em;
177
overflow: hidden;
178
}
179
- #general-cpac-settings .cpac-option-list li.opened a.cpac-action {}
180
- #general-cpac-settings .cpac-option-list li.active a.cpac-action {
181
- background-position: 50% -66px;
182
}
183
- #general-cpac-settings .cpac-option-list li.active.opened a.cpac-action {}
184
- #general-cpac-settings .cpac-option-list li div.cpac-meta-title span {
185
- display: inline-block;
186
- margin: 5px 5px 0 0;
187
- float: right;
188
}
189
- #general-cpac-settings .cpac-option-list li .cpac-type-inside {
190
display: none;
191
- float: none;
192
- clear: both;
193
- background: #fbfbfb;
194
- border-top: 1px solid #DFDFDF;
195
- padding: 5px 10px;
196
- }
197
- #general-cpac-settings .cpac-option-list li a.cpac-delete-custom-field-box {
198
- display: inline-block;
199
- border-bottom: 1px solid #FF0000;
200
- color: #FF0000;
201
text-decoration: none;
202
text-shadow: none;
203
- padding: 0 3px;
204
}
205
- #general-cpac-settings .cpac-option-list li a.cpac-delete-custom-field-box:hover {
206
- background-color: #FF0000;
207
- border-bottom-color: #FF0000;
208
- color: #FFFFFF;
209
- text-decoration: none;
210
}
211
- #general-cpac-settings .cpac-option-list li .cpac-type-inside label {
212
- width: 100px;
213
display: inline-block;
214
}
215
- #general-cpac-settings .cpac-option-list li .cpac-type-inside input,
216
- #general-cpac-settings .cpac-option-list li .cpac-type-inside select {
217
- width: 184px;
218
}
219
- #general-cpac-settings .cpac-option-list li .cpac-type-inside input.input-width {
220
- min-width: 25px;
221
- width: 25px;
222
- border: none;
223
background: transparent;
224
- padding: 0;
225
- margin-left: 0px;
226
- text-align: right;
227
}
228
- #general-cpac-settings .cpac-option-list li .cpac-type-inside div.input-width-range {
229
- display: inline-block;
230
- min-width: 136px;
231
- width: 136px;
232
- margin: 8px 0 0;
233
- position: relative;
234
}
235
- #general-cpac-settings .cpac-option-list li .cpac-type-inside div.input-width-range .ui-slider-handle {
236
- cursor:e-resize;
237
}
238
- #general-cpac-settings .cpac-option-list li .cpac-type-inside div.description {
239
display: inline-block;
240
- font-size: 11px;
241
- padding: 0 4px 0 0;
242
- width: 36px;
243
}
244
- #general-cpac-settings .cpac-add-column a {
245
- display: block;
246
}
247
- #general-cpac-settings .cpac-option-list li.cpac-placeholder {
248
- border: 1px dashed #666;
249
- -webkit-border-radius: 0;
250
- -moz-border-radius: 0;
251
- border-radius: 0;
252
- width: 320px;
253
- background: transparent;
254
}
255
- #general-cpac-settings .cpac-add-customfield-column {
256
- position: absolute;
257
- bottom: 30px;
258
- left: 360px;
259
}
260
- #general-cpac-settings .cpac-option-list li.deleting {
261
- background: #CFADB3;
262
- border: 1px solid #CFADB3;
263
- color: #832525;
264
- text-shadow: none;
265
}
266
- #general-cpac-settings .cpac-option-list li.active {
267
- background-color: #c7c7c7;
268
- background-image: -ms-linear-gradient(top, #e9e9e9, #c7c7c7);
269
- background-image: -moz-linear-gradient(top, #e9e9e9, #c7c7c7);
270
- background-image: -o-linear-gradient(top, #e9e9e9, #c7c7c7);
271
- background-image: -webkit-gradient(linear, left top, left bottom, from(#e9e9e9), to(#c7c7c7));
272
- background-image: -webkit-linear-gradient(top, #e9e9e9, #c7c7c7);
273
- background-image: linear-gradient(top, #e9e9e9, #c7c7c7);
274
- border-color: #aeaeae;
275
}
276
- #general-cpac-settings .cpac-option-list li.active .cpac-sort-handle {
277
- background-position: 5px -19px;
278
}
279
- #general-cpac-settings .cpac-option-list li.active div.cpac-meta-title {
280
- color: #151515;
281
}
282
- #general-cpac-settings .cpac-option-list li.active div.cpac-meta-title span {
283
- color: #5c5c5c
284
}
285
286
- /* =Plugin settings (Options)
287
-------------------------------------------------------------- */
288
- #cpac-box-plugin_settings {}
289
- #cpac-box-plugin_settings > td {
290
- border: none;
291
- padding: 0;
292
- margin: 0;
293
}
294
- #cpac-box-plugin_settings table.nopadding {
295
- border-collapse: separate;
296
- border-spacing: 0;
297
border: none;
298
- width: 100%;
299
}
300
- #cpac-box-plugin_settings table.nopadding tr.last > td {
301
- border-bottom: none;
302
- border-top: none;
303
}
304
- #cpac-box-plugin_settings .button {
305
position: relative;
306
}
307
- #cpac-box-plugin_settings .button.loading {
308
- padding-right: 25px;
309
}
310
- #cpac-box-plugin_settings .button.loading span {
311
- position: absolute;
312
- top: 2px;
313
- right: 6px;
314
- background: transparent url('../images/loading.gif') no-repeat right 50%;
315
- width: 16px;
316
- height: 16px;
317
- display: inline-block;
318
}
319
- #cpac-box-plugin_settings td.first-col {
320
- width: 18%;
321
}
322
-
323
- /* =Addon settings
324
- -------------------------------------------------------------- */
325
- #cpac-box-plugin_settings table.addons {
326
- /* max-width: 620px; */
327
}
328
- #cpac-box-plugin_settings table.addons th.activation_type {
329
- width: 110px;
330
}
331
- #cpac-box-plugin_settings table.addons th.activation_status {
332
- width: 90px;
333
}
334
- #cpac-box-plugin_settings table.addons th.activation_code {
335
- /* width: auto; */
336
- min-width: 260px;
337
}
338
- #cpac-box-plugin_settings table.addons th.activation_more {
339
- /* min-width: 120px; */
340
- text-align: left;
341
- width: auto;
342
}
343
- #cpac-box-plugin_settings table.addons td.activation_type span {
344
- font-size: 14px;
345
- display: inline-block;
346
- background: transparent url('../images/information.png') no-repeat right 50%;
347
- padding-right: 20px;
348
}
349
- #cpac-box-plugin_settings table.addons td {
350
- background: #ffffff;
351
- /* vertical-align: middle; */
352
- padding: 18px 10px;
353
}
354
- #cpac-box-plugin_settings table.addons td.activation_code input {
355
- width: 176px;
356
- color: #555555;
357
- font-family: Arial;
358
- font-size: 12px;
359
}
360
- #cpac-box-plugin_settings table.addons td.activation_more {
361
- text-align: left;
362
}
363
- #cpac-box-plugin_settings table.addons td.activation_more a{
364
- float: none;
365
- display: inline-block;
366
- margin-top: 1px;
367
}
368
- #cpac-box-plugin_settings table.addons tr.last td {
369
- border-bottom: none;
370
}
371
- #cpac-box-plugin_settings table.addons .masked_key {
372
- padding: 0;
373
}
374
- #cpac-box-plugin_settings .cpac-options {}
375
- #cpac-box-plugin_settings .cpac-options li {
376
overflow: hidden;
377
}
378
- #cpac-box-plugin_settings .cpac-option-label {
379
- float: left;
380
- width: 140px;
381
- }
382
- #cpac-box-plugin_settings .cpac-option-inputs {
383
- float: left;
384
- width: 220px;
385
}
386
387
- /* =Restore settings
388
-------------------------------------------------------------- */
389
- #restore-cpac-settings .inside {
390
padding: 10px;
391
}
392
- #restore-cpac-settings.postbox {
393
- background: #FAF2F5;
394
- border: 1px solid #CFADB3;
395
- color: #832525;
396
}
397
- #restore-cpac-settings.postbox h3 {
398
- color: #832525;
399
- background: #FAF2F5;
400
}
401
- #restore-cpac-settings .inside .button {
402
- margin: 0 0 10px;
403
- border: 1px solid #CFADB3;
404
- color: #832525;
405
}
406
- #restore-cpac-settings .inside .description {
407
- color: #832525;
408
}
409
410
- /* =Addons settings
411
- -------------------------------------------------------------- */
412
- #addons-cpac-settings {
413
- overflow: hidden;
414
- background: #ccffcc;
415
- background: -moz-linear-gradient(top, #c3f5c2 1%, #ccffcc 100%); /* FF3.6+ */
416
- background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,#c3f5c2), color-stop(100%,#ccffcc)); /* Chrome,Safari4+ */
417
- background: -webkit-linear-gradient(top, #c3f5c2 1%,#ccffcc 100%); /* Chrome10+,Safari5.1+ */
418
- background: -o-linear-gradient(top, #c3f5c2 1%,#ccffcc 100%); /* Opera 11.10+ */
419
- background: -ms-linear-gradient(top, #c3f5c2 1%,#ccffcc 100%); /* IE10+ */
420
- background: linear-gradient(to bottom, #c3f5c2 1%,#ccffcc 100%); /* W3C */
421
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#c3f5c2', endColorstr='#ccffcc',GradientType=0 ); /* IE6-9 */
422
- border-color: green;
423
- }
424
- #addons-cpac-settings h3 {
425
- background: transparent;
426
- border-bottom: none;
427
- box-shadow: none;
428
}
429
- #addons-cpac-settings h2 {
430
- font-size: 14px;
431
- line-height: 14px;
432
- margin-bottom: 0;
433
- padding-bottom: 0;
434
}
435
- #addons-cpac-settings a {
436
- padding: 0 10px 10px;
437
text-decoration: none;
438
- color: green;
439
- text-decoration: underline;
440
- font-size: 15px;
441
}
442
- #addons-cpac-settings a:hover {
443
- color: darkgreen;
444
}
445
-
446
-
447
- /* =Like this plugin settings
448
- -------------------------------------------------------------- */
449
- #likethisplugin-cpac-settings {
450
padding: 0;
451
}
452
- #likethisplugin-cpac-settings ul {
453
- margin-left: 20px;
454
}
455
- #likethisplugin-cpac-settings li {
456
- list-style: square;
457
- line-height: 16px;
458
}
459
- #likethisplugin-cpac-settings li a {
460
text-decoration: none;
461
}
462
- #likethisplugin-cpac-settings li.donate_link a {
463
- /* color: green;
464
- text-decoration: underline; */
465
}
466
- #likethisplugin-cpac-settings li.donate_link a:hover {
467
- color: darkgreen;
468
}
469
470
- /* =Latest News
471
-------------------------------------------------------------- */
472
- #latest-news-cpac-settings {
473
- padding: 0;
474
}
475
- #latest-news-cpac-settings ul {
476
- margin-left: 0;
477
}
478
- #latest-news-cpac-settings li {
479
- list-style: none;
480
- line-height: 16px;
481
}
482
- #latest-news-cpac-settings li a {
483
- text-decoration: none;
484
- padding-left: 24px;
485
- display: inline-block;
486
- lie-height: 20px;
487
}
488
- #latest-news-cpac-settings li.twitter a {
489
- background: transparent url('../images/twitter.png') no-repeat 0 ;
490
}
491
- #latest-news-cpac-settings li.facebook a {
492
- background: transparent url('../images/facebook.png') no-repeat 0 ;
493
}
494
- #likethisplugin-cpac-settings li.donate_link a:hover {
495
- color: darkgreen;
496
}
497
498
- /* =Activation
499
-------------------------------------------------------------- */
500
- #cpac-box-plugin_settings .addons .activation_code .activate,
501
- #cpac-box-plugin_settings .addons .activation_code .deactivate {
502
- min-height: 25px;
503
}
504
- #cpac-box-plugin_settings .activation_status .activate {
505
- color: #CC0000;
506
}
507
- #cpac-box-plugin_settings .activation_status .deactivate {
508
- color: darkgreen;
509
}
510
- #cpac-box-plugin_settings .activation-error-msg {
511
- color: #CC0000;
512
- line-height: 20px;
513
- padding: 0 6px;
514
}
515
516
/* =Import / Export
517
-------------------------------------------------------------- */
518
- div.cpac_export {
519
- width: 20%;
520
- float: left;
521
}
522
#cpac_export_output {
523
- width: 80%;
524
- float: left;
525
display: none;
526
}
527
#cpac_export_output textarea {
528
width: 100%;
529
- height: 80%;
530
}
531
#cpac_export_submit {
532
display: inline-block;
533
- margin: 10px 0;
534
}
535
#cpac_import_input {}
536
#cpac_import_input textarea {
537
width: 100%;
538
- height: 80%;
539
}
540
#cpac_import_submit {
541
display: inline-block;
@@ -549,68 +751,116 @@ div.cpac_export {
549
border-radius: 3px;
550
display: none;
551
}
552
-
553
- /* =WP Pointer
554
- -------------------------------------------------------------- */
555
- .wp-pointer-content ol {
556
- margin-left: 1.5em;
557
- padding: 0 15px;
558
}
559
560
- /* =Tooltip
561
-------------------------------------------------------------- */
562
- .qtip .qtip-tip {
563
- left: 74px !important;
564
- top: 1px !important;
565
}
566
- .qtip .qtip-wrapper {
567
- background: #fff;
568
- border-style: solid;
569
- border-width: 1px;
570
- border-color: #dfdfdf;
571
- border-color: rgba(0,0,0,.125);
572
- border-top: none;
573
- -webkit-border-radius: 3px;
574
- border-radius: 3px;
575
- border-radius: 5px;
576
- -webkit-box-shadow: 0 2px 4px rgba(0,0,0,.19);
577
- -moz-box-shadow: 0 2px 4px rgba(0,0,0,.19);
578
- box-shadow: 0 2px 4px rgba(0,0,0,.19);
579
580
}
581
- .qtip .qtip-wrapper .qtip_title {
582
- padding: 15px 18px 14px 15px;
583
- clear: both;
584
- line-height: 1.4em;
585
- font-size: 14px;
586
- color: #fff;
587
- border-radius: 3px 3px 0 0;
588
- text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
589
- background-color: #8cc1e9;
590
- background-image: -webkit-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(140,193,233) 100%);
591
- background-image: -moz-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(140,193,233) 100%);
592
- background-image: -ms-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(140,193,233) 100%);
593
- background-image: -o-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(140,193,233) 100%);
594
- background-image: linear-gradient(bottom, rgb(114,167,207) 0%, rgb(140,193,233) 100%);
595
- }
596
- .qtip .qtip-wrapper .qtip_content {
597
- padding: 0 14px 14px;
598
- margin: 0;
599
- overflow: hidden;
600
- clear: both;
601
- min-height: 40px;
602
font-size: 13px;
603
- background: #fff;
604
}
605
- .qtip .qtip-wrapper .qtip_content .button-primary {
606
- margin: 6px 0 0;
607
}
608
609
- /* =Responsive Design
610
-------------------------------------------------------------- */
611
- body.folded #cpac .cpac-col-left .metabox-holder {
612
- margin-right: 0;
613
}
614
- body.folded #cpac .cpac-col-right {
615
- display: none;
616
}
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;
12
display: inline-block;
13
line-height: 16px;
14
}
15
+ .cpac-settings-link.current {
16
font-weight: bold;
17
}
18
+ a.help {
19
+ background: transparent url('../images/help.png') no-repeat 0 0;
20
+ display: inline-block;
21
+ width: 16px;
22
+ height: 16px;
23
}
24
+ #cpac a:focus, #cpac a:active {
25
+ outline: none;
26
}
27
+ .button.loading {
28
+ padding-right: 25px;
29
+ position: relative;
30
+ }
31
+ .button.loading span {
32
+ position: absolute;
33
+ top: 2px;
34
+ right: 6px;
35
+ background: transparent url('../images/loading.gif') no-repeat right 50%;
36
+ width: 16px;
37
+ height: 16px;
38
+ display: inline-block;
39
}
40
+
41
+ /* =Icons
42
+ -------------------------------------------------------------- */
43
+ .icon-yes {
44
+ background: transparent url(../images/yes.png) no-repeat 0 0;
45
+ width: 16px;
46
+ height: 16px;
47
+ display: inline-block;
48
+ position: relative;
49
+ top: 2px;
50
}
51
+ .icon-no {
52
+ background: transparent url(../images/no.png) no-repeat 0 0;
53
+ width: 16px;
54
+ height: 16px;
55
+ display: inline-block;
56
+ position: relative;
57
+ top: 2px;
58
}
59
60
+ /* =Menu
61
-------------------------------------------------------------- */
62
+ .cpac-menu {
63
+ clear: both;
64
+ overflow: hidden;
65
}
66
+ .cpac-menu .subsubsub {
67
+ white-space: normal;
68
+ margin-right: 14px;
69
}
70
+
71
+ /* =Structure
72
+ -------------------------------------------------------------- */
73
+ .columns-container {
74
+ margin-right: 300px;
75
+ max-width: 600px;
76
}
77
+ .columns-left {
78
+ float: left;
79
+ width: 100%;
80
}
81
+ .columns-right {
82
+ float: right;
83
+ margin-right: -300px;
84
+ width: 280px;
85
}
86
+ .columns-right-inside.fixed {
87
+ position: fixed;
88
+ top: 40px;
89
+ width: 280px;
90
}
91
+
92
+ /* =Columns
93
+ -------------------------------------------------------------- */
94
+ .add-new-h2 {
95
+ color: #828282;
96
}
97
+ .cpac-boxes form {
98
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
99
}
100
+ .ui-sortable-helper {
101
+ -webkit-box-shadow: 1px 3px 6px 0px rgba(1, 1, 1, 0.4);
102
+ box-shadow: 1px 3px 6px 0px rgba(1, 1, 1, 0.4);
103
}
104
+ .ui-sortable-helper .column-meta {
105
+ border-width: 1px;
106
}
107
+ .cpac-placeholder {
108
+ visibility: visible !important;
109
}
110
+
111
+ /* @todo: placeholder styling v2 */
112
+
113
+ .cpac-placeholder {
114
+ border-top: 1px solid #dfdfdf;
115
+ padding: 5px 4px 7px 0;
116
}
117
+ .cpac-placeholder .inner-placeholder {
118
+ border: 1px dashed #808080;
119
+ background: #eee;
120
+ width: 100%;
121
+ height: 100%;
122
}
123
+ .cpac-columns .cpac-placeholder:first-child {
124
+ border: none;
125
}
126
+ .cpac-column.deleting {}
127
+
128
+ /* placeholder styling v1 */
129
+
130
+ /*
131
+ .cpac-placeholder {
132
+ visibility: visible !important;
133
+ background: transparent url('../images/border.png') repeat 0 0;
134
+ padding: 2px;
135
+ }
136
+ .cpac-placeholder .inner-placeholder {
137
+ box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
138
+ background: #ededed;
139
+ width: 100%;
140
+ height: 100%;
141
}
142
+ .ui-sortable-helper .column-meta {
143
+ border-width: 1px;
144
}
145
+ */
146
+
147
+
148
+ /* =Column Header
149
+ -------------------------------------------------------------- */
150
+ .table-header {
151
+ border-radius: 3px 3px 0 0;
152
+ border-width: 1px 1px 0;
153
+ }
154
+
155
+ /* =Column Meta
156
+ -------------------------------------------------------------- */
157
+ .column-meta {
158
+ border-style: solid;
159
+ border-color: #dfdfdf;
160
+ border-width: 1px 1px 0;
161
+ background: #fcfcfc;
162
+ }
163
+ .cpac-column:nth-child(2n) .column-meta {
164
+ background: #f9f9f9;
165
+ }
166
+ .column-meta table {
167
+ border: none;
168
+ background: transparent;
169
+ border-radius: 0;
170
+ }
171
+ .column-meta table tr td {
172
+ vertical-align: top;
173
+ height: 16px;
174
+ border: none;
175
+ padding: 12px 8px;
176
+ border-width: 1px 0 0;
177
+ border-style: solid;
178
+ border-color: transparent;
179
+ }
180
+ .column-meta img {
181
+ margin-right: 3px;
182
+ }
183
+ .column-meta .column_sort {
184
+ width: 10px;
185
+ background: transparent url('../images/drag.png') no-repeat 8px 8px;
186
+ cursor: move;
187
+ }
188
+ .column-meta td.column_label {
189
+ width: 55%;
190
+ font-weight: bold;
191
+ vertical-align: middle;
192
+ position: relative;
193
+ }
194
+ .column-meta .column_label .inner {
195
+ position: relative;
196
overflow: hidden;
197
+ height: 16px;
198
}
199
+ .column-meta .column_label .inner > a {
200
+ color: #5a5a5a;
201
}
202
+ .column-meta .column_label .inner > a:hover {
203
+ color: #333333;
204
}
205
+ .column-meta .column_label .inner > a.remove-button {
206
display: none;
207
+ color: #BC0B0B;
208
text-decoration: none;
209
text-shadow: none;
210
+ font-weight: normal;
211
+ margin-left: 12px;
212
+ font-size: 12px;
213
}
214
+ .column-meta .column_label .inner > a.remove-button:hover {
215
+ background-color: #BC0B0B;
216
+ color: #FFFFFF;
217
+ text-decoration: none;
218
}
219
+ .column-meta:hover .column_label .inner > a.remove-button {
220
display: inline-block;
221
}
222
+ .column-meta .column_label .inner .meta {
223
+ display: inline-block;
224
+ float: right;
225
+ font-weight: normal;
226
+ color: #999999;
227
+ font-size: 12px;
228
+ }
229
+ .column-meta .column_type {
230
+ width: auto;
231
+ text-align: right;
232
+ vertical-align: middle;
233
+ color: #999999;
234
+ padding-right: 0;
235
+ }
236
+ .column-meta .column_edit {
237
+ width: 38px;
238
+ background: transparent url('../images/arrow.png') no-repeat 23px 16px;
239
+ cursor: pointer;
240
}
241
+
242
+ /* opened state */
243
+ .cpac-column.opened .column-meta {
244
+ background-color: #c7c7c7;
245
+ background-image: -ms-linear-gradient(top, #e9e9e9, #c7c7c7);
246
+ background-image: -moz-linear-gradient(top, #e9e9e9, #c7c7c7);
247
+ background-image: -o-linear-gradient(top, #e9e9e9, #c7c7c7);
248
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#e9e9e9), to(#c7c7c7));
249
+ background-image: -webkit-linear-gradient(top, #e9e9e9, #c7c7c7);
250
+ background-image: linear-gradient(top, #e9e9e9, #c7c7c7);
251
+ border-color: #aeaeae;
252
+ }
253
+ .cpac-column.opened .column-meta table {
254
background: transparent;
255
}
256
+ .cpac-column.opened .column-meta td {
257
+ border-color: #f8f8f8;
258
}
259
+ .cpac-column.opened .column-meta td,
260
+ .cpac-column.opened .column-meta td a{
261
+ color: #333;
262
+ text-shadow: 0 1px 0 #FFFFFF;
263
}
264
+ .cpac-column.opened .column-meta .column_sort {
265
+ background-position: 8px -39px;
266
+ }
267
+ .cpac-column.opened .column-meta .column_type {
268
+ color: #5C5C5C;
269
+ }
270
+ .cpac-column.opened .column-meta .column_label .inner .meta {
271
+ color: #808080;
272
+ }
273
+ tr.column_image_size td.input .custom_image_size {
274
display: inline-block;
275
}
276
+ tr.column_image_size td.input label {
277
+ display: inline-block;
278
+ margin-top: 4px;
279
+ margin-bottom: 4px;
280
}
281
+ tr.column_image_size td.input label input {
282
+ margin-right: 3px;
283
}
284
+ tr.column_image_size td.input label.custom-size-w,
285
+ tr.column_image_size td.input label.custom-size-h {
286
+ margin: 0;
287
}
288
+ tr.column_image_size td.input label.custom-size-w.hidden,
289
+ tr.column_image_size td.input label.custom-size-h.hidden {
290
+ display: none;
291
}
292
+ tr.column_image_size td.input label.custom-size-w input,
293
+ tr.column_image_size td.input label.custom-size-h input {
294
+ width: 30px;
295
}
296
+ tr.column_image_size.hidden {
297
+ display: none;
298
}
299
+
300
+ /* =Column Meta: WP Default columns
301
+ -------------------------------------------------------------- */
302
+ .column-meta span.vers {
303
+ padding-top: 2px;
304
+ }
305
+ .column-meta span.vers .comment-grey-bubble {
306
+ background: transparent url("../images/comment-grey-bubble.png") no-repeat 0 0;
307
+ height: 12px;
308
+ width: 12px;
309
+ float: right;
310
}
311
+ .column-meta .column_label span.vers {
312
+ float: left;
313
}
314
315
+ /* =Column Form
316
-------------------------------------------------------------- */
317
+ .column-form {
318
+ display: none;
319
+ border-width: 1px 1px 0;
320
+ border-style: solid;
321
+ border-color: #dfdfdf;
322
}
323
+ .column-form table {
324
border: none;
325
+ background: #fcfcfc;
326
}
327
+ .column-form tr td {
328
+ vertical-align: top;
329
+ border: none;
330
+ padding: 8px;
331
+ background: #ffffff;
332
}
333
+ .column-form tr td.label {
334
position: relative;
335
+ overflow: visible;
336
+ background: #F9F9F9;
337
+ background: #f5f5f5;
338
+ border-right: 1px solid #E1E1E1;
339
+ vertical-align: top;
340
+ width: 34%;
341
+ border-top: 1px solid #F0F0F0;
342
}
343
+ .column-form tr td {
344
+ border-top: 1px solid #F5F5F5;
345
}
346
+ .column-form tr:first-child td {
347
+ border-top: none;
348
}
349
+ .column-form tr td.label label {
350
+ font-weight: bold;
351
+ color: #333333;
352
+ display: block;
353
+ display: inline;
354
}
355
+ .column-form tr td.label p {
356
+ color: #666666;
357
+ display: block;
358
+ font-size: 12px;
359
+ font-style: normal;
360
+ line-height: 16px;
361
+ margin: 0 !important;
362
}
363
+ .column-form tr td.label p.description {
364
+ display: none;
365
+ position: absolute;
366
+ z-index: 99;
367
+ top: 30px;
368
+ left: 0;
369
+ background: #eaf2fa;
370
+ border-radius: 5px;
371
+ border: 1px solid #c7d7e2;
372
+ padding: 5px 8px !important;
373
}
374
+ .column-form tr td.label a.more-info {
375
+ display: none;
376
+ width: 14px; height: 14px;
377
+ line-height: 14px;
378
+ font-size: 10px;
379
+ color: #fff;
380
+ text-align: center;
381
+ font-weight: bold;
382
+ background: transparent url(../images/info.png) no-repeat 0 0;
383
+ float: right;
384
}
385
+ .column-form tr td select,
386
+ .column-form tr td input[type=text] {
387
+ width: 99.95%; /* excl padding */
388
}
389
+ .column-form div.description {
390
+ font-size: 11px;
391
+ width: 12%;
392
+ float: left;
393
+ text-align: middle;
394
}
395
+ .column-form div.input-width-range {
396
+ float: left;
397
+ position: relative;
398
+ width: 87%;
399
+ margin-top: 4px;
400
}
401
+ .column-form div.input-width-range .ui-slider-handle {
402
+ cursor:ew-resize;
403
}
404
+ .column-form tr td.input label {
405
+ padding-right: 10px;
406
}
407
+ .column-form tr td.input p.description {
408
+ display: none;
409
+ margin-top: 4px;
410
+ color: #666666;
411
}
412
+ .column-form a.help {
413
+ vertical-align: middle;
414
+ float: right;
415
}
416
+ .column-form div.msg {
417
+ margin-top: 5px;
418
+ display: none;
419
+ color: #333;
420
+ padding: 6px 8px;
421
+ background-color: #ffebe8;
422
+ border: 1px solid #fff;
423
+ -moz-border-radius: 3px;
424
+ -webkit-border-radius: 3px;
425
+ border-radius: 3px;
426
}
427
+ .column-form select optgroup:nth-child(2n) {
428
+ background: #F9F9F9;
429
}
430
+
431
+ /* =Column Footer
432
+ -------------------------------------------------------------- */
433
+ .column-footer {
434
+ background: #EAF2FA;
435
+ border: 1px solid #c7d7e2;
436
+ min-height: 26px;
437
+ padding: 8px;
438
overflow: hidden;
439
}
440
+ .column-footer .order-message {
441
+ background: transparent url('../images/order_arrow.png') no-repeat 0 0;
442
+ color: #7A9BBE;
443
+ float: left;
444
+ font-family: Comic Sans MS,sans-serif;
445
+ font-size: 11px;
446
+ height: 13px;
447
+ line-height: 1em;
448
+ margin-left: 4px;
449
+ padding: 7px 0 0 22px;
450
+ text-shadow: 0 1px 0 #FFFFFF;
451
+ display: inline-block;
452
}
453
454
+ /* =Sidebar
455
-------------------------------------------------------------- */
456
+ .columns-right {
457
+ margin-top: 52px;
458
+ }
459
+ .sidebox {
460
+ background: none repeat scroll 0 0 #FFFFFF;
461
+ border: 1px solid #E1E1E1;
462
+ border-radius: 0 0 0 0;
463
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
464
+ position: relative;
465
+ margin-bottom: 14px;
466
+ }
467
+ .sidebox h3 {
468
padding: 10px;
469
+ margin: 0;
470
}
471
+ .sidebox h3.title {
472
+ font-family: Georgia,"Times New Roman","Bitstream Charter",Times,serif;
473
+ font-size: 15px;
474
+ font-weight: normal;
475
+ line-height: 1;
476
+ margin: 0;
477
+ padding: 7px 10px;
478
+ background: #f1f1f1;
479
+ background-image: -webkit-gradient(linear, left bottom, left top, from(#ececec), to(#f9f9f9));
480
+ background-image: -webkit-linear-gradient(bottom, #ececec, #f9f9f9);
481
+ background-image: -moz-linear-gradient(bottom, #ececec, #f9f9f9);
482
+ background-image: -o-linear-gradient(bottom, #ececec, #f9f9f9);
483
+ background-image: linear-gradient(to top, #ececec, #f9f9f9);
484
+ border-bottom-color: #dfdfdf;
485
+ text-shadow: #fff 0 1px 0;
486
+ -webkit-box-shadow: 0 1px 0 #fff;
487
+ box-shadow: 0 1px 0 #fff;
488
+ border-bottom-style: solid;
489
+ border-bottom-width: 1px;
490
+ }
491
+ .sidebox .inside {
492
+ padding: 10px;
493
}
494
+ .sidebox .inside p {
495
+ margin-top: 0;
496
}
497
+ #form-actions .form-reset {
498
+ border-bottom: 1px solid #F5F5F5;
499
+ padding: 8px;
500
}
501
+ #form-actions .reset-column-type {
502
+ text-decoration: none;
503
+ color: #BC0B0B;
504
+ line-height: 25px;
505
+ display: inline-block;
506
+ }
507
+ #form-actions .reset-column-type:hover {
508
+ color: #FF0000
509
+ }
510
+ #form-actions .form-update {
511
+ padding: 8px;
512
+ }
513
+ #form-actions .submit-update {
514
+ width: 100%;
515
+ height: 28px;
516
+ line-height: 28px;
517
}
518
519
+ /* =Sidebar: Pro
520
+ --------------------------------*/
521
+ #pro-version {
522
+ background: transparent url(../images/get_the_addon.png) no-repeat 0 0;
523
}
524
+ #pro-version .padding-box {
525
+ padding: 8px 15px 0;
526
+ }
527
+ #pro-version a {
528
+ color: red;
529
}
530
+ #pro-version h3 a {
531
+ color: #fff;
532
+ font-size: 19px;
533
text-decoration: none;
534
+ font-weight: normal;
535
+ margin-top: 6px;
536
}
537
+ #pro-version .inside ul {
538
+ margin: 0 0 10px 0;
539
}
540
+ #pro-version .inside ul li {
541
+ margin: 0;
542
padding: 0;
543
}
544
+ #pro-version .inside ul li a {
545
+ display: inline-block;
546
+ height: 24px;
547
+ font-size: 19px;
548
+ line-height: 24px;
549
+ margin-bottom: 1px;
550
+ padding: 0 5px;
551
+ background: #000;
552
+ color: #fff;
553
+ text-decoration: none;
554
}
555
+
556
+ #pro-version .inside p {
557
+ color: #fff;
558
+ font-size: 12px;
559
}
560
+ #pro-version .inside p a {
561
+ color: #fff;
562
+ display: inline-block;
563
+ background: #a4c518;
564
+ padding: 0 2px;
565
+ font-size: 15px;
566
text-decoration: none;
567
}
568
+
569
+
570
+ /* =Sidebar: Addons
571
+ --------------------------------*/
572
+ #addon-state {}
573
+ #addon-state .inside {
574
+ overflow: hidden;
575
+ }
576
+ #addon-state ul {
577
+ margin: 0 0 8px;
578
}
579
+ #addon-state ul li {
580
+ background: transparent url('../images/checkmark_single.png') no-repeat 0 0;
581
+ padding-left: 25px;
582
+ margin-bottom: 4px;
583
+ }
584
+ #addon-state a.find-more-addons {
585
+ float: right;
586
}
587
588
+ /* =Settings Page
589
-------------------------------------------------------------- */
590
+ table.cpac-form-table {
591
+ max-width: 1100px;
592
+ margin-top: 20px;
593
}
594
+ .col-25, .col-30, .col-35, .col-65, .col-70, .col-75 {
595
+ float: left;
596
}
597
+ .col-25 { width: 25%; }
598
+ .col-30 { width: 30%; }
599
+ .col-35 { width: 35%; }
600
+ .col-65 { width: 65%; }
601
+ .col-70 { width: 70%; }
602
+ .col-75 { width: 75%; }
603
+ table.cpac-form-table > tbody > tr > td,
604
+ table.cpac-form-table > tbody > tr > th {
605
+ vertical-align: top;
606
+ padding-bottom: 20px;
607
+ }
608
+ table.addons tr {
609
+ background: #fff;
610
}
611
+ tr td.padding-22 {
612
+ padding-top: 22px;
613
}
614
+ .ms-list li {
615
+ margin: 0;
616
+ padding-top: 5px;
617
+ padding-bottom: 5px;
618
}
619
+ /* =Column: Button
620
+ -------------------------------------------------------------- */
621
+ .column-form tr.column_action td a.remove-button {
622
+ border-bottom: 1px solid #FF0000;
623
+ color: #FF0000;
624
+ display: inline-block;
625
+ padding: 0 3px;
626
+ text-decoration: none;
627
+ text-shadow: none;
628
}
629
+ .column-form tr.column_action td a.remove-button:hover {
630
+ background-color: #FF0000;
631
+ border-bottom-color: #FF0000;
632
+ color: #FFFFFF;
633
+ text-decoration: none;
634
+ }
635
+
636
+ /* =Column: Action
637
+ -------------------------------------------------------------- */
638
+ .column-form tr.column_action td {
639
+ background: #f9f9f9;
640
+ }
641
+
642
+ /* =Column: Footer
643
+ -------------------------------------------------------------- */
644
+ .column-footer .button-container {
645
+ float: right;
646
+ display: inline-block;
647
+ margin-top: -5px;
648
+ }
649
+ .column-footer .button-container p {
650
+ margin: 4px;
651
+ color: #7A9BBE;
652
+ }
653
+ .column-footer .button-container a {
654
+ display: inline-block;
655
+ margin-top: 5px;
656
}
657
658
+ /* =Welcome Screen
659
-------------------------------------------------------------- */
660
+
661
+ .cpac-content-body hr {
662
+ -moz-border-bottom-colors: none;
663
+ -moz-border-left-colors: none;
664
+ -moz-border-right-colors: none;
665
+ -moz-border-top-colors: none;
666
+ background: none repeat scroll 0 0 transparent;
667
+ border-color: #DFDFDF -moz-use-text-color -moz-use-text-color;
668
+ border-image: none;
669
+ border-right: 0 none;
670
+ border-style: solid none none;
671
+ border-width: 1px 0 0;
672
+ clear: both;
673
+ margin: 30px 0;
674
+ opacity: 0.2;
675
+ }
676
+ #cpac-welcome.about-wrap div.error {
677
+ display: block !important;
678
+ }
679
+ .cpac-alert {
680
+ display: inline-block;
681
+ background: none repeat scroll 0 0 #FCF8E3;
682
+ border: 1px solid #FBEED5;
683
+ border-radius: 4px 4px 4px 4px;
684
+ color: #C09853;
685
+ margin: 20px 0;
686
+ padding: 16px 14px;
687
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
688
+ }
689
+ .cpac-alert p {
690
+ margin: 0;
691
+ }
692
+ .cpac-alert.cpac-alert-success {
693
+ background-color: #DFF0D8;
694
+ border-color: #D6E9C6;
695
+ color: #468847;
696
+ }
697
+ .cpac-alert.cpac-alert-error {
698
+ background-color: #F2DEDE;
699
+ border-color: #EED3D7;
700
+ color: #B94A48;
701
}
702
+ .cpac-alert a.button-primary {
703
+
704
+ height: 28px;
705
+ line-height: 28px;
706
+ display: inline-block;
707
}
708
+ #cpac-download-add-ons-table {
709
+ max-width: 600px;
710
}
711
+ .wp-core-ui .button-large {
712
+ height: 40px;
713
+ line-height: 40px;
714
+ font-size: 16px;
715
+ padding: 0 15px;
716
+ text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
717
}
718
719
/* =Import / Export
720
-------------------------------------------------------------- */
721
+ #cpac_export_types {
722
+ width: 95%;
723
}
724
#cpac_export_output {
725
display: none;
726
}
727
#cpac_export_output textarea {
728
width: 100%;
729
+ height: 80%;
730
}
731
#cpac_export_submit {
732
display: inline-block;
733
+ margin: 10px 8px;
734
+ padding: 4px 14px;
735
+ height: auto;
736
}
737
#cpac_import_input {}
738
#cpac_import_input textarea {
739
width: 100%;
740
+ height: 200px;
741
}
742
#cpac_import_submit {
743
display: inline-block;
751
border-radius: 3px;
752
display: none;
753
}
754
+ #import-submit {
755
+ margin-top: 10px;
756
+ display: block;
757
+ }
758
+ .cpac_export .ms-container {
759
+ background: transparent url('../images/switch_bw.png') no-repeat 50% 50%;
760
+ }
761
+ .cpac_export .ms-container .ms-selectable {
762
+ width: 48%;
763
+ margin-right: 0;
764
+ }
765
+ .cpac_export .ms-container .ms-selection {
766
+ float: right;
767
+ width: 48%;
768
+ }
769
+ .cpac_export .ms-container ul.ms-list {
770
+ width: 100%;
771
+ }
772
+ a.export-select {
773
+ display: inline-block;
774
+ padding: 8px 8px;
775
+ text-decoration: none;
776
}
777
778
+ /* =Addons Page
779
-------------------------------------------------------------- */
780
+ ul.addons {
781
+ margin-bottom: 0;
782
+ padding: 0;
783
+ overflow: hidden;
784
}
785
+ ul.addons li {
786
+ background: none repeat scroll 0 0 #FFFFFF;
787
+ border: 1px solid #E1E1E1;
788
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
789
+ position: relative;
790
+ float: left;
791
+ margin: 10px 15px 20px;
792
793
+ padding: 13px 13px 30px 13px;
794
+ width: 180px;
795
+ min-height: 300px;
796
}
797
+ ul.addons li h3 {
798
font-size: 13px;
799
}
800
+ ul.addons li p {
801
+ color: #666666;
802
+ }
803
+ ul.addons li .button {
804
+ bottom: 15px;
805
+ right: 15px;
806
+ position: absolute;
807
+ }
808
+ ul.addons li span.state {
809
+ display: none;
810
+ position: absolute;
811
+ bottom: 0;
812
+ width: 100%;
813
+ text-indent: 29px;
814
+ height: 30px;
815
+ line-height: 30px;
816
+ margin-left: -13px;
817
+ background: #73a8d0 url('../images/checkmark_white.png') no-repeat 6px 7px;
818
+ color: #fff;
819
+ font-weight: bold;
820
+ }
821
+ ul.addons li img {
822
+ margin: -15px 0 0 -13px;
823
+ }
824
+ ul.addons li.active .button {
825
+ display: none;
826
+ }
827
+ ul.addons li.active span.state {
828
+ display: block;
829
}
830
831
+ /* =WP Pointer
832
-------------------------------------------------------------- */
833
+ .wp-pointer-content {
834
+ overflow: hidden;
835
}
836
+ .wp-pointer-content ol {
837
+ margin-left: 1.5em;
838
+ padding: 0 15px;
839
+ }
840
+ .wp-pointer-right {
841
+ margin-right: 15px;
842
+ }
843
+
844
+ /* =Responsive
845
+ -------------------------------------------------------------- */
846
+ @media only screen and (max-width: 850px) {
847
+ .columns-container {
848
+ margin-right: 0;
849
+ }
850
+ .columns-right {
851
+ margin-top: 0;
852
+ margin-right: 0;
853
+ width: 100%;
854
+ }
855
+ .columns-right-inside.fixed {
856
+ position: relative;
857
+ top: 0;
858
+ width: 100%;
859
+ }
860
+ .columns-right #addon-state {
861
+ display: none;
862
+ }
863
+ .columns-right #plugin-support {
864
+ display: none;
865
+ }
866
}
assets/css/column.css CHANGED
@@ -1,8 +1,5 @@
1
- .cpac-column-value-image,
2
- .column-column-attachment img {
3
- padding-right: 5px;
4
- padding-bottom: 4px;
5
- }
6
.cpac-divider {
7
display: inline-block;
8
width: 14px;
@@ -14,48 +11,48 @@ span.status-closed {
14
color: red;
15
}
16
17
/* =Color Column
18
-------------------------------------------------------------- */
19
div.cpac-color {
20
line-height: 26px;
21
}
22
div.cpac-color span {
23
- border: 1px solid #CCCCCC;
24
display: block;
25
-webkit-border-radius: 3px;
26
border-radius: 3px;
27
color: #ffffff;
28
float: left;
29
height: 16px;
30
margin-right: 12px;
31
min-width: 30px;
32
overflow: hidden;
33
padding: 4px 5px;
34
}
35
36
- /* =Comment Counts column
37
-------------------------------------------------------------- */
38
- .column-comment-count a.post-com-count {
39
- display: inline-block;
40
- }
41
- .column-comment-count .description a {
42
- display: inline-block;
43
- height: 16px;
44
- line-height: 16px;
45
- padding: 3px 5px 3px 22px;
46
- margin: 0 4px 4px 0;
47
- background: #e4e4e4;
48
- border-radius: 3px;
49
- }
50
- .column-comment-count a.cp-approved {
51
- background: #e4e4e4 url(../images/checkmark.png) no-repeat 3px 50%;
52
- }
53
- .column-comment-count a.cp-moderated {
54
- background: #e4e4e4 url(../images/comment_edit.png) no-repeat 3px 50%;
55
- }
56
- .column-comment-count a.cp-spam {
57
- background: #e4e4e4 url(../images/no.png) no-repeat 3px 50%;
58
- }
59
- .column-comment-count a.cp-trash {
60
- background: #e4e4e4 url(../images/trash.png) no-repeat 3px 50%;
61
}
1
+ /* =General
2
+ -------------------------------------------------------------- */
3
.cpac-divider {
4
display: inline-block;
5
width: 14px;
11
color: red;
12
}
13
14
+ /* =Images Column
15
+ -------------------------------------------------------------- */
16
+ .cpac-column-value-image {
17
+ display: inline-block;
18
+ background: transparent;
19
+ margin-right: 2px;
20
+ overflow: hidden;
21
+ }
22
+ .cpac-column-value-image img {
23
+ display: block;
24
+ margin: 0 auto;
25
+ }
26
+ .column-column-attachment img {
27
+ padding-right: 5px;
28
+ padding-bottom: 4px;
29
+ }
30
+
31
/* =Color Column
32
-------------------------------------------------------------- */
33
div.cpac-color {
34
line-height: 26px;
35
}
36
div.cpac-color span {
37
display: block;
38
-webkit-border-radius: 3px;
39
border-radius: 3px;
40
color: #ffffff;
41
float: left;
42
height: 16px;
43
+ line-height: 16px;
44
margin-right: 12px;
45
min-width: 30px;
46
overflow: hidden;
47
padding: 4px 5px;
48
+ font-size: 10px;
49
+ font-family: Monaco,Menlo,Consolas,"Courier New",monospace;
50
+ min-width: 47px;
51
+ text-align: center;
52
}
53
54
+ /* =Available Sizes column
55
-------------------------------------------------------------- */
56
+ div.sizes span.not-available {
57
+ color: #999;
58
}
assets/css/custom-fields.css ADDED
@@ -0,0 +1,2 @@
1
+ /* =Custom Fields
2
+ -------------------------------------------------------------- */
assets/images/_drag.png ADDED
Binary file
assets/images/addon_multiplecustomfields.png ADDED
Binary file
assets/images/addon_sortable_1.png CHANGED
File without changes
assets/images/arrow.png ADDED
Binary file
assets/images/arrows.png CHANGED
File without changes
assets/images/border.png ADDED
Binary file
assets/images/checkbox.png CHANGED
File without changes
assets/images/checkmark.png CHANGED
File without changes
assets/images/checkmark_single.png CHANGED
File without changes
assets/images/checkmark_white.png ADDED
Binary file
assets/images/comment-grey-bubble.png ADDED
Binary file
assets/images/comment_edit.png CHANGED
File without changes
assets/images/cross.png CHANGED
File without changes
assets/images/drag.png ADDED
Binary file
assets/images/facebook.png CHANGED
File without changes
assets/images/get_the_addon.png ADDED
Binary file
assets/images/help.png ADDED
Binary file
assets/images/icon.png CHANGED
File without changes
assets/images/icon_20.png ADDED
Binary file
assets/images/import_export.png CHANGED
File without changes
assets/images/info.png ADDED
Binary file
assets/images/information.png CHANGED
File without changes
assets/images/layout_edit.png ADDED
Binary file
assets/images/loading.gif CHANGED
File without changes
assets/images/more_info.png ADDED
Binary file
assets/images/no.png CHANGED
File without changes
assets/images/order_arrow.png ADDED
Binary file
assets/images/reorder.png DELETED
Binary file
assets/images/reorder_arrow.png DELETED
Binary file
assets/images/settings.png CHANGED
File without changes
assets/images/sort.png CHANGED
File without changes
assets/images/square.png CHANGED
File without changes
assets/images/status.png ADDED
Binary file
assets/images/switch_blue.png ADDED
Binary file
assets/images/switch_bw.png ADDED
Binary file
assets/images/trash.png CHANGED
File without changes
assets/images/twitter.png CHANGED
File without changes
assets/images/yes.png ADDED
Binary file
assets/js/admin-column.js DELETED
@@ -1,634 +0,0 @@
1
- (function($){
2
-
3
- /**
4
- * fires when the dom is ready
5
- *
6
- */
7
- $(document).ready(function()
8
- {
9
- if ($('#cpac').length == 0)
10
- return false;
11
-
12
- cpac_sortable();
13
- cpac_checked();
14
- cpac_box_events();
15
- cpac_menu();
16
- cpac_add_custom_column();
17
- cpac_clear_input_defaults();
18
- cpac_tooltips();
19
- cpac_addon_activation();
20
- cpac_width_range();
21
- cpac_export();
22
- cpac_import();
23
- cpac_pointer();
24
- });
25
-
26
- /**
27
- * sortable
28
- *
29
- */
30
- function cpac_sortable()
31
- {
32
- $('ul.cpac-option-list').sortable({
33
- handle: 'div.cpac-sort-handle',
34
- placeholder: 'cpac-placeholder',
35
- forcePlaceholderSize: true
36
- });
37
- }
38
-
39
- /**
40
- * checked
41
- *
42
- */
43
- function cpac_checked()
44
- {
45
- $('#cpac .cpac-option-list li .cpac-type-options').live({
46
- click: function() {
47
- var li = $(this).closest('li');
48
- var state = $('.cpac-state', li);
49
- var value = state.attr('value');
50
-
51
- // toggle on
52
- if ( value != 'on') {
53
- li.addClass('active');
54
- state.attr('value', 'on');
55
- }
56
-
57
- // toggle off
58
- else {
59
- li.removeClass('active');
60
- state.attr('value', '');
61
- }
62
- }
63
- });
64
- }
65
-
66
- /**
67
- * Open and close box
68
- *
69
- */
70
- function cpac_box_events()
71
- {
72
- // fold in/out
73
- $('#cpac .cpac-option-list .cpac-action').unbind('click').click(function(e){
74
- e.preventDefault();
75
- var li = $(this).closest('li');
76
- li.find('.cpac-type-inside').slideToggle(150, function() {
77
- li.toggleClass('opened');
78
- });
79
- });
80
-
81
- // remove custom field box
82
- $('#cpac .cpac-delete-custom-field-box').unbind('click').click(function(e){
83
- e.preventDefault();
84
- var el = $(this).closest('li');
85
-
86
- el.addClass('deleting').animate({
87
- opacity : 0,
88
- height: 0
89
- }, 350, function() {
90
- el.remove();
91
- });
92
- });
93
- }
94
-
95
- /**
96
- * Menu
97
- *
98
- */
99
- function cpac_menu()
100
- {
101
- // referer
102
- var referer = $("input[type='hidden'][name='_wp_http_referer']");
103
- var referer_value = referer.attr('value');
104
-
105
- // click
106
- $('#cpac .cpac-menu a').click( function(e, el) {
107
- e.preventDefault();
108
- var id = $(this).attr('href');
109
-
110
- if ( id ) {
111
- // remove current
112
- $('#cpac .cpac-menu a').removeClass('current');
113
- $('#cpac .cpac-box-row').hide().removeClass('current');
114
-
115
- // set current
116
- $(this).addClass('current');
117
- $(id).show().addClass('current');
118
-
119
- // set refere
120
- var querystring = '&cpac_type=' + id.replace('#','');
121
- referer.attr('value', referer_value + querystring );
122
- }
123
- });
124
- }
125
-
126
- /**
127
- * add custom columns
128
- *
129
- */
130
- function cpac_add_custom_column()
131
- {
132
- $('.cpac-add-customfield-column').click(function(e){
133
- e.preventDefault();
134
-
135
- var list = $(this).closest('td').find('ul.cpac-option-list');
136
- var metafields = $('li.cpac-box-metafield', list);
137
-
138
- // get unique ID number...
139
- var ids = [];
140
- metafields.each(function(k,v) {
141
- var _class = $(v).attr('class');
142
- var classes = _class.split(' ');
143
- $.each(classes, function(kc,vc){
144
- if ( vc.indexOf('cpac-box-column-meta-') === 0 ) {
145
- var id = vc.replace('cpac-box-column-meta-','');
146
- if ( id )
147
- ids.push(id);
148
- }
149
- });
150
- });
151
-
152
- // ...and sort them
153
- ids.sort(sortNumber);
154
-
155
- if ( !ids )
156
- return;
157
-
158
- function sortNumber(a,b) {
159
- return b - a;
160
- }
161
-
162
- // ID's
163
- var id = parseFloat(ids[0]);
164
- var new_id = id + 1;
165
-
166
- // Clone
167
- var clone = $( '.cpac-box-column-meta-' + id, list ).clone();
168
-
169
- // Toggle class
170
- $(clone).removeClass('cpac-box-column-meta-' + id );
171
- $(clone).addClass('cpac-box-column-meta-' + new_id );
172
-
173
- // Replace inputs ID's
174
- var inputs = $(clone).find('input, select');
175
- $(inputs).each(function(ik, iv){
176
- $(iv).attr('name', $(iv).attr('name').replace(id, new_id) );
177
- });
178
-
179
- // Replace label ID's
180
- var labels = $(clone).find('label');
181
- $(labels).each(function(ik, iv){
182
- var attr_for = $(iv).attr('for');
183
- if ( attr_for ) {
184
- $(iv).attr('for', attr_for.replace(id, new_id) );
185
- }
186
- });
187
-
188
- // remove description
189
- clone.find('.remove-description').remove();
190
-
191
- // change label text
192
- clone.find('label.main-label, .cpac-type-inside input.text').text('Custom Field');
193
- clone.find('.cpac-type-inside input.text').val('Custom Field');
194
-
195
- // add remove button
196
- if ( clone.find('.cpac-delete-custom-field-box').length == 0 ) {
197
- var remove = '<p><a href="javascript:;" class="cpac-delete-custom-field-box">Remove</a>';
198
- clone.find('.cpac-type-inside').append(remove);
199
- }
200
-
201
- // add cloned box to the list
202
- list.append(clone);
203
-
204
- // retrigger click events
205
- cpac_box_events();
206
-
207
- // re-init width range slider
208
- cpac_width_range();
209
- });
210
- }
211
-
212
- /**
213
- * Clear Input Defaults
214
- *
215
- */
216
- function cpac_clear_input_defaults()
217
- {
218
- $.fn.cleardefault = function() {
219
- return this.focus(function() {
220
- if( this.value == this.defaultValue ) {
221
- this.value = "";
222
- }
223
- }).blur(function() {
224
- if( !this.value.length ) {
225
- this.value = this.defaultValue;
226
- }
227
- });
228
- };
229
- $("#cpac-box-plugin_settings .addons input").cleardefault();
230
- }
231
-
232
-
233
- /**
234
- * Tooltip
235
- *
236
- */
237
- function cpac_tooltips()
238
- {
239
- $('#cpac .activation_type span').each(function() {
240
- var info = $(this).next('.cpac-tooltip').html();
241
-
242
- if ( ! info )
243
- return;
244
-
245
- $('#cpac .activation_type span').qtip({
246
- content: info,
247
- title: 'title',
248
- style: {
249
- width: 400,
250
- padding: 0,
251
- background: 'transparent',
252
- color: 'black',
253
- textAlign: 'left',
254
- border: {
255
- width: 0,
256
- radius: 0
257
- },
258
- tip: {
259
- corner: 'topMiddle',
260
- color: '#8cc1e9',
261
- size: {
262
- x: 32,
263
- y : 15
264
- }
265
- }
266
- },
267
- position: {
268
- corner: {
269
- target: 'bottomRight'
270
- },
271
- adjust: {
272
- x: -80,
273
- y: 0
274
- }
275
- },
276
- hide: {
277
- when: 'mouseout',
278
- fixed: true ,
279
- delay: 100
280
- }
281
- });
282
- });
283
- }
284
-
285
- /**
286
- * Width range
287
- *
288
- */
289
- function cpac_width_range()
290
- {
291
- if ( $('.input-width-range').length == false )
292
- return;
293
-
294
- // loop through all width-range-sliders
295
- $('.input-width-range').each( function(){
296
-
297
- var input = $(this).closest('.cpac-type-inside').find('.input-width');
298
- var descr = $(this).closest('.cpac-type-inside').find('.width-decription');
299
- var input_default = $(input)[0].defaultValue;
300
- var translation_default = descr.attr('title');
301
-
302
- // add slider
303
- $(this).slider({
304
- range: 'min',
305
- value: 1,
306
- min: 0,
307
- max: 100,
308
- value: input_default,
309
- slide: function( event, ui ) {
310
-
311
- // set default
312
- var descr_value = ui.value > 0 ? ui.value + '%' : translation_default;
313
-
314
- // set input value
315
- $(input).val( ui.value );
316
-
317
- // set description
318
- $(descr).text( descr_value );
319
- }
320
- });
321
- });
322
- }
323
-
324
- /**
325
- * Addon actviate/deactivate
326
- *
327
- */
328
- function cpac_addon_activation()
329
- {
330
- $('#cpac-box-plugin_settings .addons .activation_code a.button').click(function(e) {
331
- e.preventDefault();
332
-
333
- // get input values
334
- var row = $(this).closest('tr');
335
- var type = $(row).attr('id').replace('cpac-activation-','');
336
- var parent_class = $(this).parent('div');
337
- var msg = $(row).find('.activation-error-msg');
338
-
339
- // get translated string
340
- var translations = $('#cpac-box-plugin_settings .addon-translation-string');
341
- var msg_fillin = $('.tstring-fill-in',translations).text();
342
- var msg_unrecognised = $('.tstring-unrecognised',translations).text();
343
-
344
- // reset
345
- $(msg).empty();
346
-
347
- // Activate
348
- if ( parent_class.hasClass('activate') ) {
349
-
350
- // get input values
351
- var input = $('.activate input', row);
352
- var button = $('.activate .button', row);
353
- var key = input.val();
354
- var default_val = $(input)[0].defaultValue;
355
-
356
- // make sure the input value has changed
357
- if ( key == default_val ) {
358
- $(msg).text(msg_fillin).hide().fadeIn();
359
- return false;
360
- }
361
-
362
- // set loading icon
363
- button.addClass('loading');
364
-
365
- // update key
366
- $.ajax({
367
- url : ajaxurl,
368
- type : 'POST',
369
- dataType : 'json',
370
- data : {
371
- action : 'cpac_addon_activation',
372
- type : 'sortable',
373
- key : key
374
- },
375
- success: function(data) {
376
- if ( data != null ) {
377
- $('div.activate', row).hide(); // hide activation button
378
- $('div.deactivate', row).show(); // show deactivation button
379
- $('div.deactivate span.masked_key', row).text(data); // display the returned masked key
380
- } else {
381
- $(msg).text(msg_unrecognised).hide().fadeIn();
382
- }
383
- },
384
- error: function(xhr, ajaxOptions, thrownError) {
385
- //console.log(xhr);
386
- //console.log(ajaxOptions);
387
- //console.log(thrownError);
388
- $(msg).text(msg_unrecognised).hide().fadeIn();
389
- },
390
- complete: function() {
391
- button.removeClass('loading');
392
- }
393
- });
394
- }
395
-
396
- // Deactivate
397
- if ( parent_class.hasClass('deactivate') ) {
398
-
399
- var button = $('.deactivate .button', row);
400
- var input = $('.activate input', row);
401
-
402
- // set loading icon
403
- button.addClass('loading');
404
-
405
- // update key
406
- $.ajax({
407
- url : ajaxurl,
408
- type : 'POST',
409
- dataType : 'json',
410
- data : {
411
- action : 'cpac_addon_activation',
412
- type : 'sortable',
413
- key : 'remove'
414
- },
415
- success: function(data) {
416
- $('div.activate', row).show(); // show activation button
417
- $('div.deactivate', row).hide(); // hide deactivation button
418
- $('div.deactivate span.masked_key', row).empty(); // remove masked key
419
- input.val('');
420
- },
421
- error: function(xhr, ajaxOptions, thrownError) {
422
- //console.log(xhr);
423
- //console.log(ajaxOptions);
424
- //console.log(thrownError);
425
- },
426
- complete: function() {
427
- button.removeClass('loading');
428
- }
429
- });
430
- }
431
- });
432
- }
433
-
434
- /**
435
- * Export Settings
436
- *
437
- */
438
- function cpac_export()
439
- {
440
- // Submit Export
441
- $('#cpac_export_submit').click( function(e){
442
-
443
- var values = [];
444
-
445
- // get selected values
446
- $('#cpac_export_types :selected').each(function(i, selected){
447
- values[i] = $(selected).val();
448
- });
449
-
450
- var btn = $(this);
451
- var export_container = $('#cpac_export_output');
452
- var export_textarea = $('textarea', export_container);
453
- var msg = btn.next('.export-message');
454
-
455
- // reset
456
- export_container.hide();
457
- export_textarea.empty();
458
- msg.hide();
459
-
460
- // get export code
461
- if ( values ) {
462
-
463
- // set loading icon
464
- btn.addClass('loading');
465
-
466
- $.ajax({
467
- url : ajaxurl,
468
- type : 'POST',
469
- dataType : 'json',
470
- data : {
471
- action : 'cpac_get_export',
472
- types : values
473
- },
474
- success: function(data) {
475
- if ( data != null ) {
476
-
477
- // succes
478
- if ( 1 == data.status ) {
479
- export_textarea.text(data.msg);
480
- export_container.show();
481
- }
482
-
483
- // fail
484
- else if ( data.msg ) {
485
- msg.text(data.msg).show();
486
- }
487
-
488
- } else {
489
- // error msg
490
- }
491
- },
492
- error: function(xhr, ajaxOptions, thrownError) {},
493
- complete: function() {
494
- btn.removeClass('loading');
495
- }
496
- });
497
- }
498
-
499
- e.preventDefault;
500
- });
501
-
502
- // Select Export Code
503
- $('#cpac_export_output textarea').focus(function() {
504
- var t = $(this);
505
- t.select();
506
-
507
- t.mouseup(function() { // Work around Chrome's little problem
508
-
509
- t.unbind("mouseup"); // Prevent further mouseup intervention
510
- return false;
511
- });
512
- });
513
- }
514
-
515
- /**
516
- * Import Settings
517
- *
518
- */
519
- function cpac_import()
520
- {
521
- $('#cpac_import_submit'). click( function(e){
522
-
523
- var btn = $(this);
524
- var import_code = $('#cpac_import_input textarea').val();
525
- var msg = btn.next('.import-message');
526
-
527
- btn.addClass('loading');
528
- msg.hide();
529
-
530
- if ( import_code ) {
531
-
532
- $.ajax({
533
- url : ajaxurl,
534
- type : 'POST',
535
- dataType : 'json',
536
- data : {
537
- action : 'cpac_import',
538
- import_code : import_code
539
- },
540
- success: function(data) {
541
- if ( data != null ) {
542
-
543
- // succes
544
- if ( 1 == data.status ) {
545
- msg.html(data.msg).show();
546
- }
547
-
548
- // fail
549
- else if ( data.msg ) {
550
- msg.text(data.msg).show();
551
- }
552
- }
553
-
554
- else {
555
- msg.text('error').show();
556
- }
557
- },
558
- error: function(xhr, ajaxOptions, thrownError) {},
559
- complete: function() {
560
- btn.removeClass('loading');
561
- }
562
- });
563
- }
564
-
565
- else {
566
- btn.removeClass('loading');
567
- msg.text('empty').show();
568
- }
569
-
570
- e.preventDefault;
571
- });
572
-
573
- // Select Import Code
574
- $('#cpac_import_input textarea').focus(function() {
575
- var t = $(this);
576
- t.select();
577
-
578
- t.mouseup(function() { // Work around Chrome's little problem
579
-
580
- t.unbind("mouseup"); // Prevent further mouseup intervention
581
- return false;
582
- });
583
- });
584
- }
585
-
586
- /**
587
- * WP Pointer
588
- *
589
- * credits to ACF ( Elliot Condon )
590
- */
591
- function cpac_pointer()
592
- {
593
- $('a.cpac-pointer').each(function(){
594
-
595
- // vars
596
- var a = $(this),
597
- html = a.attr('rel');
598
-
599
- // create pointer
600
- a.pointer({
601
- content: $('#' + html).html(),
602
- position: {
603
- my: 'left bottom',
604
- at: 'left top',
605
- edge: 'bottom',
606
- },
607
- close: function() {
608
- a.removeClass('open');
609
- }
610
- });
611
-
612
- // click
613
- a.click( function() {
614
-