WordPress Landing Pages - Version 1.4.6

Version Description

  • New Feature: Bulk Lead management with leads plugin wordpress.org/plugins/leads/
  • Added tags to lead profiles for improved management/categorization
  • Added new compatibility options to fix third party plugin conflicts!
  • Added new debugging javascript debugging tools for users
  • Fixed Email Sending Error on forms
  • Improved support for master license keys
Download this release

Release Info

Developer DavidWells
Plugin Icon 128x128 WordPress Landing Pages
Version 1.4.6
Comparing to
See all releases

Code changes from version 1.4.5 to 1.4.6

Files changed (142) hide show
  1. css/admin-lp-cpt-only-style.css +31 -1
  2. css/new-customizer-admin.css +6 -0
  3. images/localhost.png +0 -0
  4. js/admin/admin.post-edit.js +92 -92
  5. js/admin/admin.post-new.js +3 -3
  6. js/libraries/isotope/css/style.css +0 -752
  7. js/libraries/isotope/jquery.isotope.js +0 -1406
  8. js/libraries/isotope/jquery.isotope.min.js +0 -11
  9. js/libraries/isotope/js/fake-element.js +0 -38
  10. js/libraries/isotope/js/jquery-1.7.1.min.js +0 -4
  11. js/libraries/isotope/js/jquery.ba-bbq.min.js +0 -18
  12. js/libraries/isotope/js/jquery.infinitescroll.min.js +0 -47
  13. js/libraries/isotope/js/make-big-graph-projects.js +0 -43
  14. js/libraries/jquery-datepicker/picker_functions.js +26 -14
  15. landing-pages.php +23 -8
  16. libraries/library.shareme.php +1 -1
  17. modules/module.activate.php +1 -1
  18. modules/module.clone.php +1 -1
  19. modules/module.extension-licensing.php +5 -3
  20. modules/module.extension-updater.php +6 -7
  21. modules/module.global-settings.php +85 -44
  22. modules/module.javascript-admin.php +1 -3
  23. modules/module.landing-page.php +6 -2
  24. modules/module.load-extensions.php +1 -1
  25. modules/module.post-type.php +529 -1
  26. modules/module.track.php +1 -1
  27. modules/module.utils.php +16 -4
  28. readme.txt +10 -2
  29. shared/classes/chart.class.php +291 -0
  30. shared/classes/compatibility.class.php +134 -0
  31. shared/classes/debug.class.php +379 -0
  32. shared/classes/feedback.class.php +1 -1
  33. shared/classes/form.class.php +2 -2
  34. shared/classes/js/debug.js +37 -0
  35. shared/classes/js/inbound-dequeue-scripts.js +49 -0
  36. shared/classes/menu.class.php +61 -4
  37. shared/docs/shortcodes.md +3 -0
  38. shared/inbound-shortcodes/css/frontend-render.css +22 -14
  39. shared/inbound-shortcodes/images/facebook@2x.png +0 -0
  40. shared/inbound-shortcodes/images/google@2x.png +0 -0
  41. shared/inbound-shortcodes/images/linkedin@2x.png +0 -0
  42. shared/inbound-shortcodes/images/pinterest@2x.png +0 -0
  43. shared/inbound-shortcodes/images/twitter@2x.png +0 -0
  44. shared/inbound-shortcodes/inbound-shortcodes.php +109 -115
  45. shared/inbound-shortcodes/js/shortcodes.js +3 -2
  46. shared/inbound-shortcodes/popup.php +1 -1
  47. shared/inbound-shortcodes/shortcodes-fields.php +23 -22
  48. shared/inbound-shortcodes/shortcodes-includes.php +10 -23
  49. shared/inbound-shortcodes/shortcodes/forms.php +2 -1
  50. shared/inbound-shortcodes/shortcodes/quick-forms.php +1 -1
  51. shared/inboundnow/inboundnow.extend.php +348 -0
  52. shared/inboundnow/inboundnow.extension-licensing.php +145 -132
  53. shared/inboundnow/inboundnow.extension-updating.php +26 -13
  54. shared/inboundnow/inboundnow.global-settings.php +32 -0
  55. shared/languages/landing-pages.po +2437 -0
  56. shared/languages/landing-pages/_get-translations.bat +12 -0
  57. shared/languages/landing-pages/ach.mo +0 -0
  58. shared/languages/landing-pages/af.mo +0 -0
  59. shared/languages/landing-pages/ar.mo +0 -0
  60. shared/languages/landing-pages/az.mo +0 -0
  61. shared/languages/landing-pages/be_BY.mo +0 -0
  62. shared/languages/landing-pages/bg_BG.mo +0 -0
  63. shared/languages/landing-pages/bn_BD.mo +0 -0
  64. shared/languages/landing-pages/br.mo +0 -0
  65. shared/languages/landing-pages/bs_BA.mo +0 -0
  66. shared/languages/landing-pages/ca.mo +0 -0
  67. shared/languages/landing-pages/co.mo +0 -0
  68. shared/languages/landing-pages/cs_CZ.mo +0 -0
  69. shared/languages/landing-pages/cy.mo +0 -0
  70. shared/languages/landing-pages/da_DK.mo +0 -0
  71. shared/languages/landing-pages/de_DE.mo +0 -0
  72. shared/languages/landing-pages/el.mo +0 -0
  73. shared/languages/landing-pages/en_GB.mo +0 -0
  74. shared/languages/landing-pages/eo.mo +0 -0
  75. shared/languages/landing-pages/es_CL.mo +0 -0
  76. shared/languages/landing-pages/es_ES.mo +0 -0
  77. shared/languages/landing-pages/es_MX.mo +0 -0
  78. shared/languages/landing-pages/es_PE.mo +0 -0
  79. shared/languages/landing-pages/es_VE.mo +0 -0
  80. shared/languages/landing-pages/et.mo +0 -0
  81. shared/languages/landing-pages/eu.mo +0 -0
  82. shared/languages/landing-pages/fa.mo +0 -0
  83. shared/languages/landing-pages/fa_IR.mo +0 -0
  84. shared/languages/landing-pages/fi.mo +0 -0
  85. shared/languages/landing-pages/fo.mo +0 -0
  86. shared/languages/landing-pages/fr_FR.mo +0 -0
  87. shared/languages/landing-pages/gl_ES.mo +0 -0
  88. shared/languages/landing-pages/gu_IN.mo +0 -0
  89. shared/languages/landing-pages/he_IL.mo +0 -0
  90. shared/languages/landing-pages/hi_IN.mo +0 -0
  91. shared/languages/landing-pages/hr.mo +0 -0
  92. shared/languages/landing-pages/hu_HU.mo +0 -0
  93. shared/languages/landing-pages/id_ID.mo +0 -0
  94. shared/languages/landing-pages/is_IS.mo +0 -0
  95. shared/languages/landing-pages/it_IT.mo +0 -0
  96. shared/languages/landing-pages/ja.mo +0 -0
  97. shared/languages/landing-pages/jv.mo +0 -0
  98. shared/languages/landing-pages/ka.mo +0 -0
  99. shared/languages/landing-pages/ko_KR.mo +0 -0
  100. shared/languages/landing-pages/ku.mo +0 -0
  101. shared/languages/landing-pages/ky.mo +0 -0
  102. shared/languages/landing-pages/landing-pages.po +1 -1
  103. shared/languages/landing-pages/lv.mo +0 -0
  104. shared/languages/landing-pages/lv_LV.mo +0 -0
  105. shared/languages/landing-pages/mg.mo +0 -0
  106. shared/languages/landing-pages/mk_MK.mo +0 -0
  107. shared/languages/landing-pages/mn.mo +0 -0
  108. shared/languages/landing-pages/my_MM.mo +0 -0
  109. shared/languages/landing-pages/nb_NO.mo +0 -0
  110. shared/languages/landing-pages/ne_NP.mo +0 -0
  111. shared/languages/landing-pages/nl_NL.mo +0 -0
  112. shared/languages/landing-pages/nn_NO.mo +0 -0
  113. shared/languages/landing-pages/oc.mo +0 -0
  114. shared/languages/landing-pages/pap.mo +0 -0
  115. shared/languages/landing-pages/pl_PL.mo +0 -0
  116. shared/languages/landing-pages/pt_BR.mo +0 -0
  117. shared/languages/landing-pages/pt_PT.mo +0 -0
  118. shared/languages/landing-pages/ro_RO.mo +0 -0
  119. shared/languages/landing-pages/ru_RU.mo +0 -0
  120. shared/languages/landing-pages/sah.mo +0 -0
  121. shared/languages/landing-pages/sk_SK.mo +0 -0
  122. shared/languages/landing-pages/sq.mo +0 -0
  123. shared/languages/landing-pages/sr_RS.mo +0 -0
  124. shared/languages/landing-pages/su.mo +0 -0
  125. shared/languages/landing-pages/sv_SE.mo +0 -0
  126. shared/languages/landing-pages/sw.mo +0 -0
  127. shared/languages/landing-pages/te.mo +0 -0
  128. shared/languages/landing-pages/th.mo +0 -0
  129. shared/languages/landing-pages/tk_TM.mo +0 -0
  130. shared/languages/landing-pages/tr_TR.mo +0 -0
  131. shared/languages/landing-pages/ug.mo +0 -0
  132. shared/languages/landing-pages/uk.mo +0 -0
  133. shared/languages/landing-pages/uz.mo +0 -0
  134. shared/languages/landing-pages/vi.mo +0 -0
  135. shared/languages/landing-pages/zh_CN.mo +0 -0
  136. shared/languages/landing-pages/zh_TW.mo +0 -0
  137. shared/metaboxes/inbound-metaboxes.css +5 -22
  138. shared/metaboxes/template.metaboxes.php +181 -0
  139. shared/tracking/js/inprogress.store.lead.ajax.js +2 -1
  140. shared/tracking/js/store.lead.ajax.js +13 -5
  141. shared/tracking/store.lead.php +235 -215
  142. templates/rsvp-envelope/index.php +1 -1
