Social Media Share Buttons & Social Sharing Icons - Version 2.3.2

Version Description

Please upgrade

Download this release

Release Info

Developer socialdude
Plugin Icon 128x128 Social Media Share Buttons & Social Sharing Icons
Version 2.3.2
Comparing to
See all releases

Code changes from version 2.3.0 to 2.3.2

analyst/autoload.php CHANGED
@@ -8,6 +8,8 @@ require_once __DIR__ . '/src/Contracts/RequestorContract.php';
8
  require_once __DIR__ . '/src/Contracts/TrackerContract.php';
9
  require_once __DIR__ . '/src/Contracts/CacheContract.php';
10
 
 
 
11
  require_once __DIR__ . '/src/Cache/DatabaseCache.php';
12
 
13
  require_once __DIR__ . '/src/Account/Account.php';
8
  require_once __DIR__ . '/src/Contracts/TrackerContract.php';
9
  require_once __DIR__ . '/src/Contracts/CacheContract.php';
10
 
11
+ require_once __DIR__ . '/src/Core/AbstractFactory.php';
12
+
13
  require_once __DIR__ . '/src/Cache/DatabaseCache.php';
14
 
15
  require_once __DIR__ . '/src/Account/Account.php';
analyst/src/Account/AccountDataFactory.php CHANGED
@@ -2,6 +2,9 @@
2
 
3
  namespace Account;
4
 
 
 
 
5
  /**
6
  * Class AccountDataFactory
7
  *
@@ -9,7 +12,7 @@ namespace Account;
9
  * wordpress project plugins accounts
10
  *
11
  */
12
- class AccountDataFactory
13
  {
14
  private static $instance;
15
 
@@ -30,14 +33,15 @@ class AccountDataFactory
30
  if (!static::$instance) {
31
  $raw = get_option(self::OPTIONS_KEY);
32
 
33
- // In case this object is not serialized
34
- // we instantiate new object
35
- if (!$raw) {
36
- static::$instance = new self();
 
 
37
  } else {
38
- static::$instance = unserialize($raw);
39
  }
40
-
41
  }
42
 
43
  return static::$instance;
2
 
3
  namespace Account;
4
 
5
+
6
+ use Analyst\Core\AbstractFactory;
7
+
8
  /**
9
  * Class AccountDataFactory
10
  *
12
  * wordpress project plugins accounts
13
  *
14
  */
15
+ class AccountDataFactory extends AbstractFactory
16
  {
17
  private static $instance;
18
 
33
  if (!static::$instance) {
34
  $raw = get_option(self::OPTIONS_KEY);
35
 
36
+ // In case object is already unserialized
37
+ // and instance of AccountDataFactory we
38
+ // return it, in other case deal with
39
+ // serialized string data
40
+ if ($raw instanceof self) {
41
+ static::$instance = $raw;
42
  } else {
43
+ static::$instance = is_string($raw) ? static::unserialize($raw) : new self();
44
  }
 
45
  }
46
 
47
  return static::$instance;
analyst/src/Cache/DatabaseCache.php CHANGED
@@ -29,20 +29,29 @@ class DatabaseCache implements CacheContract
29
  return self::$instance;
30
  }
31
 
 
 
 
 
 
 
 
32
  /**
33
  * DatabaseCache constructor.
34
  */
35
  public function __construct()
36
  {
37
- $this->values = unserialize(get_option(self::OPTION_KEY, serialize([])));
38
- }
39
 
40
- /**
41
- * Key value pair
42
- *
43
- * @var array[]
44
- */
45
- protected $values;
 
 
 
46
 
47
  /**
48
  * Save value with given key
29
  return self::$instance;
30
  }
31
 
32
+ /**
33
+ * Key value pair
34
+ *
35
+ * @var array[]
36
+ */
37
+ protected $values = [];
38
+
39
  /**
40
  * DatabaseCache constructor.
41
  */
42
  public function __construct()
43
  {
44
+ $raw = get_option(self::OPTION_KEY, serialize([]));
 
45
 
46
+ // Raw data may be an array already
47
+ $this->values = is_array($raw) ? $raw : @unserialize($raw);
48
+
49
+ // In case serialization is failed
50
+ // make sure values is an array
51
+ if (!is_array($this->values)) {
52
+ $this->values = [];
53
+ }
54
+ }
55
 
56
  /**
57
  * Save value with given key
analyst/src/Core/AbstractFactory.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Analyst\Core;
4
+
5
+ abstract class AbstractFactory
6
+ {
7
+ /**
8
+ * Unserialize to NoticeFactory
9
+ *
10
+ * @param $raw
11
+ * @return static
12
+ */
13
+ protected static function unserialize($raw)
14
+ {
15
+ $instance = @unserialize($raw);
16
+
17
+ $isProperObject = is_object($instance) && $instance instanceof static;
18
+
19
+ // In case for some reason unserialized object is not
20
+ // NoticeFactory we make sure it is NoticeFactory
21
+ if (!$isProperObject) {
22
+ $instance = new static();
23
+ }
24
+
25
+ return $instance;
26
+ }
27
+ }
analyst/src/Notices/NoticeFactory.php CHANGED
@@ -2,7 +2,9 @@
2
 
3
  namespace Analyst\Notices;
4
 
