Blog2Social: Social Media Auto Post & Scheduler - Version 5.9.0

Version Description

Usability Optimization & Gif support

Download this release

Release Info

Developer PR-Gateway
Plugin Icon 128x128 Blog2Social: Social Media Auto Post & Scheduler
Version 5.9.0
Comparing to
See all releases

Code changes from version 5.8.1 to 5.9.0

Files changed (56) hide show
  1. assets/css/b2s/calendar.css +22 -6
  2. assets/css/b2s/network.css +8 -0
  3. assets/css/b2s/post.sched.css +22 -3
  4. assets/css/b2s/ship.css +19 -44
  5. assets/css/general.css +8 -0
  6. assets/js/b2s/calendar.js +3 -42
  7. assets/js/b2s/general.js +11 -6
  8. assets/js/b2s/network.js +71 -13
  9. assets/js/b2s/post.js +3 -37
  10. assets/js/b2s/settings.js +22 -0
  11. assets/js/b2s/ship.js +329 -209
  12. assets/js/notice.js +1 -1
  13. blog2social.php +2 -3
  14. includes/Ajax/Get.php +1 -1
  15. includes/Ajax/Post.php +65 -29
  16. includes/B2S/Api/Network/Pinterest.php +17 -12
  17. includes/B2S/AutoPost.php +51 -26
  18. includes/B2S/Curation/View.php +1 -1
  19. includes/B2S/Network/Item.php +59 -41
  20. includes/B2S/Post/Item.php +12 -12
  21. includes/B2S/PostBox.php +3 -3
  22. includes/B2S/QuickPost.php +1 -1
  23. includes/B2S/Settings/Item.php +30 -31
  24. includes/B2S/Ship/Image.php +6 -3
  25. includes/B2S/Ship/Item.php +102 -39
  26. includes/B2S/Ship/Navbar.php +1 -1
  27. includes/B2S/Ship/Portale.php +3 -3
  28. includes/B2S/Ship/Save.php +1 -1
  29. includes/Loader.php +30 -15
  30. includes/Meta.php +3 -3
  31. includes/Tools.php +60 -4
  32. includes/Util.php +3 -3
  33. languages/blog2social-de_DE.mo +0 -0
  34. languages/blog2social-de_DE.po +2490 -1030
  35. languages/blog2social-es_ES.mo +0 -0
  36. languages/blog2social-es_ES.po +2740 -0
  37. languages/blog2social-fr_FR.mo +0 -0
  38. languages/blog2social-fr_FR.po +3656 -2606
  39. languages/blog2social.pot +1529 -629
  40. readme.txt +10 -6
  41. views/b2s/curation.php +1 -1
  42. views/b2s/dashboard.php +1 -1
  43. views/b2s/html/footer.php +9 -9
  44. views/b2s/html/header.php +5 -8
  45. views/b2s/html/post.navbar.php +2 -2
  46. views/b2s/html/sidebar.php +11 -1
  47. views/b2s/html/sidebar.ship.php +11 -1
  48. views/b2s/network.php +19 -4
  49. views/b2s/partials/post-edit-modal.php +1 -1
  50. views/b2s/post.calendar.php +5 -2
  51. views/b2s/post.sched.php +3 -0
  52. views/b2s/premium.php +1 -1
  53. views/b2s/settings.php +1 -1
  54. views/b2s/ship.php +34 -16
  55. views/b2s/support.php +2 -2
  56. views/b2s/widgets/posts.php +1 -1