css/admin-lp-cpt-only-style.css CHANGED
@@ -35,11 +35,12 @@ padding: 5px;
35
padding-top: 0px;
36
margin-right: 5px;
37
text-align: center;
38
}
39
.lp-template-selector-container ul#template-filter {
40
line-height: 30px;
41
margin-top: 10px;
42
- margin-bottom: 15px;
43
}
44
.lp-template-selector-container ul#template-filter a {
45
margin-right: 0px;
@@ -59,4 +60,33 @@ ul#template-filter .button-primary a {
59
}
60
#lp_2_form_content .hndle em {
61
font-size: 13px;
62
}
35
padding-top: 0px;
36
margin-right: 5px;
37
text-align: center;
38
+ margin-bottom: 10px;
39
}
40
.lp-template-selector-container ul#template-filter {
41
line-height: 30px;
42
margin-top: 10px;
43
+ margin-bottom: 0px;
44
}
45
.lp-template-selector-container ul#template-filter a {
46
margin-right: 0px;
60
}
61
#lp_2_form_content .hndle em {
62
font-size: 13px;
63
+ }
64
+ .template-thumbnail
65
+ {
66
+ width:100%;
67
+ height:190px;
68
+ -webkit-border-radius: 4px;
69
+ -khtml-border-radius: 4px;
70
+ -moz-border-radius: 4px;
71
+ border-radius: 4px;
72
+ background-color: #A9A9A9;
73
+ -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px,rgba(0, 0, 0, 0.3) 0 2px 5px;
74
+ -moz-box-shadow: rgba(0,0,0,0.2) 0 0 0 1px,rgba(0,0,0,0.3) 0 2px 5px;
75
+ box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px,rgba(0, 0, 0, 0.3) 0 2px 5px;
76
+ }
77
+
78
+ ul#template-filter{ margin: 0px 0; padding: 0; padding-left: 0px; line-height: 64px; }
79
+ ul#template-filter li{ display: inline; }
80
+ ul#template-filter a{ margin-right: 0.5em; padding: 0em 1em; font-weight: bold; text-decoration: none; }
81
+ ul#template-filter .button-primary a:hover { color:#fff;}
82
+ ul#template-filter a.current{ background-color: #DDD; }
83
+
84
+ #template-item{ float: left; margin-right: 18px; overflow: hidden; margin: 0px 0 0 0; padding: 0; list-style: none; width: 300px; margin-bottom: 10px; }
85
+ #template-item div{ display: block; }
86
+ /* #template-item div a{ display: block; width: 163px; height: 120px; overflow: hidden; border: 1px solid #CDCDCD; background: #eee; }*/
87
+ #template-item li p{ font-size: 11px; line-height: 15px; color: #AAA; margin: 5px 0; }
88
+ #template-box .lp_tooltip_templates{
89
+ bottom: 6px;
90
+ position: absolute;
91
+ right: 8px;
92
}
css/new-customizer-admin.css CHANGED
@@ -196,6 +196,12 @@ margin-left: -10px !important;
196
.mceIframeContainer.mceFirst.mceLast iframe {
197
width: 100% !important;
198
}
199
#lp_metabox_select_template {
200
margin-left: -20px !important;
201
width: 108%;
196
.mceIframeContainer.mceFirst.mceLast iframe {
197
width: 100% !important;
198
}
199
+ .mceIframeContainer.mceFirst.mceLast {
200
+ margin-top: 30px;
201
+ }
202
+ .mceToolbar.mceLeft.mceFirst.mceLast div {
203
+ background: #F5F5F5;
204
+ }
205
#lp_metabox_select_template {
206
margin-left: -20px !important;
207
width: 108%;
images/localhost.png ADDED
Binary file
js/admin/admin.post-edit.js CHANGED
@@ -1,41 +1,41 @@
1
jQuery(document).ready(function ($) {
2
3
- jQuery('#templates-container').isotope();
4
// Isotope Styling
5
jQuery('#template-filter li').first().addClass('button-primary');
6
- // filter items when filter link is clicked
7
- jQuery('#template-filter a').click(function(){
8
- var selector = jQuery(this).attr('data-filter');
9
- jQuery("ul#template-filter li").removeClass('button-primary');
10
jQuery(this).parent().addClass('button-primary');
11
- jQuery('#templates-container').isotope({ filter: selector });
12
- return false;
13
- });
14
-
15
- /* Ajax loading tabs
16
- jQuery.koolSwap({
17
- swapBox : '#poststuff',
18
- outDuration : 550,
19
- inDuration : 600,
20
- });
21
- */
22
-
23
- jQuery("body").on('click', '#content-tmce, .wp-switch-editor.switch-tmce', function () {
24
- $.cookie("lp-edit-view-choice", "editor", { path: '/', expires: 7 });
25
- });
26
-
27
- jQuery("body").on('click', '#content-html, .wp-switch-editor.switch-html', function () {
28
- $.cookie("lp-edit-view-choice", "html", { path: '/', expires: 7 });
29
- });
30
-
31
- var which_editor = $.cookie("lp-edit-view-choice");
32
- if(which_editor === null){
33
- setTimeout(function() {
34
- //jQuery("#content-tmce").click();
35
- //jQuery(".wp-switch-editor.switch-tmce").click();
36
- }, 1000);
37
-
38
- }
39
/*
40
41
var chtml= jQuery('#content-html');
@@ -46,16 +46,16 @@ jQuery(document).ready(function ($) {
46
switchEditors.switchto(ctmce[0]); // switch to tinymce
47
48
*/
49
- if(which_editor === 'editor'){
50
- setTimeout(function() {
51
52
var ctmce= jQuery('#content-tmce');
53
switchEditors.switchto(ctmce[0]); // switch to tinymce
54
55
var conversion_area = jQuery("#landing-page-myeditor-tmce");
56
switchEditors.switchto(conversion_area[0]); // switch to tinymce
57
- //jQuery("#content-tmce").click();
58
- //jQuery(".wp-switch-editor.switch-tmce").click();
59
jQuery('.inbound-wysiwyg-option textarea').each(function(){
60
var chtml= "#" + jQuery(this).attr('id') + '-html';
61
var ctmce= "#" + jQuery(this).attr('id') + '-tmce';
@@ -63,8 +63,8 @@ jQuery(document).ready(function ($) {
63
var tinymce_box = jQuery(ctmce);
64
switchEditors.switchto(tinymce_box[0]); // switch to tinymce
65
});
66
- }, 1000);
67
- }
68
69
/* Tour Start JS */
70
var tourbutton = '<a class="" id="lp-tour" style="font-size:13px;">Need help? Take the tour</a>';
@@ -90,10 +90,10 @@ jQuery(document).ready(function ($) {
90
// Fix inactivate theme display
91
jQuery("#template-box a").live('click', function () {
92
93
- setTimeout(function() {
94
- jQuery('#TB_window iframe').contents().find("#customize-controls").hide();
95
- jQuery('#TB_window iframe').contents().find(".wp-full-overlay.expanded").css("margin-left", "0px");
96
- }, 600);
97
98
});
99
@@ -177,62 +177,62 @@ jQuery(document).ready(function ($) {
177
jQuery('.lp_select_template').click(function(){
178
var template = jQuery(this).attr('id');
179
var label = jQuery(this).attr('label');
180
- var selected_template_id = "#" + template;
181
- var currentlabel = jQuery(".currently_selected").show();
182
- var current_template = jQuery("input#lp_select_template ").val();
183
var current_template_meta = "#lp_" + current_template + "_custom_meta_box";
184
var current_template_h3 = "#lp_" + current_template + "_custom_meta_box h3";
185
var current_template_div = "#lp_" + current_template + "_custom_meta_box .handlediv";
186
var open_variation = jQuery("#open_variation").val();
187
188
- if (open_variation>0)
189
- {
190
- var variation_tag = "-"+open_variation;
191
- }
192
- else
193
- {
194
- var variation_tag = "";
195
- }
196
197
- jQuery("#template-box.default_template_highlight").removeClass("default_template_highlight");
198
199
jQuery(selected_template_id).parent().addClass("default_template_highlight").prepend(currentlabel);
200
201
- jQuery(".lp-template-selector-container").fadeOut(500,function(){
202
- jQuery('#lp_metabox_select_template input').remove();
203
- jQuery('#lp_metabox_select_template .form-table').remove();
204
-
205
- var ajax_data = {
206
- action: 'lp_get_template_meta',
207
- selected_template: template,
208
- post_id: lp_post_edit_ui.post_id,
209
- };
210
-
211
- jQuery.ajax({
212
- type: "POST",
213
- url: lp_post_edit_ui.ajaxurl,
214
- data: ajax_data,
215
- dataType: 'html',
216
- timeout: 7000,
217
- success: function (response) {
218
- //alert(response);
219
- var html = '<input id="lp_select_template" type="hidden" value="'+template+'" name="lp-selected-template'+variation_tag+'">'
220
- + '<input type="hidden" value="'+lp_post_edit_ui.lp_template_nonce+'" name="lp_lp_custom_fields_nonce">'
221
- + '<h3 class="hndle" style="cursor: default;">'
222
- + '<span>'
223
- + '<small>'+ template +' Options:</small>'
224
- + '</span>'
225
- + '</h3>'
226
- + response;
227
-
228
- jQuery('#lp_metabox_select_template #template-display-options').html(html);
229
- jQuery('.time-picker').timepicker({ 'timeFormat': 'H:i' });
230
-
231
- },
232
- error: function(request, status, err) {
233
- alert(status);
234
- }
235
- });
236
jQuery(".wrap").fadeIn(500, function(){
237
});
238
});
@@ -324,7 +324,7 @@ jQuery(document).ready(function ($) {
324
325
jQuery('#lp-change-template-button').live('click', function () {
326
jQuery(".wrap").fadeOut(500,function(){
327
- jQuery('#templates-container').isotope();
328
jQuery(".lp-template-selector-container").fadeIn(500, function(){
329
jQuery(".currently_selected").show();
330
jQuery('#lp-cancel-selection').show();
@@ -474,7 +474,7 @@ jQuery(document).ready(function ($) {
474
*/
475
476
477
- // SAVE META
478
var nonce_val = lp_post_edit_ui.wp_landing_page_meta_nonce; // NEED CORRECT NONCE
479
jQuery(document).on('mousedown', '.new-save-lp', function () {
480
var type_input = jQuery(this).parent().find("input").attr("type");
1
jQuery(document).ready(function ($) {
2
3
+
4
// Isotope Styling
5
jQuery('#template-filter li').first().addClass('button-primary');
6
+ // filter items when filter link is clicked
7
+ jQuery('#template-filter a').click(function(){
8
+ var selector = jQuery(this).attr('data-filter');
9
+ jQuery("ul#template-filter li").removeClass('button-primary');
10
jQuery(this).parent().addClass('button-primary');
11
+
12
+ return false;
13
+ });
14
+
15
+ /* Ajax loading tabs
16
+ jQuery.koolSwap({
17
+ swapBox : '#poststuff',
18
+ outDuration : 550,
19
+ inDuration : 600,
20
+ });
21
+ */
22
+
23
+ jQuery("body").on('click', '#content-tmce, .wp-switch-editor.switch-tmce', function () {
24
+ $.cookie("lp-edit-view-choice", "editor", { path: '/', expires: 7 });
25
+ });
26
+
27
+ jQuery("body").on('click', '#content-html, .wp-switch-editor.switch-html', function () {
28
+ $.cookie("lp-edit-view-choice", "html", { path: '/', expires: 7 });
29
+ });
30
+
31
+ var which_editor = $.cookie("lp-edit-view-choice");
32
+ if(which_editor === null){
33
+ setTimeout(function() {
34
+ //jQuery("#content-tmce").click();
35
+ //jQuery(".wp-switch-editor.switch-tmce").click();
36
+ }, 1000);
37
+
38
+ }
39
/*
40
41
var chtml= jQuery('#content-html');
46
switchEditors.switchto(ctmce[0]); // switch to tinymce
47
48
*/
49
+ if(which_editor === 'editor'){
50
+ setTimeout(function() {
51
52
var ctmce= jQuery('#content-tmce');
53
switchEditors.switchto(ctmce[0]); // switch to tinymce
54
55
var conversion_area = jQuery("#landing-page-myeditor-tmce");
56
switchEditors.switchto(conversion_area[0]); // switch to tinymce
57
+ //jQuery("#content-tmce").click();
58
+ //jQuery(".wp-switch-editor.switch-tmce").click();
59
jQuery('.inbound-wysiwyg-option textarea').each(function(){
60
var chtml= "#" + jQuery(this).attr('id') + '-html';
61
var ctmce= "#" + jQuery(this).attr('id') + '-tmce';
63
var tinymce_box = jQuery(ctmce);
64
switchEditors.switchto(tinymce_box[0]); // switch to tinymce
65
});
66
+ }, 1000);
67
+ }
68
69
/* Tour Start JS */
70
var tourbutton = '<a class="" id="lp-tour" style="font-size:13px;">Need help? Take the tour</a>';
90
// Fix inactivate theme display
91
jQuery("#template-box a").live('click', function () {
92
93
+ setTimeout(function() {
94
+ jQuery('#TB_window iframe').contents().find("#customize-controls").hide();
95
+ jQuery('#TB_window iframe').contents().find(".wp-full-overlay.expanded").css("margin-left", "0px");
96
+ }, 600);
97
98
});
99
177
jQuery('.lp_select_template').click(function(){
178
var template = jQuery(this).attr('id');
179
var label = jQuery(this).attr('label');
180
+ var selected_template_id = "#" + template;
181
+ var currentlabel = jQuery(".currently_selected").show();
182
+ var current_template = jQuery("input#lp_select_template ").val();
183
var current_template_meta = "#lp_" + current_template + "_custom_meta_box";
184
var current_template_h3 = "#lp_" + current_template + "_custom_meta_box h3";
185
var current_template_div = "#lp_" + current_template + "_custom_meta_box .handlediv";
186
var open_variation = jQuery("#open_variation").val();
187
188
+ if (open_variation>0)
189
+ {
190
+ var variation_tag = "-"+open_variation;
191
+ }
192
+ else
193
+ {
194
+ var variation_tag = "";
195
+ }
196
197
+ jQuery("#template-box.default_template_highlight").removeClass("default_template_highlight");
198
199
jQuery(selected_template_id).parent().addClass("default_template_highlight").prepend(currentlabel);
200
201
+ jQuery(".lp-template-selector-container").fadeOut(500,function(){
202
+ jQuery('#lp_metabox_select_template input').remove();
203
+ jQuery('#lp_metabox_select_template .form-table').remove();
204
+
205
+ var ajax_data = {
206
+ action: 'lp_get_template_meta',
207
+ selected_template: template,
208
+ post_id: lp_post_edit_ui.post_id,
209
+ };
210
+
211
+ jQuery.ajax({
212
+ type: "POST",
213
+ url: lp_post_edit_ui.ajaxurl,
214
+ data: ajax_data,
215
+ dataType: 'html',
216
+ timeout: 7000,
217
+ success: function (response) {
218
+ //alert(response);
219
+ var html = '<input id="lp_select_template" type="hidden" value="'+template+'" name="lp-selected-template'+variation_tag+'">'
220
+ + '<input type="hidden" value="'+lp_post_edit_ui.lp_template_nonce+'" name="lp_lp_custom_fields_nonce">'
221
+ + '<h3 class="hndle" style="cursor: default;">'
222
+ + '<span>'
223
+ + '<small>'+ template +' Options:</small>'
224
+ + '</span>'
225
+ + '</h3>'
226
+ + response;
227
+
228
+ jQuery('#lp_metabox_select_template #template-display-options').html(html);
229
+ jQuery('.time-picker').timepicker({ 'timeFormat': 'H:i' });
230
+
231
+ },
232
+ error: function(request, status, err) {
233
+ alert(status);
234
+ }
235
+ });
236
jQuery(".wrap").fadeIn(500, function(){
237
});
238
});
324
325
jQuery('#lp-change-template-button').live('click', function () {
326
jQuery(".wrap").fadeOut(500,function(){
327
+
328
jQuery(".lp-template-selector-container").fadeIn(500, function(){
329
jQuery(".currently_selected").show();
330
jQuery('#lp-cancel-selection').show();
474
*/
475
476
477
+ // SAVE META
478
var nonce_val = lp_post_edit_ui.wp_landing_page_meta_nonce; // NEED CORRECT NONCE
479
jQuery(document).on('mousedown', '.new-save-lp', function () {
480
var type_input = jQuery(this).parent().find("input").attr("type");
js/admin/admin.post-new.js CHANGED
@@ -8,7 +8,7 @@ jQuery(document).ready(function ($) {
8
});
9
10
jQuery("#submitdiv").siblings().hide();
11
- jQuery('#templates-container').isotope();
12
jQuery("#title-prompt-text").text("Name Your New Landing Page");
13
14
var titledescription = jQuery("<span id='descriptor'>This will be the administrative title your landing page, the main headline is created in the next step</span>");
@@ -52,7 +52,7 @@ jQuery(document).ready(function ($) {
52
53
jQuery('#lp-change-template-button').live('click', function () {
54
jQuery(".wrap").fadeOut(500,function(){
55
- jQuery('#templates-container').isotope();
56
jQuery(".lp-template-selector-container").fadeIn(500, function(){
57
jQuery('#lp-cancel-selection').show();
58
});
@@ -65,7 +65,7 @@ jQuery(document).ready(function ($) {
65
var selector = jQuery(this).attr('data-filter');
66
jQuery("ul#template-filter li").removeClass('button-primary');
67
jQuery(this).parent().addClass('button-primary');
68
- jQuery('#templates-container').isotope({ filter: selector });
69
return false;
70
});
71
8
});
9
10
jQuery("#submitdiv").siblings().hide();
11
+
12
jQuery("#title-prompt-text").text("Name Your New Landing Page");
13
14
var titledescription = jQuery("<span id='descriptor'>This will be the administrative title your landing page, the main headline is created in the next step</span>");
52
53
jQuery('#lp-change-template-button').live('click', function () {
54
jQuery(".wrap").fadeOut(500,function(){
55
+
56
jQuery(".lp-template-selector-container").fadeIn(500, function(){
57
jQuery('#lp-cancel-selection').show();
58
});
65
var selector = jQuery(this).attr('data-filter');
66
jQuery("ul#template-filter li").removeClass('button-primary');
67
jQuery(this).parent().addClass('button-primary');
68
+
69
return false;
70
});
71
js/libraries/isotope/css/style.css DELETED
@@ -1,752 +0,0 @@
1
-
2
- /**** Isotope Filtering ****/
3
-
4
- .isotope-item {
5
- z-index: 2;
6
- }
7
-
8
- .isotope-hidden.isotope-item {
9
- pointer-events: none;
10
- z-index: 1;
11
- }
12
-
13
- /**** Isotope CSS3 transitions ****/
14
-
15
- .isotope,
16
- .isotope .isotope-item {
17
- -webkit-transition-duration: 0.8s;
18
- -moz-transition-duration: 0.8s;
19
- -ms-transition-duration: 0.8s;
20
- -o-transition-duration: 0.8s;
21
- transition-duration: 0.8s;
22
- }
23
-
24
- .isotope {
25
- -webkit-transition-property: height, width;
26
- -moz-transition-property: height, width;
27
- -ms-transition-property: height, width;
28
- -o-transition-property: height, width;
29
- transition-property: height, width;
30
- }
31
-
32
- .isotope .isotope-item {
33
- -webkit-transition-property: -webkit-transform, opacity;
34
- -moz-transition-property: -moz-transform, opacity;
35
- -ms-transition-property: -ms-transform, opacity;
36
- -o-transition-property: -o-transform, opacity;
37
- transition-property: transform, opacity;
38
- }
39
-
40
- /**** disabling Isotope CSS3 transitions ****/
41
-
42
- .isotope.no-transition,
43
- .isotope.no-transition .isotope-item,
44
- .isotope .isotope-item.no-transition {
45
- -webkit-transition-duration: 0s;
46
- -moz-transition-duration: 0s;
47
- -ms-transition-duration: 0s;
48
- -o-transition-duration: 0s;
49
- transition-duration: 0s;
50
- }
51
-
52
- /* End: Recommended Isotope styles */
53
-
54
-
55
-
56
- /* disable CSS transitions for containers with infinite scrolling*/
57
- .isotope.infinite-scrolling {
58
- -webkit-transition: none;
59
- -moz-transition: none;
60
- -ms-transition: none;
61
- -o-transition: none;
62
- transition: none;
63
- }
64
-
65
-
66
- /**** Base styles ****/
67
-
68
-
69
-
70
- #container {
71
- border: 1px solid #666;
72
- padding: 5px;
73
- margin-bottom: 20px;
74
- }
75
-
76
- .element {
77
- width: 110px;
78
- height: 110px;
79
- margin: 5px;
80
- float: left;
81
- overflow: hidden;
82
- position: relative;
83
- background: #888;
84
- color: #222;
85
- -webkit-border-top-right-radius: 1.2em;
86
- -moz-border-radius-topright: 1.2em;
87
- border-top-right-radius: 1.2em;
88
- }
89
-
90
- .element.alkali { background: #F00; background: hsl( 0, 100%, 50%); }
91
- .element.alkaline-earth { background: #F80; background: hsl( 36, 100%, 50%); }
92
- .element.lanthanoid { background: #FF0; background: hsl( 72, 100%, 50%); }
93
- .element.actinoid { background: #0F0; background: hsl( 108, 100%, 50%); }
94
- .element.transition { background: #0F8; background: hsl( 144, 100%, 50%); }
95
- .element.post-transition { background: #0FF; background: hsl( 180, 100%, 50%); }
96
- .element.metalloid { background: #08F; background: hsl( 216, 100%, 50%); }
97
- .element.other.nonmetal { background: #00F; background: hsl( 252, 100%, 50%); }
98
- .element.halogen { background: #F0F; background: hsl( 288, 100%, 50%); }
99
- .element.noble-gas { background: #F08; background: hsl( 324, 100%, 50%); }
100
-
101
-
102
- .element * {
103
- position: absolute;
104
- margin: 0;
105
- }
106
-
107
- .element .symbol {
108
- left: 0.2em;
109
- top: 0.4em;
110
- font-size: 3.8em;
111
- line-height: 1.0em;
112
- color: #FFF;
113
- }
114
- .element.large .symbol {
115
- font-size: 4.5em;
116
- }
117
-
118
- .element.fake .symbol {
119
- color: #000;
120
- }
121
-
122
- .element .name {
123
- left: 0.5em;
124
- bottom: 1.6em;
125
- font-size: 1.05em;
126
- }
127
-
128
- .element .weight {
129
- font-size: 0.9em;
130
- left: 0.5em;
131
- bottom: 0.5em;
132
- }
133
-
134
- .element .number {
135
- font-size: 1.25em;
136
- font-weight: bold;
137
- color: hsla(0,0%,0%,.5);
138
- right: 0.5em;
139
- top: 0.5em;
140
- }
141
-
142
- .variable-sizes .element.width2 { width: 230px; }
143
-
144
- .variable-sizes .element.height2 { height: 230px; }
145
-
146
- .variable-sizes .element.width2.height2 {
147
- font-size: 2.0em;
148
- }
149
-
150
- .element.large,
151
- .variable-sizes .element.large,
152
- .variable-sizes .element.large.width2.height2 {
153
- font-size: 3.0em;
154
- width: 350px;
155
- height: 350px;
156
- z-index: 100;
157
- }
158
-
159
- .clickable .element:hover {
160
- cursor: pointer;
161
- }
162
-
163
- .clickable .element:hover h3 {
164
- text-shadow:
165
- 0 0 10px white,
166
- 0 0 10px white
167
- ;
168
- }
169
-
170
- .clickable .element:hover h2 {
171
- color: white;
172
- }
173
-
174
- /**** Example Options ****/
175
-
176
- #options {
177
- padding-bottom: 1.0em;
178
- }
179
-
180
- #options h3 {
181
- margin-bottom: 0.2em;
182
- font-size: 15px;
183
- }
184
-
185
- #options h4 {
186
- font-weight: bold;
187
- }
188
-
189
- #options ul {
190
- margin: 0;
191
- list-style: none;
192
- }
193
-
194
- #options ul ul {
195
- margin-left: 1.5em;
196
- }
197
-
198
- #options li {
199
- float: left;
200
- margin-bottom: 0.2em;
201
- }
202
-
203
- #options li a {
204
- display: block;
205
- padding: 0.4em 0.5em;
206
- background-color: #DDD;
207
- color: #222;
208
- font-weight: bold;
209
- text-shadow: 0 1px hsla( 0, 0%, 100%, 0.5 );
210
- background-image: -webkit-linear-gradient( top, hsla( 0, 0%, 100%, 0.5 ), hsla( 0, 0%, 100%, 0.0 ) );
211
- background-image: -moz-linear-gradient( top, hsla( 0, 0%, 100%, 0.5 ), hsla( 0, 0%, 100%, 0.0 ) );
212
- background-image: -ms-linear-gradient( top, hsla( 0, 0%, 100%, 0.5 ), hsla( 0, 0%, 100%, 0.0 ) );
213
- background-image: -o-linear-gradient( top, hsla( 0, 0%, 100%, 0.5 ), hsla( 0, 0%, 100%, 0.0 ) );
214
- background-image: linear-gradient( top, hsla( 0, 0%, 100%, 0.5 ), hsla( 0, 0%, 100%, 0.0 ) );
215
- }
216
-
217
- #options li a:hover {
218
- background-color: #5BF;
219
- }
220
-
221
- #options li a:active {
222
- background-color: #39D;
223
- -webkit-box-shadow: inset 0 2px 8px hsla( 0, 0%, 0%, 0.6 );
224
- -moz-box-shadow: inset 0 2px 8px hsla( 0, 0%, 0%, 0.6 );
225
- -o-box-shadow: inset 0 2px 8px hsla( 0, 0%, 0%, 0.6 );
226
- box-shadow: inset 0 2px 8px hsla( 0, 0%, 0%, 0.6 );
227
- }
228
-
229
- #options li a {
230
- border-left: 1px solid hsla( 0, 0%, 100%, 0.3 );
231
- border-right: 1px solid hsla( 0, 0%, 0%, 0.2 );
232
- }
233
-
234
- #options li:first-child a {
235
- border-radius: 7px 0 0 7px;
236
- border-left: none;
237
- }
238
-
239
- #options li:last-child a {
240
- border-radius: 0 7px 7px 0;
241
- }
242
-
243
- #options li a.selected {
244
- background-color: #13F;
245
- text-shadow: none;
246
- color: white;
247
- }
248
-
249
- /* Combination filter options*/
250
-
251
- #options .option-combo {
252
- display: inline-block;
253
- float: left;
254
- margin-right: 10px;
255
- }
256
-
257
- #options .option-combo ul {
258
- margin-right: 20px;
259
- display: inline-block;
260
- }
261
-
262
- #options .option-combo h2,
263
- #options .option-combo h4 {
264
- line-height: 34px;
265
- margin-bottom: 0;
266
- margin-right: 5px;
267
- display: inline-block;
268
- vertical-align: top;
269
- }
270
-
271
- /* Color shapes */
272
-
273
- .color-shape {
274
- width: 70px;
275
- height: 70px;
276
- margin: 5px;
277
- float: left;
278
- }
279
-
280
- .color-shape.round {
281
- -webkit-border-radius: 35px;
282
- -moz-border-radius: 35px;
283
- border-radius: 35px;
284
- }
285
-
286
- .color-shape.big.round {
287
- -webkit-border-radius: 75px;
288
- -moz-border-radius: 75px;
289
- border-radius: 75px;
290
- }
291
-
292
- .color-shape.red { background: red; }
293
- .color-shape.blue { background: blue; }
294
- .color-shape.yellow { background: yellow; }
295
-
296
- .color-shape.wide, .color-shape.big { width: 150px; }
297
- .color-shape.tall, .color-shape.big { height: 150px; }
298
-
299
- .color-shape a {
300
- display: block;
301
- height: 100%;
302
- }
303
-
304
- .color-shape a:hover {
305
- background: white;
306
- background: hsla( 0, 0%, 100%, 0.5 );
307
- }
308
-
309
- /**** Horizontal ****/
310
-
311
- .horizontal #container {
312
- height: 80%;
313
- }
314
-
315
- #copy {
316
- max-width: 640px;
317
- }
318
-
319
- /**** Photo demo ****/
320
-
321
- .photos .photo {
322
- width: 320px;
323
- margin: 5px;
324
- float: left;
325
- }
326
-
327
- .photos .photo img {
328
- display: block;
329
- width: 100%;
330
- }
331
-
332
-
333
- .demos #content {
334
- height: 100%;
335
- }
336
-
337
- /**** Docs ****/
338
-
339
- .docs #content {
340
- max-width: 640px;
341
- }
342
-
343
- .docs #content a:hover {
344
- border-bottom: 1px dotted;
345
- }
346
-
347
- /**** Doc page nav ****/
348
-
349
-
350
-
351
- #site-nav {
352
- width: 200px;
353
- position: absolute;
354
- left: 10px;
355
- top: 0px;
356
- padding-top: 20px;
357
- font-size: 12px;
358
- }
359
-
360
- #site-nav h1 {
361
- font-size: 24px;
362
- margin-bottom: 0.5em;
363
- margin-top: 0;
364
- font-weight: bold;
365
- font-family: 'Helvetica Neue', Arial, sans-serif;
366
- }
367
-
368
- #site-nav h2 {
369
- font-size: 17px;
370
- font-weight: normal;
371
- margin: 0 0 0.3em;
372
- border-top: none;
373
- }
374
-
375
- #site-nav h1 a { color: #4FB; }
376
- #site-nav h1 a:hover { color: #4BF; }
377
-
378
- #site-nav ul {
379
- list-style: none;
380
- margin: 0 0 1.0em;
381
- font-weight: bold;
382
- }
383
-
384
- #site-nav ul ul { margin-bottom: 0; }
385
-
386
- #site-nav ul a {
387
- display: block;
388
- border: none;
389
- padding: 1px 5px;
390
- }
391
-
392
- #site-nav ul .current a {
393
- background: hsla( 0, 0%, 0%, 0.3 );
394
- color: #1BF;
395
- }
396
- #site-nav ul a:hover,
397
- #site-nav ul .current a:hover { color: white; }
398
-
399
- #site-nav ul .current .toc a {
400
- font-size: 12px;
401
- padding-left: 1.2em;
402
- font-weight: normal;
403
- }
404
-
405
-
406
-
407
-
408
- footer {
409
- font-size: 12px;
410
- font-style: italic;
411
- border-top: 1px solid #333;
412
- padding: 0.8em 0;
413
- }
414
-
415
- pre {
416
- padding: 10px;
417
- }
418
-
419
- pre, code {
420
- background: black;
421
- color: white;
422
- font-family: 'Monaco', monospace, sans-serif;
423
- }
424
-
425
- #content code {
426
- font-size: 12px;
427
- }
428
-
429
- #content pre {
430
- line-height: 1.6em;
431
- }
432
-
433
- h3#options {
434
- padding-bottom: 0;
435
- }
436
-
437
- .option-def dl dt,
438
- .option-def dl dd {
439
- float: left;
440
- padding: 0 1.2em;;
441
- background: #161616;
442
- line-height: 36px;
443
- height: 36px;
444
- }
445
-
446
- .option-def dl.header dt,
447
- .option-def dl.header dd {
448
- background: #444;
449
- }
450
-
451
- .option-def dl .option-type {
452
- font-size: 13px;
453
- color: #AAA;
454
- font-style: italic;
455
- }
456
-
457
- .option-def dl dd {
458
- border-left: 1px solid #222;
459
- }
460
-
461
- /* Tagline */
462
-
463
- .docs .tagline {
464
- font-size: 22px;
465
- font-weight: 300;
466
- }
467
-
468
- /* as-is from MIT */
469
-
470
- .docs .as-is {
471
- font-size: 95%;
472
- }
473
-
474
- /* Commercial license blurb */
475
-
476
- .docs #commercial {
477
- background: white;
478
- padding: 10px;
479
- font-size: 14px;
480
- color: #1F1F1D;
481
- }
482
-
483
- .docs #commercial a { font-weight: bold;}
484
-
485
- /**** Pygments ****/
486
-
487
- code .s1,
488
- code .s { color: #78BD55; } /* string */
489
- code .mi, /* integer */
490
- code .cp, /* doctype */
491
- code .kc { color: #5298D4; } /*boolean*/
492
- code .k { color: #E39B79; } /* keyword */
493
- code .kd, /* storage */
494
- code .na { color: #A9D866; } /* markup attribute */
495
- code .p { color: #EDB; } /* punctuation */
496
- code .o { color: #F63; } /* operator */
497
- code .nb { color: #AA97AC;} /* support */
498
-
499
- /* comment */
500
- code .c,
501
- code .c1 { color: #666; font-style: italic; }
502
-
503
- code .nt { color: #A0C8FC; } /* Markup open tag */
504
-
505
- code .nf { color: #9EA8B8; } /* css id */
506
- code .nc { color: #A78352; } /* CSS class */
507
- code .m { color: #DE8E50; } /* CSS value */
508
- code .nd { color: #9FAD7E; } /* CSS pseudo selector */
509
-
510
-
511
-
512
- /**** Super list ****/
513
-
514
-
515
- /**** Sites using Isotope ****/
516
-
517
- #sites h2 {
518
- display: none;
519
- padding: 0.4em;
520
- line-height: 32px;
521
- margin-bottom: 0.4em;
522
- -webkit-transition: background-color 0.8s;
523
- -moz-transition: background-color 0.8s;
524
- -o-transition: background-color 0.8s;
525
- transition: background-color 0.8s;
526
- }
527
-
528
- #sites h2 img {
529
- display: inline-block;
530
- margin-right: 0.4em;
531
- vertical-align: bottom;
532
- }
533
-
534
- #sites h2.loading {
535
- background: white;
536
- color: #222;
537
- }
538
- #sites h2.error {
539
- background: red;
540
- color: #222;
541
- }
542
-
543
-
544
- #sites ul {
545
- margin: 0;
546
- }
547
-
548
- .super-list .example {
549
- list-style: none;
550
- float: left;
551
- width: 230px;
552
- margin: 5px;
553
- }
554
-
555
- .super-list .example a,
556
- .super-list .example b,
557
- .super-list .example img {
558
- display: block;
559
- }
560
-
561
- .super-list .example img { width: 100%; }
562
-
563
- .super-list .example a {
564
- background: #1F1E1D;
565
- }
566
-
567
- .super-list .example a:hover {
568
- background: white;
569
- color: #111;
570
- }
571
-
572
- .super-list .example b {
573
- font-weight: bold;
574
- line-height: 1.3em;
575
- padding: 3px;
576
- padding-top: 8px;
577
- }
578
-
579
- .super-list .link {
580
- float: left;
581
- position: relative;
582
- font-size: 24px;
583
- line-height: 1.2em;
584
- font-weight: 300;
585
- margin: 5px;
586
- }
587
-
588
- .super-list .link {
589
- width: 230px;
590
- height: 110px;
591
- }
592
-
593
- .super-list .link a {
594
- display: block;
595
- padding: 10px;
596
- padding-left: 65px;
597
- height: 90px;
598
- background: #1F1E1D;
599
- color: #FE5;
600
- -webkit-border-radius: 14px;
601
- -moz-border-radius: 14px;
602
- border-radius: 14px;
603
- }
604
-
605
- .super-list .link a:before {
606
- content: '➔';
607
- font-size: 70px;
608
- position: absolute;
609
- top: 30px;
610
- left: 5px;
611
- -webkit-transform: rotate(90deg);
612
- -moz-transform: rotate(90deg);
613
- -ms-transform: rotate(90deg);
614
- -o-transform: rotate(90deg);
615
- transform: rotate(90deg);
616
- }
617
-
618
- .super-list .link.away a:before {
619
- top: 25px;
620
- left: 0px;
621
- -webkit-transform: rotate(-45deg);
622
- -moz-transform: rotate(-45deg);
623
- -ms-transform: rotate(-45deg);
624
- -o-transform: rotate(-45deg);
625
- transform: rotate(-45deg);
626
- }
627
-
628
- .super-list .link a:hover {
629
- background: #E58;
630
- color: white;
631
- }
632
-
633
- .super-list .feature .name {
634
- bottom: auto;
635
- top: 140px;
636
- left: 18px;
637
- font-size: 20px;
638
- }
639
-
640
- /**** BIG Graph ****/
641
-
642
- .big-graph {
643
- background: white;
644
- height: 600px;
645
- margin: 20px auto;
646
- }
647
-
648
- .big-graph .project {
649
- width: 45px;
650
- height: 45px;
651
- float: left;
652
- }
653
-
654
- .big-graph .project .icon {
655
- pointer-events: none;
656
- width: 31px;
657
- height: 31px;
658
- background: white;
659
- margin-left: 7px;
660
- -webkit-transition: -webkit-transform 0.25s;
661
- -moz-transition: -moz-transform 0.25s;
662
- -ms-transition: -ms-transform 0.25s;
663
- -o-transition: -o-transform 0.25s;
664
- transition: transform 0.25s;
665
- }
666
-
667
- .big-graph .project:hover {
668
- z-index: 5;
669
-
670
- }
671
-
672
- .big-graph .project:hover .icon {
673
- -webkit-transform: scale(3);
674
- -moz-transform: scale(3);
675
- -ms-transform: scale(3);
676
- -o-transform: scale(3);
677
- transform: scale(3);
678
- }
679
-
680
- .big-graph .project.commercial .icon { background: #6B6B6B; }
681
- .big-graph .project.urbanism .icon { background: #00CF00; }
682
- .big-graph .project.public-space .icon { background: #FF8D00; }
683
- .big-graph .project.culture .icon { background: #D61919; }
684
- .big-graph .project.body-culture .icon { background: #00ECFF; }
685
- .big-graph .project.health .icon { background: #FF2251; }
686
- .big-graph .project.education .icon { background: #00A700; }
687
- .big-graph .project.housing .icon { background: #FF02FF; }
688
- .big-graph .project.hotel .icon { background: #0000C3; }
689
- .big-graph .project.media .icon { background: #292929; }
690
-
691
- .big-graph .project p {
692
- line-height: 14px;
693
- font-size: 10.5px;
694
- color: black;
695
- margin-left: 7px;
696
- }
697
-
698
- /**** Infinite Scroll ****/
699
-
700
- #infscr-loading {
701
- position: fixed;
702
- text-align: center;
703
- bottom: 30px;
704
- left: 42%;
705
- z-index: 100;
706
- background: white;
707
- background: hsla( 0, 0%, 100%, 0.9 );
708
- padding: 20px;
709
- color: #222;
710
- font-size: 15px;
711
- font-weight: bold;
712
- -webkit-border-radius: 10px;
713
- -moz-border-radius: 10px;
714
- border-radius: 10px;
715
- }
716
-
717
-
718
-
719
- /* The Magnificent Clearfix: nicolasgallagher.com/micro-clearfix-hack/ */
720
- .clearfix:before, .clearfix:after { content: ""; display: table; }
721
- .clearfix:after { clear: both; }
722
- .clearfix { zoom: 1; }
723
-
724
- .template-thumbnail
725
- {
726
- width:100%;
727
- height:190px;
728
- -webkit-border-radius: 4px;
729
- -khtml-border-radius: 4px;
730
- -moz-border-radius: 4px;
731
- border-radius: 4px;
732
- background-color: #A9A9A9;
733
- -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px,rgba(0, 0, 0, 0.3) 0 2px 5px;
734
- -moz-box-shadow: rgba(0,0,0,0.2) 0 0 0 1px,rgba(0,0,0,0.3) 0 2px 5px;
735
- box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px,rgba(0, 0, 0, 0.3) 0 2px 5px;
736
- }
737
-
738
- ul#template-filter{ margin: 0px 0; padding: 0; padding-left: 0px; line-height: 64px; }
739
- ul#template-filter li{ display: inline; }
740
- ul#template-filter a{ margin-right: 0.5em; padding: 0em 1em; font-weight: bold; text-decoration: none; }
741
- ul#template-filter .button-primary a:hover { color:#fff;}
742
- ul#template-filter a.current{ background-color: #DDD; }
743
-
744
- #template-item{ float: left; margin-right: 18px; overflow: hidden; margin: 0px 0 0 0; padding: 0; list-style: none; width: 300px; margin-bottom: 10px; }
745
- #template-item div{ display: block; }
746
- /* #template-item div a{ display: block; width: 163px; height: 120px; overflow: hidden; border: 1px solid #CDCDCD; background: #eee; }*/
747
- #template-item li p{ font-size: 11px; line-height: 15px; color: #AAA; margin: 5px 0; }
748
- #template-box .lp_tooltip_templates{
749
- bottom: 6px;
750
- position: absolute;
751
- right: 8px;
752
- }
js/libraries/isotope/jquery.isotope.js DELETED
@@ -1,1406 +0,0 @@
1
- /**
2
- * Isotope v1.5.23
3
- * An exquisite jQuery plugin for magical layouts
4
- * http://isotope.metafizzy.co
5
- *
6
- * Commercial use requires one-time license fee
7
- * http://metafizzy.co/#licenses
8
- *
9
- * Copyright 2012 David DeSandro / Metafizzy
10
- */
11
-
12
- /*jshint asi: true, browser: true, curly: true, eqeqeq: true, forin: false, immed: false, newcap: true, noempty: true, strict: true, undef: true */
13
- /*global jQuery: false */
14
-
15
- (function( window, $, undefined ){
16
-
17
- 'use strict';
18
-
19
- // get global vars
20
- var document = window.document;
21
- var Modernizr = window.Modernizr;
22
-
23
- // helper function
24
- var capitalize = function( str ) {
25
- return str.charAt(0).toUpperCase() + str.slice(1);
26
- };
27
-
28
- // ========================= getStyleProperty by kangax ===============================
29
- // http://perfectionkills.com/feature-testing-css-properties/
30
-
31
- var prefixes = 'Moz Webkit O Ms'.split(' ');
32
-
33
- var getStyleProperty = function( propName ) {
34
- var style = document.documentElement.style,
35
- prefixed;
36
-
37
- // test standard property first
38
- if ( typeof style[propName] === 'string' ) {
39
- return propName;
40
- }
41
-
42
- // capitalize
43
- propName = capitalize( propName );
44
-
45
- // test vendor specific properties
46
- for ( var i=0, len = prefixes.length; i < len; i++ ) {
47
- prefixed = prefixes[i] + propName;
48
- if ( typeof style[ prefixed ] === 'string' ) {
49
- return prefixed;
50
- }
51
- }
52
- };
53
-
54
- var transformProp = getStyleProperty('transform'),
55
- transitionProp = getStyleProperty('transitionProperty');
56
-
57
-
58
- // ========================= miniModernizr ===============================
59
- // <3<3<3 and thanks to Faruk and Paul for doing the heavy lifting
60
-
61
- /*!
62
- * Modernizr v1.6ish: miniModernizr for Isotope
63
- * http://www.modernizr.com
64
- *
65
- * Developed by:
66
- * - Faruk Ates http://farukat.es/
67
- * - Paul Irish http://paulirish.com/
68
- *
69
- * Copyright (c) 2009-2010
70
- * Dual-licensed under the BSD or MIT licenses.
71
- * http://www.modernizr.com/license/
72
- */
73
-
74
- /*
75
- * This version whittles down the script just to check support for
76
- * CSS transitions, transforms, and 3D transforms.
77
- */
78
-
79
- var tests = {
80
- csstransforms: function() {
81
- return !!transformProp;
82
- },
83
-
84
- csstransforms3d: function() {
85
- var test = !!getStyleProperty('perspective');
86
- // double check for Chrome's false positive
87
- if ( test ) {
88
- var vendorCSSPrefixes = ' -o- -moz- -ms- -webkit- -khtml- '.split(' '),
89
- mediaQuery = '@media (' + vendorCSSPrefixes.join('transform-3d),(') + 'modernizr)',
90
- $style = $('<style>' + mediaQuery + '{#modernizr{height:3px}}' + '</style>')
91
- .appendTo('head'),
92
- $div = $('<div id="modernizr" />').appendTo('html');
93
-
94
- test = $div.height() === 3;
95
-
96
- $div.remove();
97
- $style.remove();
98
- }
99
- return test;
100
- },
101
-
102
- csstransitions: function() {
103
- return !!transitionProp;
104
- }
105
- };
106
-
107
- var testName;
108
-
109
- if ( Modernizr ) {
110
- // if there's a previous Modernzir, check if there are necessary tests
111
- for ( testName in tests) {
112
- if ( !Modernizr.hasOwnProperty( testName ) ) {
113
- // if test hasn't been run, use addTest to run it
114
- Modernizr.addTest( testName, tests[ testName ] );
115
- }
116
- }
117
- } else {
118
- // or create new mini Modernizr that just has the 3 tests
119
- Modernizr = window.Modernizr = {
120
- _version : '1.6ish: miniModernizr for Isotope'
121
- };
122
-
123
- var classes = ' ';
124
- var result;
125
-
126
- // Run through tests
127
- for ( testName in tests) {
128
- result = tests[ testName ]();
129
- Modernizr[ testName ] = result;
130
- classes += ' ' + ( result ? '' : 'no-' ) + testName;
131
- }
132
-
133
- // Add the new classes to the <html> element.
134
- $('html').addClass( classes );
135
- }
136
-
137
-
138
- // ========================= isoTransform ===============================
139
-
140
- /**
141
- * provides hooks for .css({ scale: value, translate: [x, y] })
142
- * Progressively enhanced CSS transforms
143
- * Uses hardware accelerated 3D transforms for Safari
144
- * or falls back to 2D transforms.
145
- */
146
-
147
- if ( Modernizr.csstransforms ) {
148
-
149
- // i.e. transformFnNotations.scale(0.5) >> 'scale3d( 0.5, 0.5, 1)'
150
- var transformFnNotations = Modernizr.csstransforms3d ?
151
- { // 3D transform functions
152
- translate : function ( position ) {
153
- return 'translate3d(' + position[0] + 'px, ' + position[1] + 'px, 0) ';
154
- },
155
- scale : function ( scale ) {
156
- return 'scale3d(' + scale + ', ' + scale + ', 1) ';
157
- }
158
- } :
159
- { // 2D transform functions
160
- translate : function ( position ) {
161
- return 'translate(' + position[0] + 'px, ' + position[1] + 'px) ';
162
- },
163
- scale : function ( scale ) {
164
- return 'scale(' + scale + ') ';
165
- }
166
- }
167
- ;
168
-
169
- var setIsoTransform = function ( elem, name, value ) {
170
- // unpack current transform data
171
- var data = jQuery.data( elem, 'isoTransform' ) || {},
172
- newData = {},
173
- fnName,
174
- transformObj = {},
175
- transformValue;
176
-
177
- // i.e. newData.scale = 0.5
178
- newData[ name ] = value;
179
- // extend new value over current data
180
- jQuery.extend( data, newData );
181
-
182
- for ( fnName in data ) {
183
- transformValue = data[ fnName ];
184
- transformObj[ fnName ] = transformFnNotations[ fnName ]( transformValue );
185
- }
186
-
187
- // get proper order
188
- // ideally, we could loop through this give an array, but since we only have
189
- // a couple transforms we're keeping track of, we'll do it like so
190
- var translateFn = transformObj.translate || '',
191
- scaleFn = transformObj.scale || '',
192
- // sorting so translate always comes first
193
- valueFns = translateFn + scaleFn;
194
-
195
- // set data back in elem
196
- jQuery.data( elem, 'isoTransform', data );
197
-
198
- // set name to vendor specific property
199
- elem.style[ transformProp ] = valueFns;
200
- };
201
-
202
- // ==================== scale ===================
203
-
204
- jQuery.cssNumber.scale = true;
205
-
206
- jQuery.cssHooks.scale = {
207
- set: function( elem, value ) {
208
- // uncomment this bit if you want to properly parse strings
209
- // if ( typeof value === 'string' ) {
210
- // value = parseFloat( value );
211
- // }
212
- setIsoTransform( elem, 'scale', value );
213
- },
214
- get: function( elem, computed ) {
215
- var transform = jQuery.data( elem, 'isoTransform' );
216
- return transform && transform.scale ? transform.scale : 1;
217
- }
218
- };
219
-
220
- jQuery.fx.step.scale = function( fx ) {
221
- jQuery.cssHooks.scale.set( fx.elem, fx.now+fx.unit );
222
- };
223
-
224
-
225
- // ==================== translate ===================
226
-
227
- jQuery.cssNumber.translate = true;
228
-
229
- jQuery.cssHooks.translate = {
230
- set: function( elem, value ) {
231
-
232
- // uncomment this bit if you want to properly parse strings
233
- // if ( typeof value === 'string' ) {
234
- // value = value.split(' ');
235
- // }
236
- //
237
- // var i, val;
238
- // for ( i = 0; i < 2; i++ ) {
239
- // val = value[i];
240
- // if ( typeof val === 'string' ) {
241
- // val = parseInt( val );
242
- // }
243
- // }
244
-
245
- setIsoTransform( elem, 'translate', value );
246
- },
247
-
248
- get: function( elem, computed ) {
249
- var transform = jQuery.data( elem, 'isoTransform' );
250
- return transform && transform.translate ? transform.translate : [ 0, 0 ];
251
- }
252
- };
253
-
254
- }
255
-
256
- // ========================= get transition-end event ===============================
257
- var transitionEndEvent, transitionDurProp;
258
-
259
- if ( Modernizr.csstransitions ) {
260
- transitionEndEvent = {
261
- WebkitTransitionProperty: 'webkitTransitionEnd', // webkit
262
- MozTransitionProperty: 'transitionend',
263
- OTransitionProperty: 'oTransitionEnd otransitionend',
264
- transitionProperty: 'transitionend'
265
- }[ transitionProp ];
266
-
267
- transitionDurProp = getStyleProperty('transitionDuration');
268
- }
269
-
270
- // ========================= smartresize ===============================
271
-
272
- /*
273
- * smartresize: debounced resize event for jQuery
274
- *
275
- * latest version and complete README available on Github:
276
- * https://github.com/louisremi/jquery.smartresize.js
277
- *
278
- * Copyright 2011 @louis_remi
279
- * Licensed under the MIT license.
280
- */
281
-
282
- var $event = jQuery.event,
283
- resizeTimeout;
284
-
285
- $event.special.smartresize = {
286
- setup: function() {
287
- $(this).bind( "resize", $event.special.smartresize.handler );
288
- },
289
- teardown: function() {
290
- $(this).unbind( "resize", $event.special.smartresize.handler );
291
- },
292
- handler: function( event, execAsap ) {
293
- // Save the context
294
- var context = this,
295
- args = arguments;
296
-
297
- // set correct event type
298
- event.type = "smartresize";
299
-
300
- if ( resizeTimeout ) { clearTimeout( resizeTimeout ); }
301
- resizeTimeout = setTimeout(function() {
302
- jQuery.event.handle.apply( context, args );
303
- }, execAsap === "execAsap"? 0 : 100 );
304
- }
305
- };
306
-
307
- jQuery.fn.smartresize = function( fn ) {
308
- return fn ? this.bind( "smartresize", fn ) : this.trigger( "smartresize", ["execAsap"] );
309
- };
310
-
311
-
312
-
313
- // ========================= Isotope ===============================
314
-
315
-
316
- // our "Widget" object constructor
317
- jQuery.Isotope = function( options, element, callback ){
318
- this.element = $( element );
319
-
320
- this._create( options );
321
- this._init( callback );
322
- };
323
-
324
- // styles of container element we want to keep track of
325
- var isoContainerStyles = [ 'width', 'height' ];
326
-
327
- var $window = $(window);
328
-
329
- jQuery.Isotope.settings = {
330
- resizable: true,
331
- layoutMode : 'masonry',
332
- containerClass : 'isotope',
333
- itemClass : 'isotope-item',
334
- hiddenClass : 'isotope-hidden',
335
- hiddenStyle: { opacity: 0, scale: 0.001 },
336
- visibleStyle: { opacity: 1, scale: 1 },
337
- containerStyle: {
338
- position: 'relative',
339
- overflow: 'hidden'
340
- },
341
- animationEngine: 'best-available',
342
- animationOptions: {
343
- queue: false,
344
- duration: 800
345
- },
346
- sortBy : 'original-order',
347
- sortAscending : true,
348
- resizesContainer : true,
349
- transformsEnabled: true,
350
- itemPositionDataEnabled: false
351
- };
352
-
353
- jQuery.Isotope.prototype = {
354
-
355
- // sets up widget
356
- _create : function( options ) {
357
-
358
- this.options = jQuery.extend( {}, jQuery.Isotope.settings, options );
359
-
360
- this.styleQueue = [];
361
- this.elemCount = 0;
362
-
363
- // get original styles in case we re-apply them in .destroy()
364
- var elemStyle = this.element[0].style;
365
- this.originalStyle = {};
366
- // keep track of container styles
367
- var containerStyles = isoContainerStyles.slice(0);
368
- for ( var prop in this.options.containerStyle ) {
369
- containerStyles.push( prop );
370
- }
371
- for ( var i=0, len = containerStyles.length; i < len; i++ ) {
372
- prop = containerStyles[i];
373
- this.originalStyle[ prop ] = elemStyle[ prop ] || '';
374
- }
375
- // apply container style from options
376
- this.element.css( this.options.containerStyle );
377
-
378
- this._updateAnimationEngine();
379
- this._updateUsingTransforms();
380
-
381
- // sorting
382
- var originalOrderSorter = {
383
- 'original-order' : function( $elem, instance ) {
384
- instance.elemCount ++;
385
- return instance.elemCount;
386
- },
387
- random : function() {
388
- return Math.random();
389
- }
390
- };
391
-
392
- this.options.getSortData = jQuery.extend( this.options.getSortData, originalOrderSorter );
393
-
394
- // need to get atoms
395
- this.reloadItems();
396
-
397
- // get top left position of where the bricks should be
398
- this.offset = {
399
- left: parseInt( ( this.element.css('padding-left') || 0 ), 10 ),
400
- top: parseInt( ( this.element.css('padding-top') || 0 ), 10 )
401
- };
402
-
403
- // add isotope class first time around
404
- var instance = this;
405
- setTimeout( function() {
406
- instance.element.addClass( instance.options.containerClass );
407
- }, 0 );
408
-
409
- // bind resize method
410
- if ( this.options.resizable ) {
411
- $window.bind( 'smartresize.isotope', function() {
412
- instance.resize();
413
- });
414
- }
415
-
416
- // dismiss all click events from hidden events
417
- this.element.delegate( '.' + this.options.hiddenClass, 'click', function(){
418
- return false;
419
- });
420
-
421
- },
422
-
423
- _getAtoms : function( $elems ) {
424
- var selector = this.options.itemSelector,
425
- // filter & find
426
- $atoms = selector ? $elems.filter( selector ).add( $elems.find( selector ) ) : $elems,
427
- // base style for atoms
428
- atomStyle = { position: 'absolute' };
429
-
430
- // filter out text nodes
431
- $atoms = $atoms.filter( function( i, atom ) {
432
- return atom.nodeType === 1;
433
- });
434
-
435
- if ( this.usingTransforms ) {
436
- atomStyle.left = 0;
437
- atomStyle.top = 0;
438
- }
439
-
440
- $atoms.css( atomStyle ).addClass( this.options.itemClass );
441
-
442
- this.updateSortData( $atoms, true );
443
-
444
- return $atoms;
445
- },
446
-
447
- // _init fires when your instance is first created
448
- // (from the constructor above), and when you
449
- // attempt to initialize the widget again (by the bridge)
450
- // after it has already been initialized.
451
- _init : function( callback ) {
452
-
453
- this.$filteredAtoms = this._filter( this.$allAtoms );
454
- this._sort();
455
- this.reLayout( callback );
456
-
457
- },
458
-
459
- option : function( opts ){
460
- // change options AFTER initialization:
461
- // signature: $('#foo').bar({ cool:false });
462
- if ( jQuery.isPlainObject( opts ) ){
463
- this.options = jQuery.extend( true, this.options, opts );
464
-
465
- // trigger _updateOptionName if it exists
466
- var updateOptionFn;
467
- for ( var optionName in opts ) {
468
- updateOptionFn = '_update' + capitalize( optionName );
469
- if ( this[ updateOptionFn ] ) {
470
- this[ updateOptionFn ]();
471
- }
472
- }
473
- }
474
- },
475
-
476
- // ====================== updaters ====================== //
477
- // kind of like setters
478
-
479
- _updateAnimationEngine : function() {
480
- var animationEngine = this.options.animationEngine.toLowerCase().replace( /[ _\-]/g, '');
481
- var isUsingJQueryAnimation;
482
- // set applyStyleFnName
483
- switch ( animationEngine ) {
484
- case 'css' :
485
- case 'none' :
486
- isUsingJQueryAnimation = false;
487
- break;
488
- case 'jquery' :
489
- isUsingJQueryAnimation = true;
490
- break;
491
- default : // best available
492
- isUsingJQueryAnimation = !Modernizr.csstransitions;
493
- }
494
- this.isUsingJQueryAnimation = isUsingJQueryAnimation;
495
- this._updateUsingTransforms();
496
- },
497
-
498
- _updateTransformsEnabled : function() {
499
- this._updateUsingTransforms();
500
- },
501
-
502
- _updateUsingTransforms : function() {
503
- var usingTransforms = this.usingTransforms = this.options.transformsEnabled &&
504
- Modernizr.csstransforms && Modernizr.csstransitions && !this.isUsingJQueryAnimation;
505
-
506
- // prevent scales when transforms are disabled
507
- if ( !usingTransforms ) {
508
- delete this.options.hiddenStyle.scale;
509
- delete this.options.visibleStyle.scale;
510
- }
511
-
512
- this.getPositionStyles = usingTransforms ? this._translate : this._positionAbs;
513
- },
514
-
515
-
516
- // ====================== Filtering ======================
517
-
518
- _filter : function( $atoms ) {
519
- var filter = this.options.filter === '' ? '*' : this.options.filter;
520
-
521
- if ( !filter ) {
522
- return $atoms;
523
- }
524
-
525
- var hiddenClass = this.options.hiddenClass,
526
- hiddenSelector = '.' + hiddenClass,
527
- $hiddenAtoms = $atoms.filter( hiddenSelector ),
528
- $atomsToShow = $hiddenAtoms;
529
-
530
- if ( filter !== '*' ) {
531
- $atomsToShow = $hiddenAtoms.filter( filter );
532
- var $atomsToHide = $atoms.not( hiddenSelector ).not( filter ).addClass( hiddenClass );
533
- this.styleQueue.push({ $el: $atomsToHide, style: this.options.hiddenStyle });
534
- }
535
-
536
- this.styleQueue.push({ $el: $atomsToShow, style: this.options.visibleStyle });
537
- $atomsToShow.removeClass( hiddenClass );
538
-
539
- return $atoms.filter( filter );
540
- },
541
-
542
- // ====================== Sorting ======================
543
-
544
- updateSortData : function( $atoms, isIncrementingElemCount ) {
545
- var instance = this,
546
- getSortData = this.options.getSortData,
547
- $this, sortData;
548
- $atoms.each(function(){
549
- $this = $(this);
550
- sortData = {};
551
- // get value for sort data based on fn( $elem ) passed in
552
- for ( var key in getSortData ) {
553
- if ( !isIncrementingElemCount && key === 'original-order' ) {
554
- // keep original order original
555
- sortData[ key ] = jQuery.data( this, 'isotope-sort-data' )[ key ];
556
- } else {
557
- sortData[ key ] = getSortData[ key ]( $this, instance );
558
- }
559
- }
560
- // apply sort data to element
561
- jQuery.data( this, 'isotope-sort-data', sortData );
562
- });
563
- },
564
-
565
- // used on all the filtered atoms
566
- _sort : function() {
567
-
568
- var sortBy = this.options.sortBy,
569
- getSorter = this._getSorter,
570
- sortDir = this.options.sortAscending ? 1 : -1,
571
- sortFn = function( alpha, beta ) {
572
- var a = getSorter( alpha, sortBy ),
573
- b = getSorter( beta, sortBy );
574
- // fall back to original order if data matches
575
- if ( a === b && sortBy !== 'original-order') {
576
- a = getSorter( alpha, 'original-order' );
577
- b = getSorter( beta, 'original-order' );
578
- }
579
- return ( ( a > b ) ? 1 : ( a < b ) ? -1 : 0 ) * sortDir;
580
- };
581
-
582
- this.$filteredAtoms.sort( sortFn );
583
- },
584
-
585
- _getSorter : function( elem, sortBy ) {
586
- return jQuery.data( elem, 'isotope-sort-data' )[ sortBy ];
587
- },
588
-
589
- // ====================== Layout Helpers ======================
590
-
591
- _translate : function( x, y ) {
592
- return { translate : [ x, y ] };
593
- },
594
-
595
- _positionAbs : function( x, y ) {
596
- return { left: x, top: y };
597
- },
598
-
599
- _pushPosition : function( $elem, x, y ) {
600
- x = Math.round( x + this.offset.left );
601
- y = Math.round( y + this.offset.top );
602
- var position = this.getPositionStyles( x, y );
603
- this.styleQueue.push({ $el: $elem, style: position });
604
- if ( this.options.itemPositionDataEnabled ) {
605
- $elem.data('isotope-item-position', {x: x, y: y} );
606
- }
607
- },
608
-
609
-
610
- // ====================== General Layout ======================
611
-
612
- // used on collection of atoms (should be filtered, and sorted before )
613
- // accepts atoms-to-be-laid-out to start with
614
- layout : function( $elems, callback ) {
615
-
616
- var layoutMode = this.options.layoutMode;
617
-
618
- // layout logic
619
- this[ '_' + layoutMode + 'Layout' ]( $elems );
620
-
621
- // set the size of the container
622
- if ( this.options.resizesContainer ) {
623
- var containerStyle = this[ '_' + layoutMode + 'GetContainerSize' ]();
624
- this.styleQueue.push({ $el: this.element, style: containerStyle });
625
- }
626
-
627
- this._processStyleQueue( $elems, callback );
628
-
629
- this.isLaidOut = true;
630
- },
631
-
632
- _processStyleQueue : function( $elems, callback ) {
633
- // are we animating the layout arrangement?
634
- // use plugin-ish syntax for css or animate
635
- var styleFn = !this.isLaidOut ? 'css' : (
636
- this.isUsingJQueryAnimation ? 'animate' : 'css'
637
- ),
638
- animOpts = this.options.animationOptions,
639
- onLayout = this.options.onLayout,
640
- objStyleFn, processor,
641
- triggerCallbackNow, callbackFn;
642
-
643
- // default styleQueue processor, may be overwritten down below
644
- processor = function( i, obj ) {
645
- obj.$el[ styleFn ]( obj.style, animOpts );
646
- };
647
-
648
- if ( this._isInserting && this.isUsingJQueryAnimation ) {
649
- // if using styleQueue to insert items
650
- processor = function( i, obj ) {
651
- // only animate if it not being inserted
652
- objStyleFn = obj.$el.hasClass('no-transition') ? 'css' : styleFn;
653
- obj.$el[ objStyleFn ]( obj.style, animOpts );
654
- };
655
-
656
- } else if ( callback || onLayout || animOpts.complete ) {
657
- // has callback
658
- var isCallbackTriggered = false,
659
- // array of possible callbacks to trigger
660
- callbacks = [ callback, onLayout, animOpts.complete ],
661
- instance = this;
662
- triggerCallbackNow = true;
663
- // trigger callback only once
664
- callbackFn = function() {
665
- if ( isCallbackTriggered ) {
666
- return;
667
- }
668
- var hollaback;
669
- for (var i=0, len = callbacks.length; i < len; i++) {
670
- hollaback = callbacks[i];
671
- if ( typeof hollaback === 'function' ) {
672
- hollaback.call( instance.element, $elems, instance );
673
- }
674
- }
675
- isCallbackTriggered = true;
676
- };
677
-
678
- if ( this.isUsingJQueryAnimation && styleFn === 'animate' ) {
679
- // add callback to animation options
680
- animOpts.complete = callbackFn;
681
- triggerCallbackNow = false;
682
-
683
- } else if ( Modernizr.csstransitions ) {
684
- // detect if first item has transition
685
- var i = 0,
686
- firstItem = this.styleQueue[0],
687
- testElem = firstItem && firstItem.$el,
688
- styleObj;
689
- // get first non-empty jQ object
690
- while ( !testElem || !testElem.length ) {
691
- styleObj = this.styleQueue[ i++ ];
692
- // HACK: sometimes styleQueue[i] is undefined
693
- if ( !styleObj ) {
694
- return;
695
- }
696
- testElem = styleObj.$el;
697
- }
698
- // get transition duration of the first element in that object
699
- // yeah, this is inexact
700
- var duration = parseFloat( getComputedStyle( testElem[0] )[ transitionDurProp ] );
701
- if ( duration > 0 ) {
702
- processor = function( i, obj ) {
703
- obj.$el[ styleFn ]( obj.style, animOpts )
704
- // trigger callback at transition end
705
- .one( transitionEndEvent, callbackFn );
706
- };
707
- triggerCallbackNow = false;
708
- }
709
- }
710
- }
711
-
712
- // process styleQueue
713
- jQuery.each( this.styleQueue, processor );
714
-
715
- if ( triggerCallbackNow ) {
716
- callbackFn();
717
- }
718
-
719
- // clear out queue for next time
720
- this.styleQueue = [];
721
- },
722
-
723
-
724
- resize : function() {
725
- if ( this[ '_' + this.options.layoutMode + 'ResizeChanged' ]() ) {
726
- this.reLayout();
727
- }
728
- },
729
-
730
-
731
- reLayout : function( callback ) {
732
-
733
- this[ '_' + this.options.layoutMode + 'Reset' ]();
734
- this.layout( this.$filteredAtoms, callback );
735
-
736
- },
737
-
738
- // ====================== Convenience methods ======================
739
-
740
- // ====================== Adding items ======================
741
-
742
- // adds a jQuery object of items to a isotope container
743
- addItems : function( $content, callback ) {
744
- var $newAtoms = this._getAtoms( $content );
745
- // add new atoms to atoms pools
746
- this.$allAtoms = this.$allAtoms.add( $newAtoms );
747
-
748
- if ( callback ) {
749
- callback( $newAtoms );
750
- }
751
- },
752
-
753
- // convienence method for adding elements properly to any layout
754
- // positions items, hides them, then animates them back in <--- very sezzy
755
- insert : function( $content, callback ) {
756
- // position items
757
- this.element.append( $content );
758
-
759
- var instance = this;
760
- this.addItems( $content, function( $newAtoms ) {
761
- var $newFilteredAtoms = instance._filter( $newAtoms );
762
- instance._addHideAppended( $newFilteredAtoms );
763
- instance._sort();
764
- instance.reLayout();
765
- instance._revealAppended( $newFilteredAtoms, callback );
766
- });
767
-
768
- },
769
-
770
- // convienence method for working with Infinite Scroll
771
- appended : function( $content, callback ) {
772
- var instance = this;
773
- this.addItems( $content, function( $newAtoms ) {
774
- instance._addHideAppended( $newAtoms );
775
- instance.layout( $newAtoms );
776
- instance._revealAppended( $newAtoms, callback );
777
- });
778
- },
779
-
780
- // adds new atoms, then hides them before positioning
781
- _addHideAppended : function( $newAtoms ) {
782
- this.$filteredAtoms = this.$filteredAtoms.add( $newAtoms );
783
- $newAtoms.addClass('no-transition');
784
-
785
- this._isInserting = true;
786
-
787
- // apply hidden styles
788
- this.styleQueue.push({ $el: $newAtoms, style: this.options.hiddenStyle });
789
- },
790
-
791
- // sets visible style on new atoms
792
- _revealAppended : function( $newAtoms, callback ) {
793
- var instance = this;
794
- // apply visible style after a sec
795
- setTimeout( function() {
796
- // enable animation
797
- $newAtoms.removeClass('no-transition');
798
- // reveal newly inserted filtered elements
799
- instance.styleQueue.push({ $el: $newAtoms, style: instance.options.visibleStyle });
800
- instance._isInserting = false;
801
- instance._processStyleQueue( $newAtoms, callback );
802
- }, 10 );
803
- },
804
-
805
- // gathers all atoms
806
- reloadItems : function() {
807
- this.$allAtoms = this._getAtoms( this.element.children() );
808
- },
809
-
810
- // removes elements from Isotope widget
811
- remove: function( $content, callback ) {
812
- // remove elements immediately from Isotope instance
813
- this.$allAtoms = this.$allAtoms.not( $content );
814
- this.$filteredAtoms = this.$filteredAtoms.not( $content );
815
- // remove() as a callback, for after transition / animation
816
- var instance = this;
817
- var removeContent = function() {
818
- $content.remove();
819
- if ( callback ) {
820
- callback.call( instance.element );
821
- }
822
- };
823
-
824
- if ( $content.filter( ':not(.' + this.options.hiddenClass + ')' ).length ) {
825
- // if any non-hidden content needs to be removed
826
- this.styleQueue.push({ $el: $content, style: this.options.hiddenStyle });
827
- this._sort();
828
- this.reLayout( removeContent );
829
- } else {
830
- // remove it now
831
- removeContent();
832
- }
833
-
834
- },
835
-
836
- shuffle : function( callback ) {
837
- this.updateSortData( this.$allAtoms );
838
- this.options.sortBy = 'random';
839
- this._sort();
840
- this.reLayout( callback );
841
- },
842
-
843
- // destroys widget, returns elements and container back (close) to original style
844
- destroy : function() {
845
-
846
- var usingTransforms = this.usingTransforms;
847
- var options = this.options;
848
-
849
- this.$allAtoms
850
- .removeClass( options.hiddenClass + ' ' + options.itemClass )
851
- .each(function(){
852
- var style = this.style;
853
- style.position = '';
854
- style.top = '';
855
- style.left = '';
856
- style.opacity = '';
857
- if ( usingTransforms ) {
858
- style[ transformProp ] = '';
859
- }
860
- });
861
-
862
- // re-apply saved container styles
863
- var elemStyle = this.element[0].style;
864
- for ( var prop in this.originalStyle ) {
865
- elemStyle[ prop ] = this.originalStyle[ prop ];
866
- }
867
-
868
- this.element
869
- .unbind('.isotope')
870
- .undelegate( '.' + options.hiddenClass, 'click' )
871
- .removeClass( options.containerClass )
872
- .removeData('isotope');
873
-
874
- $window.unbind('.isotope');
875
-
876
- },
877
-
878
-
879
- // ====================== LAYOUTS ======================
880
-
881
- // calculates number of rows or columns
882
- // requires columnWidth or rowHeight to be set on namespaced object
883
- // i.e. this.masonry.columnWidth = 200
884
- _getSegments : function( isRows ) {
885
- var namespace = this.options.layoutMode,
886
- measure = isRows ? 'rowHeight' : 'columnWidth',
887
- size = isRows ? 'height' : 'width',
888
- segmentsName = isRows ? 'rows' : 'cols',
889
- containerSize = this.element[ size ](),
890
- segments,
891
- // i.e. options.masonry && options.masonry.columnWidth
892
- segmentSize = this.options[ namespace ] && this.options[ namespace ][ measure ] ||
893
- // or use the size of the first item, i.e. outerWidth
894
- this.$filteredAtoms[ 'outer' + capitalize(size) ](true) ||
895
- // if there's no items, use size of container
896
- containerSize;
897
-
898
- segments = Math.floor( containerSize / segmentSize );
899
- segments = Math.max( segments, 1 );
900
-
901
- // i.e. this.masonry.cols = ....
902
- this[ namespace ][ segmentsName ] = segments;
903
- // i.e. this.masonry.columnWidth = ...
904
- this[ namespace ][ measure ] = segmentSize;
905
-
906
- },
907
-
908
- _checkIfSegmentsChanged : function( isRows ) {
909
- var namespace = this.options.layoutMode,
910
- segmentsName = isRows ? 'rows' : 'cols',
911
- prevSegments = this[ namespace ][ segmentsName ];
912
- // update cols/rows
913
- this._getSegments( isRows );
914
- // return if updated cols/rows is not equal to previous
915
- return ( this[ namespace ][ segmentsName ] !== prevSegments );
916
- },
917
-
918
- // ====================== Masonry ======================
919
-
920
- _masonryReset : function() {
921
- // layout-specific props
922
- this.masonry = {};
923
- // FIXME shouldn't have to call this again
924
- this._getSegments();
925
- var i = this.masonry.cols;
926
- this.masonry.colYs = [];
927
- while (i--) {
928
- this.masonry.colYs.push( 0 );
929
- }
930
- },
931
-
932
- _masonryLayout : function( $elems ) {
933
- var instance = this,
934
- props = instance.masonry;
935
- $elems.each(function(){
936
- var $this = $(this),
937
- //how many columns does this brick span
938
- colSpan = Math.ceil( $this.outerWidth(true) / props.columnWidth );
939
- colSpan = Math.min( colSpan, props.cols );
940
-
941
- if ( colSpan === 1 ) {
942
- // if brick spans only one column, just like singleMode
943
- instance._masonryPlaceBrick( $this, props.colYs );
944
- } else {
945
- // brick spans more than one column
946
- // how many different places could this brick fit horizontally
947
- var groupCount = props.cols + 1 - colSpan,
948
- groupY = [],
949
- groupColY,
950
- i;
951
-
952
- // for each group potential horizontal position
953
- for ( i=0; i < groupCount; i++ ) {
954
- // make an array of colY values for that one group
955
- groupColY = props.colYs.slice( i, i+colSpan );
956
- // and get the max value of the array
957
- groupY[i] = Math.max.apply( Math, groupColY );
958
- }
959
-
960
- instance._masonryPlaceBrick( $this, groupY );
961
- }
962
- });
963
- },
964
-
965
- // worker method that places brick in the columnSet
966
- // with the the minY
967
- _masonryPlaceBrick : function( $brick, setY ) {
968
- // get the minimum Y value from the columns
969
- var minimumY = Math.min.apply( Math, setY ),
970
- shortCol = 0;
971
-
972
- // Find index of short column, the first from the left
973
- for (var i=0, len = setY.length; i < len; i++) {
974
- if ( setY[i] === minimumY ) {
975
- shortCol = i;
976
- break;
977
- }
978
- }
979
-
980
- // position the brick
981
- var x = this.masonry.columnWidth * shortCol,
982
- y = minimumY;
983
- this._pushPosition( $brick, x, y );
984
-
985
- // apply setHeight to necessary columns
986
- var setHeight = minimumY + $brick.outerHeight(true),
987
- setSpan = this.masonry.cols + 1 - len;
988
- for ( i=0; i < setSpan; i++ ) {
989
- this.masonry.colYs[ shortCol + i ] = setHeight;
990
- }
991
-
992
- },
993
-
994
- _masonryGetContainerSize : function() {
995
- var containerHeight = Math.max.apply( Math, this.masonry.colYs );
996
- return { height: containerHeight };
997
- },
998
-
999
- _masonryResizeChanged : function() {
1000
- return this._checkIfSegmentsChanged();
1001
- },
1002
-
1003
- // ====================== fitRows ======================
1004
-
1005
- _fitRowsReset : function() {
1006
- this.fitRows = {
1007
- x : 0,
1008
- y : 0,
1009
- height : 0
1010
- };
1011
- },
1012
-
1013
- _fitRowsLayout : function( $elems ) {
1014
- var instance = this,
1015
- containerWidth = this.element.width(),
1016
- props = this.fitRows;
1017
-
1018
- $elems.each( function() {
1019
- var $this = $(this),
1020
- atomW = $this.outerWidth(true),
1021
- atomH = $this.outerHeight(true);
1022
-
1023
- if ( props.x !== 0 && atomW + props.x > containerWidth ) {
1024
- // if this element cannot fit in the current row
1025
- props.x = 0;
1026
- props.y = props.height;
1027
- }
1028
-
1029
- // position the atom
1030
- instance._pushPosition( $this, props.x, props.y );
1031
-
1032
- props.height = Math.max( props.y + atomH, props.height );
1033
- props.x += atomW;
1034
-
1035
- });
1036
- },
1037
-
1038
- _fitRowsGetContainerSize : function () {
1039
- return { height : this.fitRows.height };
1040
- },
1041
-
1042
- _fitRowsResizeChanged : function() {
1043
- return true;
1044
- },
1045
-
1046
-
1047
- // ====================== cellsByRow ======================
1048
-
1049
- _cellsByRowReset : function() {
1050
- this.cellsByRow = {
1051
- index : 0
1052
- };
1053
- // get this.cellsByRow.columnWidth
1054
- this._getSegments();
1055
- // get this.cellsByRow.rowHeight
1056
- this._getSegments(true);
1057
- },
1058
-
1059
- _cellsByRowLayout : function( $elems ) {
1060
- var instance = this,
1061
- props = this.cellsByRow;
1062
- $elems.each( function(){
1063
- var $this = $(this),
1064
- col = props.index % props.cols,
1065
- row = Math.floor( props.index / props.cols ),
1066
- x = ( col + 0.5 ) * props.columnWidth - $this.outerWidth(true) / 2,
1067
- y = ( row + 0.5 ) * props.rowHeight - $this.outerHeight(true) / 2;
1068
- instance._pushPosition( $this, x, y );
1069
- props.index ++;
1070
- });
1071
- },
1072
-
1073
- _cellsByRowGetContainerSize : function() {
1074
- return { height : Math.ceil( this.$filteredAtoms.length / this.cellsByRow.cols ) * this.cellsByRow.rowHeight + this.offset.top };
1075
- },
1076
-
1077
- _cellsByRowResizeChanged : function() {
1078
- return this._checkIfSegmentsChanged();
1079
- },
1080
-
1081
-
1082
- // ====================== straightDown ======================
1083
-
1084
- _straightDownReset : function() {
1085
- this.straightDown = {
1086
- y : 0
1087
- };
1088
- },
1089
-
1090
- _straightDownLayout : function( $elems ) {
1091
- var instance = this;
1092
- $elems.each( function( i ){
1093
- var $this = $(this);
1094
- instance._pushPosition( $this, 0, instance.straightDown.y );
1095
- instance.straightDown.y += $this.outerHeight(true);
1096
- });
1097
- },
1098
-
1099
- _straightDownGetContainerSize : function() {
1100
- return { height : this.straightDown.y };
1101
- },
1102
-
1103
- _straightDownResizeChanged : function() {
1104
- return true;
1105
- },
1106
-
1107
-
1108
- // ====================== masonryHorizontal ======================
1109
-
1110
- _masonryHorizontalReset : function() {
1111
- // layout-specific props
1112
- this.masonryHorizontal = {};
1113
- // FIXME shouldn't have to call this again
1114
- this._getSegments( true );
1115
- var i = this.masonryHorizontal.rows;
1116
- this.masonryHorizontal.rowXs = [];
1117
- while (i--) {
1118
- this.masonryHorizontal.rowXs.push( 0 );
1119
- }
1120
- },
1121
-
1122
- _masonryHorizontalLayout : function( $elems ) {
1123
- var instance = this,
1124
- props = instance.masonryHorizontal;
1125
- $elems.each(function(){
1126
- var $this = $(this),
1127
- //how many rows does this brick span
1128
- rowSpan = Math.ceil( $this.outerHeight(true) / props.rowHeight );
1129
- rowSpan = Math.min( rowSpan, props.rows );
1130
-
1131
- if ( rowSpan === 1 ) {
1132
- // if brick spans only one column, just like singleMode
1133
- instance._masonryHorizontalPlaceBrick( $this, props.rowXs );
1134
- } else {
1135
- // brick spans more than one row
1136
- // how many different places could this brick fit horizontally
1137
- var groupCount = props.rows + 1 - rowSpan,
1138
- groupX = [],
1139
- groupRowX, i;
1140
-
1141
- // for each group potential horizontal position
1142
- for ( i=0; i < groupCount; i++ ) {
1143
- // make an array of colY values for that one group
1144
- groupRowX = props.rowXs.slice( i, i+rowSpan );
1145
- // and get the max value of the array
1146
- groupX[i] = Math.max.apply( Math, groupRowX );
1147
- }
1148
-
1149
- instance._masonryHorizontalPlaceBrick( $this, groupX );
1150
- }
1151
- });
1152
- },
1153
-
1154
- _masonryHorizontalPlaceBrick : function( $brick, setX ) {
1155
- // get the minimum Y value from the columns
1156
- var minimumX = Math.min.apply( Math, setX ),
1157
- smallRow = 0;
1158
- // Find index of smallest row, the first from the top
1159
- for (var i=0, len = setX.length; i < len; i++) {
1160
- if ( setX[i] === minimumX ) {
1161
- smallRow = i;
1162
- break;
1163
- }
1164
- }
1165
-
1166
- // position the brick
1167
- var x = minimumX,
1168
- y = this.masonryHorizontal.rowHeight * smallRow;
1169
- this._pushPosition( $brick, x, y );
1170
-
1171
- // apply setHeight to necessary columns
1172
- var setWidth = minimumX + $brick.outerWidth(true),
1173
- setSpan = this.masonryHorizontal.rows + 1 - len;
1174
- for ( i=0; i < setSpan; i++ ) {
1175
- this.masonryHorizontal.rowXs[ smallRow + i ] = setWidth;
1176
- }
1177
- },
1178
-
1179
- _masonryHorizontalGetContainerSize : function() {
1180
- var containerWidth = Math.max.apply( Math, this.masonryHorizontal.rowXs );
1181
- return { width: containerWidth };
1182
- },
1183
-
1184
- _masonryHorizontalResizeChanged : function() {
1185
- return this._checkIfSegmentsChanged(true);
1186
- },
1187
-
1188
-
1189
- // ====================== fitColumns ======================
1190
-
1191
- _fitColumnsReset : function() {
1192
- this.fitColumns = {
1193
- x : 0,
1194
- y : 0,
1195
- width : 0
1196
- };
1197
- },
1198
-
1199
- _fitColumnsLayout : function( $elems ) {
1200
- var instance = this,
1201
- containerHeight = this.element.height(),
1202
- props = this.fitColumns;
1203
- $elems.each( function() {
1204
- var $this = $(this),
1205
- atomW = $this.outerWidth(true),
1206
- atomH = $this.outerHeight(true);
1207
-
1208
- if ( props.y !== 0 && atomH + props.y > containerHeight ) {
1209
- // if this element cannot fit in the current column
1210
- props.x = props.width;
1211
- props.y = 0;
1212
- }
1213
-
1214
- // position the atom
1215
- instance._pushPosition( $this, props.x, props.y );
1216
-
1217
- props.width = Math.max( props.x + atomW, props.width );
1218
- props.y += atomH;
1219
-
1220
- });
1221
- },
1222
-
1223
- _fitColumnsGetContainerSize : function () {
1224
- return { width : this.fitColumns.width };
1225
- },
1226
-
1227
- _fitColumnsResizeChanged : function() {
1228
- return true;
1229
- },
1230
-
1231
-
1232
-
1233
- // ====================== cellsByColumn ======================
1234
-
1235
- _cellsByColumnReset : function() {
1236
- this.cellsByColumn = {
1237
- index : 0
1238
- };
1239
- // get this.cellsByColumn.columnWidth
1240
- this._getSegments();
1241
- // get this.cellsByColumn.rowHeight
1242
- this._getSegments(true);
1243
- },
1244
-
1245
- _cellsByColumnLayout : function( $elems ) {
1246
- var instance = this,
1247
- props = this.cellsByColumn;
1248
- $elems.each( function(){
1249
- var $this = $(this),
1250
- col = Math.floor( props.index / props.rows ),
1251
- row = props.index % props.rows,
1252
- x = ( col + 0.5 ) * props.columnWidth - $this.outerWidth(true) / 2,
1253
- y = ( row + 0.5 ) * props.rowHeight - $this.outerHeight(true) / 2;
1254
- instance._pushPosition( $this, x, y );
1255
- props.index ++;
1256
- });
1257
- },
1258
-
1259
- _cellsByColumnGetContainerSize : function() {
1260
- return { width : Math.ceil( this.$filteredAtoms.length / this.cellsByColumn.rows ) * this.cellsByColumn.columnWidth };
1261
- },
1262
-
1263
- _cellsByColumnResizeChanged : function() {
1264
- return this._checkIfSegmentsChanged(true);
1265
- },
1266
-
1267
- // ====================== straightAcross ======================
1268
-
1269
- _straightAcrossReset : function() {
1270
- this.straightAcross = {
1271
- x : 0
1272
- };
1273
- },
1274
-
1275
- _straightAcrossLayout : function( $elems ) {
1276
- var instance = this;
1277
- $elems.each( function( i ){
1278