5
- class NoticeFactory
 
 
6
  {
7
  private static $instance;
8
 
@@ -25,12 +27,14 @@ class NoticeFactory
25
  if (!static::$instance) {
26
  $raw = get_option(self::OPTIONS_KEY);
27
 
28
- // In case this object is not serialized
29
- // we instantiate new object
30
- if (!$raw) {
31
- static::$instance = new self();
 
 
32
  } else {
33
- static::$instance = unserialize($raw);
34
  }
35
  }
36
 
2
 
3
  namespace Analyst\Notices;
4
 
5
+ use Analyst\Core\AbstractFactory;
6
+
7
+ class NoticeFactory extends AbstractFactory
8
  {
9
  private static $instance;
10
 
27
  if (!static::$instance) {
28
  $raw = get_option(self::OPTIONS_KEY);
29
 
30
+ // In case object is already unserialized
31
+ // and instance of AccountDataFactory we
32
+ // return it, in other case deal with
33
+ // serialized string data
34
+ if ($raw instanceof self) {
35
+ static::$instance = $raw;
36
  } else {
37
+ static::$instance = is_string($raw) ? static::unserialize($raw) : new self();
38
  }
39
  }
40
 
analyst/src/helpers.php CHANGED
@@ -31,7 +31,9 @@ if (! function_exists('analyst_assets_url')) {
31
  // wordpress install it's plugin's. So we remove last segment
32
  // of that path to get the content dir AKA directly where
33
  // plugins are installed and make the magic...
34
- $contentDir = dirname(wp_normalize_path(WP_PLUGIN_DIR));
 
 
35
 
36
  $relativePath = str_replace( $contentDir, '', $absolutePath);
37
 
31
  // wordpress install it's plugin's. So we remove last segment
32
  // of that path to get the content dir AKA directly where
33
  // plugins are installed and make the magic...
34
+ $contentDir = is_link(WP_PLUGIN_DIR) ?
35
+ dirname(wp_normalize_path(readlink(WP_PLUGIN_DIR))) :
36
+ dirname(wp_normalize_path(WP_PLUGIN_DIR));
37
 
38
  $relativePath = str_replace( $contentDir, '', $absolutePath);
39
 
analyst/templates/forms/deactivate.php CHANGED
@@ -1,4 +1,4 @@
1
- <div id="analyst-deactivate-modal" class="analyst-modal">
2
  <div class="analyst-modal-content" style="width: 500px">
3
  <div class="analyst-disable-modal-mask" id="analyst-disable-deactivate-modal-mask" style="display: none"></div>
4
  <div style="display: flex">
1
+ <div id="analyst-deactivate-modal" class="analyst-modal" style="display: none">
2
  <div class="analyst-modal-content" style="width: 500px">
3
  <div class="analyst-disable-modal-mask" id="analyst-disable-deactivate-modal-mask" style="display: none"></div>
4
  <div style="display: flex">
analyst/templates/forms/install.php CHANGED
@@ -1,4 +1,4 @@
1
- <div id="analyst-install-modal" class="analyst-modal" analyst-plugin-id="<?=$pluginToInstall?>">
2
  <div class="analyst-modal-content" style="width: 450px">
3
  <div class="analyst-disable-modal-mask" id="analyst-disable-install-modal-mask" style="display: none"></div>
4
  <div style="display: flex">
1
+ <div id="analyst-install-modal" class="analyst-modal" style="display: none" analyst-plugin-id="<?=$pluginToInstall?>">
2
  <div class="analyst-modal-content" style="width: 450px">
3
  <div class="analyst-disable-modal-mask" id="analyst-disable-install-modal-mask" style="display: none"></div>
4
  <div style="display: flex">
analyst/templates/optout.php CHANGED
@@ -1,4 +1,4 @@
1
- <div id="analyst-opt-out-modal" class="analyst-modal">
2
  <div class="analyst-modal-content" style="width: 600px">
3
  <div class="analyst-disable-modal-mask" id="analyst-disable-opt-out-modal-mask" style="display: none"></div>
4
  <div style="display: flex">
1
+ <div id="analyst-opt-out-modal" class="analyst-modal" style="display: none">
2
  <div class="analyst-modal-content" style="width: 600px">
3
  <div class="analyst-disable-modal-mask" id="analyst-disable-opt-out-modal-mask" style="display: none"></div>
4
  <div style="display: flex">
analyst/version.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  return array(
4
  // The sdk version
5
- 'sdk' => '1.3.20',
6
 
7
  // Minimum supported WordPress version
8
  'wp' => '4.7',
2
 
3
  return array(
4
  // The sdk version
5
+ 'sdk' => '1.3.23',
6
 
7
  // Minimum supported WordPress version
8
  'wp' => '4.7',
js/custom-admin.js CHANGED
@@ -1,3298 +1,3298 @@
1
- function sfsi_update_index() {
2
- var s = 1;
3
- SFSI("ul.icn_listing li.custom").each(function () {
4
- SFSI(this).children("span.custom-txt").html("Custom " + s), s++;
5
- }), cntt = 1, SFSI("div.cm_lnk").each(function () {
6
- SFSI(this).find("h2.custom").find("span.sfsiCtxt").html("Custom " + cntt + ":"),
7
- cntt++;
8
- }), cntt = 1, SFSI("div.custom_m").find("div.custom_section").each(function () {
9
- SFSI(this).find("label").html("Custom " + cntt + ":"), cntt++;
10
- });
11
- }
12
-
13
- function sfsicollapse(s) {
14
- var i = !0,
15
- e = SFSI(s).closest("div.ui-accordion-content").prev("h3.ui-accordion-header"),
16
- t = SFSI(s).closest("div.ui-accordion-content").first();
17
- e.toggleClass("ui-corner-all", i).toggleClass("accordion-header-active ui-state-active ui-corner-top", !i).attr("aria-selected", (!i).toString()),
18
- e.children(".ui-icon").toggleClass("ui-icon-triangle-1-e", i).toggleClass("ui-icon-triangle-1-s", !i),
19
- t.toggleClass("accordion-content-active", !i), i ? t.slideUp() : t.slideDown();
20
- }
21
-
22
- function sfsi_delete_CusIcon(s, i) {
23
- beForeLoad();
24
- var e = {
25
- action: "deleteIcons",
26
- icon_name: i.attr("name"),
27
- nonce: SFSI(i).parents('.custom').find('input[name="nonce"]').val()
28
- };
29
- SFSI.ajax({
30
- url: sfsi_icon_ajax_object.ajax_url,
31
- type: "post",
32
- data: e,
33
- dataType: "json",
34
- success: function (e) {
35
- if ("success" == e.res) {
36
- showErrorSuc("success", "Saved !", 1);
37
- var t = e.last_index + 1;
38
- SFSI("#total_cusotm_icons").val(e.total_up), SFSI(s).closest(".custom").remove(),
39
- SFSI("li.custom:last-child").addClass("bdr_btm_non"), SFSI(".custom-links").find("div." + i.attr("name")).remove(),
40
- SFSI(".custom_m").find("div." + i.attr("name")).remove(), SFSI(".share_icon_order").children("li." + i.attr("name")).remove(),
41
- SFSI("ul.sfsi_sample_icons").children("li." + i.attr("name")).remove();
42
-
43
- if (e.total_up == 0) {
44
- SFSI(".notice_custom_icons_premium").hide();
45
- }
46
- var n = e.total_up + 1;
47
- 4 == e.total_up && SFSI(".icn_listing").append('<li id="c' + t + '" class="custom bdr_btm_non"><div class="radio_section tb_4_ck"><span class="checkbox" dynamic_ele="yes" style="background-position: 0px 0px;"></span><input name="sfsiICON_' + t + '_display" type="checkbox" value="yes" class="styled" style="display:none;" isNew="yes" /></div> <span class="custom-img"><img src="' + SFSI("#plugin_url").val() + 'images/custom.png" id="CImg_' + t + '" alt="error" /> </span> <span class="custom custom-txt">Custom' + n + ' </span> <div class="right_info"> <p><span>It depends:</span> Upload a custom icon if you have other accounts/websites you want to link to.</p><div class="inputWrapper"></div></li>');
48
- } else showErrorSuc("error", "Unkown error , please try again", 1);
49
- return sfsi_update_index(), update_Sec5Iconorder(), sfsi_update_step1(), sfsi_update_step5(),
50
- afterLoad(), "suc";
51
- }
52
- });
53
- }
54
-
55
- function update_Sec5Iconorder() {
56
- SFSI("ul.share_icon_order").children("li").each(function () {
57
- SFSI(this).attr("data-index", SFSI(this).index() + 1);
58
- });
59
- }
60
-
61
- function sfsi_section_Display(s, i) {
62
- "hide" == i ? (SFSI("." + s + " :input").prop("disabled", !0), SFSI("." + s + " :button").prop("disabled", !0),
63
- SFSI("." + s).hide()) : (SFSI("." + s + " :input").removeAttr("disabled", !0), SFSI("." + s + " :button").removeAttr("disabled", !0),
64
- SFSI("." + s).show());
65
- }
66
-
67
- function sfsi_depened_sections() {
68
- if ("sfsi" == SFSI("input[name='sfsi_rss_icons']:checked").val()) {
69
- for (i = 0; 16 > i; i++) {
70
- var s = i + 1,
71
- e = 74 * i;
72
- SFSI(".row_" + s + "_2").css("background-position", "-588px -" + e + "px");
73
- }
74
- var t = SFSI(".icon_img").attr("src");
75
- if (t) {
76
- if (t.indexOf("subscribe") != -1) {
77
- var n = t.replace("subscribe.png", "sf_arow_icn.png");
78
- } else {
79
- var n = t.replace("email.png", "sf_arow_icn.png");
80
- }
81
- SFSI(".icon_img").attr("src", n);
82
- }
83
- } else {
84
- if ("email" == SFSI("input[name='sfsi_rss_icons']:checked").val()) {
85
- for (SFSI(".row_1_2").css("background-position", "-58px 0"), i = 0; 16 > i; i++) {
86
- var s = i + 1,
87
- e = 74 * i;
88
- SFSI(".row_" + s + "_2").css("background-position", "-58px -" + e + "px");
89
- }
90
- var t = SFSI(".icon_img").attr("src");
91
- if (t) {
92
- if (t.indexOf("sf_arow_icn") != -1) {
93
- var n = t.replace("sf_arow_icn.png", "email.png");
94
- } else {
95
- var n = t.replace("subscribe.png", "email.png");
96
- }
97
- SFSI(".icon_img").attr("src", n);
98
- }
99
- } else {
100
- for (SFSI(".row_1_2").css("background-position", "-649px 0"), i = 0; 16 > i; i++) {
101
- var s = i + 1,
102
- e = 74 * i;
103
- SFSI(".row_" + s + "_2").css("background-position", "-649px -" + e + "px");
104
- }
105
- var t = SFSI(".icon_img").attr("src");
106
- if (t) {
107
- if (t.indexOf("email") != -1) {
108
- var n = t.replace("email.png", "subscribe.png");
109
- } else {
110
- var n = t.replace("sf_arow_icn.png", "subscribe.png");
111
- }
112
- SFSI(".icon_img").attr("src", n);
113
- }
114
- }
115
- }
116
- SFSI("input[name='sfsi_rss_display']").prop("checked") ? sfsi_section_Display("rss_section", "show") : sfsi_section_Display("rss_section", "hide"),
117
- SFSI("input[name='sfsi_email_display']").prop("checked") ? sfsi_section_Display("email_section", "show") : sfsi_section_Display("email_section", "hide"),
118
- SFSI("input[name='sfsi_facebook_display']").prop("checked") ? sfsi_section_Display("facebook_section", "show") : sfsi_section_Display("facebook_section", "hide"),
119
- SFSI("input[name='sfsi_twitter_display']").prop("checked") ? sfsi_section_Display("twitter_section", "show") : sfsi_section_Display("twitter_section", "hide"),
120
- SFSI("input[name='sfsi_youtube_display']").prop("checked") ? sfsi_section_Display("youtube_section", "show") : sfsi_section_Display("youtube_section", "hide"),
121
- SFSI("input[name='sfsi_pinterest_display']").prop("checked") ? sfsi_section_Display("pinterest_section", "show") : sfsi_section_Display("pinterest_section", "hide"),
122
- SFSI("input[name='sfsi_telegram_display']").prop("checked") ? sfsi_section_Display("telegram_section", "show") : sfsi_section_Display("telegram_section", "hide"),
123
- SFSI("input[name='sfsi_vk_display']").prop("checked") ? sfsi_section_Display("vk_section", "show") : sfsi_section_Display("vk_section", "hide"),
124
- SFSI("input[name='sfsi_ok_display']").prop("checked") ? sfsi_section_Display("ok_section", "show") : sfsi_section_Display("ok_section", "hide"),
125
- SFSI("input[name='sfsi_wechat_display']").prop("checked") ? sfsi_section_Display("wechat_section", "show") : sfsi_section_Display("wechat_section", "hide"),
126
- SFSI("input[name='sfsi_weibo_display']").prop("checked") ? sfsi_section_Display("weibo_section", "show") : sfsi_section_Display("weibo_section", "hide"),
127
- SFSI("input[name='sfsi_instagram_display']").prop("checked") ? sfsi_section_Display("instagram_section", "show") : sfsi_section_Display("instagram_section", "hide"),
128
- SFSI("input[name='sfsi_linkedin_display']").prop("checked") ? sfsi_section_Display("linkedin_section", "show") : sfsi_section_Display("linkedin_section", "hide"),
129
- SFSI("input[element-type='cusotm-icon']").prop("checked") ? sfsi_section_Display("custom_section", "show") : sfsi_section_Display("custom_section", "hide");
130
- }
131
-
132
- function CustomIConSectionsUpdate() {
133
- sfsi_section_Display("counter".ele, show);
134
- }
135
-
136
- // Upload Custom Skin {Monad}
137
- function sfsi_customskin_upload(s, ref, nonce) {
138
- var ttl = jQuery(ref).attr("title");
139
- var i = s,
140
- e = {
141
- action: "UploadSkins",
142
- custom_imgurl: i,
143
- nonce: nonce
144
- };
145
- SFSI.ajax({
146
- url: sfsi_icon_ajax_object.ajax_url,
147
- type: "post",
148
- data: e,
149
- success: function (msg) {
150
- if (msg.res = "success") {
151
- var arr = s.split('=');
152
- jQuery(ref).prev('.imgskin').attr('src', arr[1]);
153
- jQuery(ref).prev('.imgskin').css("display", "block");
154
- jQuery(ref).text("Update");
155
- jQuery(ref).next('.dlt_btn').css("display", "block");
156
- }
157
- }
158
- });
159
- }
160
-
161
- // Delete Custom Skin {Monad}
162
- function deleteskin_icon(s) {
163
- var iconname = jQuery(s).attr("title");
164
- var nonce = jQuery(s).attr("data-nonce");
165
- var i = iconname,
166
- e = {
167
- action: "DeleteSkin",
168
- iconname: i,
169
- nonce: nonce
170
- };
171
- console.log('delete sin icon', i, iconname, nonce);
172
- SFSI.ajax({
173
- url: sfsi_icon_ajax_object.ajax_url,
174
- type: "post",
175
- data: e,
176
- dataType: "json",
177
- success: function (msg) {
178
- console.log(s, e, msg);
179
-
180
- if (msg.res === "success") {
181
- SFSI(s).prev("a").text("Upload");
182
- SFSI(s).prev("a").prev("img").attr("src", '');
183
- SFSI(s).prev("a").prev("img").css("display", "none");
184
- SFSI(s).css("display", "none");
185
- } else {
186
- alert("Whoops! something went wrong.")
187
- }
188
- }
189
- });
190
- }
191
-
192
- // Save Custom Skin {Monad}
193
- function SFSI_done(nonce) {
194
- e = {
195
- action: "Iamdone",
196
- nonce: nonce
197
- };
198
-
199
- SFSI.ajax({
200
- url: sfsi_icon_ajax_object.ajax_url,
201
- type: "post",
202
- data: e,
203
- success: function (msg) {
204
- if (msg.res === "success") {
205
-
206
-
207
- jQuery("li.cstomskins_upload").children(".icns_tab_3").html(msg);
208
- SFSI("input[name='sfsi_rss_display']").prop("checked") ? sfsi_section_Display("rss_section", "show") : sfsi_section_Display("rss_section", "hide"), SFSI("input[name='sfsi_email_display']").prop("checked") ? sfsi_section_Display("email_section", "show") : sfsi_section_Display("email_section", "hide"), SFSI("input[name='sfsi_facebook_display']").prop("checked") ? sfsi_section_Display("facebook_section", "show") : sfsi_section_Display("facebook_section", "hide"), SFSI("input[name='sfsi_twitter_display']").prop("checked") ? sfsi_section_Display("twitter_section", "show") : sfsi_section_Display("twitter_section", "hide"), SFSI("input[name='sfsi_youtube_display']").prop("checked") ? sfsi_section_Display("youtube_section", "show") : sfsi_section_Display("youtube_section", "hide"), SFSI("input[name='sfsi_pinterest_display']").prop("checked") ? sfsi_section_Display("pinterest_section", "show") : sfsi_section_Display("pinterest_section", "hide"), SFSI("input[name='sfsi_instagram_display']").prop("checked") ? sfsi_section_Display("instagram_section", "show") : sfsi_section_Display("instagram_section", "hide"), SFSI("input[name='sfsi_linkedin_display']").prop("checked") ? sfsi_section_Display("linkedin_section", "show") : sfsi_section_Display("linkedin_section", "hide"), SFSI("input[element-type='cusotm-icon']").prop("checked") ? sfsi_section_Display("custom_section", "show") : sfsi_section_Display("custom_section", "hide");
209
- SFSI(".cstmskins-overlay").hide("slow");
210
- sfsi_update_step3() && sfsicollapse(this);
211
- }
212
- }
213
- });
214
- }
215
-
216
- // Upload Custom Icons {Monad}
217
- function sfsi_newcustomicon_upload(s, nonce, nonce2) {
218
- var i = s,
219
- e = {
220
- action: "UploadIcons",
221
- custom_imgurl: i,
222
- nonce: nonce
223
- };
224
- SFSI.ajax({
225
- url: sfsi_icon_ajax_object.ajax_url,
226
- type: "post",
227
- data: e,
228
- dataType: "json",
229
- async: !0,
230
- success: function (s) {
231
- if (s.res == 'success') {
232
- afterIconSuccess(s, nonce2);
233
- } else {
234
- SFSI(".upload-overlay").hide("slow");
235
- SFSI(".uperror").html(s.res);
236
- showErrorSuc("Error", "Some Error Occured During Upload Custom Icon", 1)
237
- }
238
- }
239
- });
240
- }
241
-
242
- function sfsi_update_step1() {
243
- var nonce = SFSI("#sfsi_save1").attr("data-nonce");
244
- global_error = 0, beForeLoad(), sfsi_depened_sections();
245
- var s = !1,
246
- i = SFSI("input[name='sfsi_rss_display']:checked").val(),
247
- e = SFSI("input[name='sfsi_email_display']:checked").val(),
248
- t = SFSI("input[name='sfsi_facebook_display']:checked").val(),
249
- n = SFSI("input[name='sfsi_twitter_display']:checked").val(),
250
- r = SFSI("input[name='sfsi_youtube_display']:checked").val(),
251
- c = SFSI("input[name='sfsi_pinterest_display']:checked").val(),
252
- p = SFSI("input[name='sfsi_linkedin_display']:checked").val(),
253
- tg = SFSI("input[name='sfsi_telegram_display']:checked").val(),
254
- vk = SFSI("input[name='sfsi_vk_display']:checked").val(),
255
- ok = SFSI("input[name='sfsi_ok_display']:checked").val(),
256
- wc = SFSI("input[name='sfsi_wechat_display']:checked").val(),
257
- wb = SFSI("input[name='sfsi_weibo_display']:checked").val(),
258
- _ = SFSI("input[name='sfsi_instagram_display']:checked").val(),
259
- l = SFSI("input[name='sfsi_custom1_display']:checked").val(),
260
- S = SFSI("input[name='sfsi_custom2_display']:checked").val(),
261
- u = SFSI("input[name='sfsi_custom3_display']:checked").val(),
262
- f = SFSI("input[name='sfsi_custom4_display']:checked").val(),
263
- d = SFSI("input[name='sfsi_custom5_display']:checked").val(),
264
- I = {
265
- action: "updateSrcn1",
266
- sfsi_rss_display: i,
267
- sfsi_email_display: e,
268
- sfsi_facebook_display: t,
269
- sfsi_twitter_display: n,
270
- sfsi_youtube_display: r,
271
- sfsi_pinterest_display: c,
272
- sfsi_linkedin_display: p,
273
- sfsi_telegram_display: tg,
274
- sfsi_vk_display: vk,
275
- sfsi_ok_display: ok,
276
- sfsi_wechat_display: wc,
277
- sfsi_weibo_display: wb,
278
- sfsi_instagram_display: _,
279
- sfsi_custom1_display: l,
280
- sfsi_custom2_display: S,
281
- sfsi_custom3_display: u,
282
- sfsi_custom4_display: f,
283
- sfsi_custom5_display: d,
284
- nonce: nonce
285
- };
286
- SFSI.ajax({
287
- url: sfsi_icon_ajax_object.ajax_url,
288
- type: "post",
289
- data: I,
290
- async: !0,
291
- dataType: "json",
292
- success: function (i) {
293
- if (i == "wrong_nonce") {
294
- showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 1);
295
- s = !1;
296
- afterLoad();
297
- } else {
298
- "success" == i ? (showErrorSuc("success", "Saved !", 1), sfsicollapse("#sfsi_save1"),
299
- sfsi_make_popBox()) : (global_error = 1, showErrorSuc("error", "Unkown error , please try again", 1),
300
- s = !1), afterLoad();
301
- }
302
- }
303
- });
304
- }
305
-
306
- function sfsi_update_step2() {
307
-
308
- var nonce = SFSI("#sfsi_save2").attr("data-nonce");
309
- var s = sfsi_validationStep2();
310
- if (!s) return global_error = 1, !1;
311
- beForeLoad();
312
- var i = 1 == SFSI("input[name='sfsi_rss_url']").prop("disabled") ? "" : SFSI("input[name='sfsi_rss_url']").val(),
313
- e = 1 == SFSI("input[name='sfsi_rss_icons']").prop("disabled") ? "" : SFSI("input[name='sfsi_rss_icons']:checked").val(),
314
-
315
- t = 1 == SFSI("input[name='sfsi_facebookPage_option']").prop("disabled") ? "" : SFSI("input[name='sfsi_facebookPage_option']:checked").val(),
316
- n = 1 == SFSI("input[name='sfsi_facebookLike_option']").prop("disabled") ? "" : SFSI("input[name='sfsi_facebookLike_option']:checked").val(),
317
- o = 1 == SFSI("input[name='sfsi_facebookShare_option']").prop("disabled") ? "" : SFSI("input[name='sfsi_facebookShare_option']:checked").val(),
318
- a = SFSI("input[name='sfsi_facebookPage_url']").val(),
319
- r = 1 == SFSI("input[name='sfsi_twitter_followme']").prop("disabled") ? "" : SFSI("input[name='sfsi_twitter_followme']:checked").val(),
320
- c = 1 == SFSI("input[name='sfsi_twitter_followUserName']").prop("disabled") ? "" : SFSI("input[name='sfsi_twitter_followUserName']").val(),
321
- p = 1 == SFSI("input[name='sfsi_twitter_aboutPage']").prop("disabled") ? "" : SFSI("input[name='sfsi_twitter_aboutPage']:checked").val(),
322
- _ = 1 == SFSI("input[name='sfsi_twitter_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_twitter_page']:checked").val(),
323
- l = SFSI("input[name='sfsi_twitter_pageURL']").val(),
324
- S = SFSI("textarea[name='sfsi_twitter_aboutPageText']").val(),
325
- m = 1 == SFSI("input[name='sfsi_youtube_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_youtube_page']:checked").val(),
326
- F = 1 == SFSI("input[name='sfsi_youtube_pageUrl']").prop("disabled") ? "" : SFSI("input[name='sfsi_youtube_pageUrl']").val(),
327
- h = 1 == SFSI("input[name='sfsi_youtube_follow']").prop("disabled") ? "" : SFSI("input[name='sfsi_youtube_follow']:checked").val(),
328
- cls = SFSI("input[name='sfsi_youtubeusernameorid']:checked").val(),
329
- v = SFSI("input[name='sfsi_ytube_user']").val(),
330
- vchid = SFSI("input[name='sfsi_ytube_chnlid']").val(),
331
- g = 1 == SFSI("input[name='sfsi_pinterest_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_pinterest_page']:checked").val(),
332
- k = 1 == SFSI("input[name='sfsi_pinterest_pageUrl']").prop("disabled") ? "" : SFSI("input[name='sfsi_pinterest_pageUrl']").val(),
333
- y = 1 == SFSI("input[name='sfsi_pinterest_pingBlog']").prop("disabled") ? "" : SFSI("input[name='sfsi_pinterest_pingBlog']:checked").val(),
334
- b = 1 == SFSI("input[name='sfsi_instagram_pageUrl']").prop("disabled") ? "" : SFSI("input[name='sfsi_instagram_pageUrl']").val(),
335
- w = 1 == SFSI("input[name='sfsi_linkedin_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedin_page']:checked").val(),
336
- x = 1 == SFSI("input[name='sfsi_linkedin_pageURL']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedin_pageURL']").val(),
337
- C = 1 == SFSI("input[name='sfsi_linkedin_follow']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedin_follow']:checked").val(),
338
- D = SFSI("input[name='sfsi_linkedin_followCompany']").val(),
339
- U = 1 == SFSI("input[name='sfsi_linkedin_SharePage']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedin_SharePage']:checked").val(),
340
- O = SFSI("input[name='sfsi_linkedin_recommendBusines']:checked").val(),
341
- T = SFSI("input[name='sfsi_linkedin_recommendProductId']").val(),
342
- j = SFSI("input[name='sfsi_linkedin_recommendCompany']").val(),
343
- tp = 1 == SFSI("input[name='sfsi_telegram_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_telegram_page']:checked").val(),
344
- tpu = SFSI("input[name='sfsi_telegram_pageURL']").val(),
345
- tm = SFSI("input[name='sfsi_telegram_message']").val(),
346
- tmn = SFSI("input[name='sfsi_telegram_username']").val(),
347
- wp = 1 == SFSI("input[name='sfsi_weibo_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_weibo_page']:checked").val(),
348
- wpu = SFSI("input[name='sfsi_weibo_pageURL']").val(),
349
- vp = 1 == SFSI("input[name='sfsi_vk_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_vk_page']:checked").val(),
350
- vpu = SFSI("input[name='sfsi_vk_pageURL']").val(),
351
- op = 1 == SFSI("input[name='sfsi_ok_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_ok_page']:checked").val(),
352
- opu = SFSI("input[name='sfsi_ok_pageURL']").val(),
353
- P = {};
354
- SFSI("input[name='sfsi_CustomIcon_links[]']").each(function () {
355
- P[SFSI(this).attr("file-id")] = this.value;
356
- });
357
- var M = {
358
- action: "updateSrcn2",
359
- sfsi_rss_url: i,
360
- sfsi_rss_icons: e,
361
- sfsi_facebookPage_option: t,
362
- sfsi_facebookLike_option: n,
363
- sfsi_facebookShare_option: o,
364
- sfsi_facebookPage_url: a,
365
- sfsi_twitter_followme: r,
366
- sfsi_twitter_followUserName: c,
367
- sfsi_twitter_aboutPage: p,
368
- sfsi_twitter_page: _,
369
- sfsi_twitter_pageURL: l,
370
- sfsi_twitter_aboutPageText: S,
371
- sfsi_youtube_page: m,
372
- sfsi_youtube_pageUrl: F,
373
- sfsi_youtube_follow: h,
374
- sfsi_youtubeusernameorid: cls,
375
- sfsi_ytube_user: v,
376
- sfsi_ytube_chnlid: vchid,
377
- sfsi_pinterest_page: g,
378
- sfsi_pinterest_pageUrl: k,
379
- sfsi_instagram_pageUrl: b,
380
- sfsi_pinterest_pingBlog: y,
381
- sfsi_linkedin_page: w,
382
- sfsi_linkedin_pageURL: x,
383
- sfsi_linkedin_follow: C,
384
- sfsi_linkedin_followCompany: D,
385
- sfsi_linkedin_SharePage: U,
386
- sfsi_linkedin_recommendBusines: O,
387
- sfsi_linkedin_recommendCompany: j,
388
- sfsi_linkedin_recommendProductId: T,
389
- sfsi_custom_links: P,
390
- sfsi_telegram_page: tp,
391
- sfsi_telegram_pageURL: tpu,
392
- sfsi_telegram_message: tm,
393
- sfsi_telegram_username: tmn,
394
- sfsi_weibo_page: wp,
395
- sfsi_weibo_pageURL: wpu,
396
- sfsi_vk_page: vp,
397
- sfsi_vk_pageURL: vpu,
398
- sfsi_ok_page: op,
399
- sfsi_ok_pageURL: opu,
400
- nonce: nonce
401
- };
402
- SFSI.ajax({
403
- url: sfsi_icon_ajax_object.ajax_url,
404
- type: "post",
405
- data: M,
406
- async: !0,
407
- dataType: "json",
408
- success: function (s) {
409
- if (s == "wrong_nonce") {
410
- showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 2);
411
- return_value = !1;
412
- afterLoad();
413
- } else {
414
- "success" == s ? (showErrorSuc("success", "Saved !", 2), sfsicollapse("#sfsi_save2"),
415
- sfsi_depened_sections()) : (global_error = 1, showErrorSuc("error", "Unkown error , please try again", 2),
416
- return_value = !1), afterLoad();
417
- }
418
- }
419
- });
420
- }
421
-
422
- function sfsi_update_step3() {
423
- var nonce = SFSI("#sfsi_save3").attr("data-nonce");
424
- var s = sfsi_validationStep3();
425
- if (!s) return global_error = 1, !1;
426
- beForeLoad();
427
- var i = SFSI("input[name='sfsi_actvite_theme']:checked").val(),
428
- e = SFSI("input[name='sfsi_mouseOver']:checked").val(),
429
- t = SFSI("input[name='sfsi_shuffle_icons']:checked").val(),
430
- n = SFSI("input[name='sfsi_shuffle_Firstload']:checked").val(),
431
- o = SFSI("input[name='sfsi_same_icons_mouseOver_effect']:checked").val(),
432
- a = SFSI("input[name='sfsi_shuffle_interval']:checked").val(),
433
- r = SFSI("input[name='sfsi_shuffle_intervalTime']").val(),
434
- c = SFSI("input[name='sfsi_specialIcon_animation']:checked").val(),
435
- p = SFSI("input[name='sfsi_specialIcon_MouseOver']:checked").val(),
436
- _ = SFSI("input[name='sfsi_specialIcon_Firstload']:checked").val(),
437
- l = SFSI("#sfsi_specialIcon_Firstload_Icons option:selected").val(),
438
- S = SFSI("input[name='sfsi_specialIcon_interval']:checked").val(),
439
- u = SFSI("input[name='sfsi_specialIcon_intervalTime']").val(),
440
- f = SFSI("#sfsi_specialIcon_intervalIcons option:selected").val();
441
-
442
- var mouseover_effect_type = 'same_icons'; //SFSI("input[name='sfsi_mouseOver_effect_type']:checked").val();
443
-
444
- d = {
445
- action: "updateSrcn3",
446
- sfsi_actvite_theme: i,
447
- sfsi_mouseOver: e,
448
- sfsi_shuffle_icons: t,
449
- sfsi_shuffle_Firstload: n,
450
- sfsi_mouseOver_effect: o,
451
- sfsi_mouseover_effect_type: mouseover_effect_type,
452
- sfsi_shuffle_interval: a,
453
- sfsi_shuffle_intervalTime: r,
454
- sfsi_specialIcon_animation: c,
455
- sfsi_specialIcon_MouseOver: p,
456
- sfsi_specialIcon_Firstload: _,
457
- sfsi_specialIcon_Firstload_Icons: l,
458
- sfsi_specialIcon_interval: S,
459
- sfsi_specialIcon_intervalTime: u,
460
- sfsi_specialIcon_intervalIcons: f,
461
- nonce: nonce
462
- };
463
- SFSI.ajax({
464
- url: sfsi_icon_ajax_object.ajax_url,
465
- type: "post",
466
- data: d,
467
- async: !0,
468
- dataType: "json",
469
- success: function (s) {
470
- if (s == "wrong_nonce") {
471
- showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 3);
472
- return_value = !1;
473
- afterLoad();
474
- } else {
475
- "success" == s ? (showErrorSuc("success", "Saved !", 3), sfsicollapse("#sfsi_save3")) : (showErrorSuc("error", "Unkown error , please try again", 3),
476
- return_value = !1), afterLoad();
477
- }
478
- }
479
- });
480
- }
481
-
482
- function sfsi_show_counts() {
483
- "yes" == SFSI("input[name='sfsi_display_counts']:checked").val() ? (SFSI(".count_sections").slideDown(),
484
- sfsi_showPreviewCounts()) : (SFSI(".count_sections").slideUp(), sfsi_showPreviewCounts());
485
- }
486
-
487
- function sfsi_showPreviewCounts() {
488
- var s = 0;
489
- 1 == SFSI("input[name='sfsi_rss_countsDisplay']").prop("checked") ? (SFSI("#sfsi_rss_countsDisplay").css("opacity", 1), s = 1) : SFSI("#sfsi_rss_countsDisplay").css("opacity", 0),
490
- 1 == SFSI("input[name='sfsi_email_countsDisplay']").prop("checked") ? (SFSI("#sfsi_email_countsDisplay").css("opacity", 1),
491
- s = 1) : SFSI("#sfsi_email_countsDisplay").css("opacity", 0), 1 == SFSI("input[name='sfsi_facebook_countsDisplay']").prop("checked") ? (SFSI("#sfsi_facebook_countsDisplay").css("opacity", 1),
492
- s = 1) : SFSI("#sfsi_facebook_countsDisplay").css("opacity", 0), 1 == SFSI("input[name='sfsi_twitter_countsDisplay']").prop("checked") ? (SFSI("#sfsi_twitter_countsDisplay").css("opacity", 1),
493
- s = 1) : SFSI("#sfsi_twitter_countsDisplay").css("opacity", 0),
494
- 1 == SFSI("input[name='sfsi_linkedIn_countsDisplay']").prop("checked") ? (SFSI("#sfsi_linkedIn_countsDisplay").css("opacity", 1), s = 1) : SFSI("#sfsi_linkedIn_countsDisplay").css("opacity", 0),
495
- 1 == SFSI("input[name='sfsi_youtube_countsDisplay']").prop("checked") ? (SFSI("#sfsi_youtube_countsDisplay").css("opacity", 1),
496
- s = 1) : SFSI("#sfsi_youtube_countsDisplay").css("opacity", 0), 1 == SFSI("input[name='sfsi_pinterest_countsDisplay']").prop("checked") ? (SFSI("#sfsi_pinterest_countsDisplay").css("opacity", 1),
497
- s = 1) : SFSI("#sfsi_pinterest_countsDisplay").css("opacity", 0), 1 == SFSI("input[name='sfsi_instagram_countsDisplay']").prop("checked") ? (SFSI("#sfsi_instagram_countsDisplay").css("opacity", 1),
498
- s = 1) : SFSI("#sfsi_instagram_countsDisplay").css("opacity", 0),
499
- 1 == SFSI("input[name='sfsi_telegram_countsDisplay']").prop("checked") ? (SFSI("#sfsi_telegram_countsDisplay").css("opacity", 0), s = 1) : SFSI("#sfsi_telegram_countsDisplay").css("opacity", 0),
500
- 1 == SFSI("input[name='sfsi_vk_countsDisplay']").prop("checked") ? (SFSI("#sfsi_vk_countsDisplay").css("opacity", 0), s = 1) : SFSI("#sfsi_vk_countsDisplay").css("opacity", 0),
501
- 1 == SFSI("input[name='sfsi_ok_countsDisplay']").prop("checked") ? (SFSI("#sfsi_ok_countsDisplay").css("opacity", 0), s = 1) : SFSI("#sfsi_ok_countsDisplay").css("opacity", 0),
502
- 1 == SFSI("input[name='sfsi_weibo_countsDisplay']").prop("checked") ? (SFSI("#sfsi_weibo_countsDisplay").css("opacity", 0), s = 1) : SFSI("#sfsi_weibo_countsDisplay").css("opacity", 0),
503
- 1 == SFSI("input[name='sfsi_wechat_countsDisplay']").prop("checked") ? (SFSI("#sfsi_wechat_countsDisplay").css("opacity", 0), s = 1) : SFSI("#sfsi_wechat_countsDisplay").css("opacity", 0),
504
-
505
- 0 == s || "no" == SFSI("input[name='sfsi_display_counts']:checked").val() ? SFSI(".sfsi_Cdisplay").hide() : SFSI(".sfsi_Cdisplay").show();
506
- }
507
-
508
- function sfsi_show_OnpostsDisplay() {
509
- //"yes" == SFSI("input[name='sfsi_show_Onposts']:checked").val() ? SFSI(".PostsSettings_section").slideDown() :SFSI(".PostsSettings_section").slideUp();
510
- }
511
-
512
- function sfsi_update_step4() {
513
- var nonce = SFSI("#sfsi_save4").attr("data-nonce");
514
- var s = !1,
515
- i = sfsi_validationStep4();
516
- if (!i) return global_error = 1, !1;
517
- beForeLoad();
518
- var e = SFSI("input[name='sfsi_display_counts']:checked").val(),
519
- t = 1 == SFSI("input[name='sfsi_email_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_email_countsDisplay']:checked").val(),
520
- n = 1 == SFSI("input[name='sfsi_email_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_email_countsFrom']:checked").val(),
521
- o = SFSI("input[name='sfsi_email_manualCounts']").val(),
522
- r = 1 == SFSI("input[name='sfsi_rss_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_rss_countsDisplay']:checked").val(),
523
- c = SFSI("input[name='sfsi_rss_manualCounts']").val(),
524
- p = 1 == SFSI("input[name='sfsi_facebook_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_facebook_countsDisplay']:checked").val(),
525
- _ = 1 == SFSI("input[name='sfsi_facebook_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_facebook_countsFrom']:checked").val(),
526
- mp = SFSI("input[name='sfsi_facebook_mypageCounts']").val(),
527
- l = SFSI("input[name='sfsi_facebook_manualCounts']").val(),
528
- S = 1 == SFSI("input[name='sfsi_twitter_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_twitter_countsDisplay']:checked").val(),
529
- u = 1 == SFSI("input[name='sfsi_twitter_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_twitter_countsFrom']:checked").val(),
530
- f = SFSI("input[name='sfsi_twitter_manualCounts']").val(),
531
- d = SFSI("input[name='tw_consumer_key']").val(),
532
- I = SFSI("input[name='tw_consumer_secret']").val(),
533
- m = SFSI("input[name='tw_oauth_access_token']").val(),
534
- F = SFSI("input[name='tw_oauth_access_token_secret']").val(),
535
- k = 1 == SFSI("input[name='sfsi_linkedIn_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedIn_countsFrom']:checked").val(),
536
- y = SFSI("input[name='sfsi_linkedIn_manualCounts']").val(),
537
- b = SFSI("input[name='ln_company']").val(),
538
- w = SFSI("input[name='ln_api_key']").val(),
539
- x = SFSI("input[name='ln_secret_key']").val(),
540
- C = SFSI("input[name='ln_oAuth_user_token']").val(),
541
- D = 1 == SFSI("input[name='sfsi_linkedIn_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedIn_countsDisplay']:checked").val(),
542
- k = 1 == SFSI("input[name='sfsi_linkedIn_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedIn_countsFrom']:checked").val(),
543
- y = SFSI("input[name='sfsi_linkedIn_manualCounts']").val(),
544
- U = 1 == SFSI("input[name='sfsi_youtube_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_youtube_countsDisplay']:checked").val(),
545
- O = 1 == SFSI("input[name='sfsi_youtube_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_youtube_countsFrom']:checked").val(),
546
- T = SFSI("input[name='sfsi_youtube_manualCounts']").val(),
547
- j = SFSI("input[name='sfsi_youtube_user']").val(),
548
- P = 1 == SFSI("input[name='sfsi_pinterest_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_pinterest_countsDisplay']:checked").val(),
549
- M = 1 == SFSI("input[name='sfsi_pinterest_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_pinterest_countsFrom']:checked").val(),
550
- L = SFSI("input[name='sfsi_pinterest_manualCounts']").val(),
551
- B = SFSI("input[name='sfsi_pinterest_user']").val(),
552
- E = SFSI("input[name='sfsi_pinterest_board']").val(),
553
- z = 1 == SFSI("input[name='sfsi_instagram_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_instagram_countsDisplay']:checked").val(),
554
- A = 1 == SFSI("input[name='sfsi_instagram_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_instagram_countsFrom']:checked").val(),
555
- N = SFSI("input[name='sfsi_instagram_manualCounts']").val(),
556
- H = SFSI("input[name='sfsi_instagram_User']").val(),
557
- ha = SFSI("input[name='sfsi_instagram_clientid']").val(),
558
- ia = SFSI("input[name='sfsi_instagram_appurl']").val(),
559
- ja = SFSI("input[name='sfsi_instagram_token']").val(),
560
-
561
- tc = 1 == SFSI("input[name='sfsi_telegram_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_telegram_countsDisplay']:checked").val(),
562
- tm = SFSI("input[name='sfsi_telegram_manualCounts']").val(),
563
-
564
- vc = 1 == SFSI("input[name='sfsi_vk_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_vk_countsDisplay']:checked").val(),
565
- vm = SFSI("input[name='sfsi_vk_manualCounts']").val(),
566
-
567
-
568
- oc = 1 == SFSI("input[name='sfsi_ok_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_ok_countsDisplay']:checked").val(),
569
- om = SFSI("input[name='sfsi_ok_manualCounts']").val(),
570
-
571
-
572
- wc = 1 == SFSI("input[name='sfsi_weibo_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_weibo_countsDisplay']:checked").val(),
573
- wm = SFSI("input[name='sfsi_weibo_manualCounts']").val(),
574
-
575
- wcc = 1 == SFSI("input[name='sfsi_wechat_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_wechat_countsDisplay']:checked").val(),
576
- wcm = SFSI("input[name='sfsi_wechat_manualCounts']").val(),
577
- $ = {
578
- action: "updateSrcn4",
579
- sfsi_display_counts: e,
580
- sfsi_email_countsDisplay: t,
581
- sfsi_email_countsFrom: n,
582
- sfsi_email_manualCounts: o,
583
- sfsi_rss_countsDisplay: r,
584
- sfsi_rss_manualCounts: c,
585
- sfsi_facebook_countsDisplay: p,
586
- sfsi_facebook_countsFrom: _,
587
- sfsi_facebook_mypageCounts: mp,
588
- sfsi_facebook_manualCounts: l,
589
- sfsi_twitter_countsDisplay: S,
590
- sfsi_twitter_countsFrom: u,
591
- sfsi_twitter_manualCounts: f,
592
- tw_consumer_key: d,
593
- tw_consumer_secret: I,
594
- tw_oauth_access_token: m,
595
- tw_oauth_access_token_secret: F,
596
- sfsi_linkedIn_countsDisplay: D,
597
- sfsi_linkedIn_countsFrom: k,
598
- sfsi_linkedIn_manualCounts: y,
599
- ln_company: b,
600
- ln_api_key: w,
601
- ln_secret_key: x,
602
- ln_oAuth_user_token: C,
603
- sfsi_youtube_countsDisplay: U,
604
- sfsi_youtube_countsFrom: O,
605
- sfsi_youtube_manualCounts: T,
606
- sfsi_youtube_user: j,
607
- sfsi_youtube_channelId: SFSI("input[name='sfsi_youtube_channelId']").val(),
608
- sfsi_pinterest_countsDisplay: P,
609
- sfsi_pinterest_countsFrom: M,
610
- sfsi_pinterest_manualCounts: L,
611
- sfsi_pinterest_user: B,
612
- sfsi_pinterest_board: E,
613
- sfsi_instagram_countsDisplay: z,
614
- sfsi_instagram_countsFrom: A,
615
- sfsi_instagram_manualCounts: N,
616
- sfsi_instagram_User: H,
617
- sfsi_instagram_clientid: ha,
618
- sfsi_instagram_appurl: ia,
619
- sfsi_instagram_token: ja,
620
- sfsi_telegram_countsDisplay: tc,
621
- sfsi_telegram_manualCounts: tm,
622
- sfsi_vk_countsDisplay: vc,
623
- sfsi_vk_manualCounts: vm,
624
- sfsi_ok_countsDisplay: oc,
625
- sfsi_ok_manualCounts: om,
626
- sfsi_weibo_countsDisplay: wc,
627
- sfsi_weibo_manualCounts: wm,
628
- sfsi_wechat_countsDisplay: wcc,
629
- sfsi_wechat_manualCounts: wcm,
630
- nonce: nonce
631
- };
632
- console.log($);
633
- return SFSI.ajax({
634
- url: sfsi_icon_ajax_object.ajax_url,
635
- type: "post",
636
- data: $,
637
- dataType: "json",
638
- async: !0,
639
- success: function (s) {
640
- if (s == "wrong_nonce") {
641
- showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 4);
642
- global_error = 1;
643
- afterLoad();
644
- } else {
645
- "success" == s.res ? (showErrorSuc("success", "Saved !", 4), sfsicollapse("#sfsi_save4"),
646
- sfsi_showPreviewCounts()) : (showErrorSuc("error", "Unkown error , please try again", 4),
647
- global_error = 1), afterLoad();
648
- }
649
- }
650
- }), s;
651
- }
652
-
653
- function sfsi_update_step5() {
654
- var nonce = SFSI("#sfsi_save5").attr("data-nonce");
655
- sfsi_update_step3();
656
-
657
- var s = sfsi_validationStep5();
658
-
659
- if (!s) return global_error = 1, !1;
660
-
661
- beForeLoad();
662
-
663
- var i = SFSI("input[name='sfsi_icons_size']").val(),
664
- e = SFSI("input[name='sfsi_icons_perRow']").val(),
665
- t = SFSI("input[name='sfsi_icons_spacing']").val(),
666
- n = SFSI("#sfsi_icons_Alignment").val(),
667
- o = SFSI("input[name='sfsi_icons_ClickPageOpen']:checked").val(),
668
-
669
- se = SFSI("input[name='sfsi_icons_suppress_errors']:checked").val(),
670
- c = SFSI("input[name='sfsi_icons_stick']:checked").val(),
671
- p = SFSI("#sfsi_rssIcon_order").attr("data-index"),
672
- _ = SFSI("#sfsi_emailIcon_order").attr("data-index"),
673
- S = SFSI("#sfsi_facebookIcon_order").attr("data-index"),
674
- u = SFSI("#sfsi_twitterIcon_order").attr("data-index"),
675
- f = SFSI("#sfsi_youtubeIcon_order").attr("data-index"),
676
- d = SFSI("#sfsi_pinterestIcon_order").attr("data-index"),
677
- I = SFSI("#sfsi_instagramIcon_order").attr("data-index"),
678
- F = SFSI("#sfsi_linkedinIcon_order").attr("data-index"),
679
- tgi = SFSI("#sfsi_telegramIcon_order").attr("data-index"),
680
- vki = SFSI("#sfsi_vkIcon_order").attr("data-index"),
681
- oki = SFSI("#sfsi_okIcon_order").attr("data-index"),
682
- wbi = SFSI("#sfsi_weiboIcon_order").attr("data-index"),
683
- wci = SFSI("#sfsi_wechatIcon_order").attr("data-index"),
684
-
685
- h = new Array();
686
-
687
- SFSI(".custom_iconOrder").each(function () {
688
- h.push({
689
- order: SFSI(this).attr("data-index"),
690
- ele: SFSI(this).attr("element-id")
691
- });
692
- });
693
-
694
- var v = 1 == SFSI("input[name='sfsi_rss_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_rss_MouseOverText']").val(),
695
- g = 1 == SFSI("input[name='sfsi_email_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_email_MouseOverText']").val(),
696
- k = 1 == SFSI("input[name='sfsi_twitter_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_twitter_MouseOverText']").val(),
697
- y = 1 == SFSI("input[name='sfsi_facebook_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_facebook_MouseOverText']").val(),
698
- w = 1 == SFSI("input[name='sfsi_linkedIn_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedIn_MouseOverText']").val(),
699
- x = 1 == SFSI("input[name='sfsi_youtube_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_youtube_MouseOverText']").val(),
700
- C = 1 == SFSI("input[name='sfsi_pinterest_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_pinterest_MouseOverText']").val(),
701
- D = 1 == SFSI("input[name='sfsi_instagram_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_instagram_MouseOverText']").val(),
702
- tg = 1 == SFSI("input[name='sfsi_telegram_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_telegram_MouseOverText']").val(),
703
- vk = 1 == SFSI("input[name='sfsi_vk_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_vk_MouseOverText']").val(),
704
- ok = 1 == SFSI("input[name='sfsi_ok_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_ok_MouseOverText']").val(),
705
- wb = 1 == SFSI("input[name='sfsi_weibo_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_weibo_MouseOverText']").val(),
706
- wc = 1 == SFSI("input[name='sfsi_wechat_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_wechat_MouseOverText']").val(),
707
-
708
- O = {};
709
- SFSI("input[name='sfsi_custom_MouseOverTexts[]']").each(function () {
710
- O[SFSI(this).attr("file-id")] = this.value;
711
- });
712
-
713
- var sfsi_custom_social_hide = SFSI("input[name='sfsi_custom_social_hide']").val();
714
-
715
- var T = {
716
- action: "updateSrcn5",
717
- sfsi_icons_size: i,
718
- sfsi_icons_Alignment: n,
719
- sfsi_icons_perRow: e,
720
- sfsi_icons_spacing: t,
721
- sfsi_icons_ClickPageOpen: o,
722
- sfsi_icons_suppress_errors: se,
723
- sfsi_icons_stick: c,
724
- sfsi_rss_MouseOverText: v,
725
- sfsi_email_MouseOverText: g,
726
- sfsi_twitter_MouseOverText: k,
727
- sfsi_facebook_MouseOverText: y,
728
- sfsi_youtube_MouseOverText: x,
729
- sfsi_linkedIn_MouseOverText: w,
730
- sfsi_pinterest_MouseOverText: C,
731
- sfsi_instagram_MouseOverText: D,
732
- sfsi_telegram_MouseOverText: tg,
733
- sfsi_vk_MouseOverText: vk,
734
- sfsi_ok_MouseOverText: ok,
735
- sfsi_weibo_MouseOverText: wb,
736
- sfsi_wechat_MouseOverText: wc,
737
- sfsi_custom_MouseOverTexts: O,
738
- sfsi_rssIcon_order: p,
739
- sfsi_emailIcon_order: _,
740
- sfsi_facebookIcon_order: S,
741
- sfsi_twitterIcon_order: u,
742
- sfsi_youtubeIcon_order: f,
743
- sfsi_pinterestIcon_order: d,
744
- sfsi_instagramIcon_order: I,
745
- sfsi_linkedinIcon_order: F,
746
- sfsi_telegramIcon_order: tgi,
747
- sfsi_vkIcon_order: vki,
748
- sfsi_okIcon_order: oki,
749
- sfsi_weiboIcon_order: wbi,
750
- sfsi_wechatIcon_order: wci,
751
-
752
- sfsi_custom_orders: h,
753
- sfsi_custom_social_hide: sfsi_custom_social_hide,
754
- nonce: nonce
755
- };
756
- console.log(T);
757
- SFSI.ajax({
758
- url: sfsi_icon_ajax_object.ajax_url,
759
- type: "post",
760
- data: T,
761
- dataType: "json",
762
- async: !0,
763
- success: function (s) {
764
- if (s == "wrong_nonce") {
765
- showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 5);
766
- global_error = 1;
767
- afterLoad();
768
- } else {
769
- "success" == s ? (showErrorSuc("success", "Saved !", 5), sfsicollapse("#sfsi_save5")) : (global_error = 1,
770
- showErrorSuc("error", "Unkown error , please try again", 5)), afterLoad();
771
- }
772
- }
773
- });
774
- }
775
-
776
- function sfsi_update_step6() {
777
- var nonce = SFSI("#sfsi_save6").attr("data-nonce");
778
- beForeLoad();
779
- var s = SFSI("input[name='sfsi_show_Onposts']:checked").val(),
780
- i = SFSI("input[name='sfsi_textBefor_icons']").val(),
781
- e = SFSI("#sfsi_icons_alignment").val(),
782
- t = SFSI("#sfsi_icons_DisplayCounts").val(),
783
- rsub = SFSI("input[name='sfsi_rectsub']:checked").val(),
784
- rfb = SFSI("input[name='sfsi_rectfb']:checked").val(),
785
- rpin = SFSI("input[name='sfsi_rectpinit']:checked").val(),
786
- rshr = SFSI("input[name='sfsi_rectshr']:checked").val(),
787
- rtwr = SFSI("input[name='sfsi_recttwtr']:checked").val(),
788
- rfbshare = SFSI("input[name='sfsi_rectfbshare']:checked").val(),
789
- a = SFSI("input[name='sfsi_display_button_type']:checked").val();
790
- countshare = SFSI("input[name='sfsi_share_count']:checked").val();
791
- endpost = SFSI("input[name='sfsi_responsive_icons_end_post']:checked").val();
792
-
793
- var responsive_icons = {
794
- "default_icons": {},
795
- "settings": {}
796
- };
797
- SFSI('.sfsi_responsive_default_icon_container input[type="checkbox"]').each(function (index, obj) {
798
- var data_obj = {};
799
- data_obj.active = ('checked' == SFSI(obj).attr('checked')) ? 'yes' : 'no';
800
- var iconname = SFSI(obj).attr('data-icon');
801
- var next_section = SFSI(obj).parent().parent();
802
- data_obj.text = next_section.find('input[name="sfsi_responsive_' + iconname + '_input"]').val();
803
- data_obj.url = next_section.find('input[name="sfsi_responsive_' + iconname + '_url_input"]').val();
804
- responsive_icons.default_icons[iconname] = data_obj;
805
- });
806
- SFSI('.sfsi_responsive_custom_icon_container input[type="checkbox"]').each(function (index, obj) {
807
- if (SFSI(obj).attr('id') != "sfsi_responsive_custom_new_display") {
808
- var data_obj = {};
809
- data_obj.active = 'checked' == SFSI(obj).attr('checked') ? 'yes' : 'no';
810
- var icon_index = SFSI(obj).attr('data-custom-index');
811
- var next_section = SFSI(obj).parent().parent();
812
- data_obj['added'] = SFSI('input[name="sfsi_responsive_custom_' + index + '_added"]').val();
813
- data_obj.icon = next_section.find('img').attr('src');
814
- data_obj["bg-color"] = next_section.find('.sfsi_bg-color-picker').val();
815
-
816
- data_obj.text = next_section.find('input[name="sfsi_responsive_custom_' + icon_index + '_input"]').val();
817
- data_obj.url = next_section.find('input[name="sfsi_responsive_custom_' + icon_index + '_url_input"]').val();
818
- responsive_icons.custom_icons[index] = data_obj;
819
- }
820
- });
821
- responsive_icons.settings.icon_size = SFSI('select[name="sfsi_responsive_icons_settings_icon_size"]').val();
822
- responsive_icons.settings.icon_width_type = SFSI('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val();
823
- responsive_icons.settings.icon_width_size = SFSI('input[name="sfsi_responsive_icons_sttings_icon_width_size"]').val();
824
- responsive_icons.settings.edge_type = SFSI('select[name="sfsi_responsive_icons_settings_edge_type"]').val();
825
- responsive_icons.settings.edge_radius = SFSI('select[name="sfsi_responsive_icons_settings_edge_radius"]').val();
826
- responsive_icons.settings.style = SFSI('select[name="sfsi_responsive_icons_settings_style"]').val();
827
- responsive_icons.settings.margin = SFSI('input[name="sfsi_responsive_icons_settings_margin"]').val();
828
- responsive_icons.settings.text_align = SFSI('select[name="sfsi_responsive_icons_settings_text_align"]').val();
829
- responsive_icons.settings.show_count = SFSI('input[name="sfsi_responsive_icon_show_count"]:checked').val();
830
- responsive_icons.settings.counter_color = SFSI('input[name="sfsi_responsive_counter_color"]').val();
831
- responsive_icons.settings.counter_bg_color = SFSI('input[name="sfsi_responsive_counter_bg_color"]').val();
832
- responsive_icons.settings.share_count_text = SFSI('input[name="sfsi_responsive_counter_share_count_text"]').val();
833
- responsive_icons.settings.show_count = countshare;
834
- n = {
835
- action: "updateSrcn6",
836
- sfsi_show_Onposts: s,
837
- sfsi_icons_DisplayCounts: t,
838
- sfsi_icons_alignment: e,
839
- sfsi_textBefor_icons: i,
840
- sfsi_rectsub: rsub,
841
- sfsi_rectfb: rfb,
842
- sfsi_rectpinit: rpin,
843
- sfsi_rectshr: rshr,
844
- sfsi_recttwtr: rtwr,
845
- sfsi_rectfbshare: rfbshare,
846
- sfsi_responsive_icons: responsive_icons,
847
- sfsi_display_button_type: a,
848
- sfsi_responsive_icons_end_post:endpost,
849
- sfsi_share_count: countshare,
850
- nonce: nonce
851
- };
852
- SFSI.ajax({
853
- url: sfsi_icon_ajax_object.ajax_url,
854
- type: "post",
855
- data: n,
856
- dataType: "json",
857
- async: !0,
858
- success: function (s) {
859
- if (s == "wrong_nonce") {
860
- showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 6);
861
- global_error = 1;
862
- afterLoad();
863
- } else {
864
- "success" == s ? (showErrorSuc("success", "Saved !", 6), sfsicollapse("#sfsi_save6")) : (global_error = 1,
865
- showErrorSuc("error", "Unkown error , please try again", 6)), afterLoad();
866
- }
867
- }
868
- });
869
- }
870
-
871
- function sfsi_update_step7() {
872
- var nonce = SFSI("#sfsi_save7").attr("data-nonce");
873
- var s = sfsi_validationStep7();
874
- if (!s) return global_error = 1, !1;
875
- beForeLoad();
876
- var i = SFSI("input[name='sfsi_popup_text']").val(),
877
- e = SFSI("#sfsi_popup_font option:selected").val(),
878
- t = SFSI("#sfsi_popup_fontStyle option:selected").val(),
879
- color = SFSI("input[name='sfsi_popup_fontColor']").val(),
880
- n = SFSI("input[name='sfsi_popup_fontSize']").val(),
881
- o = SFSI("input[name='sfsi_popup_background_color']").val(),
882
- a = SFSI("input[name='sfsi_popup_border_color']").val(),
883
- r = SFSI("input[name='sfsi_popup_border_thickness']").val(),
884
- c = SFSI("input[name='sfsi_popup_border_shadow']:checked").val(),
885
- p = SFSI("input[name='sfsi_Show_popupOn']:checked").val(),
886
- _ = [];
887
- SFSI("#sfsi_Show_popupOn_PageIDs :selected").each(function (s, i) {
888
- _[s] = SFSI(i).val();
889
- });
890
- var l = SFSI("input[name='sfsi_Shown_pop']:checked").val(),
891
- S = SFSI("input[name='sfsi_Shown_popupOnceTime']").val(),
892
- u = SFSI("#sfsi_Shown_popuplimitPerUserTime").val(),
893
- f = {
894
- action: "updateSrcn7",
895
- sfsi_popup_text: i,
896
- sfsi_popup_font: e,
897
- sfsi_popup_fontColor: color,
898
- /*sfsi_popup_fontStyle: t,*/
899
- sfsi_popup_fontSize: n,
900
- sfsi_popup_background_color: o,
901
- sfsi_popup_border_color: a,
902
- sfsi_popup_border_thickness: r,
903
- sfsi_popup_border_shadow: c,
904
- sfsi_Show_popupOn: p,
905
- sfsi_Show_popupOn_PageIDs: _,
906
- sfsi_Shown_pop: l,
907
- sfsi_Shown_popupOnceTime: S,
908
- sfsi_Shown_popuplimitPerUserTime: u,
909
- nonce: nonce
910
- };
911
- SFSI.ajax({
912
- url: sfsi_icon_ajax_object.ajax_url,
913
- type: "post",
914
- data: f,
915
- dataType: "json",
916
- async: !0,
917
- success: function (s) {
918
- if (s == "wrong_nonce") {
919
- showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 7);
920
- afterLoad();
921
- } else {
922
- "success" == s ? (showErrorSuc("success", "Saved !", 7), sfsicollapse("#sfsi_save7")) : showErrorSuc("error", "Unkown error , please try again", 7),
923
- afterLoad();
924
- }
925
- }
926
- });
927
- }
928
-
929
- function sfsi_update_step8() {
930
- var nonce = SFSI("#sfsi_save8").attr("data-nonce");
931
- beForeLoad();
932
- var ie = SFSI("input[name='sfsi_form_adjustment']:checked").val(),
933
- je = SFSI("input[name='sfsi_form_height']").val(),
934
- ke = SFSI("input[name='sfsi_form_width']").val(),
935
- le = SFSI("input[name='sfsi_form_border']:checked").val(),
936
- me = SFSI("input[name='sfsi_form_border_thickness']").val(),
937
- ne = SFSI("input[name='sfsi_form_border_color']").val(),
938
- oe = SFSI("input[name='sfsi_form_background']").val(),
939
-
940
- ae = SFSI("input[name='sfsi_form_heading_text']").val(),
941
- be = SFSI("#sfsi_form_heading_font option:selected").val(),
942
- ce = SFSI("#sfsi_form_heading_fontstyle option:selected").val(),
943
- de = SFSI("input[name='sfsi_form_heading_fontcolor']").val(),
944
- ee = SFSI("input[name='sfsi_form_heading_fontsize']").val(),
945
- fe = SFSI("#sfsi_form_heading_fontalign option:selected").val(),
946
-
947
- ue = SFSI("input[name='sfsi_form_field_text']").val(),
948
- ve = SFSI("#sfsi_form_field_font option:selected").val(),
949
- we = SFSI("#sfsi_form_field_fontstyle option:selected").val(),
950
- xe = SFSI("input[name='sfsi_form_field_fontcolor']").val(),
951
- ye = SFSI("input[name='sfsi_form_field_fontsize']").val(),
952
- ze = SFSI("#sfsi_form_field_fontalign option:selected").val(),
953
-
954
- i = SFSI("input[name='sfsi_form_button_text']").val(),
955
- j = SFSI("#sfsi_form_button_font option:selected").val(),
956
- k = SFSI("#sfsi_form_button_fontstyle option:selected").val(),
957
- l = SFSI("input[name='sfsi_form_button_fontcolor']").val(),
958
- m = SFSI("input[name='sfsi_form_button_fontsize']").val(),
959
- n = SFSI("#sfsi_form_button_fontalign option:selected").val(),
960
- o = SFSI("input[name='sfsi_form_button_background']").val();
961
-
962
- var f = {
963
- action: "updateSrcn8",
964
- sfsi_form_adjustment: ie,
965
- sfsi_form_height: je,
966
- sfsi_form_width: ke,
967
- sfsi_form_border: le,
968
- sfsi_form_border_thickness: me,
969
- sfsi_form_border_color: ne,
970
- sfsi_form_background: oe,
971
-
972
- sfsi_form_heading_text: ae,
973
- sfsi_form_heading_font: be,
974
- sfsi_form_heading_fontstyle: ce,
975
- sfsi_form_heading_fontcolor: de,
976
- sfsi_form_heading_fontsize: ee,
977
- sfsi_form_heading_fontalign: fe,
978
-
979
- sfsi_form_field_text: ue,
980
- sfsi_form_field_font: ve,
981
- sfsi_form_field_fontstyle: we,
982
- sfsi_form_field_fontcolor: xe,
983
- sfsi_form_field_fontsize: ye,
984
- sfsi_form_field_fontalign: ze,
985
-
986
- sfsi_form_button_text: i,
987
- sfsi_form_button_font: j,
988
- sfsi_form_button_fontstyle: k,
989
- sfsi_form_button_fontcolor: l,
990
- sfsi_form_button_fontsize: m,
991
- sfsi_form_button_fontalign: n,
992
- sfsi_form_button_background: o,
993
-
994
- nonce: nonce
995
- };
996
- SFSI.ajax({
997
- url: sfsi_icon_ajax_object.ajax_url,
998
- type: "post",
999
- data: f,
1000
- dataType: "json",
1001
- async: !0,
1002
- success: function (s) {
1003
- if (s == "wrong_nonce") {
1004
- showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 7);
1005
- afterLoad();
1006
- } else {
1007
- "success" == s ? (showErrorSuc("success", "Saved !", 8), sfsicollapse("#sfsi_save8"), create_suscriber_form()) : showErrorSuc("error", "Unkown error , please try again", 8),
1008
- afterLoad();
1009
- }
1010
- }
1011
- });
1012
- }
1013
-
1014
- // Queestion 3
1015
- function sfsi_update_step9() {
1016
- var nonce = SFSI("#sfsi_save9").attr("data-nonce");
1017
- beForeLoad();
1018
-
1019
- var i_float = SFSI("input[name='sfsi_icons_float']:checked").val(),
1020
- i_floatP = SFSI("input[name='sfsi_icons_floatPosition']:checked").val(),
1021
- i_floatMt = SFSI("input[name='sfsi_icons_floatMargin_top']").val(),
1022
- i_floatMb = SFSI("input[name='sfsi_icons_floatMargin_bottom']").val(),
1023
- i_floatMl = SFSI("input[name='sfsi_icons_floatMargin_left']").val(),
1024
- i_floatMr = SFSI("input[name='sfsi_icons_floatMargin_right']").val(),
1025
- i_disableFloat = SFSI("input[name='sfsi_disable_floaticons']:checked").val(),
1026
-
1027
- show_via_widget = SFSI("input[name='sfsi_show_via_widget']").val(),
1028
- show_via__shortcode = SFSI("input[name='sfsi_show_via_shortcode']:checked").length==0?"no":"yes",
1029
- sfsi_show_via_afterposts = SFSI("input[name='sfsi_show_via_afterposts']").val();
1030
-
1031
- var f = {
1032
-
1033
- action: "updateSrcn9",
1034
-
1035
- sfsi_icons_float: i_float,
1036
- sfsi_icons_floatPosition: i_floatP,
1037
- sfsi_icons_floatMargin_top: i_floatMt,
1038
- sfsi_icons_floatMargin_bottom: i_floatMb,
1039
- sfsi_icons_floatMargin_left: i_floatMl,
1040
- sfsi_icons_floatMargin_right: i_floatMr,
1041
- sfsi_disable_floaticons: i_disableFloat,
1042
-
1043
- sfsi_show_via_widget: show_via_widget,
1044
- sfsi_show_via_shortcode: show_via__shortcode,
1045
- sfsi_show_via_afterposts: sfsi_show_via_afterposts,
1046
- nonce: nonce
1047
- };
1048
- SFSI.ajax({
1049
- url: sfsi_icon_ajax_object.ajax_url,
1050
- type: "post",
1051
- data: f,
1052
- dataType: "json",
1053
- async: !0,
1054
- success: function (s) {
1055
- if (s == "wrong_nonce") {
1056
- showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 9);
1057
- afterLoad();
1058
- } else {
1059
- "success" == s ? (showErrorSuc("success", "Saved !", 9), sfsicollapse("#sfsi_save9")) : showErrorSuc("error", "Unkown error , please try again", 9),
1060
- afterLoad();
1061
- }
1062
- }
1063
- });
1064
- }
1065
-
1066
- function sfsi_validationStep2() {
1067
- //var class_name= SFSI(element).hasAttr('sfsi_validate');
1068
- SFSI('input').removeClass('inputError'); // remove previous error
1069
- if (sfsi_validator(SFSI('input[name="sfsi_rss_display"]'), 'checked')) {
1070
- if (!sfsi_validator(SFSI('input[name="sfsi_rss_url"]'), 'url')) {
1071
- showErrorSuc("error", "Error : Invalid Rss url ", 2);
1072
- SFSI('input[name="sfsi_rss_url"]').addClass('inputError');
1073
-
1074
- return false;
1075
- }
1076
- }
1077
- /* validate facebook */
1078
- if (sfsi_validator(SFSI('input[name="sfsi_facebookPage_option"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_facebookPage_option"]'), 'checked')) {
1079
- if (!sfsi_validator(SFSI('input[name="sfsi_facebookPage_url"]'), 'blank')) {
1080
- showErrorSuc("error", "Error : Invalid Facebook page url ", 2);
1081
- SFSI('input[name="sfsi_facebookPage_url"]').addClass('inputError');
1082
-
1083
- return false;
1084
- }
1085
- }
1086
- /* validate twitter user name */
1087
- if (sfsi_validator(SFSI('input[name="sfsi_twitter_followme"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_twitter_followme"]'), 'checked')) {
1088
- if (!sfsi_validator(SFSI('input[name="sfsi_twitter_followUserName"]'), 'blank')) {
1089
- showErrorSuc("error", "Error : Invalid Twitter UserName ", 2);
1090
- SFSI('input[name="sfsi_twitter_followUserName"]').addClass('inputError');
1091
- return false;
1092
- }
1093
- }
1094
- /* validate twitter about page */
1095
- if (sfsi_validator(SFSI('input[name="sfsi_twitter_aboutPage"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_twitter_aboutPage"]'), 'checked')) {
1096
- if (!sfsi_validator(SFSI('#sfsi_twitter_aboutPageText'), 'blank')) {
1097
- showErrorSuc("error", "Error : Tweet about my page is blank ", 2);
1098
- SFSI('#sfsi_twitter_aboutPageText').addClass('inputError');
1099
- return false;
1100
- }
1101
- }
1102
- /* twitter validation */
1103
- if (sfsi_validator(SFSI('input[name="sfsi_twitter_page"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_twitter_page"]'), 'checked')) {
1104
- if (!sfsi_validator(SFSI('input[name="sfsi_twitter_pageURL"]'), 'blank')) {
1105
- showErrorSuc("error", "Error : Invalid twitter page Url ", 2);
1106
- SFSI('input[name="sfsi_twitter_pageURL"]').addClass('inputError');
1107
- return false;
1108
- }
1109
- }
1110
-
1111
- /* youtube validation */
1112
- if (sfsi_validator(SFSI('input[name="sfsi_youtube_page"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_youtube_page"]'), 'checked')) {
1113
- if (!sfsi_validator(SFSI('input[name="sfsi_youtube_pageUrl"]'), 'blank')) {
1114
- showErrorSuc("error", "Error : Invalid youtube Url ", 2);
1115
- SFSI('input[name="sfsi_youtube_pageUrl"]').addClass('inputError');
1116
- return false;
1117
- }
1118
- }
1119
- /* youtube validation */
1120
- if (sfsi_validator(SFSI('input[name="sfsi_youtube_page"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_youtube_follow"]'), 'checked')) {
1121
- cls = SFSI("input[name='sfsi_youtubeusernameorid']:checked").val();
1122
- if (cls == 'name' && !sfsi_validator(SFSI('input[name="sfsi_ytube_user"]'), 'blank')) {
1123
- showErrorSuc("error", "Error : Invalid youtube user name", 2);
1124
- SFSI('input[name="sfsi_ytube_user"]').addClass('inputError');
1125
- return false;
1126
- }
1127
-
1128
- if (cls == 'id' && !sfsi_validator(SFSI('input[name="sfsi_ytube_chnlid"]'), 'blank')) {
1129
- showErrorSuc("error", "Error : Invalid youtube Channel ID ", 2);
1130
- SFSI('input[name="sfsi_ytube_user"]').addClass('inputError');
1131
- return false;
1132
- }
1133
- }
1134
- /* pinterest validation */
1135
- if (sfsi_validator(SFSI('input[name="sfsi_pinterest_page"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_pinterest_page"]'), 'checked')) {
1136
- if (!sfsi_validator(SFSI('input[name="sfsi_pinterest_pageUrl"]'), 'blank')) {
1137
- showErrorSuc("error", "Error : Invalid pinterest page url ", 2);
1138
- SFSI('input[name="sfsi_pinterest_pageUrl"]').addClass('inputError');
1139
- return false;
1140
- }
1141
- }
1142
- /* instagram validation */
1143
- if (sfsi_validator(SFSI('input[name="sfsi_instagram_display"]'), 'checked')) {
1144
- if (!sfsi_validator(SFSI('input[name="sfsi_instagram_pageUrl"]'), 'blank')) {
1145
- showErrorSuc("error", "Error : Invalid Instagram url ", 2);
1146
- SFSI('input[name="sfsi_instagram_pageUrl"]').addClass('inputError');
1147
- return false;
1148
- }
1149
- }
1150
- /* telegram validation */
1151
- if (sfsi_validator(SFSI('input[name="sfsi_telegram_display"]'), 'checked')) {
1152
- if (!sfsi_validator(SFSI('input[name="sfsi_telegram_username"]'), 'blank')) {
1153
- showErrorSuc("error", "Error : Invalid telegram username ", 2);
1154
- SFSI('input[name="sfsi_telegram_username"]').addClass('inputError');
1155
- return false;
1156
- }
1157
- }
1158
- /* telegram validation */
1159
- if (sfsi_validator(SFSI('input[name="sfsi_telegram_display"]'), 'checked')) {
1160
- if (!sfsi_validator(SFSI('input[name="sfsi_telegram_message"]'), 'blank')) {
1161
- showErrorSuc("error", "Error : Invalid Message ", 2);
1162
- SFSI('input[name="sfsi_telegram_message"]').addClass('inputError');
1163
- return false;
1164
- }
1165
- }
1166
- /* vk validation */
1167
- if (sfsi_validator(SFSI('input[name="sfsi_vk_display"]'), 'checked')) {
1168
- if (!sfsi_validator(SFSI('input[name="sfsi_vk_pageURL"]'), 'blank')) {
1169
- showErrorSuc("error", "Error : Invalid vk url ", 2);
1170
- SFSI('input[name="sfsi_vk_pageURL"]').addClass('inputError');
1171
- return false;
1172
- }
1173
- }
1174
- /* ok validation */
1175
- if (sfsi_validator(SFSI('input[name="sfsi_ok_display"]'), 'checked')) {
1176
- if (!sfsi_validator(SFSI('input[name="sfsi_ok_pageURL"]'), 'blank')) {
1177
- showErrorSuc("error", "Error : Invalid ok url ", 2);
1178
- SFSI('input[name="sfsi_ok_pageURL"]').addClass('inputError');
1179
- return false;
1180
- }
1181
- }
1182
- /* weibo validation */
1183
- if (sfsi_validator(SFSI('input[name="sfsi_weibo_display"]'), 'checked')) {
1184
- if (!sfsi_validator(SFSI('input[name="sfsi_weibo_pageURL"]'), 'blank')) {
1185
- showErrorSuc("error", "Error : Invalid weibo url ", 2);
1186
- SFSI('input[name="sfsi_weibo_pageURL"]').addClass('inputError');
1187
- return false;
1188
- }
1189
- }
1190
- /* LinkedIn validation */
1191
- if (sfsi_validator(SFSI('input[name="sfsi_linkedin_page"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_linkedin_page"]'), 'checked')) {
1192
- if (!sfsi_validator(SFSI('input[name="sfsi_linkedin_pageURL"]'), 'blank')) {
1193
- showErrorSuc("error", "Error : Invalid LinkedIn page url ", 2);
1194
- SFSI('input[name="sfsi_linkedin_pageURL"]').addClass('inputError');
1195
- return false;
1196
- }
1197
- }
1198
- if (sfsi_validator(SFSI('input[name="sfsi_linkedin_recommendBusines"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_linkedin_recommendBusines"]'), 'checked')) {
1199
- if (!sfsi_validator(SFSI('input[name="sfsi_linkedin_recommendProductId"]'), 'blank') || !sfsi_validator(SFSI('input[name="sfsi_linkedin_recommendCompany"]'), 'blank')) {
1200
- showErrorSuc("error", "Error : Please Enter Product Id and Company for LinkedIn Recommendation ", 2);
1201
- SFSI('input[name="sfsi_linkedin_recommendProductId"]').addClass('inputError');
1202
- SFSI('input[name="sfsi_linkedin_recommendCompany"]').addClass('inputError');
1203
- return false;
1204
- }
1205
- }
1206
- /* validate custom links */
1207
- var er = 0;
1208
- SFSI("input[name='sfsi_CustomIcon_links[]']").each(function () {
1209
-
1210
- //if(!sfsi_validator(SFSI(this),'blank') || !sfsi_validator(SFSI(SFSI(this)),'url') )
1211
- if (!sfsi_validator(SFSI(this), 'blank')) {
1212
- showErrorSuc("error", "Error : Please Enter a valid Custom link ", 2);
1213
- SFSI(this).addClass('inputError');
1214
- er = 1;
1215
- }
1216
- });
1217
- if (!er) return true;
1218
- else return false;
1219
- }
1220
-
1221
- function sfsi_validationStep3() {
1222
- SFSI('input').removeClass('inputError'); // remove previous error
1223
- /* validate shuffle effect */
1224
- if (sfsi_validator(SFSI('input[name="sfsi_shuffle_icons"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_shuffle_icons"]'), 'checked')) {
1225
- if ((!sfsi_validator(SFSI('input[name="sfsi_shuffle_Firstload"]'), 'activte') || !sfsi_validator(SFSI('input[name="sfsi_shuffle_Firstload"]'), 'checked')) && (!sfsi_validator(SFSI('input[name="sfsi_shuffle_interval"]'), 'activte') || !sfsi_validator(SFSI('input[name="sfsi_shuffle_interval"]'), 'checked'))) {
1226
- showErrorSuc("error", "Error : Please Chose a Shuffle option ", 3);
1227
- SFSI('input[name="sfsi_shuffle_Firstload"]').addClass('inputError');
1228
- SFSI('input[name="sfsi_shuffle_interval"]').addClass('inputError');
1229
- return false;
1230
- }
1231
- }
1232
- if (!sfsi_validator(SFSI('input[name="sfsi_shuffle_icons"]'), 'checked') && (sfsi_validator(SFSI('input[name="sfsi_shuffle_Firstload"]'), 'checked') || sfsi_validator(SFSI('input[name="sfsi_shuffle_interval"]'), 'checked'))) {
1233
- showErrorSuc("error", "Error : Please check \"Shuffle them automatically\" option also ", 3);
1234
- SFSI('input[name="sfsi_shuffle_Firstload"]').addClass('inputError');
1235
- SFSI('input[name="sfsi_shuffle_interval"]').addClass('inputError');
1236
- return false;
1237
- }
1238
-
1239
- /* validate twitter user name */
1240
- if (sfsi_validator(SFSI('input[name="sfsi_shuffle_interval"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_shuffle_interval"]'), 'checked')) {
1241
-
1242
- if (!sfsi_validator(SFSI('input[name="sfsi_shuffle_intervalTime"]'), 'blank') || !sfsi_validator(SFSI('input[name="sfsi_shuffle_intervalTime"]'), 'int')) {
1243
- showErrorSuc("error", "Error : Invalid shuffle time interval", 3);
1244
- SFSI('input[name="sfsi_shuffle_intervalTime"]').addClass('inputError');
1245
- return false;
1246
- }
1247
- }
1248
- return true;
1249
- }
1250
-
1251
- function sfsi_validationStep4() {
1252
- //var class_name= SFSI(element).hasAttr('sfsi_validate');
1253
- /* validate email */
1254
- if (sfsi_validator(SFSI('input[name="sfsi_email_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_email_countsDisplay"]'), 'checked')) {
1255
- if (SFSI('input[name="sfsi_email_countsFrom"]:checked').val() == 'manual') {
1256
- if (!sfsi_validator(SFSI('input[name="sfsi_email_manualCounts"]'), 'blank')) {
1257
- showErrorSuc("error", "Error : Please Enter manual counts for Email icon ", 4);
1258
- SFSI('input[name="sfsi_email_manualCounts"]').addClass('inputError');
1259
- return false;
1260
- }
1261
- }
1262
- }
1263
- /* validate RSS count */
1264
- if (sfsi_validator(SFSI('input[name="sfsi_rss_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_rss_countsDisplay"]'), 'checked')) {
1265
- if (!sfsi_validator(SFSI('input[name="sfsi_rss_manualCounts"]'), 'blank')) {
1266
- showErrorSuc("error", "Error : Please Enter manual counts for Rss icon ", 4);
1267
- SFSI('input[name="sfsi_rss_countsDisplay"]').addClass('inputError');
1268
- return false;
1269
- }
1270
- }
1271
- /* validate facebook */
1272
- if (sfsi_validator(SFSI('input[name="sfsi_facebook_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_facebook_countsDisplay"]'), 'checked')) {
1273
- /*if(SFSI('input[name="sfsi_facebook_countsFrom"]:checked').val()=='likes' )
1274
- {
1275
- if(!sfsi_validator(SFSI('input[name="sfsi_facebook_PageLink"]'),'blank'))
1276
- { showErrorSuc("error","Error : Please Enter facebook page Url ",4);
1277
- SFSI('input[name="sfsi_facebook_PageLink"]').addClass('inputError');
1278
- return false;
1279
- }
1280
- } */
1281
- if (SFSI('input[name="sfsi_facebook_countsFrom"]:checked').val() == 'manual') {
1282
- if (!sfsi_validator(SFSI('input[name="sfsi_facebook_manualCounts"]'), 'blank') && !sfsi_validator(SFSI('input[name="sfsi_facebook_manualCounts"]'), 'url')) {
1283
- showErrorSuc("error", "Error : Please Enter a valid facebook manual counts ", 4);
1284
- SFSI('input[name="sfsi_facebook_manualCounts"]').addClass('inputError');
1285
- return false;
1286
- }
1287
- }
1288
- }
1289
-
1290
- /* validate twitter */
1291
- if (sfsi_validator(SFSI('input[name="sfsi_twitter_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_twitter_countsDisplay"]'), 'checked')) {
1292
- if (SFSI('input[name="sfsi_twitter_countsFrom"]:checked').val() == 'source') {
1293
- if (!sfsi_validator(SFSI('input[name="tw_consumer_key"]'), 'blank')) {
1294
- showErrorSuc("error", "Error : Please Enter a valid consumer key", 4);
1295
- SFSI('input[name="tw_consumer_key"]').addClass('inputError');
1296
- return false;
1297
- }
1298
- if (!sfsi_validator(SFSI('input[name="tw_consumer_secret"]'), 'blank')) {
1299
- showErrorSuc("error", "Error : Please Enter a valid consume secret ", 4);
1300
- SFSI('input[name="tw_consumer_secret"]').addClass('inputError');
1301
- return false;
1302
- }
1303
- if (!sfsi_validator(SFSI('input[name="tw_oauth_access_token"]'), 'blank')) {
1304
- showErrorSuc("error", "Error : Please Enter a valid oauth access token", 4);
1305
- SFSI('input[name="tw_oauth_access_token"]').addClass('inputError');
1306
- return false;
1307
- }
1308
- if (!sfsi_validator(SFSI('input[name="tw_oauth_access_token_secret"]'), 'blank')) {
1309
- showErrorSuc("error", "Error : Please Enter a oAuth access token secret", 4);
1310
- SFSI('input[name="tw_oauth_access_token_secret"]').addClass('inputError');
1311
- return false;
1312
- }
1313
- }
1314
- if (SFSI('input[name="sfsi_linkedIn_countsFrom"]:checked').val() == 'manual') {
1315
-
1316
- if (!sfsi_validator(SFSI('input[name="sfsi_twitter_manualCounts"]'), 'blank')) {
1317
- showErrorSuc("error", "Error : Please Enter Twitter manual counts ", 4);
1318
- SFSI('input[name="sfsi_twitter_manualCounts"]').addClass('inputError');
1319
- return false;
1320
- }
1321
- }
1322
- }
1323
- /* validate LinkedIn */
1324
- if (sfsi_validator(SFSI('input[name="sfsi_linkedIn_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_linkedIn_countsDisplay"]'), 'checked')) {
1325
- if (SFSI('input[name="sfsi_linkedIn_countsFrom"]:checked').val() == 'follower') {
1326
- if (!sfsi_validator(SFSI('input[name="ln_company"]'), 'blank')) {
1327
- showErrorSuc("error", "Error : Please Enter a valid company name", 4);
1328
- SFSI('input[name="ln_company"]').addClass('inputError');
1329
- return false;
1330
- }
1331
- if (!sfsi_validator(SFSI('input[name="ln_api_key"]'), 'blank')) {
1332
- showErrorSuc("error", "Error : Please Enter a valid API key ", 4);
1333
- SFSI('input[name="ln_api_key"]').addClass('inputError');
1334
- return false;
1335
- }
1336
- if (!sfsi_validator(SFSI('input[name="ln_secret_key"]'), 'blank')) {
1337
- showErrorSuc("error", "Error : Please Enter a valid secret ", 4);
1338
- SFSI('input[name="ln_secret_key"]').addClass('inputError');
1339
- return false;
1340
- }
1341
- if (!sfsi_validator(SFSI('input[name="ln_oAuth_user_token"]'), 'blank')) {
1342
- showErrorSuc("error", "Error : Please Enter a oAuth Access Token", 4);
1343
- SFSI('input[name="ln_oAuth_user_token"]').addClass('inputError');
1344
- return false;
1345
- }
1346
- }
1347
- if (SFSI('input[name="sfsi_linkedIn_countsFrom"]:checked').val() == 'manual') {
1348
- if (!sfsi_validator(SFSI('input[name="sfsi_linkedIn_manualCounts"]'), 'blank')) {
1349
- showErrorSuc("error", "Error : Please Enter LinkedIn manual counts ", 4);
1350
- SFSI('input[name="sfsi_linkedIn_manualCounts"]').addClass('inputError');
1351
- return false;
1352
- }
1353
- }
1354
- }
1355
- /* validate youtube */
1356
- if (sfsi_validator(SFSI('input[name="sfsi_youtube_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_youtube_countsDisplay"]'), 'checked')) {
1357
- if (SFSI('input[name="sfsi_youtube_countsFrom"]:checked').val() == 'subscriber') {
1358
- if (
1359
- !sfsi_validator(SFSI('input[name="sfsi_youtube_user"]'), 'blank') &&
1360
- !sfsi_validator(SFSI('input[name="sfsi_youtube_channelId"]'), 'blank')
1361
- ) {
1362
- showErrorSuc("error", "Error : Please Enter a youtube user name or channel id", 4);
1363
- SFSI('input[name="sfsi_youtube_user"]').addClass('inputError');
1364
- SFSI('input[name="sfsi_youtube_channelId"]').addClass('inputError');
1365
- return false;
1366
- }
1367
- }
1368
- if (SFSI('input[name="sfsi_youtube_countsFrom"]:checked').val() == 'manual') {
1369
- if (!sfsi_validator(SFSI('input[name="sfsi_youtube_manualCounts"]'), 'blank')) {
1370
- showErrorSuc("error", "Error : Please Enter youtube manual counts ", 4);
1371
- SFSI('input[name="sfsi_youtube_manualCounts"]').addClass('inputError');
1372
- return false;
1373
- }
1374
- }
1375
- }
1376
- /* validate pinterest */
1377
- if (sfsi_validator(SFSI('input[name="sfsi_pinterest_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_pinterest_countsDisplay"]'), 'checked')) {
1378
- if (SFSI('input[name="sfsi_pinterest_countsFrom"]:checked').val() == 'manual') {
1379
- if (!sfsi_validator(SFSI('input[name="sfsi_pinterest_manualCounts"]'), 'blank')) {
1380
- showErrorSuc("error", "Error : Please Enter Pinterest manual counts ", 4);
1381
- SFSI('input[name="sfsi_pinterest_manualCounts"]').addClass('inputError');
1382
- return false;
1383
- }
1384
- }
1385
- }
1386
- /* validate instagram */
1387
- if (sfsi_validator(SFSI('input[name="sfsi_instagram_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_instagram_countsDisplay"]'), 'checked')) {
1388
- if (SFSI('input[name="sfsi_instagram_countsFrom"]:checked').val() == 'manual') {
1389
- if (!sfsi_validator(SFSI('input[name="sfsi_instagram_manualCounts"]'), 'blank')) {
1390
- showErrorSuc("error", "Error : Please Enter Instagram manual counts ", 4);
1391
- SFSI('input[name="sfsi_instagram_manualCounts"]').addClass('inputError');
1392
- return false;
1393
- }
1394
- }
1395
- if (SFSI('input[name="sfsi_instagram_countsFrom"]:checked').val() == 'followers') {
1396
- if (!sfsi_validator(SFSI('input[name="sfsi_instagram_User"]'), 'blank')) {
1397
- showErrorSuc("error", "Error : Please Enter a instagram user name", 4);
1398
- SFSI('input[name="sfsi_instagram_User"]').addClass('inputError');
1399
- return false;
1400
- }
1401
- }
1402
- }
1403
- return true;
1404
- }
1405
-
1406
- function sfsi_validationStep5() {
1407
- //var class_name= SFSI(element).hasAttr('sfsi_validate');
1408
- /* validate size */
1409
- if (!sfsi_validator(SFSI('input[name="sfsi_icons_size"]'), 'int')) {
1410
- showErrorSuc("error", "Error : Please enter a numeric value only ", 5);
1411
- SFSI('input[name="sfsi_icons_size"]').addClass('inputError');
1412
- return false;
1413
- }
1414
- if (parseInt(SFSI('input[name="sfsi_icons_size"]').val()) > 100) {
1415
- showErrorSuc("error", "Error : Icons Size allow 100px maximum ", 5);
1416
- SFSI('input[name="sfsi_icons_size"]').addClass('inputError');
1417
- return false;
1418
- }
1419
- if (parseInt(SFSI('input[name="sfsi_icons_size"]').val()) <= 0) {
1420
- showErrorSuc("error", "Error : Icons Size should be more than 0 ", 5);
1421
- SFSI('input[name="sfsi_icons_size"]').addClass('inputError');
1422
- return false;
1423
- }
1424
- /* validate spacing */
1425
- if (!sfsi_validator(SFSI('input[name="sfsi_icons_spacing"]'), 'int')) {
1426
- showErrorSuc("error", "Error : Please enter a numeric value only ", 5);
1427
- SFSI('input[name="sfsi_icons_spacing"]').addClass('inputError');
1428
- return false;
1429
- }
1430
- if (parseInt(SFSI('input[name="sfsi_icons_spacing"]').val()) < 0) {
1431
- showErrorSuc("error", "Error : Icons Spacing should be 0 or more", 5);
1432
- SFSI('input[name="sfsi_icons_spacing"]').addClass('inputError');
1433
- return false;
1434
- }
1435
- /* icons per row spacing */
1436
- if (!sfsi_validator(SFSI('input[name="sfsi_icons_perRow"]'), 'int')) {
1437
- showErrorSuc("error", "Error : Please enter a numeric value only ", 5);
1438
- SFSI('input[name="sfsi_icons_perRow"]').addClass('inputError');
1439
- return false;
1440
- }
1441
- if (parseInt(SFSI('input[name="sfsi_icons_perRow"]').val()) <= 0) {
1442
- showErrorSuc("error", "Error : Icons Per row should be more than 0", 5);
1443
- SFSI('input[name="sfsi_icons_perRow"]').addClass('inputError');
1444
- return false;
1445
- }
1446
- /* validate icons effects */
1447
- // if(SFSI('input[name="sfsi_icons_float"]:checked').val()=="yes" && SFSI('input[name="sfsi_icons_stick"]:checked').val()=="yes")
1448
- // {
1449
- // showErrorSuc("error","Error : Only one allow from Sticking & floating ",5);
1450
- // SFSI('input[name="sfsi_icons_float"][value="no"]').prop("checked", true);
1451
- // return false;
1452
- // }
1453
- return true;
1454
- }
1455
-
1456
- function sfsi_validationStep7() {
1457
- //var class_name= SFSI(element).hasAttr('sfsi_validate');
1458
- /* validate border thikness */
1459
- if (!sfsi_validator(SFSI('input[name="sfsi_popup_border_thickness"]'), 'int')) {
1460
- showErrorSuc("error", "Error : Please enter a numeric value only ", 7);
1461
- SFSI('input[name="sfsi_popup_border_thickness"]').addClass('inputError');
1462
- return false;
1463
- }
1464
- /* validate fotn size */
1465
- if (!sfsi_validator(SFSI('input[name="sfsi_popup_fontSize"]'), 'int')) {
1466
- showErrorSuc("error", "Error : Please enter a numeric value only ", 7);
1467
- SFSI('input[name="sfsi_popup_fontSize"]').addClass('inputError');
1468
- return false;
1469
- }
1470
- /* validate pop up shown */
1471
- if (SFSI('input[name="sfsi_Shown_pop"]:checked').val() == 'once') {
1472
-
1473
- if (!sfsi_validator(SFSI('input[name="sfsi_Shown_popupOnceTime"]'), 'blank') && !sfsi_validator(SFSI('input[name="sfsi_Shown_popupOnceTime"]'), 'url')) {
1474
- showErrorSuc("error", "Error : Please Enter a valid pop up shown time ", 7);
1475
- SFSI('input[name="sfsi_Shown_popupOnceTime"]').addClass('inputError');
1476
- return false;
1477
- }
1478
- }
1479
- /* validate page ids */
1480
- if (SFSI('input[name="sfsi_Show_popupOn"]:checked').val() == 'selectedpage') {
1481
- if (!sfsi_validator(SFSI('input[name="sfsi_Show_popupOn"]'), 'blank')) {
1482
- showErrorSuc("error", "Error : Please Enter page ids with comma ", 7);
1483
- SFSI('input[name="sfsi_Show_popupOn"]').addClass('inputError');
1484
- return false;
1485
- }
1486
- }
1487
- /* validate spacing */
1488
- if (!sfsi_validator(SFSI('input[name="sfsi_icons_spacing"]'), 'int')) {
1489
- showErrorSuc("error", "Error : Please enter a numeric value only ", 7);
1490
- SFSI('input[name="sfsi_icons_spacing"]').addClass('inputError');
1491
- return false;
1492
- }
1493
- /* icons per row spacing */
1494
- if (!sfsi_validator(SFSI('input[name="sfsi_icons_perRow"]'), 'int')) {
1495
- showErrorSuc("error", "Error : Please enter a numeric value only ", 7);
1496
- SFSI('input[name="sfsi_icons_perRow"]').addClass('inputError');
1497
- return false;
1498
- }
1499
- return true;
1500
- }
1501
-
1502
- function sfsi_validator(element, valType) {
1503
- var Vurl = new RegExp("^(http|https|ftp)\://([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&amp;%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\@\?\'\\\+&amp;%\$#\=~_\-]+))*$");
1504
- //var Vurl = /http:\/\/[A-Za-z0-9\.-]{3,}\.[A-Za-z]{3}/;
1505
-
1506
- switch (valType) {
1507
- case "blank":
1508
- if (!element.val().trim()) return false;
1509
- else return true;
1510
- break;
1511
- case "url":
1512
- if (!Vurl.test(element.val().trim())) return false;
1513
- else return true;
1514
- break;
1515
- case "checked":
1516
- if (!element.attr('checked') === true) return false;
1517
- else return true;
1518
- break;
1519
- case "activte":
1520
- if (!element.attr('disabled')) return true;
1521
- else return false;
1522
- break;
1523
- case "int":
1524
- if (!isNaN(element.val())) return true;
1525
- else return false;
1526
- break;
1527
-
1528
- }
1529
- }
1530
-
1531
- function afterIconSuccess(s, nonce) {
1532
- if (s.res = "success") {
1533
- var i = s.key + 1,
1534
- e = s.element,
1535
- t = e + 1;
1536
- SFSI("#total_cusotm_icons").val(s.element);
1537
- SFSI(".upload-overlay").hide("slow");
1538
- SFSI(".uperror").html("");
1539
- showErrorSuc("success", "Custom Icon updated successfully", 1);
1540
- d = new Date();
1541
-
1542
- var ele = SFSI(".notice_custom_icons_premium");
1543
-
1544
- SFSI("li.custom:last-child").removeClass("bdr_btm_non");
1545
- SFSI("li.custom:last-child").children("span.custom-img").children("img").attr("src", s.img_path + "?" + d.getTime());
1546
- SFSI("input[name=sfsiICON_" + s.key + "]").removeAttr("ele-type");
1547
- SFSI("input[name=sfsiICON_" + s.key + "]").removeAttr("isnew");
1548
- icons_name = SFSI("li.custom:last-child").find("input.styled").attr("name");
1549
- var n = icons_name.split("_");
1550
- s.key = s.key, s.img_path += "?" + d.getTime(), 5 > e && SFSI(".icn_listing").append('<li id="c' + i + '" class="custom bdr_btm_non"><div class="radio_section tb_4_ck"><span class="checkbox" dynamic_ele="yes" style="background-position: 0px 0px;"></span><input name="sfsiICON_' + i + '" type="checkbox" value="yes" class="styled" style="display:none;" element-type="cusotm-icon" isNew="yes" /></div> <span class="custom-img"><img src="' + SFSI("#plugin_url").val() + 'images/custom.png" id="CImg_' + i + '" alt="error" /> </span> <span class="custom custom-txt">Custom' + t + ' </span> <div class="right_info"> <p><span>It depends:</span> Upload a custom icon if you have other accounts/websites you want to link to.</p><div class="inputWrapper"></div></li>'),
1551
- SFSI(".custom_section").show(),
1552
- SFSI('<div class="row sfsiICON_' + s.key + ' cm_lnk"> <h2 class="custom"> <span class="customstep2-img"> <img src="' + s.img_path + "?" + d.getTime() + '" style="border-radius:48%" alt="error" /> </span> <span class="sfsiCtxt">Custom ' + e + '</span> </h2> <div class="inr_cont "><p>Where do you want this icon to link to?</p> <p class="radio_section fb_url custom_section sfsiICON_' + s.key + '" ><label>Link :</label><input file-id="' + s.key + '" name="sfsi_CustomIcon_links[]" type="text" value="" placeholder="http://" class="add" /></p></div></div>').insertBefore('.notice_custom_icons_premium');
1553
- //SFSI(".custom-links").append(' <div class="row sfsiICON_' + s.key + ' cm_lnk"> <h2 class="custom"> <span class="customstep2-img"> <img src="' + s.img_path + "?" + d.getTime() + '" style="border-radius:48%" /> </span> <span class="sfsiCtxt">Custom ' + e + '</span> </h2> <div class="inr_cont "><p>Where do you want this icon to link to?</p> <p class="radio_section fb_url custom_section sfsiICON_' + s.key + '" ><label>Link :</label><input file-id="' + s.key + '" name="sfsi_CustomIcon_links[]" type="text" value="" placeholder="http://" class="add" /></p></div></div>');
1554
- SFSI(".notice_custom_icons_premium").show();
1555
- SFSI("#c" + s.key).append('<input type="hidden" name="nonce" value="' + nonce + '">');
1556
- var o = SFSI("div.custom_m").find("div.mouseover_field").length;
1557
- SFSI("div.custom_m").append(0 == o % 2 ? '<div class="clear"> </div> <div class="mouseover_field custom_section sfsiICON_' + s.key + '"><label>Custom ' + e + ':</label><input name="sfsi_custom_MouseOverTexts[]" value="" type="text" file-id="' + s.key + '" /></div>' : '<div class="cHover " ><div class="mouseover_field custom_section sfsiICON_' + s.key + '"><label>Custom ' + e + ':</label><input name="sfsi_custom_MouseOverTexts[]" value="" type="text" file-id="' + s.key + '" /></div>'),
1558
- SFSI("ul.share_icon_order").append('<li class="custom_iconOrder sfsiICON_' + s.key + '" data-index="" element-id="' + s.key + '" id=""><a href="#" title="Custom Icon" ><img src="' + s.img_path + '" alt="Linked In" class="sfcm"/></a></li>'),
1559
- SFSI("ul.sfsi_sample_icons").append('<li class="sfsiICON_' + s.key + '" element-id="' + s.key + '" ><div><img src="' + s.img_path + '" alt="Linked In" class="sfcm"/><span class="sfsi_Cdisplay">12k</span></div></li>'),
1560
- sfsi_update_index(), update_Sec5Iconorder(), sfsi_update_step1(), sfsi_update_step2(),
1561
- sfsi_update_step5(), SFSI(".upload-overlay").css("pointer-events", "auto"), sfsi_showPreviewCounts(),
1562
- afterLoad();
1563
- }
1564
- }
1565
-
1566
- function beforeIconSubmit(s) {
1567
- if (SFSI(".uperror").html("Uploading....."), window.File && window.FileReader && window.FileList && window.Blob) {
1568
- SFSI(s).val() || SFSI(".uperror").html("File is empty");
1569
- var i = s.files[0].size,
1570
- e = s.files[0].type;
1571
- switch (e) {
1572
- case "image/png":
1573
- case "image/gif":
1574
- case "image/jpeg":
1575
- case "image/pjpeg":
1576
- break;
1577
-
1578
- default:
1579
- return SFSI(".uperror").html("Unsupported file"), !1;
1580
- }
1581
- return i > 1048576 ? (SFSI(".uperror").html("Image should be less than 1 MB"), !1) : !0;
1582
- }
1583
- return !0;
1584
- }
1585
-
1586
- function bytesToSize(s) {
1587
- var i = ["Bytes", "KB", "MB", "GB", "TB"];
1588
- if (0 == s) return "0 Bytes";
1589
- var e = parseInt(Math.floor(Math.log(s) / Math.log(1024)));
1590
- return Math.round(s / Math.pow(1024, e), 2) + " " + i[e];
1591
- }
1592
-
1593
- function showErrorSuc(s, i, e) {
1594
- if ("error" == s) var t = "errorMsg";
1595
- else var t = "sucMsg";
1596
- return SFSI(".tab" + e + ">." + t).html(i), SFSI(".tab" + e + ">." + t).show(),
1597
- SFSI(".tab" + e + ">." + t).effect("highlight", {}, 5e3), setTimeout(function () {
1598
- SFSI("." + t).slideUp("slow");
1599
- }, 5e3), !1;
1600
- }
1601
-
1602
- function beForeLoad() {
1603
- SFSI(".loader-img").show(), SFSI(".save_button >a").html("Saving..."), SFSI(".save_button >a").css("pointer-events", "none");
1604
- }
1605
-
1606
- function afterLoad() {
1607
- SFSI("input").removeClass("inputError"), SFSI(".save_button >a").html("Save"), SFSI(".tab10>div.save_button >a").html("Save All Settings"),
1608
- SFSI(".save_button >a").css("pointer-events", "auto"), SFSI(".save_button >a").removeAttr("onclick"),
1609
- SFSI(".loader-img").hide();
1610
- }
1611
-
1612
- function sfsi_make_popBox() {
1613
- var s = 0;
1614
- SFSI(".sfsi_sample_icons >li").each(function () {
1615
- "none" != SFSI(this).css("display") && (s = 1);
1616
- }),
1617
- 0 == s ? SFSI(".sfsi_Popinner").hide() : SFSI(".sfsi_Popinner").show(),
1618
- "" != SFSI('input[name="sfsi_popup_text"]').val() ? (SFSI(".sfsi_Popinner >h2").html(SFSI('input[name="sfsi_popup_text"]').val()),
1619
- SFSI(".sfsi_Popinner >h2").show()) : SFSI(".sfsi_Popinner >h2").hide(), SFSI(".sfsi_Popinner").css({
1620
- "border-color": SFSI('input[name="sfsi_popup_border_color"]').val(),
1621
- "border-width": SFSI('input[name="sfsi_popup_border_thickness"]').val(),
1622
- "border-style": "solid"
1623
- }),
1624
- SFSI(".sfsi_Popinner").css("background-color", SFSI('input[name="sfsi_popup_background_color"]').val()),
1625
- SFSI(".sfsi_Popinner h2").css("font-family", SFSI("#sfsi_popup_font").val()), SFSI(".sfsi_Popinner h2").css("font-style", SFSI("#sfsi_popup_fontStyle").val()),
1626
- SFSI(".sfsi_Popinner >h2").css("font-size", parseInt(SFSI('input[name="sfsi_popup_fontSize"]').val())),
1627
- SFSI(".sfsi_Popinner >h2").css("color", SFSI('input[name="sfsi_popup_fontColor"]').val() + " !important"),
1628
- "yes" == SFSI('input[name="sfsi_popup_border_shadow"]:checked').val() ? SFSI(".sfsi_Popinner").css("box-shadow", "12px 30px 18px #CCCCCC") : SFSI(".sfsi_Popinner").css("box-shadow", "none");
1629
- }
1630
-
1631
- function sfsi_stick_widget(s) {
1632
- 0 == initTop.length && (SFSI(".sfsi_widget").each(function (s) {
1633
- initTop[s] = SFSI(this).position().top;
1634
- }), console.log(initTop));
1635
- var i = SFSI(window).scrollTop(),
1636
- e = [],
1637
- t = [];
1638
- SFSI(".sfsi_widget").each(function (s) {
1639
- e[s] = SFSI(this).position().top, t[s] = SFSI(this);
1640
- });
1641
- var n = !1;
1642
- for (var o in e) {
1643
- var a = parseInt(o) + 1;
1644
- e[o] < i && e[a] > i && a < e.length ? (SFSI(t[o]).css({
1645
- position: "fixed",
1646
- top: s
1647
- }), SFSI(t[a]).css({
1648
- position: "",
1649
- top: initTop[a]
1650
- }), n = !0) : SFSI(t[o]).css({
1651
- position: "",
1652
- top: initTop[o]
1653
- });
1654
- }
1655
- if (!n) {
1656
- var r = e.length - 1,
1657
- c = -1;
1658
- e.length > 1 && (c = e.length - 2), initTop[r] < i ? (SFSI(t[r]).css({
1659
- position: "fixed",
1660
- top: s
1661
- }), c >= 0 && SFSI(t[c]).css({
1662
- position: "",
1663
- top: initTop[c]
1664
- })) : (SFSI(t[r]).css({
1665
- position: "",
1666
- top: initTop[r]
1667
- }), c >= 0 && e[c] < i);
1668
- }
1669
- }
1670
-
1671
- function sfsi_setCookie(s, i, e) {
1672
- var t = new Date();
1673
- t.setTime(t.getTime() + 1e3 * 60 * 60 * 24 * e);
1674
- var n = "expires=" + t.toGMTString();
1675
- document.cookie = s + "=" + i + "; " + n;
1676
- }
1677
-
1678
- function sfsfi_getCookie(s) {
1679
- for (var i = s + "=", e = document.cookie.split(";"), t = 0; t < e.length; t++) {
1680
- var n = e[t].trim();
1681
- if (0 == n.indexOf(i)) return n.substring(i.length, n.length);
1682
- }
1683
- return "";
1684
- }
1685
-
1686
- function sfsi_hideFooter() {}
1687
-
1688
- window.onerror = function () {},
1689
- SFSI = jQuery,
1690
- SFSI(window).on('load', function () {
1691
- SFSI("#sfpageLoad").fadeOut(2e3);
1692
- });
1693
-
1694
- //changes done {Monad}
1695
- function selectText(containerid) {
1696
- if (document.selection) {
1697
- var range = document.body.createTextRange();
1698
- range.moveToElementText(document.getElementById(containerid));
1699
- range.select();
1700
- } else if (window.getSelection()) {
1701
- var range = document.createRange();
1702
- range.selectNode(document.getElementById(containerid));
1703
- window.getSelection().removeAllRanges();
1704
- window.getSelection().addRange(range);
1705
- }
1706
- }
1707
-
1708
- function create_suscriber_form() {
1709
- //Popbox customization
1710
- "no" == SFSI('input[name="sfsi_form_adjustment"]:checked').val() ? SFSI(".sfsi_subscribe_Popinner").css({
1711
- "width": parseInt(SFSI('input[name="sfsi_form_width"]').val()),
1712
- "height": parseInt(SFSI('input[name="sfsi_form_height"]').val())
1713
- }) : SFSI(".sfsi_subscribe_Popinner").css({
1714
- "width": '',
1715
- "height": ''
1716
- });
1717
-
1718
- "yes" == SFSI('input[name="sfsi_form_adjustment"]:checked').val() ? SFSI(".sfsi_html > .sfsi_subscribe_Popinner").css({
1719
- "width": "100%"
1720
- }) : '';
1721
-
1722
- "yes" == SFSI('input[name="sfsi_form_border"]:checked').val() ? SFSI(".sfsi_subscribe_Popinner").css({
1723
- "border": SFSI('input[name="sfsi_form_border_thickness"]').val() + "px solid " + SFSI('input[name="sfsi_form_border_color"]').val()
1724
- }) : SFSI(".sfsi_subscribe_Popinner").css("border", "none");
1725
-
1726
- SFSI('input[name="sfsi_form_background"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").css("background-color", SFSI('input[name="sfsi_form_background"]').val())) : '';
1727
-
1728
- //Heading customization
1729
- SFSI('input[name="sfsi_form_heading_text"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner > form > h5").html(SFSI('input[name="sfsi_form_heading_text"]').val())) : SFSI(".sfsi_subscribe_Popinner > form > h5").html('');
1730
-
1731
- SFSI('#sfsi_form_heading_font').val() != "" ? (SFSI(".sfsi_subscribe_Popinner > form > h5").css("font-family", SFSI("#sfsi_form_heading_font").val())) : '';
1732
-
1733
- if (SFSI('#sfsi_form_heading_fontstyle').val() != 'bold') {
1734
- SFSI('#sfsi_form_heading_fontstyle').val() != "" ? (SFSI(".sfsi_subscribe_Popinner > form > h5").css("font-style", SFSI("#sfsi_form_heading_fontstyle").val())) : '';
1735
- SFSI(".sfsi_subscribe_Popinner > form > h5").css("font-weight", '');
1736
- } else {
1737
- SFSI('#sfsi_form_heading_fontstyle').val() != "" ? (SFSI(".sfsi_subscribe_Popinner > form > h5").css("font-weight", "bold")) : '';
1738
- SFSI(".sfsi_subscribe_Popinner > form > h5").css("font-style", '');
1739
- }
1740
-
1741
- SFSI('input[name="sfsi_form_heading_fontcolor"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner > form > h5").css("color", SFSI('input[name="sfsi_form_heading_fontcolor"]').val())) : '';
1742
-
1743
- SFSI('input[name="sfsi_form_heading_fontsize"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner > form > h5").css({
1744
- "font-size": parseInt(SFSI('input[name="sfsi_form_heading_fontsize"]').val())
1745
- })) : '';
1746
-
1747
- SFSI('#sfsi_form_heading_fontalign').val() != "" ? (SFSI(".sfsi_subscribe_Popinner > form > h5").css("text-align", SFSI("#sfsi_form_heading_fontalign").val())) : '';
1748
-
1749
- //Field customization
1750
- SFSI('input[name="sfsi_form_field_text"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').attr("placeholder", SFSI('input[name="sfsi_form_field_text"]').val())) : SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').attr("placeholder", '');
1751
-
1752
- SFSI('input[name="sfsi_form_field_text"]').val() != "" ? (SFSI(".sfsi_left_container > .sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').val(SFSI('input[name="sfsi_form_field_text"]').val())) : SFSI(".sfsi_left_container > .sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').val('');
1753
-
1754
- SFSI('input[name="sfsi_form_field_text"]').val() != "" ? (SFSI(".like_pop_box > .sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').val(SFSI('input[name="sfsi_form_field_text"]').val())) : SFSI(".like_pop_box > .sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').val('');
1755
-
1756
- SFSI('#sfsi_form_field_font').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css("font-family", SFSI("#sfsi_form_field_font").val())) : '';
1757
-
1758
- if (SFSI('#sfsi_form_field_fontstyle').val() != "bold") {
1759
- SFSI('#sfsi_form_field_fontstyle').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css("font-style", SFSI("#sfsi_form_field_fontstyle").val())) : '';
1760
- SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css("font-weight", '');
1761
- } else {
1762
- SFSI('#sfsi_form_field_fontstyle').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css("font-weight", 'bold')) : '';
1763
- SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css("font-style", '');
1764
- }
1765
-
1766
- SFSI('input[name="sfsi_form_field_fontcolor"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css("color", SFSI('input[name="sfsi_form_field_fontcolor"]').val())) : '';
1767
-
1768
- SFSI('input[name="sfsi_form_field_fontsize"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css({
1769
- "font-size": parseInt(SFSI('input[name="sfsi_form_field_fontsize"]').val())
1770
- })) : '';
1771
-
1772
- SFSI('#sfsi_form_field_fontalign').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css("text-align", SFSI("#sfsi_form_field_fontalign").val())) : '';
1773
-
1774
- //Button customization
1775
- SFSI('input[name="sfsi_form_button_text"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').attr("value", SFSI('input[name="sfsi_form_button_text"]').val())) : '';
1776
-
1777
- SFSI('#sfsi_form_button_font').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("font-family", SFSI("#sfsi_form_button_font").val())) : '';
1778
-
1779
- if (SFSI('#sfsi_form_button_fontstyle').val() != "bold") {
1780
- SFSI('#sfsi_form_button_fontstyle').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("font-style", SFSI("#sfsi_form_button_fontstyle").val())) : '';
1781
- SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("font-weight", '');
1782
- } else {
1783
- SFSI('#sfsi_form_button_fontstyle').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("font-weight", 'bold')) : '';
1784
- SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("font-style", '');
1785
- }
1786
-
1787
- SFSI('input[name="sfsi_form_button_fontcolor"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("color", SFSI('input[name="sfsi_form_button_fontcolor"]').val())) : '';
1788
-
1789
- SFSI('input[name="sfsi_form_button_fontsize"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css({
1790
- "font-size": parseInt(SFSI('input[name="sfsi_form_button_fontsize"]').val())
1791
- })) : '';
1792
-
1793
- SFSI('#sfsi_form_button_fontalign').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("text-align", SFSI("#sfsi_form_button_fontalign").val())) : '';
1794
-
1795
- SFSI('input[name="sfsi_form_button_background"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("background-color", SFSI('input[name="sfsi_form_button_background"]').val())) : '';
1796
-
1797
- var innerHTML = SFSI(".sfsi_html > .sfsi_subscribe_Popinner").html();
1798
- var styleCss = SFSI(".sfsi_html > .sfsi_subscribe_Popinner").attr("style");
1799
- innerHTML = '<div style="' + styleCss + '">' + innerHTML + '</div>';
1800
- SFSI(".sfsi_subscription_html > xmp").html(innerHTML);
1801
-
1802
- /*var data = {
1803
- action:"getForm",
1804
- heading: SFSI('input[name="sfsi_form_heading_text"]').val(),
1805
- placeholder:SFSI('input[name="sfsi_form_field_text"]').val(),
1806
- button:SFSI('input[name="sfsi_form_button_text"]').val()
1807
- };
1808
- SFSI.ajax({
1809
- url:sfsi_icon_ajax_object.ajax_url,
1810
- type:"post",
1811
- data:data,
1812
- success:function(s) {
1813
- SFSI(".sfsi_subscription_html").html(s);
1814
- }
1815
- });*/
1816
- }
1817
-
1818
- var global_error = 0;
1819
- if (typeof SFSI != 'undefined') {
1820
-
1821
- function sfsi_dismiss_notice(btnClass, ajaxAction) {
1822
-
1823
- var btnClass = "." + btnClass;
1824
-
1825
- SFSI(document).on("click", btnClass, function () {
1826
-
1827
- SFSI.ajax({
1828
- url: sfsi_icon_ajax_object.ajax_url,
1829
- type: "post",
1830
- data: {
1831
- action: ajaxAction
1832
- },
1833
- success: function (e) {
1834
- if (false != e) {
1835
- SFSI(btnClass).parent().remove();
1836
- }
1837
- }
1838
- });
1839
- });
1840
- }
1841
- }
1842
-
1843
- SFSI(document).ready(function (s) {
1844
-
1845
- var arrDismiss = [
1846
-
1847
- {
1848
- "btnClass": "sfsi-notice-dismiss",
1849
- "action": "sfsi_dismiss_lang_notice"
1850
- },
1851
-
1852
- {
1853
- "btnClass": "sfsi-AddThis-notice-dismiss",
1854
- "action": "sfsi_dismiss_addThis_icon_notice"
1855
- },
1856
-
1857
- {
1858
- "btnClass": "sfsi_error_reporting_notice-dismiss",
1859
- "action": "sfsi_dismiss_error_reporting_notice"
1860
- }
1861
- ];
1862
-
1863
- SFSI.each(arrDismiss, function (key, valueObj) {
1864
- sfsi_dismiss_notice(valueObj.btnClass, valueObj.action);
1865
- });
1866
-
1867
- //changes done {Monad}
1868
- SFSI(".tab_3_icns").on("click", ".cstomskins_upload", function () {
1869
- SFSI(".cstmskins-overlay").show("slow", function () {
1870
- e = 0;
1871
- });
1872
- });
1873
- /*SFSI("#custmskin_clspop").live("click", function() {*/
1874
- SFSI(document).on("click", '#custmskin_clspop', function () {
1875
- SFSI_done();
1876
- SFSI(".cstmskins-overlay").hide("slow");
1877
- });
1878
-
1879
- create_suscriber_form();
1880
- SFSI('input[name="sfsi_form_heading_text"], input[name="sfsi_form_border_thickness"], input[name="sfsi_form_height"], input[name="sfsi_form_width"], input[name="sfsi_form_heading_fontsize"], input[name="sfsi_form_field_text"], input[name="sfsi_form_field_fontsize"], input[name="sfsi_form_button_text"], input[name="sfsi_form_button_fontsize"]').on("keyup", create_suscriber_form);
1881
-
1882
- SFSI('input[name="sfsi_form_border_color"], input[name="sfsi_form_background"] ,input[name="sfsi_form_heading_fontcolor"], input[name="sfsi_form_field_fontcolor"] ,input[name="sfsi_form_button_fontcolor"],input[name="sfsi_form_button_background"]').on("focus", create_suscriber_form);
1883
-
1884
- SFSI("#sfsi_form_heading_font, #sfsi_form_heading_fontstyle, #sfsi_form_heading_fontalign, #sfsi_form_field_font, #sfsi_form_field_fontstyle, #sfsi_form_field_fontalign, #sfsi_form_button_font, #sfsi_form_button_fontstyle, #sfsi_form_button_fontalign").on("change", create_suscriber_form);
1885
-
1886
- /*SFSI(".radio").live("click", function() {*/
1887
- SFSI(document).on("click", '.radio', function () {
1888
-
1889
- var s = SFSI(this).parent().find("input:radio:first");
1890
-
1891
- var inputName = s.attr("name");
1892
- var inputChecked = s.attr("checked");
1893
-
1894
- switch (inputName) {
1895
- case 'sfsi_form_adjustment':
1896
- if (s.val() == 'no')
1897
- s.parents(".row_tab").next(".row_tab").show("fast");
1898
- else
1899
- s.parents(".row_tab").next(".row_tab").hide("fast");
1900
- create_suscriber_form()
1901
- break;
1902
- case 'sfsi_form_border':
1903
- if (s.val() == 'yes')
1904
- s.parents(".row_tab").next(".row_tab").show("fast");
1905
- else
1906
- s.parents(".row_tab").next(".row_tab").hide("fast");
1907
- create_suscriber_form()
1908
- break;
1909
- case 'sfsi_icons_suppress_errors':
1910
-
1911
- SFSI('input[name="sfsi_icons_suppress_errors"]').removeAttr('checked');
1912
-
1913
- if (s.val() == 'yes')
1914
- SFSI('input[name="sfsi_icons_suppress_errors"][value="yes"]').attr('checked', 'true');
1915
- else
1916
- SFSI('input[name="sfsi_icons_suppress_errors"][value="no"]').attr('checked', 'true');
1917
- break;
1918
-
1919
- default:
1920
- case 'sfsi_responsive_icons_end_post':
1921
- if("yes" == s.val()){
1922
- jQuery('.sfsi_responsive_icon_option_li.sfsi_responsive_show').show();
1923
- }else{
1924
- jQuery('.sfsi_responsive_icon_option_li.sfsi_responsive_show').hide();
1925
- }
1926
- }
1927
- });
1928
-
1929
- SFSI('#sfsi_form_border_color').wpColorPicker({
1930
- defaultColor: false,
1931
- change: function (event, ui) {
1932
- create_suscriber_form()
1933
- },
1934
- clear: function () {
1935
- create_suscriber_form()
1936
- },
1937
- hide: true,
1938
- palettes: true
1939
- }),
1940
- SFSI('#sfsi_form_background').wpColorPicker({
1941
- defaultColor: false,
1942
- change: function (event, ui) {
1943
- create_suscriber_form()
1944
- },
1945
- clear: function () {
1946
- create_suscriber_form()
1947
- },
1948
- hide: true,
1949
- palettes: true
1950
- }),
1951
- SFSI('#sfsi_form_heading_fontcolor').wpColorPicker({
1952
- defaultColor: false,
1953
- change: function (event, ui) {
1954
- create_suscriber_form()
1955
- },
1956
- clear: function () {
1957
- create_suscriber_form()
1958
- },
1959
- hide: true,
1960
- palettes: true
1961
- }),
1962
- SFSI('#sfsi_form_button_fontcolor').wpColorPicker({
1963
- defaultColor: false,
1964
- change: function (event, ui) {
1965
- create_suscriber_form()
1966
- },
1967
- clear: function () {
1968
- create_suscriber_form()
1969
- },
1970
- hide: true,
1971
- palettes: true
1972
- }),
1973
- SFSI('#sfsi_form_button_background').wpColorPicker({
1974
- defaultColor: false,
1975
- change: function (event, ui) {
1976
- create_suscriber_form()
1977
- },
1978
- clear: function () {
1979
- create_suscriber_form()
1980
- },
1981
- hide: true,
1982
- palettes: true
1983
- });
1984
- //changes done {Monad}
1985
-
1986
- function i() {
1987
- SFSI(".uperror").html(""), afterLoad();
1988
- var s = SFSI('input[name="' + SFSI("#upload_id").val() + '"]');
1989
- s.removeAttr("checked");
1990
- var i = SFSI(s).parent().find("span:first");
1991
- return SFSI(i).css("background-position", "0px 0px"), SFSI(".upload-overlay").hide("slow"),
1992
- !1;
1993
- }
1994
- SFSI("#accordion").accordion({
1995
- collapsible: !0,
1996
- active: !1,
1997
- heightStyle: "content",
1998
- event: "click",
1999
- beforeActivate: function (s, i) {
2000
- if (i.newHeader[0]) var e = i.newHeader,
2001
- t = e.next(".ui-accordion-content");
2002
- else var e = i.oldHeader,
2003
- t = e.next(".ui-accordion-content");
2004
- var n = "true" == e.attr("aria-selected");
2005
- return e.toggleClass("ui-corner-all", n).toggleClass("accordion-header-active ui-state-active ui-corner-top", !n).attr("aria-selected", (!n).toString()),
2006
- e.children(".ui-icon").toggleClass("ui-icon-triangle-1-e", n).toggleClass("ui-icon-triangle-1-s", !n),
2007
- t.toggleClass("accordion-content-active", !n), n ? t.slideUp() : t.slideDown(), !1;
2008
- }
2009
- }),
2010
- SFSI("#accordion1").accordion({
2011
- collapsible: !0,
2012
- active: !1,
2013
- heightStyle: "content",
2014
- event: "click",
2015
- beforeActivate: function (s, i) {
2016
- if (i.newHeader[0]) var e = i.newHeader,
2017
- t = e.next(".ui-accordion-content");
2018
- else var e = i.oldHeader,
2019
- t = e.next(".ui-accordion-content");
2020
- var n = "true" == e.attr("aria-selected");
2021
- return e.toggleClass("ui-corner-all", n).toggleClass("accordion-header-active ui-state-active ui-corner-top", !n).attr("aria-selected", (!n).toString()),
2022
- e.children(".ui-icon").toggleClass("ui-icon-triangle-1-e", n).toggleClass("ui-icon-triangle-1-s", !n),
2023
- t.toggleClass("accordion-content-active", !n), n ? t.slideUp() : t.slideDown(), !1;
2024
- }
2025
- }),
2026
-
2027
- SFSI("#accordion2").accordion({
2028
- collapsible: !0,
2029
- active: !1,
2030
- heightStyle: "content",
2031
- event: "click",
2032
- beforeActivate: function (s, i) {
2033
- if (i.newHeader[0]) var e = i.newHeader,
2034
- t = e.next(".ui-accordion-content");
2035
- else var e = i.oldHeader,
2036
- t = e.next(".ui-accordion-content");
2037
- var n = "true" == e.attr("aria-selected");
2038
- return e.toggleClass("ui-corner-all", n).toggleClass("accordion-header-active ui-state-active ui-corner-top", !n).attr("aria-selected", (!n).toString()),
2039
- e.children(".ui-icon").toggleClass("ui-icon-triangle-1-e", n).toggleClass("ui-icon-triangle-1-s", !n),
2040
- t.toggleClass("accordion-content-active", !n), n ? t.slideUp() : t.slideDown(), !1;
2041
- }
2042
- }),
2043
- SFSI(".closeSec").on("click", function () {
2044
- var s = !0,
2045
- i = SFSI(this).closest("div.ui-accordion-content").prev("h3.ui-accordion-header").first(),
2046
- e = SFSI(this).closest("div.ui-accordion-content").first();
2047
- i.toggleClass("ui-corner-all", s).toggleClass("accordion-header-active ui-state-active ui-corner-top", !s).attr("aria-selected", (!s).toString()),
2048
- i.children(".ui-icon").toggleClass("ui-icon-triangle-1-e", s).toggleClass("ui-icon-triangle-1-s", !s),
2049
- e.toggleClass("accordion-content-active", !s), s ? e.slideUp() : e.slideDown();
2050
- }),
2051
- SFSI(document).click(function (s) {
2052
- var i = SFSI(".sfsi_FrntInner_chg"),
2053
- e = SFSI(".sfsi_wDiv"),
2054
- t = SFSI("#at15s");
2055
- i.is(s.target) || 0 !== i.has(s.target).length || e.is(s.target) || 0 !== e.has(s.target).length || t.is(s.target) || 0 !== t.has(s.target).length || i.fadeOut();
2056
- }),
2057
- SFSI('#sfsi_popup_background_color').wpColorPicker({
2058
- defaultColor: false,
2059
- change: function (event, ui) {
2060
- sfsi_make_popBox()
2061
- },
2062
- clear: function () {
2063
- sfsi_make_popBox()
2064
- },
2065
- hide: true,
2066
- palettes: true
2067
- }),
2068
- SFSI('#sfsi_popup_border_color').wpColorPicker({
2069
- defaultColor: false,
2070
- change: function (event, ui) {
2071
- sfsi_make_popBox()
2072
- },
2073
- clear: function () {
2074
- sfsi_make_popBox()
2075
- },
2076
- hide: true,
2077
- palettes: true
2078
- }),
2079
- SFSI('#sfsi_popup_fontColor').wpColorPicker({
2080
- defaultColor: false,
2081
- change: function (event, ui) {
2082
- sfsi_make_popBox()
2083
- },
2084
- clear: function () {
2085
- sfsi_make_popBox()
2086
- },
2087
- hide: true,
2088
- palettes: true
2089
- }),
2090
- SFSI("div#sfsiid_linkedin").find(".icon4").find("a").find("img").mouseover(function () {
2091
- SFSI(this).attr("src", sfsi_icon_ajax_object.plugin_url + "images/visit_icons/linkedIn_hover.svg");
2092
- }),
2093
- SFSI("div#sfsiid_linkedin").find(".icon4").find("a").find("img").mouseleave(function () {
2094
- SFSI(this).attr("src", sfsi_icon_ajax_object.plugin_url + "images/visit_icons/linkedIn.svg");
2095
- }),
2096
- SFSI("div#sfsiid_youtube").find(".icon1").find("a").find("img").mouseover(function () {
2097
- SFSI(this).attr("src", sfsi_icon_ajax_object.plugin_url + "images/visit_icons/youtube_hover.svg");
2098
- }),
2099
- SFSI("div#sfsiid_youtube").find(".icon1").find("a").find("img").mouseleave(function () {
2100
- SFSI(this).attr("src", sfsi_icon_ajax_object.plugin_url + "images/visit_icons/youtube.svg");
2101
- }),
2102
- SFSI("div#sfsiid_facebook").find(".icon1").find("a").find("img").mouseover(function () {
2103
- SFSI(this).css("opacity", "0.9");
2104
- }),
2105
- SFSI("div#sfsiid_facebook").find(".icon1").find("a").find("img").mouseleave(function () {
2106
- SFSI(this).css("opacity", "1");
2107
- }),
2108
- SFSI("div#sfsiid_twitter").find(".cstmicon1").find("a").find("img").mouseover(function () {
2109
- SFSI(this).css("opacity", "0.9");
2110
- }),
2111
- SFSI("div#sfsiid_twitter").find(".cstmicon1").find("a").find("img").mouseleave(function () {
2112
- SFSI(this).css("opacity", "1");
2113
- }),
2114
- SFSI("#sfsi_save1").on("click", function () {
2115
- // console.log('save1',sfsi_update_step1());
2116
- sfsi_update_step1() && sfsicollapse(this);
2117
- }),
2118
- SFSI("#sfsi_save2").on("click", function () {
2119
- sfsi_update_step2() && sfsicollapse(this);
2120
- }),
2121
- SFSI("#sfsi_save3").on("click", function () {
2122
- sfsi_update_step3() && sfsicollapse(this);
2123
- }),
2124
- SFSI("#sfsi_save4").on("click", function () {
2125
- sfsi_update_step4() && sfsicollapse(this);
2126
- }),
2127
- SFSI("#sfsi_save5").on("click", function () {
2128
- sfsi_update_step5() && sfsicollapse(this);
2129
- }),
2130
- SFSI("#sfsi_save6").on("click", function () {
2131
- sfsi_update_step6() && sfsicollapse(this);
2132
- }),
2133
- SFSI("#sfsi_save7").on("click", function () {
2134
- sfsi_update_step7() && sfsicollapse(this);
2135
- }),
2136
- SFSI("#sfsi_save8").on("click", function () {
2137
- sfsi_update_step8() && sfsicollapse(this);
2138
- }),
2139
- SFSI("#sfsi_save9").on("click", function () {
2140
- sfsi_update_step9() && sfsicollapse(this);
2141
- }),
2142
- SFSI("#save_all_settings").on("click", function () {
2143
- return SFSI("#save_all_settings").text("Saving.."), SFSI(".save_button >a").css("pointer-events", "none"),
2144
- sfsi_update_step1(), sfsi_update_step8(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "Which icons do you want to show on your site?" tab.', 8),
2145
- global_error = 0, !1) : (sfsi_update_step2(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "What do you want the icons to do?" tab.', 8),
2146
- global_error = 0, !1) : (sfsi_update_step3(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "What design & animation do you want to give your icons?" tab.', 8),
2147
- global_error = 0, !1) : (sfsi_update_step4(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "Do you want to display "counts" next to your icons?" tab.', 8),
2148
- global_error = 0, !1) : (sfsi_update_step5(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "Any other wishes for your main icons?" tab.', 8),
2149
- global_error = 0, !1) : (sfsi_update_step6(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "Do you want to display icons at the end of every post?" tab.', 8),
2150
- global_error = 0, !1) : (sfsi_update_step7(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "Do you want to display a pop-up, asking people to subscribe?" tab.', 8),
2151
- /*global_error = 0, !1) :void (0 == global_error && showErrorSuc("success", 'Saved! Now go to the <a href="widgets.php">widget</a> area and place the widget into your sidebar (if not done already)', 8))))))));*/
2152
- global_error = 0, !1) : void(0 == global_error && showErrorSuc("success", '', 8))))))));
2153
- }),
2154
- /*SFSI(".fileUPInput").live("change", function() {*/
2155
- SFSI(document).on("change", '.fileUPInput', function () {
2156
- beForeLoad(), beforeIconSubmit(this) && (SFSI(".upload-overlay").css("pointer-events", "none"),
2157
- SFSI("#customIconFrm").ajaxForm({
2158
- dataType: "json",
2159
- success: afterIconSuccess,
2160
- resetForm: !0
2161
- }).submit());
2162
- }),
2163
- SFSI(".pop-up").on("click", function () {
2164
- ("fbex-s2" == SFSI(this).attr("data-id") || "linkex-s2" == SFSI(this).attr("data-id")) && (SFSI("." + SFSI(this).attr("data-id")).hide(),
2165
- SFSI("." + SFSI(this).attr("data-id")).css("opacity", "1"), SFSI("." + SFSI(this).attr("data-id")).css("z-index", "1000")),
2166
- SFSI("." + SFSI(this).attr("data-id")).show("slow");
2167
- }),
2168
- /*SFSI("#close_popup").live("click", function() {*/
2169
- SFSI(document).on("click", '#close_popup', function () {
2170
- SFSI(".read-overlay").hide("slow");
2171
- });
2172
-
2173
- var e = 0;
2174
- SFSI(".icn_listing").on("click", ".checkbox", function () {
2175
- if (1 == e) return !1;
2176
- "yes" == SFSI(this).attr("dynamic_ele") && (s = SFSI(this).parent().find("input:checkbox:first"),
2177
- s.is(":checked") ? SFSI(s).attr("checked", !1) : SFSI(s).attr("checked", !0)), s = SFSI(this).parent().find("input:checkbox:first"),
2178
- "yes" == SFSI(s).attr("isNew") && ("0px 0px" == SFSI(this).css("background-position") ? (SFSI(s).attr("checked", !0),
2179
- SFSI(this).css("background-position", "0px -36px")) : (SFSI(s).removeAttr("checked", !0),
2180
- SFSI(this).css("background-position", "0px 0px")));
2181
- var s = SFSI(this).parent().find("input:checkbox:first");
2182
- if (s.is(":checked") && "cusotm-icon" == s.attr("element-type")) SFSI(".fileUPInput").attr("name", "custom_icons[]"),
2183
- SFSI(".upload-overlay").show("slow", function () {
2184
- e = 0;
2185
- }), SFSI("#upload_id").val(s.attr("name"));
2186
- else if (!s.is(":checked") && "cusotm-icon" == s.attr("element-type")) return s.attr("ele-type") ? (SFSI(this).attr("checked", !0),
2187
- SFSI(this).css("background-position", "0px -36px"), e = 0, !1) : confirm("Are you sure want to delete this Icon..?? ") ? "suc" == sfsi_delete_CusIcon(this, s) ? (s.attr("checked", !1),
2188
- SFSI(this).css("background-position", "0px 0px"), e = 0, !1) : (e = 0, !1) : (s.attr("checked", !0),
2189
- SFSI(this).css("background-position", "0px -36px"), e = 0, !1);
2190
- }),
2191
- SFSI(".icn_listing").on("click", ".checkbox", function () {
2192
- checked = SFSI(this).parent().find("input:checkbox:first"), "sfsi_email_display" != checked.attr("name") || checked.is(":checked") || SFSI(".demail-1").show("slow");
2193
- }),
2194
- SFSI("#deac_email2").on("click", function () {
2195
- SFSI(".demail-1").hide("slow"), SFSI(".demail-2").show("slow");
2196
- }),
2197
- SFSI("#deac_email3").on("click", function () {
2198
- SFSI(".demail-2").hide("slow"), SFSI(".demail-3").show("slow");
2199
- }),
2200
- SFSI(".hideemailpop").on("click", function () {
2201
- SFSI('input[name="sfsi_email_display"]').attr("checked", !0), SFSI('input[name="sfsi_email_display"]').parent().find("span:first").css("background-position", "0px -36px"),
2202
- SFSI(".demail-1").hide("slow"), SFSI(".demail-2").hide("slow"), SFSI(".demail-3").hide("slow");
2203
- }),
2204
- SFSI(".hidePop").on("click", function () {
2205
- SFSI(".demail-1").hide("slow"), SFSI(".demail-2").hide("slow"), SFSI(".demail-3").hide("slow");
2206
- }),
2207
- SFSI(".activate_footer").on("click", function () {
2208
- var nonce = SFSI(this).attr("data-nonce");
2209
- SFSI(this).text("activating....");
2210
- var s = {
2211
- action: "activateFooter",
2212
- nonce: nonce
2213
- };
2214
- SFSI.ajax({
2215
- url: sfsi_icon_ajax_object.ajax_url,
2216
- type: "post",
2217
- data: s,
2218
- dataType: "json",
2219
- success: function (s) {
2220
- if (s.res == "wrong_nonce") {
2221
- SFSI(".activate_footer").css("font-size", "18px");
2222
- SFSI(".activate_footer").text("Unauthorised Request, Try again after refreshing page");
2223
- } else {
2224
- "success" == s.res && (SFSI(".demail-1").hide("slow"), SFSI(".demail-2").hide("slow"),
2225
- SFSI(".demail-3").hide("slow"), SFSI(".activate_footer").text("Ok, activate link"));
2226
- }
2227
- }
2228
- });
2229
- }),
2230
- SFSI(".sfsi_removeFooter").on("click", function () {
2231
- var nonce = SFSI(this).attr("data-nonce");
2232
- SFSI(this).text("working....");
2233
- var s = {
2234
- action: "removeFooter",
2235
- nonce: nonce
2236
- };
2237
- SFSI.ajax({
2238
- url: sfsi_icon_ajax_object.ajax_url,
2239
- type: "post",
2240
- data: s,
2241
- dataType: "json",
2242
- success: function (s) {
2243
- if (s.res == "wrong_nonce") {
2244
- SFSI(".sfsi_removeFooter").text("Unauthorised Request, Try again after refreshing page");
2245
- } else {
2246
- "success" == s.res && (SFSI(".sfsi_removeFooter").fadeOut("slow"), SFSI(".sfsi_footerLnk").fadeOut("slow"));
2247
- }
2248
- }
2249
- });
2250
- }),
2251
- /*SFSI(".radio").live("click", function() {*/
2252
- SFSI(document).on("click", '.radio', function () {
2253
- var s = SFSI(this).parent().find("input:radio:first");
2254
- "sfsi_display_counts" == s.attr("name") && sfsi_show_counts();
2255
- }),
2256
- SFSI("#close_Uploadpopup").on("click", i), /*SFSI(".radio").live("click", function() {*/ SFSI(document).on("click", '.radio', function () {
2257
- var s = SFSI(this).parent().find("input:radio:first");
2258
- "sfsi_show_Onposts" == s.attr("name") && sfsi_show_OnpostsDisplay();
2259
- }),
2260
- sfsi_show_OnpostsDisplay(), sfsi_depened_sections(), sfsi_show_counts(), sfsi_showPreviewCounts(),
2261
- SFSI(".share_icon_order").sortable({
2262
- update: function () {
2263
- SFSI(".share_icon_order li").each(function () {
2264
- SFSI(this).attr("data-index", SFSI(this).index() + 1);
2265
- });
2266
- },
2267
- revert: !0
2268
- }),
2269
-
2270
- //*------------------------------- Sharing text & pcitures checkbox for showing section in Page, Post STARTS -------------------------------------//
2271
-
2272
- SFSI(document).on("click", '.checkbox', function () {
2273
-
2274
- var s = SFSI(this).parent().find("input:checkbox:first");
2275
- var backgroundPos = jQuery(this).css('background-position').split(" ");
2276
- var xPos = backgroundPos[0],
2277
- yPos = backgroundPos[1];
2278
-
2279
- var inputName = s.attr('name');
2280
- var inputChecked = s.attr("checked");
2281
-
2282
- switch (inputName) {
2283
-
2284
- case "sfsi_custom_social_hide":
2285
-
2286
- var val = (yPos == "0px") ? "no" : "yes";
2287
- SFSI('input[name="sfsi_custom_social_hide"]').val(val);
2288
-
2289
- break;
2290
-
2291
- case "sfsi_show_via_widget":
2292
- case "sfsi_show_via_widget":
2293
- case "sfsi_show_via_afterposts":
2294
- case "sfsi_custom_social_hide":
2295
-
2296
- var val = (yPos == "0px") ? "no" : "yes";
2297
- SFSI('input[name="' + s.attr('name') + '"]').val(val);
2298
-
2299
- break;
2300
-
2301
- case 'sfsi_mouseOver':
2302
-
2303
- var elem = SFSI('input[name="' + inputName + '"]');
2304
-
2305
- var togglelem = SFSI('.mouse-over-effects');
2306
-
2307
- if (inputChecked) {
2308
- togglelem.removeClass('hide').addClass('show');
2309
- } else {
2310
- togglelem.removeClass('show').addClass('hide');
2311
- }
2312
-
2313
- break;
2314
- case 'sfsi_responsive_facebook_display':
2315
- if(inputChecked){
2316
- SFSI('.sfsi_responsive_icon_facebook_container').parents('a').show();
2317
- var icon= inputName.replace('sfsi_responsive_','').replace('_display','');
2318
- if(SFSI('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val()!=="Fully responsive"){
2319
- window.sfsi_fittext_shouldDisplay=true;
2320
- jQuery('.sfsi_responsive_icon_preview a').each(function(index,a_container){
2321
- if(jQuery(a_container).css('display')!=="none"){
2322
- sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2323
- }
2324
- })
2325
- }
2326
- }else{
2327
-
2328
- SFSI('.sfsi_responsive_icon_facebook_container').parents('a').hide();
2329
- if(SFSI('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val()!=="Fully responsive"){
2330
- window.sfsi_fittext_shouldDisplay=true;
2331
- jQuery('.sfsi_responsive_icon_preview a').each(function(index,a_container){
2332
- if(jQuery(a_container).css('display')!=="none"){
2333
- sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2334
- }
2335
- })
2336
- }
2337
- }
2338
- break;
2339
- case 'sfsi_responsive_Twitter_display':
2340
- if(inputChecked){
2341
- SFSI('.sfsi_responsive_icon_twitter_container').parents('a').show();
2342
- var icon= inputName.replace('sfsi_responsive_','').replace('_display','');
2343
- if(SFSI('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val()!=="Fully responsive"){
2344
- window.sfsi_fittext_shouldDisplay=true;
2345
- jQuery('.sfsi_responsive_icon_preview a').each(function(index,a_container){
2346
- if(jQuery(a_container).css('display')!=="none"){
2347
- sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2348
- }
2349
- })
2350
- }
2351
- }else{
2352
- SFSI('.sfsi_responsive_icon_twitter_container').parents('a').hide();
2353
- if(SFSI('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val()!=="Fully responsive"){
2354
- window.sfsi_fittext_shouldDisplay=true;
2355
- jQuery('.sfsi_responsive_icon_preview a').each(function(index,a_container){
2356
- if(jQuery(a_container).css('display')!=="none"){
2357
- sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2358
- }
2359
- })
2360
- }
2361
- }
2362
- break;
2363
- case 'sfsi_responsive_Follow_display':
2364
- if(inputChecked){
2365
- SFSI('.sfsi_responsive_icon_follow_container').parents('a').show();
2366
- var icon= inputName.replace('sfsi_responsive_','').replace('_display','');
2367
- }else{
2368
- SFSI('.sfsi_responsive_icon_follow_container').parents('a').hide();
2369
- }
2370
- window.sfsi_fittext_shouldDisplay=true;
2371
- jQuery('.sfsi_responsive_icon_preview a').each(function(index,a_container){
2372
- if(jQuery(a_container).css('display')!=="none"){
2373
- sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2374
- }
2375
- })
2376
- break;
2377
- }
2378
-
2379
- });
2380
-
2381
- //*------------------------------- Sharing text & pcitures checkbox for showing section in Page, Post CLOSES -------------------------------------//
2382
-
2383
- SFSI(document).on("click", '.radio', function () {
2384
-
2385
- var s = SFSI(this).parent().find("input:radio:first");
2386
-
2387
- switch (s.attr("name")) {
2388
-
2389
- case 'sfsi_mouseOver_effect_type':
2390
-
2391
- var _val = s.val();
2392
- var _name = s.attr("name");
2393
-
2394
- if ('same_icons' == _val) {
2395
- SFSI('.same_icons_effects').removeClass('hide').addClass('show');
2396
- SFSI('.other_icons_effects_options').removeClass('show').addClass('hide');
2397
- } else if ('other_icons' == _val) {
2398
- SFSI('.same_icons_effects').removeClass('show').addClass('hide');
2399
- SFSI('.other_icons_effects_options').removeClass('hide').addClass('show');
2400
-