assets/css/b2s/calendar.css CHANGED
@@ -86,7 +86,7 @@ body .fc-time{
86
line-height: 1.428571429;
87
border-radius: 15px;
88
}
89
- .fb-url-image, .xing-url-image, .linkedin-url-image, .tw-url-image, .b2s-image-border {
90
margin-right: 10px;
91
margin-bottom: 20px;
92
border: 1px dashed #bdbfc2;
@@ -96,7 +96,7 @@ body .fc-time{
96
textarea.form-control {
97
height: auto;
98
}
99
- .fb-textarea-input, .tw-textarea-input, .xing-textarea-input, .linkedin-textarea-input {
100
font-size: 14px;
101
font-weight: normal;
102
line-height: 1.125;
@@ -138,7 +138,7 @@ textarea.form-control {
138
.b2s-image-item-thumb {
139
height: 150px;
140
}
141
- .b2s-image-change-all-network,.b2s-upload-image-free-version,.b2s-image-change-this-network{
142
margin-right: 5px !important;
143
}
144
.b2s-image-remove-btn {
@@ -160,9 +160,6 @@ textarea.form-control {
160
text-decoration: none !important;
161
cursor: default !important;
162
}
163
- .b2s-post-item .label-success{
164
- display: none;
165
- }
166
body .fc-day-grid-event .fc-content{
167
white-space: normal;
168
}
@@ -307,3 +304,22 @@ body .fc-day-grid-event .fc-content{
307
margin-right: auto;
308
max-height: 100%;
309
}
86
line-height: 1.428571429;
87
border-radius: 15px;
88
}
89
+ .fb-url-image, .xing-url-image, .linkedin-url-image, .tw-url-image, .reddit-url-image, .b2s-image-border {
90
margin-right: 10px;
91
margin-bottom: 20px;
92
border: 1px dashed #bdbfc2;
96
textarea.form-control {
97
height: auto;
98
}
99
+ .fb-textarea-input, .tw-textarea-input, .xing-textarea-input, .reddit-textarea-input, .linkedin-textarea-input {
100
font-size: 14px;
101
font-weight: normal;
102
line-height: 1.125;
138
.b2s-image-item-thumb {
139
height: 150px;
140
}
141
+ .b2s-image-change-all-network,.b2s-upload-image-free-version,.b2s-image-change-this-network, .b2s-image-change-meta-network{
142
margin-right: 5px !important;
143
}
144
.b2s-image-remove-btn {
160
text-decoration: none !important;
161
cursor: default !important;
162
}
163
body .fc-day-grid-event .fc-content{
164
white-space: normal;
165
}
304
margin-right: auto;
305
max-height: 100%;
306
}
307
+
308
+ .b2s-post-item-details-item-group-select {
309
+ max-width: 100% !important;
310
+ }
311
+
312
+ .glyphicon-refresh-animate {
313
+ -animation: spin .7s infinite linear;
314
+ -webkit-animation: spin2 .7s infinite linear;
315
+ }
316
+
317
+ @-webkit-keyframes spin2 {
318
+ from { -webkit-transform: rotate(0deg);}
319
+ to { -webkit-transform: rotate(360deg);}
320
+ }
321
+
322
+ @keyframes spin {
323
+ from { transform: scale(1) rotate(0deg);}
324
+ to { transform: scale(1) rotate(360deg);}
325
+ }
assets/css/b2s/network.css CHANGED
@@ -611,4 +611,12 @@ ul.b2s-network-item-auth-list li:last-child{
611
margin-bottom: 0;
612
text-align: right;
613
font-weight: bold;
614
}
611
margin-bottom: 0;
612
text-align: right;
613
font-weight: bold;
614
+ }
615
+
616
+ #b2s-auth-network-6-location, #b2s-auth-network-6-board {
617
+ max-width: 100% !important;
618
+ }
619
+
620
+ .b2s-edit-template-title {
621
+ display: inline;
622
}
assets/css/b2s/post.sched.css CHANGED
@@ -160,7 +160,7 @@
160
line-height: 1.428571429;
161
border-radius: 15px;
162
}
163
- .fb-url-image, .xing-url-image, .linkedin-url-image, .tw-url-image, .b2s-image-border {
164
margin-right: 10px;
165
margin-bottom: 20px;
166
border: 1px dashed #bdbfc2;
@@ -170,7 +170,7 @@
170
textarea.form-control {
171
height: auto;
172
}
173
- .fb-textarea-input, .tw-textarea-input, .xing-textarea-input, .linkedin-textarea-input {
174
font-size: 14px;
175
font-weight: normal;
176
line-height: 1.125;
@@ -212,7 +212,7 @@ textarea.form-control {
212
.b2s-image-item-thumb {
213
height: 150px;
214
}
215
- .b2s-image-change-all-network,.b2s-upload-image-free-version,.b2s-image-change-this-network{
216
margin-right: 5px !important;
217
}
218
.b2s-image-remove-btn {
@@ -310,3 +310,22 @@ textarea.form-control {
310
margin-right: auto;
311
max-height: 100%;
312
}
160
line-height: 1.428571429;
161
border-radius: 15px;
162
}
163
+ .fb-url-image, .xing-url-image, .linkedin-url-image, .reddit-url-image, .tw-url-image, .b2s-image-border {
164
margin-right: 10px;
165
margin-bottom: 20px;
166
border: 1px dashed #bdbfc2;
170
textarea.form-control {
171
height: auto;
172
}
173
+ .fb-textarea-input, .tw-textarea-input, .xing-textarea-input, .reddit-textarea-input, .linkedin-textarea-input {
174
font-size: 14px;
175
font-weight: normal;
176
line-height: 1.125;
212
.b2s-image-item-thumb {
213
height: 150px;
214
}
215
+ .b2s-image-change-all-network,.b2s-upload-image-free-version,.b2s-image-change-this-network, .b2s-image-change-meta-network{
216
margin-right: 5px !important;
217
}
218
.b2s-image-remove-btn {
310
margin-right: auto;
311
max-height: 100%;
312
}
313
+
314
+ .b2s-post-item-details-item-group-select {
315
+ max-width: 100% !important;
316
+ }
317
+
318
+ .glyphicon-refresh-animate {
319
+ -animation: spin .7s infinite linear;
320
+ -webkit-animation: spin2 .7s infinite linear;
321
+ }
322
+
323
+ @-webkit-keyframes spin2 {
324
+ from { -webkit-transform: rotate(0deg);}
325
+ to { -webkit-transform: rotate(360deg);}
326
+ }
327
+
328
+ @keyframes spin {
329
+ from { transform: scale(1) rotate(0deg);}
330
+ to { transform: scale(1) rotate(360deg);}
331
+ }
assets/css/b2s/ship.css CHANGED
@@ -593,13 +593,13 @@ input[type="checkbox"], input[type="radio"] {
593
}
594
}*/
595
596
- .fb-textarea-input:focus, .tw-textarea-input:focus, .tw-url-input:focus, .fb-url-input:focus, .xing-textarea-input:focus, .xing-url-input:focus, .linkedin-textarea-input:focus, .linkedin-url-input:focus{
597
border-color: #66afe9;
598
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(102, 175, 233, 0.6);
599
outline: 0 none;
600
}
601
602
- .fb-textarea-input,.tw-textarea-input, .xing-textarea-input, .linkedin-textarea-input{
603
font-size: 14px;
604
font-weight: normal;
605
line-height: 1.125;
@@ -611,7 +611,7 @@ input[type="checkbox"], input[type="radio"] {
611
font-family: helvetica,arial,sans-serif;
612
}
613
614
- .fb-url-input,.tw-url-input, .xing-url-input, .linkedin-url-input{
615
font-size: 12px;
616
font-weight: normal;
617
line-height: 1.38;
@@ -619,7 +619,7 @@ input[type="checkbox"], input[type="radio"] {
619
border: medium none;
620
}
621
622
- .fb-url-title{
623
font-size: 18px !important;
624
font-weight: 500;
625
line-height: 22px;
@@ -630,7 +630,7 @@ input[type="checkbox"], input[type="radio"] {
630
word-wrap: break-word;
631
font-family: Georgia,serif;
632
}
633
- .fb-url-desc{
634
font-size: 12px;
635
line-height: 16px;
636
margin-bottom: 8px !important;
@@ -662,50 +662,12 @@ input[type="checkbox"], input[type="radio"] {
662
margin-bottom: 20px;
663
}
664
665
- .xing-url-title{
666
- margin-top: 0px;
667
- margin-bottom: 4px;
668
- font-size: 18px;
669
- font-weight: normal;
670
- line-height: 22px;
671
- color: #009090;
672
- }
673
-
674
- .xing-url-desc{
675
- line-height: 1.38462;
676
- font-size: 13px;
677
- }
678
-
679
.linkedin-container{
680
font-family: sans-serif;
681
color: #333;
682
padding: 10px 0px;
683
}
684
685
-
686
- .linkedin-container:hover #linkedin-url-title, .linkedin-container:hover #linkedin-url-desc{
687
- text-decoration: underline;
688
- }
689
-
690
- .linkedin-url-desc{
691
- line-height: 14px;
692
- color: #999;
693
- font-size: 12px;
694
- font-style: normal;
695
- font-weight: normal;
696
- text-decoration: inherit;
697
- padding-left: 10px !important;
698
- }
699
-
700
- .linkedin-url-title{
701
- font-size: 16px !important;
702
- font-weight: normal;
703
- line-height: 20px;
704
- margin-bottom: 5px !important;
705
- margin-top: 5px !important;
706
- padding-left: 10px !important;
707
- }
708
-
709
.glyphicon-refresh-animate {
710
-animation: spin .7s infinite linear;
711
-webkit-animation: spin2 .7s infinite linear;
@@ -755,7 +717,7 @@ input[type="checkbox"], input[type="radio"] {
755
margin-top: -15px;
756
}*/
757
758
- .b2s-image-change-all-network,.b2s-upload-image-free-version,.b2s-image-change-this-network{
759
margin-right: 5px !important;
760
}
761
.b2s-img-required{
@@ -852,4 +814,17 @@ input[type="number"]{
852
margin-bottom: 0;
853
text-align: right;
854
font-weight: bold;
855
}
593
}
594
}*/
595
596
+ .fb-textarea-input:focus, .tw-textarea-input:focus, .tw-url-input:focus, .og-url-input:focus, .xing-textarea-input:focus, .xing-url-input:focus, .linkedin-textarea-input:focus, .linkedin-url-input:focus{
597
border-color: #66afe9;
598
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(102, 175, 233, 0.6);
599
outline: 0 none;
600
}
601
602
+ .fb-textarea-input,.tw-textarea-input, .xing-textarea-input, .linkedin-textarea-input, .reddit-textarea-input{
603
font-size: 14px;
604
font-weight: normal;
605
line-height: 1.125;
611
font-family: helvetica,arial,sans-serif;
612
}
613
614
+ .og-url-input, .tw-url-input{
615
font-size: 12px;
616
font-weight: normal;
617
line-height: 1.38;
619
border: medium none;
620
}
621
622
+ .og-url-title{
623
font-size: 18px !important;
624
font-weight: 500;
625
line-height: 22px;
630
word-wrap: break-word;
631
font-family: Georgia,serif;
632
}
633
+ .og-url-desc{
634
font-size: 12px;
635
line-height: 16px;
636
margin-bottom: 8px !important;
662
margin-bottom: 20px;
663
}
664
665
.linkedin-container{
666
font-family: sans-serif;
667
color: #333;
668
padding: 10px 0px;
669
}
670
671
.glyphicon-refresh-animate {
672
-animation: spin .7s infinite linear;
673
-webkit-animation: spin2 .7s infinite linear;
717
margin-top: -15px;
718
}*/
719
720
+ .b2s-image-change-all-network,.b2s-upload-image-free-version,.b2s-image-change-this-network,.b2s-image-change-meta-network{
721
margin-right: 5px !important;
722
}
723
.b2s-img-required{
814
margin-bottom: 0;
815
text-align: right;
816
font-weight: bold;
817
+ }
818
+
819
+ .b2s-meta-image-network-icon {
820
+ height: 22px;
821
+ margin-left: 5px;
822
+ }
823
+
824
+ .wp-admin select{
825
+ max-width: 100% !important;
826
+ }
827
+
828
+ #b2s-auth-network-6-location, #b2s-auth-network-6-board {
829
+ max-width: 100% !important;
830
}
assets/css/general.css CHANGED
@@ -7145,6 +7145,10 @@ h4{
7145
border: 1px solid #FF0000 !important;
7146
}
7147
7148
input[type="checkbox"].error, select.error{
7149
border: 1px solid #cccccc !important;
7150
}
@@ -7597,4 +7601,8 @@ CSS CheckBOX
7597
7598
.b2s-left-border-danger {
7599
border-left: 4px solid #a94442;
7600
}
7145
border: 1px solid #FF0000 !important;
7146
}
7147
7148
+ .warning{
7149
+ border: 1px solid #ffc107 !important;
7150
+ }
7151
+
7152
input[type="checkbox"].error, select.error{
7153
border: 1px solid #cccccc !important;
7154
}
7601
7602
.b2s-left-border-danger {
7603
border-left: 4px solid #a94442;
7604
+ }
7605
+
7606
+ .b2s-free-link {
7607
+ font-size: 13px;
7608
}
assets/js/b2s/calendar.js CHANGED
@@ -155,7 +155,8 @@ function showEditSchedCalendarPost(b2s_id, post_id, network_auth_id, network_typ
155
156
//if linkpost then show btn meta tags
157
var isMetaChecked = false;
158
- if (network_id == "1" && jQuery('#isOgMetaChecked').val() == "1") {
159
isMetaChecked = true;
160
}
161
if (network_id == "2" && jQuery('#isCardMetaChecked').val() == "1") {
@@ -165,15 +166,13 @@ function showEditSchedCalendarPost(b2s_id, post_id, network_auth_id, network_typ
165
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", false);
166
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", false);
167
jQuery('.b2s-post-item-details-preview-url-reload[data-network-id="' + network_id + '"]').show();
168
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-id="' + network_id + '"]').trigger("click");
169
var dataMetaType = jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + network_auth_id + '"]').attr("data-meta-type");
170
if (dataMetaType == "og") {
171
jQuery('.b2sChangeOgMeta[data-network-auth-id="' + network_auth_id + '"]').val("1");
172
} else {
173
jQuery('.b2sChangeCardMeta[data-network-auth-id="' + network_auth_id + '"]').val("1");
174
}
175
-
176
-
177
//Facebook TOS 072018 - Instant Sharing - Image post without Text > set to readonly
178
if (network_id == 1 && network_type == 0) {
179
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", false);
@@ -181,8 +180,6 @@ function showEditSchedCalendarPost(b2s_id, post_id, network_auth_id, network_typ
181
jQuery('.b2s-post-item-info-area[data-network-auth-id="' + network_auth_id + '"]').show();
182
jQuery('.b2s-post-approve-info[data-network-auth-id="' + network_auth_id + '"]').hide();
183
}
184
-
185
-
186
} else {
187
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", true);
188
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", true);
@@ -211,42 +208,6 @@ function showEditSchedCalendarPost(b2s_id, post_id, network_auth_id, network_typ
211
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').show();
212
}
213
}
214
-
215
-
216
- if (network_id == "3") {
217
- if (jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').val() == "0") {
218
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').show();
219
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').trigger("click");
220
- jQuery('.linkedin-url-title[data-network-auth-id="' + network_auth_id + '"]').show();
221
- jQuery('.linkedin-url-desc[data-network-auth-id="' + network_auth_id + '"]').hide(); //not showing on linkedin
222
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').hide();
223
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + network_auth_id + '"]').hide();
224
- } else {
225
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').hide();
226
- jQuery('.linkedin-url-title[data-network-auth-id="' + network_auth_id + '"]').hide();
227
- jQuery('.linkedin-url-desc[data-network-auth-id="' + network_auth_id + '"]').hide();
228
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').show();
229
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + network_auth_id + '"]').show();
230
- }
231
- }
232
-
233
- if (network_id == "19" && network_type == "0") {
234
- if (jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').val() == "0") {
235
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').show();
236
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').trigger("click");
237
- jQuery('.xing-url-title[data-network-auth-id="' + network_auth_id + '"]').show();
238
- jQuery('.xing-url-desc[data-network-auth-id="' + network_auth_id + '"]').show();
239
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').hide();
240
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + network_auth_id + '"]').hide();
241
- } else {
242
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').hide();
243
- jQuery('.xing-url-title[data-network-auth-id="' + network_auth_id + '"]').hide();
244
- jQuery('.xing-url-desc[data-network-auth-id="' + network_auth_id + '"]').hide();
245
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').show();
246
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + network_auth_id + '"]').show();
247
- }
248
- }
249
-
250
}
251
var textLimit = jQuery('.b2s-post-item-details-item-message-input[data-network-count="-1"][data-network-auth-id="' + network_auth_id + '"]').attr('data-network-text-limit');
252
if (textLimit != "0") {
155
156
//if linkpost then show btn meta tags
157
var isMetaChecked = false;
158
+ var ogMetaNetworks = jQuery('#ogMetaNetworks').val().split(";");
159
+ if (typeof network_id != 'undefined' && jQuery.inArray(network_id.toString(), ogMetaNetworks) != -1 && jQuery('#isOgMetaChecked').val() == "1") {
160
isMetaChecked = true;
161
}
162
if (network_id == "2" && jQuery('#isCardMetaChecked').val() == "1") {
166
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", false);
167
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", false);
168
jQuery('.b2s-post-item-details-preview-url-reload[data-network-id="' + network_id + '"]').show();
169
+ //jQuery('.b2s-post-item-details-preview-url-reload[data-network-id="' + network_id + '"]').trigger("click");
170
var dataMetaType = jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + network_auth_id + '"]').attr("data-meta-type");
171
if (dataMetaType == "og") {
172
jQuery('.b2sChangeOgMeta[data-network-auth-id="' + network_auth_id + '"]').val("1");
173
} else {
174
jQuery('.b2sChangeCardMeta[data-network-auth-id="' + network_auth_id + '"]').val("1");
175
}
176
//Facebook TOS 072018 - Instant Sharing - Image post without Text > set to readonly
177
if (network_id == 1 && network_type == 0) {
178
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", false);
180
jQuery('.b2s-post-item-info-area[data-network-auth-id="' + network_auth_id + '"]').show();
181
jQuery('.b2s-post-approve-info[data-network-auth-id="' + network_auth_id + '"]').hide();
182
}
183
} else {
184
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", true);
185
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", true);
208
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').show();
209
}
210
}
211
}
212
var textLimit = jQuery('.b2s-post-item-details-item-message-input[data-network-count="-1"][data-network-auth-id="' + network_auth_id + '"]').attr('data-network-text-limit');
213
if (textLimit != "0") {
assets/js/b2s/general.js CHANGED
@@ -132,6 +132,9 @@ jQuery(document).on('click', '.b2s-trail-show', function () {
132
jQuery('#b2sProFeatureModal').modal('hide');
133
jQuery('#b2s-trial-modal').modal('show');
134
});
135
136
jQuery(document).on('click', '.b2s-trail-btn-start', function () {
137
var checkFail = false;
@@ -200,15 +203,17 @@ jQuery(document).on('click', '.b2s-trail-btn-start', function () {
200
});
201
202
//PREMIUM
203
- jQuery('#b2sPreFeatureModal').on('show.bs.modal', function (e) {
204
- jQuery(this).find('.modal-title').html(jQuery(e.relatedTarget).attr('data-title'));
205
});
206
207
//PREMIUM-PRO
208
- jQuery('#b2sProFeatureModal').on('show.bs.modal', function (e) {
209
- jQuery(this).find('.modal-title').html(jQuery(e.relatedTarget).attr('data-title'));
210
- jQuery(this).find('.modal-body').hide();
211
- jQuery(this).find('.' + jQuery(e.relatedTarget).attr('data-type')).show();
212
});
213
214
jQuery(document).on('heartbeat-send', function (e, data) {
132
jQuery('#b2sProFeatureModal').modal('hide');
133
jQuery('#b2s-trial-modal').modal('show');
134
});
135
+ jQuery(document).on('click', '.b2s-trial-modal-btn', function() {
136
+ jQuery('#b2s-trial-modal').modal('show');
137
+ });
138
139
jQuery(document).on('click', '.b2s-trail-btn-start', function () {
140
var checkFail = false;
203
});
204
205
//PREMIUM
206
+ jQuery(document).on('click', '.b2sPreFeatureModalBtn', function () {
207
+ jQuery('#b2sPreFeatureModal').modal('show');
208
+ jQuery('#b2sPreFeatureModal').find('.modal-title').html(jQuery(this).attr('data-title'));
209
});
210
211
//PREMIUM-PRO
212
+ jQuery(document).on('click', '.b2sProFeatureModalBtn', function () {
213
+ jQuery('#b2sProFeatureModal').modal('show');
214
+ jQuery('#b2sProFeatureModal').find('.modal-title').html(jQuery(this).attr('data-title'));
215
+ jQuery('#b2sProFeatureModal').find('.modal-body').hide();
216
+ jQuery('#b2sProFeatureModal').find('.' + jQuery(this).attr('data-type')).show();
217
});
218
219
jQuery(document).on('heartbeat-send', function (e, data) {
assets/js/b2s/network.js CHANGED
@@ -268,7 +268,7 @@ jQuery(document).on('click', '.b2s-network-item-team-btn-manage', function () {
268
}
269
270
} else {
271
- if(data.error == 'nonce') {
272
jQuery('.b2s-nonce-check-fail').show();
273
}
274
jQuery('.b2s-loading-area-manage-auth-team-modal').hide();
@@ -762,6 +762,9 @@ function loginSuccess(networkId, networkType, displayName, networkAuthId, mandan
762
'action': 'b2s_network_save_auth_to_settings',
763
'mandandId': mandandId,
764
'networkAuthId': networkAuthId,
765
'b2s_security_nonce': jQuery('#b2s_security_nonce').val()
766
},
767
error: function () {
@@ -807,7 +810,7 @@ function loginSuccess(networkId, networkType, displayName, networkAuthId, mandan
807
html += '<a class="b2s-network-item-auth-list-btn-delete b2s-add-padding-network-delete pull-right" data-network-type="' + networkType + '" data-network-id="' + networkId + '" data-network-auth-id="' + networkAuthId + '" href="#"><span class="glyphicon glyphicon-trash glyphicon-grey"></span></a>';
808
809
if (jQuery('#b2sUserVersion').val() == '0') {
810
- html += '<span class="b2s-sched-manager-premium-area pull-right hidden-xs" style="width: 240px;"><span class="label label-success"><a href="#" class="btn-label-premium" data-toggle="modal" data-target="#b2sInfoSchedTimesModal">PREMIUM</a></span></span>';
811
} else {
812
html += '<span class="b2s-sched-manager-time-area pull-right b2s-sched-manager-add-padding hidden-xs" style="margin-right:30px !important;">';
813
html += '<input class="form-control b2s-box-sched-time-input b2s-settings-sched-item-input-time" type="text" value="' + time + '" readonly data-network-auth-id="' + networkAuthId + '" data-network-mandant-id="' + mandandId + '" data-network-id="' + networkId + '" data-network-type="' + networkType + '" name="b2s-user-sched-data[time][' + networkAuthId + ']">';
@@ -826,7 +829,9 @@ function loginSuccess(networkId, networkType, displayName, networkAuthId, mandan
826
var newCount = parseInt(networkCount) + 1;
827
jQuery('.b2s-network-auth-count-current[data-network-id="' + networkId + '"').text(newCount);
828
init();
829
- saveTimeSettings();
830
831
//Update
832
} else {
@@ -845,6 +850,13 @@ function loginSuccess(networkId, networkType, displayName, networkAuthId, mandan
845
jQuery('.b2s-network-item-auth-list-li[data-network-auth-id="' + networkAuthId + '"][data-network-mandant-id="' + mandandId + '"][data-network-id="' + networkId + '"][data-network-type="' + networkType + '"]').removeClass('b2s-label-danger-border-left').addClass('b2s-label-success-border-left');
846
}
847
}
848
}
849
850
@@ -978,7 +990,7 @@ jQuery(document).on('click', '.b2s-edit-template-btn', function () {
978
jQuery('.b2s-edit-template-save-btn').removeClass('b2s-btn-disabled');
979
}
980
} else {
981
- if(data.error == 'nonce') {
982
jQuery('.b2s-nonce-check-fail').show();
983
}
984
}
@@ -1172,6 +1184,18 @@ jQuery(document).on('click', '.b2s-edit-template-save-btn', function () {
1172
return false;
1173
}
1174
1175
jQuery('.b2s-edit-template-content').hide();
1176
jQuery('.b2s-edit-template-save-btn').hide();
1177
jQuery('.b2s-edit-template-save-success').hide();
@@ -1235,8 +1259,9 @@ jQuery('#b2sInfoFormat').on('hidden.bs.modal', function () {
1235
jQuery('body').addClass('modal-open');
1236
});
1237
1238
- jQuery('#b2sInfoFormat').on('show.bs.modal', function (event) {
1239
- var id = jQuery(event.relatedTarget).attr('data-network-id');
1240
jQuery('.b2sInfoFormatText').hide();
1241
jQuery('.b2sInfoFormatText[data-network-id="' + id + '"]').show();
1242
});
@@ -1249,7 +1274,21 @@ jQuery('#b2sInfoCharacterLimit').on('hidden.bs.modal', function () {
1249
});
1250
1251
1252
- jQuery(document).on('click', '.b2s-auth-network-6-login-btn', function() {
1253
jQuery('.b2s-loading-area').show();
1254
jQuery('.b2s-auth-network-6-login-area').hide();
1255
jQuery('.b2s-auth-network-6-login-btn').hide();
@@ -1264,6 +1303,7 @@ jQuery(document).on('click', '.b2s-auth-network-6-login-btn', function() {
1264
'action': 'b2s_auth_network_login',
1265
'username': jQuery('#b2s-auth-network-6-username').val(),
1266
'password': jQuery('#b2s-auth-network-6-password').val(),
1267
'b2s_security_nonce': jQuery('#b2s_security_nonce').val()
1268
},
1269
error: function () {
@@ -1286,8 +1326,8 @@ jQuery(document).on('click', '.b2s-auth-network-6-login-btn', function() {
1286
if (data.error == 'nonce') {
1287
jQuery('.b2s-nonce-check-fail').show();
1288
}
1289
- if(typeof data.error != 'undefined' && data.error != ''){
1290
- jQuery('.b2s-auth-network-6-info[data-info="'+data.error+'"]').show();
1291
return false;
1292
}
1293
jQuery('.b2s-auth-network-6-info[data-info="login"]').show();
@@ -1296,7 +1336,7 @@ jQuery(document).on('click', '.b2s-auth-network-6-login-btn', function() {
1296
});
1297
});
1298
1299
- jQuery(document).on('click', '.b2s-auth-network-6-confirm-btn', function() {
1300
jQuery('.b2s-loading-area').show();
1301
jQuery('.b2s-auth-network-6-login-area').hide();
1302
jQuery('.b2s-auth-network-6-login-btn').hide();
@@ -1333,7 +1373,7 @@ jQuery(document).on('click', '.b2s-auth-network-6-confirm-btn', function() {
1333
jQuery('.b2s-nonce-check-fail').show();
1334
}
1335
if (typeof data.error != 'undefined' && data.error != '') {
1336
- jQuery('.b2s-auth-network-6-info[data-info="'+data.error+'"]').show();
1337
return false;
1338
}
1339
jQuery('.b2s-auth-network-6-info[data-info="default"]').show();
@@ -1342,12 +1382,30 @@ jQuery(document).on('click', '.b2s-auth-network-6-confirm-btn', function() {
1342
});
1343
});
1344
1345
- jQuery(document).on('click', '.b2s-network-auth-btn[data-auth-method="client"]', function() {
1346
jQuery('#b2s-auth-network-6-mandant-id').val(jQuery(this).attr('data-network-mandant-id'));
1347
jQuery('#b2sAuthNetwork6Modal').modal('show');
1348
});
1349
1350
- jQuery(document).on('click', '.b2s-network-auth-update-btn[data-auth-method="client"]', function() {
1351
jQuery('#b2s-auth-network-6-auth-id').val(jQuery(this).attr('data-network-auth-id'));
1352
jQuery('#b2s-auth-network-6-mandant-id').val(jQuery(this).attr('data-network-mandant-id'));
1353
jQuery('#b2sAuthNetwork6Modal').modal('show');
268
}
269
270
} else {
271
+ if (data.error == 'nonce') {
272
jQuery('.b2s-nonce-check-fail').show();
273
}
274
jQuery('.b2s-loading-area-manage-auth-team-modal').hide();
762
'action': 'b2s_network_save_auth_to_settings',
763
'mandandId': mandandId,
764
'networkAuthId': networkAuthId,
765
+ 'networkId': networkId,
766
+ 'networkType': networkType,
767
+ 'displayName': displayName,
768
'b2s_security_nonce': jQuery('#b2s_security_nonce').val()
769
},
770
error: function () {
810
html += '<a class="b2s-network-item-auth-list-btn-delete b2s-add-padding-network-delete pull-right" data-network-type="' + networkType + '" data-network-id="' + networkId + '" data-network-auth-id="' + networkAuthId + '" href="#"><span class="glyphicon glyphicon-trash glyphicon-grey"></span></a>';
811
812
if (jQuery('#b2sUserVersion').val() == '0') {
813
+ html += '<span class="b2s-sched-manager-premium-area pull-right hidden-xs" style="width: 240px;"><span class="label label-success"><a href="#" class="btn-label-premium b2sInfoSchedTimesModalBtn">SMART</a></span></span>';
814
} else {
815
html += '<span class="b2s-sched-manager-time-area pull-right b2s-sched-manager-add-padding hidden-xs" style="margin-right:30px !important;">';
816
html += '<input class="form-control b2s-box-sched-time-input b2s-settings-sched-item-input-time" type="text" value="' + time + '" readonly data-network-auth-id="' + networkAuthId + '" data-network-mandant-id="' + mandandId + '" data-network-id="' + networkId + '" data-network-type="' + networkType + '" name="b2s-user-sched-data[time][' + networkAuthId + ']">';
829
var newCount = parseInt(networkCount) + 1;
830
jQuery('.b2s-network-auth-count-current[data-network-id="' + networkId + '"').text(newCount);
831
init();
832
+ if (jQuery('#b2sUserVersion').val() >= 1) {
833
+ saveTimeSettings();
834
+ }
835
836
//Update
837
} else {
850
jQuery('.b2s-network-item-auth-list-li[data-network-auth-id="' + networkAuthId + '"][data-network-mandant-id="' + mandandId + '"][data-network-id="' + networkId + '"][data-network-type="' + networkType + '"]').removeClass('b2s-label-danger-border-left').addClass('b2s-label-success-border-left');
851
}
852
}
853
+ //Update other Auth with same networkId, networkType and displayName (only optical)
854
+ jQuery('.b2s-network-item-auth-list-li[data-network-id="' + networkId + '"][data-network-type="' + networkType + '"]').each(function () {
855
+ if (jQuery(this).find('.b2s-network-item-auth-user-name').html() == displayName) {
856
+ jQuery(this).removeClass('b2s-label-danger-border-left').addClass('b2s-label-success-border-left');
857
+ jQuery(this).find('.b2s-network-auth-list-info[data-b2s-auth-info="isInterrupted"]').hide();
858
+ }
859
+ });
860
}
861
862
990
jQuery('.b2s-edit-template-save-btn').removeClass('b2s-btn-disabled');
991
}
992
} else {
993
+ if (data.error == 'nonce') {
994
jQuery('.b2s-nonce-check-fail').show();
995
}
996
}
1184
return false;
1185
}
1186
1187
+ if (jQuery('#b2s-edit-template-network-id').val() == 12) {
1188
+ var matches = jQuery('.b2s-edit-template-post-content').val().match(/#/g);
1189
+ if (matches != null && matches.length > 30) {
1190
+ jQuery('.b2s-edit-template-post-content').addClass('error');
1191
+ jQuery('.b2s-edit-template-hashtag-warning').show();
1192
+ return false;
1193
+ } else {
1194
+ jQuery('.b2s-edit-template-post-content').removeClass('error');
1195
+ jQuery('.b2s-edit-template-hashtag-warning').hide();
1196
+ }
1197
+ }
1198
+
1199
jQuery('.b2s-edit-template-content').hide();
1200
jQuery('.b2s-edit-template-save-btn').hide();
1201
jQuery('.b2s-edit-template-save-success').hide();
1259
jQuery('body').addClass('modal-open');
1260
});
1261
1262
+ jQuery(document).on('click', '.b2sInfoFormatBtn', function () {
1263
+ jQuery('#b2sInfoFormat').modal('show');
1264
+ var id = jQuery(this).attr('data-network-id');
1265
jQuery('.b2sInfoFormatText').hide();
1266
jQuery('.b2sInfoFormatText[data-network-id="' + id + '"]').show();
1267
});
1274
});
1275
1276
1277
+ jQuery(document).on('click', '.b2s-auth-network-6-login-btn', function () {
1278
+ jQuery('#b2s-auth-network-6-username').removeClass('error');
1279
+ jQuery('#b2s-auth-network-6-password').removeClass('error');
1280
+ var loginDataCheck = true;
1281
+ if (jQuery('#b2s-auth-network-6-username').val() == '') {
1282
+ jQuery('#b2s-auth-network-6-username').addClass('error');
1283
+ loginDataCheck = false;
1284
+ }
1285
+ if (jQuery('#b2s-auth-network-6-password').val() == '') {
1286
+ jQuery('#b2s-auth-network-6-password').addClass('error');
1287
+ loginDataCheck = false;
1288
+ }
1289
+ if (!loginDataCheck) {
1290
+ return false;
1291
+ }
1292
jQuery('.b2s-loading-area').show();
1293
jQuery('.b2s-auth-network-6-login-area').hide();
1294
jQuery('.b2s-auth-network-6-login-btn').hide();
1303
'action': 'b2s_auth_network_login',
1304
'username': jQuery('#b2s-auth-network-6-username').val(),
1305
'password': jQuery('#b2s-auth-network-6-password').val(),
1306
+ 'location': jQuery('#b2s-auth-network-6-location').val(),
1307
'b2s_security_nonce': jQuery('#b2s_security_nonce').val()
1308
},
1309
error: function () {
1326
if (data.error == 'nonce') {
1327
jQuery('.b2s-nonce-check-fail').show();
1328
}
1329
+ if (typeof data.error != 'undefined' && data.error != '') {
1330
+ jQuery('.b2s-auth-network-6-info[data-info="' + data.error + '"]').show();
1331
return false;
1332
}
1333
jQuery('.b2s-auth-network-6-info[data-info="login"]').show();
1336
});
1337
});
1338
1339
+ jQuery(document).on('click', '.b2s-auth-network-6-confirm-btn', function () {
1340
jQuery('.b2s-loading-area').show();
1341
jQuery('.b2s-auth-network-6-login-area').hide();
1342
jQuery('.b2s-auth-network-6-login-btn').hide();
1373
jQuery('.b2s-nonce-check-fail').show();
1374
}
1375
if (typeof data.error != 'undefined' && data.error != '') {
1376
+ jQuery('.b2s-auth-network-6-info[data-info="' + data.error + '"]').show();
1377
return false;
1378
}
1379
jQuery('.b2s-auth-network-6-info[data-info="default"]').show();
1382
});
1383
});
1384
1385
+ jQuery(document).on('click', '.b2s-network-auth-btn[data-auth-method="client"]', function () {
1386
jQuery('#b2s-auth-network-6-mandant-id').val(jQuery(this).attr('data-network-mandant-id'));
1387
jQuery('#b2sAuthNetwork6Modal').modal('show');
1388
});
1389
+ jQuery(document).on('click', '.b2s-network-add-mandant-btn', function () {
1390
+ jQuery('#b2s-network-add-mandant').modal('show');
1391
+ });
1392
+ jQuery(document).on('click', '.b2sInfoSchedTimesModalBtn', function () {
1393
+ jQuery('#b2sInfoSchedTimesModal').modal('show');
1394
+ });
1395
+ jQuery(document).on('click', '.b2sInfoNetwork18Btn', function () {
1396
+ jQuery('#b2sInfoNetwork18').modal('show');
1397
+ });
1398
+ jQuery(document).on('click', '.b2sInfoNoCacheBtn', function () {
1399
+ jQuery('#b2sInfoNoCache').modal('show');
1400
+ });
1401
+ jQuery(document).on('click', '.b2sInfoContentBtn', function () {
1402
+ jQuery('#b2sInfoContent').modal('show');
1403
+ });
1404
+ jQuery(document).on('click', '.b2sInfoCharacterLimitBtn', function () {
1405
+ jQuery('#b2sInfoCharacterLimit').modal('show');
1406
+ });
1407
1408
+ jQuery(document).on('click', '.b2s-network-auth-update-btn[data-auth-method="client"]', function () {
1409
jQuery('#b2s-auth-network-6-auth-id').val(jQuery(this).attr('data-network-auth-id'));
1410
jQuery('#b2s-auth-network-6-mandant-id').val(jQuery(this).attr('data-network-mandant-id'));
1411
jQuery('#b2sAuthNetwork6Modal').modal('show');
assets/js/b2s/post.js CHANGED
@@ -651,7 +651,8 @@ function showEditSchedPost(b2s_id, post_id, network_auth_id, network_type, netwo
651
652
//if linkpost then show btn meta tags
653
var isMetaChecked = false;
654
- if (network_id == "1" && jQuery('#isOgMetaChecked').val() == "1") {
655
isMetaChecked = true;
656
}
657
if (network_id == "2" && jQuery('#isCardMetaChecked').val() == "1") {
@@ -661,7 +662,7 @@ function showEditSchedPost(b2s_id, post_id, network_auth_id, network_type, netwo
661
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", false);
662
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", false);
663
jQuery('.b2s-post-item-details-preview-url-reload[data-network-id="' + network_id + '"]').show();
664
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-id="' + network_id + '"]').trigger("click");
665
var dataMetaType = jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + network_auth_id + '"]').attr("data-meta-type");
666
if (dataMetaType == "og") {
667
jQuery('.b2sChangeOgMeta[data-network-auth-id="' + network_auth_id + '"]').val("1");
@@ -705,41 +706,6 @@ function showEditSchedPost(b2s_id, post_id, network_auth_id, network_type, netwo
705
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').show();
706
}
707
}
708
-
709
- if (network_id == "3") {
710
- if (jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').val() == "0") {
711
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').show();
712
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').trigger("click");
713
- jQuery('.linkedin-url-title[data-network-auth-id="' + network_auth_id + '"]').show();
714
- jQuery('.linkedin-url-desc[data-network-auth-id="' + network_auth_id + '"]').hide(); //not showing on linkedin
715
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').hide();
716
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + network_auth_id + '"]').hide();
717
- } else {
718
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').hide();
719
- jQuery('.linkedin-url-title[data-network-auth-id="' + network_auth_id + '"]').hide();
720
- jQuery('.linkedin-url-desc[data-network-auth-id="' + network_auth_id + '"]').hide();
721
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').show();
722
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + network_auth_id + '"]').show();
723
- }
724
- }
725
-
726
- if (network_id == "19" && network_type == "0") {
727
- if (jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').val() == "0") {
728
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').show();
729
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').trigger("click");
730
- jQuery('.xing-url-title[data-network-auth-id="' + network_auth_id + '"]').show();
731
- jQuery('.xing-url-desc[data-network-auth-id="' + network_auth_id + '"]').show();
732
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').hide();
733
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + network_auth_id + '"]').hide();
734
- } else {
735
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').hide();
736
- jQuery('.xing-url-title[data-network-auth-id="' + network_auth_id + '"]').hide();
737
- jQuery('.xing-url-desc[data-network-auth-id="' + network_auth_id + '"]').hide();
738
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').show();
739
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + network_auth_id + '"]').show();
740
- }
741
- }
742
-
743
}
744
var textLimit = jQuery('.b2s-post-item-details-item-message-input[data-network-count="-1"][data-network-auth-id="' + network_auth_id + '"]').attr('data-network-text-limit');
745
if (textLimit != "0") {
651
652
//if linkpost then show btn meta tags
653
var isMetaChecked = false;
654
+ var ogMetaNetworks = jQuery('#ogMetaNetworks').val().split(";");
655
+ if (typeof network_id != 'undefined' && jQuery.inArray(network_id.toString(), ogMetaNetworks) != -1 && jQuery('#isOgMetaChecked').val() == "1") {
656
isMetaChecked = true;
657
}
658
if (network_id == "2" && jQuery('#isCardMetaChecked').val() == "1") {
662
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", false);
663
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", false);
664
jQuery('.b2s-post-item-details-preview-url-reload[data-network-id="' + network_id + '"]').show();
665
+ //jQuery('.b2s-post-item-details-preview-url-reload[data-network-id="' + network_id + '"]').trigger("click");
666
var dataMetaType = jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + network_auth_id + '"]').attr("data-meta-type");
667
if (dataMetaType == "og") {
668
jQuery('.b2sChangeOgMeta[data-network-auth-id="' + network_auth_id + '"]').val("1");
706
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').show();
707
}
708
}
709
}
710
var textLimit = jQuery('.b2s-post-item-details-item-message-input[data-network-count="-1"][data-network-auth-id="' + network_auth_id + '"]').attr('data-network-text-limit');
711
if (textLimit != "0") {
assets/js/b2s/settings.js CHANGED
@@ -627,3 +627,25 @@ function loginSuccessShortener(providerId, displayName) {
627
jQuery('#b2s-user-network-settings-short-url').val("0");
628
jQuery('#b2s-user-network-shortener-state[data-provider-id="0"]').val("1");
629
}
627
jQuery('#b2s-user-network-settings-short-url').val("0");
628
jQuery('#b2s-user-network-shortener-state[data-provider-id="0"]').val("1");
629
}
630
+
631
+ jQuery(document).on('click', '.b2sInfoTimeZoneModalBtn', function () {
632
+ jQuery('#b2sInfoTimeZoneModal').modal('show');
633
+ });
634
+ jQuery(document).on('click', '.b2sInfoUrlShortenerModalBtn', function () {
635
+ jQuery('#b2sInfoUrlShortenerModal').modal('show');
636
+ });
637
+ jQuery(document).on('click', '.b2sInfoAllowShortcodeModalBtn', function () {
638
+ jQuery('#b2sInfoAllowShortcodeModal').modal('show');
639
+ });
640
+ jQuery(document).on('click', '.b2sInfoAllowHashTagModalBtn', function () {
641
+ jQuery('#b2sInfoAllowHashTagModal').modal('show');
642
+ });
643
+ jQuery(document).on('click', '.b2sInfoLegacyModeBtn', function () {
644
+ jQuery('#b2sInfoLegacyMode').modal('show');
645
+ });
646
+ jQuery(document).on('click', '.b2sInfoAutoPosterMModalBtn', function () {
647
+ jQuery('#b2sInfoAutoPosterMModal').modal('show');
648
+ });
649
+ jQuery(document).on('click', '.b2sInfoAutoPosterAModalBtn', function () {
650
+ jQuery('#b2sInfoAutoPosterAModal').modal('show');
651
+ });
assets/js/b2s/ship.js CHANGED
@@ -1,6 +1,7 @@
1
jQuery.noConflict();
2
3
var b2sTosXingGroupCount = 0;
4
5
jQuery(document).on('heartbeat-send', function (e, data) {
6
data['b2s_heartbeat'] = 'b2s_listener';
@@ -94,6 +95,7 @@ jQuery.sceditor.command.set(
94
var content = "<img class='b2s-post-item-network-image-selected-account' height='22px' src='" + jQuery('.b2s-post-item-network-image[data-network-auth-id="' + networkAuthId + '"]').attr('src') + "' /> " + jQuery('.b2s-post-item-details-network-display-name[data-network-auth-id="' + networkAuthId + '"]').html();
95
jQuery('.b2s-selected-network-for-image-info').html(content);
96
jQuery('#b2s-network-select-image').modal('show');
97
jQuery('#b2sInsertImageType').val("1");
98
imageSize();
99
@@ -342,7 +344,8 @@ jQuery(document).on('click', '.change-meta-tag', function () {
342
var postFormat = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').val();
343
var networkId = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').attr("data-network-id");
344
var isMetaChecked = false;
345
- if (networkId == "1" && jQuery('#isOgMetaChecked').val() == "1") {
346
isMetaChecked = true;
347
}
348
if (networkId == "2" && jQuery('#isCardMetaChecked').val() == "1") {
@@ -369,19 +372,10 @@ jQuery(document).on('click', '.change-meta-tag', function () {
369
jQuery(document).on('keyup', '.change-meta-tag', function () {
370
var currentText = jQuery(this).val();
371
var metaTag = jQuery(this).attr('data-meta');
372
- var networkAuthId = jQuery(this).attr('data-network-auth-id');
373
- var postFormat = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').val();
374
- var networkId = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').attr('data-network-id');
375
- if (typeof postFormat !== typeof undefined && postFormat !== false) {
376
- if (postFormat == "0") { //if linkpost
377
- jQuery('.b2s-post-item-details-post-format[data-network-id=' + networkId + ']').each(function () {
378
- if (jQuery(this).val() == "0" && jQuery('.b2s-post-ship-item-post-format[data-network-auth-id=' + jQuery(this).attr('data-network-auth-id') + ']').is(":visible") && jQuery(this).attr('data-network-auth-id') != networkAuthId) { //other Linkpost by same network
379
- //override this content with current content by keyup
380
- jQuery('.' + metaTag + '[data-network-auth-id=' + jQuery(this).attr('data-network-auth-id') + ']').val(currentText);
381
- }
382
- });
383
- }
384
- }
385
return false;
386
});
387
jQuery(document).on('click', '.b2s-get-settings-sched-time-user', function () {
@@ -619,6 +613,29 @@ jQuery(document).on("click", ".b2s-user-network-settings-post-format", function
619
jQuery('.b2s-post-ship-item-post-format-text[data-network-id="' + networkId + '"]').html(postFormatText[postFormatType][postFormat]);
620
jQuery('.b2s-post-item-details-post-format[data-network-id="' + networkId + '"]').val(postFormat);
621
}
622
}
623
var textLimit = jQuery('.b2s-post-item-details-item-message-input[data-network-count="-1"][data-network-auth-id="' + networkAuthId + '"]').attr('data-network-text-limit');
624
if (textLimit != "0") {
@@ -629,7 +646,8 @@ jQuery(document).on("click", ".b2s-user-network-settings-post-format", function
629
630
//Edit Meta Tags
631
var isMetaChecked = false;
632
- if (networkId == "1" && jQuery('#isOgMetaChecked').val() == "1") {
633
isMetaChecked = true;
634
}
635
if (networkId == "2" && jQuery('#isCardMetaChecked').val() == "1") {
@@ -638,7 +656,7 @@ jQuery(document).on("click", ".b2s-user-network-settings-post-format", function
638
if (isMetaChecked && postFormat == '0' && jQuery('#user_version').val() > 0) { //If linkpost
639
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", false);
640
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", false);
641
- var dataMetaType = jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + networkAuthId + '"]').attr("data-meta-type");
642
if (dataMetaType == "og") {
643
jQuery('#b2sChangeOgMeta').val("1");
644
} else {
@@ -650,7 +668,6 @@ jQuery(document).on("click", ".b2s-user-network-settings-post-format", function
650
if (jQuery(this).val() == "0" && jQuery('.b2s-post-ship-item-post-format[data-network-auth-id=' + jQuery(this).attr('data-network-auth-id') + ']').is(":visible") && jQuery(this).attr('data-network-auth-id') != networkAuthId) { //other Linkpost by same network
651
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + networkAuthId + '"]').val(jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
652
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + networkAuthId + '"]').val(jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
653
- jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + networkAuthId + '"]').attr('src', jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').attr('src'));
654
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val(jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
655
if (jQuery('.b2s-image-remove-btn[data-network-count="-1"][data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]:visible').length == 1) {
656
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="-1"]').show();
@@ -671,9 +688,7 @@ jQuery(document).on("click", ".b2s-user-network-settings-post-format", function
671
}
672
}
673
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').show();
674
- if (!jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').hasClass('disabled')) {
675
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').trigger("click");
676
- } else {
677
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').removeClass('disabled');
678
}
679
}
@@ -719,60 +734,10 @@ jQuery(document).on("click", ".b2s-user-network-settings-post-format", function
719
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
720
}
721
}
722
-
723
- if (networkId == "3") {
724
- if (postFormat == '0' && jQuery('#user_version').val() > 0) {
725
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').show();
726
- if (!jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').hasClass('disabled')) {
727
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').trigger("click");
728
- } else {
729
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').removeClass('disabled');
730
- }
731
- jQuery('.linkedin-url-title[data-network-auth-id="' + networkAuthId + '"]').show();
732
- jQuery('.linkedin-url-desc[data-network-auth-id="' + networkAuthId + '"]').hide(); //not showing on linkedin
733
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').hide();
734
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"]').hide();
735
- } else {
736
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').hide();
737
- jQuery('.linkedin-url-title[data-network-auth-id="' + networkAuthId + '"]').hide();
738
- jQuery('.linkedin-url-desc[data-network-auth-id="' + networkAuthId + '"]').hide();
739
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').show();
740
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"]').show();
741
- }
742
- if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').val() == 1) {
743
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
744
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
745
- }
746
- }
747
-
748
- if (networkId == "19" && networkType == "0") {
749
- if (postFormat == '0' && jQuery('#user_version').val() > 0) {
750
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').show();
751
- if (!jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').hasClass('disabled')) {
752
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').trigger("click");
753
- } else {
754
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').removeClass('disabled');
755
- }
756
- jQuery('.xing-url-title[data-network-auth-id="' + networkAuthId + '"]').show();
757
- jQuery('.xing-url-desc[data-network-auth-id="' + networkAuthId + '"]').show();
758
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').hide();
759
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"]').hide();
760
- } else {
761
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').hide();
762
- jQuery('.xing-url-title[data-network-auth-id="' + networkAuthId + '"]').hide();
763
- jQuery('.xing-url-desc[data-network-auth-id="' + networkAuthId + '"]').hide();
764
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').show();
765
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"]').show();
766
- }
767
- if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').val() == 1) {
768
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
769
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
770
- }
771
- }
772
-
773
jQuery('.b2s-user-network-settings-post-format[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').removeClass('b2s-settings-checked');
774
jQuery(this).addClass('b2s-settings-checked');
775
jQuery('#b2s-post-ship-item-post-format-modal').modal('hide');
776
return false;
777
});
778
jQuery(document).on("click", ".b2s-post-ship-item-full-text", function () {
@@ -839,6 +804,7 @@ jQuery(document).on("click", ".b2s-network-select-btn", function () {
839
var networkAuthId = jQuery(this).attr('data-network-auth-id');
840
var networkId = jQuery(this).attr('data-network-id');
841
var networkType = jQuery(this).attr('data-network-type');
842
843
//doppelklick Schutz
844
if (!jQuery(this).hasClass('b2s-network-select-btn-deactivate')) {
@@ -857,7 +823,7 @@ jQuery(document).on("click", ".b2s-network-select-btn", function () {
857
if (jQuery('.b2s-post-item[data-network-auth-id="' + networkAuthId + '"]').length > 0 && !jQuery('.b2s-post-item[data-network-auth-id="' + networkAuthId + '"]').hasClass('b2s-post-item-connection-fail-dummy')) {
858
activatePortal(networkAuthId);
859
//PostFormat
860
- if (jQuery('.b2s-post-ship-item-post-format-text[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').length > 0) {
861
var postFormatText = JSON.parse(jQuery('.b2sNetworkSettingsPostFormatText').val());
862
var postFormatType = jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').attr('data-post-format-type');
863
if (jQuery('#user_version').val() >= 2) {
@@ -865,7 +831,8 @@ jQuery(document).on("click", ".b2s-network-select-btn", function () {
865
jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + networkAuthId + '"]').val(jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').val());
866
//if linkpost then show btn meta tags
867
var isMetaChecked = false;
868
- if (networkId == "1" && jQuery('#isOgMetaChecked').val() == "1") {
869
isMetaChecked = true;
870
}
871
if (networkId == "2" && jQuery('#isCardMetaChecked').val() == "1") {
@@ -874,7 +841,7 @@ jQuery(document).on("click", ".b2s-network-select-btn", function () {
874
if (isMetaChecked && jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').val() == "0") {
875
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", false);
876
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", false);
877
- var dataMetaType = jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + networkAuthId + '"]').attr("data-meta-type");
878
if (dataMetaType == "og") {
879
jQuery('#b2sChangeOgMeta').val("1");
880
} else {
@@ -882,8 +849,8 @@ jQuery(document).on("click", ".b2s-network-select-btn", function () {
882
}
883
884
//Copy from further item meta tags by same network
885
- jQuery('.b2s-post-item-details-post-format[data-network-id=' + networkId + ']').each(function () {
886
- if (jQuery(this).val() == "0" && jQuery('.b2s-post-ship-item-post-format[data-network-auth-id=' + jQuery(this).attr('data-network-auth-id') + ']').is(":visible") && jQuery(this).attr('data-network-auth-id') != networkAuthId) { //other Linkpost by same network
887
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + networkAuthId + '"]').val(jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
888
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + networkAuthId + '"]').val(jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
889
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + networkAuthId + '"]').attr('src', jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').attr('src'));
@@ -908,48 +875,6 @@ jQuery(document).on("click", ".b2s-network-select-btn", function () {
908
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').hide();
909
}
910
911
- if (networkId == "3") {
912
- if (jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').val() == "0") {
913
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').show();
914
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').trigger("click");
915
- jQuery('.linkedin-url-title[data-network-auth-id="' + networkAuthId + '"]').show();
916
- jQuery('.linkedin-url-desc[data-network-auth-id="' + networkAuthId + '"]').hide(); //not showing on linkedin
917
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').hide();
918
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"]').hide();
919
- } else {
920
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').hide();
921
- jQuery('.linkedin-url-title[data-network-auth-id="' + networkAuthId + '"]').hide();
922
- jQuery('.linkedin-url-desc[data-network-auth-id="' + networkAuthId + '"]').hide();
923
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').show();
924
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"]').show();
925
- }
926
- if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').val() == 1) {
927
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
928
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
929
- }
930
- }
931
-
932
- if (networkId == "19" && networkType == "0") {
933
- if (jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').val() == "0") {
934
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').show();
935
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').trigger("click");
936
- jQuery('.xing-url-title[data-network-auth-id="' + networkAuthId + '"]').show();
937
- jQuery('.xing-url-desc[data-network-auth-id="' + networkAuthId + '"]').show();
938
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').hide();
939
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"]').hide();
940
- } else {
941
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').hide();
942
- jQuery('.xing-url-title[data-network-auth-id="' + networkAuthId + '"]').hide();
943
- jQuery('.xing-url-desc[data-network-auth-id="' + networkAuthId + '"]').hide();
944
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').show();
945
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"]').show();
946
- }
947
- if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').val() == 1) {
948
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
949
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
950
- }
951
- }
952
-
953
} else {
954
jQuery('.b2s-post-ship-item-post-format-text[data-network-id="' + networkId + '"]').html(postFormatText[postFormatType][jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').val()]);
955
jQuery('.b2s-post-item-details-post-format[data-network-id="' + networkId + '"]').val(jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').val());
@@ -996,13 +921,13 @@ jQuery(document).on("click", ".b2s-network-select-btn", function () {
996
//Twitter TOS 032018 - protected multiple accounts with same content to same time
997
//delete comment field one more
998
if (networkId == 2) {
999
- if (jQuery('.tw-textarea-input[data-network-id="' + networkId + '"]:visible').length == 1) {
1000
jQuery('.tw-textarea-input[data-network-auth-id="' + networkAuthId + '"]').text(jQuery('#b2sTwitterOrginalPost').val());
1001
} else {
1002
jQuery('.tw-textarea-input[data-network-auth-id="' + networkAuthId + '"]').text("");
1003
}
1004
}
1005
-
1006
} else {
1007
jQuery(this).addClass('b2s-network-select-btn-deactivate');
1008
jQuery('.b2s-network-status-img-loading[data-network-auth-id="' + networkAuthId + '"]').show();
@@ -1128,7 +1053,16 @@ jQuery(document).on("click", ".b2s-network-select-btn", function () {
1128
//Bild setzen
1129
if (jQuery('#b2s_blog_default_image').val() != "") {
1130
if (jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').length > 0) {
1131
- jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').attr('src', jQuery('#b2s_blog_default_image').val());
1132
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + data.networkAuthId + '"]').val() == 1) {
1133
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').hide();
1134
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="0"]').show();
@@ -1142,14 +1076,15 @@ jQuery(document).on("click", ".b2s-network-select-btn", function () {
1142
//Time zone
1143
jQuery('.b2s-settings-time-zone-text').html(jQuery('#user_timezone_text').val());
1144
//PostFormat
1145
- if (jQuery('.b2s-post-ship-item-post-format-text[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').length > 0) {
1146
var postFormatText = JSON.parse(jQuery('.b2sNetworkSettingsPostFormatText').val());
1147
var postFormatType = jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').attr('data-post-format-type');
1148
if (jQuery('#user_version').val() >= 2) {
1149
jQuery('.b2s-post-ship-item-post-format-text[data-network-auth-id="' + data.networkAuthId + '"]').html(postFormatText[postFormatType][jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').val()]);
1150
jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + data.networkAuthId + '"]').val(jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').val());
1151
var isMetaChecked = false;
1152
- if (data.networkId == "1" && jQuery('#isOgMetaChecked').val() == "1") {
1153
isMetaChecked = true;
1154
}
1155
if (data.networkId == "2" && jQuery('#isCardMetaChecked').val() == "1") {
@@ -1159,16 +1094,17 @@ jQuery(document).on("click", ".b2s-network-select-btn", function () {
1159
if (isMetaChecked && jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').val() == "0") {
1160
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + data.networkAuthId + '"]').prop("readonly", false);
1161
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + data.networkAuthId + '"]').prop("readonly", false);
1162
- var dataMetaType = jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + data.networkAuthId + '"]').attr("data-meta-type");
1163
if (dataMetaType == "og") {
1164
jQuery('#b2sChangeOgMeta').val("1");
1165
} else {
1166
jQuery('#b2sChangeCardMeta').val("1");
1167
}
1168
1169
//Copy from further item meta tags by same network
1170
- jQuery('.b2s-post-item-details-post-format[data-network-id=' + data.networkId + ']').each(function () {
1171
- if (jQuery(this).val() == "0" && jQuery('.b2s-post-ship-item-post-format[data-network-auth-id=' + jQuery(this).attr('data-network-auth-id') + ']').is(":visible") && jQuery(this).attr('data-network-auth-id') != data.networkAuthId) { //other Linkpost by same network
1172
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + data.networkAuthId + '"]').val(jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
1173
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + data.networkAuthId + '"]').val(jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
1174
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').attr('src', jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').attr('src'));
@@ -1192,51 +1128,6 @@ jQuery(document).on("click", ".b2s-network-select-btn", function () {
1192
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + data.networkAuthId + '"]').hide();
1193
}
1194
1195
- if (data.networkId == "3") {
1196
- if (jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').val() == "0") {
1197
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + data.networkAuthId + '"]').show();
1198
- if (data.draft == false) {
1199
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + data.networkAuthId + '"]').trigger("click");
1200
- }
1201
- jQuery('.linkedin-url-title[data-network-auth-id="' + data.networkAuthId + '"]').show();
1202
- jQuery('.linkedin-url-desc[data-network-auth-id="' + data.networkAuthId + '"]').hide(); // not showing on linkedin
1203
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"]').hide();
1204
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + data.networkAuthId + '"]').hide();
1205
- } else {
1206
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + data.networkAuthId + '"]').hide();
1207
- jQuery('.linkedin-url-title[data-network-auth-id="' + data.networkAuthId + '"]').hide();
1208
- jQuery('.linkedin-url-desc[data-network-auth-id="' + data.networkAuthId + '"]').hide();
1209
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"]').show();
1210
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + data.networkAuthId + '"]').show();
1211
- }
1212
- if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + data.networkAuthId + '"]').val() == 1) {
1213
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').hide();
1214
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').hide();
1215
- }
1216
- }
1217
- if (data.networkId == "19" && data.networkType == "0") {
1218
- if (jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').val() == "0") {
1219
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + data.networkAuthId + '"]').show();
1220
- if (data.draft == false) {
1221
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + data.networkAuthId + '"]').trigger("click");
1222
- }
1223
- jQuery('.xing-url-title[data-network-auth-id="' + data.networkAuthId + '"]').show();
1224
- jQuery('.xing-url-desc[data-network-auth-id="' + data.networkAuthId + '"]').show();
1225
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"]').hide();
1226
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + data.networkAuthId + '"]').hide();
1227
- } else {
1228
- jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + data.networkAuthId + '"]').hide();
1229
- jQuery('.xing-url-title[data-network-auth-id="' + data.networkAuthId + '"]').hide();
1230
- jQuery('.xing-url-desc[data-network-auth-id="' + data.networkAuthId + '"]').hide();
1231
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"]').show();
1232
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + data.networkAuthId + '"]').show();
1233
- }
1234
- if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + data.networkAuthId + '"]').val() == 1) {
1235
- jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').hide();
1236
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').hide();
1237
- }
1238
- }
1239
-
1240
} else {
1241
jQuery('.b2s-post-ship-item-post-format-text[data-network-id="' + data.networkId + '"]').html(postFormatText[postFormatType][jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').val()]);
1242
jQuery('.b2s-post-item-details-post-format[data-network-id="' + data.networkId + '"]').val(jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').val());
@@ -1266,12 +1157,12 @@ jQuery(document).on("click", ".b2s-network-select-btn", function () {
1266
//Twitter TOS 032018 - protected multiple accounts with same content to same time
1267
//delete comment field one more
1268
if (data.networkId == 2) {
1269
- if (jQuery('.tw-textarea-input[data-network-id="' + data.networkId + '"]:visible').length > 1) {
1270
var firstAuth = jQuery('.b2s-post-item[data-network-id="' + data.networkId + '"]:first').attr('data-network-auth-id');
1271
if (firstAuth != data.networkAuthId) {
1272
jQuery('.tw-textarea-input[data-network-auth-id="' + data.networkAuthId + '"]').text("");
1273
} else {
1274
- if (jQuery('.tw-textarea-input[data-network-id="' + data.networkId + '"]:visible').length > 2) {
1275
jQuery('.tw-textarea-input[data-network-auth-id="' + data.networkAuthId + '"]').text("");
1276
}
1277
}
@@ -1311,6 +1202,14 @@ jQuery(document).on("click", ".b2s-network-select-btn", function () {
1311
}
1312
1313
jQuery.each(data.draftActions.sched_image_url, function (index, value) {
1314
if (value == "") {
1315
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + index + '"]').hide();
1316
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').attr('src', jQuery('.b2s-network-default-image').val());
@@ -1443,7 +1342,7 @@ jQuery(document).on("click", ".b2s-network-select-btn", function () {
1443
}
1444
1445
if (data.draftActions.image_url == "") {
1446
- jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
1447
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').attr('src', jQuery('.b2s-network-default-image').val());
1448
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').val("");
1449
} else {
@@ -1460,7 +1359,14 @@ jQuery(document).on("click", ".b2s-network-select-btn", function () {
1460
}
1461
}
1462
//XING TOS Group
1463
- jQuery('.b2s-content-info[data-network-auth-id="' + data.networkAuthId + '"').show();
1464
1465
} else {
1466
if (data.error == 'nonce') {
@@ -1477,7 +1383,7 @@ jQuery(document).on("click", ".b2s-network-select-btn", function () {
1477
}
1478
}
1479
}
1480
-
1481
}
1482
}
1483
});
@@ -1500,7 +1406,8 @@ jQuery(document).on('click', '.b2s-post-item-details-url-image', function () {
1500
var postFormat = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').val();
1501
var networkId = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').attr("data-network-id");
1502
var isMetaChecked = false;
1503
- if (networkId == "1" && jQuery('#isOgMetaChecked').val() == "1") {
1504
isMetaChecked = true;
1505
}
1506
if (networkId == "2" && jQuery('#isCardMetaChecked').val() == "1") {
@@ -1543,6 +1450,11 @@ jQuery(document).on('click', '.b2s-post-ship-item-post-format', function () {
1543
jQuery('#b2s-post-ship-item-post-format-modal').modal('show');
1544
jQuery('.b2s-user-network-settings-post-format').attr('data-network-auth-id', jQuery(this).attr('data-network-auth-id'));
1545
jQuery('.b2s-user-network-settings-post-format').attr('data-post-wp-type', jQuery(this).attr('data-post-wp-type'));
1546
} else {
1547
jQuery('#b2sInfoFormatModal').modal('show');
1548
}
@@ -1842,13 +1754,8 @@ jQuery(document).on('click', '.b2s-post-item-details-preview-url-reload', functi
1842
success: function (data) {
1843
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + data.networkAuthId + '"]').removeClass('glyphicon-refresh-animate');
1844
if (data.result == true) {
1845
- if (data.networkId == 3 || data.networkId == 19) { // LI,XI
1846
- jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + data.networkAuthId + '"]').html(data.title);
1847
- jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + data.networkAuthId + '"]').html(data.description);
1848
- } else {
1849
- jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + data.networkAuthId + '"]').val(data.title);
1850
- jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + data.networkAuthId + '"]').val(data.description);
1851
- }
1852
if (jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').attr('data-network-image-change') == '0') {
1853
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').attr('src', data.image);
1854
}
@@ -1860,6 +1767,7 @@ jQuery(document).on('click', '.b2s-post-item-details-preview-url-reload', functi
1860
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').attr('src', jQuery('#b2sDefaultNoImage').val());
1861
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + data.networkAuthId + '"]').val(jQuery('#b2sDefaultNoImage').val());
1862
}
1863
}
1864
} else {
1865
if (data.error == 'nonce') {
@@ -1874,13 +1782,17 @@ jQuery(document).on('click', '.b2s-post-item-details-preview-url-reload', functi
1874
}
1875
});
1876
jQuery(document).on('click', '.b2s-select-image-modal-open', function () {
1877
var metaType = jQuery(this).attr('data-meta-type');
1878
var authId = jQuery(this).attr('data-network-auth-id');
1879
var countId = jQuery(this).attr('data-network-count');
1880
var postFormat = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + authId + ']').val();
1881
var networkId = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + authId + ']').attr("data-network-id");
1882
var isMetaChecked = false;
1883
- if (networkId == "1" && jQuery('#isOgMetaChecked').val() == "1") {
1884
isMetaChecked = true;
1885
}
1886
if (networkId == "2" && jQuery('#isCardMetaChecked').val() == "1") {
@@ -1908,8 +1820,67 @@ jQuery(document).on('click', '.b2s-select-image-modal-open', function () {
1908
jQuery('#b2sInsertImageType').val("0");
1909
if (typeof metaType !== 'undefined') {
1910
jQuery('.b2s-image-change-this-network').attr('data-meta-type', metaType);
1911
} else {
1912
jQuery('.b2s-image-change-this-network').attr('data-meta-type', "");
1913
}
1914
//set selected image
1915
var selImageVal = jQuery('.b2s-post-item-details-url-image[data-network-count="' + countId + '"][data-network-auth-id="' + authId + '"]').attr('src');
@@ -1947,13 +1918,22 @@ jQuery(document).on('click', '.b2s-image-remove-btn', function () {
1947
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').hide();
1948
}
1949
});
1950
//customize sched content
1951
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + networkAuthId + '"]').attr('src', defaultImage);
1952
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val("");
1953
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').hide();
1954
}
1955
}
1956
-
1957
return false;
1958
});
1959
jQuery(document).on('click', '.b2s-image-change-this-network', function () {
@@ -2021,6 +2001,7 @@ jQuery(document).on('click', '.b2s-image-change-this-network', function () {
2021
jQuery('.b2s-upload-image-no-permission').hide();
2022
jQuery('.b2s-upload-image-free-version-info').hide();
2023
jQuery('#b2s-network-select-image').modal('hide');
2024
return false;
2025
});
2026
jQuery(document).on('change', '.b2s-post-item-details-relay', function () {
@@ -2115,15 +2096,26 @@ jQuery(document).on('click', '.b2s-image-change-all-network', function () {
2115
}
2116
}
2117
});
2118
- jQuery('.b2s-post-item-details-url-image[data-network-image-change="1"]').attr('src', jQuery('input[name=image_url]:checked').val());
2119
- jQuery('#b2s_blog_default_image').val(jQuery('input[name=image_url]:checked').val());
2120
- jQuery('.b2s-post-item-details-url-image').removeClass('b2s-img-required');
2121
- jQuery('.b2s-image-url-hidden-field').val(jQuery('input[name=image_url]:checked').val());
2122
- jQuery('.b2s-image-remove-btn').show();
2123
- var networkCountId = jQuery(this).attr('data-network-count');
2124
- if (networkCountId >= 0) {
2125
- jQuery('.b2s-image-remove-btn[data-network-count="-1"]').hide();
2126
}
2127
2128
jQuery('.b2s-upload-image-invalid-extension').hide();
2129
jQuery('.b2s-upload-image-no-permission').hide();
@@ -2131,9 +2123,21 @@ jQuery(document).on('click', '.b2s-image-change-all-network', function () {
2131
jQuery('.b2sChangeOgMeta').val("1");
2132
jQuery('.b2sChangeCardMeta').val("1");
2133
jQuery('#b2s-network-select-image').modal('hide');
2134
return false;
2135
});
2136
jQuery(document).on('click', '.b2s-upload-image', function () {
2137
if (typeof wp !== 'undefined' && wp.media && wp.media.editor) {
2138
jQuery('#b2s-network-select-image').modal('hide');
2139
wpMedia = wp.media({
@@ -2146,12 +2150,14 @@ jQuery(document).on('click', '.b2s-upload-image', function () {
2146
});
2147
wpMedia.open();
2148
wpMedia.on('select', function () {
2149
- var validExtensions = ['jpg', 'jpeg', 'png'];
2150
var attachment = wpMedia.state().get('selection').first().toJSON();
2151
var attachmenUrl = attachment.url;
2152
var attachmenUrlExt = attachmenUrl.substr(attachmenUrl.lastIndexOf('.') + 1);
2153
attachmenUrlExt = attachmenUrlExt.toLowerCase();
2154
- if (jQuery.inArray(attachmenUrlExt, validExtensions) == -1) {
2155
jQuery('#b2s-network-select-image').modal('show');
2156
jQuery('.b2s-upload-image-invalid-extension').show();
2157
jQuery('#b2s-upload-image-invalid-extension-file-name').html('<span class="glyphicon glyphicon-ban-circle"></span> ' + attachment.name + '.' + attachmenUrlExt + '<br>');
@@ -2174,7 +2180,7 @@ jQuery(document).on('click', '.b2s-upload-image', function () {
2174
'</div>' +
2175
'</div>';
2176
jQuery('.b2s-image-choose-area').html(jQuery('.b2s-image-choose-area').html() + content);
2177
- jQuery('.b2s-image-change-btn-area').show();
2178
jQuery('.b2s-choose-image-no-image-info-text').hide();
2179
jQuery('.b2s-choose-image-no-image-extra-btn').hide();
2180
jQuery('.b2s-upload-image-invalid-extension').hide();
@@ -2190,6 +2196,32 @@ jQuery(document).on('click', '.b2s-upload-image', function () {
2190
}
2191
return false;
2192
});
2193
jQuery(document).on('click', '.b2s-upload-image-free-version', function () {
2194
jQuery('.b2s-upload-image-free-version-info').show();
2195
});
@@ -2209,7 +2241,7 @@ jQuery.validator.addMethod("unique", function (value, element, params) {
2209
var curNetworkAuthId = jQuery(element).attr('data-network-auth-id');
2210
var curNetworkId = jQuery(element).attr('data-network-id');
2211
var prefix = params;
2212
- var selector = jQuery.validator.format("[name!='{0}'][unique='{1}']", element.name, prefix);
2213
var matches = new Array();
2214
2215
jQuery('.b2s-unique-content[data-network-id="' + curNetworkId + '"]').hide();
@@ -2222,14 +2254,13 @@ jQuery.validator.addMethod("unique", function (value, element, params) {
2222
}
2223
if (jQuery.trim(value) == jQuery.trim(jQuery(item).val())) {
2224
jQuery('.b2s-unique-content[data-network-auth-id="' + jQuery(item).attr('data-network-auth-id') + '"]').show();
2225
- jQuery('.tw-textarea-input[data-network-auth-id="' + jQuery(item).attr('data-network-auth-id') + '"]').addClass('error');
2226
matches.push(item);
2227
}
2228
});
2229
if (matches.length != 0) {
2230
jQuery('.b2s-unique-content[data-network-auth-id="' + curNetworkAuthId + '"]').show();
2231
}
2232
- return matches.length == 0;
2233
});
2234
2235
@@ -2343,7 +2374,7 @@ jQuery("#b2sNetworkSent").validate({
2343
return false;
2344
},
2345
success: function (data) {
2346
- if(data.error == 'nonce') {
2347
jQuery('.b2s-nonce-check-fail').show();
2348
return false;
2349
}
@@ -2446,7 +2477,6 @@ jQuery(document).on('click', '.b2s-loading-area-save-profile-change', function (
2446
window.addEventListener('message', function (e) {
2447
if (e.origin == jQuery('#b2sServerUrl').val()) {
2448
var data = JSON.parse(e.data);
2449
- console.log(data);
2450
if (typeof data.action !== typeof undefined && data.action == 'approve') {
2451
jQuery('.b2s-post-item-details-message-result[data-network-auth-id="' + data.networkAuthId + '"]').html("<br><span class=\"text-success\"><i class=\"glyphicon glyphicon-ok-circle\"></i> " + jQuery("#b2sJsTextPublish").val() + " </span>");
2452
jQuery.ajax({
@@ -3155,6 +3185,16 @@ function networkLimitAll(networkAuthId, networkId, limit) {
3155
limit = limit - url.length;
3156
}
3157
}
3158
3159
if (textLength >= limit) {
3160
newText = text.substring(0, limit);
@@ -3367,6 +3407,11 @@ function loginSuccess(networkId, networkType, displayName, networkAuthId, mandan
3367
jQuery('.b2s-network-select-btn[data-network-auth-id="' + networkAuthId + '"] > .b2s-network-list > .b2s-network-details > h4').text(displayName);
3368
jQuery('.b2s-network-select-btn[data-network-auth-id="' + networkAuthId + '"]').trigger('click');
3369
}
3370
}
3371
3372
//jQuery(this).attr('data-network-auth-id')
@@ -3534,7 +3579,21 @@ jQuery('#b2sAuthNetwork6Modal').on('hidden.bs.modal', function () {
3534
});
3535
3536
// START Pinterest
3537
- jQuery(document).on('click', '.b2s-auth-network-6-login-btn', function() {
3538
jQuery('.b2s-loading-area').show();
3539
jQuery('.b2s-auth-network-6-login-area').hide();
3540
jQuery('.b2s-auth-network-6-login-btn').hide();
@@ -3549,6 +3608,7 @@ jQuery(document).on('click', '.b2s-auth-network-6-login-btn', function() {
3549
'action': 'b2s_auth_network_login',
3550
'username': jQuery('#b2s-auth-network-6-username').val(),
3551
'password': jQuery('#b2s-auth-network-6-password').val(),
3552
'b2s_security_nonce': jQuery('#b2s_security_nonce').val()
3553
},
3554
error: function () {
@@ -3571,8 +3631,8 @@ jQuery(document).on('click', '.b2s-auth-network-6-login-btn', function() {
3571
if (data.error == 'nonce') {
3572
jQuery('.b2s-nonce-check-fail').show();
3573
}
3574
- if(typeof data.error != 'undefined' && data.error != ''){
3575
- jQuery('.b2s-auth-network-6-info[data-info="'+data.error+'"]').show();
3576
return false;
3577
}
3578
jQuery('.b2s-auth-network-6-info[data-info="login"]').show();
@@ -3581,7 +3641,7 @@ jQuery(document).on('click', '.b2s-auth-network-6-login-btn', function() {
3581
});
3582
});
3583
3584
- jQuery(document).on('click', '.b2s-auth-network-6-confirm-btn', function() {
3585
jQuery('.b2s-loading-area').show();
3586
jQuery('.b2s-auth-network-6-login-area').hide();
3587
jQuery('.b2s-auth-network-6-login-btn').hide();
@@ -3618,7 +3678,7 @@ jQuery(document).on('click', '.b2s-auth-network-6-confirm-btn', function() {
3618
jQuery('.b2s-nonce-check-fail').show();
3619
}
3620
if (typeof data.error != 'undefined' && data.error != '') {
3621
- jQuery('.b2s-auth-network-6-info[data-info="'+data.error+'"]').show();
3622
return false;
3623
}
3624
jQuery('.b2s-auth-network-6-info[data-info="default"]').show();
@@ -3627,7 +3687,7 @@ jQuery(document).on('click', '.b2s-auth-network-6-confirm-btn', function() {
3627
});
3628
});
3629
3630
- jQuery(document).on('click', '.b2s-network-list-add-btn[data-auth-method="client"]', function() {
3631
jQuery('#b2sAuthNetwork6Modal').modal('show');
3632
});
3633
@@ -3654,4 +3714,64 @@ jQuery(".b2s-auth-network-6-reveal").mouseup(function () {
3654
jQuery(".b2s-auth-network-6-reveal").mouseout(function () {
3655
jQuery("#b2s-auth-network-6-password").replaceWith(jQuery('#b2s-auth-network-6-password').clone().attr('type', 'password'));
3656
});
3657
- // END Pinterest
1
jQuery.noConflict();
2
3
var b2sTosXingGroupCount = 0;
4
+ var currentOGImage = '';
5
6
jQuery(document).on('heartbeat-send', function (e, data) {
7
data['b2s_heartbeat'] = 'b2s_listener';
95
var content = "<img class='b2s-post-item-network-image-selected-account' height='22px' src='" + jQuery('.b2s-post-item-network-image[data-network-auth-id="' + networkAuthId + '"]').attr('src') + "' /> " + jQuery('.b2s-post-item-details-network-display-name[data-network-auth-id="' + networkAuthId + '"]').html();
96
jQuery('.b2s-selected-network-for-image-info').html(content);
97
jQuery('#b2s-network-select-image').modal('show');
98
+ jQuery('.b2s-image-change-meta-network').hide();
99
jQuery('#b2sInsertImageType').val("1");
100
imageSize();
101
344
var postFormat = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').val();
345
var networkId = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').attr("data-network-id");
346
var isMetaChecked = false;
347
+ var ogMetaNetworks = jQuery('#ogMetaNetworks').val().split(";");
348
+ if (typeof networkId != 'undefined' && jQuery.inArray(networkId.toString(), ogMetaNetworks) != -1 && jQuery('#isOgMetaChecked').val() == "1") {
349
isMetaChecked = true;
350
}
351
if (networkId == "2" && jQuery('#isCardMetaChecked').val() == "1") {
372
jQuery(document).on('keyup', '.change-meta-tag', function () {
373
var currentText = jQuery(this).val();
374
var metaTag = jQuery(this).attr('data-meta');
375
+ jQuery('.change-meta-tag[data-meta=' + metaTag + ']').each(function () {
376
+ //override this content with current content by keyup
377
+ jQuery(this).val(currentText);
378
+ });
379
return false;
380
});
381
jQuery(document).on('click', '.b2s-get-settings-sched-time-user', function () {
613
jQuery('.b2s-post-ship-item-post-format-text[data-network-id="' + networkId + '"]').html(postFormatText[postFormatType][postFormat]);
614
jQuery('.b2s-post-item-details-post-format[data-network-id="' + networkId + '"]').val(postFormat);
615
}
616
+ if (jQuery('.b2s-network-select-btn[data-network-auth-id="' + networkAuthId + '"]').attr('data-meta-type') == 'og') {
617
+ if (currentOGImage == '' && jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val() != '') {
618
+ currentOGImage = jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val();
619
+ if (postFormat == "0") {
620
+ jQuery('.b2s-network-select-btn[data-meta-type="og"]').each(function () {
621
+ jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').attr('src', currentOGImage);
622
+ jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val(currentOGImage);
623
+ jQuery('.b2s-image-remove-btn[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').show();
624
+ if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val() == 1) {
625
+ jQuery('.b2s-image-remove-btn[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="-1"]').hide();
626
+ }
627
+ });
628
+ }
629
+ }
630
+ if (postFormat == "0" && jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val() != currentOGImage) {
631
+ jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val(currentOGImage);
632
+ jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + networkAuthId + '"]').attr('src', currentOGImage);
633
+ jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').show();
634
+ if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').val() == 1) {
635
+ jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
636
+ }
637
+ }
638
+ }
639
}
640
var textLimit = jQuery('.b2s-post-item-details-item-message-input[data-network-count="-1"][data-network-auth-id="' + networkAuthId + '"]').attr('data-network-text-limit');
641
if (textLimit != "0") {
646
647
//Edit Meta Tags
648
var isMetaChecked = false;
649
+ var ogMetaNetworks = jQuery('#ogMetaNetworks').val().split(";");
650
+ if (typeof networkId != 'undefined' && jQuery.inArray(networkId.toString(), ogMetaNetworks) != -1 && jQuery('#isOgMetaChecked').val() == "1") {
651
isMetaChecked = true;
652
}
653
if (networkId == "2" && jQuery('#isCardMetaChecked').val() == "1") {
656
if (isMetaChecked && postFormat == '0' && jQuery('#user_version').val() > 0) { //If linkpost
657
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", false);
658
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", false);
659
+ var dataMetaType = jQuery('.b2s-network-select-btn[data-network-auth-id="' + networkAuthId + '"]').attr("data-meta-type");
660
if (dataMetaType == "og") {
661
jQuery('#b2sChangeOgMeta').val("1");
662
} else {
668
if (jQuery(this).val() == "0" && jQuery('.b2s-post-ship-item-post-format[data-network-auth-id=' + jQuery(this).attr('data-network-auth-id') + ']').is(":visible") && jQuery(this).attr('data-network-auth-id') != networkAuthId) { //other Linkpost by same network
669
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + networkAuthId + '"]').val(jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
670
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + networkAuthId + '"]').val(jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
671
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val(jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
672
if (jQuery('.b2s-image-remove-btn[data-network-count="-1"][data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]:visible').length == 1) {
673
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="-1"]').show();
688
}
689
}
690
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').show();
691
+ if (jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').hasClass('disabled')) {
692
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').removeClass('disabled');
693
}
694
}
734
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
735
}
736
}
737
jQuery('.b2s-user-network-settings-post-format[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').removeClass('b2s-settings-checked');
738
jQuery(this).addClass('b2s-settings-checked');
739
jQuery('#b2s-post-ship-item-post-format-modal').modal('hide');
740
+ checkGifAnimation(networkAuthId, networkId);
741
return false;
742
});
743
jQuery(document).on("click", ".b2s-post-ship-item-full-text", function () {
804
var networkAuthId = jQuery(this).attr('data-network-auth-id');
805
var networkId = jQuery(this).attr('data-network-id');
806
var networkType = jQuery(this).attr('data-network-type');
807
+ var metaType = jQuery(this).attr('data-meta-type');
808
809
//doppelklick Schutz
810
if (!jQuery(this).hasClass('b2s-network-select-btn-deactivate')) {
823
if (jQuery('.b2s-post-item[data-network-auth-id="' + networkAuthId + '"]').length > 0 && !jQuery('.b2s-post-item[data-network-auth-id="' + networkAuthId + '"]').hasClass('b2s-post-item-connection-fail-dummy')) {
824
activatePortal(networkAuthId);
825
//PostFormat
826
+ if (jQuery('.b2s-post-ship-item-post-format-text[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').length > 0 || networkId == 15) {
827
var postFormatText = JSON.parse(jQuery('.b2sNetworkSettingsPostFormatText').val());
828
var postFormatType = jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').attr('data-post-format-type');
829
if (jQuery('#user_version').val() >= 2) {
831
jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + networkAuthId + '"]').val(jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').val());
832
//if linkpost then show btn meta tags
833
var isMetaChecked = false;
834
+ var ogMetaNetworks = jQuery('#ogMetaNetworks').val().split(";");
835
+ if (typeof networkId != 'undefined' && jQuery.inArray(networkId.toString(), ogMetaNetworks) != -1 && jQuery('#isOgMetaChecked').val() == "1") {
836
isMetaChecked = true;
837
}
838
if (networkId == "2" && jQuery('#isCardMetaChecked').val() == "1") {
841
if (isMetaChecked && jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').val() == "0") {
842
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", false);
843
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", false);
844
+ var dataMetaType = jQuery('.b2s-network-select-btn[data-network-auth-id="' + networkAuthId + '"]').attr("data-meta-type");
845
if (dataMetaType == "og") {
846
jQuery('#b2sChangeOgMeta').val("1");
847
} else {
849
}
850
851
//Copy from further item meta tags by same network
852
+ jQuery('.change-meta-tag[data-meta-type="' + dataMetaType + '"]').each(function () {
853
+ if (jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val() == "0" && jQuery(this).attr('data-network-auth-id') != networkAuthId) { //other Linkpost by same network
854
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + networkAuthId + '"]').val(jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
855
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + networkAuthId + '"]').val(jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
856
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + networkAuthId + '"]').attr('src', jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').attr('src'));
875
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').hide();
876
}
877
878
} else {
879
jQuery('.b2s-post-ship-item-post-format-text[data-network-id="' + networkId + '"]').html(postFormatText[postFormatType][jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').val()]);
880
jQuery('.b2s-post-item-details-post-format[data-network-id="' + networkId + '"]').val(jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').val());
921
//Twitter TOS 032018 - protected multiple accounts with same content to same time
922
//delete comment field one more
923
if (networkId == 2) {
924
+ if (jQuery('.b2s-post-item[data-network-id="' + networkId + '"]:visible').length == 1) {
925
jQuery('.tw-textarea-input[data-network-auth-id="' + networkAuthId + '"]').text(jQuery('#b2sTwitterOrginalPost').val());
926
} else {
927
jQuery('.tw-textarea-input[data-network-auth-id="' + networkAuthId + '"]').text("");
928
}
929
}
930
+ checkGifAnimation(networkAuthId, networkId);
931
} else {
932
jQuery(this).addClass('b2s-network-select-btn-deactivate');
933
jQuery('.b2s-network-status-img-loading[data-network-auth-id="' + networkAuthId + '"]').show();
1053
//Bild setzen
1054
if (jQuery('#b2s_blog_default_image').val() != "") {
1055
if (jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').length > 0) {
1056
+ var networkNotAllowGif = jQuery('#b2sNotAllowGif').val().split(";");
1057
+ var networkId = jQuery('.b2s-network-select-btn[data-network-auth-id="' + networkAuthId + '"]').attr('data-network-id');
1058
+ var attachmenUrl = jQuery('#b2s_blog_default_image').val();
1059
+ var attachmenUrlExt = attachmenUrl.substr(attachmenUrl.lastIndexOf('.') + 1);
1060
+ attachmenUrlExt = attachmenUrlExt.toLowerCase();
1061
+ if (attachmenUrlExt == 'gif' && jQuery.inArray(networkId, networkNotAllowGif) != -1) {
1062
+ jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').attr('src', jQuery('.b2s-network-default-image').val());
1063
+ } else {
1064
+ jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').attr('src', jQuery('#b2s_blog_default_image').val());
1065
+ }
1066
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + data.networkAuthId + '"]').val() == 1) {
1067
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').hide();
1068
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="0"]').show();
1076
//Time zone
1077
jQuery('.b2s-settings-time-zone-text').html(jQuery('#user_timezone_text').val());
1078
//PostFormat
1079
+ if (jQuery('.b2s-post-ship-item-post-format-text[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').length > 0 || data.networkId == 15) {
1080
var postFormatText = JSON.parse(jQuery('.b2sNetworkSettingsPostFormatText').val());
1081
var postFormatType = jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').attr('data-post-format-type');
1082
if (jQuery('#user_version').val() >= 2) {
1083
jQuery('.b2s-post-ship-item-post-format-text[data-network-auth-id="' + data.networkAuthId + '"]').html(postFormatText[postFormatType][jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').val()]);
1084
jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + data.networkAuthId + '"]').val(jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').val());
1085
var isMetaChecked = false;
1086
+ var ogMetaNetworks = jQuery('#ogMetaNetworks').val().split(";");
1087
+ if (typeof data.networkId != 'undefined' && jQuery.inArray(data.networkId.toString(), ogMetaNetworks) != -1 && jQuery('#isOgMetaChecked').val() == "1") {
1088
isMetaChecked = true;
1089
}
1090
if (data.networkId == "2" && jQuery('#isCardMetaChecked').val() == "1") {
1094
if (isMetaChecked && jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').val() == "0") {
1095
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + data.networkAuthId + '"]').prop("readonly", false);
1096
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + data.networkAuthId + '"]').prop("readonly", false);
1097
+ var dataMetaType = jQuery('.b2s-network-select-btn[data-network-auth-id="' + data.networkAuthId + '"]').attr("data-meta-type");
1098
if (dataMetaType == "og") {
1099
jQuery('#b2sChangeOgMeta').val("1");
1100
+ //TODO change image to OG image
1101
} else {
1102
jQuery('#b2sChangeCardMeta').val("1");
1103
}
1104
1105
//Copy from further item meta tags by same network
1106
+ jQuery('.change-meta-tag[data-meta-type="' + dataMetaType + '"]').each(function () {
1107
+ if (jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val() == "0" && jQuery(this).attr('data-network-auth-id') != data.networkAuthId) { //other Linkpost by same network
1108
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + data.networkAuthId + '"]').val(jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
1109
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + data.networkAuthId + '"]').val(jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
1110
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').attr('src', jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').attr('src'));
1128
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + data.networkAuthId + '"]').hide();
1129
}
1130
1131
} else {
1132
jQuery('.b2s-post-ship-item-post-format-text[data-network-id="' + data.networkId + '"]').html(postFormatText[postFormatType][jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').val()]);
1133
jQuery('.b2s-post-item-details-post-format[data-network-id="' + data.networkId + '"]').val(jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').val());
1157
//Twitter TOS 032018 - protected multiple accounts with same content to same time
1158
//delete comment field one more
1159
if (data.networkId == 2) {
1160
+ if (jQuery('.tw-textarea-input[data-network-id="' + data.networkId + '"]:visible').length >= 1) {
1161
var firstAuth = jQuery('.b2s-post-item[data-network-id="' + data.networkId + '"]:first').attr('data-network-auth-id');
1162
if (firstAuth != data.networkAuthId) {
1163
jQuery('.tw-textarea-input[data-network-auth-id="' + data.networkAuthId + '"]').text("");
1164
} else {
1165
+ if (jQuery('.tw-textarea-input[data-network-id="' + data.networkId + '"]:visible').length >= 2) {
1166
jQuery('.tw-textarea-input[data-network-auth-id="' + data.networkAuthId + '"]').text("");
1167
}
1168
}
1202
}
1203
1204
jQuery.each(data.draftActions.sched_image_url, function (index, value) {
1205
+ var ogMetaNetworks = jQuery('#ogMetaNetworks').val().split(";");
1206
+ if (typeof networkId != 'undefined' && jQuery.inArray(networkId.toString(), ogMetaNetworks) != -1 && jQuery('#isOgMetaChecked').val() == "1") {
1207
+ if (currentOGImage == '') {
1208
+ currentOGImage = value;
1209
+ } else {
1210
+ value = currentOGImage;
1211
+ }
1212
+ }
1213
if (value == "") {
1214
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + index + '"]').hide();
1215
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').attr('src', jQuery('.b2s-network-default-image').val());
1342
}
1343
1344
if (data.draftActions.image_url == "") {
1345
+ jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').hide();
1346
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').attr('src', jQuery('.b2s-network-default-image').val());
1347
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').val("");
1348
} else {
1359
}
1360
}
1361
//XING TOS Group
1362
+ if (data.networkId == 19) {
1363
+ jQuery('.b2s-content-info[data-network-auth-id="' + data.networkAuthId + '"').show();
1364
+ }
1365
+
1366
+ if (metaType == 'og' && currentOGImage != '') {
1367
+ jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + data.networkAuthId + '"]').val(currentOGImage);
1368
+ jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').attr('src', currentOGImage);
1369
+ }
1370
1371
} else {
1372
if (data.error == 'nonce') {
1383
}
1384
}
1385
}
1386
+ checkGifAnimation(data.networkAuthId, data.networkId);
1387
}
1388
}
1389
});
1406
var postFormat = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').val();
1407
var networkId = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').attr("data-network-id");
1408
var isMetaChecked = false;
1409
+ var ogMetaNetworks = jQuery('#ogMetaNetworks').val().split(";");
1410
+ if (typeof networkId != 'undefined' && jQuery.inArray(networkId.toString(), ogMetaNetworks) != -1 && jQuery('#isOgMetaChecked').val() == "1") {
1411
isMetaChecked = true;
1412
}
1413
if (networkId == "2" && jQuery('#isCardMetaChecked').val() == "1") {
1450
jQuery('#b2s-post-ship-item-post-format-modal').modal('show');
1451
jQuery('.b2s-user-network-settings-post-format').attr('data-network-auth-id', jQuery(this).attr('data-network-auth-id'));
1452
jQuery('.b2s-user-network-settings-post-format').attr('data-post-wp-type', jQuery(this).attr('data-post-wp-type'));
1453
+ if (jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val() == "1" && jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val() != currentOGImage && jQuery('.b2s-network-select-btn[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').attr('data-meta-type') == 'og') {
1454
+ jQuery('.b2s-select-link-chang-image').show();
1455
+ } else {
1456
+ jQuery('.b2s-select-link-chang-image').hide();
1457
+ }
1458
} else {
1459
jQuery('#b2sInfoFormatModal').modal('show');
1460
}
1754
success: function (data) {
1755
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + data.networkAuthId + '"]').removeClass('glyphicon-refresh-animate');
1756
if (data.result == true) {
1757
+ jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + data.networkAuthId + '"]').val(data.title);
1758
+ jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + data.networkAuthId + '"]').val(data.description);
1759
if (jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').attr('data-network-image-change') == '0') {
1760
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').attr('src', data.image);
1761
}
1767
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').attr('src', jQuery('#b2sDefaultNoImage').val());
1768
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + data.networkAuthId + '"]').val(jQuery('#b2sDefaultNoImage').val());
1769
}
1770
+ checkGifAnimation(data.networkAuthId, data.networkId);
1771
}
1772
} else {
1773
if (data.error == 'nonce') {
1782
}
1783
});
1784
jQuery(document).on('click', '.b2s-select-image-modal-open', function () {
1785
+ jQuery('.b2s-upload-image-invalid-extension').hide();
1786
+ jQuery('.b2s-image-change-meta-network').hide();
1787
+ jQuery('.b2s-image-change-this-network').show();
1788
var metaType = jQuery(this).attr('data-meta-type');
1789
var authId = jQuery(this).attr('data-network-auth-id');
1790
var countId = jQuery(this).attr('data-network-count');
1791
var postFormat = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + authId + ']').val();
1792
var networkId = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + authId + ']').attr("data-network-id");
1793
var isMetaChecked = false;
1794
+ var ogMetaNetworks = jQuery('#ogMetaNetworks').val().split(";");
1795
+ if (typeof networkId != 'undefined' && jQuery.inArray(networkId.toString(), ogMetaNetworks) != -1 && jQuery('#isOgMetaChecked').val() == "1") {
1796
isMetaChecked = true;
1797
}
1798
if (networkId == "2" && jQuery('#isCardMetaChecked').val() == "1") {
1820
jQuery('#b2sInsertImageType').val("0");
1821
if (typeof metaType !== 'undefined') {
1822
jQuery('.b2s-image-change-this-network').attr('data-meta-type', metaType);
1823
+
1824
+ if (metaType == 'og' && postFormat != "1") {
1825
+ var activeMetaNetworks = {};
1826
+ var inactiveMetaNetworks = {};
1827
+ jQuery('.b2s-network-select-btn[data-meta-type="' + metaType + '"]').each(function () {
1828
+ if (jQuery(this).find('.active').length > 0) {
1829
+ activeMetaNetworks[jQuery(this).attr('data-network-auth-id')] = jQuery(this).attr('data-network-id');
1830
+ } else {
1831
+ inactiveMetaNetworks[jQuery(this).attr('data-network-auth-id')] = jQuery(this).attr('data-network-id');
1832
+ }
1833
+ });
1834
+
1835
+ jQuery('.b2s-change-meta-image-networks').html('');
1836
+ jQuery.each(activeMetaNetworks, function (key, value) {
1837
+ jQuery('.b2s-change-meta-image-networks').append('<div style="display: inline-block;"><img class="b2s-meta-image-network-icon" src="' + jQuery('#b2sPortalImagePath').val() + value + '_flat.png' + '"> ' + jQuery('.b2s-network-select-btn[data-network-auth-id="' + key + '"]').attr('data-network-display-name').toUpperCase() + '</div>');
1838
+ });
1839
+ jQuery.each(inactiveMetaNetworks, function (key, value) {
1840
+ jQuery('.b2s-change-meta-image-networks').append('<div style="display: inline-block;"><img class="b2s-meta-image-network-icon b2s-btn-disabled" src="' + jQuery('#b2sPortalImagePath').val() + value + '_flat.png' + '"> ' + jQuery('.b2s-network-select-btn[data-network-auth-id="' + key + '"]').attr('data-network-display-name').toUpperCase() + '</div>');
1841
+ });
1842
+ jQuery('.b2s-change-meta-image-info').show();
1843
+
1844
+ jQuery('.b2s-image-change-meta-network').show();
1845
+ jQuery('.b2s-image-change-this-network').hide();
1846
+
1847
+ jQuery(document).on('click', '.b2s-image-change-meta-network', function () {
1848
+ currentOGImage = jQuery('input[name=image_url]:checked').val();
1849
+ if (jQuery('.b2s-input-hidden[name="action"][value="b2s_edit_save_post"]').length > 0) { //sched or calender view
1850
+ jQuery('.b2s-image-change-this-network').trigger('click');
1851
+ } else { //ship view
1852
+ jQuery.each(activeMetaNetworks, function (networkAuthId, networkId) {
1853
+ if (jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + networkAuthId + '"]').val() != "1") {
1854
+ jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + networkAuthId + '"]').attr('src', currentOGImage);
1855
+ jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val(currentOGImage);
1856
+ checkGifAnimation(networkAuthId, networkId);
1857
+ jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').show();
1858
+ if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').val() == 1) {
1859
+ jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
1860
+ }
1861
+ }
1862
+ });
1863
+ jQuery.each(inactiveMetaNetworks, function (networkAuthId, networkId) {
1864
+ if (jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + networkAuthId + '"]').val() != "1") {
1865
+ jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + networkAuthId + '"]').attr('src', currentOGImage);
1866
+ jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val(currentOGImage);
1867
+ checkGifAnimation(networkAuthId, networkId);
1868
+ jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').show();
1869
+ if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').val() == 1) {
1870
+ jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
1871
+ }
1872
+ }
1873
+ });
1874
+ }
1875
+ jQuery('#b2s-network-select-image').modal('hide');
1876
+ });
1877
+ } else {
1878
+ jQuery('.b2s-change-meta-image-info').hide();
1879
+ }
1880
+
1881
} else {
1882
jQuery('.b2s-image-change-this-network').attr('data-meta-type', "");
1883
+ jQuery('.b2s-change-meta-image-info').hide();
1884
}
1885
//set selected image
1886
var selImageVal = jQuery('.b2s-post-item-details-url-image[data-network-count="' + countId + '"][data-network-auth-id="' + authId + '"]').attr('src');
1918
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').hide();
1919
}
1920
});
1921
+ if (jQuery('.b2s-select-image-modal-open[data-network-auth-id=' + networkAuthId + ']').attr('data-meta-type') == 'og') {
1922
+ jQuery('.b2s-select-image-modal-open[data-meta-type="og"]').each(function () {
1923
+ if (jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + jQuery(this).attr('data-network-auth-id') + ']').val() == "0") {
1924
+ jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').attr('src', defaultImage);
1925
+ jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val("");
1926
+ jQuery('.b2s-image-remove-btn[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').hide();
1927
+ }
1928
+ });
1929
+ currentOGImage = '';
1930
+ }
1931
//customize sched content
1932
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + networkAuthId + '"]').attr('src', defaultImage);
1933
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val("");
1934
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').hide();
1935
}
1936
}
1937
return false;
1938
});
1939
jQuery(document).on('click', '.b2s-image-change-this-network', function () {
2001
jQuery('.b2s-upload-image-no-permission').hide();
2002
jQuery('.b2s-upload-image-free-version-info').hide();
2003
jQuery('#b2s-network-select-image').modal('hide');
2004
+ checkGifAnimation(networkAuthId, networkId);
2005
return false;
2006
});
2007
jQuery(document).on('change', '.b2s-post-item-details-relay', function () {
2096
}
2097
}
2098
});
2099
+ var noGifs = '';
2100
+ if (typeof jQuery('input[name=image_url]:checked').val() !== typeof undefined) {
2101
+ var attachmenUrlExt = jQuery('input[name=image_url]:checked').val().substr(jQuery('input[name=image_url]:checked').val().lastIndexOf('.') + 1).toLowerCase();
2102
+ if (attachmenUrlExt == 'gif') {
2103
+ var networkNotAllowGif = jQuery('#b2sNotAllowGif').val().split(";");
2104
+ jQuery.each(networkNotAllowGif, function (key, value) {
2105
+ noGifs += ':not([data-network-id="' + value + '"])';
2106
+ });
2107
+ }
2108
}
2109
+ jQuery('.b2s-post-item-details-url-image[data-network-image-change="1"]' + noGifs).attr('src', jQuery('input[name=image_url]:checked').val());
2110
+ jQuery('#b2s_blog_default_image').val(jQuery('input[name=image_url]:checked').val());
2111
+ jQuery('.b2s-post-item-details-url-image' + noGifs).removeClass('b2s-img-required');
2112
+ jQuery('.b2s-image-url-hidden-field' + noGifs).val(jQuery('input[name=image_url]:checked').val());
2113
+ jQuery('.b2s-image-remove-btn' + noGifs).show();
2114
+ jQuery('.b2s-post-item-details-release-input-date-select' + noGifs).each(function () {
2115
+ if (jQuery(this).val() == 1) {
2116
+ jQuery('.b2s-image-remove-btn[data-network-count="-1"][data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]' + noGifs).hide();
2117
+ }
2118
+ });
2119
2120
jQuery('.b2s-upload-image-invalid-extension').hide();
2121
jQuery('.b2s-upload-image-no-permission').hide();
2123
jQuery('.b2sChangeOgMeta').val("1");
2124
jQuery('.b2sChangeCardMeta').val("1");
2125
jQuery('#b2s-network-select-image').modal('hide');
2126
+
2127
+ currentOGImage = jQuery('input[name=image_url]:checked').val();
2128
+ if (typeof currentOGImage !== typeof undefined) {
2129
+ var attachmenUrlExt = currentOGImage.substr(currentOGImage.lastIndexOf('.') + 1);
2130
+ attachmenUrlExt = attachmenUrlExt.toLowerCase();
2131
+ if (attachmenUrlExt == 'gif') {
2132
+ jQuery('.b2s-image-url-hidden-field').each(function () {
2133
+ checkGifAnimation(jQuery(this).attr('data-network-auth-id'), jQuery(this).attr('data-network-id'));
2134
+ });
2135
+ }
2136
+ }
2137
return false;
2138
});
2139
jQuery(document).on('click', '.b2s-upload-image', function () {
2140
+ var networkAuthId = jQuery(this).attr('data-network-auth-id');
2141
if (typeof wp !== 'undefined' && wp.media && wp.media.editor) {
2142
jQuery('#b2s-network-select-image').modal('hide');
2143
wpMedia = wp.media({
2150
});
2151
wpMedia.open();
2152
wpMedia.on('select', function () {
2153
+ var validExtensions = ['jpg', 'jpeg', 'png', 'gif'];
2154
+ var networkNotAllowGif = jQuery('#b2sNotAllowGif').val().split(";");
2155
+ var networkId = jQuery('input[name="b2s[' + networkAuthId + '][network_id]"]').val();
2156
var attachment = wpMedia.state().get('selection').first().toJSON();
2157
var attachmenUrl = attachment.url;
2158
var attachmenUrlExt = attachmenUrl.substr(attachmenUrl.lastIndexOf('.') + 1);
2159
attachmenUrlExt = attachmenUrlExt.toLowerCase();
2160
+ if (jQuery.inArray(attachmenUrlExt, validExtensions) == -1 || (attachmenUrlExt == 'gif' && jQuery.inArray(networkId, networkNotAllowGif) != -1)) {
2161
jQuery('#b2s-network-select-image').modal('show');
2162
jQuery('.b2s-upload-image-invalid-extension').show();
2163
jQuery('#b2s-upload-image-invalid-extension-file-name').html('<span class="glyphicon glyphicon-ban-circle"></span> ' + attachment.name + '.' + attachmenUrlExt + '<br>');
2180
'</div>' +
2181
'</div>';
2182
jQuery('.b2s-image-choose-area').html(jQuery('.b2s-image-choose-area').html() + content);
2183
+ // jQuery('.b2s-image-change-btn-area').show();
2184
jQuery('.b2s-choose-image-no-image-info-text').hide();
2185
jQuery('.b2s-choose-image-no-image-extra-btn').hide();
2186
jQuery('.b2s-upload-image-invalid-extension').hide();
2196
}
2197
return false;
2198
});
2199
+ jQuery(document).on('change', '.checkNetworkImage', function () {
2200
+ var networkNotAllowGif = jQuery('#b2sNotAllowGif').val().split(";");
2201
+ var attachmenUrlExt = jQuery('input[name=image_url]:checked').val().substr(jQuery('input[name=image_url]:checked').val().lastIndexOf('.') + 1);
2202
+ attachmenUrlExt = attachmenUrlExt.toLowerCase();
2203
+ if (attachmenUrlExt == 'gif') {
2204
+ var networkAuthId = jQuery('.b2s-upload-image').attr('data-network-auth-id');
2205
+ var networkId = jQuery('input[name="b2s[' + networkAuthId + '][network_id]"]').val();
2206
+ if (jQuery.inArray(networkId, networkNotAllowGif) != -1) {
2207
+ jQuery('.b2s-image-change-this-network').attr('disabled', true);
2208
+ jQuery('.b2s-image-change-all-network').attr('disabled', true);
2209
+ jQuery('.b2s-upload-image-invalid-extension').show();
2210
+ jQuery('#b2s-upload-image-invalid-extension-file-name').html();
2211
+ } else {
2212
+ jQuery('.b2s-image-change-this-network').attr('disabled', false);
2213
+ jQuery('.b2s-image-change-all-network').attr('disabled', false);
2214
+ }
2215
+ jQuery('.b2s-gif-support-info').show();
2216
+ } else {
2217
+ jQuery('.b2s-image-change-this-network').attr('disabled', false);
2218
+ jQuery('.b2s-image-change-all-network').attr('disabled', false);
2219
+ jQuery('.b2s-gif-support-info').hide();
2220
+ }
2221
+ });
2222
+ jQuery('#b2s-network-select-image').on('shown.bs.modal', function () {
2223
+ jQuery('.checkNetworkImage').trigger('change');
2224
+ });
2225
jQuery(document).on('click', '.b2s-upload-image-free-version', function () {
2226
jQuery('.b2s-upload-image-free-version-info').show();
2227
});
2241
var curNetworkAuthId = jQuery(element).attr('data-network-auth-id');
2242
var curNetworkId = jQuery(element).attr('data-network-id');
2243
var prefix = params;
2244
+ var selector = jQuery.validator.format("[name!='{0}'][unique='{1}'][data-network-id='" + curNetworkId + "']", element.name, prefix);
2245
var matches = new Array();
2246
2247
jQuery('.b2s-unique-content[data-network-id="' + curNetworkId + '"]').hide();
2254
}
2255
if (jQuery.trim(value) == jQuery.trim(jQuery(item).val())) {
2256
jQuery('.b2s-unique-content[data-network-auth-id="' + jQuery(item).attr('data-network-auth-id') + '"]').show();
2257
matches.push(item);
2258
}
2259
});
2260
if (matches.length != 0) {
2261
jQuery('.b2s-unique-content[data-network-auth-id="' + curNetworkAuthId + '"]').show();
2262
}
2263
+ return true;
2264
});
2265
2266
2374
return false;
2375
},
2376
success: function (data) {
2377
+ if (data.error == 'nonce') {
2378
jQuery('.b2s-nonce-check-fail').show();
2379
return false;
2380
}
2477
window.addEventListener('message', function (e) {
2478
if (e.origin == jQuery('#b2sServerUrl').val()) {
2479
var data = JSON.parse(e.data);
2480
if (typeof data.action !== typeof undefined && data.action == 'approve') {
2481
jQuery('.b2s-post-item-details-message-result[data-network-auth-id="' + data.networkAuthId + '"]').html("<br><span class=\"text-success\"><i class=\"glyphicon glyphicon-ok-circle\"></i> " + jQuery("#b2sJsTextPublish").val() + " </span>");
2482
jQuery.ajax({
3185
limit = limit - url.length;
3186
}
3187
}
3188
+ if (networkId == "12") { //instagram
3189
+ var matches = text.match(/(#[^# ]{1,})/g);
3190
+ if (matches != null && matches.length > 30) {
3191
+ jQuery('.b2s-content-info[data-network-auth-id="' + networkAuthId + '"]').show();
3192
+ jQuery(".b2s-post-item-details-item-message-input[data-network-count='" + networkCountId + "'][data-network-auth-id='" + networkAuthId + "']").addClass("warning");
3193
+ } else {
3194
+ jQuery('.b2s-content-info[data-network-auth-id="' + networkAuthId + '"]').hide();
3195
+ jQuery(".b2s-post-item-details-item-message-input[data-network-count='" + networkCountId + "'][data-network-auth-id='" + networkAuthId + "']").removeClass("warning");
3196
+ }
3197
+ }
3198
3199
if (textLength >= limit) {
3200
newText = text.substring(0, limit);
3407
jQuery('.b2s-network-select-btn[data-network-auth-id="' + networkAuthId + '"] > .b2s-network-list > .b2s-network-details > h4').text(displayName);
3408
jQuery('.b2s-network-select-btn[data-network-auth-id="' + networkAuthId + '"]').trigger('click');
3409
}
3410
+ jQuery('.b2s-network-select-btn[data-network-id="' + networkId + '"][data-network-type="' + networkType + '"][data-network-display-name="' + displayName.toLowerCase() + '"]').each(function () {
3411
+ jQuery('.b2s-network-status-expiredDate[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').remove();
3412
+ jQuery(this).removeClass('b2s-network-select-btn-deactivate');
3413
+ jQuery(this).removeAttr('onclick');
3414
+ });
3415
}
3416
3417
//jQuery(this).attr('data-network-auth-id')
3579
});
3580
3581
// START Pinterest
3582
+ jQuery(document).on('click', '.b2s-auth-network-6-login-btn', function () {
3583
+ jQuery('#b2s-auth-network-6-username').removeClass('error');
3584
+ jQuery('#b2s-auth-network-6-password').removeClass('error');
3585
+ var loginDataCheck = true;
3586
+ if (jQuery('#b2s-auth-network-6-username').val() == '') {
3587
+ jQuery('#b2s-auth-network-6-username').addClass('error');
3588
+ loginDataCheck = false;
3589
+ }
3590
+ if (jQuery('#b2s-auth-network-6-password').val() == '') {
3591
+ jQuery('#b2s-auth-network-6-password').addClass('error');
3592
+ loginDataCheck = false;
3593
+ }
3594
+ if (!loginDataCheck) {
3595
+ return false;
3596
+ }
3597
jQuery('.b2s-loading-area').show();
3598
jQuery('.b2s-auth-network-6-login-area').hide();
3599
jQuery('.b2s-auth-network-6-login-btn').hide();
3608
'action': 'b2s_auth_network_login',
3609
'username': jQuery('#b2s-auth-network-6-username').val(),
3610
'password': jQuery('#b2s-auth-network-6-password').val(),
3611
+ 'location': jQuery('#b2s-auth-network-6-location').val(),
3612
'b2s_security_nonce': jQuery('#b2s_security_nonce').val()
3613
},
3614
error: function () {
3631
if (data.error == 'nonce') {
3632
jQuery('.b2s-nonce-check-fail').show();
3633
}
3634
+ if (typeof data.error != 'undefined' && data.error != '') {
3635
+ jQuery('.b2s-auth-network-6-info[data-info="' + data.error + '"]').show();
3636
return false;
3637
}
3638
jQuery('.b2s-auth-network-6-info[data-info="login"]').show();
3641
});
3642
});
3643
3644
+ jQuery(document).on('click', '.b2s-auth-network-6-confirm-btn', function () {
3645
jQuery('.b2s-loading-area').show();
3646
jQuery('.b2s-auth-network-6-login-area').hide();
3647
jQuery('.b2s-auth-network-6-login-btn').hide();
3678
jQuery('.b2s-nonce-check-fail').show();
3679
}
3680
if (typeof data.error != 'undefined' && data.error != '') {
3681
+ jQuery('.b2s-auth-network-6-info[data-info="' + data.error + '"]').show();
3682
return false;
3683
}
3684
jQuery('.b2s-auth-network-6-info[data-info="default"]').show();
3687
});
3688
});
3689
3690
+ jQuery(document).on('click', '.b2s-network-list-add-btn[data-auth-method="client"]', function () {
3691
jQuery('#b2sAuthNetwork6Modal').modal('show');
3692
});
3693
3714
jQuery(".b2s-auth-network-6-reveal").mouseout(function () {
3715
jQuery("#b2s-auth-network-6-password").replaceWith(jQuery('#b2s-auth-network-6-password').clone().attr('type', 'password'));
3716
});
3717
+ // END Pinterest
3718
+
3719
+ jQuery(document).on('click', '.b2sInfoPostRelayModalBtn', function () {
3720
+ jQuery('#b2sInfoPostRelayModal').modal('show');
3721
+ });
3722
+ jQuery(document).on('click', '.b2sInfoSchedTimesModalBtn', function () {
3723
+ jQuery('#b2sInfoSchedTimesModal').modal('show');
3724
+ });
3725
+ jQuery(document).on('click', '.b2s-network-setting-save-btn', function () {
3726
+ jQuery('#b2s-network-setting-save').modal('show');
3727
+ });
3728
+ jQuery(document).on('click', '.b2s-network-list-modal-btn', function () {
3729
+ jQuery('#b2s-network-list-modal').modal('show');
3730
+ });
3731
+ jQuery(document).on('click', '.b2s-re-share-info-btn', function () {
3732
+ jQuery('#b2s-re-share-info').modal('show');
3733
+ });
3734
+
3735
+ function checkGifAnimation(networkAuthId, networkId) {
3736
+ if (jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').length >= 1 && jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val() != '') {
3737
+ var attachmenUrlExt = jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val().substr(jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val().lastIndexOf('.') + 1);
3738
+ attachmenUrlExt = attachmenUrlExt.toLowerCase();
3739
+ if (attachmenUrlExt == 'gif') {
3740
+ var postFormat = 0;
3741
+ if (jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + networkAuthId + '"]').length > 0) {
3742
+ postFormat = jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + networkAuthId + '"]').val();
3743
+ }
3744
+ var animatedGif = JSON.parse(jQuery('#b2sAnimateGif').val());
3745
+ if (typeof animatedGif[networkId] != "undefined" && animatedGif[networkId][postFormat] == true) {
3746
+ jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + networkAuthId + '"]').attr('src', jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val());
3747
+ } else {
3748
+ jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + networkAuthId + '"]').each(function () {
3749
+ var imgItem = this;
3750
+ window.setTimeout(function () {
3751
+ freeze_gif(imgItem);
3752
+ }, 1);
3753
+ });
3754
+ }
3755
+ } else {
3756
+ if (jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + networkAuthId + '"]').attr('src') != jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val()) {
3757
+ jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + networkAuthId + '"]').attr('src', jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val());
3758
+ }
3759
+ }
3760
+ }
3761
+ return false;
3762
+ }
3763
+
3764
+ function freeze_gif(i) {
3765
+ var c = document.createElement('canvas');
3766
+ var w = c.width = i.width;
3767
+ var h = c.height = i.height;
3768
+ c.getContext('2d').drawImage(i, 0, 0, w, h);
3769
+ try {
3770
+ i.src = c.toDataURL("image/gif"); // if possible, retain all css aspects
3771
+ } catch (e) { // cross-domain -- mimic original with all its tag attributes
3772
+ for (var j = 0, a; a = i.attributes[j]; j++)
3773
+ c.setAttribute(a.name, a.value);
3774
+ i.parentNode.replaceChild(c, i);
3775
+ }
3776
+ return false;
3777
+ }
assets/js/notice.js CHANGED
@@ -8,7 +8,7 @@ jQuery(document).on('click', '.b2s-hide-notice-area', function () {
8
cache: false,
9
data: {
10
'action': 'b2s_notice_hide',
11
- 'b2s_security_nonce': jQuery('#b2s_security_nonce').val()
12
},
13
success: function (data) {
14
}
8
cache: false,
9
data: {
10
'action': 'b2s_notice_hide',
11
+ 'b2s_deactivate_nonce': jQuery('#b2s_deactivate_nonce').val()
12
},
13
success: function (data) {
14
}
blog2social.php CHANGED
@@ -1,5 +1,4 @@
1
<?php
2
-
3
/*
4
* Plugin Name:Blog2Social: Social Media Auto Post & Scheduler
5
* Plugin URI: https://www.blog2social.com
@@ -7,12 +6,12 @@
7
* Author: Blog2Social, Adenion
8
* Text Domain: blog2social
9
* Domain Path: /languages
10
- * Version: 5.8.1
11
* Author URI: https://www.blog2social.com
12
* License: GPL2+
13
*/
14
15
- define('B2S_PLUGIN_VERSION', '581');
16
define('B2S_PLUGIN_LANGUAGE', serialize(array('de_DE', 'en_US')));
17
define('B2S_PLUGIN_DIR', plugin_dir_path(__FILE__));
18
define('B2S_PLUGIN_URL', plugin_dir_url(__FILE__));
1
<?php
2
/*
3
* Plugin Name:Blog2Social: Social Media Auto Post & Scheduler
4
* Plugin URI: https://www.blog2social.com
6
* Author: Blog2Social, Adenion
7
* Text Domain: blog2social
8
* Domain Path: /languages
9
+ * Version: 5.9.0
10
* Author URI: https://www.blog2social.com
11
* License: GPL2+
12
*/
13
14
+ define('B2S_PLUGIN_VERSION', '590');
15
define('B2S_PLUGIN_LANGUAGE', serialize(array('de_DE', 'en_US')));
16
define('B2S_PLUGIN_DIR', plugin_dir_path(__FILE__));
17
define('B2S_PLUGIN_URL', plugin_dir_url(__FILE__));
includes/Ajax/Get.php CHANGED
@@ -186,7 +186,7 @@ class Ajax_Get {
186
$postUrl = (get_permalink($data->ID) !== false) ? get_permalink($data->ID) : $data->guid;
187
$content = trim(B2S_Util::prepareContent($data->ID, $data->post_content, $postUrl, '', false, $userLang));
188
$networkId = isset($_POST['networkId']) ? (int) $_POST['networkId'] : 0;
189
- echo json_encode(array('result' => true, 'text' => trim(sanitize_text_field($content)), 'networkAuthId' => (int) $_POST['networkAuthId'], 'networkId' => $networkId));
190
wp_die();
191
}
192
}
186
$postUrl = (get_permalink($data->ID) !== false) ? get_permalink($data->ID) : $data->guid;
187
$content = trim(B2S_Util::prepareContent($data->ID, $data->post_content, $postUrl, '', false, $userLang));
188
$networkId = isset($_POST['networkId']) ? (int) $_POST['networkId'] : 0;
189
+ echo json_encode(array('result' => true, 'text' => trim(sanitize_textarea_field($content)), 'networkAuthId' => (int) $_POST['networkAuthId'], 'networkId' => $networkId));
190
wp_die();
191
}
192
}
includes/Ajax/Post.php CHANGED
@@ -65,7 +65,7 @@ class Ajax_Post {
65
if (isset($_POST['title']) && !empty($_POST['title']) && isset($_POST['comment']) && !empty($_POST['comment']) && isset($_POST['url']) && !empty($_POST['url'])) {
66
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Curation/Save.php');
67
if (isset($_POST['b2s-draft-id']) && !empty($_POST['b2s-draft-id']) && (int) $_POST['b2s-draft-id'] > 0) {
68
- $data = array('ID' => (int) $_POST['b2s-draft-id'], 'title' => sanitize_text_field($_POST['title']), 'url' => esc_url($_POST['url']), 'content' => (isset($_POST['comment']) ? sanitize_text_field($_POST['comment']) : ''), 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
69
$curation = new B2S_Curation_Save($data);
70
$source = (get_post_meta((int) $_POST['b2s-draft-id'], "b2s_source", true));
71
$postId = $curation->updateContent($source);
@@ -74,7 +74,7 @@ class Ajax_Post {
74
wp_die();
75
}
76
} else {
77
- $data = array('title' => sanitize_text_field($_POST['title']), 'url' => esc_url($_POST['url']), 'content' => (isset($_POST['comment']) ? sanitize_text_field($_POST['comment']) : ''), 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
78
$curation = new B2S_Curation_Save($data);
79
$postId = $curation->insertContent();
80
if ($postId !== false) {
@@ -96,7 +96,7 @@ class Ajax_Post {
96
if (isset($_POST['b2s_security_nonce']) && (int) wp_verify_nonce($_POST['b2s_security_nonce'], 'b2s_security_nonce') === 1) {
97
if (isset($_POST['title']) && !empty($_POST['title']) && isset($_POST['comment']) && !empty($_POST['comment']) && isset($_POST['url']) && !empty($_POST['url'])) {
98
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Curation/Save.php');
99
- $data = array('title' => sanitize_text_field($_POST['title']), 'url' => esc_url($_POST['url']), 'content' => (isset($_POST['comment']) ? sanitize_text_field($_POST['comment']) : ''), 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
100
$curation = new B2S_Curation_Save($data);
101
$postId = (isset($_POST['b2s-draft-id']) && (int) $_POST['b2s-draft-id'] > 0) ? (int) $_POST['b2s-draft-id'] : $curation->insertContent();
102
if ($postId !== false) {
@@ -246,7 +246,7 @@ class Ajax_Post {
246
if (isset($_POST['b2s_security_nonce']) && (int) wp_verify_nonce($_POST['b2s_security_nonce'], 'b2s_security_nonce') === 1) {
247
if (isset($_POST['title']) && !empty($_POST['title']) && isset($_POST['url']) && !empty($_POST['url'])) {
248
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Curation/Save.php');
249
- $data = array('ID' => ((isset($_POST['b2s-draft-id']) && (int) $_POST['b2s-draft-id'] > 0) ? (int) $_POST['b2s-draft-id'] : 0), 'title' => sanitize_text_field($_POST['title']), 'url' => esc_url($_POST['url']), 'content' => (isset($_POST['comment']) ? sanitize_text_field($_POST['comment']) : ''), 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
250
$curation = new B2S_Curation_Save($data);
251
if (is