Poll, Survey, Quiz, Slideshow, Form, Story & Landing Page - Version 19.6.17

Version Description

  • UI looks & feel revamp
Download this release

Release Info

Developer kucaahbe
Plugin Icon 128x128 Poll, Survey, Quiz, Slideshow, Form, Story & Landing Page
Version 19.6.17
Comparing to
See all releases

Code changes from version 19.6.15 to 19.6.17

Files changed (74) hide show
  1. admin/admin-page-loader.php +1 -1
  2. admin/content-popup-button.php +1 -4
  3. admin/content-popup-gutenberg-template.html.php +27 -76
  4. admin/content-popup-template.html.php +19 -87
  5. admin/content-popup.php +375 -59
  6. admin/css/menu-page.css +503 -164
  7. admin/css/sidebar-widget.css +42 -7
  8. admin/images/article.png +0 -0
  9. admin/images/article@2x.png +0 -0
  10. admin/images/article@3x.png +0 -0
  11. admin/images/bitmap_top.png +0 -0
  12. admin/images/bitmap_top_2x.png +0 -0
  13. admin/images/bitmap_top_3x.png +0 -0
  14. admin/images/form.png +0 -0
  15. admin/images/form@2x.png +0 -0
  16. admin/images/form@3x.png +0 -0
  17. admin/images/group-2_2x.png +0 -0
  18. admin/images/list.png +0 -0
  19. admin/images/list@2x.png +0 -0
  20. admin/images/list@3x.png +0 -0
  21. admin/images/opinionstage-tracking-notice.png +0 -0
  22. admin/images/os-icon.png +0 -0
  23. admin/images/os-icon@2x.png +0 -0
  24. admin/images/os-icon@3x.png +0 -0
  25. admin/images/os-logo-header.png +0 -0
  26. admin/images/os-logo-header@2x.png +0 -0
  27. admin/images/os-logo-header@3x.png +0 -0
  28. admin/images/os-logo.png +0 -0
  29. admin/images/os-logo_2x.png +0 -0
  30. admin/images/os-logo_3x.png +0 -0
  31. admin/images/personality.png +0 -0
  32. admin/images/personality@2x.png +0 -0
  33. admin/images/personality@3x.png +0 -0
  34. admin/images/poll.png +0 -0
  35. admin/images/poll@2x.png +0 -0
  36. admin/images/poll@3x.png +0 -0
  37. admin/images/slideshow.png +0 -0
  38. admin/images/slideshow@2x.png +0 -0
  39. admin/images/slideshow@3x.png +0 -0
  40. admin/images/survey.png +0 -0
  41. admin/images/survey@2x.png +0 -0
  42. admin/images/survey@3x.png +0 -0
  43. admin/images/trivia.png +0 -0
  44. admin/images/trivia@2x.png +0 -0
  45. admin/images/trivia@3x.png +0 -0
  46. admin/menu-page.php +36 -17
  47. admin/menu-target.php +14 -7
  48. admin/opinionstage-tracking-user-notice.php +0 -0
  49. admin/opinionstage-usage-tracking-code.php +0 -0
  50. admin/views/getting_started.php +26 -41
  51. admin/views/my_placements.php +21 -20
  52. admin/views/settings.php +42 -41
  53. admin/views/settings_track.php +55 -20
  54. admin/views/view_my_items.php +105 -36
  55. gutenberg/form/dist/blocks.build.js +1 -1
  56. gutenberg/form/src/block/block.js +16 -5
  57. gutenberg/image/os-logo.png +0 -0
  58. gutenberg/init.php +1 -1
  59. gutenberg/personality/dist/blocks.build.js +1 -1
  60. gutenberg/personality/src/block/block.js +15 -6
  61. gutenberg/poll/dist/blocks.build.js +1 -1
  62. gutenberg/poll/src/block/block.js +14 -5
  63. gutenberg/slideshow/dist/blocks.build.js +1 -1
  64. gutenberg/slideshow/src/block/block.js +14 -5
  65. gutenberg/survey/dist/blocks.build.js +1 -1
  66. gutenberg/survey/src/block/block.js +14 -5
  67. gutenberg/trivia/dist/blocks.build.js +1 -1
  68. gutenberg/trivia/src/block/block.js +14 -5
  69. includes/opinionstage-ajax-functions.php +10 -1
  70. includes/opinionstage-sidebar-widget.php +12 -9
  71. includes/opinionstage-utility-functions.php +6 -1
  72. opinionstage-polls.php +1 -1
  73. plugin.php +4 -2
  74. readme.txt +34 -36
admin/admin-page-loader.php CHANGED
@@ -31,7 +31,7 @@ class OpinionStageAdminPageLoader {
31
  include_once( plugin_dir_path( __FILE__ ).'content-popup.php' );
32
  // Load Hotjar script for user data tracking
33
  $oswpHotjarNewPost = basename($_SERVER['REQUEST_URI'], '?' . $_SERVER['QUERY_STRING']);
34
- if($oswpHotjarNewPost == 'post-new.php' || $oswpHotjarNewPost == 'post.php'){
35
  include_once( plugin_dir_path( __FILE__ ).'opinionstage-usage-tracking-code.php' );
36
  }
37
  }
31
  include_once( plugin_dir_path( __FILE__ ).'content-popup.php' );
32
  // Load Hotjar script for user data tracking
33
  $oswpHotjarNewPost = basename($_SERVER['REQUEST_URI'], '?' . $_SERVER['QUERY_STRING']);
34
+ if($oswpHotjarNewPost == 'post-new.php' || $oswpHotjarNewPost == 'post.php' || $oswpHotjarNewPost == 'plugins.php'){
35
  include_once( plugin_dir_path( __FILE__ ).'opinionstage-usage-tracking-code.php' );
36
  }
37
  }
admin/content-popup-button.php CHANGED
@@ -4,11 +4,8 @@ defined( 'ABSPATH' ) or die();
4
  ?>
5
 
6
  <button data-opinionstage-content-launch class="button" type="button">
7
- <img src="<?php echo plugins_url('admin/images/content-popup.png', plugin_dir_path( __FILE__ )) ?>"
8
- width="24"
9
- height="19"
10
  style="position: relative; left: -3px; top: -2px; padding: 0"
11
  >
12
-
13
  Add a Poll, Survey, Quiz or Form
14
  </button>
4
  ?>
5
 
6
  <button data-opinionstage-content-launch class="button" type="button">
7
+ <img src="<?php echo plugins_url('admin/images/os-icon.png', plugin_dir_path( __FILE__ )) ?>"
 
 
8
  style="position: relative; left: -3px; top: -2px; padding: 0"
9
  >
 
10
  Add a Poll, Survey, Quiz or Form
11
  </button>
admin/content-popup-gutenberg-template.html.php CHANGED
@@ -12,85 +12,21 @@ function opinionstage_create_new_href() {
12
 
13
  // Note: all html put here (not moved to js build system) in order to preserve ability to use Wordpress translate APIs
14
  ?>
 
 
 
 
 
15
  <template data-opinionstage-content-popup-template>
16
  <div class='opinionstage-content-popup-contents' data-opinionstage-content-popup data-opinionstage-client-logged-in="<?php echo $opinionstage_user_logged_in ?>">
17
  <header class='header'>
18
  <div class='header__container'>
19
  <div class='header__logo'>
20
  <a href='<?php echo OPINIONSTAGE_SERVER_BASE ?>' target='_blank'>
21
- <img src='<?php echo plugins_url('admin/images/logo.svg', plugin_dir_path( __FILE__ )) ?>'>
22
  </a>
23
  </div>
24
  <div class='header__action'>
25
- <?php if ( $opinionstage_user_logged_in ) { ?>
26
- <div class="create-new-menu-box">
27
- <a href="javascript:void(0)" class="btn-create">CREATE NEW</a>
28
- <div class="create-new-menu">
29
- <li class="create-menu__itm companymenuli">
30
- <a class="alisting">poll</a>
31
- <ul class="submenu">
32
- <li><?php echo opinionstage_create_poll_link('create-menu__itm'); ?></li>
33
- <li><?php echo opinionstage_template_poll_link('create-menu__itm'); ?></li>
34
- </ul>
35
- </li>
36
- <li class="create-menu__itm companymenuli">
37
- <a class="alisting">multi poll set</a>
38
- <ul class="submenu">
39
- <li><?php echo opinionstage_create_poll_set_link('create-menu__itm', __('Create New')) ?></li>
40
- <!-- <li><?php echo opinionstage_template_survey_link('create-menu__itm', __('survey')) ?></li> -->
41
- </ul>
42
- </li>
43
- <li class="create-menu__itm companymenuli">
44
- <a class="alisting">survey</a>
45
- <ul class="submenu">
46
- <li><?php echo opinionstage_create_widget_link('survey', 'create-menu__itm'); ?></li>
47
- <li><?php echo opinionstage_template_survey_link('create-menu__itm'); ?></li>
48
- </ul>
49
- </li>
50
- <li class="create-menu__itm companymenuli">
51
- <a class="alisting">slideshow</a>
52
- <ul class="submenu">
53
- <li><?php echo opinionstage_create_slideshow_link( 'create-menu__itm' ); ?></li>
54
- <li><?php echo opinionstage_template_slideshow_link('create-menu__itm') ?></li>
55
- </ul>
56
- </li>
57
- <li class="create-menu__itm companymenuli">
58
- <a class="alisting">trivia quiz</a>
59
- <ul class="submenu">
60
- <li><?php echo opinionstage_create_widget_link('quiz', 'create-menu__itm'); ?></li>
61
- <li><?php echo opinionstage_template_trivia_link('create-menu__itm'); ?></li>
62
- </ul>
63
- </li>
64
- <li class="create-menu__itm companymenuli">
65
- <a class="alisting">personality quiz</a>
66
- <ul class="submenu">
67
- <li><?php echo opinionstage_create_widget_link('outcome', 'create-menu__itm'); ?></li>
68
- <li><?php echo opinionstage_template_personality_quiz_link('create-menu__itm') ?></li>
69
- </ul>
70
- </li>
71
- <li class="create-menu__itm companymenuli">
72
- <a class="alisting">list</a>
73
- <ul class="submenu">
74
- <li><?php echo opinionstage_create_widget_link('list', 'create-menu__itm'); ?></li>
75
- <li><?php echo opinionstage_template_list_link('create-menu__itm'); ?></li>
76
- </ul>
77
- </li>
78
- <li class="create-menu__itm companymenuli">
79
- <a class="alisting">form</a>
80
- <ul class="submenu">
81
- <li><?php echo opinionstage_create_widget_link('contact_form', 'create-menu__itm'); ?></li>
82
- <li><?php echo opinionstage_template_form_link('create-menu__itm'); ?></li>
83
- </ul>
84
- </li>
85
- <li class="create-menu__itm companymenuli">
86
- <a class="alisting">story</a>
87
- <ul class="submenu">
88
- <li><?php echo opinionstage_create_widget_link('story', 'create-menu__itm'); ?></li>
89
- </ul>
90
- </li>
91
- </div>
92
- </div>
93
- <?php } ?>
94
  <div class='btn-close' @click="closePopup">X</div>
95
  </div>
96
  </div>
@@ -115,9 +51,12 @@ function opinionstage_create_new_href() {
115
  <template id="opinionstage-widget-list">
116
  <div class='page-content'>
117
  <div class='content-actions'>
 
 
 
118
  <div class='filter'>
119
  <div class="dropdown">
120
- <button class="dropbtn" id="dropbtn"><span>All ITEMS</span></button>
121
  <div class="dropdown-content">
122
  <div class='filter__itm'
123
  @click="selectWidgetType('all')"
@@ -171,7 +110,11 @@ function opinionstage_create_new_href() {
171
  :class='{ hidden: !showSearch }'
172
  >
173
  </div>
 
 
 
174
  </div>
 
175
  <div class='content__list'>
176
  <div v-if='hasData'>
177
  <div class='content__itm' v-for="widget in widgets">
@@ -181,11 +124,19 @@ function opinionstage_create_new_href() {
181
  </div>
182
  <p class='content__info'>{{ widget.title }}</p>
183
  <div class='content__links'>
184
- <button class='content__links-itm'
185
  @click="var shortcode = widget.landingPageUrl.replace('https://www.opinionstage.com',''); window.verifyOSInsert(shortcode)">insert</button>
186
- <a class='content__links-itm' target="_blank" :href='widget.landingPageUrl'>view</a>
187
- <a class='content__links-itm' target="_blank" :href='widget.editUrl' v-show="!widget.template">edit</a>
188
- <a class='content__links-itm' target="_blank" :href='widget.statsUrl' v-show="!widget.template">statistics</a>
 
 
 
 
 
 
 
 
189
  </div>
190
  </div>
191
  <div class='content__loading' v-if='dataLoading'>
@@ -200,7 +151,7 @@ function opinionstage_create_new_href() {
200
  </div>
201
  </div>
202
  <div v-else>
203
- No content found
204
  </div>
205
  </div>
206
  </div>
12
 
13
  // Note: all html put here (not moved to js build system) in order to preserve ability to use Wordpress translate APIs
14
  ?>
15
+ <style type="text/css">
16
+ .progress_message{
17
+ display: none;
18
+ }
19
+ </style>
20
  <template data-opinionstage-content-popup-template>
21
  <div class='opinionstage-content-popup-contents' data-opinionstage-content-popup data-opinionstage-client-logged-in="<?php echo $opinionstage_user_logged_in ?>">
22
  <header class='header'>
23
  <div class='header__container'>
24
  <div class='header__logo'>
25
  <a href='<?php echo OPINIONSTAGE_SERVER_BASE ?>' target='_blank'>
26
+ <img src='<?php echo plugins_url('admin/images/os-logo-header.png', plugin_dir_path( __FILE__ )) ?>'>
27
  </a>
28
  </div>
29
  <div class='header__action'>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  <div class='btn-close' @click="closePopup">X</div>
31
  </div>
32
  </div>
51
  <template id="opinionstage-widget-list">
52
  <div class='page-content'>
53
  <div class='content-actions'>
54
+ <div class="popup-header-title">My Items</div>
55
+ <div class="header-right-container">
56
+ <div class="header-right-inner-container">
57
  <div class='filter'>
58
  <div class="dropdown">
59
+ <button class="dropbtn gutenberg_dropdown" id="dropbtn"><span>All ITEMS</span></button>
60
  <div class="dropdown-content">
61
  <div class='filter__itm'
62
  @click="selectWidgetType('all')"
110
  :class='{ hidden: !showSearch }'
111
  >
112
  </div>
113
+ </div>
114
+ <a href="<?php echo admin_url( 'admin.php?page=opinionstage-settings' ); ?>" target='_blank' class="popup-header-item-create-btn">CREATE</a>
115
+ </div>
116
  </div>
117
+ <span class="progress_message" style="font-size: 16px; text-align: center;">Loading...</span>
118
  <div class='content__list'>
119
  <div v-if='hasData'>
120
  <div class='content__itm' v-for="widget in widgets">
124
  </div>
125
  <p class='content__info'>{{ widget.title }}</p>
126
  <div class='content__links'>
127
+ <button class='popup-content-btn content__links-itm'
128
  @click="var shortcode = widget.landingPageUrl.replace('https://www.opinionstage.com',''); window.verifyOSInsert(shortcode)">insert</button>
129
+ <div class="dropdown">
130
+ <div class="popup-action popup-content-btn"></div>
131
+ <div class="content-item-menu">
132
+ <div class="top-arrow-box"><div class="top-arrow"></div></div>
133
+ <div class="popup-action-dropdown dropdown-content">
134
+ <a class='content__links-itm' target="_blank" :href='widget.landingPageUrl'>view</a>
135
+ <a class='content__links-itm' target="_blank" :href='widget.editUrl' v-show="!widget.template">edit</a>
136
+ <a class='content__links-itm' target="_blank" :href='widget.statsUrl' v-show="!widget.template">statistics</a>
137
+ </div>
138
+ </div>
139
+ </div>
140
  </div>
141
  </div>
142
  <div class='content__loading' v-if='dataLoading'>
151
  </div>
152
  </div>
153
  <div v-else>
154
+ No items found
155
  </div>
156
  </div>
157
  </div>
admin/content-popup-template.html.php CHANGED
@@ -18,79 +18,10 @@ function opinionstage_create_new_href() {
18
  <div class='header__container'>
19
  <div class='header__logo'>
20
  <a href='<?php echo OPINIONSTAGE_SERVER_BASE ?>' target='_blank'>
21
- <img src='<?php echo plugins_url('admin/images/logo.svg', plugin_dir_path( __FILE__ )) ?>'>
22
  </a>
23
  </div>
24
  <div class='header__action'>
25
- <?php if ( $opinionstage_user_logged_in ) { ?>
26
- <div class="create-new-menu-box">
27
- <a href="javascript:void(0)" class="btn-create">CREATE NEW</a>
28
- <div class="create-new-menu">
29
- <li class="create-menu__itm companymenuli">
30
- <a class="alisting">poll</a>
31
- <ul class="submenu">
32
- <li><?php echo opinionstage_create_poll_link('create-menu__itm'); ?></li>
33
- <li><?php echo opinionstage_template_poll_link('create-menu__itm'); ?></li>
34
- </ul>
35
- </li>
36
- <li class="create-menu__itm companymenuli">
37
- <a class="alisting">multi poll set</a>
38
- <ul class="submenu">
39
- <li><?php echo opinionstage_create_poll_set_link('create-menu__itm', __('Create New')) ?></li>
40
- <!-- <li><?php echo opinionstage_template_survey_link('create-menu__itm', __('survey')) ?></li> -->
41
- </ul>
42
- </li>
43
- <li class="create-menu__itm companymenuli">
44
- <a class="alisting">survey</a>
45
- <ul class="submenu">
46
- <li><?php echo opinionstage_create_widget_link('survey', 'create-menu__itm'); ?></li>
47
- <li><?php echo opinionstage_template_survey_link('create-menu__itm'); ?></li>
48
- </ul>
49
- </li>
50
- <li class="create-menu__itm companymenuli">
51
- <a class="alisting">slideshow</a>
52
- <ul class="submenu">
53
- <li><?php echo opinionstage_create_slideshow_link( 'create-menu__itm' ); ?></li>
54
- <li><?php echo opinionstage_template_slideshow_link('create-menu__itm') ?></li>
55
- </ul>
56
- </li>
57
- <li class="create-menu__itm companymenuli">
58
- <a class="alisting">trivia quiz</a>
59
- <ul class="submenu">
60
- <li><?php echo opinionstage_create_widget_link('quiz', 'create-menu__itm'); ?></li>
61
- <li><?php echo opinionstage_template_trivia_link('create-menu__itm'); ?></li>
62
- </ul>
63
- </li>
64
- <li class="create-menu__itm companymenuli">
65
- <a class="alisting">personality quiz</a>
66
- <ul class="submenu">
67
- <li><?php echo opinionstage_create_widget_link('outcome', 'create-menu__itm'); ?></li>
68
- <li><?php echo opinionstage_template_personality_quiz_link('create-menu__itm') ?></li>
69
- </ul>
70
- </li>
71
- <li class="create-menu__itm companymenuli">
72
- <a class="alisting">list</a>
73
- <ul class="submenu">
74
- <li><?php echo opinionstage_create_widget_link('list', 'create-menu__itm'); ?></li>
75
- <li><?php echo opinionstage_template_list_link('create-menu__itm'); ?></li>
76
- </ul>
77
- </li>
78
- <li class="create-menu__itm companymenuli">
79
- <a class="alisting">form</a>
80
- <ul class="submenu">
81
- <li><?php echo opinionstage_create_widget_link('contact_form', 'create-menu__itm'); ?></li>
82
- <li><?php echo opinionstage_template_form_link('create-menu__itm'); ?></li>
83
- </ul>
84
- </li>
85
- <li class="create-menu__itm companymenuli">
86
- <a class="alisting">story</a>
87
- <ul class="submenu">
88
- <li><?php echo opinionstage_create_widget_link('story', 'create-menu__itm'); ?></li>
89
- </ul>
90
- </li>
91
- </div>
92
- </div>
93
- <?php } ?>
94
  <div class='btn-close' @click="closePopup">X</div>
95
  </div>
96
  </div>
@@ -115,6 +46,9 @@ function opinionstage_create_new_href() {
115
  <template id="opinionstage-widget-list">
116
  <div class='page-content'>
117
  <div class='content-actions'>
 
 
 
118
  <div class='filter'>
119
  <div class="dropdown">
120
  <button class="dropbtn" id="dropbtn"><span>All ITEMS</span></button>
@@ -171,6 +105,9 @@ function opinionstage_create_new_href() {
171
  :class='{ hidden: !showSearch }'
172
  >
173
  </div>
 
 
 
174
  </div>
175
  <div class='content__list'>
176
  <div v-if='hasData'>
@@ -181,10 +118,18 @@ function opinionstage_create_new_href() {
181
  </div>
182
  <p class='content__info'>{{ widget.title }}</p>
183
  <div class='content__links'>
184
- <button class='content__links-itm' @click="insertShortcode(widget)">insert</button>
 
 
 
 
 
185
  <a class='content__links-itm' target="_blank" :href='widget.landingPageUrl'>view</a>
186
  <a class='content__links-itm' target="_blank" :href='widget.editUrl' v-show="!widget.template">edit</a>
187
  <a class='content__links-itm' target="_blank" :href='widget.statsUrl' v-show="!widget.template">statistics</a>
 
 
 
188
  </div>
189
  </div>
190
  <div class='content__loading' v-if='dataLoading'>
@@ -199,7 +144,7 @@ function opinionstage_create_new_href() {
199
  </div>
200
  </div>
201
  <div v-else>
202
- No content found
203
  </div>
204
  </div>
205
  </div>
@@ -226,23 +171,10 @@ function opinionstage_create_new_href() {
226
  >
227
  </div>
228
  <div class='page-content' v-else>
229
- <div class="bordered-container">
230
  <h1 class='main-title'>
231
- <b>Connect WordPress</b>
232
- <span>with</span>
233
- <b>Opinion Stage</b>
234
- <span>to get started</span>
235
  </h1>
236
- <form action="<?php echo OPINIONSTAGE_LOGIN_PATH ?>" method="get" class="opinionstage-connect-form">
237
- <input type="hidden" name="utm_source" value="<?php echo OPINIONSTAGE_UTM_SOURCE ?>">
238
- <input type="hidden" name="utm_campaign" value="<?php echo OPINIONSTAGE_UTM_CAMPAIGN ?>">
239
- <input type="hidden" name="utm_medium" value="<?php echo OPINIONSTAGE_UTM_MEDIUM ?>">
240
- <input type="hidden" name="o" value="<?php echo OPINIONSTAGE_WIDGET_API_KEY ?>">
241
- <input type="hidden" name="callback" value="<?php echo opinionstage_content_login_callback_url() ?>">
242
- <input id="os-email" type="email" name="email" placeholder="Enter Your Email" data-os-email-input class="opinionstage-conect-input">
243
- <button class="opinionstage-blue-btn" type="submit" id="os-start-login" data-os-login>CONNECT</button>
244
- </form>
245
- </div>
246
  </div>
247
  </div>
248
  <div v-else>
18
  <div class='header__container'>
19
  <div class='header__logo'>
20
  <a href='<?php echo OPINIONSTAGE_SERVER_BASE ?>' target='_blank'>
21
+ <img src='<?php echo plugins_url('admin/images/os-logo-header.png', plugin_dir_path( __FILE__ )) ?>'>
22
  </a>
23
  </div>
24
  <div class='header__action'>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  <div class='btn-close' @click="closePopup">X</div>
26
  </div>
27
  </div>
46
  <template id="opinionstage-widget-list">
47
  <div class='page-content'>
48
  <div class='content-actions'>
49
+ <div class="popup-header-title">My Items</div>
50
+ <div class="header-right-container">
51
+ <div class="header-right-inner-container">
52
  <div class='filter'>
53
  <div class="dropdown">
54
  <button class="dropbtn" id="dropbtn"><span>All ITEMS</span></button>
105
  :class='{ hidden: !showSearch }'
106
  >
107
  </div>
108
+ </div>
109
+ <a href="<?php echo admin_url( 'admin.php?page=opinionstage-settings' ); ?>" target='_blank' class="popup-header-item-create-btn">CREATE</a>
110
+ </div>
111
  </div>
112
  <div class='content__list'>
113
  <div v-if='hasData'>
118
  </div>
119
  <p class='content__info'>{{ widget.title }}</p>
120
  <div class='content__links'>
121
+ <button class='popup-content-btn content__links-itm' @click="insertShortcode(widget)">insert</button>
122
+ <div class="dropdown">
123
+ <div class="popup-action popup-content-btn"></div>
124
+ <div class="content-item-menu">
125
+ <div class="top-arrow-box"><div class="top-arrow"></div></div>
126
+ <div class="popup-action-dropdown dropdown-content">
127
  <a class='content__links-itm' target="_blank" :href='widget.landingPageUrl'>view</a>
128
  <a class='content__links-itm' target="_blank" :href='widget.editUrl' v-show="!widget.template">edit</a>
129
  <a class='content__links-itm' target="_blank" :href='widget.statsUrl' v-show="!widget.template">statistics</a>
130
+ </div>
131
+ </div>
132
+ </div>
133
  </div>
134
  </div>
135
  <div class='content__loading' v-if='dataLoading'>
144
  </div>
145
  </div>
146
  <div v-else>
147
+ No items found
148
  </div>
149
  </div>
150
  </div>
171
  >
172
  </div>
173
  <div class='page-content' v-else>
 
174
  <h1 class='main-title'>
175
+ <b>Connect WordPress with Opinion Stage to get started</b>
 
 
 
176
  </h1>
177
+ <a id="os-start-login" data-os-login="" href="<?php echo admin_url( 'admin.php?page=opinionstage-getting-started' ); ?>" class="opinionstage-blue-btn">CONNECT</a>
 
 
 
 
 
 
 
 
 
178
  </div>
179
  </div>
180
  <div v-else>
admin/content-popup.php CHANGED
@@ -7,6 +7,12 @@ add_action( 'admin_enqueue_scripts', 'opinionstage_content_popup_js');
7
  add_action( 'admin_footer', 'opinionstage_content_popup_html' );
8
  add_action( 'admin_footer', 'opinionstage_content_popup_css_dropdown' );
9
 
 
 
 
 
 
 
10
  function opinionstage_content_popup_add_editor_button() {
11
  require( plugin_dir_path( __FILE__ ).'content-popup-button.php' );
12
  }
@@ -47,61 +53,87 @@ function opinionstage_content_popup_html() {
47
  </script>
48
  <?php }
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  function opinionstage_content_popup_css_dropdown(){ ?>
51
  <style type="text/css">
52
  span#insert_error_editor {
53
- color: #9F6000;
54
  background-color: #FEEFB3;
55
- padding: 10px;
56
  font-size: 15px;
57
  font-weight: bold;
58
- width: 100%;
59
  text-align: center;
 
60
  }
61
  span#insert_error_editor a {
62
  text-decoration: none;
63
  }
64
- .dropbtn {
65
- font-size: 16px;
66
- border: 1px solid #e4e4e4;
67
  background-color: #ffffff;
 
 
 
68
  cursor: pointer;
69
  display: inline-block;
70
  font: 16px/42px Open Sans,Helvetica,sans-serif;
 
 
 
71
  text-align: left;
72
  text-decoration: none;
73
  width: 140px;
74
- position: relative;
75
- outline: none!important;
76
- border-right: 0px !important;
77
- padding-left: 20px;
78
- box-shadow: 0px 0px 0px !important;
79
  }
80
 
81
  .dropdown {
82
- position: relative;
83
  display: inline-block;
 
84
  }
85
 
86
  .dropdown-content {
 
 
87
  display: none;
 
88
  position: absolute;
89
- background-color: #f9f9f9;
90
- box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
91
  z-index: 9;
92
- top: 45px;
93
- left: 1px;
94
  }
95
 
96
  .dropdown-content div {
97
- display: block;
98
- color: #555454;
99
  border: 1px solid #3487fa;
 
 
 
 
100
  padding: 5px 10px 5px 20px;
101
- background-color: #fff;
102
  text-decoration: none;
103
- border-top: 0px !important;
104
- border-bottom: 0px !important;
105
  }
106
 
107
  .dropdown-content div:hover {background-color: #3487fa; color: #fff !important;}
@@ -110,53 +142,54 @@ span#insert_error_editor a {
110
  display: block !important;
111
  width: 180px;
112
  }
113
-
 
 
114
  .dropdown:hover .dropbtn {
115
  background-color: #ffffff;
116
  }
117
  .opinionstage-content-popup-contents .filter__itm{
118
- width: 100%;
119
- line-height : 25px !important;
120
  font-size: 12px !important;
121
- margin-right: 0px !important;
 
 
122
  }
123
  button#dropbtn span {
124
- text-transform: uppercase;
125
  color: #555454;
126
  font-size: 12px;
127
  font-weight: 700;
 
128
  }
129
  .filter {
130
  margin: 0 !important;
131
  }
132
  button#dropbtn:before {
 
133
  content: "";
134
  display: block;
135
- position: absolute;
136
- top: 0px;
137
- font-size: 12px;
138
  font-family: os-icon-font !important;
 
 
139
  right: -25px;
 
140
  z-index: 3;
141
- color: #000;
142
  }
143
  button#dropbtn:after {
 
 
144
  content: "";
 
145
  position: absolute;
146
- top: 0;
147
- width: 40px;
148
  right: -40px;
149
- height: 45px;
150
- border: 1px solid #e4e4e4;
151
  top: -1px;
152
- border-left: 0px !important;
153
- }
154
- .opinionstage-content-popup-contents .filter__itm.active{
155
- background: #5299fb;
156
- font-weight: normal !important;
157
- color: #fff;
158
- }
159
- .filter__itm:last-child {
160
  border-bottom: 1px solid #3487fa !important;
161
  }
162
  .filter__itm:first-child {
@@ -166,33 +199,33 @@ button#dropbtn:after {
166
  transform: rotateZ(90deg);
167
  }
168
  .opinionstage-content-popup-contents .std-search {
169
- background-color: #efefef;
170
  background: #ffffff;
171
  border: 1px solid #cccccc;
172
- box-sizing: border-box;
173
  border-radius: 2px;
 
 
 
174
  font-size: 14px;
175
- color: #555454;
176
- width: 100%;
177
  height: 40px;
178
- padding: 0 20px;
179
- box-shadow: 0px 0px;
180
  }
181
  .opinionstage-content-popup-contents .search{
182
  float: right;
183
  }
184
  .search:before {
185
- content: "";
186
- color: #3aaebd;
187
- position: absolute;
188
- right: 10px;
189
- top: 0;
190
  bottom: 0;
 
 
 
191
  font-size: 18px;
192
  height: 18px;
 
193
  margin: auto;
194
  pointer-events: none;
195
- font-family: os-icon-font !important;
 
 
196
  }
197
 
198
  /* Menu Content Popup */
@@ -200,8 +233,8 @@ button#dropbtn:after {
200
  {
201
  background-color: #999;
202
  height:35px;
203
- width:100%;
204
  margin-top: -10px;
 
205
  }
206
  .companymenuul
207
  {
@@ -234,7 +267,7 @@ button#dropbtn:after {
234
  list-style-type:none;
235
  }
236
  .create-menu__itm{
237
- padding: 0px 0px !important;
238
  }
239
  a.alisting {
240
  padding-left: 18px;
@@ -243,12 +276,12 @@ li.create-menu__itm.companymenuli {
243
  position: relative;
244
  }
245
  ul.submenu {
 
 
246
  left: -100%;
247
  position: absolute;
248
- width: 100%;
249
  top: 0;
250
- border: 1px solid #3aaebd;
251
- border-bottom: 0px;
252
  }
253
  ul.submenu li a.create-menu__itm {
254
  text-align: center;
@@ -259,6 +292,289 @@ li.create-menu__itm.companymenuli:hover a.alisting {
259
  li.create-menu__itm.companymenuli a.alisting {
260
  color: #3aaebd;
261
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
262
  </style>
263
  <?php }
264
  ?>
7
  add_action( 'admin_footer', 'opinionstage_content_popup_html' );
8
  add_action( 'admin_footer', 'opinionstage_content_popup_css_dropdown' );
9
 
10
+ $opinionstage_user_logged_in = opinionstage_user_logged_in();
11
+
12
+ if ( !$opinionstage_user_logged_in ) {
13
+ add_action( 'admin_footer', 'opinionstage_content_popup_css_without_login' );
14
+ }
15
+
16
  function opinionstage_content_popup_add_editor_button() {
17
  require( plugin_dir_path( __FILE__ ).'content-popup-button.php' );
18
  }
53
  </script>
54
  <?php }
55
 
56
+ function opinionstage_content_popup_css_without_login(){ ?>
57
+ <style type="text/css">
58
+ .opinionstage-content-popup-contents .page-content {
59
+ padding-left: 20px;
60
+ padding-right: 20px;
61
+ padding-bottom: 25px;
62
+ }
63
+ .opinionstage-content-popup .tingle-modal-box {
64
+ height: auto;
65
+ max-width: 600px;
66
+ min-width: 400px;
67
+ }
68
+ .opinionstage-content-popup-contents .main-title {
69
+ font-size: 20px;
70
+ margin-bottom: 15px;
71
+ margin-left: 15px;
72
+ text-align: left;
73
+ }
74
+ .opinionstage-content-popup-contents .opinionstage-blue-btn {
75
+ margin: 15px;
76
+ }
77
+ .components-button.is-default.is-block.is-primary {
78
+ max-width: 130px;
79
+ }
80
+ </style>
81
+ <?php }
82
+
83
  function opinionstage_content_popup_css_dropdown(){ ?>
84
  <style type="text/css">
85
  span#insert_error_editor {
 
86
  background-color: #FEEFB3;
87
+ color: #9F6000;
88
  font-size: 15px;
89
  font-weight: bold;
90
+ padding: 10px;
91
  text-align: center;
92
+ width: 100%;
93
  }
94
  span#insert_error_editor a {
95
  text-decoration: none;
96
  }
97
+ .dropbtn {
 
 
98
  background-color: #ffffff;
99
+ border: 1px solid #e4e4e4;
100
+ border-right: 0 !important;
101
+ box-shadow: 0 0 0 !important;
102
  cursor: pointer;
103
  display: inline-block;
104
  font: 16px/42px Open Sans,Helvetica,sans-serif;
105
+ outline: none!important;
106
+ padding-left: 10px;
107
+ position: relative;
108
  text-align: left;
109
  text-decoration: none;
110
  width: 140px;
 
 
 
 
 
111
  }
112
 
113
  .dropdown {
 
114
  display: inline-block;
115
+ position: relative;
116
  }
117
 
118
  .dropdown-content {
119
+ background-color: #f9f9f9;
120
+ box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
121
  display: none;
122
+ left: 1px;
123
  position: absolute;
124
+ top: 40px;
 
125
  z-index: 9;
 
 
126
  }
127
 
128
  .dropdown-content div {
129
+ background-color: #fff;
 
130
  border: 1px solid #3487fa;
131
+ border-bottom: 0 !important;
132
+ border-top: 0 !important;
133
+ color: #555454;
134
+ display: block;
135
  padding: 5px 10px 5px 20px;
 
136
  text-decoration: none;
 
 
137
  }
138
 
139
  .dropdown-content div:hover {background-color: #3487fa; color: #fff !important;}
142
  display: block !important;
143
  width: 180px;
144
  }
145
+ .dropdown:hover .content-item-menu {
146
+ display: block;
147
+ }
148
  .dropdown:hover .dropbtn {
149
  background-color: #ffffff;
150
  }
151
  .opinionstage-content-popup-contents .filter__itm{
 
 
152
  font-size: 12px !important;
153
+ line-height : 25px !important;
154
+ margin-right: 0 !important;
155
+ width: 100%;
156
  }
157
  button#dropbtn span {
 
158
  color: #555454;
159
  font-size: 12px;
160
  font-weight: 700;
161
+ text-transform: uppercase;
162
  }
163
  .filter {
164
  margin: 0 !important;
165
  }
166
  button#dropbtn:before {
167
+ color: #000;
168
  content: "";
169
  display: block;
 
 
 
170
  font-family: os-icon-font !important;
171
+ font-size: 12px;
172
+ position: absolute;
173
  right: -25px;
174
+ top: 0;
175
  z-index: 3;
 
176
  }
177
  button#dropbtn:after {
178
+ border: 1px solid #e4e4e4;
179
+ border-left: 0 !important;
180
  content: "";
181
+ height: 45px;
182
  position: absolute;
 
 
183
  right: -40px;
 
 
184
  top: -1px;
185
+ width: 40px;
186
+ }
187
+ .opinionstage-content-popup-contents .filter__itm.active{
188
+ background: #5299fb;
189
+ color: #fff;
190
+ font-weight: normal !important;
191
+ }
192
+ .filter__itm:last-child {
193
  border-bottom: 1px solid #3487fa !important;
194
  }
195
  .filter__itm:first-child {
199
  transform: rotateZ(90deg);
200
  }
201
  .opinionstage-content-popup-contents .std-search {
 
202
  background: #ffffff;
203
  border: 1px solid #cccccc;
 
204
  border-radius: 2px;
205
+ box-shadow: 0 0;
206
+ box-sizing: border-box;
207
+ color: #797979;
208
  font-size: 14px;
 
 
209
  height: 40px;
210
+ padding: 10px;
211
+ width: 100%;
212
  }
213
  .opinionstage-content-popup-contents .search{
214
  float: right;
215
  }
216
  .search:before {
 
 
 
 
 
217
  bottom: 0;
218
+ color: #3aaebd;
219
+ content: "";
220
+ font-family: os-icon-font !important;
221
  font-size: 18px;
222
  height: 18px;
223
+ line-height: normal;
224
  margin: auto;
225
  pointer-events: none;
226
+ position: absolute;
227
+ right: 10px;
228
+ top: 0;
229
  }
230
 
231
  /* Menu Content Popup */
233
  {
234
  background-color: #999;
235
  height:35px;
 
236
  margin-top: -10px;
237
+ width:100%;
238
  }
239
  .companymenuul
240
  {
267
  list-style-type:none;
268
  }
269
  .create-menu__itm{
270
+ padding: 0 0 !important;
271
  }
272
  a.alisting {
273
  padding-left: 18px;
276
  position: relative;
277
  }
278
  ul.submenu {
279
+ border: 1px solid #3aaebd;
280
+ border-bottom: 0;
281
  left: -100%;
282
  position: absolute;
 
283
  top: 0;
284
+ width: 100%;
 
285
  }
286
  ul.submenu li a.create-menu__itm {
287
  text-align: center;
292
  li.create-menu__itm.companymenuli a.alisting {
293
  color: #3aaebd;
294
  }
295
+
296
+ .opinionstage-content-popup-contents .opinionstage-blue-btn {
297
+ background-color: #32adbc;
298
+ font-size: 15px;
299
+ font-weight: 600;
300
+ width: 100px;
301
+ }
302
+ .header-right-container {
303
+ float: right;
304
+ }
305
+ .header-right-inner-container {
306
+ border-right: 1px solid #e5e5e5;
307
+ float: left;
308
+ padding: 0 20px;
309
+ }
310
+ .opinionstage-content-popup-contents .page-content {
311
+ padding: 30px;
312
+ }
313
+ .opinionstage-content-popup-contents .filter {
314
+ /* margin-right: 50px !important;*/
315
+ width: auto;
316
+ }
317
+ .opinionstage-content-popup-contents .filter .dropdown .dropbtn {
318
+ margin-right: 50px !important;
319
+ }
320
+ .opinionstage-content-popup-contents .filter #dropbtn {
321
+ font: 12px/38px Open Sans,Helvetica,sans-serif;
322
+ }
323
+ .opinionstage-content-popup-contents .filter button#dropbtn:after {
324
+ height: 38px;
325
+ }
326
+ .opinionstage-content-popup-contents .filter .gutenberg_dropdown:after {
327
+ height: 40px !important;
328
+ }
329
+ .opinionstage-content-popup-contents .btn-close {
330
+ border: none;
331
+ font: 24px/38px Open Sans,Helvetica,sans-serif;
332
+ opacity: 1;
333
+ }
334
+ .popup-header-item-create-btn {
335
+ background-color: #32adbc;
336
+ border-radius: 3px;
337
+ border-style: hidden;
338
+ color: #fff;
339
+ cursor: pointer;
340
+ display: inline-block;
341
+ font-size: 15px;
342
+ font-weight: 600;
343
+ line-height: normal;
344
+ margin-left: 20px;
345
+ padding: 10px 11px;
346
+ text-decoration: none;
347
+ }
348
+ .popup-header-item-create-btn:focus {
349
+ color: #fff;
350
+ }
351
+ .popup-header-item-create-btn:hover {
352
+ color: #fff;
353
+ opacity: 0.9;
354
+ text-decoration: none;
355
+ }
356
+ .popup-header-item-create-btn:before {
357
+ bottom: 0;
358
+ content: "+";
359
+ font-family: os-icon-font;
360
+ font-size: 17px;
361
+ font-weight: bold;
362
+ height: 18px;
363
+ margin-right: 8px;
364
+ pointer-events: none;
365
+ top: 0;
366
+ }
367
+ .opinionstage-content-popup-contents .content__label {
368
+ bottom: auto;
369
+ font-size: 12px;
370
+ padding: 1px 5px;
371
+ top: 0;
372
+ }
373
+ .popup-header-title {
374
+ float: left;
375
+ font-size: 30px;
376
+ font-weight: normal;
377
+ line-height: normal;
378
+ }
379
+ .opinionstage-content-popup-contents .content__itm {
380
+ border-bottom: 1px solid #e5e5e5;
381
+ display: block;
382
+ padding-bottom: 6px;
383
+ padding-top: 10px;
384
+ margin: 0;
385
+ width: 100%;
386
+ }
387
+ .opinionstage-content-popup-contents .content__itm:first-child {
388
+ border-top: 1px solid #e5e5e5;
389
+ }
390
+ .opinionstage-content-popup-contents .content__image {
391
+ display: inline-block;
392
+ height: 90px;
393
+ width: 15%;
394
+ }
395
+ /*.opinionstage-content-popup-contents .content__image img {
396
+ height: 90px;
397
+ width: 120px;
398
+ }*/
399
+ .opinionstage-content-popup-contents .content__info {
400
+ background: transparent;
401
+ display: inline-block;
402
+ font-size: 16px;
403
+ line-height: normal;
404
+ padding: 0 10px;
405
+ width: 50%;
406
+ overflow: hidden;
407
+ text-overflow: ellipsis;
408
+ white-space: nowrap;
409
+ }
410
+ .opinionstage-content-popup-contents .content__itm:hover .content__links {
411
+ display: inline-block;
412
+ }
413
+ .opinionstage-content-popup-contents .content__links {
414
+ background: none;
415
+ display: inline-block;
416
+ float: right;
417
+ opacity: 1;
418
+ padding: 20px 10px;
419
+ position: relative;
420
+ text-align: right;
421
+ width: 30%;
422
+ z-index: unset;
423
+ }
424
+ .opinionstage-content-popup-contents .popup-content-btn {
425
+ border: 1px solid #32adbc;
426
+ border-radius: 2px;
427
+ color: #32adbc;
428
+ display: inline;
429
+ font-size: 15px;
430
+ font-weight: 600;
431
+ padding: 13px 14px;
432
+ text-align: center;
433
+ text-decoration: none;
434
+ width: auto;
435
+ }
436
+ .popup-action.popup-content-btn {
437
+ margin-left: 10px;
438
+ padding: 12px 25px;
439
+ position: relative;
440
+ }
441
+ /*.popup-action {
442
+ position: relative;
443
+ }*/
444
+ .popup-action:before {
445
+ color: #32adbc;
446
+ content: "";
447
+ display: block;
448
+ font-family: os-icon-font;
449
+ font-size: 12px;
450
+ font-weight: 600;
451
+ padding: 0;
452
+ position: absolute;
453
+ right: 18px;
454
+ top: 12px;
455
+ z-index: 3;
456
+ }
457
+ .popup-action-dropdown {
458
+ background: #fff;
459
+ border: 1px solid #32adbc;
460
+ border-radius: 3px;
461
+ }
462
+ .popup-action-dropdown .content__links-itm {
463
+ border: none;
464
+ border-bottom: 1px solid #32adbc;
465
+ border-radius: 0;
466
+ color: #32adbc;
467
+ font-size: 14px;
468
+ font-weight: normal;
469
+ margin: 0;
470
+ padding: 10px 10px;
471
+ width: auto;
472
+ text-align: left !important;
473
+ letter-spacing: 1px;
474
+ }
475
+ .popup-action-dropdown .content__links-itm:last-child {
476
+ border: none;
477
+ }
478
+ .popup-action-dropdown.dropdown-content {
479
+ left: auto;
480
+ right: 0;
481
+ top: 18px;
482
+ z-index: 10;
483
+ }
484
+ .dropdown:hover .popup-action-dropdown.dropdown-content {
485
+ width: 130px;
486
+ }
487
+ .components-button.is-default.is-block.is-primary {
488
+ background: #32adbc;
489
+ border-color: #32adbc;
490
+ box-shadow: none;
491
+ font-size: 14px;
492
+ font-weight: 600;
493
+ height: auto;
494
+ line-height: normal;
495
+ max-width: 276px;
496
+ padding: 10px 0;
497
+ text-shadow: none;
498
+ text-transform: uppercase;
499
+ }
500
+ input.components-button.is-button.is-default.is-block.is-primary {
501
+ margin-bottom: 9px;
502
+ }
503
+ .components-placeholder .components-heading {
504
+ font-size: 18px;
505
+ font-weight: normal;
506
+ line-height: 1.11;
507
+ margin-bottom: 20px;
508
+ width: 400px;
509
+ }
510
+ .components-placeholder {
511
+ padding: 35px;
512
+ }
513
+ .components-preview__block {
514
+ margin-top: 10px;
515
+ }
516
+ .top-arrow-box {
517
+ position: relative;
518
+ /*padding-top: 7px;*/
519
+ }
520
+ .top-arrow-box .top-arrow {
521
+ background: #ffffff;
522
+ position: absolute;
523
+ right: 16px;
524
+ width: 10px;
525
+ top: 1px;
526
+ }
527
+
528
+ .content-item-menu {
529
+ display: none;
530
+ position: absolute;
531
+ right: 0;
532
+ z-index: 100;
533
+ }
534
+ .top-arrow-box .top-arrow:before {
535
+ background-color: #fff;
536
+ color: #32adbc;
537
+ content: "";
538
+ display: block;
539
+ font-family: os-icon-font;
540
+ font-size: 12px;
541
+ line-height: normal;
542
+ margin-left: -4px;
543
+ position: absolute;
544
+ top: 8px;
545
+ transform: rotate(180deg);
546
+ z-index: 99;
547
+ }
548
+
549
+ .opinionstage-content-popup-contents .content__links-itm:hover .top-arrow-box .top-arrow:before{
550
+ background-color: #32adbc;
551
+ }
552
+ a.content__links-itm:hover {
553
+ background-color: #32adbc !important;
554
+ color: #fff;
555
+ }
556
+ .dropdown:hover .popup-action.popup-content-btn {
557
+ background-color: #32adbc;
558
+ }
559
+ .dropdown:hover .popup-action.popup-content-btn:before {
560
+ color: #fff;
561
+ }
562
+
563
+ @media only screen and (max-width: 875px) {
564
+ .opinionstage-content-popup .tingle-modal-box {
565
+ min-width: 100%;
566
+ overflow: hidden;
567
+ width: 100%;
568
+ }
569
+ }
570
+
571
+ @media only screen and (max-width: 767px) {
572
+ .opinionstage-content-popup-contents .content__links {
573
+ padding-left: 0;
574
+ padding-right: 0;
575
+ }
576
+ }
577
+
578
  </style>
579
  <?php }
580
  ?>
admin/css/menu-page.css CHANGED
@@ -1,73 +1,83 @@
1
  #opinionstage-content {
2
- margin: 0;
3
  height: auto;
 
4
  min-height: 100%;
 
 
5
  width: 100%;
6
  -webkit-font-smoothing: antialiased;
7
- padding-top: 20px;
8
- overflow: hidden;
9
- }
10
- #opinionstage-content a {
11
- color: #3499c2;
12
  }
 
 
 
13
  #opinionstage-content .opinionstage-header-wrapper {
14
  background: #232121;
 
15
  overflow: hidden;
 
16
  }
17
  #opinionstage-content .opinionstage-logo-wrapper {
18
  padding: 10px 30px;
19
  }
20
  #opinionstage-content .opinionstage-logo {
21
- background: url("../images/purple-logo.png") no-repeat 0px 0px;
22
- width: 150px;
23
- height: 30px;
24
  background-size: contain;
 
 
 
25
  }
26
  #opinionstage-content .opinionstage-status-content {
27
  background-color: #fff;
28
- height: 115px;
29
- padding: 30px 30px 0;
30
  color: #000;
 
 
31
  }
32
  #opinionstage-content .opinionstage-status-content-connected {
33
- background: url(../images/top-bg.png) no-repeat 0px 0px;
 
34
  height: 115px;
35
  padding: 30px 30px 0;
36
- color: #fff;
37
  }
38
  #opinionstage-content .opinionstage-connect-form{
39
  display: inline-block;
40
  }
41
  #opinionstage-content .opinionstage-connect-btn{
 
 
42
  position: relative;
43
- top: -2px;
44
  }
45
  #opinionstage-content .opinionstage-status-title {
46
- font-size: 23px;
47
- margin-bottom: 20px;
48
- font-weight: lighter;
49
  line-height: 25px;
 
 
 
 
50
  }
51
  #opinionstage-content .opinionstage-status-content .os-icon-plugin {
52
  font-size: 19px;
53
  margin-right: 7px;
54
  }
55
  #opinionstage-content #os-switch-email {
56
- padding: 11px 0;
57
  font-size: 14px;
 
58
  }
59
  #opinionstage-content .opinionstage-blue-btn {
60
- text-align: center;
 
 
61
  color: #ffffff;
62
- text-decoration: none;
63
  display: inline-block;
64
- padding: 11px 10px;
65
- font-weight: normal;
66
- background-color: #3499c2;
 
 
 
67
  -webkit-border-radius: 3px;
68
  -moz-border-radius: 3px;
69
- border-radius: 3px;
70
- border-style: hidden;
71
  }
72
  #opinionstage-content .opinionstage-blue-btn:hover {
73
  opacity: 0.9;
@@ -76,23 +86,23 @@
76
  width: 100px;
77
  }
78
  #opinionstage-content a.opinionstage-blue-bordered-btn {
79
- text-align: center;
80
- text-decoration: none;
81
- -webkit-border-radius: 3px;
82
- -moz-border-radius: 3px;
83
- border-radius: 3px;
84
  display: block;
85
- color: #3499c2;
86
- border: 1px solid #3499c2;
87
  padding: 10px 5px;
 
 
 
 
88
  }
89
  #opinionstage-content .opinionstage-dashboard-right a.opinionstage-blue-bordered-btn {
90
  float: left;
91
  margin-right: 5px;
92
  }
93
  #opinionstage-content a.opinionstage-blue-bordered-btn:hover, .opinionstage-sidebar-widget a.opinionstage-blue-bordered-btn:hover {
 
94
  color: white;
95
- background-color: #3499c2;
96
  cursor: pointer;
97
  }
98
  #opinionstage-content a.opinionstage-blue-bordered-btn.disabled {
@@ -100,53 +110,60 @@
100
  border: 1px solid #cacac8;
101
  }
102
  #opinionstage-content a.opinionstage-blue-bordered-btn.disabled:hover {
103
- color: #cacac8;
104
  background-color: #f9f9f9;
 
105
  cursor: default;
106
  }
107
  #opinionstage-content input#os-email {
108
- margin: 0 15px 0 0;
109
- border: none;
110
- font-size: 20px;
111
- font-weight: lighter;
112
- padding: 3px 10px;
113
- min-width: 247px;
114
- border: 2px solid #8a8a8a;
115
  }
116
  #opinionstage-content input#os-email:disabled {
117
- color: white;
118
  background-color: black;
119
- padding: 3px 10px;
120
  opacity: 0.7;
 
121
  }
122
  #opinionstage-content .opinionstage-dashboard {
123
- padding: 30px;
 
 
124
  overflow: hidden;
125
- max-width: 1060px;
126
  }
127
  #opinionstage-content .opinionstage-dashboard-left , #opinionstage-content .opinionstage-dashboard-right {
128
  float: left;
129
- width: 750px;
130
  }
131
  #opinionstage-content .opinionstage-dashboard-left {
132
- margin-right: 40px;
 
133
  }
134
  #opinionstage-content .opinionstage-dashboard-section {
135
  margin-bottom: 30px;
136
  }
137
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-header {
138
- overflow: hidden;
139
  height: 58px;
 
 
140
  }
141
- #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-header .opinionstage-section-title {
142
- font-size: 25px;
143
- float: left;
144
- padding: 10px 0;
145
  }
146
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-header a {
147
- float: right;
148
- margin-right: 0;
149
- padding: 10px 25px;
 
 
 
 
 
150
  }
151
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-content {
152
  display: table;
@@ -154,24 +171,24 @@
154
  width: 100%;
155
  }
156
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-video-container {
157
- margin: 10px;
158
  height: 0;
159
- position: relative;
160
  padding-bottom: 56.25%;
 
161
  }
162
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-video-itm {
 
 
163
  position: absolute;
164
  top: 0;
165
- left: 0;
166
  width: 100%;
167
- height: 100%;
168
  }
169
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-content .opinionstage-section-sub-title {
 
170
  display: table-caption;
171
  font-size: 18px;
172
- color: #3499c2;
173
  font-weight: bold;
174
- margin-bottom: 30px;
175
  }
176
  #opinionstage-content a.opinionstage-help-link {
177
  font-size: 18px;
@@ -181,53 +198,55 @@
181
  border: 1px solid #c8c8c9;
182
  }
183
  #opinionstage-content .opinionstage-help-row {
184
- padding: 25px 0 25px 10px;
185
- margin: 0 10px;
186
  border-bottom: 1px solid #c8c8c9;
 
 
187
  }
188
  #opinionstage-content .opinionstage-help-row:last-child {
189
  border-bottom: none;
190
  }
191
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-content-wrapper {
192
- display: block;
193
- padding: 0 10px;
194
  border: 1px solid #c8c8c9;
195
  box-sizing: border-box;
 
 
196
  }
197
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-content .opinionstage-section-raw {
198
- display: table-row;
199
- border: 1px solid #c8c8c9;
200
  }
201
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-content-wrapper .opinionstage-section-content .opinionstage-section-raw {
202
- border: none;
203
  border-bottom: 1px solid #c8c8c9;
 
 
204
  }
205
- #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-content-wrapper .opinionstage-section-content .opinionstage-section-raw:last-child {
206
  border-bottom: none;
207
- }
208
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-content .opinionstage-section-raw .opinionstage-section-cell {
209
  display: table-cell;
 
210
  vertical-align: middle;
211
- padding: 15px 0px;
212
  }
213
- #opinionstage-section-create .opinionstage-section-content, #opinionstage-section-placements .opinionstage-section-content {
214
  height: 435px;
215
  }
216
  #opinionstage-section-create .opinionstage-section-cell.opinionstage-icon-cell {
217
- width: 10%;
218
- text-align: center;
219
  color: #3499c2;
220
  font-size: 35px;
 
 
221
  }
222
  #opinionstage-section-create .opinionstage-section-cell.opinionstage-description-cell {
223
- width: 45%;
224
  }
225
  #opinionstage-section-create .opinionstage-section-cell.opinionstage-btn-cell {
226
- width: 35%;
227
  }
228
  #opinionstage-section-create .opinionstage-section-cell.opinionstage-description-cell .title, #opinionstage-section-placements .opinionstage-section-cell.opinionstage-description-cell .title {
229
- font-size: 21px;
230
- font-weight: bold;
231
  margin-bottom: 5px;
232
  }
233
  #opinionstage-section-placements.opinionstage-disabled-section .opinionstage-section-cell.opinionstage-description-cell .title {
@@ -235,26 +254,42 @@
235
  }
236
  #opinionstage-section-create .opinionstage-section-cell.opinionstage-description-cell .example, #opinionstage-section-placements .opinionstage-section-cell.opinionstage-description-cell .example {
237
  color: #b1b1b1;
 
 
 
 
 
238
  }
239
  #opinionstage-section-placements .opinionstage-section-raw {
240
  padding: 5px;
241
  }
242
  #opinionstage-section-placements .opinionstage-section-cell.opinionstage-toggle-cell {
243
- width: 15%;
244
  }
245
  #opinionstage-section-placements .opinionstage-section-cell.opinionstage-description-cell {
246
- width: 46%;
247
  }
248
  #opinionstage-section-placements .opinionstage-section-cell.opinionstage-btns-cell {
249
- width: 39%;
 
 
 
 
 
 
 
 
 
250
  }
251
  #opinionstage-section-placements .opinionstage-section-cell.opinionstage-btns-cell .opinionstage-edit-content {
252
- width: 105px;
 
 
253
  }
254
  #opinionstage-section-placements .opinionstage-section-cell.opinionstage-btns-cell .opinionstage-edit-settings {
255
- width: 29px;
256
- height: 18px;
257
  font-size: 19px;
 
 
258
  }
259
  #opinionstage-section-help .opinionstage-section-content {
260
  height: 307px;
@@ -265,12 +300,12 @@
265
  text-decoration: none;
266
  }
267
  #opinionstage-content .opinionstage-onoffswitch {
 
268
  position: relative;
269
  width: 50px;
270
  -webkit-user-select:none;
271
  -moz-user-select:none;
272
  -ms-user-select: none;
273
- display: inline-block;
274
  }
275
  #opinionstage-content .opinionstage-onoffswitch.disabled {
276
  opacity: 0.4;
@@ -279,17 +314,17 @@
279
  display: none;
280
  }
281
  #opinionstage-content .opinionstage-onoffswitch-label {
 
 
282
  display: block;
283
  overflow: hidden;
284
- cursor: pointer;
285
- border-radius: 15px;
286
  }
287
  #opinionstage-content .opinionstage-onoffswitch.disabled .opinionstage-onoffswitch-label:hover {
288
  cursor: default;
289
  }
290
  #opinionstage-content .opinionstage-onoffswitch-inner {
291
- width: 200%;
292
  margin-left: -100%;
 
293
  }
294
  #opinionstage-content .opinionstage-onoffswitch-inner:before, .opinionstage-onoffswitch-inner:after {
295
  float: left;
@@ -304,17 +339,17 @@
304
  -moz-box-sizing: border-box;
305
  -webkit-box-sizing: border-box;
306
  box-sizing: border-box;
307
- text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.63);
308
  }
309
  #opinionstage-content .opinionstage-onoffswitch-inner:before {
 
310
  content: '';
311
  padding-left: 15px;
312
- background-color: #3499c2;
313
  }
314
  #opinionstage-content .opinionstage-onoffswitch-inner:after {
 
315
  content: '';
316
  padding-left: 18px;
317
- background-color: #c8c8c9;
318
  text-align: center;
319
  }
320
  #opinionstage-content .opinionstage-onoffswitch.disabled .opinionstage-onoffswitch-inner:after {
@@ -322,7 +357,7 @@
322
  }
323
  #opinionstage-content .opinionstage-onoffswitch-switch {
324
  width: 22px;
325
- margin: 0px;
326
  background: #ffffff;
327
  border-radius: 50%;
328
  position: absolute;
@@ -344,73 +379,75 @@
344
  /* Getting started */
345
  .gettingStartedSection {
346
  background: #fff;
347
- width: 100%;
348
- max-width: 100%;
349
- padding: 30px;
 
350
  overflow: hidden;
 
351
  }
352
  .gettingStartedSection p {
353
  font-size: 20px;
354
- margin: 0px;
355
  margin-bottom: 20px;
356
  }
357
  .gettingStartedSection .Video-Section {
358
  display: block;
359
- width: 100%;
360
- max-width: 650px;
361
  float: left;
 
 
362
  }
363
  .Video-Section .iframe-new {
364
  display: block;
365
- width: 100%;
366
  max-width: 600px;
 
367
  }
368
  h1.gettingStartedHeading {
369
- letter-spacing: 1px;
370
- width: 100%;
371
- max-width: fit-content;
372
- margin: 0px auto;
373
  font-size: 30px;
 
374
  line-height: 35px;
 
 
 
375
  }
376
  h1.gettingStartedHeading_logo {
377
- letter-spacing: 1px;
378
  font-size: 30px;
 
379
  line-height: 35px;
380
- margin: 0px;
381
  }
382
  #opinionstage-content a.gettingStartedCreate.button {
383
- color: #ffffff;
384
  background: #3499c2;
385
- box-shadow: 0px 0px 0px 0px;
386
- padding: 11px 10px;
387
  display: block;
388
- height: auto;
389
- width: 100%;
390
- max-width: fit-content;
391
  font-size: 20px;
392
- margin-top: 20px;
393
  letter-spacing: 1px;
 
 
 
 
394
  }
395
  /* Getting Started Not Connected */
396
  .gettingStartedSectionNotConnect {
397
  background: #fff;
398
- width: 100%;
399
  max-width: 100%;
400
- padding: 5px 0px 40px 40px;
 
401
  }
402
  .gettingStartedSectionNotConnect p {
403
  font-size: 20px;
404
  }
405
  .text-section-getting-stared-os {
406
- width: 100%;
407
- max-width: 400px;
408
  float: left;
 
 
409
  }
410
  @media only screen and (max-width: 1230px) {
411
  .text-section-getting-stared-os {
412
- margin-top: 39px;
413
  padding-left: 25px;
 
414
  }
415
  }
416
  @media only screen and (max-width: 375px) {
@@ -429,37 +466,49 @@ h1.gettingStartedHeading_logo {
429
  text-align: center;
430
  }
431
  #opinionstage-content .opinionstage-blue-btn {
432
- margin-top: 15px;
433
  margin-left: 30px;
 
434
  }
435
  #opinionstage-content a.gettingStartedCreate.button {
436
- margin: 20px auto 0px !important;
437
  }
438
  .text-section-getting-stared-os p{
439
  text-align: left;
440
  }
441
  }
442
  #opinionstage-content .opinionstage-create-btn.template {
443
- padding: 11px 25px !important;
 
 
 
444
  width: auto !important;
445
  }
 
 
 
 
 
 
 
 
446
  /* My Items Page Css */
447
  td.long {
448
- width: 340px;
449
  padding-left: 10px;
 
450
  }
451
  td.long div{
452
  width: 90%;
453
  }
454
  td.action a.opinionstage-blue-bordered-btn{
455
- margin-right: 15px;
 
456
  }
457
  td.long table{
458
- width: 100%;
459
- color: #b1b1b1;
460
- position: absolute;
461
  bottom: 0;
 
462
  line-height: normal;
 
 
463
  }
464
  td.long table td {
465
  max-width: 300px;
@@ -473,9 +522,9 @@ span.os-icon-plugin.icon-os-common-date {
473
  }
474
  .content-item-label {
475
  background-color: #222120;
476
- padding: 2px 4px;
477
- font-size: 10px;
478
  color: #fff;
 
 
479
  }
480
 
481
  a.opinionstage-blue-bordered-btn {
@@ -483,89 +532,92 @@ a.opinionstage-blue-bordered-btn {
483
  margin-right: 5px;
484
  }
485
  a.opinionstage-blue-bordered-btn {
486
- text-align: center;
487
- text-decoration: none;
488
- -webkit-border-radius: 3px;
489
  -moz-border-radius: 3px;
 
 
490
  border-radius: 3px;
491
- display: block;
492
  color: #3aaebd;
493
- border: 1px solid #3aaebd;
 
494
  padding: 10px 30px;
 
 
495
  text-transform: uppercase;
496
- font-size: 14px;
497
  }
498
  td.action {
499
- width: 380px;
500
- opacity: 0.7;
501
  }
502
  span.os-icon-plugin.icon-os-common-date {
503
  margin-right: 4px;
504
  }
505
  td.long a {
506
- color: #000;
507
- text-decoration: none;
508
- font-size: 17px;
509
- font-weight: normal;
510
  display: block;
 
 
 
 
 
 
 
 
511
  text-overflow: ellipsis;
512
  word-wrap: break-word;
513
- overflow: hidden;
514
- max-height: 3.6em;
515
- line-height: 1.6em;
516
  }
517
  .content-item-image.quiz {
 
518
  position: relative;
519
  width: 120px;
520
- height: 90px;
521
  }
522
  .content-item-image.quiz img {
 
 
 
523
  opacity: 0.8;
524
  position: absolute;
525
- display: block;
526
- bottom: 0;
527
  right: 0;
528
  width: 120px;
529
- height: 90px;
530
  }
531
  .content-item-label {
532
- text-transform: uppercase;
 
 
 
 
533
  position: absolute;
 
534
  top: 0;
535
- left: 0;
536
- color: white;
537
- background-color: #222120;
538
- padding: 0px 4px;
539
- font-size: 10px;
540
  }
541
  tr.settingBorderOs {
542
  border-top: 1px #e5e5e5 solid;
543
  display: table-cell;
544
- padding: 8px 0px;
545
  }
546
  .opinionstage-section-header {
547
  font-size: 23px;
548
- margin-left: 20px;
549
- margin-top: 20px;
550
- overflow: hidden;
551
  height: 40px;
 
552
  }
553
  div#container .opinionstage-section-header {
554
  width: 100%;
555
- max-width: 890px;
556
  }
557
  .opinionstage-section-title {
558
- font-size: 25px;
559
  float: left;
 
560
  padding: 10px 0;
561
  }
562
  .opinionstage-section-header a {
 
563
  float: right;
564
- margin-right: 0;
565
- color: #3499c2;
566
  font-weight: 600;
567
- font-size: 15px;
568
  margin: 10px 25px;
 
 
569
  }
570
 
571
  /* Load More */
@@ -585,7 +637,7 @@ div#loadMore {
585
  cursor: pointer;
586
  font-size: 14px;
587
  line-height: 38px;
588
- text-transform: uppercase;
589
  border: 1px solid #dededd;
590
  border-radius: 3px;
591
  padding: 0 10px;
@@ -602,7 +654,7 @@ div#loadMore {
602
  background-color: transparent;
603
  border-color: #38aebd;
604
  width: 100%;
605
- max-width: 870px;
606
  margin-bottom: 20px;
607
  margin-left: 20px;
608
  }
@@ -611,5 +663,292 @@ div#loadMore:hover {
611
  opacity: 0.8;
612
  }
613
  td.image {
614
- width: 15%;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
615
  }
1
  #opinionstage-content {
 
2
  height: auto;
3
+ margin: 0;
4
  min-height: 100%;
5
+ overflow: hidden;
6
+ padding-top: 20px;
7
  width: 100%;
8
  -webkit-font-smoothing: antialiased;
 
 
 
 
 
9
  }
10
+ /*#opinionstage-content a {
11
+ color: #32adbc;
12
+ }*/
13
  #opinionstage-content .opinionstage-header-wrapper {
14
  background: #232121;
15
+ margin-right: 20px;
16
  overflow: hidden;
17
+ position: relative;
18
  }
19
  #opinionstage-content .opinionstage-logo-wrapper {
20
  padding: 10px 30px;
21
  }
22
  #opinionstage-content .opinionstage-logo {
23
+ background: url("../images/os-logo-header.png") no-repeat 0 0;
 
 
24
  background-size: contain;
25
+ display: inline-block;
26
+ height: 30px;
27
+ width: 150px;
28
  }
29
  #opinionstage-content .opinionstage-status-content {
30
  background-color: #fff;
31
+ border-bottom: 3px solid #32adbc;
 
32
  color: #000;
33
+ height: 109px;
34
+ padding: 20px 35px 0;
35
  }
36
  #opinionstage-content .opinionstage-status-content-connected {
37
+ /*background: url(../images/top-bg.png) no-repeat 0px 0px;*/
38
+ color: #fff;
39
  height: 115px;
40
  padding: 30px 30px 0;
 
41
  }
42
  #opinionstage-content .opinionstage-connect-form{
43
  display: inline-block;
44
  }
45
  #opinionstage-content .opinionstage-connect-btn{
46
+ padding-bottom: 10px !important;
47
+ padding-top: 10px !important;
48
  position: relative;
 
49
  }
50
  #opinionstage-content .opinionstage-status-title {
51
+ font-size: 24px;
52
+ font-weight: bold;
 
53
  line-height: 25px;
54
+ margin-bottom: 14px;
55
+ }
56
+ #opinionstage-content .opinionstage-status-title .opinionstage-title {
57
+ font-size: 20px;
58
  }
59
  #opinionstage-content .opinionstage-status-content .os-icon-plugin {
60
  font-size: 19px;
61
  margin-right: 7px;
62
  }
63
  #opinionstage-content #os-switch-email {
 
64
  font-size: 14px;
65
+ padding: 11px 0;
66
  }
67
  #opinionstage-content .opinionstage-blue-btn {
68
+ background-color: #32adbc;
69
+ border-radius: 3px;
70
+ border-style: hidden;
71
  color: #ffffff;
 
72
  display: inline-block;
73
+ font-size: 15px;
74
+ font-weight: 600;
75
+ min-width: 100px;
76
+ padding: 9px 10px;
77
+ text-decoration: none;
78
+ text-align: center;
79
  -webkit-border-radius: 3px;
80
  -moz-border-radius: 3px;
 
 
81
  }
82
  #opinionstage-content .opinionstage-blue-btn:hover {
83
  opacity: 0.9;
86
  width: 100px;
87
  }
88
  #opinionstage-content a.opinionstage-blue-bordered-btn {
89
+ border: 1px solid #32adbc;
90
+ border-radius: 2px;
91
+ color: #32adbc;
 
 
92
  display: block;
 
 
93
  padding: 10px 5px;
94
+ text-align: center;
95
+ text-decoration: none;
96
+ -moz-border-radius: 2px;
97
+ -webkit-border-radius: 2px;
98
  }
99
  #opinionstage-content .opinionstage-dashboard-right a.opinionstage-blue-bordered-btn {
100
  float: left;
101
  margin-right: 5px;
102
  }
103
  #opinionstage-content a.opinionstage-blue-bordered-btn:hover, .opinionstage-sidebar-widget a.opinionstage-blue-bordered-btn:hover {
104
+ background-color: #32adbc;
105
  color: white;
 
106
  cursor: pointer;
107
  }
108
  #opinionstage-content a.opinionstage-blue-bordered-btn.disabled {
110
  border: 1px solid #cacac8;
111
  }
112
  #opinionstage-content a.opinionstage-blue-bordered-btn.disabled:hover {
 
113
  background-color: #f9f9f9;
114
+ color: #cacac8;
115
  cursor: default;
116
  }
117
  #opinionstage-content input#os-email {
118
+ border: 1px solid #cfcfcf;
119
+ border-radius: 2px;
120
+ font-size: 14px;
121
+ margin: 0 10px 0 0;
122
+ min-width: 300px;
123
+ padding: 10px 12px 9px;
 
124
  }
125
  #opinionstage-content input#os-email:disabled {
 
126
  background-color: black;
127
+ color: white;
128
  opacity: 0.7;
129
+ padding: 3px 10px;
130
  }
131
  #opinionstage-content .opinionstage-dashboard {
132
+ background-color: #fff;
133
+ /* height: 100vw;*/
134
+ margin-right: 20px;
135
  overflow: hidden;
 
136
  }
137
  #opinionstage-content .opinionstage-dashboard-left , #opinionstage-content .opinionstage-dashboard-right {
138
  float: left;
139
+ width: 1000px;
140
  }
141
  #opinionstage-content .opinionstage-dashboard-left {
142
+ /*margin-right: 40px;*/
143
+ margin: 30px;
144
  }
145
  #opinionstage-content .opinionstage-dashboard-section {
146
  margin-bottom: 30px;
147
  }
148
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-header {
 
149
  height: 58px;
150
+ margin-top: 10px;
151
+ overflow: hidden;
152
  }
153
+ #opinionstage-content .opinionstage-dashboard-left .opinionstage-section-header .opinionstage-section-title {
154
+ float: left;
155
+ font-size: 30px;
156
+ padding: 0;
157
  }
158
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-header a {
159
+ float: left;
160
+ margin: 0;
161
+ padding: 10px;
162
+ /*margin-right: 0;
163
+ padding: 10px 25px;*/
164
+ }
165
+ #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-header a:focus {
166
+ box-shadow: none;
167
  }
168
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-content {
169
  display: table;
171
  width: 100%;
172
  }
173
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-video-container {
 
174
  height: 0;
175
+ margin: 10px;
176
  padding-bottom: 56.25%;
177
+ position: relative;
178
  }
179
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-video-itm {
180
+ height: 100%;
181
+ left: 0;
182
  position: absolute;
183
  top: 0;
 
184
  width: 100%;
 
185
  }
186
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-content .opinionstage-section-sub-title {
187
+ color: #3499c2;
188
  display: table-caption;
189
  font-size: 18px;
 
190
  font-weight: bold;
191
+ margin-bottom: 30px;
192
  }
193
  #opinionstage-content a.opinionstage-help-link {
194
  font-size: 18px;
198
  border: 1px solid #c8c8c9;
199
  }
200
  #opinionstage-content .opinionstage-help-row {
 
 
201
  border-bottom: 1px solid #c8c8c9;
202
+ margin: 0 10px;
203
+ padding: 25px 0 25px 10px;
204
  }
205
  #opinionstage-content .opinionstage-help-row:last-child {
206
  border-bottom: none;
207
  }
208
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-content-wrapper {
 
 
209
  border: 1px solid #c8c8c9;
210
  box-sizing: border-box;
211
+ display: block;
212
+ padding: 0 10px;
213
  }
214
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-content .opinionstage-section-raw {
215
+ border: 1px solid #c8c8c9;
216
+ display: table-row;
217
  }
218
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-content-wrapper .opinionstage-section-content .opinionstage-section-raw {
219
+ /*border: none;*/
220
  border-bottom: 1px solid #c8c8c9;
221
+ border-left: none;
222
+ border-right: none;
223
  }
224
+ /*#opinionstage-content .opinionstage-dashboard-section .opinionstage-section-content-wrapper .opinionstage-section-content .opinionstage-section-raw:last-child {
225
  border-bottom: none;
226
+ }*/
227
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-content .opinionstage-section-raw .opinionstage-section-cell {
228
  display: table-cell;
229
+ padding: 20px 0;
230
  vertical-align: middle;
 
231
  }
232
+ #opinionstage-section-create .opinionstage-section-content {
233
  height: 435px;
234
  }
235
  #opinionstage-section-create .opinionstage-section-cell.opinionstage-icon-cell {
 
 
236
  color: #3499c2;
237
  font-size: 35px;
238
+ text-align: center;
239
+ width: 7%;
240
  }
241
  #opinionstage-section-create .opinionstage-section-cell.opinionstage-description-cell {
242
+ width: 50%;
243
  }
244
  #opinionstage-section-create .opinionstage-section-cell.opinionstage-btn-cell {
245
+ width: 24%;
246
  }
247
  #opinionstage-section-create .opinionstage-section-cell.opinionstage-description-cell .title, #opinionstage-section-placements .opinionstage-section-cell.opinionstage-description-cell .title {
248
+ font-size: 22px;
249
+ font-weight: 600;
250
  margin-bottom: 5px;
251
  }
252
  #opinionstage-section-placements.opinionstage-disabled-section .opinionstage-section-cell.opinionstage-description-cell .title {
254
  }
255
  #opinionstage-section-create .opinionstage-section-cell.opinionstage-description-cell .example, #opinionstage-section-placements .opinionstage-section-cell.opinionstage-description-cell .example {
256
  color: #b1b1b1;
257
+ font-size: 14px;
258
+ line-height: normal;
259
+ }
260
+ .opinionstage-placement-dashboard .opinionstage-section-content .opinionstage-description-cell .os-long-text a, .opinionstage-placement-dashboard .opinionstage-section-content .opinionstage-description-cell .os-long-text a:hover {
261
+ color: #3aaebd;
262
  }
263
  #opinionstage-section-placements .opinionstage-section-raw {
264
  padding: 5px;
265
  }
266
  #opinionstage-section-placements .opinionstage-section-cell.opinionstage-toggle-cell {
267
+ width: 7%;
268
  }
269
  #opinionstage-section-placements .opinionstage-section-cell.opinionstage-description-cell {
270
+ width: 68%;
271
  }
272
  #opinionstage-section-placements .opinionstage-section-cell.opinionstage-btns-cell {
273
+ width: 20%;
274
+ }
275
+ #opinionstage-section-placements .opinionstage-btns-cell .opinionstage-edit-content {
276
+ padding: 13px 15px !important;
277
+ }
278
+ #opinionstage-section-placements .opinionstage-btns-cell .opinionstage-edit-settings {
279
+ padding: 9px 8px !important;
280
+ }
281
+ #opinionstage-section-placements .opinionstage-btns-cell .icon-os-common-settings:before {
282
+ font-size: 26px;
283
  }
284
  #opinionstage-section-placements .opinionstage-section-cell.opinionstage-btns-cell .opinionstage-edit-content {
285
+ margin-right: 10px;
286
+ width: 107px;
287
+ font-size: 15px;
288
  }
289
  #opinionstage-section-placements .opinionstage-section-cell.opinionstage-btns-cell .opinionstage-edit-settings {
 
 
290
  font-size: 19px;
291
+ /*height: 18px;*/
292
+ width: 29px;
293
  }
294
  #opinionstage-section-help .opinionstage-section-content {
295
  height: 307px;
300
  text-decoration: none;
301
  }
302
  #opinionstage-content .opinionstage-onoffswitch {
303
+ display: inline-block;
304
  position: relative;
305
  width: 50px;
306
  -webkit-user-select:none;
307
  -moz-user-select:none;
308
  -ms-user-select: none;
 
309
  }
310
  #opinionstage-content .opinionstage-onoffswitch.disabled {
311
  opacity: 0.4;
314
  display: none;
315
  }
316
  #opinionstage-content .opinionstage-onoffswitch-label {
317
+ border-radius: 15px;
318
+ cursor: pointer;
319
  display: block;
320
  overflow: hidden;
 
 
321
  }
322
  #opinionstage-content .opinionstage-onoffswitch.disabled .opinionstage-onoffswitch-label:hover {
323
  cursor: default;
324
  }
325
  #opinionstage-content .opinionstage-onoffswitch-inner {
 
326
  margin-left: -100%;
327
+ width: 200%;
328
  }
329
  #opinionstage-content .opinionstage-onoffswitch-inner:before, .opinionstage-onoffswitch-inner:after {
330
  float: left;
339
  -moz-box-sizing: border-box;
340
  -webkit-box-sizing: border-box;
341
  box-sizing: border-box;
342
+ text-shadow: 0 1px 1px rgba(255, 255, 255, 0.63);
343
  }
344
  #opinionstage-content .opinionstage-onoffswitch-inner:before {
345
+ background-color: #32adbc;
346
  content: '';
347
  padding-left: 15px;
 
348
  }
349
  #opinionstage-content .opinionstage-onoffswitch-inner:after {
350
+ background-color: #c8c8c9;
351
  content: '';
352
  padding-left: 18px;
 
353
  text-align: center;
354
  }
355
  #opinionstage-content .opinionstage-onoffswitch.disabled .opinionstage-onoffswitch-inner:after {
357
  }
358
  #opinionstage-content .opinionstage-onoffswitch-switch {
359
  width: 22px;
360
+ margin: 0;
361
  background: #ffffff;
362
  border-radius: 50%;
363
  position: absolute;
379
  /* Getting started */
380
  .gettingStartedSection {
381
  background: #fff;
382
+ height: 100vw;
383
+ /* width: 100%;
384
+ max-width: 100%;*/
385
+ margin-right: 20px;
386
  overflow: hidden;
387
+ padding: 30px;
388
  }
389
  .gettingStartedSection p {
390
  font-size: 20px;
391
+ margin: 0;
392
  margin-bottom: 20px;
393
  }
394
  .gettingStartedSection .Video-Section {
395
  display: block;
 
 
396
  float: left;
397
+ max-width: 650px;
398
+ width: 100%;
399
  }
400
  .Video-Section .iframe-new {
401
  display: block;
 
402
  max-width: 600px;
403
+ width: 100%;
404
  }
405
  h1.gettingStartedHeading {
 
 
 
 
406
  font-size: 30px;
407
+ letter-spacing: 1px;
408
  line-height: 35px;
409
+ margin: 0 auto;
410
+ max-width: fit-content;
411
+ width: 100%;
412
  }
413
  h1.gettingStartedHeading_logo {
 
414
  font-size: 30px;
415
+ letter-spacing: 1px;
416
  line-height: 35px;
417
+ margin: 0;
418
  }
419
  #opinionstage-content a.gettingStartedCreate.button {
 
420
  background: #3499c2;
421
+ box-shadow: 0 0 0 0;
422
+ color: #ffffff;
423
  display: block;
 
 
 
424
  font-size: 20px;
425
+ height: auto;
426
  letter-spacing: 1px;
427
+ margin-top: 20px;
428
+ max-width: fit-content;
429
+ padding: 11px 10px;
430
+ width: 100%;
431
  }
432
  /* Getting Started Not Connected */
433
  .gettingStartedSectionNotConnect {
434
  background: #fff;
 
435
  max-width: 100%;
436
+ padding: 5px 0 40px 40px;
437
+ width: 100%;
438
  }
439
  .gettingStartedSectionNotConnect p {
440
  font-size: 20px;
441
  }
442
  .text-section-getting-stared-os {
 
 
443
  float: left;
444
+ max-width: 400px;
445
+ width: 100%;
446
  }
447
  @media only screen and (max-width: 1230px) {
448
  .text-section-getting-stared-os {
 
449
  padding-left: 25px;
450
+ margin-top: 39px;
451
  }
452
  }
453
  @media only screen and (max-width: 375px) {
466
  text-align: center;
467
  }
468
  #opinionstage-content .opinionstage-blue-btn {
 
469
  margin-left: 30px;
470
+ margin-top: 15px;
471
  }
472
  #opinionstage-content a.gettingStartedCreate.button {
473
+ margin: 20px auto 0 !important;
474
  }
475
  .text-section-getting-stared-os p{
476
  text-align: left;
477
  }
478
  }
479
  #opinionstage-content .opinionstage-create-btn.template {
480
+ border: 1px solid #32adbc;
481
+ font-size: 15px;
482
+ font-weight: 600;
483
+ line-height: normal;
484
  width: auto !important;
485
  }
486
+ .opinionstage-dashboard-left .os_create_new_btn {
487
+ margin-right: 10px;
488
+ padding: 12px 10px !important;
489
+ }
490
+ .opinionstage-dashboard-left .os_use_template_btn {
491
+ margin: 0;
492
+ padding: 12px 15px !important;
493
+ }
494
  /* My Items Page Css */
495
  td.long {
 
496
  padding-left: 10px;
497
+ width: 55%;
498
  }
499
  td.long div{
500
  width: 90%;
501
  }
502
  td.action a.opinionstage-blue-bordered-btn{
503
+ font-size: 15px;
504
+ margin-right: 9px;
505
  }
506
  td.long table{
 
 
 
507
  bottom: 0;
508
+ color: #b1b1b1;
509
  line-height: normal;
510
+ position: absolute;
511
+ width: 100%;
512
  }
513
  td.long table td {
514
  max-width: 300px;
522
  }
523
  .content-item-label {
524
  background-color: #222120;
 
 
525
  color: #fff;
526
+ font-size: 12px;
527
+ padding: 2px 4px;
528
  }
529
 
530
  a.opinionstage-blue-bordered-btn {
532
  margin-right: 5px;
533
  }
534
  a.opinionstage-blue-bordered-btn {
 
 
 
535
  -moz-border-radius: 3px;
536
+ -webkit-border-radius: 3px;
537
+ border: 1px solid #3aaebd;
538
  border-radius: 3px;
 
539
  color: #3aaebd;
540
+ display: block;
541
+ font-size: 14px;
542
  padding: 10px 30px;
543
+ text-align: center;
544
+ text-decoration: none;
545
  text-transform: uppercase;
 
546
  }
547
  td.action {
548
+ width: 30%;
549
+ /*opacity: 0.7;*/
550
  }
551
  span.os-icon-plugin.icon-os-common-date {
552
  margin-right: 4px;
553
  }
554
  td.long a {
555
+ color: #212120;
 
 
 
556
  display: block;
557
+ font-size: 16px;
558
+ font-weight: normal;
559
+ line-height: normal;
560
+ max-height: 3.6em;
561
+ max-width: 100%;
562
+ overflow: hidden;
563
+ position: absolute;
564
+ text-decoration: none;
565
  text-overflow: ellipsis;
566
  word-wrap: break-word;
567
+ white-space: nowrap;
 
 
568
  }
569
  .content-item-image.quiz {
570
+ height: 90px;
571
  position: relative;
572
  width: 120px;
 
573
  }
574
  .content-item-image.quiz img {
575
+ bottom: 0;
576
+ display: block;
577
+ height: 90px;
578
  opacity: 0.8;
579
  position: absolute;
 
 
580
  right: 0;
581
  width: 120px;
 
582
  }
583
  .content-item-label {
584
+ background-color: #222120;
585
+ color: white;
586
+ font-size: 12px;
587
+ left: 0;
588
+ padding: 1px 5px;
589
  position: absolute;
590
+ text-transform: uppercase;
591
  top: 0;
 
 
 
 
 
592
  }
593
  tr.settingBorderOs {
594
  border-top: 1px #e5e5e5 solid;
595
  display: table-cell;
596
+ padding: 10px 0;
597
  }
598
  .opinionstage-section-header {
599
  font-size: 23px;
 
 
 
600
  height: 40px;
601
+ overflow: hidden;
602
  }
603
  div#container .opinionstage-section-header {
604
  width: 100%;
605
+ /*max-width: 890px;*/
606
  }
607
  .opinionstage-section-title {
 
608
  float: left;
609
+ font-size: 30px;
610
  padding: 10px 0;
611
  }
612
  .opinionstage-section-header a {
613
+ color: #32adbc;
614
  float: right;
615
+ font-size: 14px;
 
616
  font-weight: 600;
617
+ line-height: normal;
618
  margin: 10px 25px;
619
+ margin-right: 0;
620
+ text-decoration: none;
621
  }
622
 
623
  /* Load More */
637
  cursor: pointer;
638
  font-size: 14px;
639
  line-height: 38px;
640
+ /*text-transform: uppercase;*/
641
  border: 1px solid #dededd;
642
  border-radius: 3px;
643
  padding: 0 10px;
654
  background-color: transparent;
655
  border-color: #38aebd;
656
  width: 100%;
657
+ max-width: 1000px;
658
  margin-bottom: 20px;
659
  margin-left: 20px;
660
  }
663
  opacity: 0.8;
664
  }
665
  td.image {
666
+ width: 12%;
667
+ }
668
+ .opinionstage-connectivity-status {
669
+ color: #fff;
670
+ float: right;
671
+ font-size: 15px;
672
+ margin: 5px 0;
673
+ }
674
+ .opinionstage-disconnect {
675
+ background-color: transparent;
676
+ border: none;
677
+ color: #32adbc;
678
+ cursor: pointer;
679
+ }
680
+ .opinionstage-connect-form:focus, .opinionstage-disconnect:focus {
681
+ outline: 0 none;
682
+ }
683
+ .opinionstage-disconnect:focus {
684
+ border: none;
685
+ }
686
+ .opinionstage-title {
687
+ font-weight: bold;
688
+ }
689
+ #overlay {
690
+ background-color: #fdfdfdc7;
691
+ box-shadow: inset 0 5px 13px 0 #dad8d8;
692
+ display: block;
693
+ height: 100%;
694
+ filter: alpha(opacity=70);
695
+ -moz-opacity: 0.7;
696
+ -khtml-opacity: 0.7;
697
+ opacity: 0.7;
698
+ position: absolute;
699
+ width: calc(100% - 20px);
700
+ z-index: 100;
701
+ }
702
+
703
+ .opinionstage-item-view-dashboard {
704
+ margin: 30px;
705
+ float: left;
706
+ width: 1000px;
707
+ }
708
+ .opinionstage-header-inner-container {
709
+ float: right;
710
+ position: relative;
711
+ }
712
+ .opinionstage-header-inner-container .opinionstage-header-inner-section {
713
+ border-right: 1px solid #f3f3f3;
714
+ float: left;
715
+ padding-right: 20px;
716
+ position: relative;
717
+ }
718
+ #opinionstage-content #opinionstage-section-create .opinionstage-section-raw {
719
+ border-left: none;
720
+ border-right: none;
721
+ }
722
+ .opinionstage-header-inner-section a, .os-long-text a {
723
+ text-decoration: none;
724
+ }
725
+ .search-container {
726
+ background-color: transparent;
727
+ display: inline-block;
728
+ width: 150px;
729
+ }
730
+ .search.search-container:before {
731
+ right: 30px;
732
+ }
733
+ .opinionstage-section-header #itemList {
734
+ font-size: 12px;
735
+ font-weight: bold;
736
+ height: auto;
737
+ padding: 10px;
738
+ width: 100%;
739
+ }
740
+ .opinionstage-section-header #searchItem {
741
+ color: #797979;
742
+ height: auto;
743
+ padding: 10px;
744
+ width: 100%;
745
+ }
746
+ #opinionstage-content .opinionstage-item-view-dashboard .opinionstage-dashboard-section {
747
+ margin: 0;
748
+ }
749
+ .opinionstage-item-view-dashboard #check tbody:last-child tr.settingBorderOs {
750
+ border-bottom: 1px #e5e5e5 solid;
751
+ }
752
+ .opinionstage-item-view-dashboard #check tbody .action .opinionstage-edit-content:last-child {
753
+ margin-right: 0;
754
+ }
755
+ /*#opinionstage-content .opinionstage-item-title {
756
+ color: #32373c;
757
+ }*/
758
+ .opinionstage-item-action-container {
759
+ float: right;
760
+ }
761
+ .opinionstage-item-action-container .opinionstage-edit-content {
762
+ font-weight: bold;
763
+ padding: 13px 17px !important;
764
+ }
765
+ div#loadMore {
766
+ background-color: #f1f1f1;
767
+ border-color: #f1f1f1;
768
+ color: #444;
769
+ margin: 0;
770
+ }
771
+ .opinionstage-placement-dashboard {
772
+ float: left;
773
+ margin: 30px;
774
+ width: 1000px;
775
+ }
776
+ #opinionstage-section-placements .opinionstage-section-content-wrapper {
777
+ border: none !important;
778
+ }
779
+ #opinionstage-section-placements .opinionstage-section-content-wrapper {
780
+ padding: 0 !important;
781
+ }
782
+ .opinionstage-btns-cell .opinionstage-blue-bordered-btn {
783
+ font-weight: bold;
784
+ padding: 12px 15px !important;
785
+ }
786
+ .opinionstage-setting-title {
787
+ font-size: 18px;
788
+ font-weight: 600;
789
+ margin-bottom: 10px;
790
+ }
791
+ .os-setting-container {
792
+ border-bottom: 1px solid #c8c8c9;
793
+ border-top: 1px solid #c8c8c9;
794
+ margin-bottom: 20px;
795
+ padding: 25px 0;
796
+ }
797
+ .opinionstage-setting-content {
798
+ color: #444;
799
+ font-size: 14px;
800
+ }
801
+ #opinionstage-content .opinionstage-setting-content a {
802
+ color: #444;
803
+ text-decoration: none;
804
+ }
805
+ .gettingStartedContainer {
806
+ background: url(../images/bitmap_top.png) no-repeat 0 0;
807
+ background-color: #32adbc;
808
+ background-position: right;
809
+ height: 170px;
810
+ width: 760px;
811
+ }
812
+ .opinionstage-resources-title {
813
+ padding: 40px 0;
814
+ }
815
+ .gettingBlockContainer {
816
+ width: 760px;
817
+ }
818
+ .gettingTemplateGallery, .gettingTemplateSolution, .gettingTemplateTutorial {
819
+ border: 2px solid #32adbc;
820
+ color: #32adbc;
821
+ font-size: 15px;
822
+ font-weight: bold;
823
+ margin-top: 10px;
824
+ padding: 30px 0;
825
+ text-align: center;
826
+ text-decoration: none;
827
+ width: 32%;
828
+ }
829
+ .gettingTemplateGallery, .gettingTemplateSolution {
830
+ float: left;
831
+ margin-right: 9px;
832
+ }
833
+ .gettingTemplateTutorial {
834
+ float: right;
835
+ }
836
+ .gettingTemplateGallery:hover, .gettingTemplateSolution:hover, .gettingTemplateTutorial:hover {
837
+ background-color: rgba(49, 174, 190, 0.1);
838
+ color: #32adbc;
839
+ }
840
+ .gettingTemplateGallery:focus, .gettingTemplateSolution:focus, .gettingTemplateTutorial:focus {
841
+ background-color: rgba(49, 174, 190, 0.1);
842
+ box-shadow: none;
843
+ color: #32adbc;
844
+ }
845
+ .opinionstage-connect-title {
846
+ line-height: normal !important;
847
+ margin-bottom: 40px !important;
848
+ margin-top: 10px;
849
+ }
850
+ #opinionstage-content .opinionstage-getting-btn {
851
+ background-color: #ff6d8a;
852
+ border-color: #ff6d8a;
853
+ border-radius: 2px;
854
+ font-weight: 600;
855
+ min-width: 100px;
856
+ outline-color: #ff6d8a;
857
+ }
858
+ .opinionstage-blue-bordered-btn.template {
859
+ float: none;
860
+ display: inline !important;
861
+ }
862
+ .opinionstage-item-view-dashboard #check {
863
+ width: 100%;
864
+ }
865
+ .opinionstage-item-create:before {
866
+ bottom: 0;
867
+ content: "+";
868
+ font-family: os-icon-font !important;
869
+ font-size: 17px;
870
+ font-weight: bold;
871
+ height: 18px;
872
+ margin-right: 8px;
873
+ pointer-events: none;
874
+ top: 0;
875
+ }
876
+ #opinionstage-content .opinionstage-item-view-dashboard .opinionstage-dashboard-section{
877
+ margin-bottom: 5px;
878
+ }
879
+
880
+
881
+ @media only screen and (max-width: 1230px) {
882
+ #opinionstage-content .opinionstage-dashboard-left, #opinionstage-content .opinionstage-dashboard-right {
883
+ float: none;
884
+ width: auto;
885
+ }
886
+ .opinionstage-dashboard-section .opinionstage-btn-cell .template {
887
+ display: block !important;
888
+ }
889
+ .opinionstage-dashboard-section .opinionstage-btn-cell .os_create_new_btn {
890
+ margin-bottom: 10px;
891
+ margin-right: 0;
892
+ }
893
+ .opinionstage-item-view-dashboard, .opinionstage-placement-dashboard {
894
+ width: auto;
895
+ }
896
+ #opinionstage-content .opinionstage-item-view-dashboard .opinionstage-section-header .opinionstage-section-title {
897
+ padding: 25px 0;
898
+ }
899
+ #opinionstage-content .opinionstage-dashboard {
900
+ overflow-y: scroll;
901
+ }
902
+ .opinionstage-item-action-container {
903
+ float: none;
904
+ }
905
+ #check .action .opinionstage-item-action-container a {
906
+ display: block;
907
+ float: none;
908
+ margin-bottom: 10px;
909
+ width: 80%;
910
+ }
911
+
912
+ #opinionstage-section-placements .opinionstage-section-cell.opinionstage-description-cell {
913
+ width: 39%;
914
+ }
915
+ #opinionstage-section-placements .opinionstage-section-cell.opinionstage-btns-cell {
916
+ width: 25%;
917
+ }
918
+
919
+ #opinionstage-content .opinionstage-item-view-dashboard .opinionstage-dashboard-section .opinionstage-section-header {
920
+ height: 95px;
921
+ }
922
+
923
+ #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-header .opinionstage-header-inner-section a {
924
+ display: block;
925
+ float: none;
926
+ }
927
+ .search.search-container:before {
928
+ top: 36px;
929
+ }
930
+ #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-header .opinionstage-header-inner-container .opinionstage-item-create {
931
+ margin-bottom: 20px;
932
+ margin-top: 20px;
933
+ }
934
+ }
935
+
936
+ @media only screen and (max-width: 768px) {
937
+ .gettingStartedSection {
938
+ width: auto;
939
+ }
940
+ .gettingStartedContainer, .gettingBlockContainer {
941
+ width: 100%;
942
+ }
943
+ .gettingBlockContainer .gettingTemplateGallery, .gettingBlockContainer .gettingTemplateSolution, .gettingBlockContainer .gettingTemplateTutorial {
944
+ display: block;
945
+ float: none;
946
+ width: 100%;
947
+ }
948
+ #opinionstage-section-placements .opinionstage-section-cell.opinionstage-btns-cell .opinionstage-blue-bordered-btn {
949
+ display: block;
950
+ float: none;
951
+ margin-bottom: 10px;
952
+ width: auto;
953
+ }
954
  }
admin/css/sidebar-widget.css CHANGED
@@ -5,21 +5,34 @@
5
  -moz-border-radius: 3px;
6
  border-radius: 3px;
7
  display: block;
8
- color: #3499c2;
9
- border: 1px solid #3499c2;
10
- padding: 10px 5px;
 
 
11
  float: left;
 
12
  margin-right: 5px;
 
 
 
 
 
 
 
 
 
 
13
  }
14
  .opinionstage-sidebar-widget a.opinionstage-blue-bordered-btn:hover {
15
  color: white;
16
- background-color: #3499c2;
17
  cursor: pointer;
18
  }
19
 
20
  .opinionstage-sidebar-widget {
21
  overflow: hidden;
22
- margin-bottom: 15px;
23
  padding-top: 15px;
24
  }
25
  .opinionstage-sidebar-widget .opinionstage-sidebar-connected {
@@ -38,10 +51,11 @@
38
  .opinionstage-sidebar-widget .opinionstage-sidebar-enabled {
39
  float: left;
40
  }
41
- .opinionstage-sidebar-widget .opinionstage-sidebar-config {
42
  float: right;
43
- }
44
  .opinionstage-sidebar-widget input[type="text"] {
 
45
  width: 100%;
46
  }
47
  .opinionstage-sidebar-widget input#os-email {
@@ -105,3 +119,24 @@
105
  filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#40aacd, endColorstr=#40aacd);
106
  color: #ffffff !important;
107
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  -moz-border-radius: 3px;
6
  border-radius: 3px;
7
  display: block;
8
+ color: #32adbc;
9
+ border: 1px solid #32adbc;
10
+ font-size: 15px;
11
+ font-weight: 600;
12
+ padding: 10px;
13
  float: left;
14
+ margin-bottom: 20px;
15
  margin-right: 5px;
16
+ line-height: normal;
17
+ }
18
+ .opinionstage-sidebar-widget a.opinionstage-edit-content {
19
+ padding: 9px 17px;
20
+ }
21
+ .opinionstage-sidebar-widget a.opinionstage-edit-settings {
22
+ padding: 7px;
23
+ }
24
+ .opinionstage-sidebar-widget .opinionstage-edit-settings .icon-os-common-settings:before {
25
+ font-size: 24px;
26
  }
27
  .opinionstage-sidebar-widget a.opinionstage-blue-bordered-btn:hover {
28
  color: white;
29
+ background-color: #32adbc;
30
  cursor: pointer;
31
  }
32
 
33
  .opinionstage-sidebar-widget {
34
  overflow: hidden;
35
+ margin-bottom: 30px;
36
  padding-top: 15px;
37
  }
38
  .opinionstage-sidebar-widget .opinionstage-sidebar-connected {
51
  .opinionstage-sidebar-widget .opinionstage-sidebar-enabled {
52
  float: left;
53
  }
54
+ /*.opinionstage-sidebar-widget .opinionstage-sidebar-config {
55
  float: right;
56
+ }*/
57
  .opinionstage-sidebar-widget input[type="text"] {
58
+ padding: 10px;
59
  width: 100%;
60
  }
61
  .opinionstage-sidebar-widget input#os-email {
119
  filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#40aacd, endColorstr=#40aacd);
120
  color: #ffffff !important;
121
  }
122
+ .opinionstage-sidebar-widget .connection_message {
123
+ line-height: normal;
124
+ font-family: Open Sans,Helvetica,sans-serif;
125
+ }
126
+ .opinionstage-sidebar-widget .opinionstage-blue-btn {
127
+ background: #32adbc;
128
+ border-color: #32adbc;
129
+ font-family: Open Sans,Helvetica,sans-serif;
130
+ font-size: 13px;
131
+ font-weight: 600;
132
+ line-height: normal;
133
+ padding: 10px;
134
+ text-transform: uppercase;
135
+ }
136
+ .opinionstage-sidebar-widget .opinionstage-blue-btn:hover {
137
+ background: #32adbc;
138
+ opacity: 0.9;
139
+ }
140
+ .opinionstage-sidebar-widget img {
141
+ width: 86px;
142
+ }
admin/images/article.png ADDED
Binary file
admin/images/article@2x.png ADDED
Binary file
admin/images/article@3x.png ADDED
Binary file
admin/images/bitmap_top.png ADDED
Binary file
admin/images/bitmap_top_2x.png ADDED
Binary file
admin/images/bitmap_top_3x.png ADDED
Binary file
admin/images/form.png ADDED
Binary file
admin/images/form@2x.png ADDED
Binary file
admin/images/form@3x.png ADDED
Binary file
admin/images/group-2_2x.png ADDED
Binary file
admin/images/list.png ADDED
Binary file
admin/images/list@2x.png ADDED
Binary file
admin/images/list@3x.png ADDED
Binary file
admin/images/opinionstage-tracking-notice.png CHANGED
File without changes
admin/images/os-icon.png ADDED
Binary file
admin/images/os-icon@2x.png ADDED
Binary file
admin/images/os-icon@3x.png ADDED
Binary file
admin/images/os-logo-header.png ADDED
Binary file
admin/images/os-logo-header@2x.png ADDED
Binary file
admin/images/os-logo-header@3x.png ADDED
Binary file
admin/images/os-logo.png ADDED
Binary file
admin/images/os-logo_2x.png ADDED
Binary file
admin/images/os-logo_3x.png ADDED
Binary file
admin/images/personality.png ADDED
Binary file
admin/images/personality@2x.png ADDED
Binary file
admin/images/personality@3x.png ADDED
Binary file
admin/images/poll.png ADDED
Binary file
admin/images/poll@2x.png ADDED
Binary file
admin/images/poll@3x.png ADDED
Binary file
admin/images/slideshow.png ADDED
Binary file
admin/images/slideshow@2x.png ADDED
Binary file
admin/images/slideshow@3x.png ADDED
Binary file
admin/images/survey.png ADDED
Binary file
admin/images/survey@2x.png ADDED
Binary file
admin/images/survey@3x.png ADDED
Binary file
admin/images/trivia.png ADDED
Binary file
admin/images/trivia@2x.png ADDED
Binary file
admin/images/trivia@3x.png ADDED
Binary file
admin/menu-page.php CHANGED
@@ -8,21 +8,40 @@ function opinionstage_register_menu_page() {
8
  $os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
9
  $os_client_logged_in = opinionstage_user_logged_in();
10
  if ($os_client_logged_in) {
11
- add_menu_page(
12
- __('Opinion Stage', OPINIONSTAGE_TEXT_DOMAIN),
13
- __('Opinion Stage', OPINIONSTAGE_TEXT_DOMAIN),
14
- 'edit_posts',
15
- OPINIONSTAGE_MENU_SLUG,
16
- 'opinionstage_load_template',
17
- plugins_url('admin/images/os.png', plugin_dir_path( __FILE__ )),
18
- '25.234323221'
19
- );
20
- add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Create...', 'Create...', 'edit_posts', OPINIONSTAGE_MENU_SLUG);
21
- add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'View My Items', 'My Items', 'edit_posts','opinionstage-view-my-items','opinionstage_load_template');
22
- add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Placements', 'Placements', 'edit_posts', OPINIONSTAGE_PLACEMENT_SLUG , 'opinionstage_load_template' );
23
- add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Getting Started', 'Getting Started', 'edit_posts', OPINIONSTAGE_GETTING_STARTED_SLUG,'opinionstage_load_template' );
24
- add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Help Center', 'Help Center', 'edit_posts', 'https://help.opinionstage.com/?utm_campaign=WPMainPI&utm_medium=linkhelpcenter&utm_source=wordpress&o=wp35e8' );
25
- add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Settings', 'Settings', 'edit_posts', 'opinionstage-settings-track','opinionstage_load_template');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  }else{
27
  add_menu_page(
28
  __('Opinion Stage', OPINIONSTAGE_TEXT_DOMAIN),
@@ -30,14 +49,14 @@ function opinionstage_register_menu_page() {
30
  'edit_posts',
31
  OPINIONSTAGE_GETTING_STARTED_SLUG,
32
  'opinionstage_load_template',
33
- plugins_url('admin/images/os.png', plugin_dir_path( __FILE__ )),
34
  '25.234323221'
35
  );
36
  add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Getting Started', 'Getting Started', 'edit_posts', OPINIONSTAGE_GETTING_STARTED_SLUG,'opinionstage_load_template' );
37
  add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Create...', 'Create...', 'edit_posts', OPINIONSTAGE_MENU_SLUG, 'opinionstage_load_template');
38
  add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Placements', 'Placements', 'edit_posts', OPINIONSTAGE_PLACEMENT_SLUG , 'opinionstage_load_template' );
39
- add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Help Center', 'Help Center', 'edit_posts', 'https://help.opinionstage.com/?utm_campaign=WPMainPI&utm_medium=linkhelpcenter&utm_source=wordpress&o=wp35e8' );
40
  add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Settings', 'Settings', 'edit_posts', 'opinionstage-settings-track','opinionstage_load_template');
 
41
  }
42
  }
43
  }
8
  $os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
9
  $os_client_logged_in = opinionstage_user_logged_in();
10
  if ($os_client_logged_in) {
11
+ if ( isset($os_options['item_count']) && $os_options['item_count'] > 0) {
12
+ add_menu_page(
13
+ __('Opinion Stage', OPINIONSTAGE_TEXT_DOMAIN),
14
+ __('Opinion Stage', OPINIONSTAGE_TEXT_DOMAIN),
15
+ 'edit_posts',
16
+ OPINIONSTAGE_VIEW_ITEM_SLUG,
17
+ 'opinionstage_load_template',
18
+ plugins_url('admin/images/os-icon.png', plugin_dir_path( __FILE__ )),
19
+ '25.234323221'
20
+ );
21
+ add_submenu_page(OPINIONSTAGE_VIEW_ITEM_SLUG, 'View My Items', 'My Items', 'edit_posts', OPINIONSTAGE_VIEW_ITEM_SLUG);
22
+ add_submenu_page(OPINIONSTAGE_VIEW_ITEM_SLUG, 'Create...', 'Create...', 'edit_posts', OPINIONSTAGE_MENU_SLUG, 'opinionstage_load_template');
23
+ add_submenu_page(OPINIONSTAGE_VIEW_ITEM_SLUG, 'Placements', 'Placements', 'edit_posts', OPINIONSTAGE_PLACEMENT_SLUG , 'opinionstage_load_template' );
24
+ add_submenu_page(OPINIONSTAGE_VIEW_ITEM_SLUG, 'Getting Started', 'Getting Started', 'edit_posts', OPINIONSTAGE_GETTING_STARTED_SLUG,'opinionstage_load_template' );
25
+ add_submenu_page(OPINIONSTAGE_VIEW_ITEM_SLUG, 'Settings', 'Settings', 'edit_posts', 'opinionstage-settings-track','opinionstage_load_template');
26
+ add_submenu_page(OPINIONSTAGE_VIEW_ITEM_SLUG, 'Help Center', 'Help Center', 'edit_posts', 'https://help.opinionstage.com/wordpress-plugin?utm_campaign=WPMainPI&utm_medium=linkhelpcenter&utm_source=wordpress&o=wp35e8' );
27
+ }
28
+ else {
29
+ add_menu_page(
30
+ __('Opinion Stage', OPINIONSTAGE_TEXT_DOMAIN),
31
+ __('Opinion Stage', OPINIONSTAGE_TEXT_DOMAIN),
32
+ 'edit_posts',
33
+ OPINIONSTAGE_MENU_SLUG,
34
+ 'opinionstage_load_template',
35
+ plugins_url('admin/images/os-icon.png', plugin_dir_path( __FILE__ )),
36
+ '25.234323221'
37
+ );
38
+ add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Create...', 'Create...', 'edit_posts', OPINIONSTAGE_MENU_SLUG);
39
+ add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'View My Items', 'My Items', 'edit_posts','opinionstage-view-my-items','opinionstage_load_template');
40
+ add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Placements', 'Placements', 'edit_posts', OPINIONSTAGE_PLACEMENT_SLUG , 'opinionstage_load_template' );
41
+ add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Getting Started', 'Getting Started', 'edit_posts', OPINIONSTAGE_GETTING_STARTED_SLUG,'opinionstage_load_template' );
42
+ add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Settings', 'Settings', 'edit_posts', 'opinionstage-settings-track','opinionstage_load_template');
43
+ add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Help Center', 'Help Center', 'edit_posts', 'https://help.opinionstage.com/wordpress-plugin?utm_campaign=WPMainPI&utm_medium=linkhelpcenter&utm_source=wordpress&o=wp35e8' );
44
+ }
45
  }else{
46
  add_menu_page(
47
  __('Opinion Stage', OPINIONSTAGE_TEXT_DOMAIN),
49
  'edit_posts',
50
  OPINIONSTAGE_GETTING_STARTED_SLUG,
51
  'opinionstage_load_template',
52
+ plugins_url('admin/images/os-icon.png', plugin_dir_path( __FILE__ )),
53
  '25.234323221'
54
  );
55
  add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Getting Started', 'Getting Started', 'edit_posts', OPINIONSTAGE_GETTING_STARTED_SLUG,'opinionstage_load_template' );
56
  add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Create...', 'Create...', 'edit_posts', OPINIONSTAGE_MENU_SLUG, 'opinionstage_load_template');
57
  add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Placements', 'Placements', 'edit_posts', OPINIONSTAGE_PLACEMENT_SLUG , 'opinionstage_load_template' );
 
58
  add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Settings', 'Settings', 'edit_posts', 'opinionstage-settings-track','opinionstage_load_template');
59
+ add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Help Center', 'Help Center', 'edit_posts', 'https://help.opinionstage.com/wordpress-plugin?utm_campaign=WPMainPI&utm_medium=linkhelpcenter&utm_source=wordpress&o=wp35e8' );
60
  }
61
  }
62
  }
admin/menu-target.php CHANGED
@@ -1,12 +1,19 @@
1
  <?php
2
  add_action('admin_footer', 'OpinionStage_addMenuTargetLink');
3
 
4
- function OpinionStage_addMenuTargetLink(){ ?>
5
- <script type="text/javascript">
6
- jQuery(document).ready(function(){
7
- jQuery("li.toplevel_page_opinionstage-getting-started ul li:nth-last-child(2) a,li.toplevel_page_opinionstage-settings ul li:nth-last-child(2) a").attr('target', '_blank');
8
- });
9
- </script>
10
- <?php
 
 
 
 
 
 
 
11
  }
12
  ?>
1
  <?php
2
  add_action('admin_footer', 'OpinionStage_addMenuTargetLink');
3
 
4
+ function OpinionStage_addMenuTargetLink(){
5
+ if ( isset($os_options['item_count']) && $os_options['item_count'] > 0) { ?>
6
+ <script type="text/javascript">
7
+ jQuery(document).ready(function(){
8
+ jQuery("li.toplevel_page_opinionstage-view-my-items ul li:nth-last-child(1) a,li.toplevel_page_opinionstage-settings ul li:nth-last-child(1) a").attr('target', '_blank');
9
+ });
10
+ </script>
11
+ <?php }else{ ?>
12
+ <script type="text/javascript">
13
+ jQuery(document).ready(function(){
14
+ jQuery("li.toplevel_page_opinionstage-getting-started ul li:nth-last-child(1) a,li.toplevel_page_opinionstage-settings ul li:nth-last-child(1) a").attr('target', '_blank');
15
+ });
16
+ </script>
17
+ <?php }
18
  }
19
  ?>
admin/opinionstage-tracking-user-notice.php CHANGED
File without changes
admin/opinionstage-usage-tracking-code.php CHANGED
File without changes
admin/views/getting_started.php CHANGED
@@ -7,55 +7,40 @@ defined( 'ABSPATH' ) or die();
7
  <div class="opinionstage-logo-wrapper">
8
  <div class="opinionstage-logo"></div>
9
  </div>
10
- <?php if ( !$os_client_logged_in ) {?>
11
- <div class="opinionstage-status-content">
12
- <div class='opinionstage-status-title'><b>Connect WordPress with Opinion Stage to Get Started</b></div>
13
- <form action="<?php echo OPINIONSTAGE_LOGIN_PATH ?>" method="get" class="opinionstage-connect-form">
14
- <i class="os-icon-plugin icon-os-poll-client"></i>
15
- <input type="hidden" name="utm_source" value="<?php echo OPINIONSTAGE_UTM_SOURCE ?>">
16
- <input type="hidden" name="utm_campaign" value="<?php echo OPINIONSTAGE_UTM_CAMPAIGN ?>">
17
- <input type="hidden" name="utm_medium" value="<?php echo OPINIONSTAGE_UTM_MEDIUM ?>">
18
- <input type="hidden" name="o" value="<?php echo OPINIONSTAGE_WIDGET_API_KEY ?>">
19
- <input type="hidden" name="callback" value="<?php echo opinionstage_callback_url()?>">
20
- <input id="os-email" type="email" name="email" placeholder="Enter Your Email" data-os-email-input required>
21
- <button class="opinionstage-connect-btn opinionstage-blue-btn" type="submit" id="os-start-login" data-os-login>CONNECT</button>
22
- </form>
23
- </div>
24
- <?php } else { ?>
25
- <div class="opinionstage-status-content-connected">
26
- <div class='opinionstage-status-title'>You are connected to Opinion Stage with the following email</div>
27
- <i class="os-icon-plugin icon-os-form-success"></i>
28
- <label class="checked" for="user-email"></label>
29
- <input id="os-email" type="email" disabled value="<?php echo($os_options["email"]) ?>">
30
- <form method="POST" action="<?php echo get_admin_url(null, 'admin.php?page=opinionstage-disconnect-page')?>" class="opinionstage-connect-form">
31
- <button class="opinionstage-connect-btn opinionstage-blue-btn" type="submit" id="os-disconnect">DISCONNECT</button>
32
- </form>
33
- </div>
34
- <?php } ?>
35
  </div>
36
  <?php if( $os_client_logged_in ){ ?>
37
  <div class="gettingStartedSection">
38
- <div class="Video-Section">
39
- <p><b>We recommend that you start by viewing this short introduction video</b></p>
40
- <iframe class="iframe-new" width="600" height="338" src="https://www.youtube.com/embed/zwcRWGsOxxQ?rel=0&showinfo=0" frameborder="0" allowfullscreen=""></iframe>
41
- <a href="<?php echo admin_url( 'admin.php?page='.OPINIONSTAGE_MENU_SLUG); ?>" class="gettingStartedCreate button">Start Creating Interactive Content</a>
 
 
 
 
 
42
  </div>
43
  </div>
44
  <?php }else{ ?>
45
  <div class="gettingStartedSection">
46
- <div class="Video-Section">
47
- <iframe class="iframe-new" width="600" height="338" src="https://www.youtube.com/embed/zwcRWGsOxxQ?rel=0&showinfo=0" frameborder="0" allowfullscreen=""></iframe>
 
 
 
 
 
 
 
 
 
 
 
48
  </div>
49
- <div class="text-section-getting-stared-os">
50
- <p><b>Need more information?</b></p>
51
- <ul>
52
- <li>
53
- <a href="https://help.opinionstage.com/wordpress-plugin/how-to-use-the-wordpress-plugin" target="_blank">Getting started tutorial</a>
54
- </li>
55
- <li>
56
- <a href="https://help.opinionstage.com/?utm_campaign=WPMainPI&amp;utm_medium=linkhelpcenter&amp;utm_source=wordpress&amp;o=wp35e8" target="_blank">Opinion Stage help center</a>
57
- </li>
58
- </ul>
59
  </div>
60
  </div>
61
  <?php } ?>
7
  <div class="opinionstage-logo-wrapper">
8
  <div class="opinionstage-logo"></div>
9
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  </div>
11
  <?php if( $os_client_logged_in ){ ?>
12
  <div class="gettingStartedSection">
13
+ <div class="gettingStartedContainer">
14
+ <div class="opinionstage-status-content-connected">
15
+ <div class='opinionstage-status-title opinionstage-resources-title'>Getting Started Resources</div>
16
+ </div>
17
+ </div>
18
+ <div class="gettingBlockContainer">
19
+ <?php echo opinionstage_link('TEMPLATE <br/> GALLERY', 'dashboard/content/templates', 'gettingTemplateGallery'); ?>
20
+ <?php echo opinionstage_link('SOLUTIONS & <br/>USE CASES', 'solutions', 'gettingTemplateSolution') ?>
21
+ <a href="https://help.opinionstage.com/wordpress-plugin/how-to-use-the-wordpress-plugin?utm_source=wordpress&utm_campaign=WPMainPI&utm_medium=link&o=wp35e8" target="_blank"><div class="gettingTemplateTutorial">GETTING STARTED <br/>TUTORIALS</div></a>
22
  </div>
23
  </div>
24
  <?php }else{ ?>
25
  <div class="gettingStartedSection">
26
+ <div class="gettingStartedContainer" style="height: 240px;">
27
+ <div class="opinionstage-status-content-connected">
28
+ <div class='opinionstage-status-title opinionstage-connect-title'>Connect Wordpress with<br/>Opinion Stage to get started</div>
29
+ <form action="<?php echo OPINIONSTAGE_LOGIN_PATH ?>" method="get" class="opinionstage-connect-form">
30
+ <input type="hidden" name="utm_source" value="<?php echo OPINIONSTAGE_UTM_SOURCE ?>">
31
+ <input type="hidden" name="utm_campaign" value="<?php echo OPINIONSTAGE_UTM_CAMPAIGN ?>">
32
+ <input type="hidden" name="utm_medium" value="<?php echo OPINIONSTAGE_UTM_CONNECT_MEDIUM ?>">
33
+ <input type="hidden" name="o" value="<?php echo OPINIONSTAGE_WIDGET_API_KEY ?>">
34
+ <input type="hidden" name="callback" value="<?php echo opinionstage_callback_url()?>">
35
+ <input id="os-email" type="email" name="email" placeholder="Your email" data-os-email-input required>
36
+ <button class="opinionstage-connect-btn opinionstage-getting-btn opinionstage-blue-btn" type="submit" id="os-start-login" data-os-login>CONNECT</button>
37
+ </form>
38
+ </div>
39
  </div>
40
+ <div class="gettingBlockContainer">
41
+ <?php echo opinionstage_link('TEMPLATE <br/> GALLERY', 'dashboard/content/templates', 'gettingTemplateGallery'); ?>
42
+ <?php echo opinionstage_link('SOLUTIONS & <br/>USE CASES', 'solutions', 'gettingTemplateSolution') ?>
43
+ <a href="https://help.opinionstage.com/wordpress-plugin/how-to-use-the-wordpress-plugin?utm_source=wordpress&utm_campaign=WPMainPI&utm_medium=link&o=wp35e8" target="_blank"><div class="gettingTemplateTutorial">GETTING STARTED <br/>TUTORIALS</div></a>
 
 
 
 
 
 
44
  </div>
45
  </div>
46
  <?php } ?>
admin/views/my_placements.php CHANGED
@@ -4,40 +4,39 @@ defined( 'ABSPATH' ) or die();
4
  ?>
5
  <div id="opinionstage-content">
6
  <div class="opinionstage-header-wrapper">
7
- <div class="opinionstage-logo-wrapper">
8
- <div class="opinionstage-logo"></div>
9
- </div>
10
  <?php if ( !$os_client_logged_in ) {?>
11
- <div class="opinionstage-status-content">
12
- <div class='opinionstage-status-title'><b>Connect WordPress with Opinion Stage to Get Started</b></div>
 
 
 
13
  <form action="<?php echo OPINIONSTAGE_LOGIN_PATH ?>" method="get" class="opinionstage-connect-form">
14
- <i class="os-icon-plugin icon-os-poll-client"></i>
15
  <input type="hidden" name="utm_source" value="<?php echo OPINIONSTAGE_UTM_SOURCE ?>">
16
  <input type="hidden" name="utm_campaign" value="<?php echo OPINIONSTAGE_UTM_CAMPAIGN ?>">
17
- <input type="hidden" name="utm_medium" value="<?php echo OPINIONSTAGE_UTM_MEDIUM ?>">
18
  <input type="hidden" name="o" value="<?php echo OPINIONSTAGE_WIDGET_API_KEY ?>">
19
  <input type="hidden" name="callback" value="<?php echo opinionstage_callback_url()?>">
20
- <input id="os-email" type="email" name="email" placeholder="Enter Your Email" data-os-email-input required>
21
  <button class="opinionstage-connect-btn opinionstage-blue-btn" type="submit" id="os-start-login" data-os-login>CONNECT</button>
22
  </form>
23
  </div>
24
  <?php } else { ?>
25
- <div class="opinionstage-status-content-connected">
26
- <div class='opinionstage-status-title'>You are connected to Opinion Stage with the following email</div>
27
- <i class="os-icon-plugin icon-os-form-success"></i>
28
- <label class="checked" for="user-email"></label>
29
- <input id="os-email" type="email" disabled value="<?php echo($os_options["email"]) ?>">
30
- <form method="POST" action="<?php echo get_admin_url(null, 'admin.php?page=opinionstage-disconnect-page')?>" class="opinionstage-connect-form">
31
- <button class="opinionstage-connect-btn opinionstage-blue-btn" type="submit" id="os-disconnect">DISCONNECT</button>
32
- </form>
33
- </div>
34
- <?php } ?>
35
  </div>
36
  <div class="opinionstage-dashboard">
37
- <div class="opinionstage-dashboard-right">
38
  <div id="opinionstage-section-placements" class="opinionstage-dashboard-section <?php echo( $os_client_logged_in ? '' : 'opinionstage-disabled-section' ) ?>">
39
  <div class="opinionstage-section-header">
40
  <div class="opinionstage-section-title">Placements</div>
 
41
  </div>
42
  <div class="opinionstage-section-content-wrapper">
43
  <div class="opinionstage-section-content">
@@ -127,7 +126,9 @@ defined( 'ABSPATH' ) or die();
127
  </div>
128
  </div>
129
  </div>
130
- <p style="font-weight: 600; font-size: 15px;"><a href="https://help.opinionstage.com/wordpress-plugin/how-to-add-items-to-your-site-using-placements" target="_blank">Need help with Placements?</a></p>
131
  </div>
 
 
 
132
  </div>
133
  </div>
4
  ?>
5
  <div id="opinionstage-content">
6
  <div class="opinionstage-header-wrapper">
 
 
 
7
  <?php if ( !$os_client_logged_in ) {?>
8
+ <div class="opinionstage-logo-wrapper">
9
+ <div class="opinionstage-logo"></div>
10
+ </div>
11
+ <div class="opinionstage-status-content">
12
+ <div class='opinionstage-status-title'><b class="opinionstage-title">Connect WordPress with Opinion Stage to get started</b></div>
13
  <form action="<?php echo OPINIONSTAGE_LOGIN_PATH ?>" method="get" class="opinionstage-connect-form">
 
14
  <input type="hidden" name="utm_source" value="<?php echo OPINIONSTAGE_UTM_SOURCE ?>">
15
  <input type="hidden" name="utm_campaign" value="<?php echo OPINIONSTAGE_UTM_CAMPAIGN ?>">
16
+ <input type="hidden" name="utm_medium" value="<?php echo OPINIONSTAGE_UTM_CONNECT_MEDIUM ?>">
17
  <input type="hidden" name="o" value="<?php echo OPINIONSTAGE_WIDGET_API_KEY ?>">
18
  <input type="hidden" name="callback" value="<?php echo opinionstage_callback_url()?>">
19
+ <input id="os-email" type="email" name="email" placeholder="Your email" data-os-email-input required>
20
  <button class="opinionstage-connect-btn opinionstage-blue-btn" type="submit" id="os-start-login" data-os-login>CONNECT</button>
21
  </form>
22
  </div>
23
  <?php } else { ?>
24
+ <div class="opinionstage-logo-wrapper">
25
+ <div class="opinionstage-logo"></div>
26
+ <div class="opinionstage-connectivity-status"><?php echo($os_options["email"]); ?>
27
+ <form method="POST" action="<?php echo get_admin_url(null, 'admin.php?page=opinionstage-disconnect-page')?>" class="opinionstage-connect-form">
28
+ <button class="opinionstage-disconnect" type="submit">Disconnect</button>
29
+ </form>
30
+ </div>
31
+ </div>
32
+ <?php } ?>
 
33
  </div>
34
  <div class="opinionstage-dashboard">
35
+ <div class="opinionstage-placement-dashboard">
36
  <div id="opinionstage-section-placements" class="opinionstage-dashboard-section <?php echo( $os_client_logged_in ? '' : 'opinionstage-disabled-section' ) ?>">
37
  <div class="opinionstage-section-header">
38
  <div class="opinionstage-section-title">Placements</div>
39
+ <a href="https://help.opinionstage.com/wordpress-plugin/how-to-add-items-to-your-site-using-placements" style="float: right;" target="_blank">Need help working with Placements?</a>
40
  </div>
41
  <div class="opinionstage-section-content-wrapper">
42
  <div class="opinionstage-section-content">
126
  </div>
127
  </div>
128
  </div>
 
129
  </div>
130
+ <?php if ( !$os_client_logged_in ) {
131
+ echo '<div id="overlay"></div>';
132
+ } ?>
133
  </div>
134
  </div>
admin/views/settings.php CHANGED
@@ -5,33 +5,31 @@ defined( 'ABSPATH' ) or die();
5
 
6
  <div id="opinionstage-content">
7
  <div class="opinionstage-header-wrapper">
8
- <div class="opinionstage-logo-wrapper">
9
- <div class="opinionstage-logo"></div>
10
- </div>
11
  <?php if ( !$os_client_logged_in ) {?>
 
 
 
12
  <div class="opinionstage-status-content">
13
- <div class='opinionstage-status-title'><b>Connect WordPress with Opinion Stage to Get Started</b></div>
14
  <form action="<?php echo OPINIONSTAGE_LOGIN_PATH ?>" method="get" class="opinionstage-connect-form">
15
- <i class="os-icon-plugin icon-os-poll-client"></i>
16
  <input type="hidden" name="utm_source" value="<?php echo OPINIONSTAGE_UTM_SOURCE ?>">
17
  <input type="hidden" name="utm_campaign" value="<?php echo OPINIONSTAGE_UTM_CAMPAIGN ?>">
18
- <input type="hidden" name="utm_medium" value="<?php echo OPINIONSTAGE_UTM_MEDIUM ?>">
19
  <input type="hidden" name="o" value="<?php echo OPINIONSTAGE_WIDGET_API_KEY ?>">
20
  <input type="hidden" name="callback" value="<?php echo opinionstage_callback_url()?>">
21
- <input id="os-email" type="email" name="email" placeholder="Enter Your Email" data-os-email-input required>
22
  <button class="opinionstage-connect-btn opinionstage-blue-btn" type="submit" id="os-start-login" data-os-login>CONNECT</button>
23
  </form>
24
  </div>
25
  <?php } else { ?>
26
- <div class="opinionstage-status-content-connected">
27
- <div class='opinionstage-status-title'>You are connected to Opinion Stage with the following email</div>
28
- <i class="os-icon-plugin icon-os-form-success"></i>
29
- <label class="checked" for="user-email"></label>
30
- <input id="os-email" type="email" disabled value="<?php echo($os_options["email"]) ?>">
31
- <form method="POST" action="<?php echo get_admin_url(null, 'admin.php?page=opinionstage-disconnect-page')?>" class="opinionstage-connect-form">
32
- <button class="opinionstage-connect-btn opinionstage-blue-btn" type="submit" id="os-disconnect">DISCONNECT</button>
33
- </form>
34
- </div>
35
  <?php } ?>
36
  </div>
37
  <div class="opinionstage-dashboard">
@@ -39,115 +37,118 @@ defined( 'ABSPATH' ) or die();
39
  <div id="opinionstage-section-create" class="opinionstage-dashboard-section">
40
  <div class="opinionstage-section-header">
41
  <div class="opinionstage-section-title">Create</div>
 
42
  </div>
43
  <div class="opinionstage-section-content">
44
  <div class="opinionstage-section-raw">
45
  <div class="opinionstage-section-cell opinionstage-icon-cell">
46
- <div class="os-icon-plugin icon-os-reports-polls"></div>
47
  </div>
48
  <div class="opinionstage-section-cell opinionstage-description-cell">
49
  <div class="title">Poll</div>
50
  <div class="example">Get opinions, run contests & competitions</div>
51
  </div>
52
  <div class="opinionstage-section-cell opinionstage-btn-cell">
53
- <?php echo opinionstage_create_poll_link('opinionstage-blue-btn opinionstage-create-btn'); ?>
54
- <?php echo opinionstage_template_poll_link('opinionstage-blue-btn opinionstage-create-btn template'); ?>
55
  </div>
56
  </div>
57
  <div class="opinionstage-section-raw">
58
  <div class="opinionstage-section-cell opinionstage-icon-cell">
59
- <div class="os-icon-plugin icon-os-reports-personality"></div>
60
  </div>
61
  <div class="opinionstage-section-cell opinionstage-description-cell">
62
  <div class="title">Personality Quiz</div>
63
  <div class="example">Create a personality test or a product/service selector</div>
64
  </div>
65
  <div class="opinionstage-section-cell opinionstage-btn-cell">
66
- <?php echo opinionstage_create_widget_link('outcome', 'opinionstage-blue-btn opinionstage-create-btn'); ?>
67
- <?php echo opinionstage_template_personality_quiz_link('opinionstage-blue-btn opinionstage-create-btn template') ?>
68
  </div>
69
  </div>
70
  <div class="opinionstage-section-raw">
71
  <div class="opinionstage-section-cell opinionstage-icon-cell">
72
- <div class="os-icon-plugin icon-os-reports-trivia"></div>
73
  </div>
74
  <div class="opinionstage-section-cell opinionstage-description-cell">
75
  <div class="title">Trivia Quiz</div>
76
  <div class="example">Create a knowledge test or assessment</div>
77
  </div>
78
  <div class="opinionstage-section-cell opinionstage-btn-cell">
79
- <?php echo opinionstage_create_widget_link('quiz', 'opinionstage-blue-btn opinionstage-create-btn'); ?>
80
- <?php echo opinionstage_template_trivia_link('opinionstage-blue-btn opinionstage-create-btn template'); ?>
81
  </div>
82
  </div>
83
  <div class="opinionstage-section-raw">
84
  <div class="opinionstage-section-cell opinionstage-icon-cell">
85
- <div class="os-icon-plugin icon-os-reports-set"></div>
86
  </div>
87
  <div class="opinionstage-section-cell opinionstage-description-cell">
88
  <div class="title">Survey</div>
89
  <div class="example">Gather feedback from your users</div>
90
  </div>
91
  <div class="opinionstage-section-cell opinionstage-btn-cell">
92
- <?php echo opinionstage_create_widget_link('survey', 'opinionstage-blue-btn opinionstage-create-btn'); ?>
93
- <?php echo opinionstage_template_survey_link('opinionstage-blue-btn opinionstage-create-btn template'); ?>
94
  </div>
95
  </div>
96
  <div class="opinionstage-section-raw">
97
  <div class="opinionstage-section-cell opinionstage-icon-cell">
98
- <div class="os-icon-plugin icon-os-widget-slideshow"></div>
99
  </div>
100
  <div class="opinionstage-section-cell opinionstage-description-cell">
101
  <div class="title">Slideshow</div>
102
  <div class="example">Group items in an interactive display</div>
103
  </div>
104
  <div class="opinionstage-section-cell opinionstage-btn-cell">
105
- <?php echo opinionstage_create_slideshow_link( 'opinionstage-blue-btn opinionstage-create-btn' ); ?>
106
- <?php echo opinionstage_template_slideshow_link('opinionstage-blue-btn opinionstage-create-btn template') ?>
107
  </div>
108
  </div>
109
  <div class="opinionstage-section-raw">
110
  <div class="opinionstage-section-cell opinionstage-icon-cell">
111
- <div class="os-icon-plugin icon-os-reports-list"></div>
112
  </div>
113
  <div class="opinionstage-section-cell opinionstage-description-cell">
114
  <div class="title">List</div>
115
  <div class="example">Create a listacle of anything</div>
116
  </div>
117
  <div class="opinionstage-section-cell opinionstage-btn-cell">
118
- <?php echo opinionstage_create_widget_link('list', 'opinionstage-blue-btn opinionstage-create-btn'); ?>
119
- <?php echo opinionstage_template_list_link('opinionstage-blue-btn opinionstage-create-btn template'); ?>
120
  </div>
121
  </div>
122
  <div class="opinionstage-section-raw">
123
  <div class="opinionstage-section-cell opinionstage-icon-cell">
124
- <div class="os-icon-plugin icon-os-widget-form"></div>
125
  </div>
126
  <div class="opinionstage-section-cell opinionstage-description-cell">
127
  <div class="title">Form</div>
128
  <div class="example">Gather information from your users</div>
129
  </div>
130
  <div class="opinionstage-section-cell opinionstage-btn-cell">
131
- <?php echo opinionstage_create_widget_link('contact_form', 'opinionstage-blue-btn opinionstage-create-btn'); ?>
132
- <?php echo opinionstage_template_form_link('opinionstage-blue-btn opinionstage-create-btn template'); ?>
133
  </div>
134
  </div>
135
  <div class="opinionstage-section-raw">
136
  <div class="opinionstage-section-cell opinionstage-icon-cell">
137
- <div class="os-icon-plugin icon-os-icon-plugin-story"></div>
138
  </div>
139
  <div class="opinionstage-section-cell opinionstage-description-cell">
140
  <div class="title">Story Article</div>
141
  <div class="example">Create an article using visual & interactive elements</div>
142
  </div>
143
  <div class="opinionstage-section-cell opinionstage-btn-cell">
144
- <?php echo opinionstage_create_widget_link('story', 'opinionstage-blue-btn opinionstage-create-btn'); ?>
145
  </div>
146
  </div>
147
  </div>
148
  </div>
149
- <p style="font-weight: 600; font-size: 15px;"><a href="https://help.opinionstage.com/getting-started/content-creation-tutorials" target="_blank">Need help creating items?</a></p>
150
- <p style="font-weight: 600; font-size: 15px;"><a href="https://help.opinionstage.com/wordpress-plugin/how-to-add-items-to-your-wordpress-site" target="_blank">Need help adding items you created to your site?</a></p>
151
  </div>
 
 
 
 
152
  </div>
153
  </div>
5
 
6
  <div id="opinionstage-content">
7
  <div class="opinionstage-header-wrapper">
 
 
 
8
  <?php if ( !$os_client_logged_in ) {?>
9
+ <div class="opinionstage-logo-wrapper">
10
+ <div class="opinionstage-logo"></div>
11
+ </div>
12
  <div class="opinionstage-status-content">
13
+ <div class='opinionstage-status-title'><b class="opinionstage-title" style="font-size: 20px;">Connect WordPress with Opinion Stage to get started</b></div>
14
  <form action="<?php echo OPINIONSTAGE_LOGIN_PATH ?>" method="get" class="opinionstage-connect-form">
 
15
  <input type="hidden" name="utm_source" value="<?php echo OPINIONSTAGE_UTM_SOURCE ?>">
16
  <input type="hidden" name="utm_campaign" value="<?php echo OPINIONSTAGE_UTM_CAMPAIGN ?>">
17
+ <input type="hidden" name="utm_medium" value="<?php echo OPINIONSTAGE_UTM_CONNECT_MEDIUM ?>">
18
  <input type="hidden" name="o" value="<?php echo OPINIONSTAGE_WIDGET_API_KEY ?>">
19
  <input type="hidden" name="callback" value="<?php echo opinionstage_callback_url()?>">
20
+ <input id="os-email" type="email" name="email" placeholder="Your email" data-os-email-input required>
21
  <button class="opinionstage-connect-btn opinionstage-blue-btn" type="submit" id="os-start-login" data-os-login>CONNECT</button>
22
  </form>
23
  </div>
24
  <?php } else { ?>
25
+ <div class="opinionstage-logo-wrapper">
26
+ <div class="opinionstage-logo"></div>
27
+ <div class="opinionstage-connectivity-status"><?php echo($os_options["email"]); ?>
28
+ <form method="POST" action="<?php echo get_admin_url(null, 'admin.php?page=opinionstage-disconnect-page')?>" class="opinionstage-connect-form">
29
+ <button class="opinionstage-disconnect" type="submit">Disconnect</button>
30
+ </form>
31
+ </div>
32
+ </div>
 
33
  <?php } ?>
34
  </div>
35
  <div class="opinionstage-dashboard">
37
  <div id="opinionstage-section-create" class="opinionstage-dashboard-section">
38
  <div class="opinionstage-section-header">
39
  <div class="opinionstage-section-title">Create</div>
40
+ <a href="https://help.opinionstage.com/wordpress-plugin/how-to-add-items-to-your-wordpress-site?utm_source=wordpress&utm_campaign=WPMainPI&utm_medium=link&o=wp35e8" style="float: right;" target="_blank">Need help adding items to your site?</a>
41
  </div>
42
  <div class="opinionstage-section-content">
43
  <div class="opinionstage-section-raw">
44
  <div class="opinionstage-section-cell opinionstage-icon-cell">
45
+ <div class="os-icon-plugin"><img src="<?php echo plugins_url( 'images/poll.png', dirname(__FILE__) ); ?>" ></div>
46
  </div>
47
  <div class="opinionstage-section-cell opinionstage-description-cell">
48
  <div class="title">Poll</div>
49
  <div class="example">Get opinions, run contests & competitions</div>
50
  </div>
51
  <div class="opinionstage-section-cell opinionstage-btn-cell">
52
+ <?php echo opinionstage_create_poll_link('opinionstage-blue-btn opinionstage-create-btn os_create_new_btn template'); ?>
53
+ <?php echo opinionstage_template_poll_link('opinionstage-blue-bordered-btn opinionstage-create-btn os_use_template_btn template'); ?>
54
  </div>
55
  </div>
56
  <div class="opinionstage-section-raw">
57
  <div class="opinionstage-section-cell opinionstage-icon-cell">
58
+ <div class="os-icon-plugin"><img src="<?php echo plugins_url( 'images/personality.png', dirname(__FILE__) ); ?>" ></div>
59
  </div>
60
  <div class="opinionstage-section-cell opinionstage-description-cell">
61
  <div class="title">Personality Quiz</div>
62
  <div class="example">Create a personality test or a product/service selector</div>
63
  </div>
64
  <div class="opinionstage-section-cell opinionstage-btn-cell">
65
+ <?php echo opinionstage_create_widget_link('outcome', 'opinionstage-blue-btn opinionstage-create-btn os_create_new_btn template'); ?>
66
+ <?php echo opinionstage_template_personality_quiz_link('opinionstage-blue-bordered-btn opinionstage-create-btn os_use_template_btn template') ?>
67
  </div>
68
  </div>
69
  <div class="opinionstage-section-raw">
70
  <div class="opinionstage-section-cell opinionstage-icon-cell">
71
+ <div class="os-icon-plugin"><img src="<?php echo plugins_url( 'images/trivia.png', dirname(__FILE__) ); ?>" ></div>
72
  </div>
73
  <div class="opinionstage-section-cell opinionstage-description-cell">
74
  <div class="title">Trivia Quiz</div>
75
  <div class="example">Create a knowledge test or assessment</div>
76
  </div>
77
  <div class="opinionstage-section-cell opinionstage-btn-cell">
78
+ <?php echo opinionstage_create_widget_link('quiz', 'opinionstage-blue-btn opinionstage-create-btn os_create_new_btn template'); ?>
79
+ <?php echo opinionstage_template_trivia_link('opinionstage-blue-bordered-btn opinionstage-create-btn os_use_template_btn template'); ?>
80
  </div>
81
  </div>
82
  <div class="opinionstage-section-raw">
83
  <div class="opinionstage-section-cell opinionstage-icon-cell">
84
+ <div class="os-icon-plugin"><img src="<?php echo plugins_url( 'images/survey.png', dirname(__FILE__) ); ?>" ></div>
85
  </div>
86
  <div class="opinionstage-section-cell opinionstage-description-cell">
87
  <div class="title">Survey</div>
88
  <div class="example">Gather feedback from your users</div>
89
  </div>
90
  <div class="opinionstage-section-cell opinionstage-btn-cell">
91
+ <?php echo opinionstage_create_widget_link('survey', 'opinionstage-blue-btn opinionstage-create-btn os_create_new_btn template'); ?>
92
+ <?php echo opinionstage_template_survey_link('opinionstage-blue-bordered-btn opinionstage-create-btn os_use_template_btn template'); ?>
93
  </div>
94
  </div>
95
  <div class="opinionstage-section-raw">
96
  <div class="opinionstage-section-cell opinionstage-icon-cell">
97
+ <div class="os-icon-plugin"><img src="<?php echo plugins_url( 'images/slideshow.png', dirname(__FILE__) ); ?>" ></div>
98
  </div>
99
  <div class="opinionstage-section-cell opinionstage-description-cell">
100
  <div class="title">Slideshow</div>
101
  <div class="example">Group items in an interactive display</div>
102
  </div>
103
  <div class="opinionstage-section-cell opinionstage-btn-cell">
104
+ <?php echo opinionstage_create_slideshow_link( 'opinionstage-blue-btn opinionstage-create-btn os_create_new_btn template' ); ?>
105
+ <?php echo opinionstage_template_slideshow_link('opinionstage-blue-bordered-btn opinionstage-create-btn os_use_template_btn template') ?>
106
  </div>
107
  </div>
108
  <div class="opinionstage-section-raw">
109
  <div class="opinionstage-section-cell opinionstage-icon-cell">
110
+ <div class="os-icon-plugin"><img src="<?php echo plugins_url( 'images/list.png', dirname(__FILE__) ); ?>" ></div>
111
  </div>
112
  <div class="opinionstage-section-cell opinionstage-description-cell">
113
  <div class="title">List</div>
114
  <div class="example">Create a listacle of anything</div>
115
  </div>
116
  <div class="opinionstage-section-cell opinionstage-btn-cell">
117
+ <?php echo opinionstage_create_widget_link('list', 'opinionstage-blue-btn opinionstage-create-btn os_create_new_btn template'); ?>
118
+ <?php echo opinionstage_template_list_link('opinionstage-blue-bordered-btn opinionstage-create-btn os_use_template_btn template'); ?>
119
  </div>
120
  </div>
121
  <div class="opinionstage-section-raw">
122
  <div class="opinionstage-section-cell opinionstage-icon-cell">
123
+ <div class="os-icon-plugin"><img src="<?php echo plugins_url( 'images/form.png', dirname(__FILE__) ); ?>" ></div>
124
  </div>
125
  <div class="opinionstage-section-cell opinionstage-description-cell">
126
  <div class="title">Form</div>
127
  <div class="example">Gather information from your users</div>
128
  </div>
129
  <div class="opinionstage-section-cell opinionstage-btn-cell">
130
+ <?php echo opinionstage_create_widget_link('contact_form', 'opinionstage-blue-btn opinionstage-create-btn os_create_new_btn template'); ?>
131
+ <?php echo opinionstage_template_form_link('opinionstage-blue-bordered-btn opinionstage-create-btn os_use_template_btn template'); ?>
132
  </div>
133
  </div>
134
  <div class="opinionstage-section-raw">
135
  <div class="opinionstage-section-cell opinionstage-icon-cell">
136
+ <div class="os-icon-plugin"><img src="<?php echo plugins_url( 'images/article.png', dirname(__FILE__) ); ?>" ></div>
137
  </div>
138
  <div class="opinionstage-section-cell opinionstage-description-cell">
139
  <div class="title">Story Article</div>
140
  <div class="example">Create an article using visual & interactive elements</div>
141
  </div>
142
  <div class="opinionstage-section-cell opinionstage-btn-cell">
143
+ <?php echo opinionstage_create_widget_link('story', 'opinionstage-blue-btn opinionstage-create-btn os_create_new_btn template'); ?>
144
  </div>
145
  </div>
146
  </div>
147
  </div>
 
 
148
  </div>
149
+ <?php if ( !$os_client_logged_in ) {
150
+ echo '<div id="overlay"></div>';
151
+ }
152
+ ?>
153
  </div>
154
  </div>
admin/views/settings_track.php CHANGED
@@ -11,25 +11,60 @@ if(isset($_POST['submit_tracking']) && $_POST['submit_tracking'] == 'Save Change
11
  }
12
  $usage_enabled = get_option('oswp_tracking_user_site_data');
13
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
- <div class="wrap">
16
- <h1 class="wp-heading-inline">Settings</h1>
17
- <h2>Improve OpinionStage</h2>
18
- <form method="post" action="">
19
- <table class="form-table">
20
- <tbody>
21
- <tr class="opinionstage_allow_tracking">
22
- <th scope="row">Usage Data Tracking</th>
23
- <td>
24
- <label>
25
- <input type="checkbox" name="opinionstage_allow_tracking" value="yes" <?php echo ($usage_enabled=='yes') ? 'checked="checked"' : ''; ?> >
26
- Opt-in to our anonymous plugin data collection and to updates. We guarantee no sensitive data is collected.
27
- <a href="https://help.opinionstage.com/wordpress-plugin/usage-data-tracking" target="_blank">Learn more.</a>
28
- </label>
29
- </td>
30
- </tr>
31
- </tbody>
32
- </table>
33
- <input type="submit" name="submit_tracking" class="button button-primary" value="Save Changes">
34
- </form>
35
  </div>
 
 
 
 
 
 
11
  }
12
  $usage_enabled = get_option('oswp_tracking_user_site_data');
13
  ?>
14
+ <div id="opinionstage-content">
15
+ <div class="opinionstage-header-wrapper">
16
+ <?php if ( !$os_client_logged_in ) {?>
17
+ <div class="opinionstage-logo-wrapper">
18
+ <div class="opinionstage-logo"></div>
19
+ </div>
20
+ <div class="opinionstage-status-content">
21
+ <div class='opinionstage-status-title'><b class="opinionstage-title">Connect WordPress with Opinion Stage to get started</b></div>
22
+ <form action="<?php echo OPINIONSTAGE_LOGIN_PATH ?>" method="get" class="opinionstage-connect-form">
23
+ <input type="hidden" name="utm_source" value="<?php echo OPINIONSTAGE_UTM_SOURCE ?>">
24
+ <input type="hidden" name="utm_campaign" value="<?php echo OPINIONSTAGE_UTM_CAMPAIGN ?>">
25
+ <input type="hidden" name="utm_medium" value="<?php echo OPINIONSTAGE_UTM_CONNECT_MEDIUM ?>">
26
+ <input type="hidden" name="o" value="<?php echo OPINIONSTAGE_WIDGET_API_KEY ?>">
27
+ <input type="hidden" name="callback" value="<?php echo opinionstage_callback_url()?>">
28
+ <input id="os-email" type="email" name="email" placeholder="Your email" data-os-email-input required>
29
+ <button class="opinionstage-connect-btn opinionstage-blue-btn" type="submit" id="os-start-login" data-os-login>CONNECT</button>
30
+ </form>
31
+ </div>
32
+ <?php } else { ?>
33
+ <div class="opinionstage-logo-wrapper">
34
+ <div class="opinionstage-logo"></div>
35
+ <div class="opinionstage-connectivity-status"><?php echo($os_options["email"]); ?>
36
+ <form method="POST" action="<?php echo get_admin_url(null, 'admin.php?page=opinionstage-disconnect-page')?>" class="opinionstage-connect-form">
37
+ <button class="opinionstage-disconnect" type="submit">Disconnect</button>
38
+ </form>
39
+ </div>
40
+ </div>
41
+ <?php } ?>
42
+ </div>
43
+ <div class="opinionstage-dashboard">
44
+ <div class="opinionstage-placement-dashboard">
45
+ <div id="opinionstage-section-create" class="opinionstage-dashboard-section">
46
+ <div class="opinionstage-section-header">
47
+ <div class="opinionstage-section-title">Settings</div>
48
+ </div>
49
 
50
+ <div>
51
+ <form method="post" action="">
52
+ <div class="os-setting-container">
53
+ <div class="opinionstage-setting-title">Usage Data Tracking</div>
54
+ <div class="opinionstage-setting-content">
55
+ <input type="checkbox" name="opinionstage_allow_tracking" value="yes" <?php echo ($usage_enabled=='yes') ? 'checked="checked"' : ''; ?> >
56
+ <span>Opt-in to our anonymous plugin data collection and to updates. We guarantee no</span> <br/><span style="margin-left: 23px;">sensitive data is collected. </span>
57
+ <a href="https://help.opinionstage.com/wordpress-plugin/usage-data-tracking" target="_blank">Learn more.</a>
58
+ </div>
59
+ </div>
60
+ <input type="submit" name="submit_tracking" class="opinionstage-blue-btn" style="padding: 10px 20px; width: 152px;" value="SAVE CHANGES">
61
+ </form>
62
+ </div>
63
+ </div>
 
 
 
 
 
 
64
  </div>
65
+ </div>
66
+ </div>
67
+ <?php if ( !$os_client_logged_in ) {
68
+ echo '<div id="overlay"></div>';
69
+ }
70
+ ?>
admin/views/view_my_items.php CHANGED
@@ -2,51 +2,59 @@
2
  // block direct access to plugin PHP files:
3
  defined( 'ABSPATH' ) or die(1); ?>
4
 
5
- <div class="wrap">
6
  <div id="opinionstage-content">
7
- <div class="opinionstage-header-wrapper">
8
- <div class="opinionstage-logo-wrapper">
 
9
  <div class="opinionstage-logo"></div>
10
- </div>
11
- <?php if ( !$os_client_logged_in ) {?>
12
- <div class="opinionstage-status-content">
13
- <div class='opinionstage-status-title'><b>Connect WordPress with Opinion Stage to Get Started</b></div>
14
- <form action="<?php echo OPINIONSTAGE_LOGIN_PATH ?>" method="get" class="opinionstage-connect-form">
15
- <i class="os-icon-plugin icon-os-poll-client"></i>
16
- <input type="hidden" name="utm_source" value="<?php echo OPINIONSTAGE_UTM_SOURCE ?>">
17
- <input type="hidden" name="utm_campaign" value="<?php echo OPINIONSTAGE_UTM_CAMPAIGN ?>">
18
- <input type="hidden" name="utm_medium" value="<?php echo OPINIONSTAGE_UTM_MEDIUM ?>">
19
- <input type="hidden" name="o" value="<?php echo OPINIONSTAGE_WIDGET_API_KEY ?>">
20
- <input type="hidden" name="callback" value="<?php echo opinionstage_callback_url()?>">
21
- <input id="os-email" type="email" name="email" placeholder="Enter Your Email" data-os-email-input>
22
- <button class="opinionstage-connect-btn opinionstage-blue-btn" type="submit" id="os-start-login" data-os-login>CONNECT</button>
23
- </form>
24
- </div>
25
- <?php } else { ?>
26
- <div class="opinionstage-status-content-connected">
27
- <div class='opinionstage-status-title'>You are connected to Opinion Stage with the following email</div>
28
- <i class="os-icon-plugin icon-os-form-success"></i>
29
- <label class="checked" for="user-email"></label>
30
- <input id="os-email" type="email" disabled value="<?php echo($os_options["email"]) ?>">
31
  <form method="POST" action="<?php echo get_admin_url(null, 'admin.php?page=opinionstage-disconnect-page')?>" class="opinionstage-connect-form">
32
- <button class="opinionstage-connect-btn opinionstage-blue-btn" type="submit" id="os-disconnect">DISCONNECT</button>
33
  </form>
34
  </div>
35
- <?php } ?>
 
36
  </div>
37
- </div>
38
- <div id="container" style="background: #fff;overflow: hidden;">
 
39
  <div class="opinionstage-section-header">
40
  <div class="opinionstage-section-title">My Items</div>
41
- <a href="https://help.opinionstage.com/wordpress-plugin/how-to-add-items-to-your-wordpress-site" target="_blank" class="">Need help adding items to your site?</a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  </div>
43
- <table id="check" style="background: #fff;margin-left: 20px;margin-top: 20px;margin-bottom: 20px;"></table>
44
- <div id="loadMore" class="btn btn_aqua btn_full-width" style="display: none;">CLICK FOR MORE</div>
 
45
  <div id="showLess" style="display: none;">Show less</div>
 
 
46
  </div>
47
- </div>
48
  <script type="text/javascript">
49
- // This is our actual script
50
  jQuery(document).ready(function($){
51
  $.ajax({
52
  url: 'https://www.opinionstage.com/api/wp/v1/my/widgets?type=all&page=1&per_page=99',
@@ -62,7 +70,8 @@ defined( 'ABSPATH' ) or die(1); ?>
62
  dropdownOptions = data;
63
  if(dropdownOptions.data.length == 0){
64
  var adminUrlCreateLink = "<?php echo admin_url( 'admin.php?page=opinionstage-settings'); ?>";
65
- var viewtext = '<tbody><tr><td><p><span style="font-weight: 600; font-size: 15px; color:#3499c2;">No items found, </span><a href="'+adminUrlCreateLink+'" style="font-weight: 600; font-size: 15px; color:#3499c2;">Create your first one.</a></p></td></tr></tbody>';
 
66
  $(viewtext).appendTo('#container table#check');
67
  }else{
68
  for (var i = 0; i < dropdownOptions.data.length; i++) {
@@ -77,7 +86,8 @@ defined( 'ABSPATH' ) or die(1); ?>
77
  var previewBlockOsView = dropdownOptions.data[i].attributes['landing-page-url'];
78
  var previewBlockOsEdit = dropdownOptions.data[i].attributes['edit-url'];
79
  var previewBlockOsStatistics = dropdownOptions.data[i].attributes['stats-url'];
80
- var viewtext = '<tbody id="count"><tr class="settingBorderOs"><td class="image"><div class="content-item-image quiz"><img height="90" src="'+previewBlockOsImageUrl+'" width="120"><div class="content-item-label">'+previewBlockOsType+'</div></div></td><td class="long"><div style="position: relative;height: 85px;"><a href="'+previewBlockOsEdit+'" target="_blank">'+previewBlockOsTitle+'</a><table><tbody><tr><td><span class="os-icon-plugin icon-os-common-date"></span><div class="label">'+previewBlockOsDate+'</div></td></tr></tbody></table></div></td><td class="action"><a href="'+previewBlockOsView+'" class="opinionstage-blue-bordered-btn opinionstage-edit-content " target="_blank"> View </a><a href="'+previewBlockOsEdit+'" class="opinionstage-blue-bordered-btn opinionstage-edit-content " target="_blank"> Edit </a><a href="'+previewBlockOsStatistics+'" class="opinionstage-blue-bordered-btn opinionstage-edit-content " target="_blank"> Statistics </a></td></tr></tbody>';
 
81
  $(viewtext).appendTo('#container table#check');
82
  }
83
  }
@@ -104,7 +114,66 @@ defined( 'ABSPATH' ) or die(1); ?>
104
  $('#showLess').live( 'click', function () {
105
  x=(x-0<0) ? 10 : x-0;
106
  $('table#check tbody#count').not(':lt('+x+')').hide();
107
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  },
109
  error: function(){
110
  console.log(data.statusText);
2
  // block direct access to plugin PHP files:
3
  defined( 'ABSPATH' ) or die(1); ?>
4
 
5
+ <!-- <div class="wrap"> -->
6
  <div id="opinionstage-content">
7
+ <div class="opinionstage-header-wrapper">
8
+ <?php if ( $os_client_logged_in ) { ?>
9
+ <div class="opinionstage-logo-wrapper">
10
  <div class="opinionstage-logo"></div>
11
+ <div class="opinionstage-connectivity-status"><?php echo($os_options["email"]); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  <form method="POST" action="<?php echo get_admin_url(null, 'admin.php?page=opinionstage-disconnect-page')?>" class="opinionstage-connect-form">
13
+ <button class="opinionstage-disconnect" type="submit">Disconnect</button>
14
  </form>
15
  </div>
16
+ </div>
17
+ <?php } ?>
18
  </div>
19
+ <div id="container" class="opinionstage-dashboard">
20
+ <div class="opinionstage-item-view-dashboard">
21
+ <div id="opinionstage-section-create" class="opinionstage-dashboard-section">
22
  <div class="opinionstage-section-header">
23
  <div class="opinionstage-section-title">My Items</div>
24
+ <div class="opinionstage-header-inner-container">
25
+ <div class="opinionstage-header-inner-section">
26
+ <a href="https://help.opinionstage.com/wordpress-plugin/how-to-add-items-to-your-wordpress-site" target="_blank" class="">Need help adding items to your site?</a>
27
+ <div style="padding: 0px 9px; width: 150px; display: inline-block;">
28
+ <select id="itemList">
29
+ <option value="all">ALL ITEMS</option>
30
+ <option value="poll">POLL</option>
31
+ <option value="multiple">MULTIPLE POLL SET</option>
32
+ <option value="survey">SURVEY</option>
33
+ <option value="slideshow">SLIDESHOW</option>
34
+ <option value="trivia">TRIVIA QUIZ</option>
35
+ <option value="personality">PERSONALITY QUIZ</option>
36
+ <option value="list">LIST</option>
37
+ <option value="form">FORM</option>
38
+ <option value="story">STORY ARTICLE</option>
39
+ </select>
40
+ </div>
41
+ <div class="search search-container">
42
+ <input id="searchItem" class="std-input" name="search" placeholder="Search" type="text">
43
+ </div>
44
+ </div>
45
+ <a href="<?php echo admin_url( 'admin.php?page=opinionstage-settings' ); ?>" class="opinionstage-connect-btn opinionstage-blue-btn opinionstage-item-create" style="margin-left: 20px; font-weight: 600; padding-left: 0; padding-right: 0;">CREATE</a>
46
+ </div>
47
+ </div>
48
  </div>
49
+ <p class="result_progress" style="display: block; font-size: 16px; text-align: center;">Loading...</p>
50
+ <table id="check"></table>
51
+ <div id="loadMore" class="btn btn_aqua btn_full-width" style="display: none;">Click for more</div>
52
  <div id="showLess" style="display: none;">Show less</div>
53
+ </div>
54
+ </div>
55
  </div>
56
+ <!-- </div> -->
57
  <script type="text/javascript">
 
58
  jQuery(document).ready(function($){
59
  $.ajax({
60
  url: 'https://www.opinionstage.com/api/wp/v1/my/widgets?type=all&page=1&per_page=99',
70
  dropdownOptions = data;
71
  if(dropdownOptions.data.length == 0){
72
  var adminUrlCreateLink = "<?php echo admin_url( 'admin.php?page=opinionstage-settings'); ?>";
73
+ var viewtext = '<tbody><tr><td><p><span style="font-weight: 600; font-size: 15px; color:#212120;">No items yet..., </span><a href="'+adminUrlCreateLink+'" style="font-weight: 600; font-size: 15px; color:#3499c2;">Add your first item</a></p></td></tr></tbody>';
74
+ $('.result_progress').css('display', 'none');
75
  $(viewtext).appendTo('#container table#check');
76
  }else{
77
  for (var i = 0; i < dropdownOptions.data.length; i++) {
86
  var previewBlockOsView = dropdownOptions.data[i].attributes['landing-page-url'];
87
  var previewBlockOsEdit = dropdownOptions.data[i].attributes['edit-url'];
88
  var previewBlockOsStatistics = dropdownOptions.data[i].attributes['stats-url'];
89
+ var viewtext = '<tbody id="count"><tr class="settingBorderOs"><td class="image"><div class="content-item-image quiz"><img height="90" src="'+previewBlockOsImageUrl+'" width="120"><div class="content-item-label">'+previewBlockOsType+'</div></div></td><td class="long"><div style="position: relative;height: 85px;"><a href="'+previewBlockOsEdit+'" class="opinionstage-item-title" target="_blank">'+previewBlockOsTitle+'</a><table><tbody><tr><td><span class="os-icon-plugin icon-os-common-date"></span><div class="label">'+previewBlockOsDate+'</div></td></tr></tbody></table></div></td><td class="action"><div class="opinionstage-item-action-container"><a href="'+previewBlockOsView+'" class="opinionstage-blue-bordered-btn opinionstage-edit-content " target="_blank"> View </a><a href="'+previewBlockOsEdit+'" class="opinionstage-blue-bordered-btn opinionstage-edit-content " target="_blank"> Edit </a><a href="'+previewBlockOsStatistics+'" class="opinionstage-blue-bordered-btn opinionstage-edit-content " target="_blank"> Statistics </div></a></td></tr></tbody>';
90
+ $('.result_progress').css('display', 'none');
91
  $(viewtext).appendTo('#container table#check');
92
  }
93
  }
114
  $('#showLess').live( 'click', function () {
115
  x=(x-0<0) ? 10 : x-0;
116
  $('table#check tbody#count').not(':lt('+x+')').hide();
117
+ });
118
+
119
+ var data = {
120
+ 'action': 'opinionstage_ajax_item_count',
121
+ 'oswp_item_count' : dropdownOptions.data.length
122
+ };
123
+
124
+ jQuery.post(ajaxurl, data, function(response) {
125
+ if(response){
126
+ // console.log(response);
127
+ }
128
+ });
129
+
130
+ jQuery('#itemList').on('change', function() {
131
+ var selectedValue = this.value;
132
+ var contentLabel = jQuery(".content-item-label");
133
+
134
+ contentLabel.each(function() {
135
+ if(selectedValue != 'all' && selectedValue != jQuery( this ).text().toLowerCase()){
136
+ jQuery( this ).parent().parent().parent().parent().css('display', 'none');
137
+ }
138
+ else {
139
+ jQuery("#searchItem").val('');
140
+ jQuery( this ).parent().parent().parent().parent().css('display', 'table-row-group');
141
+ }
142
+ });
143
+ });
144
+
145
+ $("#searchItem").on("keyup",function search(e) {
146
+ if(e.keyCode == 13) {
147
+ var searchItem = $(this).val();
148
+ var listTitle = jQuery('td.long a');
149
+ var dropdownValue = jQuery('#itemList').val();
150
+ var contentList = jQuery(".content-item-label");
151
+
152
+ listTitle.each(function() {
153
+ var title = jQuery( this ).text().toLowerCase();
154
+ if ( dropdownValue == 'all' ) {
155
+ if(!title.includes(searchItem)) {
156
+ jQuery( this ).parent().parent().parent().parent().css('display', 'none');
157
+ }
158
+ else {
159
+ jQuery( this ).parent().parent().parent().parent().css('display', 'table-row-group');
160
+ }
161
+ }
162
+ else {
163
+ contentList.each(function() {
164
+ if(dropdownValue == jQuery( this ).text().toLowerCase()){
165
+ if(!title.includes(searchItem)) {
166
+ jQuery( this ).parent().parent().parent().parent().css('display', 'none');
167
+ }
168
+ else {
169
+ jQuery( this ).parent().parent().parent().parent().css('display', 'table-row-group');
170
+ }
171
+ }
172
+ });
173
+ }
174
+ });
175
+ }
176
+ });
177
  },
178
  error: function(){
179
  console.log(data.statusText);
gutenberg/form/dist/blocks.build.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(1)},function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,a){try{var i=t[o](a),c=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(c).then(function(e){r("next",e)},function(e){r("throw",e)});e(c)}return r("next")})}}var o,a,i,c,l,s,u=n(2),p=n.n(u),m=n(5),f=(n.n(m),n(6)),d=(n.n(f),wp.i18n.__),h=wp.blocks.registerBlockType,g=wp.components,v=g.SelectControl,b=(g.TextControl,wp.editor.RichText,!1);h("opinion-stage/block-os-form",{title:d("Form"),icon:"editor-justify",category:"opinion-stage",keywords:[d("Opinion Stage Form"),d("Opinion Stage Form")],attributes:{embedUrl:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},oswpUrlShortcode:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},lockEmbed:{source:"attribute",attribute:"data-lock-embed",selector:"div[data-lock-embed]"},buttonText:{source:"attribute",attribute:"data-button-text",selector:"div[data-button-text]"}},edit:function(e){function t(){var t=this,n=osGutenData.OswpPluginVersion,o=osGutenData.OswpClientToken,a=osGutenData.OswpFetchDataUrl+"?type=form&page=1&per_page=99";fetch(a,{method:"GET",headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json","OSWP-Plugin-Version":n,"OSWP-Client-Token":o}}).then(function(){var n=r(p.a.mark(function n(r){var o;return p.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.json();case 2:o=t.sent,o=o.data,b=o,e.setAttributes({buttonText:"Embed"}),e.setAttributes({buttonText:m}),"Change"==m&&"Select"!=u?e.setAttributes({embedUrl:u}):e.setAttributes({embedUrl:"Select"});case 8:case"end":return t.stop()}},n,t)}));return function(e){return n.apply(this,arguments)}}()).catch(function(e){console.log("ERROR: "+e.message)})}var n=e.attributes,u=n.embedUrl,m=(n.oswpUrlShortcode,n.lockEmbed,n.buttonText),f=(e.setAttributes,function(t){if(""==t)e.setAttributes({embedUrl:""});else if(""!=t){e.setAttributes({embedUrl:t});for(var n=0;n<b.length;n++){var r=function(e){var t=document.createElement("a");return t.href=e,t}(b[n].attributes["landing-page-url"]),s=r.pathname;if(t==s){o=b[n].attributes.title,a=b[n].attributes["image-url"],i=b[n].attributes["landing-page-url"],c=b[n].attributes["edit-url"],l=b[n].attributes["stats-url"];break}}}}),d=function(t){"Embed"==t.target.value?""==u||"Select"==u||"createNew"==u||"refresh"==u?e.setAttributes({lockEmbed:!1,buttonText:"Embed"}):(e.setAttributes({lockEmbed:!0,buttonText:"Change"}),L=wp.element.createElement(v,{id:"selectID",options:s,value:u,onChange:f,className:"components-select-control__input"})):e.setAttributes({lockEmbed:!1,buttonText:"Embed"})};window.verifyOSInsert=function(t){e.setAttributes({oswpUrlShortcode:t});for(var n=document.getElementById("selectID").options,r=0;r<n.length;r++)if(n[r].value==t){n[r].defaultSelected=!0,e.setAttributes({lockEmbed:!0,buttonText:"Change",embedUrl:t});break}};var h=osGutenData.onCreateButtonClickOs+"?w_type=form&amp;utm_source=wordpress&amp;utm_campaign=WPMainPI&amp;utm_medium=link&amp;o=wp35e8",g=function(e){window.open(h,"_blank").focus()};m||e.setAttributes({buttonText:"Embed"});var w=osGutenData.callbackUrlOs,y=w,E=(osGutenData.getActionUrlOS,osGutenData.getLogoImageLink),x=function(e){window.location.replace(y)};if(""==osGutenData.isOsConnected)return $(document).ready(function(){$("span#oswpLauncherContentPopupform , #owspLaunchInputCreate").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500)})}),wp.element.createElement("div",{className:e.className},wp.element.createElement("div",{className:"os-form-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("span",null,wp.element.createElement("img",{src:E,alt:""}))," Opinion Stage"),wp.element.createElement("p",{className:"components-heading"},"Please connect Opinion Stage to WordPress to start adding forms"),wp.element.createElement("button",{className:"components-button is-button is-default is-block is-primary",onClick:x},"Connect")));if(0==b)s=[{value:"Select",label:"Select a form"},{value:"refresh",label:"Refresh"}],t();else{s=[{value:"Select",label:"Select a form"},{value:"refresh",label:"Refresh"},{value:"",label:"-----------------"}];for(var k=0;k<b.length;k++){s[s.length]={value:b[k].attributes["landing-page-url"].replace("https://www.opinionstage.com",""),label:b[k].attributes.title};var _=function(e){var t=document.createElement("a");return t.href=e,t}(b[k].attributes["landing-page-url"]),N=_.pathname;if(u==N){o=b[k].attributes.title,a=b[k].attributes["image-url"],i=b[k].attributes["landing-page-url"],c=b[k].attributes["edit-url"],l=b[k].attributes["stats-url"];var O=b[k].id}}}"refresh"==u&&t();var L=wp.element.createElement(v,{id:"selectID",options:s,value:u,onChange:f,className:"components-select-control__input"});$(document).ready(function(){$("span#oswpLauncherContentPopupform").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500);var t=$(this).attr("data-os-block");$("button#dropbtn span").text(t);for(var n=$(".filter__itm"),r=0;r<n.length;r++)if($(n[r]).text()==t){setTimeout(function(){$(n[r]).trigger("click")},2e3),$("button.content__links-itm").live("click",function(e){$(".tingle-modal.opinionstage-content-popup").hide(),$(".tingle-modal.opinionstage-content-popup.tingle-modal--visible").hide()});break}})});var S=wp.element.createElement("div",{className:"os-form-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("span",null,wp.element.createElement("img",{src:E,alt:""}))," Opinion Stage"),wp.element.createElement("span",{id:"oswpLauncherContentPopupform",className:"components-button is-button is-default is-block is-primary","data-opinionstage-content-launch":!0,"data-os-block":"form"},"Select a Form"),wp.element.createElement("input",{type:"button",value:"Create a New Form",className:"components-button is-button is-default is-block is-primary",onClick:g}),wp.element.createElement("div",{className:"components-placeholder__fieldset"},L,wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large",id:"clickMe",onClick:d})));return function(e,t,n){var r,o=e.getElementsByTagName(t)[0],a=Math.floor((new Date).getTime()/1e6);e.getElementById(n)||(r=e.createElement(t),r.id=n,r.async=1,r.src="https://www.opinionstage.com/assets/loader.js?"+a,o.parentNode.insertBefore(r,o))}(document,"script","os-widget-jssdk"),O="os-widget-"+O,""!=u&&"Select"!=u&&u?"Embed"==m||"Change"==m&&(S=wp.element.createElement("div",{className:"os-form-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("span",null,wp.element.createElement("img",{src:E,alt:""}))," Opinion Stage"),wp.element.createElement("div",{className:"components-preview__block"},wp.element.createElement("div",{className:"components-preview__leftBlockImage"},wp.element.createElement("img",{src:a,alt:o,className:"image"}),wp.element.createElement("div",{className:"overlay"},wp.element.createElement("div",{className:"text"},wp.element.createElement("a",{href:i,target:"_blank"}," View "),wp.element.createElement("a",{href:c,target:"_blank"}," Edit "),wp.element.createElement("a",{href:l,target:"_blank"}," Statistics "),wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large left-align",onClick:d})))),wp.element.createElement("div",{className:"components-preview__rightBlockContent"},wp.element.createElement("div",{className:"components-placeholder__label"},"Form: ",o)))),L=wp.element.createElement(v,{id:"selectID",options:s,value:u,disabled:!0,onChange:f,className:"components-select-control__input"})):"Select"==u||""==u||"refresh"==u||e.setAttributes({buttonText:"Embed"}),wp.element.createElement("div",{className:e.className},S)},save:function(e){var t=e.attributes,n=(t.embedUrl,t.oswpUrlShortcode),r=t.lockEmbed,o=t.buttonText;return wp.element.createElement("div",{class:"os-form-wrapper","data-type":"form","data-test-url":n,"data-lock-embed":r,"data-button-text":o},'[os-widget path="',n,'"]')}})},function(e,t,n){e.exports=n(3)},function(e,t,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,a=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(4),o)r.regeneratorRuntime=a;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";function n(e,t,n,r){var a=t&&t.prototype instanceof o?t:o,i=Object.create(a.prototype),c=new f(r||[]);return i._invoke=s(e,n,c),i}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function o(){}function a(){}function i(){}function c(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function l(e){function t(n,o,a,i){var c=r(e[n],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"===typeof s&&b.call(s,"__await")?Promise.resolve(s.__await).then(function(e){t("next",e,a,i)},function(e){t("throw",e,a,i)}):Promise.resolve(s).then(function(e){l.value=e,a(l)},i)}i(c.arg)}function n(e,n){function r(){return new Promise(function(r,o){t(e,n,r,o)})}return o=o?o.then(r,r):r()}var o;this._invoke=n}function s(e,t,n){var o=N;return function(a,i){if(o===L)throw new Error("Generator is already running");if(o===S){if("throw"===a)throw i;return h()}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=u(c,n);if(l){if(l===T)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===N)throw o=S,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=L;var s=r(e,t,n);if("normal"===s.type){if(o=n.done?S:O,s.arg===T)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=S,n.method="throw",n.arg=s.arg)}}}function u(e,t){var n=e.iterator[t.method];if(n===g){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=g,u(e,t),"throw"===t.method))return T;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return T}var o=r(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,T;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=g),t.delegate=null,T):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,T)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function m(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function f(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function d(e){if(e){var t=e[y];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(b.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=g,t.done=!0,t};return r.next=r}}return{next:h}}function h(){return{value:g,done:!0}}var g,v=Object.prototype,b=v.hasOwnProperty,w="function"===typeof Symbol?Symbol:{},y=w.iterator||"@@iterator",E=w.asyncIterator||"@@asyncIterator",x=w.toStringTag||"@@toStringTag",k="object"===typeof e,_=t.regeneratorRuntime;if(_)return void(k&&(e.exports=_));_=t.regeneratorRuntime=k?e.exports:{},_.wrap=n;var N="suspendedStart",O="suspendedYield",L="executing",S="completed",T={},C={};C[y]=function(){return this};var P=Object.getPrototypeOf,j=P&&P(P(d([])));j&&j!==v&&b.call(j,y)&&(C=j);var A=i.prototype=o.prototype=Object.create(C);a.prototype=A.constructor=i,i.constructor=a,i[x]=a.displayName="GeneratorFunction",_.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},_.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,i):(e.__proto__=i,x in e||(e[x]="GeneratorFunction")),e.prototype=Object.create(A),e},_.awrap=function(e){return{__await:e}},c(l.prototype),l.prototype[E]=function(){return this},_.AsyncIterator=l,_.async=function(e,t,r,o){var a=new l(n(e,t,r,o));return _.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},c(A),A[x]="Generator",A[y]=function(){return this},A.toString=function(){return"[object Generator]"},_.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},_.values=d,f.prototype={constructor:f,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(m),!e)for(var t in this)"t"===t.charAt(0)&&b.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=g)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return a.type="throw",a.arg=e,n.next=t,r&&(n.method="next",n.arg=g),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var i=b.call(o,"catchLoc"),c=b.call(o,"finallyLoc");if(i&&c){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(i){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&b.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,T):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),T},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),m(n),T}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;m(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:d(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=g),T}}}(function(){return this}()||Function("return this")())},function(e,t){},function(e,t){}]);
1
+ !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(1)},function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,a){try{var i=t[o](a),s=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}var o,a,i,s,c,l,u=n(2),p=n.n(u),m=n(5),f=(n.n(m),n(6)),d=(n.n(f),wp.i18n.__),h=wp.blocks.registerBlockType,g=wp.components,v=g.SelectControl,b=(g.TextControl,wp.editor.RichText,!1);h("opinion-stage/block-os-form",{title:d("Form"),icon:"editor-justify",category:"opinion-stage",keywords:[d("Opinion Stage Form"),d("Opinion Stage Form")],attributes:{embedUrl:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},oswpUrlShortcode:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},lockEmbed:{source:"attribute",attribute:"data-lock-embed",selector:"div[data-lock-embed]"},buttonText:{source:"attribute",attribute:"data-button-text",selector:"div[data-button-text]"}},edit:function(e){function t(){var t=this,n=osGutenData.OswpPluginVersion,o=osGutenData.OswpClientToken,a=osGutenData.OswpFetchDataUrl+"?type=form&page=1&per_page=99";fetch(a,{method:"GET",headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json","OSWP-Plugin-Version":n,"OSWP-Client-Token":o}}).then(function(){var n=r(p.a.mark(function n(r){var o;return p.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.json();case 2:o=t.sent,o=o.data,b=o,e.setAttributes({buttonText:"Embed"}),e.setAttributes({buttonText:m}),"Change"==m&&"Select"!=u?e.setAttributes({embedUrl:u}):e.setAttributes({embedUrl:"Select"});case 8:case"end":return t.stop()}},n,t)}));return function(e){return n.apply(this,arguments)}}()).catch(function(e){console.log("ERROR: "+e.message)})}var n=e.attributes,u=n.embedUrl,m=(n.oswpUrlShortcode,n.lockEmbed,n.buttonText),f=(e.setAttributes,function(t){if(""==t)e.setAttributes({embedUrl:""});else if(""!=t){e.setAttributes({embedUrl:t});for(var n=0;n<b.length;n++){var r=function(e){var t=document.createElement("a");return t.href=e,t}(b[n].attributes["landing-page-url"]),l=r.pathname;if(t==l){o=b[n].attributes.title,a=b[n].attributes["image-url"],i=b[n].attributes["landing-page-url"],s=b[n].attributes["edit-url"],c=b[n].attributes["stats-url"];break}}}}),d=function(t){"Embed"==t.target.value?""==u||"Select"==u||"createNew"==u||"refresh"==u?e.setAttributes({lockEmbed:!1,buttonText:"Embed"}):(e.setAttributes({lockEmbed:!0,buttonText:"Change"}),O=wp.element.createElement(v,{id:"selectID",options:l,value:u,onChange:f,className:"components-select-control__input"})):e.setAttributes({lockEmbed:!1,buttonText:"Embed"})};window.verifyOSInsert=function(t){e.setAttributes({oswpUrlShortcode:t});for(var n=document.getElementById("selectID").options,r=0;r<n.length;r++)if(n[r].value==t){n[r].defaultSelected=!0,e.setAttributes({lockEmbed:!0,buttonText:"Change",embedUrl:t});break}};var h=osGutenData.onCreateButtonClickOs+"?w_type=form&amp;utm_source=wordpress&amp;utm_campaign=WPMainPI&amp;utm_medium=link&amp;o=wp35e8",g=function(e){window.open(h,"_blank").focus()};m||e.setAttributes({buttonText:"Embed"});var w=osGutenData.callbackUrlOs,y=w,E=(osGutenData.getActionUrlOS,osGutenData.getLogoImageLink),k=function(e){window.location.replace(y)};if(""==osGutenData.isOsConnected)return $(document).ready(function(){$("span#oswpLauncherContentPopupform , #owspLaunchInputCreate").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500)})}),wp.element.createElement("div",{className:e.className},wp.element.createElement("div",{className:"os-form-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("img",{src:E,alt:""})),wp.element.createElement("p",{className:"components-heading"},"Please connect WordPress to Opinion Stage to start adding forms"),wp.element.createElement("button",{className:"components-button is-button is-default is-block is-primary",onClick:k},"Connect")),wp.element.createElement("span",null));if(0==b)l=[{value:"Select",label:"Select a form"},{value:"refresh",label:"Refresh"}],t();else{l=[{value:"Select",label:"Select a form"},{value:"refresh",label:"Refresh"},{value:"",label:"-----------------"}];for(var x=0;x<b.length;x++){l[l.length]={value:b[x].attributes["landing-page-url"].replace("https://www.opinionstage.com",""),label:b[x].attributes.title};var _=function(e){var t=document.createElement("a");return t.href=e,t}(b[x].attributes["landing-page-url"]),N=_.pathname;if(u==N){o=b[x].attributes.title,a=b[x].attributes["image-url"],i=b[x].attributes["landing-page-url"],s=b[x].attributes["edit-url"],c=b[x].attributes["stats-url"];var L=b[x].id}}}"refresh"==u&&t();var O=wp.element.createElement(v,{id:"selectID",options:l,value:u,onChange:f,className:"components-select-control__input"});$(document).ready(function(){$("span#oswpLauncherContentPopupform").live("click",function(e){console.log("oswpLauncherContentPopupform"),e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500);var t=$(this).attr("data-os-block");$("button#dropbtn span").text(t);for(var n=$(".filter__itm"),r=0;r<n.length;r++){if($(n[r]).text()==t){setTimeout(function(){$(n[r]).trigger("click")},1e3),setTimeout(function(){$(".progress_message").css("display","none"),$(".content__list").css("display","block")},2500),$("button.content__links-itm").live("click",function(e){$(".tingle-modal.opinionstage-content-popup").hide(),$(".tingle-modal.opinionstage-content-popup.tingle-modal--visible").hide()});break}$(".progress_message").css("display","block"),$(".content__list").css("display","none"),console.log("test")}})});var S=wp.element.createElement("div",{className:"os-form-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("img",{src:E,alt:""})),wp.element.createElement("span",{id:"oswpLauncherContentPopupform",className:"components-button is-button is-default is-block is-primary","data-opinionstage-content-launch":!0,"data-os-block":"form"},"Select a Form"),wp.element.createElement("input",{type:"button",value:"Create a New Form",className:"components-button is-button is-default is-block is-primary",onClick:g}),wp.element.createElement("div",{className:"components-placeholder__fieldset"},O,wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large",id:"clickMe",onClick:d})));return function(e,t,n){var r,o=e.getElementsByTagName(t)[0],a=Math.floor((new Date).getTime()/1e6);e.getElementById(n)||(r=e.createElement(t),r.id=n,r.async=1,r.src="https://www.opinionstage.com/assets/loader.js?"+a,o.parentNode.insertBefore(r,o))}(document,"script","os-widget-jssdk"),L="os-widget-"+L,""!=u&&"Select"!=u&&u?"Embed"==m||"Change"==m&&(S=wp.element.createElement("div",{className:"os-form-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("img",{src:E,alt:""})),wp.element.createElement("div",{className:"components-preview__block"},wp.element.createElement("div",{className:"components-preview__leftBlockImage"},wp.element.createElement("img",{src:a,alt:o,className:"image"}),wp.element.createElement("div",{className:"overlay"},wp.element.createElement("div",{className:"text"},wp.element.createElement("a",{href:i,target:"_blank"}," View "),wp.element.createElement("a",{href:s,target:"_blank"}," Edit "),wp.element.createElement("a",{href:c,target:"_blank"}," Statistics "),wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large left-align",onClick:d})))),wp.element.createElement("div",{className:"components-preview__rightBlockContent"},wp.element.createElement("div",{className:"components-placeholder__label"},"Form: ",o)))),O=wp.element.createElement(v,{id:"selectID",options:l,value:u,disabled:!0,onChange:f,className:"components-select-control__input"})):"Select"==u||""==u||"refresh"==u||e.setAttributes({buttonText:"Embed"}),wp.element.createElement("div",{className:e.className},S)},save:function(e){var t=e.attributes,n=(t.embedUrl,t.oswpUrlShortcode),r=t.lockEmbed,o=t.buttonText;return wp.element.createElement("div",{class:"os-form-wrapper","data-type":"form","data-test-url":n,"data-lock-embed":r,"data-button-text":o},'[os-widget path="',n,'"]')}})},function(e,t,n){e.exports=n(3)},function(e,t,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,a=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(4),o)r.regeneratorRuntime=a;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";function n(e,t,n,r){var a=t&&t.prototype instanceof o?t:o,i=Object.create(a.prototype),s=new f(r||[]);return i._invoke=l(e,n,s),i}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function o(){}function a(){}function i(){}function s(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function c(e){function t(n,o,a,i){var s=r(e[n],e,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"===typeof l&&b.call(l,"__await")?Promise.resolve(l.__await).then(function(e){t("next",e,a,i)},function(e){t("throw",e,a,i)}):Promise.resolve(l).then(function(e){c.value=e,a(c)},i)}i(s.arg)}function n(e,n){function r(){return new Promise(function(r,o){t(e,n,r,o)})}return o=o?o.then(r,r):r()}var o;this._invoke=n}function l(e,t,n){var o=N;return function(a,i){if(o===O)throw new Error("Generator is already running");if(o===S){if("throw"===a)throw i;return h()}for(n.method=a,n.arg=i;;){var s=n.delegate;if(s){var c=u(s,n);if(c){if(c===T)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===N)throw o=S,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=O;var l=r(e,t,n);if("normal"===l.type){if(o=n.done?S:L,l.arg===T)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=S,n.method="throw",n.arg=l.arg)}}}function u(e,t){var n=e.iterator[t.method];if(n===g){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=g,u(e,t),"throw"===t.method))return T;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return T}var o=r(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,T;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=g),t.delegate=null,T):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,T)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function m(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function f(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function d(e){if(e){var t=e[y];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(b.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=g,t.done=!0,t};return r.next=r}}return{next:h}}function h(){return{value:g,done:!0}}var g,v=Object.prototype,b=v.hasOwnProperty,w="function"===typeof Symbol?Symbol:{},y=w.iterator||"@@iterator",E=w.asyncIterator||"@@asyncIterator",k=w.toStringTag||"@@toStringTag",x="object"===typeof e,_=t.regeneratorRuntime;if(_)return void(x&&(e.exports=_));_=t.regeneratorRuntime=x?e.exports:{},_.wrap=n;var N="suspendedStart",L="suspendedYield",O="executing",S="completed",T={},C={};C[y]=function(){return this};var P=Object.getPrototypeOf,j=P&&P(P(d([])));j&&j!==v&&b.call(j,y)&&(C=j);var A=i.prototype=o.prototype=Object.create(C);a.prototype=A.constructor=i,i.constructor=a,i[k]=a.displayName="GeneratorFunction",_.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},_.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,i):(e.__proto__=i,k in e||(e[k]="GeneratorFunction")),e.prototype=Object.create(A),e},_.awrap=function(e){return{__await:e}},s(c.prototype),c.prototype[E]=function(){return this},_.AsyncIterator=c,_.async=function(e,t,r,o){var a=new c(n(e,t,r,o));return _.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},s(A),A[k]="Generator",A[y]=function(){return this},A.toString=function(){return"[object Generator]"},_.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},_.values=d,f.prototype={constructor:f,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(m),!e)for(var t in this)"t"===t.charAt(0)&&b.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=g)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return a.type="throw",a.arg=e,n.next=t,r&&(n.method="next",n.arg=g),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var i=b.call(o,"catchLoc"),s=b.call(o,"finallyLoc");if(i&&s){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(i){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&b.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,T):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),T},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),m(n),T}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;m(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:d(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=g),T}}}(function(){return this}()||Function("return this")())},function(e,t){},function(e,t){}]);
gutenberg/form/src/block/block.js CHANGED
@@ -156,8 +156,8 @@ var options;
156
  return (
157
  <div className={ props.className }>
158
  <div className="os-form-wrapper components-placeholder">
159
- <p className="components-heading"><span><img src={getlogoImageLinkOs} alt=""/></span> Opinion Stage</p>
160
- <p className="components-heading">Please connect Opinion Stage to WordPress to start adding forms</p>
161
  <button className="components-button is-button is-default is-block is-primary" onClick={onConnectOSWPButtonClick}>Connect</button>
162
  </div>
163
  </div>
@@ -196,6 +196,8 @@ var options;
196
  }
197
  var contentDropdown = (<SelectControl id="selectID" options={options} value={embedUrl} onChange={onDropdownChange} className="components-select-control__input" />);
198
  $(document).ready(function () {
 
 
199
  $('span#oswpLauncherContentPopupform').live('click', function(e) {
200
  e.preventDefault();
201
  setTimeout(function(){$('.editor-post-save-draft').trigger('click');},500);
@@ -204,20 +206,29 @@ var options;
204
  var inputs = $(".filter__itm");
205
  for(var i = 0; i < inputs.length; i++){
206
  if($(inputs[i]).text() == text){
207
- setTimeout(function(){$(inputs[i]).trigger('click');},2000);
 
 
 
 
208
  $('button.content__links-itm').live('click', function(e) {
209
  $('.tingle-modal.opinionstage-content-popup').hide();
210
  $('.tingle-modal.opinionstage-content-popup.tingle-modal--visible').hide();
211
  });
212
  break;
213
  }
 
 
 
 
 
214
  }
215
  });
216
  });
217
 
218
  var contentViewEditStatOs = (
219
  <div className="os-form-wrapper components-placeholder">
220
- <p className="components-heading"><span><img src={getlogoImageLinkOs} alt=""/></span> Opinion Stage</p>
221
  <span id="oswpLauncherContentPopupform" className="components-button is-button is-default is-block is-primary" data-opinionstage-content-launch data-os-block="form">Select a Form</span>
222
  <input type="button" value="Create a New Form" className="components-button is-button is-default is-block is-primary" onClick={onCreateButtonClick} />
223
  <div className="components-placeholder__fieldset">
@@ -246,7 +257,7 @@ var options;
246
  }else if(buttonText == 'Change'){
247
  contentViewEditStatOs = (
248
  <div className="os-form-wrapper components-placeholder">
249
- <p className="components-heading"><span><img src={getlogoImageLinkOs} alt=""/></span> Opinion Stage</p>
250
  <div className="components-preview__block" >
251
  <div className="components-preview__leftBlockImage">
252
  <img src={previewBlockOsImageUrl} alt={previewBlockOsTitle} className="image" />
156
  return (
157
  <div className={ props.className }>
158
  <div className="os-form-wrapper components-placeholder">
159
+ <p className="components-heading"><img src={getlogoImageLinkOs} alt=""/></p>
160
+ <p className="components-heading">Please connect WordPress to Opinion Stage to start adding forms</p>
161
  <button className="components-button is-button is-default is-block is-primary" onClick={onConnectOSWPButtonClick}>Connect</button>
162
  </div>
163
  </div>
196
  }
197
  var contentDropdown = (<SelectControl id="selectID" options={options} value={embedUrl} onChange={onDropdownChange} className="components-select-control__input" />);
198
  $(document).ready(function () {
199
+ $('.progress_message').css('display', 'block');
200
+ $('.content__list').css('display', 'none');
201
  $('span#oswpLauncherContentPopupform').live('click', function(e) {
202
  e.preventDefault();
203
  setTimeout(function(){$('.editor-post-save-draft').trigger('click');},500);
206
  var inputs = $(".filter__itm");
207
  for(var i = 0; i < inputs.length; i++){
208
  if($(inputs[i]).text() == text){
209
+ setTimeout(function(){$(inputs[i]).trigger('click');},1000);
210
+ setTimeout(function(){
211
+ $('.progress_message').css('display', 'none');
212
+ $('.content__list').css('display', 'block');
213
+ },2500);
214
  $('button.content__links-itm').live('click', function(e) {
215
  $('.tingle-modal.opinionstage-content-popup').hide();
216
  $('.tingle-modal.opinionstage-content-popup.tingle-modal--visible').hide();
217
  });
218
  break;
219
  }
220
+ else {
221
+ $('.progress_message').css('display', 'block');
222
+ $('.content__list').css('display', 'none');
223
+ console.log('test');
224
+ }
225
  }
226
  });
227
  });
228
 
229
  var contentViewEditStatOs = (
230
  <div className="os-form-wrapper components-placeholder">
231
+ <p className="components-heading"><img src={getlogoImageLinkOs} alt=""/></p>
232
  <span id="oswpLauncherContentPopupform" className="components-button is-button is-default is-block is-primary" data-opinionstage-content-launch data-os-block="form">Select a Form</span>
233
  <input type="button" value="Create a New Form" className="components-button is-button is-default is-block is-primary" onClick={onCreateButtonClick} />
234
  <div className="components-placeholder__fieldset">
257
  }else if(buttonText == 'Change'){
258
  contentViewEditStatOs = (
259
  <div className="os-form-wrapper components-placeholder">
260
+ <p className="components-heading"><img src={getlogoImageLinkOs} alt=""/></p>
261
  <div className="components-preview__block" >
262
  <div className="components-preview__leftBlockImage">
263
  <img src={previewBlockOsImageUrl} alt={previewBlockOsTitle} className="image" />
gutenberg/image/os-logo.png ADDED
Binary file
gutenberg/init.php CHANGED
@@ -62,7 +62,7 @@ function oswp_gutenberg_enqueue_scripts() {
62
  $getUrlFormAction = 'https://www.opinionstage.com/integrations/wordpress/new';
63
 
64
  // Opninionstge logo image link
65
- $logoImagelinkOs = plugin_dir_url( __FILE__ ) . 'image/gutenberg-os.png';
66
 
67
  // Data to pass to gutenberg editor
68
  $dataToPass = array(
62
  $getUrlFormAction = 'https://www.opinionstage.com/integrations/wordpress/new';
63
 
64
  // Opninionstge logo image link
65
+ $logoImagelinkOs = plugin_dir_url( __FILE__ ) . 'image/os-logo.png';
66
 
67
  // Data to pass to gutenberg editor
68
  $dataToPass = array(
gutenberg/personality/dist/blocks.build.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(1)},function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,a){try{var i=t[o](a),l=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(l).then(function(e){r("next",e)},function(e){r("throw",e)});e(l)}return r("next")})}}var o,a,i,l,s,c,u=n(2),p=n.n(u),m=n(5),f=(n.n(m),n(6)),d=(n.n(f),wp.i18n.__),h=wp.blocks.registerBlockType,g=wp.components,v=g.SelectControl,b=(g.TextControl,wp.editor.RichText,!1);h("opinion-stage/block-os-personality",{title:d("Personality Quiz"),icon:"smiley",category:"opinion-stage",keywords:[d("Opinion Stage Personality Quiz"),d("Opinion Stage Personality")],attributes:{embedUrl:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},oswpUrlShortcode:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},lockEmbed:{source:"attribute",attribute:"data-lock-embed",selector:"div[data-lock-embed]"},buttonText:{source:"attribute",attribute:"data-button-text",selector:"div[data-button-text]"}},edit:function(e){function t(){var t=this,n=osGutenData.OswpPluginVersion,o=osGutenData.OswpClientToken,a=osGutenData.OswpFetchDataUrl+"?type=outcome&page=1&per_page=99";fetch(a,{method:"GET",headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json","OSWP-Plugin-Version":n,"OSWP-Client-Token":o}}).then(function(){var n=r(p.a.mark(function n(r){var o;return p.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.json();case 2:o=t.sent,o=o.data,b=o,e.setAttributes({buttonText:"Embed"}),e.setAttributes({buttonText:m}),"Change"==m&&"Select"!=u?e.setAttributes({embedUrl:u}):e.setAttributes({embedUrl:"Select"});case 8:case"end":return t.stop()}},n,t)}));return function(e){return n.apply(this,arguments)}}()).catch(function(e){console.log("ERROR: "+e.message)})}var n=e.attributes,u=n.embedUrl,m=(n.oswpUrlShortcode,n.lockEmbed,n.buttonText),f=(e.setAttributes,function(t){if(""==t)e.setAttributes({embedUrl:""});else if(""!=t){e.setAttributes({embedUrl:t});for(var n=0;n<b.length;n++){var r=function(e){var t=document.createElement("a");return t.href=e,t}(b[n].attributes["landing-page-url"]),c=r.pathname;if(t==c){o=b[n].attributes.title,a=b[n].attributes["image-url"],i=b[n].attributes["landing-page-url"],l=b[n].attributes["edit-url"],s=b[n].attributes["stats-url"];break}}}}),d=function(t){"Embed"==t.target.value?""==u||"Select"==u||"createNew"==u||"refresh"==u?e.setAttributes({lockEmbed:!1,buttonText:"Embed"}):(e.setAttributes({lockEmbed:!0,buttonText:"Change"}),L=wp.element.createElement(v,{id:"selectID",options:c,value:u,onChange:f,className:"components-select-control__input"})):e.setAttributes({lockEmbed:!1,buttonText:"Embed"})};window.verifyOSInsert=function(t){e.setAttributes({oswpUrlShortcode:t});for(var n=document.getElementById("selectID").options,r=0;r<n.length;r++)if(n[r].value==t){n[r].defaultSelected=!0,e.setAttributes({lockEmbed:!0,buttonText:"Change",embedUrl:t});break}};var h=osGutenData.onCreateButtonClickOs+"?w_type=outcome&amp;utm_source=wordpress&amp;utm_campaign=WPMainPI&amp;utm_medium=link&amp;o=wp35e8",g=function(e){window.open(h,"_blank").focus()};m||e.setAttributes({buttonText:"Embed"});var y=osGutenData.callbackUrlOs,w=y,E=(osGutenData.getActionUrlOS,osGutenData.getLogoImageLink),x=function(e){window.location.replace(w)};if(""==osGutenData.isOsConnected)return $(document).ready(function(){$("span#oswpLauncherContentPopuppersonality , #owspLaunchInputCreate").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500)})}),wp.element.createElement("div",{className:e.className},wp.element.createElement("div",{className:"os-personality-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("span",null,wp.element.createElement("img",{src:E,alt:""}))," Opinion Stage"),wp.element.createElement("p",{className:"components-heading"},"Please connect Opinion Stage to WordPress to start adding personality quizzes"),wp.element.createElement("button",{className:"components-button is-button is-default is-block is-primary",onClick:x},"Connect")));if(0==b)c=[{value:"Select",label:"Select a personality"},{value:"refresh",label:"Refresh"}],t();else{c=[{value:"Select",label:"Select a personality"},{value:"refresh",label:"Refresh"},{value:"",label:"-----------------"}];for(var k=0;k<b.length;k++){c[c.length]={value:b[k].attributes["landing-page-url"].replace("https://www.opinionstage.com",""),label:b[k].attributes.title};var _=function(e){var t=document.createElement("a");return t.href=e,t}(b[k].attributes["landing-page-url"]),N=_.pathname;if(u==N){o=b[k].attributes.title,a=b[k].attributes["image-url"],i=b[k].attributes["landing-page-url"],l=b[k].attributes["edit-url"],s=b[k].attributes["stats-url"];var O=b[k].id}}}"refresh"==u&&t();var L=wp.element.createElement(v,{id:"selectID",options:c,value:u,onChange:f,className:"components-select-control__input"});$(document).ready(function(){$("span#oswpLauncherContentPopuppersonality").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500);var t=$(this).attr("data-os-block");$("button#dropbtn span").text(t);for(var n=$(".filter__itm"),r=0;r<n.length;r++)if($(n[r]).text()==t){setTimeout(function(){$(n[r]).trigger("click")},2e3),$("button.content__links-itm").live("click",function(e){$(".tingle-modal.opinionstage-content-popup").hide(),$(".tingle-modal.opinionstage-content-popup.tingle-modal--visible").hide()});break}})});var S=wp.element.createElement("div",{className:"os-personality-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("span",null,wp.element.createElement("img",{src:E,alt:""}))," Opinion Stage"),wp.element.createElement("span",{id:"oswpLauncherContentPopuppersonality",className:"components-button is-button is-default is-block is-primary","data-opinionstage-content-launch":!0,"data-os-block":"personality quiz"},"Select a Personality Quiz"),wp.element.createElement("input",{type:"button",value:"Create a New Personality Quiz",className:"components-button is-button is-default is-block is-primary",onClick:g}),wp.element.createElement("div",{className:"components-placeholder__fieldset"},L,wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large",id:"clickMe",onClick:d})));return function(e,t,n){var r,o=e.getElementsByTagName(t)[0],a=Math.floor((new Date).getTime()/1e6);e.getElementById(n)||(r=e.createElement(t),r.id=n,r.async=1,r.src="https://www.opinionstage.com/assets/loader.js?"+a,o.parentNode.insertBefore(r,o))}(document,"script","os-widget-jssdk"),O="os-widget-"+O,""!=u&&"Select"!=u&&u?"Embed"==m||"Change"==m&&(S=wp.element.createElement("div",{className:"os-personality-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("span",null,wp.element.createElement("img",{src:E,alt:""}))," Opinion Stage"),wp.element.createElement("div",{className:"components-preview__block"},wp.element.createElement("div",{className:"components-preview__leftBlockImage"},wp.element.createElement("img",{src:a,alt:o,className:"image"}),wp.element.createElement("div",{className:"overlay"},wp.element.createElement("div",{className:"text"},wp.element.createElement("a",{href:i,target:"_blank"}," View "),wp.element.createElement("a",{href:l,target:"_blank"}," Edit "),wp.element.createElement("a",{href:s,target:"_blank"}," Statistics "),wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large left-align",onClick:d})))),wp.element.createElement("div",{className:"components-preview__rightBlockContent"},wp.element.createElement("div",{className:"components-placeholder__label"},"Personality: ",o)))),L=wp.element.createElement(v,{id:"selectID",options:c,value:u,disabled:!0,onChange:f,className:"components-select-control__input"})):"Select"==u||""==u||"refresh"==u||e.setAttributes({buttonText:"Embed"}),wp.element.createElement("div",{className:e.className},S)},save:function(e){var t=e.attributes,n=(t.embedUrl,t.oswpUrlShortcode),r=t.lockEmbed,o=t.buttonText;return wp.element.createElement("div",{class:"os-personality-wrapper","data-type":"personality","data-test-url":n,"data-lock-embed":r,"data-button-text":o},'[os-widget path="',n,'"]')}})},function(e,t,n){e.exports=n(3)},function(e,t,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,a=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(4),o)r.regeneratorRuntime=a;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";function n(e,t,n,r){var a=t&&t.prototype instanceof o?t:o,i=Object.create(a.prototype),l=new f(r||[]);return i._invoke=c(e,n,l),i}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function o(){}function a(){}function i(){}function l(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function s(e){function t(n,o,a,i){var l=r(e[n],e,o);if("throw"!==l.type){var s=l.arg,c=s.value;return c&&"object"===typeof c&&b.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,a,i)},function(e){t("throw",e,a,i)}):Promise.resolve(c).then(function(e){s.value=e,a(s)},i)}i(l.arg)}function n(e,n){function r(){return new Promise(function(r,o){t(e,n,r,o)})}return o=o?o.then(r,r):r()}var o;this._invoke=n}function c(e,t,n){var o=N;return function(a,i){if(o===L)throw new Error("Generator is already running");if(o===S){if("throw"===a)throw i;return h()}for(n.method=a,n.arg=i;;){var l=n.delegate;if(l){var s=u(l,n);if(s){if(s===P)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===N)throw o=S,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=L;var c=r(e,t,n);if("normal"===c.type){if(o=n.done?S:O,c.arg===P)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=S,n.method="throw",n.arg=c.arg)}}}function u(e,t){var n=e.iterator[t.method];if(n===g){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=g,u(e,t),"throw"===t.method))return P;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return P}var o=r(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,P;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=g),t.delegate=null,P):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,P)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function m(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function f(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function d(e){if(e){var t=e[w];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(b.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=g,t.done=!0,t};return r.next=r}}return{next:h}}function h(){return{value:g,done:!0}}var g,v=Object.prototype,b=v.hasOwnProperty,y="function"===typeof Symbol?Symbol:{},w=y.iterator||"@@iterator",E=y.asyncIterator||"@@asyncIterator",x=y.toStringTag||"@@toStringTag",k="object"===typeof e,_=t.regeneratorRuntime;if(_)return void(k&&(e.exports=_));_=t.regeneratorRuntime=k?e.exports:{},_.wrap=n;var N="suspendedStart",O="suspendedYield",L="executing",S="completed",P={},T={};T[w]=function(){return this};var C=Object.getPrototypeOf,j=C&&C(C(d([])));j&&j!==v&&b.call(j,w)&&(T=j);var A=i.prototype=o.prototype=Object.create(T);a.prototype=A.constructor=i,i.constructor=a,i[x]=a.displayName="GeneratorFunction",_.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},_.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,i):(e.__proto__=i,x in e||(e[x]="GeneratorFunction")),e.prototype=Object.create(A),e},_.awrap=function(e){return{__await:e}},l(s.prototype),s.prototype[E]=function(){return this},_.AsyncIterator=s,_.async=function(e,t,r,o){var a=new s(n(e,t,r,o));return _.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},l(A),A[x]="Generator",A[w]=function(){return this},A.toString=function(){return"[object Generator]"},_.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},_.values=d,f.prototype={constructor:f,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(m),!e)for(var t in this)"t"===t.charAt(0)&&b.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=g)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return a.type="throw",a.arg=e,n.next=t,r&&(n.method="next",n.arg=g),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var i=b.call(o,"catchLoc"),l=b.call(o,"finallyLoc");if(i&&l){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(i){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&b.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,P):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),P},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),m(n),P}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;m(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:d(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=g),P}}}(function(){return this}()||Function("return this")())},function(e,t){},function(e,t){}]);
1
+ !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(1)},function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,a){try{var i=t[o](a),s=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}var o,a,i,s,l,c,u=n(2),p=n.n(u),m=n(5),f=(n.n(m),n(6)),d=(n.n(f),wp.i18n.__),h=wp.blocks.registerBlockType,g=wp.components,v=g.SelectControl,b=(g.TextControl,wp.editor.RichText,!1);h("opinion-stage/block-os-personality",{title:d("Personality Quiz"),icon:"smiley",category:"opinion-stage",keywords:[d("Opinion Stage Personality Quiz"),d("Opinion Stage Personality")],attributes:{embedUrl:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},oswpUrlShortcode:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},lockEmbed:{source:"attribute",attribute:"data-lock-embed",selector:"div[data-lock-embed]"},buttonText:{source:"attribute",attribute:"data-button-text",selector:"div[data-button-text]"}},edit:function(e){function t(){var t=this,n=osGutenData.OswpPluginVersion,o=osGutenData.OswpClientToken,a=osGutenData.OswpFetchDataUrl+"?type=outcome&page=1&per_page=99";fetch(a,{method:"GET",headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json","OSWP-Plugin-Version":n,"OSWP-Client-Token":o}}).then(function(){var n=r(p.a.mark(function n(r){var o;return p.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.json();case 2:o=t.sent,o=o.data,b=o,e.setAttributes({buttonText:"Embed"}),e.setAttributes({buttonText:m}),"Change"==m&&"Select"!=u?e.setAttributes({embedUrl:u}):e.setAttributes({embedUrl:"Select"});case 8:case"end":return t.stop()}},n,t)}));return function(e){return n.apply(this,arguments)}}()).catch(function(e){console.log("ERROR: "+e.message)})}var n=e.attributes,u=n.embedUrl,m=(n.oswpUrlShortcode,n.lockEmbed,n.buttonText),f=(e.setAttributes,function(t){if(""==t)e.setAttributes({embedUrl:""});else if(""!=t){e.setAttributes({embedUrl:t});for(var n=0;n<b.length;n++){var r=function(e){var t=document.createElement("a");return t.href=e,t}(b[n].attributes["landing-page-url"]),c=r.pathname;if(t==c){o=b[n].attributes.title,a=b[n].attributes["image-url"],i=b[n].attributes["landing-page-url"],s=b[n].attributes["edit-url"],l=b[n].attributes["stats-url"];break}}}}),d=function(t){"Embed"==t.target.value?""==u||"Select"==u||"createNew"==u||"refresh"==u?e.setAttributes({lockEmbed:!1,buttonText:"Embed"}):(e.setAttributes({lockEmbed:!0,buttonText:"Change"}),O=wp.element.createElement(v,{id:"selectID",options:c,value:u,onChange:f,className:"components-select-control__input"})):e.setAttributes({lockEmbed:!1,buttonText:"Embed"})};window.verifyOSInsert=function(t){e.setAttributes({oswpUrlShortcode:t});for(var n=document.getElementById("selectID").options,r=0;r<n.length;r++)if(n[r].value==t){n[r].defaultSelected=!0,e.setAttributes({lockEmbed:!0,buttonText:"Change",embedUrl:t});break}};var h=osGutenData.onCreateButtonClickOs+"?w_type=outcome&amp;utm_source=wordpress&amp;utm_campaign=WPMainPI&amp;utm_medium=link&amp;o=wp35e8",g=function(e){window.open(h,"_blank").focus()};m||e.setAttributes({buttonText:"Embed"});var y=osGutenData.callbackUrlOs,w=y,E=(osGutenData.getActionUrlOS,osGutenData.getLogoImageLink),k=function(e){window.location.replace(w)};if(""==osGutenData.isOsConnected)return $(document).ready(function(){$("span#oswpLauncherContentPopuppersonality , #owspLaunchInputCreate").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500)})}),wp.element.createElement("div",{className:e.className},wp.element.createElement("div",{className:"os-personality-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("img",{src:E,alt:""})),wp.element.createElement("p",{className:"components-heading"},"Please connect WordPress to Opinion Stage to start adding personality"),wp.element.createElement("button",{className:"components-button is-button is-default is-block is-primary",onClick:k},"Connect")));if(0==b)c=[{value:"Select",label:"Select a personality"},{value:"refresh",label:"Refresh"}],t();else{c=[{value:"Select",label:"Select a personality"},{value:"refresh",label:"Refresh"},{value:"",label:"-----------------"}];for(var x=0;x<b.length;x++){c[c.length]={value:b[x].attributes["landing-page-url"].replace("https://www.opinionstage.com",""),label:b[x].attributes.title};var _=function(e){var t=document.createElement("a");return t.href=e,t}(b[x].attributes["landing-page-url"]),N=_.pathname;if(u==N){o=b[x].attributes.title,a=b[x].attributes["image-url"],i=b[x].attributes["landing-page-url"],s=b[x].attributes["edit-url"],l=b[x].attributes["stats-url"];var L=b[x].id}}}"refresh"==u&&t();var O=wp.element.createElement(v,{id:"selectID",options:c,value:u,onChange:f,className:"components-select-control__input"});$(document).ready(function(){$("span#oswpLauncherContentPopuppersonality").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500);var t=$(this).attr("data-os-block");$("button#dropbtn span").text(t);for(var n=$(".filter__itm"),r=0;r<n.length;r++){if($(n[r]).text()==t){setTimeout(function(){$(n[r]).trigger("click")},1e3),setTimeout(function(){$(".progress_message").css("display","none"),$(".content__list").css("display","block")},2500),$("button.content__links-itm").live("click",function(e){$(".tingle-modal.opinionstage-content-popup").hide(),$(".tingle-modal.opinionstage-content-popup.tingle-modal--visible").hide()});break}$(".progress_message").css("display","block"),$(".content__list").css("display","none"),console.log("test")}})});var P=wp.element.createElement("div",{className:"os-personality-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("img",{src:E,alt:""})),wp.element.createElement("span",{id:"oswpLauncherContentPopuppersonality",className:"components-button is-button is-default is-block is-primary","data-opinionstage-content-launch":!0,"data-os-block":"personality quiz"},"Select a Personality Quiz"),wp.element.createElement("input",{type:"button",value:"Create a New Personality Quiz",className:"components-button is-button is-default is-block is-primary",onClick:g}),wp.element.createElement("div",{className:"components-placeholder__fieldset"},O,wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large",id:"clickMe",onClick:d})));return function(e,t,n){var r,o=e.getElementsByTagName(t)[0],a=Math.floor((new Date).getTime()/1e6);e.getElementById(n)||(r=e.createElement(t),r.id=n,r.async=1,r.src="https://www.opinionstage.com/assets/loader.js?"+a,o.parentNode.insertBefore(r,o))}(document,"script","os-widget-jssdk"),L="os-widget-"+L,""!=u&&"Select"!=u&&u?"Embed"==m||"Change"==m&&(P=wp.element.createElement("div",{className:"os-personality-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("img",{src:E,alt:""})),wp.element.createElement("div",{className:"components-preview__block"},wp.element.createElement("div",{className:"components-preview__leftBlockImage"},wp.element.createElement("img",{src:a,alt:o,className:"image"}),wp.element.createElement("div",{className:"overlay"},wp.element.createElement("div",{className:"text"},wp.element.createElement("a",{href:i,target:"_blank"}," View "),wp.element.createElement("a",{href:s,target:"_blank"}," Edit "),wp.element.createElement("a",{href:l,target:"_blank"}," Statistics "),wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large left-align",onClick:d})))),wp.element.createElement("div",{className:"components-preview__rightBlockContent"},wp.element.createElement("div",{className:"components-placeholder__label"},"Personality Quiz: ",o)))),O=wp.element.createElement(v,{id:"selectID",options:c,value:u,disabled:!0,onChange:f,className:"components-select-control__input"})):"Select"==u||""==u||"refresh"==u||e.setAttributes({buttonText:"Embed"}),wp.element.createElement("div",{className:e.className},P)},save:function(e){var t=e.attributes,n=(t.embedUrl,t.oswpUrlShortcode),r=t.lockEmbed,o=t.buttonText;return wp.element.createElement("div",{class:"os-personality-wrapper","data-type":"personality","data-test-url":n,"data-lock-embed":r,"data-button-text":o},'[os-widget path="',n,'"]')}})},function(e,t,n){e.exports=n(3)},function(e,t,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,a=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(4),o)r.regeneratorRuntime=a;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";function n(e,t,n,r){var a=t&&t.prototype instanceof o?t:o,i=Object.create(a.prototype),s=new f(r||[]);return i._invoke=c(e,n,s),i}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function o(){}function a(){}function i(){}function s(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function l(e){function t(n,o,a,i){var s=r(e[n],e,o);if("throw"!==s.type){var l=s.arg,c=l.value;return c&&"object"===typeof c&&b.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,a,i)},function(e){t("throw",e,a,i)}):Promise.resolve(c).then(function(e){l.value=e,a(l)},i)}i(s.arg)}function n(e,n){function r(){return new Promise(function(r,o){t(e,n,r,o)})}return o=o?o.then(r,r):r()}var o;this._invoke=n}function c(e,t,n){var o=N;return function(a,i){if(o===O)throw new Error("Generator is already running");if(o===P){if("throw"===a)throw i;return h()}for(n.method=a,n.arg=i;;){var s=n.delegate;if(s){var l=u(s,n);if(l){if(l===S)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===N)throw o=P,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=O;var c=r(e,t,n);if("normal"===c.type){if(o=n.done?P:L,c.arg===S)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=P,n.method="throw",n.arg=c.arg)}}}function u(e,t){var n=e.iterator[t.method];if(n===g){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=g,u(e,t),"throw"===t.method))return S;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return S}var o=r(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,S;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=g),t.delegate=null,S):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,S)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function m(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function f(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function d(e){if(e){var t=e[w];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(b.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=g,t.done=!0,t};return r.next=r}}return{next:h}}function h(){return{value:g,done:!0}}var g,v=Object.prototype,b=v.hasOwnProperty,y="function"===typeof Symbol?Symbol:{},w=y.iterator||"@@iterator",E=y.asyncIterator||"@@asyncIterator",k=y.toStringTag||"@@toStringTag",x="object"===typeof e,_=t.regeneratorRuntime;if(_)return void(x&&(e.exports=_));_=t.regeneratorRuntime=x?e.exports:{},_.wrap=n;var N="suspendedStart",L="suspendedYield",O="executing",P="completed",S={},T={};T[w]=function(){return this};var C=Object.getPrototypeOf,j=C&&C(C(d([])));j&&j!==v&&b.call(j,w)&&(T=j);var A=i.prototype=o.prototype=Object.create(T);a.prototype=A.constructor=i,i.constructor=a,i[k]=a.displayName="GeneratorFunction",_.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},_.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,i):(e.__proto__=i,k in e||(e[k]="GeneratorFunction")),e.prototype=Object.create(A),e},_.awrap=function(e){return{__await:e}},s(l.prototype),l.prototype[E]=function(){return this},_.AsyncIterator=l,_.async=function(e,t,r,o){var a=new l(n(e,t,r,o));return _.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},s(A),A[k]="Generator",A[w]=function(){return this},A.toString=function(){return"[object Generator]"},_.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},_.values=d,f.prototype={constructor:f,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(m),!e)for(var t in this)"t"===t.charAt(0)&&b.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=g)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return a.type="throw",a.arg=e,n.next=t,r&&(n.method="next",n.arg=g),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var i=b.call(o,"catchLoc"),s=b.call(o,"finallyLoc");if(i&&s){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(i){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&b.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,S):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),S},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),m(n),S}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;m(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:d(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=g),S}}}(function(){return this}()||Function("return this")())},function(e,t){},function(e,t){}]);
gutenberg/personality/src/block/block.js CHANGED
@@ -156,8 +156,8 @@ var options;
156
  return (
157
  <div className={ props.className }>
158
  <div className="os-personality-wrapper components-placeholder">
159
- <p className="components-heading"><span><img src={getlogoImageLinkOs} alt=""/></span> Opinion Stage</p>
160
- <p className="components-heading">Please connect Opinion Stage to WordPress to start adding personality quizzes</p>
161
  <button className="components-button is-button is-default is-block is-primary" onClick={onConnectOSWPButtonClick}>Connect</button>
162
  </div>
163
  </div>
@@ -204,20 +204,29 @@ var options;
204
  var inputs = $(".filter__itm");
205
  for(var i = 0; i < inputs.length; i++){
206
  if($(inputs[i]).text() == text){
207
- setTimeout(function(){$(inputs[i]).trigger('click');},2000);
 
 
 
 
208
  $('button.content__links-itm').live('click', function(e) {
209
  $('.tingle-modal.opinionstage-content-popup').hide();
210
  $('.tingle-modal.opinionstage-content-popup.tingle-modal--visible').hide();
211
  });
212
  break;
213
  }
 
 
 
 
 
214
  }
215
  });
216
  });
217
 
218
  var contentViewEditStatOs = (
219
  <div className="os-personality-wrapper components-placeholder">
220
- <p className="components-heading"><span><img src={getlogoImageLinkOs} alt=""/></span> Opinion Stage</p>
221
  <span id="oswpLauncherContentPopuppersonality" className="components-button is-button is-default is-block is-primary" data-opinionstage-content-launch data-os-block="personality quiz">Select a Personality Quiz</span>
222
  <input type="button" value="Create a New Personality Quiz" className="components-button is-button is-default is-block is-primary" onClick={onCreateButtonClick} />
223
  <div className="components-placeholder__fieldset">
@@ -246,7 +255,7 @@ var options;
246
  }else if(buttonText == 'Change'){
247
  contentViewEditStatOs = (
248
  <div className="os-personality-wrapper components-placeholder">
249
- <p className="components-heading"><span><img src={getlogoImageLinkOs} alt=""/></span> Opinion Stage</p>
250
  <div className="components-preview__block" >
251
  <div className="components-preview__leftBlockImage">
252
  <img src={previewBlockOsImageUrl} alt={previewBlockOsTitle} className="image" />
@@ -260,7 +269,7 @@ var options;
260
  </div>
261
  </div>
262
  <div className="components-preview__rightBlockContent">
263
- <div className="components-placeholder__label">Personality: {previewBlockOsTitle}</div>
264
  </div>
265
  </div>
266
  </div>
156
  return (
157
  <div className={ props.className }>
158
  <div className="os-personality-wrapper components-placeholder">
159
+ <p className="components-heading"><img src={getlogoImageLinkOs} alt=""/></p>
160
+ <p className="components-heading">Please connect WordPress to Opinion Stage to start adding personality</p>
161
  <button className="components-button is-button is-default is-block is-primary" onClick={onConnectOSWPButtonClick}>Connect</button>
162
  </div>
163
  </div>
204
  var inputs = $(".filter__itm");
205
  for(var i = 0; i < inputs.length; i++){
206
  if($(inputs[i]).text() == text){
207
+ setTimeout(function(){$(inputs[i]).trigger('click');},1000);
208
+ setTimeout(function(){
209
+ $('.progress_message').css('display', 'none');
210
+ $('.content__list').css('display', 'block');
211
+ },2500);
212
  $('button.content__links-itm').live('click', function(e) {
213
  $('.tingle-modal.opinionstage-content-popup').hide();
214
  $('.tingle-modal.opinionstage-content-popup.tingle-modal--visible').hide();
215
  });
216
  break;
217
  }
218
+ else {
219
+ $('.progress_message').css('display', 'block');
220
+ $('.content__list').css('display', 'none');
221
+ console.log('test');
222
+ }
223
  }
224
  });
225
  });
226
 
227
  var contentViewEditStatOs = (
228
  <div className="os-personality-wrapper components-placeholder">
229
+ <p className="components-heading"><img src={getlogoImageLinkOs} alt=""/></p>
230
  <span id="oswpLauncherContentPopuppersonality" className="components-button is-button is-default is-block is-primary" data-opinionstage-content-launch data-os-block="personality quiz">Select a Personality Quiz</span>
231
  <input type="button" value="Create a New Personality Quiz" className="components-button is-button is-default is-block is-primary" onClick={onCreateButtonClick} />
232
  <div className="components-placeholder__fieldset">
255
  }else if(buttonText == 'Change'){
256
  contentViewEditStatOs = (
257
  <div className="os-personality-wrapper components-placeholder">
258
+ <p className="components-heading"><img src={getlogoImageLinkOs} alt=""/></p>
259
  <div className="components-preview__block" >
260
  <div className="components-preview__leftBlockImage">
261
  <img src={previewBlockOsImageUrl} alt={previewBlockOsTitle} className="image" />
269
  </div>
270
  </div>
271
  <div className="components-preview__rightBlockContent">
272
+ <div className="components-placeholder__label">Personality Quiz: {previewBlockOsTitle}</div>
273
  </div>
274
  </div>
275
  </div>
gutenberg/poll/dist/blocks.build.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(1)},function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,a){try{var i=t[o](a),l=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(l).then(function(e){r("next",e)},function(e){r("throw",e)});e(l)}return r("next")})}}var o,a,i,l,c,s,u=n(2),p=n.n(u),m=n(5),f=(n.n(m),n(6)),d=(n.n(f),wp.i18n.__),h=wp.blocks.registerBlockType,g=wp.components,v=g.SelectControl,b=(g.TextControl,wp.editor.RichText,!1);h("opinion-stage/block-os-poll",{title:d("Poll"),icon:"chart-bar",category:"opinion-stage",keywords:[d("Opinion Stage Poll"),d("Opinion Stage Poll")],attributes:{embedUrl:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},oswpUrlShortcode:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},lockEmbed:{source:"attribute",attribute:"data-lock-embed",selector:"div[data-lock-embed]"},buttonText:{source:"attribute",attribute:"data-button-text",selector:"div[data-button-text]"}},edit:function(e){function t(){var t=this,n=osGutenData.OswpPluginVersion,o=osGutenData.OswpClientToken,a=osGutenData.OswpFetchDataUrl+"?type=poll&page=1&per_page=99";fetch(a,{method:"GET",headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json","OSWP-Plugin-Version":n,"OSWP-Client-Token":o}}).then(function(){var n=r(p.a.mark(function n(r){var o;return p.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.json();case 2:o=t.sent,o=o.data,b=o,e.setAttributes({buttonText:"Embed"}),e.setAttributes({buttonText:m}),"Change"==m&&"Select"!=u?e.setAttributes({embedUrl:u}):e.setAttributes({embedUrl:"Select"});case 8:case"end":return t.stop()}},n,t)}));return function(e){return n.apply(this,arguments)}}()).catch(function(e){console.log("ERROR: "+e.message)})}var n=e.attributes,u=n.embedUrl,m=(n.oswpUrlShortcode,n.lockEmbed,n.buttonText),f=(e.setAttributes,function(t){if(""==t)e.setAttributes({embedUrl:""});else if(""!=t){e.setAttributes({embedUrl:t});for(var n=0;n<b.length;n++){var r=function(e){var t=document.createElement("a");return t.href=e,t}(b[n].attributes["landing-page-url"]),s=r.pathname;if(t==s){o=b[n].attributes.title,a=b[n].attributes["image-url"],i=b[n].attributes["landing-page-url"],l=b[n].attributes["edit-url"],c=b[n].attributes["stats-url"];break}}}}),d=function(t){"Embed"==t.target.value?""==u||"Select"==u||"createNew"==u||"refresh"==u?e.setAttributes({lockEmbed:!1,buttonText:"Embed"}):(e.setAttributes({lockEmbed:!0,buttonText:"Change"}),L=wp.element.createElement(v,{id:"selectID",options:s,value:u,onChange:f,className:"components-select-control__input"})):e.setAttributes({lockEmbed:!1,buttonText:"Embed"})};window.verifyOSInsert=function(t){e.setAttributes({oswpUrlShortcode:t});for(var n=document.getElementById("selectID").options,r=0;r<n.length;r++)if(n[r].value==t){n[r].defaultSelected=!0,e.setAttributes({lockEmbed:!0,buttonText:"Change",embedUrl:t});break}};var h=osGutenData.onCreateButtonClickOs+"?w_type=poll&amp;utm_source=wordpress&amp;utm_campaign=WPMainPI&amp;utm_medium=link&amp;o=wp35e8",g=function(e){window.open(h,"_blank").focus()};m||e.setAttributes({buttonText:"Embed"});var w=osGutenData.callbackUrlOs,y=w,E=(osGutenData.getActionUrlOS,osGutenData.getLogoImageLink),x=function(e){window.location.replace(y)};if(""==osGutenData.isOsConnected)return $(document).ready(function(){$("span#oswpLauncherContentPopuppoll , #owspLaunchInputCreate").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500)})}),wp.element.createElement("div",{className:e.className},wp.element.createElement("div",{className:"os-poll-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("span",null,wp.element.createElement("img",{src:E,alt:""}))," Opinion Stage"),wp.element.createElement("p",{className:"components-heading"},"Please connect Opinion Stage to WordPress to start adding polls"),wp.element.createElement("button",{className:"components-button is-button is-default is-block is-primary",onClick:x},"Connect")));if(0==b)s=[{value:"Select",label:"Select a poll"},{value:"refresh",label:"Refresh"}],t();else{s=[{value:"Select",label:"Select a poll"},{value:"refresh",label:"Refresh"},{value:"",label:"-----------------"}];for(var k=0;k<b.length;k++){s[s.length]={value:b[k].attributes["landing-page-url"].replace("https://www.opinionstage.com",""),label:b[k].attributes.title};var _=function(e){var t=document.createElement("a");return t.href=e,t}(b[k].attributes["landing-page-url"]),N=_.pathname;if(u==N){o=b[k].attributes.title,a=b[k].attributes["image-url"],i=b[k].attributes["landing-page-url"],l=b[k].attributes["edit-url"],c=b[k].attributes["stats-url"];var O=b[k].id}}}"refresh"==u&&t();var L=wp.element.createElement(v,{id:"selectID",options:s,value:u,onChange:f,className:"components-select-control__input"});$(document).ready(function(){$("span#oswpLauncherContentPopuppoll").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500);var t=$(this).attr("data-os-block");$("button#dropbtn span").text(t);for(var n=$(".filter__itm"),r=0;r<n.length;r++)if($(n[r]).text()==t){setTimeout(function(){$(n[r]).trigger("click")},2e3),$("button.content__links-itm").live("click",function(e){$(".tingle-modal.opinionstage-content-popup").hide(),$(".tingle-modal.opinionstage-content-popup.tingle-modal--visible").hide()});break}})});var S=wp.element.createElement("div",{className:"os-poll-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("span",null,wp.element.createElement("img",{src:E,alt:""}))," Opinion Stage"),wp.element.createElement("span",{id:"oswpLauncherContentPopuppoll",className:"components-button is-button is-default is-block is-primary","data-opinionstage-content-launch":!0,"data-os-block":"poll"},"Select a Poll"),wp.element.createElement("input",{type:"button",value:"Create a New Poll",className:"components-button is-button is-default is-block is-primary",onClick:g}),wp.element.createElement("div",{className:"components-placeholder__fieldset"},L,wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large",id:"clickMe",onClick:d})));return function(e,t,n){var r,o=e.getElementsByTagName(t)[0],a=Math.floor((new Date).getTime()/1e6);e.getElementById(n)||(r=e.createElement(t),r.id=n,r.async=1,r.src="https://www.opinionstage.com/assets/loader.js?"+a,o.parentNode.insertBefore(r,o))}(document,"script","os-widget-jssdk"),O="os-widget-"+O,""!=u&&"Select"!=u&&u?"Embed"==m||"Change"==m&&(S=wp.element.createElement("div",{className:"os-poll-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("span",null,wp.element.createElement("img",{src:E,alt:""}))," Opinion Stage"),wp.element.createElement("div",{className:"components-preview__block"},wp.element.createElement("div",{className:"components-preview__leftBlockImage"},wp.element.createElement("img",{src:a,alt:o,className:"image"}),wp.element.createElement("div",{className:"overlay"},wp.element.createElement("div",{className:"text"},wp.element.createElement("a",{href:i,target:"_blank"}," View "),wp.element.createElement("a",{href:l,target:"_blank"}," Edit "),wp.element.createElement("a",{href:c,target:"_blank"}," Statistics "),wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large left-align",onClick:d})))),wp.element.createElement("div",{className:"components-preview__rightBlockContent"},wp.element.createElement("div",{className:"components-placeholder__label"},"Poll: ",o)))),L=wp.element.createElement(v,{id:"selectID",options:s,value:u,disabled:!0,onChange:f,className:"components-select-control__input"})):"Select"==u||""==u||"refresh"==u||e.setAttributes({buttonText:"Embed"}),wp.element.createElement("div",{className:e.className},S)},save:function(e){var t=e.attributes,n=(t.embedUrl,t.oswpUrlShortcode),r=t.lockEmbed,o=t.buttonText;return wp.element.createElement("div",{class:"os-poll-wrapper","data-type":"poll","data-test-url":n,"data-lock-embed":r,"data-button-text":o},'[os-widget path="',n,'"]')}})},function(e,t,n){e.exports=n(3)},function(e,t,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,a=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(4),o)r.regeneratorRuntime=a;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";function n(e,t,n,r){var a=t&&t.prototype instanceof o?t:o,i=Object.create(a.prototype),l=new f(r||[]);return i._invoke=s(e,n,l),i}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function o(){}function a(){}function i(){}function l(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function c(e){function t(n,o,a,i){var l=r(e[n],e,o);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"===typeof s&&b.call(s,"__await")?Promise.resolve(s.__await).then(function(e){t("next",e,a,i)},function(e){t("throw",e,a,i)}):Promise.resolve(s).then(function(e){c.value=e,a(c)},i)}i(l.arg)}function n(e,n){function r(){return new Promise(function(r,o){t(e,n,r,o)})}return o=o?o.then(r,r):r()}var o;this._invoke=n}function s(e,t,n){var o=N;return function(a,i){if(o===L)throw new Error("Generator is already running");if(o===S){if("throw"===a)throw i;return h()}for(n.method=a,n.arg=i;;){var l=n.delegate;if(l){var c=u(l,n);if(c){if(c===P)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===N)throw o=S,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=L;var s=r(e,t,n);if("normal"===s.type){if(o=n.done?S:O,s.arg===P)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=S,n.method="throw",n.arg=s.arg)}}}function u(e,t){var n=e.iterator[t.method];if(n===g){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=g,u(e,t),"throw"===t.method))return P;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return P}var o=r(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,P;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=g),t.delegate=null,P):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,P)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function m(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function f(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function d(e){if(e){var t=e[y];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(b.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=g,t.done=!0,t};return r.next=r}}return{next:h}}function h(){return{value:g,done:!0}}var g,v=Object.prototype,b=v.hasOwnProperty,w="function"===typeof Symbol?Symbol:{},y=w.iterator||"@@iterator",E=w.asyncIterator||"@@asyncIterator",x=w.toStringTag||"@@toStringTag",k="object"===typeof e,_=t.regeneratorRuntime;if(_)return void(k&&(e.exports=_));_=t.regeneratorRuntime=k?e.exports:{},_.wrap=n;var N="suspendedStart",O="suspendedYield",L="executing",S="completed",P={},T={};T[y]=function(){return this};var C=Object.getPrototypeOf,j=C&&C(C(d([])));j&&j!==v&&b.call(j,y)&&(T=j);var A=i.prototype=o.prototype=Object.create(T);a.prototype=A.constructor=i,i.constructor=a,i[x]=a.displayName="GeneratorFunction",_.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},_.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,i):(e.__proto__=i,x in e||(e[x]="GeneratorFunction")),e.prototype=Object.create(A),e},_.awrap=function(e){return{__await:e}},l(c.prototype),c.prototype[E]=function(){return this},_.AsyncIterator=c,_.async=function(e,t,r,o){var a=new c(n(e,t,r,o));return _.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},l(A),A[x]="Generator",A[y]=function(){return this},A.toString=function(){return"[object Generator]"},_.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},_.values=d,f.prototype={constructor:f,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(m),!e)for(var t in this)"t"===t.charAt(0)&&b.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=g)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return a.type="throw",a.arg=e,n.next=t,r&&(n.method="next",n.arg=g),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var i=b.call(o,"catchLoc"),l=b.call(o,"finallyLoc");if(i&&l){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(i){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&b.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,P):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),P},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),m(n),P}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;m(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:d(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=g),P}}}(function(){return this}()||Function("return this")())},function(e,t){},function(e,t){}]);
1
+ !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(1)},function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,a){try{var i=t[o](a),l=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(l).then(function(e){r("next",e)},function(e){r("throw",e)});e(l)}return r("next")})}}var o,a,i,l,s,c,u=n(2),p=n.n(u),m=n(5),f=(n.n(m),n(6)),d=(n.n(f),wp.i18n.__),h=wp.blocks.registerBlockType,g=wp.components,v=g.SelectControl,b=(g.TextControl,wp.editor.RichText,!1);h("opinion-stage/block-os-poll",{title:d("Poll"),icon:"chart-bar",category:"opinion-stage",keywords:[d("Opinion Stage Poll"),d("Opinion Stage Poll")],attributes:{embedUrl:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},oswpUrlShortcode:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},lockEmbed:{source:"attribute",attribute:"data-lock-embed",selector:"div[data-lock-embed]"},buttonText:{source:"attribute",attribute:"data-button-text",selector:"div[data-button-text]"}},edit:function(e){function t(){var t=this,n=osGutenData.OswpPluginVersion,o=osGutenData.OswpClientToken,a=osGutenData.OswpFetchDataUrl+"?type=poll&page=1&per_page=99";fetch(a,{method:"GET",headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json","OSWP-Plugin-Version":n,"OSWP-Client-Token":o}}).then(function(){var n=r(p.a.mark(function n(r){var o;return p.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.json();case 2:o=t.sent,o=o.data,b=o,e.setAttributes({buttonText:"Embed"}),e.setAttributes({buttonText:m}),"Change"==m&&"Select"!=u?e.setAttributes({embedUrl:u}):e.setAttributes({embedUrl:"Select"});case 8:case"end":return t.stop()}},n,t)}));return function(e){return n.apply(this,arguments)}}()).catch(function(e){console.log("ERROR: "+e.message)})}var n=e.attributes,u=n.embedUrl,m=(n.oswpUrlShortcode,n.lockEmbed,n.buttonText),f=(e.setAttributes,function(t){if(""==t)e.setAttributes({embedUrl:""});else if(""!=t){e.setAttributes({embedUrl:t});for(var n=0;n<b.length;n++){var r=function(e){var t=document.createElement("a");return t.href=e,t}(b[n].attributes["landing-page-url"]),c=r.pathname;if(t==c){o=b[n].attributes.title,a=b[n].attributes["image-url"],i=b[n].attributes["landing-page-url"],l=b[n].attributes["edit-url"],s=b[n].attributes["stats-url"];break}}}}),d=function(t){"Embed"==t.target.value?""==u||"Select"==u||"createNew"==u||"refresh"==u?e.setAttributes({lockEmbed:!1,buttonText:"Embed"}):(e.setAttributes({lockEmbed:!0,buttonText:"Change"}),O=wp.element.createElement(v,{id:"selectID",options:c,value:u,onChange:f,className:"components-select-control__input"})):e.setAttributes({lockEmbed:!1,buttonText:"Embed"})};window.verifyOSInsert=function(t){e.setAttributes({oswpUrlShortcode:t});for(var n=document.getElementById("selectID").options,r=0;r<n.length;r++)if(n[r].value==t){n[r].defaultSelected=!0,e.setAttributes({lockEmbed:!0,buttonText:"Change",embedUrl:t});break}};var h=osGutenData.onCreateButtonClickOs+"?w_type=poll&amp;utm_source=wordpress&amp;utm_campaign=WPMainPI&amp;utm_medium=link&amp;o=wp35e8",g=function(e){window.open(h,"_blank").focus()};m||e.setAttributes({buttonText:"Embed"});var w=osGutenData.callbackUrlOs,y=w,E=(osGutenData.getActionUrlOS,osGutenData.getLogoImageLink),k=function(e){window.location.replace(y)};if(""==osGutenData.isOsConnected)return $(document).ready(function(){$("span#oswpLauncherContentPopuppoll , #owspLaunchInputCreate").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500)})}),wp.element.createElement("div",{className:e.className},wp.element.createElement("div",{className:"os-poll-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("img",{src:E,alt:""})),wp.element.createElement("p",{className:"components-heading"},"Please connect WordPress to Opinion Stage to start adding polls"),wp.element.createElement("button",{className:"components-button is-button is-default is-block is-primary",onClick:k},"Connect")));if(0==b)c=[{value:"Select",label:"Select a poll"},{value:"refresh",label:"Refresh"}],t();else{c=[{value:"Select",label:"Select a poll"},{value:"refresh",label:"Refresh"},{value:"",label:"-----------------"}];for(var x=0;x<b.length;x++){c[c.length]={value:b[x].attributes["landing-page-url"].replace("https://www.opinionstage.com",""),label:b[x].attributes.title};var _=function(e){var t=document.createElement("a");return t.href=e,t}(b[x].attributes["landing-page-url"]),N=_.pathname;if(u==N){o=b[x].attributes.title,a=b[x].attributes["image-url"],i=b[x].attributes["landing-page-url"],l=b[x].attributes["edit-url"],s=b[x].attributes["stats-url"];var L=b[x].id}}}"refresh"==u&&t();var O=wp.element.createElement(v,{id:"selectID",options:c,value:u,onChange:f,className:"components-select-control__input"});$(document).ready(function(){$("span#oswpLauncherContentPopuppoll").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500);var t=$(this).attr("data-os-block");$("button#dropbtn span").text(t);for(var n=$(".filter__itm"),r=0;r<n.length;r++){if($(n[r]).text()==t){setTimeout(function(){$(n[r]).trigger("click")},1e3),setTimeout(function(){$(".progress_message").css("display","none"),$(".content__list").css("display","block")},2500),$("button.content__links-itm").live("click",function(e){$(".tingle-modal.opinionstage-content-popup").hide(),$(".tingle-modal.opinionstage-content-popup.tingle-modal--visible").hide()});break}$(".progress_message").css("display","block"),$(".content__list").css("display","none"),console.log("test")}})});var P=wp.element.createElement("div",{className:"os-poll-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("img",{src:E,alt:""})),wp.element.createElement("span",{id:"oswpLauncherContentPopuppoll",className:"components-button is-button is-default is-block is-primary","data-opinionstage-content-launch":!0,"data-os-block":"poll"},"Select a Poll"),wp.element.createElement("input",{type:"button",value:"Create a New Poll",className:"components-button is-button is-default is-block is-primary",onClick:g}),wp.element.createElement("div",{className:"components-placeholder__fieldset"},O,wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large",id:"clickMe",onClick:d})));return function(e,t,n){var r,o=e.getElementsByTagName(t)[0],a=Math.floor((new Date).getTime()/1e6);e.getElementById(n)||(r=e.createElement(t),r.id=n,r.async=1,r.src="https://www.opinionstage.com/assets/loader.js?"+a,o.parentNode.insertBefore(r,o))}(document,"script","os-widget-jssdk"),L="os-widget-"+L,""!=u&&"Select"!=u&&u?"Embed"==m||"Change"==m&&(P=wp.element.createElement("div",{className:"os-poll-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("img",{src:E,alt:""})),wp.element.createElement("div",{className:"components-preview__block"},wp.element.createElement("div",{className:"components-preview__leftBlockImage"},wp.element.createElement("img",{src:a,alt:o,className:"image"}),wp.element.createElement("div",{className:"overlay"},wp.element.createElement("div",{className:"text"},wp.element.createElement("a",{href:i,target:"_blank"}," View "),wp.element.createElement("a",{href:l,target:"_blank"}," Edit "),wp.element.createElement("a",{href:s,target:"_blank"}," Statistics "),wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large left-align",onClick:d})))),wp.element.createElement("div",{className:"components-preview__rightBlockContent"},wp.element.createElement("div",{className:"components-placeholder__label"},"Poll: ",o)))),O=wp.element.createElement(v,{id:"selectID",options:c,value:u,disabled:!0,onChange:f,className:"components-select-control__input"})):"Select"==u||""==u||"refresh"==u||e.setAttributes({buttonText:"Embed"}),wp.element.createElement("div",{className:e.className},P)},save:function(e){var t=e.attributes,n=(t.embedUrl,t.oswpUrlShortcode),r=t.lockEmbed,o=t.buttonText;return wp.element.createElement("div",{class:"os-poll-wrapper","data-type":"poll","data-test-url":n,"data-lock-embed":r,"data-button-text":o},'[os-widget path="',n,'"]')}})},function(e,t,n){e.exports=n(3)},function(e,t,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,a=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(4),o)r.regeneratorRuntime=a;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";function n(e,t,n,r){var a=t&&t.prototype instanceof o?t:o,i=Object.create(a.prototype),l=new f(r||[]);return i._invoke=c(e,n,l),i}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function o(){}function a(){}function i(){}function l(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function s(e){function t(n,o,a,i){var l=r(e[n],e,o);if("throw"!==l.type){var s=l.arg,c=s.value;return c&&"object"===typeof c&&b.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,a,i)},function(e){t("throw",e,a,i)}):Promise.resolve(c).then(function(e){s.value=e,a(s)},i)}i(l.arg)}function n(e,n){function r(){return new Promise(function(r,o){t(e,n,r,o)})}return o=o?o.then(r,r):r()}var o;this._invoke=n}function c(e,t,n){var o=N;return function(a,i){if(o===O)throw new Error("Generator is already running");if(o===P){if("throw"===a)throw i;return h()}for(n.method=a,n.arg=i;;){var l=n.delegate;if(l){var s=u(l,n);if(s){if(s===S)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===N)throw o=P,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=O;var c=r(e,t,n);if("normal"===c.type){if(o=n.done?P:L,c.arg===S)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=P,n.method="throw",n.arg=c.arg)}}}function u(e,t){var n=e.iterator[t.method];if(n===g){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=g,u(e,t),"throw"===t.method))return S;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return S}var o=r(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,S;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=g),t.delegate=null,S):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,S)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function m(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function f(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function d(e){if(e){var t=e[y];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(b.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=g,t.done=!0,t};return r.next=r}}return{next:h}}function h(){return{value:g,done:!0}}var g,v=Object.prototype,b=v.hasOwnProperty,w="function"===typeof Symbol?Symbol:{},y=w.iterator||"@@iterator",E=w.asyncIterator||"@@asyncIterator",k=w.toStringTag||"@@toStringTag",x="object"===typeof e,_=t.regeneratorRuntime;if(_)return void(x&&(e.exports=_));_=t.regeneratorRuntime=x?e.exports:{},_.wrap=n;var N="suspendedStart",L="suspendedYield",O="executing",P="completed",S={},T={};T[y]=function(){return this};var C=Object.getPrototypeOf,j=C&&C(C(d([])));j&&j!==v&&b.call(j,y)&&(T=j);var A=i.prototype=o.prototype=Object.create(T);a.prototype=A.constructor=i,i.constructor=a,i[k]=a.displayName="GeneratorFunction",_.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},_.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,i):(e.__proto__=i,k in e||(e[k]="GeneratorFunction")),e.prototype=Object.create(A),e},_.awrap=function(e){return{__await:e}},l(s.prototype),s.prototype[E]=function(){return this},_.AsyncIterator=s,_.async=function(e,t,r,o){var a=new s(n(e,t,r,o));return _.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},l(A),A[k]="Generator",A[y]=function(){return this},A.toString=function(){return"[object Generator]"},_.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},_.values=d,f.prototype={constructor:f,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(m),!e)for(var t in this)"t"===t.charAt(0)&&b.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=g)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return a.type="throw",a.arg=e,n.next=t,r&&(n.method="next",n.arg=g),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var i=b.call(o,"catchLoc"),l=b.call(o,"finallyLoc");if(i&&l){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(i){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&b.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,S):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),S},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),m(n),S}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;m(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:d(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=g),S}}}(function(){return this}()||Function("return this")())},function(e,t){},function(e,t){}]);
gutenberg/poll/src/block/block.js CHANGED
@@ -156,8 +156,8 @@ var options;
156
  return (
157
  <div className={ props.className }>
158
  <div className="os-poll-wrapper components-placeholder">
159
- <p className="components-heading"><span><img src={getlogoImageLinkOs} alt=""/></span> Opinion Stage</p>
160
- <p className="components-heading">Please connect Opinion Stage to WordPress to start adding polls</p>
161
  <button className="components-button is-button is-default is-block is-primary" onClick={onConnectOSWPButtonClick}>Connect</button>
162
  </div>
163
  </div>
@@ -204,20 +204,29 @@ var options;
204
  var inputs = $(".filter__itm");
205
  for(var i = 0; i < inputs.length; i++){
206
  if($(inputs[i]).text() == text){
207
- setTimeout(function(){$(inputs[i]).trigger('click');},2000);
 
 
 
 
208
  $('button.content__links-itm').live('click', function(e) {
209
  $('.tingle-modal.opinionstage-content-popup').hide();
210
  $('.tingle-modal.opinionstage-content-popup.tingle-modal--visible').hide();
211
  });
212
  break;
213
  }
 
 
 
 
 
214
  }
215
  });
216
  });
217
 
218
  var contentViewEditStatOs = (
219
  <div className="os-poll-wrapper components-placeholder">
220
- <p className="components-heading"><span><img src={getlogoImageLinkOs} alt=""/></span> Opinion Stage</p>
221
  <span id="oswpLauncherContentPopuppoll" className="components-button is-button is-default is-block is-primary" data-opinionstage-content-launch data-os-block="poll">Select a Poll</span>
222
  <input type="button" value="Create a New Poll" className="components-button is-button is-default is-block is-primary" onClick={onCreateButtonClick} />
223
  <div className="components-placeholder__fieldset">
@@ -246,7 +255,7 @@ var options;
246
  }else if(buttonText == 'Change'){
247
  contentViewEditStatOs = (
248
  <div className="os-poll-wrapper components-placeholder">
249
- <p className="components-heading"><span><img src={getlogoImageLinkOs} alt=""/></span> Opinion Stage</p>
250
  <div className="components-preview__block" >
251
  <div className="components-preview__leftBlockImage">
252
  <img src={previewBlockOsImageUrl} alt={previewBlockOsTitle} className="image" />
156
  return (
157
  <div className={ props.className }>
158
  <div className="os-poll-wrapper components-placeholder">
159
+ <p className="components-heading"><img src={getlogoImageLinkOs} alt=""/></p>
160
+ <p className="components-heading">Please connect WordPress to Opinion Stage to start adding polls</p>
161
  <button className="components-button is-button is-default is-block is-primary" onClick={onConnectOSWPButtonClick}>Connect</button>
162
  </div>
163
  </div>
204
  var inputs = $(".filter__itm");
205
  for(var i = 0; i < inputs.length; i++){
206
  if($(inputs[i]).text() == text){
207
+ setTimeout(function(){$(inputs[i]).trigger('click');},1000);
208
+ setTimeout(function(){
209
+ $('.progress_message').css('display', 'none');
210
+ $('.content__list').css('display', 'block');
211
+ },2500);
212
  $('button.content__links-itm').live('click', function(e) {
213
  $('.tingle-modal.opinionstage-content-popup').hide();
214
  $('.tingle-modal.opinionstage-content-popup.tingle-modal--visible').hide();
215
  });
216
  break;
217
  }
218
+ else {
219
+ $('.progress_message').css('display', 'block');
220
+ $('.content__list').css('display', 'none');
221
+ console.log('test');
222
+ }
223
  }
224
  });
225
  });
226
 
227
  var contentViewEditStatOs = (
228
  <div className="os-poll-wrapper components-placeholder">
229
+ <p className="components-heading"><img src={getlogoImageLinkOs} alt=""/></p>
230
  <span id="oswpLauncherContentPopuppoll" className="components-button is-button is-default is-block is-primary" data-opinionstage-content-launch data-os-block="poll">Select a Poll</span>
231
  <input type="button" value="Create a New Poll" className="components-button is-button is-default is-block is-primary" onClick={onCreateButtonClick} />
232
  <div className="components-placeholder__fieldset">
255
  }else if(buttonText == 'Change'){
256
  contentViewEditStatOs = (
257
  <div className="os-poll-wrapper components-placeholder">
258
+ <p className="components-heading"><img src={getlogoImageLinkOs} alt=""/></p>
259
  <div className="components-preview__block" >
260
  <div className="components-preview__leftBlockImage">
261
  <img src={previewBlockOsImageUrl} alt={previewBlockOsTitle} className="image" />
gutenberg/slideshow/dist/blocks.build.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(1)},function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,a){try{var i=t[o](a),s=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}var o,a,i,s,l,c,u=n(2),p=n.n(u),m=n(5),d=(n.n(m),n(6)),h=(n.n(d),wp.i18n.__),f=wp.blocks.registerBlockType,g=wp.components,v=g.SelectControl,w=(g.TextControl,wp.editor.RichText,!1);f("opinion-stage/block-os-slideshow",{title:h("Slideshow"),icon:"playlist-video",category:"opinion-stage",keywords:[h("Opinion Stage Slideshow"),h("Opinion Stage Slideshow")],attributes:{embedUrl:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},oswpUrlShortcode:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},lockEmbed:{source:"attribute",attribute:"data-lock-embed",selector:"div[data-lock-embed]"},buttonText:{source:"attribute",attribute:"data-button-text",selector:"div[data-button-text]"}},edit:function(e){function t(){var t=this,n=osGutenData.OswpPluginVersion,o=osGutenData.OswpClientToken,a=osGutenData.OswpFetchDataUrl+"?type=slideshow&page=1&per_page=99";fetch(a,{method:"GET",headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json","OSWP-Plugin-Version":n,"OSWP-Client-Token":o}}).then(function(){var n=r(p.a.mark(function n(r){var o;return p.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.json();case 2:o=t.sent,o=o.data,w=o,e.setAttributes({buttonText:"Embed"}),e.setAttributes({buttonText:m}),"Change"==m&&"Select"!=u?e.setAttributes({embedUrl:u}):e.setAttributes({embedUrl:"Select"});case 8:case"end":return t.stop()}},n,t)}));return function(e){return n.apply(this,arguments)}}()).catch(function(e){console.log("ERROR: "+e.message)})}var n=e.attributes,u=n.embedUrl,m=(n.oswpUrlShortcode,n.lockEmbed,n.buttonText),d=(e.setAttributes,function(t){if(""==t)e.setAttributes({embedUrl:""});else if(""!=t){e.setAttributes({embedUrl:t});for(var n=0;n<w.length;n++){var r=function(e){var t=document.createElement("a");return t.href=e,t}(w[n].attributes["landing-page-url"]),c=r.pathname;if(t==c){o=w[n].attributes.title,a=w[n].attributes["image-url"],i=w[n].attributes["landing-page-url"],s=w[n].attributes["edit-url"],l=w[n].attributes["stats-url"];break}}}}),h=function(t){"Embed"==t.target.value?""==u||"Select"==u||"createNew"==u||"refresh"==u?e.setAttributes({lockEmbed:!1,buttonText:"Embed"}):(e.setAttributes({lockEmbed:!0,buttonText:"Change"}),O=wp.element.createElement(v,{id:"selectID",options:c,value:u,onChange:d,className:"components-select-control__input"})):e.setAttributes({lockEmbed:!1,buttonText:"Embed"})};window.verifyOSInsert=function(t){e.setAttributes({oswpUrlShortcode:t});for(var n=document.getElementById("selectID").options,r=0;r<n.length;r++)if(n[r].value==t){n[r].defaultSelected=!0,e.setAttributes({lockEmbed:!0,buttonText:"Change",embedUrl:t});break}};var f=osGutenData.onCreateButtonClickOs+"?w_type=slideshow&amp;utm_source=wordpress&amp;utm_campaign=WPMainPI&amp;utm_medium=link&amp;o=wp35e8",g=function(e){window.open(f,"_blank").focus()};m||e.setAttributes({buttonText:"Embed"});var b=osGutenData.callbackUrlOs,y=b,E=(osGutenData.getActionUrlOS,osGutenData.getLogoImageLink);console.log(y);var x=function(e){window.location.replace(y)};if(""==osGutenData.isOsConnected)return $(document).ready(function(){$("span#oswpLauncherContentPopupslideshow , #owspLaunchInputCreate").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500)})}),wp.element.createElement("div",{className:e.className},wp.element.createElement("div",{className:"os-slideshow-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("span",null,wp.element.createElement("img",{src:E,alt:""}))," Opinion Stage"),wp.element.createElement("p",{className:"components-heading"},"Please connect Opinion Stage to WordPress to start adding slideshows"),wp.element.createElement("button",{className:"components-button is-button is-default is-block is-primary",onClick:x},"Connect")));if(0==w)c=[{value:"Select",label:"Select a slideshow"},{value:"refresh",label:"Refresh"}],t();else{c=[{value:"Select",label:"Select a slideshow"},{value:"refresh",label:"Refresh"},{value:"",label:"-----------------"}];for(var k=0;k<w.length;k++){c[c.length]={value:w[k].attributes["landing-page-url"].replace("https://www.opinionstage.com",""),label:w[k].attributes.title};var _=function(e){var t=document.createElement("a");return t.href=e,t}(w[k].attributes["landing-page-url"]),N=_.pathname;if(u==N){o=w[k].attributes.title,a=w[k].attributes["image-url"],i=w[k].attributes["landing-page-url"],s=w[k].attributes["edit-url"],l=w[k].attributes["stats-url"];var S=w[k].id}}}"refresh"==u&&t();var O=wp.element.createElement(v,{id:"selectID",options:c,value:u,onChange:d,className:"components-select-control__input"});$(document).ready(function(){$("span#oswpLauncherContentPopupslideshow").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500);var t=$(this).attr("data-os-block");$("button#dropbtn span").text(t);for(var n=$(".filter__itm"),r=0;r<n.length;r++)if($(n[r]).text()==t){setTimeout(function(){$(n[r]).trigger("click")},2e3),$("button.content__links-itm").live("click",function(e){$(".tingle-modal.opinionstage-content-popup").hide(),$(".tingle-modal.opinionstage-content-popup.tingle-modal--visible").hide()});break}})});var L=wp.element.createElement("div",{className:"os-slideshow-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("span",null,wp.element.createElement("img",{src:E,alt:""}))," Opinion Stage"),wp.element.createElement("span",{id:"oswpLauncherContentPopupslideshow",className:"components-button is-button is-default is-block is-primary","data-opinionstage-content-launch":!0,"data-os-block":"slideshow"},"Select a Slideshow"),wp.element.createElement("input",{type:"button",value:"Create a New Slideshow",className:"components-button is-button is-default is-block is-primary",onClick:g}),wp.element.createElement("div",{className:"components-placeholder__fieldset"},O,wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large",id:"clickMe",onClick:h})));return function(e,t,n){var r,o=e.getElementsByTagName(t)[0],a=Math.floor((new Date).getTime()/1e6);e.getElementById(n)||(r=e.createElement(t),r.id=n,r.async=1,r.src="https://www.opinionstage.com/assets/loader.js?"+a,o.parentNode.insertBefore(r,o))}(document,"script","os-widget-jssdk"),S="os-widget-"+S,""!=u&&"Select"!=u&&u?"Embed"==m||"Change"==m&&(L=wp.element.createElement("div",{className:"os-slideshow-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("span",null,wp.element.createElement("img",{src:E,alt:""}))," Opinion Stage"),wp.element.createElement("div",{className:"components-preview__block"},wp.element.createElement("div",{className:"components-preview__leftBlockImage"},wp.element.createElement("img",{src:a,alt:o,className:"image"}),wp.element.createElement("div",{className:"overlay"},wp.element.createElement("div",{className:"text"},wp.element.createElement("a",{href:i,target:"_blank"}," View "),wp.element.createElement("a",{href:s,target:"_blank"}," Edit "),wp.element.createElement("a",{href:l,target:"_blank"}," Statistics "),wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large left-align",onClick:h})))),wp.element.createElement("div",{className:"components-preview__rightBlockContent"},wp.element.createElement("div",{className:"components-placeholder__label"},"Slideshow: ",o)))),O=wp.element.createElement(v,{id:"selectID",options:c,value:u,disabled:!0,onChange:d,className:"components-select-control__input"})):"Select"==u||""==u||"refresh"==u||e.setAttributes({buttonText:"Embed"}),wp.element.createElement("div",{className:e.className},L)},save:function(e){var t=e.attributes,n=(t.embedUrl,t.oswpUrlShortcode),r=t.lockEmbed,o=t.buttonText;return wp.element.createElement("div",{class:"os-slideshow-wrapper","data-type":"slideshow","data-test-url":n,"data-lock-embed":r,"data-button-text":o},'[os-widget path="',n,'"]')}})},function(e,t,n){e.exports=n(3)},function(e,t,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,a=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(4),o)r.regeneratorRuntime=a;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";function n(e,t,n,r){var a=t&&t.prototype instanceof o?t:o,i=Object.create(a.prototype),s=new d(r||[]);return i._invoke=c(e,n,s),i}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function o(){}function a(){}function i(){}function s(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function l(e){function t(n,o,a,i){var s=r(e[n],e,o);if("throw"!==s.type){var l=s.arg,c=l.value;return c&&"object"===typeof c&&w.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,a,i)},function(e){t("throw",e,a,i)}):Promise.resolve(c).then(function(e){l.value=e,a(l)},i)}i(s.arg)}function n(e,n){function r(){return new Promise(function(r,o){t(e,n,r,o)})}return o=o?o.then(r,r):r()}var o;this._invoke=n}function c(e,t,n){var o=N;return function(a,i){if(o===O)throw new Error("Generator is already running");if(o===L){if("throw"===a)throw i;return f()}for(n.method=a,n.arg=i;;){var s=n.delegate;if(s){var l=u(s,n);if(l){if(l===T)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===N)throw o=L,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=O;var c=r(e,t,n);if("normal"===c.type){if(o=n.done?L:S,c.arg===T)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=L,n.method="throw",n.arg=c.arg)}}}function u(e,t){var n=e.iterator[t.method];if(n===g){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=g,u(e,t),"throw"===t.method))return T;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return T}var o=r(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,T;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=g),t.delegate=null,T):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,T)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function m(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function d(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function h(e){if(e){var t=e[y];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(w.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=g,t.done=!0,t};return r.next=r}}return{next:f}}function f(){return{value:g,done:!0}}var g,v=Object.prototype,w=v.hasOwnProperty,b="function"===typeof Symbol?Symbol:{},y=b.iterator||"@@iterator",E=b.asyncIterator||"@@asyncIterator",x=b.toStringTag||"@@toStringTag",k="object"===typeof e,_=t.regeneratorRuntime;if(_)return void(k&&(e.exports=_));_=t.regeneratorRuntime=k?e.exports:{},_.wrap=n;var N="suspendedStart",S="suspendedYield",O="executing",L="completed",T={},C={};C[y]=function(){return this};var P=Object.getPrototypeOf,j=P&&P(P(h([])));j&&j!==v&&w.call(j,y)&&(C=j);var A=i.prototype=o.prototype=Object.create(C);a.prototype=A.constructor=i,i.constructor=a,i[x]=a.displayName="GeneratorFunction",_.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},_.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,i):(e.__proto__=i,x in e||(e[x]="GeneratorFunction")),e.prototype=Object.create(A),e},_.awrap=function(e){return{__await:e}},s(l.prototype),l.prototype[E]=function(){return this},_.AsyncIterator=l,_.async=function(e,t,r,o){var a=new l(n(e,t,r,o));return _.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},s(A),A[x]="Generator",A[y]=function(){return this},A.toString=function(){return"[object Generator]"},_.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},_.values=h,d.prototype={constructor:d,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(m),!e)for(var t in this)"t"===t.charAt(0)&&w.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=g)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return a.type="throw",a.arg=e,n.next=t,r&&(n.method="next",n.arg=g),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var i=w.call(o,"catchLoc"),s=w.call(o,"finallyLoc");if(i&&s){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(i){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&w.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,T):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),T},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),m(n),T}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;m(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:h(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=g),T}}}(function(){return this}()||Function("return this")())},function(e,t){},function(e,t){}]);
1
+ !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(1)},function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,a){try{var i=t[o](a),s=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}var o,a,i,s,l,c,u=n(2),p=n.n(u),m=n(5),d=(n.n(m),n(6)),h=(n.n(d),wp.i18n.__),f=wp.blocks.registerBlockType,g=wp.components,v=g.SelectControl,b=(g.TextControl,wp.editor.RichText,!1);f("opinion-stage/block-os-slideshow",{title:h("Slideshow"),icon:"playlist-video",category:"opinion-stage",keywords:[h("Opinion Stage Slideshow"),h("Opinion Stage Slideshow")],attributes:{embedUrl:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},oswpUrlShortcode:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},lockEmbed:{source:"attribute",attribute:"data-lock-embed",selector:"div[data-lock-embed]"},buttonText:{source:"attribute",attribute:"data-button-text",selector:"div[data-button-text]"}},edit:function(e){function t(){var t=this,n=osGutenData.OswpPluginVersion,o=osGutenData.OswpClientToken,a=osGutenData.OswpFetchDataUrl+"?type=slideshow&page=1&per_page=99";fetch(a,{method:"GET",headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json","OSWP-Plugin-Version":n,"OSWP-Client-Token":o}}).then(function(){var n=r(p.a.mark(function n(r){var o;return p.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.json();case 2:o=t.sent,o=o.data,b=o,e.setAttributes({buttonText:"Embed"}),e.setAttributes({buttonText:m}),"Change"==m&&"Select"!=u?e.setAttributes({embedUrl:u}):e.setAttributes({embedUrl:"Select"});case 8:case"end":return t.stop()}},n,t)}));return function(e){return n.apply(this,arguments)}}()).catch(function(e){console.log("ERROR: "+e.message)})}var n=e.attributes,u=n.embedUrl,m=(n.oswpUrlShortcode,n.lockEmbed,n.buttonText),d=(e.setAttributes,function(t){if(""==t)e.setAttributes({embedUrl:""});else if(""!=t){e.setAttributes({embedUrl:t});for(var n=0;n<b.length;n++){var r=function(e){var t=document.createElement("a");return t.href=e,t}(b[n].attributes["landing-page-url"]),c=r.pathname;if(t==c){o=b[n].attributes.title,a=b[n].attributes["image-url"],i=b[n].attributes["landing-page-url"],s=b[n].attributes["edit-url"],l=b[n].attributes["stats-url"];break}}}}),h=function(t){"Embed"==t.target.value?""==u||"Select"==u||"createNew"==u||"refresh"==u?e.setAttributes({lockEmbed:!1,buttonText:"Embed"}):(e.setAttributes({lockEmbed:!0,buttonText:"Change"}),L=wp.element.createElement(v,{id:"selectID",options:c,value:u,onChange:d,className:"components-select-control__input"})):e.setAttributes({lockEmbed:!1,buttonText:"Embed"})};window.verifyOSInsert=function(t){e.setAttributes({oswpUrlShortcode:t});for(var n=document.getElementById("selectID").options,r=0;r<n.length;r++)if(n[r].value==t){n[r].defaultSelected=!0,e.setAttributes({lockEmbed:!0,buttonText:"Change",embedUrl:t});break}};var f=osGutenData.onCreateButtonClickOs+"?w_type=slideshow&amp;utm_source=wordpress&amp;utm_campaign=WPMainPI&amp;utm_medium=link&amp;o=wp35e8",g=function(e){window.open(f,"_blank").focus()};m||e.setAttributes({buttonText:"Embed"});var w=osGutenData.callbackUrlOs,y=w,E=(osGutenData.getActionUrlOS,osGutenData.getLogoImageLink);console.log(y);var k=function(e){window.location.replace(y)};if(""==osGutenData.isOsConnected)return $(document).ready(function(){$("span#oswpLauncherContentPopupslideshow , #owspLaunchInputCreate").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500)})}),wp.element.createElement("div",{className:e.className},wp.element.createElement("div",{className:"os-slideshow-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("img",{src:E,alt:""})),wp.element.createElement("p",{className:"components-heading"},"Please connect WordPress to Opinion Stage to start adding slideshows"),wp.element.createElement("button",{className:"components-button is-button is-default is-block is-primary",onClick:k},"Connect")));if(0==b)c=[{value:"Select",label:"Select a slideshow"},{value:"refresh",label:"Refresh"}],t();else{c=[{value:"Select",label:"Select a slideshow"},{value:"refresh",label:"Refresh"},{value:"",label:"-----------------"}];for(var x=0;x<b.length;x++){c[c.length]={value:b[x].attributes["landing-page-url"].replace("https://www.opinionstage.com",""),label:b[x].attributes.title};var _=function(e){var t=document.createElement("a");return t.href=e,t}(b[x].attributes["landing-page-url"]),N=_.pathname;if(u==N){o=b[x].attributes.title,a=b[x].attributes["image-url"],i=b[x].attributes["landing-page-url"],s=b[x].attributes["edit-url"],l=b[x].attributes["stats-url"];var S=b[x].id}}}"refresh"==u&&t();var L=wp.element.createElement(v,{id:"selectID",options:c,value:u,onChange:d,className:"components-select-control__input"});$(document).ready(function(){$("span#oswpLauncherContentPopupslideshow").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500);var t=$(this).attr("data-os-block");$("button#dropbtn span").text(t);for(var n=$(".filter__itm"),r=0;r<n.length;r++){if($(n[r]).text()==t){setTimeout(function(){$(n[r]).trigger("click")},1e3),setTimeout(function(){$(".progress_message").css("display","none"),$(".content__list").css("display","block")},2500),$("button.content__links-itm").live("click",function(e){$(".tingle-modal.opinionstage-content-popup").hide(),$(".tingle-modal.opinionstage-content-popup.tingle-modal--visible").hide()});break}$(".progress_message").css("display","block"),$(".content__list").css("display","none"),console.log("test")}})});var O=wp.element.createElement("div",{className:"os-slideshow-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("img",{src:E,alt:""})),wp.element.createElement("span",{id:"oswpLauncherContentPopupslideshow",className:"components-button is-button is-default is-block is-primary","data-opinionstage-content-launch":!0,"data-os-block":"slideshow"},"Select a Slideshow"),wp.element.createElement("input",{type:"button",value:"Create a New Slideshow",className:"components-button is-button is-default is-block is-primary",onClick:g}),wp.element.createElement("div",{className:"components-placeholder__fieldset"},L,wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large",id:"clickMe",onClick:h})));return function(e,t,n){var r,o=e.getElementsByTagName(t)[0],a=Math.floor((new Date).getTime()/1e6);e.getElementById(n)||(r=e.createElement(t),r.id=n,r.async=1,r.src="https://www.opinionstage.com/assets/loader.js?"+a,o.parentNode.insertBefore(r,o))}(document,"script","os-widget-jssdk"),S="os-widget-"+S,""!=u&&"Select"!=u&&u?"Embed"==m||"Change"==m&&(O=wp.element.createElement("div",{className:"os-slideshow-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("img",{src:E,alt:""})),wp.element.createElement("div",{className:"components-preview__block"},wp.element.createElement("div",{className:"components-preview__leftBlockImage"},wp.element.createElement("img",{src:a,alt:o,className:"image"}),wp.element.createElement("div",{className:"overlay"},wp.element.createElement("div",{className:"text"},wp.element.createElement("a",{href:i,target:"_blank"}," View "),wp.element.createElement("a",{href:s,target:"_blank"}," Edit "),wp.element.createElement("a",{href:l,target:"_blank"}," Statistics "),wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large left-align",onClick:h})))),wp.element.createElement("div",{className:"components-preview__rightBlockContent"},wp.element.createElement("div",{className:"components-placeholder__label"},"Slideshow: ",o)))),L=wp.element.createElement(v,{id:"selectID",options:c,value:u,disabled:!0,onChange:d,className:"components-select-control__input"})):"Select"==u||""==u||"refresh"==u||e.setAttributes({buttonText:"Embed"}),wp.element.createElement("div",{className:e.className},O)},save:function(e){var t=e.attributes,n=(t.embedUrl,t.oswpUrlShortcode),r=t.lockEmbed,o=t.buttonText;return wp.element.createElement("div",{class:"os-slideshow-wrapper","data-type":"slideshow","data-test-url":n,"data-lock-embed":r,"data-button-text":o},'[os-widget path="',n,'"]')}})},function(e,t,n){e.exports=n(3)},function(e,t,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,a=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(4),o)r.regeneratorRuntime=a;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";function n(e,t,n,r){var a=t&&t.prototype instanceof o?t:o,i=Object.create(a.prototype),s=new d(r||[]);return i._invoke=c(e,n,s),i}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function o(){}function a(){}function i(){}function s(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function l(e){function t(n,o,a,i){var s=r(e[n],e,o);if("throw"!==s.type){var l=s.arg,c=l.value;return c&&"object"===typeof c&&b.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,a,i)},function(e){t("throw",e,a,i)}):Promise.resolve(c).then(function(e){l.value=e,a(l)},i)}i(s.arg)}function n(e,n){function r(){return new Promise(function(r,o){t(e,n,r,o)})}return o=o?o.then(r,r):r()}var o;this._invoke=n}function c(e,t,n){var o=N;return function(a,i){if(o===L)throw new Error("Generator is already running");if(o===O){if("throw"===a)throw i;return f()}for(n.method=a,n.arg=i;;){var s=n.delegate;if(s){var l=u(s,n);if(l){if(l===T)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===N)throw o=O,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=L;var c=r(e,t,n);if("normal"===c.type){if(o=n.done?O:S,c.arg===T)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=O,n.method="throw",n.arg=c.arg)}}}function u(e,t){var n=e.iterator[t.method];if(n===g){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=g,u(e,t),"throw"===t.method))return T;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return T}var o=r(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,T;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=g),t.delegate=null,T):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,T)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function m(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function d(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function h(e){if(e){var t=e[y];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(b.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=g,t.done=!0,t};return r.next=r}}return{next:f}}function f(){return{value:g,done:!0}}var g,v=Object.prototype,b=v.hasOwnProperty,w="function"===typeof Symbol?Symbol:{},y=w.iterator||"@@iterator",E=w.asyncIterator||"@@asyncIterator",k=w.toStringTag||"@@toStringTag",x="object"===typeof e,_=t.regeneratorRuntime;if(_)return void(x&&(e.exports=_));_=t.regeneratorRuntime=x?e.exports:{},_.wrap=n;var N="suspendedStart",S="suspendedYield",L="executing",O="completed",T={},C={};C[y]=function(){return this};var P=Object.getPrototypeOf,j=P&&P(P(h([])));j&&j!==v&&b.call(j,y)&&(C=j);var A=i.prototype=o.prototype=Object.create(C);a.prototype=A.constructor=i,i.constructor=a,i[k]=a.displayName="GeneratorFunction",_.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},_.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,i):(e.__proto__=i,k in e||(e[k]="GeneratorFunction")),e.prototype=Object.create(A),e},_.awrap=function(e){return{__await:e}},s(l.prototype),l.prototype[E]=function(){return this},_.AsyncIterator=l,_.async=function(e,t,r,o){var a=new l(n(e,t,r,o));return _.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},s(A),A[k]="Generator",A[y]=function(){return this},A.toString=function(){return"[object Generator]"},_.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},_.values=h,d.prototype={constructor:d,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(m),!e)for(var t in this)"t"===t.charAt(0)&&b.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=g)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return a.type="throw",a.arg=e,n.next=t,r&&(n.method="next",n.arg=g),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var i=b.call(o,"catchLoc"),s=b.call(o,"finallyLoc");if(i&&s){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(i){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&b.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,T):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),T},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),m(n),T}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;m(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:h(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=g),T}}}(function(){return this}()||Function("return this")())},function(e,t){},function(e,t){}]);
gutenberg/slideshow/src/block/block.js CHANGED
@@ -157,8 +157,8 @@ var options;
157
  return (
158
  <div className={ props.className }>
159
  <div className="os-slideshow-wrapper components-placeholder">
160
- <p className="components-heading"><span><img src={getlogoImageLinkOs} alt=""/></span> Opinion Stage</p>
161
- <p className="components-heading">Please connect Opinion Stage to WordPress to start adding slideshows</p>
162
  <button className="components-button is-button is-default is-block is-primary" onClick={onConnectOSWPButtonClick}>Connect</button>
163
  </div>
164
  </div>
@@ -205,20 +205,29 @@ var options;
205
  var inputs = $(".filter__itm");
206
  for(var i = 0; i < inputs.length; i++){
207
  if($(inputs[i]).text() == text){
208
- setTimeout(function(){$(inputs[i]).trigger('click');},2000);
 
 
 
 
209
  $('button.content__links-itm').live('click', function(e) {
210
  $('.tingle-modal.opinionstage-content-popup').hide();
211
  $('.tingle-modal.opinionstage-content-popup.tingle-modal--visible').hide();
212
  });
213
  break;
214
  }
 
 
 
 
 
215
  }
216
  });
217
  });
218
 
219
  var contentViewEditStatOs = (
220
  <div className="os-slideshow-wrapper components-placeholder">
221
- <p className="components-heading"><span><img src={getlogoImageLinkOs} alt=""/></span> Opinion Stage</p>
222
  <span id="oswpLauncherContentPopupslideshow" className="components-button is-button is-default is-block is-primary" data-opinionstage-content-launch data-os-block="slideshow">Select a Slideshow</span>
223
  <input type="button" value="Create a New Slideshow" className="components-button is-button is-default is-block is-primary" onClick={onCreateButtonClick} />
224
  <div className="components-placeholder__fieldset">
@@ -247,7 +256,7 @@ var options;
247
  }else if(buttonText == 'Change'){
248
  contentViewEditStatOs = (
249
  <div className="os-slideshow-wrapper components-placeholder">
250
- <p className="components-heading"><span><img src={getlogoImageLinkOs} alt=""/></span> Opinion Stage</p>
251
  <div className="components-preview__block" >
252
  <div className="components-preview__leftBlockImage">
253
  <img src={previewBlockOsImageUrl} alt={previewBlockOsTitle} className="image" />
157
  return (
158
  <div className={ props.className }>
159
  <div className="os-slideshow-wrapper components-placeholder">
160
+ <p className="components-heading"><img src={getlogoImageLinkOs} alt=""/></p>
161
+ <p className="components-heading">Please connect WordPress to Opinion Stage to start adding slideshows</p>
162
  <button className="components-button is-button is-default is-block is-primary" onClick={onConnectOSWPButtonClick}>Connect</button>
163
  </div>
164
  </div>
205
  var inputs = $(".filter__itm");
206
  for(var i = 0; i < inputs.length; i++){
207
  if($(inputs[i]).text() == text){
208
+ setTimeout(function(){$(inputs[i]).trigger('click');},1000);
209
+ setTimeout(function(){
210
+ $('.progress_message').css('display', 'none');
211
+ $('.content__list').css('display', 'block');
212
+ },2500);
213
  $('button.content__links-itm').live('click', function(e) {
214
  $('.tingle-modal.opinionstage-content-popup').hide();
215
  $('.tingle-modal.opinionstage-content-popup.tingle-modal--visible').hide();
216
  });
217
  break;
218
  }
219
+ else {
220
+ $('.progress_message').css('display', 'block');
221
+ $('.content__list').css('display', 'none');
222
+ console.log('test');
223
+ }
224
  }
225
  });
226
  });
227
 
228
  var contentViewEditStatOs = (
229
  <div className="os-slideshow-wrapper components-placeholder">
230
+ <p className="components-heading"><img src={getlogoImageLinkOs} alt=""/></p>
231
  <span id="oswpLauncherContentPopupslideshow" className="components-button is-button is-default is-block is-primary" data-opinionstage-content-launch data-os-block="slideshow">Select a Slideshow</span>
232
  <input type="button" value="Create a New Slideshow" className="components-button is-button is-default is-block is-primary" onClick={onCreateButtonClick} />
233
  <div className="components-placeholder__fieldset">
256
  }else if(buttonText == 'Change'){
257
  contentViewEditStatOs = (
258
  <div className="os-slideshow-wrapper components-placeholder">
259
+ <p className="components-heading"><img src={getlogoImageLinkOs} alt=""/></p>
260
  <div className="components-preview__block" >
261
  <div className="components-preview__leftBlockImage">
262
  <img src={previewBlockOsImageUrl} alt={previewBlockOsTitle} className="image" />
gutenberg/survey/dist/blocks.build.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(1)},function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,a){try{var i=t[o](a),s=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}var o,a,i,s,c,l,u=n(2),p=n.n(u),m=n(5),f=(n.n(m),n(6)),d=(n.n(f),wp.i18n.__),h=wp.blocks.registerBlockType,v=wp.components,g=v.SelectControl,b=(v.TextControl,wp.editor.RichText,!1);h("opinion-stage/block-os-survey",{title:d("Survey"),icon:"list-view",category:"opinion-stage",keywords:[d("Opinion Stage Survey"),d("Opinion Stage Survey")],attributes:{embedUrl:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},oswpUrlShortcode:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},lockEmbed:{source:"attribute",attribute:"data-lock-embed",selector:"div[data-lock-embed]"},buttonText:{source:"attribute",attribute:"data-button-text",selector:"div[data-button-text]"}},edit:function(e){function t(){var t=this,n=osGutenData.OswpPluginVersion,o=osGutenData.OswpClientToken,a=osGutenData.OswpFetchDataUrl+"?type=survey&page=1&per_page=99";fetch(a,{method:"GET",headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json","OSWP-Plugin-Version":n,"OSWP-Client-Token":o}}).then(function(){var n=r(p.a.mark(function n(r){var o;return p.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.json();case 2:o=t.sent,o=o.data,b=o,e.setAttributes({buttonText:"Embed"}),e.setAttributes({buttonText:m}),"Change"==m&&"Select"!=u?e.setAttributes({embedUrl:u}):e.setAttributes({embedUrl:"Select"});case 8:case"end":return t.stop()}},n,t)}));return function(e){return n.apply(this,arguments)}}()).catch(function(e){console.log("ERROR: "+e.message)})}var n=e.attributes,u=n.embedUrl,m=(n.oswpUrlShortcode,n.lockEmbed,n.buttonText),f=(e.setAttributes,function(t){if(""==t)e.setAttributes({embedUrl:""});else if(""!=t){e.setAttributes({embedUrl:t});for(var n=0;n<b.length;n++){var r=function(e){var t=document.createElement("a");return t.href=e,t}(b[n].attributes["landing-page-url"]),l=r.pathname;if(t==l){o=b[n].attributes.title,a=b[n].attributes["image-url"],i=b[n].attributes["landing-page-url"],s=b[n].attributes["edit-url"],c=b[n].attributes["stats-url"];break}}}}),d=function(t){"Embed"==t.target.value?""==u||"Select"==u||"createNew"==u||"refresh"==u?e.setAttributes({lockEmbed:!1,buttonText:"Embed"}):(e.setAttributes({lockEmbed:!0,buttonText:"Change"}),O=wp.element.createElement(g,{id:"selectID",options:l,value:u,onChange:f,className:"components-select-control__input"})):e.setAttributes({lockEmbed:!1,buttonText:"Embed"})};window.verifyOSInsert=function(t){e.setAttributes({oswpUrlShortcode:t});for(var n=document.getElementById("selectID").options,r=0;r<n.length;r++)if(n[r].value==t){n[r].defaultSelected=!0,e.setAttributes({lockEmbed:!0,buttonText:"Change",embedUrl:t});break}};var h=osGutenData.onCreateButtonClickOs+"?w_type=survey&amp;utm_source=wordpress&amp;utm_campaign=WPMainPI&amp;utm_medium=link&amp;o=wp35e8",v=function(e){window.open(h,"_blank").focus()};m||e.setAttributes({buttonText:"Embed"});var y=osGutenData.callbackUrlOs,w=y,E=(osGutenData.getActionUrlOS,osGutenData.getLogoImageLink),x=function(e){window.location.replace(w)};if(""==osGutenData.isOsConnected)return $(document).ready(function(){$("span#oswpLauncherContentPopupsurvey , #owspLaunchInputCreate").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500)})}),wp.element.createElement("div",{className:e.className},wp.element.createElement("div",{className:"os-survey-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("span",null,wp.element.createElement("img",{src:E,alt:""}))," Opinion Stage"),wp.element.createElement("p",{className:"components-heading"},"Please connect Opinion Stage to WordPress to start adding surveys"),wp.element.createElement("button",{className:"components-button is-button is-default is-block is-primary",onClick:x},"Connect")));if(0==b)l=[{value:"Select",label:"Select a survey"},{value:"refresh",label:"Refresh"}],t();else{l=[{value:"Select",label:"Select a survey"},{value:"refresh",label:"Refresh"},{value:"",label:"-----------------"}];for(var k=0;k<b.length;k++){l[l.length]={value:b[k].attributes["landing-page-url"].replace("https://www.opinionstage.com",""),label:b[k].attributes.title};var _=function(e){var t=document.createElement("a");return t.href=e,t}(b[k].attributes["landing-page-url"]),N=_.pathname;if(u==N){o=b[k].attributes.title,a=b[k].attributes["image-url"],i=b[k].attributes["landing-page-url"],s=b[k].attributes["edit-url"],c=b[k].attributes["stats-url"];var S=b[k].id}}}"refresh"==u&&t();var O=wp.element.createElement(g,{id:"selectID",options:l,value:u,onChange:f,className:"components-select-control__input"});$(document).ready(function(){$("span#oswpLauncherContentPopupsurvey").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500);var t=$(this).attr("data-os-block");$("button#dropbtn span").text(t);for(var n=$(".filter__itm"),r=0;r<n.length;r++)if($(n[r]).text()==t){setTimeout(function(){$(n[r]).trigger("click")},2e3),$("button.content__links-itm").live("click",function(e){$(".tingle-modal.opinionstage-content-popup").hide(),$(".tingle-modal.opinionstage-content-popup.tingle-modal--visible").hide()});break}})});var L=wp.element.createElement("div",{className:"os-survey-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("span",null,wp.element.createElement("img",{src:E,alt:""}))," Opinion Stage"),wp.element.createElement("span",{id:"oswpLauncherContentPopupsurvey",className:"components-button is-button is-default is-block is-primary","data-opinionstage-content-launch":!0,"data-os-block":"survey"},"Select a Survey"),wp.element.createElement("input",{type:"button",value:"Create a New Survey",className:"components-button is-button is-default is-block is-primary",onClick:v}),wp.element.createElement("div",{className:"components-placeholder__fieldset"},O,wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large",id:"clickMe",onClick:d})));return function(e,t,n){var r,o=e.getElementsByTagName(t)[0],a=Math.floor((new Date).getTime()/1e6);e.getElementById(n)||(r=e.createElement(t),r.id=n,r.async=1,r.src="https://www.opinionstage.com/assets/loader.js?"+a,o.parentNode.insertBefore(r,o))}(document,"script","os-widget-jssdk"),S="os-widget-"+S,""!=u&&"Select"!=u&&u?"Embed"==m||"Change"==m&&(L=wp.element.createElement("div",{className:"os-survey-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("span",null,wp.element.createElement("img",{src:E,alt:""}))," Opinion Stage"),wp.element.createElement("div",{className:"components-preview__block"},wp.element.createElement("div",{className:"components-preview__leftBlockImage"},wp.element.createElement("img",{src:a,alt:o,className:"image"}),wp.element.createElement("div",{className:"overlay"},wp.element.createElement("div",{className:"text"},wp.element.createElement("a",{href:i,target:"_blank"}," View "),wp.element.createElement("a",{href:s,target:"_blank"}," Edit "),wp.element.createElement("a",{href:c,target:"_blank"}," Statistics "),wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large left-align",onClick:d})))),wp.element.createElement("div",{className:"components-preview__rightBlockContent"},wp.element.createElement("div",{className:"components-placeholder__label"},"Survey: ",o)))),O=wp.element.createElement(g,{id:"selectID",options:l,value:u,disabled:!0,onChange:f,className:"components-select-control__input"})):"Select"==u||""==u||"refresh"==u||e.setAttributes({buttonText:"Embed"}),wp.element.createElement("div",{className:e.className},L)},save:function(e){var t=e.attributes,n=(t.embedUrl,t.oswpUrlShortcode),r=t.lockEmbed,o=t.buttonText;return wp.element.createElement("div",{class:"os-survey-wrapper","data-type":"survey","data-test-url":n,"data-lock-embed":r,"data-button-text":o},'[os-widget path="',n,'"]')}})},function(e,t,n){e.exports=n(3)},function(e,t,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,a=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(4),o)r.regeneratorRuntime=a;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";function n(e,t,n,r){var a=t&&t.prototype instanceof o?t:o,i=Object.create(a.prototype),s=new f(r||[]);return i._invoke=l(e,n,s),i}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function o(){}function a(){}function i(){}function s(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function c(e){function t(n,o,a,i){var s=r(e[n],e,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"===typeof l&&b.call(l,"__await")?Promise.resolve(l.__await).then(function(e){t("next",e,a,i)},function(e){t("throw",e,a,i)}):Promise.resolve(l).then(function(e){c.value=e,a(c)},i)}i(s.arg)}function n(e,n){function r(){return new Promise(function(r,o){t(e,n,r,o)})}return o=o?o.then(r,r):r()}var o;this._invoke=n}function l(e,t,n){var o=N;return function(a,i){if(o===O)throw new Error("Generator is already running");if(o===L){if("throw"===a)throw i;return h()}for(n.method=a,n.arg=i;;){var s=n.delegate;if(s){var c=u(s,n);if(c){if(c===T)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===N)throw o=L,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=O;var l=r(e,t,n);if("normal"===l.type){if(o=n.done?L:S,l.arg===T)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=L,n.method="throw",n.arg=l.arg)}}}function u(e,t){var n=e.iterator[t.method];if(n===v){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=v,u(e,t),"throw"===t.method))return T;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return T}var o=r(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,T;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=v),t.delegate=null,T):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,T)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function m(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function f(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function d(e){if(e){var t=e[w];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(b.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=v,t.done=!0,t};return r.next=r}}return{next:h}}function h(){return{value:v,done:!0}}var v,g=Object.prototype,b=g.hasOwnProperty,y="function"===typeof Symbol?Symbol:{},w=y.iterator||"@@iterator",E=y.asyncIterator||"@@asyncIterator",x=y.toStringTag||"@@toStringTag",k="object"===typeof e,_=t.regeneratorRuntime;if(_)return void(k&&(e.exports=_));_=t.regeneratorRuntime=k?e.exports:{},_.wrap=n;var N="suspendedStart",S="suspendedYield",O="executing",L="completed",T={},C={};C[w]=function(){return this};var P=Object.getPrototypeOf,j=P&&P(P(d([])));j&&j!==g&&b.call(j,w)&&(C=j);var A=i.prototype=o.prototype=Object.create(C);a.prototype=A.constructor=i,i.constructor=a,i[x]=a.displayName="GeneratorFunction",_.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},_.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,i):(e.__proto__=i,x in e||(e[x]="GeneratorFunction")),e.prototype=Object.create(A),e},_.awrap=function(e){return{__await:e}},s(c.prototype),c.prototype[E]=function(){return this},_.AsyncIterator=c,_.async=function(e,t,r,o){var a=new c(n(e,t,r,o));return _.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},s(A),A[x]="Generator",A[w]=function(){return this},A.toString=function(){return"[object Generator]"},_.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},_.values=d,f.prototype={constructor:f,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=v,this.done=!1,this.delegate=null,this.method="next",this.arg=v,this.tryEntries.forEach(m),!e)for(var t in this)"t"===t.charAt(0)&&b.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=v)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return a.type="throw",a.arg=e,n.next=t,r&&(n.method="next",n.arg=v),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var i=b.call(o,"catchLoc"),s=b.call(o,"finallyLoc");if(i&&s){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(i){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&b.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,T):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),T},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),m(n),T}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;m(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:d(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=v),T}}}(function(){return this}()||Function("return this")())},function(e,t){},function(e,t){}]);
1
+ !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(1)},function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,a){try{var i=t[o](a),s=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}var o,a,i,s,c,l,u=n(2),p=n.n(u),m=n(5),f=(n.n(m),n(6)),d=(n.n(f),wp.i18n.__),h=wp.blocks.registerBlockType,v=wp.components,g=v.SelectControl,b=(v.TextControl,wp.editor.RichText,!1);h("opinion-stage/block-os-survey",{title:d("Survey"),icon:"list-view",category:"opinion-stage",keywords:[d("Opinion Stage Survey"),d("Opinion Stage Survey")],attributes:{embedUrl:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},oswpUrlShortcode:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},lockEmbed:{source:"attribute",attribute:"data-lock-embed",selector:"div[data-lock-embed]"},buttonText:{source:"attribute",attribute:"data-button-text",selector:"div[data-button-text]"}},edit:function(e){function t(){var t=this,n=osGutenData.OswpPluginVersion,o=osGutenData.OswpClientToken,a=osGutenData.OswpFetchDataUrl+"?type=survey&page=1&per_page=99";fetch(a,{method:"GET",headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json","OSWP-Plugin-Version":n,"OSWP-Client-Token":o}}).then(function(){var n=r(p.a.mark(function n(r){var o;return p.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.json();case 2:o=t.sent,o=o.data,b=o,e.setAttributes({buttonText:"Embed"}),e.setAttributes({buttonText:m}),"Change"==m&&"Select"!=u?e.setAttributes({embedUrl:u}):e.setAttributes({embedUrl:"Select"});case 8:case"end":return t.stop()}},n,t)}));return function(e){return n.apply(this,arguments)}}()).catch(function(e){console.log("ERROR: "+e.message)})}var n=e.attributes,u=n.embedUrl,m=(n.oswpUrlShortcode,n.lockEmbed,n.buttonText),f=(e.setAttributes,function(t){if(""==t)e.setAttributes({embedUrl:""});else if(""!=t){e.setAttributes({embedUrl:t});for(var n=0;n<b.length;n++){var r=function(e){var t=document.createElement("a");return t.href=e,t}(b[n].attributes["landing-page-url"]),l=r.pathname;if(t==l){o=b[n].attributes.title,a=b[n].attributes["image-url"],i=b[n].attributes["landing-page-url"],s=b[n].attributes["edit-url"],c=b[n].attributes["stats-url"];break}}}}),d=function(t){"Embed"==t.target.value?""==u||"Select"==u||"createNew"==u||"refresh"==u?e.setAttributes({lockEmbed:!1,buttonText:"Embed"}):(e.setAttributes({lockEmbed:!0,buttonText:"Change"}),L=wp.element.createElement(g,{id:"selectID",options:l,value:u,onChange:f,className:"components-select-control__input"})):e.setAttributes({lockEmbed:!1,buttonText:"Embed"})};window.verifyOSInsert=function(t){e.setAttributes({oswpUrlShortcode:t});for(var n=document.getElementById("selectID").options,r=0;r<n.length;r++)if(n[r].value==t){n[r].defaultSelected=!0,e.setAttributes({lockEmbed:!0,buttonText:"Change",embedUrl:t});break}};var h=osGutenData.onCreateButtonClickOs+"?w_type=survey&amp;utm_source=wordpress&amp;utm_campaign=WPMainPI&amp;utm_medium=link&amp;o=wp35e8",v=function(e){window.open(h,"_blank").focus()};m||e.setAttributes({buttonText:"Embed"});var y=osGutenData.callbackUrlOs,w=y,E=(osGutenData.getActionUrlOS,osGutenData.getLogoImageLink),k=function(e){window.location.replace(w)};if(""==osGutenData.isOsConnected)return $(document).ready(function(){$("span#oswpLauncherContentPopupsurvey , #owspLaunchInputCreate").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500)})}),wp.element.createElement("div",{className:e.className},wp.element.createElement("div",{className:"os-survey-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("img",{src:E,alt:""})),wp.element.createElement("p",{className:"components-heading"},"Please connect WordPress to Opinion Stage to start adding surveys"),wp.element.createElement("button",{className:"components-button is-button is-default is-block is-primary",onClick:k},"Connect")));if(0==b)l=[{value:"Select",label:"Select a survey"},{value:"refresh",label:"Refresh"}],t();else{l=[{value:"Select",label:"Select a survey"},{value:"refresh",label:"Refresh"},{value:"",label:"-----------------"}];for(var x=0;x<b.length;x++){l[l.length]={value:b[x].attributes["landing-page-url"].replace("https://www.opinionstage.com",""),label:b[x].attributes.title};var _=function(e){var t=document.createElement("a");return t.href=e,t}(b[x].attributes["landing-page-url"]),N=_.pathname;if(u==N){o=b[x].attributes.title,a=b[x].attributes["image-url"],i=b[x].attributes["landing-page-url"],s=b[x].attributes["edit-url"],c=b[x].attributes["stats-url"];var S=b[x].id}}}"refresh"==u&&t();var L=wp.element.createElement(g,{id:"selectID",options:l,value:u,onChange:f,className:"components-select-control__input"});$(document).ready(function(){$("span#oswpLauncherContentPopupsurvey").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500);var t=$(this).attr("data-os-block");$("button#dropbtn span").text(t);for(var n=$(".filter__itm"),r=0;r<n.length;r++){if($(n[r]).text()==t){setTimeout(function(){$(n[r]).trigger("click")},1e3),setTimeout(function(){$(".progress_message").css("display","none"),$(".content__list").css("display","block")},2500),$("button.content__links-itm").live("click",function(e){$(".tingle-modal.opinionstage-content-popup").hide(),$(".tingle-modal.opinionstage-content-popup.tingle-modal--visible").hide()});break}$(".progress_message").css("display","block"),$(".content__list").css("display","none"),console.log("test")}})});var O=wp.element.createElement("div",{className:"os-survey-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("img",{src:E,alt:""})),wp.element.createElement("span",{id:"oswpLauncherContentPopupsurvey",className:"components-button is-button is-default is-block is-primary","data-opinionstage-content-launch":!0,"data-os-block":"survey"},"Select a Survey"),wp.element.createElement("input",{type:"button",value:"Create a New Survey",className:"components-button is-button is-default is-block is-primary",onClick:v}),wp.element.createElement("div",{className:"components-placeholder__fieldset"},L,wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large",id:"clickMe",onClick:d})));return function(e,t,n){var r,o=e.getElementsByTagName(t)[0],a=Math.floor((new Date).getTime()/1e6);e.getElementById(n)||(r=e.createElement(t),r.id=n,r.async=1,r.src="https://www.opinionstage.com/assets/loader.js?"+a,o.parentNode.insertBefore(r,o))}(document,"script","os-widget-jssdk"),S="os-widget-"+S,""!=u&&"Select"!=u&&u?"Embed"==m||"Change"==m&&(O=wp.element.createElement("div",{className:"os-survey-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("img",{src:E,alt:""})),wp.element.createElement("div",{className:"components-preview__block"},wp.element.createElement("div",{className:"components-preview__leftBlockImage"},wp.element.createElement("img",{src:a,alt:o,className:"image"}),wp.element.createElement("div",{className:"overlay"},wp.element.createElement("div",{className:"text"},wp.element.createElement("a",{href:i,target:"_blank"}," View "),wp.element.createElement("a",{href:s,target:"_blank"}," Edit "),wp.element.createElement("a",{href:c,target:"_blank"}," Statistics "),wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large left-align",onClick:d})))),wp.element.createElement("div",{className:"components-preview__rightBlockContent"},wp.element.createElement("div",{className:"components-placeholder__label"},"Survey: ",o)))),L=wp.element.createElement(g,{id:"selectID",options:l,value:u,disabled:!0,onChange:f,className:"components-select-control__input"})):"Select"==u||""==u||"refresh"==u||e.setAttributes({buttonText:"Embed"}),wp.element.createElement("div",{className:e.className},O)},save:function(e){var t=e.attributes,n=(t.embedUrl,t.oswpUrlShortcode),r=t.lockEmbed,o=t.buttonText;return wp.element.createElement("div",{class:"os-survey-wrapper","data-type":"survey","data-test-url":n,"data-lock-embed":r,"data-button-text":o},'[os-widget path="',n,'"]')}})},function(e,t,n){e.exports=n(3)},function(e,t,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,a=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(4),o)r.regeneratorRuntime=a;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";function n(e,t,n,r){var a=t&&t.prototype instanceof o?t:o,i=Object.create(a.prototype),s=new f(r||[]);return i._invoke=l(e,n,s),i}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function o(){}function a(){}function i(){}function s(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function c(e){function t(n,o,a,i){var s=r(e[n],e,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"===typeof l&&b.call(l,"__await")?Promise.resolve(l.__await).then(function(e){t("next",e,a,i)},function(e){t("throw",e,a,i)}):Promise.resolve(l).then(function(e){c.value=e,a(c)},i)}i(s.arg)}function n(e,n){function r(){return new Promise(function(r,o){t(e,n,r,o)})}return o=o?o.then(r,r):r()}var o;this._invoke=n}function l(e,t,n){var o=N;return function(a,i){if(o===L)throw new Error("Generator is already running");if(o===O){if("throw"===a)throw i;return h()}for(n.method=a,n.arg=i;;){var s=n.delegate;if(s){var c=u(s,n);if(c){if(c===T)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===N)throw o=O,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=L;var l=r(e,t,n);if("normal"===l.type){if(o=n.done?O:S,l.arg===T)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=O,n.method="throw",n.arg=l.arg)}}}function u(e,t){var n=e.iterator[t.method];if(n===v){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=v,u(e,t),"throw"===t.method))return T;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return T}var o=r(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,T;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=v),t.delegate=null,T):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,T)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function m(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function f(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function d(e){if(e){var t=e[w];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(b.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=v,t.done=!0,t};return r.next=r}}return{next:h}}function h(){return{value:v,done:!0}}var v,g=Object.prototype,b=g.hasOwnProperty,y="function"===typeof Symbol?Symbol:{},w=y.iterator||"@@iterator",E=y.asyncIterator||"@@asyncIterator",k=y.toStringTag||"@@toStringTag",x="object"===typeof e,_=t.regeneratorRuntime;if(_)return void(x&&(e.exports=_));_=t.regeneratorRuntime=x?e.exports:{},_.wrap=n;var N="suspendedStart",S="suspendedYield",L="executing",O="completed",T={},C={};C[w]=function(){return this};var P=Object.getPrototypeOf,j=P&&P(P(d([])));j&&j!==g&&b.call(j,w)&&(C=j);var A=i.prototype=o.prototype=Object.create(C);a.prototype=A.constructor=i,i.constructor=a,i[k]=a.displayName="GeneratorFunction",_.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},_.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,i):(e.__proto__=i,k in e||(e[k]="GeneratorFunction")),e.prototype=Object.create(A),e},_.awrap=function(e){return{__await:e}},s(c.prototype),c.prototype[E]=function(){return this},_.AsyncIterator=c,_.async=function(e,t,r,o){var a=new c(n(e,t,r,o));return _.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},s(A),A[k]="Generator",A[w]=function(){return this},A.toString=function(){return"[object Generator]"},_.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},_.values=d,f.prototype={constructor:f,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=v,this.done=!1,this.delegate=null,this.method="next",this.arg=v,this.tryEntries.forEach(m),!e)for(var t in this)"t"===t.charAt(0)&&b.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=v)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return a.type="throw",a.arg=e,n.next=t,r&&(n.method="next",n.arg=v),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var i=b.call(o,"catchLoc"),s=b.call(o,"finallyLoc");if(i&&s){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(i){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&b.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,T):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),T},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),m(n),T}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;m(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:d(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=v),T}}}(function(){return this}()||Function("return this")())},function(e,t){},function(e,t){}]);
gutenberg/survey/src/block/block.js CHANGED
@@ -156,8 +156,8 @@ var options;
156
  return (
157
  <div className={ props.className }>
158
  <div className="os-survey-wrapper components-placeholder">
159
- <p className="components-heading"><span><img src={getlogoImageLinkOs} alt=""/></span> Opinion Stage</p>
160
- <p className="components-heading">Please connect Opinion Stage to WordPress to start adding surveys</p>
161
  <button className="components-button is-button is-default is-block is-primary" onClick={onConnectOSWPButtonClick}>Connect</button>
162
  </div>
163
  </div>
@@ -204,20 +204,29 @@ var options;
204
  var inputs = $(".filter__itm");
205
  for(var i = 0; i < inputs.length; i++){
206
  if($(inputs[i]).text() == text){
207
- setTimeout(function(){$(inputs[i]).trigger('click');},2000);
 
 
 
 
208
  $('button.content__links-itm').live('click', function(e) {
209
  $('.tingle-modal.opinionstage-content-popup').hide();
210
  $('.tingle-modal.opinionstage-content-popup.tingle-modal--visible').hide();
211
  });
212
  break;
213
  }
 
 
 
 
 
214
  }
215
  });
216
  });
217
 
218
  var contentViewEditStatOs = (
219
  <div className="os-survey-wrapper components-placeholder">
220
- <p className="components-heading"><span><img src={getlogoImageLinkOs} alt=""/></span> Opinion Stage</p>
221
  <span id="oswpLauncherContentPopupsurvey" className="components-button is-button is-default is-block is-primary" data-opinionstage-content-launch data-os-block="survey">Select a Survey</span>
222
  <input type="button" value="Create a New Survey" className="components-button is-button is-default is-block is-primary" onClick={onCreateButtonClick} />
223
  <div className="components-placeholder__fieldset">
@@ -246,7 +255,7 @@ var options;
246
  }else if(buttonText == 'Change'){
247
  contentViewEditStatOs = (
248
  <div className="os-survey-wrapper components-placeholder">
249
- <p className="components-heading"><span><img src={getlogoImageLinkOs} alt=""/></span> Opinion Stage</p>
250
  <div className="components-preview__block" >
251
  <div className="components-preview__leftBlockImage">
252
  <img src={previewBlockOsImageUrl} alt={previewBlockOsTitle} className="image" />
156
  return (
157
  <div className={ props.className }>
158
  <div className="os-survey-wrapper components-placeholder">
159
+ <p className="components-heading"><img src={getlogoImageLinkOs} alt=""/></p>
160
+ <p className="components-heading">Please connect WordPress to Opinion Stage to start adding surveys</p>
161
  <button className="components-button is-button is-default is-block is-primary" onClick={onConnectOSWPButtonClick}>Connect</button>
162
  </div>
163
  </div>
204
  var inputs = $(".filter__itm");
205
  for(var i = 0; i < inputs.length; i++){
206
  if($(inputs[i]).text() == text){
207
+ setTimeout(function(){$(inputs[i]).trigger('click');},1000);
208
+ setTimeout(function(){
209
+ $('.progress_message').css('display', 'none');
210
+ $('.content__list').css('display', 'block');
211
+ },2500);
212
  $('button.content__links-itm').live('click', function(e) {
213
  $('.tingle-modal.opinionstage-content-popup').hide();
214
  $('.tingle-modal.opinionstage-content-popup.tingle-modal--visible').hide();
215
  });
216
  break;
217
  }
218
+ else {
219
+ $('.progress_message').css('display', 'block');
220
+ $('.content__list').css('display', 'none');
221
+ console.log('test');
222
+ }
223
  }
224
  });
225
  });
226
 
227
  var contentViewEditStatOs = (
228
  <div className="os-survey-wrapper components-placeholder">
229
+ <p className="components-heading"><img src={getlogoImageLinkOs} alt=""/></p>
230
  <span id="oswpLauncherContentPopupsurvey" className="components-button is-button is-default is-block is-primary" data-opinionstage-content-launch data-os-block="survey">Select a Survey</span>
231
  <input type="button" value="Create a New Survey" className="components-button is-button is-default is-block is-primary" onClick={onCreateButtonClick} />
232
  <div className="components-placeholder__fieldset">
255
  }else if(buttonText == 'Change'){
256
  contentViewEditStatOs = (
257
  <div className="os-survey-wrapper components-placeholder">
258
+ <p className="components-heading"><img src={getlogoImageLinkOs} alt=""/></p>
259
  <div className="components-preview__block" >
260
  <div className="components-preview__leftBlockImage">
261
  <img src={previewBlockOsImageUrl} alt={previewBlockOsTitle} className="image" />
gutenberg/trivia/dist/blocks.build.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(1)},function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,a){try{var i=t[o](a),c=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(c).then(function(e){r("next",e)},function(e){r("throw",e)});e(c)}return r("next")})}}var o,a,i,c,l,s,u=n(2),p=n.n(u),m=n(5),f=(n.n(m),n(6)),d=(n.n(f),wp.i18n.__),h=wp.blocks.registerBlockType,v=wp.components,g=v.SelectControl,b=(v.TextControl,wp.editor.RichText,!1);h("opinion-stage/block-os-trivia",{title:d("Trivia Quiz"),icon:"yes",category:"opinion-stage",keywords:[d("Opinion Stage Trivia Quiz"),d("Opinion Stage Trivia Quiz Insert")],attributes:{embedUrl:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},oswpUrlShortcode:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},lockEmbed:{source:"attribute",attribute:"data-lock-embed",selector:"div[data-lock-embed]"},buttonText:{source:"attribute",attribute:"data-button-text",selector:"div[data-button-text]"}},edit:function(e){function t(){var t=this,n=osGutenData.OswpPluginVersion,o=osGutenData.OswpClientToken,a=osGutenData.OswpFetchDataUrl+"?type=trivia&page=1&per_page=99";fetch(a,{method:"GET",headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json","OSWP-Plugin-Version":n,"OSWP-Client-Token":o}}).then(function(){var n=r(p.a.mark(function n(r){var o;return p.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.json();case 2:o=t.sent,o=o.data,b=o,e.setAttributes({buttonText:"Embed"}),e.setAttributes({buttonText:m}),"Change"==m&&"Select"!=u?e.setAttributes({embedUrl:u}):e.setAttributes({embedUrl:"Select"});case 8:case"end":return t.stop()}},n,t)}));return function(e){return n.apply(this,arguments)}}()).catch(function(e){console.log("ERROR: "+e.message)})}var n=e.attributes,u=n.embedUrl,m=(n.oswpUrlShortcode,n.lockEmbed,n.buttonText),f=(e.setAttributes,function(t){if(""==t)e.setAttributes({embedUrl:""});else if(""!=t){e.setAttributes({embedUrl:t});for(var n=0;n<b.length;n++){var r=function(e){var t=document.createElement("a");return t.href=e,t}(b[n].attributes["landing-page-url"]),s=r.pathname;if(t==s){o=b[n].attributes.title,a=b[n].attributes["image-url"],i=b[n].attributes["landing-page-url"],c=b[n].attributes["edit-url"],l=b[n].attributes["stats-url"];break}}}}),d=function(t){"Embed"==t.target.value?""==u||"Select"==u||"createNew"==u||"refresh"==u?e.setAttributes({lockEmbed:!1,buttonText:"Embed"}):(e.setAttributes({lockEmbed:!0,buttonText:"Change"}),L=wp.element.createElement(g,{id:"selectID",options:s,value:u,onChange:f,className:"components-select-control__input"})):e.setAttributes({lockEmbed:!1,buttonText:"Embed"})};window.verifyOSInsert=function(t){e.setAttributes({oswpUrlShortcode:t});for(var n=document.getElementById("selectID").options,r=0;r<n.length;r++)if(n[r].value==t){n[r].defaultSelected=!0,e.setAttributes({lockEmbed:!0,buttonText:"Change",embedUrl:t});break}};var h=osGutenData.onCreateButtonClickOs+"?w_type=quiz&amp;utm_source=wordpress&amp;utm_campaign=WPMainPI&amp;utm_medium=link&amp;o=wp35e8",v=function(e){window.open(h,"_blank").focus()};m||e.setAttributes({buttonText:"Embed"});var w=osGutenData.callbackUrlOs,y=w,E=(osGutenData.getActionUrlOS,osGutenData.getLogoImageLink),x=function(e){window.location.replace(y)};if(""==osGutenData.isOsConnected)return $(document).ready(function(){$("span#oswpLauncherContentPopuptrivia , #owspLaunchInputCreate").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500)})}),wp.element.createElement("div",{className:e.className},wp.element.createElement("div",{className:"os-trivia-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("span",null,wp.element.createElement("img",{src:E,alt:""}))," Opinion Stage"),wp.element.createElement("p",{className:"components-heading"},"Please connect Opinion Stage to WordPress to start adding trivia quizzes"),wp.element.createElement("button",{className:"components-button is-button is-default is-block is-primary",onClick:x},"Connect")));if(0==b)s=[{value:"Select",label:"Select a trivia"},{value:"refresh",label:"Refresh"}],t();else{s=[{value:"Select",label:"Select a trivia"},{value:"refresh",label:"Refresh"},{value:"",label:"-----------------"}];for(var k=0;k<b.length;k++){s[s.length]={value:b[k].attributes["landing-page-url"].replace("https://www.opinionstage.com",""),label:b[k].attributes.title};var _=function(e){var t=document.createElement("a");return t.href=e,t}(b[k].attributes["landing-page-url"]),N=_.pathname;if(u==N){o=b[k].attributes.title,a=b[k].attributes["image-url"],i=b[k].attributes["landing-page-url"],c=b[k].attributes["edit-url"],l=b[k].attributes["stats-url"];var O=b[k].id}}}"refresh"==u&&t();var L=wp.element.createElement(g,{id:"selectID",options:s,value:u,onChange:f,className:"components-select-control__input"});$(document).ready(function(){$("span#oswpLauncherContentPopuptrivia").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500);var t=$(this).attr("data-os-block");$("button#dropbtn span").text(t);for(var n=$(".filter__itm"),r=0;r<n.length;r++)if($(n[r]).text()==t){setTimeout(function(){$(n[r]).trigger("click")},2e3),$("button.content__links-itm").live("click",function(e){$(".tingle-modal.opinionstage-content-popup").hide(),$(".tingle-modal.opinionstage-content-popup.tingle-modal--visible").hide()});break}})});var T=wp.element.createElement("div",{className:"os-trivia-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("span",null,wp.element.createElement("img",{src:E,alt:""}))," Opinion Stage"),wp.element.createElement("span",{id:"oswpLauncherContentPopuptrivia",className:"components-button is-button is-default is-block is-primary","data-opinionstage-content-launch":!0,"data-os-block":"trivia quiz"},"Select a Trivia Quiz"),wp.element.createElement("input",{type:"button",value:"Create a New Trivia Quiz",className:"components-button is-button is-default is-block is-primary",onClick:v}),wp.element.createElement("div",{className:"components-placeholder__fieldset"},L,wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large",id:"clickMe",onClick:d})));return function(e,t,n){var r,o=e.getElementsByTagName(t)[0],a=Math.floor((new Date).getTime()/1e6);e.getElementById(n)||(r=e.createElement(t),r.id=n,r.async=1,r.src="https://www.opinionstage.com/assets/loader.js?"+a,o.parentNode.insertBefore(r,o))}(document,"script","os-widget-jssdk"),O="os-widget-"+O,""!=u&&"Select"!=u&&u?"Embed"==m||"Change"==m&&(T=wp.element.createElement("div",{className:"os-trivia-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("span",null,wp.element.createElement("img",{src:E,alt:""}))," Opinion Stage"),wp.element.createElement("div",{className:"components-preview__block"},wp.element.createElement("div",{className:"components-preview__leftBlockImage"},wp.element.createElement("img",{src:a,alt:o,className:"image"}),wp.element.createElement("div",{className:"overlay"},wp.element.createElement("div",{className:"text"},wp.element.createElement("a",{href:i,target:"_blank"}," View "),wp.element.createElement("a",{href:c,target:"_blank"}," Edit "),wp.element.createElement("a",{href:l,target:"_blank"}," Statistics "),wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large left-align",onClick:d})))),wp.element.createElement("div",{className:"components-preview__rightBlockContent"},wp.element.createElement("div",{className:"components-placeholder__label"},"Trivia Quiz: ",o)))),L=wp.element.createElement(g,{id:"selectID",options:s,value:u,disabled:!0,onChange:f,className:"components-select-control__input"})):"Select"==u||""==u||"refresh"==u||e.setAttributes({buttonText:"Embed"}),wp.element.createElement("div",{className:e.className},T)},save:function(e){var t=e.attributes,n=(t.embedUrl,t.oswpUrlShortcode),r=t.lockEmbed,o=t.buttonText;return wp.element.createElement("div",{class:"os-trivia-wrapper","data-type":"trivia","data-test-url":n,"data-lock-embed":r,"data-button-text":o},'[os-widget path="',n,'"]')}})},function(e,t,n){e.exports=n(3)},function(e,t,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,a=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(4),o)r.regeneratorRuntime=a;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";function n(e,t,n,r){var a=t&&t.prototype instanceof o?t:o,i=Object.create(a.prototype),c=new f(r||[]);return i._invoke=s(e,n,c),i}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function o(){}function a(){}function i(){}function c(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function l(e){function t(n,o,a,i){var c=r(e[n],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"===typeof s&&b.call(s,"__await")?Promise.resolve(s.__await).then(function(e){t("next",e,a,i)},function(e){t("throw",e,a,i)}):Promise.resolve(s).then(function(e){l.value=e,a(l)},i)}i(c.arg)}function n(e,n){function r(){return new Promise(function(r,o){t(e,n,r,o)})}return o=o?o.then(r,r):r()}var o;this._invoke=n}function s(e,t,n){var o=N;return function(a,i){if(o===L)throw new Error("Generator is already running");if(o===T){if("throw"===a)throw i;return h()}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=u(c,n);if(l){if(l===S)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===N)throw o=T,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=L;var s=r(e,t,n);if("normal"===s.type){if(o=n.done?T:O,s.arg===S)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=T,n.method="throw",n.arg=s.arg)}}}function u(e,t){var n=e.iterator[t.method];if(n===v){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=v,u(e,t),"throw"===t.method))return S;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return S}var o=r(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,S;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=v),t.delegate=null,S):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,S)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function m(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function f(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function d(e){if(e){var t=e[y];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(b.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=v,t.done=!0,t};return r.next=r}}return{next:h}}function h(){return{value:v,done:!0}}var v,g=Object.prototype,b=g.hasOwnProperty,w="function"===typeof Symbol?Symbol:{},y=w.iterator||"@@iterator",E=w.asyncIterator||"@@asyncIterator",x=w.toStringTag||"@@toStringTag",k="object"===typeof e,_=t.regeneratorRuntime;if(_)return void(k&&(e.exports=_));_=t.regeneratorRuntime=k?e.exports:{},_.wrap=n;var N="suspendedStart",O="suspendedYield",L="executing",T="completed",S={},C={};C[y]=function(){return this};var P=Object.getPrototypeOf,j=P&&P(P(d([])));j&&j!==g&&b.call(j,y)&&(C=j);var A=i.prototype=o.prototype=Object.create(C);a.prototype=A.constructor=i,i.constructor=a,i[x]=a.displayName="GeneratorFunction",_.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},_.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,i):(e.__proto__=i,x in e||(e[x]="GeneratorFunction")),e.prototype=Object.create(A),e},_.awrap=function(e){return{__await:e}},c(l.prototype),l.prototype[E]=function(){return this},_.AsyncIterator=l,_.async=function(e,t,r,o){var a=new l(n(e,t,r,o));return _.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},c(A),A[x]="Generator",A[y]=function(){return this},A.toString=function(){return"[object Generator]"},_.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},_.values=d,f.prototype={constructor:f,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=v,this.done=!1,this.delegate=null,this.method="next",this.arg=v,this.tryEntries.forEach(m),!e)for(var t in this)"t"===t.charAt(0)&&b.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=v)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return a.type="throw",a.arg=e,n.next=t,r&&(n.method="next",n.arg=v),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var i=b.call(o,"catchLoc"),c=b.call(o,"finallyLoc");if(i&&c){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(i){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&b.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,S):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),S},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),m(n),S}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;m(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:d(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=v),S}}}(function(){return this}()||Function("return this")())},function(e,t){},function(e,t){}]);
1
+ !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(1)},function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,a){try{var i=t[o](a),s=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}var o,a,i,s,c,l,u=n(2),p=n.n(u),m=n(5),f=(n.n(m),n(6)),d=(n.n(f),wp.i18n.__),h=wp.blocks.registerBlockType,v=wp.components,g=v.SelectControl,b=(v.TextControl,wp.editor.RichText,!1);h("opinion-stage/block-os-trivia",{title:d("Trivia Quiz"),icon:"yes",category:"opinion-stage",keywords:[d("Opinion Stage Trivia Quiz"),d("Opinion Stage Trivia Quiz Insert")],attributes:{embedUrl:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},oswpUrlShortcode:{source:"attribute",attribute:"data-test-url",selector:"div[data-test-url]"},lockEmbed:{source:"attribute",attribute:"data-lock-embed",selector:"div[data-lock-embed]"},buttonText:{source:"attribute",attribute:"data-button-text",selector:"div[data-button-text]"}},edit:function(e){function t(){var t=this,n=osGutenData.OswpPluginVersion,o=osGutenData.OswpClientToken,a=osGutenData.OswpFetchDataUrl+"?type=trivia&page=1&per_page=99";fetch(a,{method:"GET",headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json","OSWP-Plugin-Version":n,"OSWP-Client-Token":o}}).then(function(){var n=r(p.a.mark(function n(r){var o;return p.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.json();case 2:o=t.sent,o=o.data,b=o,e.setAttributes({buttonText:"Embed"}),e.setAttributes({buttonText:m}),"Change"==m&&"Select"!=u?e.setAttributes({embedUrl:u}):e.setAttributes({embedUrl:"Select"});case 8:case"end":return t.stop()}},n,t)}));return function(e){return n.apply(this,arguments)}}()).catch(function(e){console.log("ERROR: "+e.message)})}var n=e.attributes,u=n.embedUrl,m=(n.oswpUrlShortcode,n.lockEmbed,n.buttonText),f=(e.setAttributes,function(t){if(""==t)e.setAttributes({embedUrl:""});else if(""!=t){e.setAttributes({embedUrl:t});for(var n=0;n<b.length;n++){var r=function(e){var t=document.createElement("a");return t.href=e,t}(b[n].attributes["landing-page-url"]),l=r.pathname;if(t==l){o=b[n].attributes.title,a=b[n].attributes["image-url"],i=b[n].attributes["landing-page-url"],s=b[n].attributes["edit-url"],c=b[n].attributes["stats-url"];break}}}}),d=function(t){"Embed"==t.target.value?""==u||"Select"==u||"createNew"==u||"refresh"==u?e.setAttributes({lockEmbed:!1,buttonText:"Embed"}):(e.setAttributes({lockEmbed:!0,buttonText:"Change"}),L=wp.element.createElement(g,{id:"selectID",options:l,value:u,onChange:f,className:"components-select-control__input"})):e.setAttributes({lockEmbed:!1,buttonText:"Embed"})};window.verifyOSInsert=function(t){e.setAttributes({oswpUrlShortcode:t});for(var n=document.getElementById("selectID").options,r=0;r<n.length;r++)if(n[r].value==t){n[r].defaultSelected=!0,e.setAttributes({lockEmbed:!0,buttonText:"Change",embedUrl:t});break}};var h=osGutenData.onCreateButtonClickOs+"?w_type=quiz&amp;utm_source=wordpress&amp;utm_campaign=WPMainPI&amp;utm_medium=link&amp;o=wp35e8",v=function(e){window.open(h,"_blank").focus()};m||e.setAttributes({buttonText:"Embed"});var w=osGutenData.callbackUrlOs,y=w,E=(osGutenData.getActionUrlOS,osGutenData.getLogoImageLink),k=function(e){window.location.replace(y)};if(""==osGutenData.isOsConnected)return $(document).ready(function(){$("span#oswpLauncherContentPopuptrivia , #owspLaunchInputCreate").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500)})}),wp.element.createElement("div",{className:e.className},wp.element.createElement("div",{className:"os-trivia-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"}," ",wp.element.createElement("img",{src:E,alt:""})," "),wp.element.createElement("p",{className:"components-heading"},"Please connect Wordpress to Opinion Stage to start adding trivia"),wp.element.createElement("button",{className:"components-button is-button is-default is-block is-primary",onClick:k},"Connect")));if(0==b)l=[{value:"Select",label:"Select a trivia"},{value:"refresh",label:"Refresh"}],t();else{l=[{value:"Select",label:"Select a trivia"},{value:"refresh",label:"Refresh"},{value:"",label:"-----------------"}];for(var x=0;x<b.length;x++){l[l.length]={value:b[x].attributes["landing-page-url"].replace("https://www.opinionstage.com",""),label:b[x].attributes.title};var _=function(e){var t=document.createElement("a");return t.href=e,t}(b[x].attributes["landing-page-url"]),N=_.pathname;if(u==N){o=b[x].attributes.title,a=b[x].attributes["image-url"],i=b[x].attributes["landing-page-url"],s=b[x].attributes["edit-url"],c=b[x].attributes["stats-url"];var T=b[x].id}}}"refresh"==u&&t();var L=wp.element.createElement(g,{id:"selectID",options:l,value:u,onChange:f,className:"components-select-control__input"});$(document).ready(function(){$("span#oswpLauncherContentPopuptrivia").live("click",function(e){e.preventDefault(),setTimeout(function(){$(".editor-post-save-draft").trigger("click")},500);var t=$(this).attr("data-os-block");$("button#dropbtn span").text(t);for(var n=$(".filter__itm"),r=0;r<n.length;r++){if($(n[r]).text()==t){setTimeout(function(){$(n[r]).trigger("click")},1e3),setTimeout(function(){$(".progress_message").css("display","none"),$(".content__list").css("display","block")},2500),$("button.content__links-itm").live("click",function(e){$(".tingle-modal.opinionstage-content-popup").hide(),$(".tingle-modal.opinionstage-content-popup.tingle-modal--visible").hide()});break}$(".progress_message").css("display","block"),$(".content__list").css("display","none"),console.log("test")}})});var O=wp.element.createElement("div",{className:"os-trivia-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("img",{src:E,alt:""})),wp.element.createElement("span",{id:"oswpLauncherContentPopuptrivia",className:"components-button is-button is-default is-block is-primary","data-opinionstage-content-launch":!0,"data-os-block":"trivia quiz"},"Select a Trivia Quiz"),wp.element.createElement("input",{type:"button",value:"Create a New Trivia Quiz",className:"components-button is-button is-default is-block is-primary",onClick:v}),wp.element.createElement("div",{className:"components-placeholder__fieldset"},L,wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large",id:"clickMe",onClick:d})));return function(e,t,n){var r,o=e.getElementsByTagName(t)[0],a=Math.floor((new Date).getTime()/1e6);e.getElementById(n)||(r=e.createElement(t),r.id=n,r.async=1,r.src="https://www.opinionstage.com/assets/loader.js?"+a,o.parentNode.insertBefore(r,o))}(document,"script","os-widget-jssdk"),T="os-widget-"+T,""!=u&&"Select"!=u&&u?"Embed"==m||"Change"==m&&(O=wp.element.createElement("div",{className:"os-trivia-wrapper components-placeholder"},wp.element.createElement("p",{className:"components-heading"},wp.element.createElement("img",{src:E,alt:""})),wp.element.createElement("div",{className:"components-preview__block"},wp.element.createElement("div",{className:"components-preview__leftBlockImage"},wp.element.createElement("img",{src:a,alt:o,className:"image"}),wp.element.createElement("div",{className:"overlay"},wp.element.createElement("div",{className:"text"},wp.element.createElement("a",{href:i,target:"_blank"}," View "),wp.element.createElement("a",{href:s,target:"_blank"}," Edit "),wp.element.createElement("a",{href:c,target:"_blank"}," Statistics "),wp.element.createElement("input",{type:"button",value:m,className:"components-button is-button is-default is-large left-align",onClick:d})))),wp.element.createElement("div",{className:"components-preview__rightBlockContent"},wp.element.createElement("div",{className:"components-placeholder__label"},"Trivia Quiz: ",o)))),L=wp.element.createElement(g,{id:"selectID",options:l,value:u,disabled:!0,onChange:f,className:"components-select-control__input"})):"Select"==u||""==u||"refresh"==u||e.setAttributes({buttonText:"Embed"}),wp.element.createElement("div",{className:e.className},O)},save:function(e){var t=e.attributes,n=(t.embedUrl,t.oswpUrlShortcode),r=t.lockEmbed,o=t.buttonText;return wp.element.createElement("div",{class:"os-trivia-wrapper","data-type":"trivia","data-test-url":n,"data-lock-embed":r,"data-button-text":o},'[os-widget path="',n,'"]')}})},function(e,t,n){e.exports=n(3)},function(e,t,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,a=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(4),o)r.regeneratorRuntime=a;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";function n(e,t,n,r){var a=t&&t.prototype instanceof o?t:o,i=Object.create(a.prototype),s=new f(r||[]);return i._invoke=l(e,n,s),i}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function o(){}function a(){}function i(){}function s(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function c(e){function t(n,o,a,i){var s=r(e[n],e,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"===typeof l&&b.call(l,"__await")?Promise.resolve(l.__await).then(function(e){t("next",e,a,i)},function(e){t("throw",e,a,i)}):Promise.resolve(l).then(function(e){c.value=e,a(c)},i)}i(s.arg)}function n(e,n){function r(){return new Promise(function(r,o){t(e,n,r,o)})}return o=o?o.then(r,r):r()}var o;this._invoke=n}function l(e,t,n){var o=N;return function(a,i){if(o===L)throw new Error("Generator is already running");if(o===O){if("throw"===a)throw i;return h()}for(n.method=a,n.arg=i;;){var s=n.delegate;if(s){var c=u(s,n);if(c){if(c===S)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===N)throw o=O,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=L;var l=r(e,t,n);if("normal"===l.type){if(o=n.done?O:T,l.arg===S)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=O,n.method="throw",n.arg=l.arg)}}}function u(e,t){var n=e.iterator[t.method];if(n===v){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=v,u(e,t),"throw"===t.method))return S;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return S}var o=r(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,S;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=v),t.delegate=null,S):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,S)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function m(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function f(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function d(e){if(e){var t=e[y];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(b.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=v,t.done=!0,t};return r.next=r}}return{next:h}}function h(){return{value:v,done:!0}}var v,g=Object.prototype,b=g.hasOwnProperty,w="function"===typeof Symbol?Symbol:{},y=w.iterator||"@@iterator",E=w.asyncIterator||"@@asyncIterator",k=w.toStringTag||"@@toStringTag",x="object"===typeof e,_=t.regeneratorRuntime;if(_)return void(x&&(e.exports=_));_=t.regeneratorRuntime=x?e.exports:{},_.wrap=n;var N="suspendedStart",T="suspendedYield",L="executing",O="completed",S={},C={};C[y]=function(){return this};var P=Object.getPrototypeOf,j=P&&P(P(d([])));j&&j!==g&&b.call(j,y)&&(C=j);var A=i.prototype=o.prototype=Object.create(C);a.prototype=A.constructor=i,i.constructor=a,i[k]=a.displayName="GeneratorFunction",_.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},_.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,i):(e.__proto__=i,k in e||(e[k]="GeneratorFunction")),e.prototype=Object.create(A),e},_.awrap=function(e){return{__await:e}},s(c.prototype),c.prototype[E]=function(){return this},_.AsyncIterator=c,_.async=function(e,t,r,o){var a=new c(n(e,t,r,o));return _.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},s(A),A[k]="Generator",A[y]=function(){return this},A.toString=function(){return"[object Generator]"},_.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},_.values=d,f.prototype={constructor:f,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=v,this.done=!1,this.delegate=null,this.method="next",this.arg=v,this.tryEntries.forEach(m),!e)for(var t in this)"t"===t.charAt(0)&&b.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=v)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return a.type="throw",a.arg=e,n.next=t,r&&(n.method="next",n.arg=v),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var i=b.call(o,"catchLoc"),s=b.call(o,"finallyLoc");if(i&&s){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(i){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&b.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,S):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),S},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),m(n),S}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;m(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:d(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=v),S}}}(function(){return this}()||Function("return this")())},function(e,t){},function(e,t){}]);
gutenberg/trivia/src/block/block.js CHANGED
@@ -156,8 +156,8 @@ var options;
156
  return (
157
  <div className={ props.className }>
158
  <div className="os-trivia-wrapper components-placeholder">
159
- <p className="components-heading"><span><img src={getlogoImageLinkOs} alt=""/></span> Opinion Stage</p>
160
- <p className="components-heading">Please connect Opinion Stage to WordPress to start adding trivia quizzes</p>
161
  <button className="components-button is-button is-default is-block is-primary" onClick={onConnectOSWPButtonClick}>Connect</button>
162
  </div>
163
  </div>
@@ -204,20 +204,29 @@ var options;
204
  var inputs = $(".filter__itm");
205
  for(var i = 0; i < inputs.length; i++){
206
  if($(inputs[i]).text() == text){
207
- setTimeout(function(){$(inputs[i]).trigger('click');},2000);
 
 
 
 
208
  $('button.content__links-itm').live('click', function(e) {
209
  $('.tingle-modal.opinionstage-content-popup').hide();
210
  $('.tingle-modal.opinionstage-content-popup.tingle-modal--visible').hide();
211
  });
212
  break;
213
  }
 
 
 
 
 
214
  }
215
  });
216
  });
217
 
218
  var contentViewEditStatOs = (
219
  <div className="os-trivia-wrapper components-placeholder">
220
- <p className="components-heading"><span><img src={getlogoImageLinkOs} alt=""/></span> Opinion Stage</p>
221
  <span id="oswpLauncherContentPopuptrivia" className="components-button is-button is-default is-block is-primary" data-opinionstage-content-launch data-os-block="trivia quiz">Select a Trivia Quiz</span>
222
  <input type="button" value="Create a New Trivia Quiz" className="components-button is-button is-default is-block is-primary" onClick={onCreateButtonClick} />
223
  <div className="components-placeholder__fieldset">
@@ -246,7 +255,7 @@ var options;
246
  }else if(buttonText == 'Change'){
247
  contentViewEditStatOs = (
248
  <div className="os-trivia-wrapper components-placeholder">
249
- <p className="components-heading"><span><img src={getlogoImageLinkOs} alt=""/></span> Opinion Stage</p>
250
  <div className="components-preview__block" >
251
  <div className="components-preview__leftBlockImage">
252
  <img src={previewBlockOsImageUrl} alt={previewBlockOsTitle} className="image" />
156
  return (
157
  <div className={ props.className }>
158
  <div className="os-trivia-wrapper components-placeholder">
159
+ <p className="components-heading"> <img src={getlogoImageLinkOs} alt=""/> </p>
160
+ <p className="components-heading">Please connect Wordpress to Opinion Stage to start adding trivia</p>
161
  <button className="components-button is-button is-default is-block is-primary" onClick={onConnectOSWPButtonClick}>Connect</button>
162
  </div>
163
  </div>
204
  var inputs = $(".filter__itm");
205
  for(var i = 0; i < inputs.length; i++){
206
  if($(inputs[i]).text() == text){
207
+ setTimeout(function(){$(inputs[i]).trigger('click');},1000);
208
+ setTimeout(function(){
209
+ $('.progress_message').css('display', 'none');
210
+ $('.content__list').css('display', 'block');
211
+ },2500);
212
  $('button.content__links-itm').live('click', function(e) {
213
  $('.tingle-modal.opinionstage-content-popup').hide();
214
  $('.tingle-modal.opinionstage-content-popup.tingle-modal--visible').hide();
215
  });
216
  break;
217
  }
218
+ else {
219
+ $('.progress_message').css('display', 'block');
220
+ $('.content__list').css('display', 'none');
221
+ console.log('test');
222
+ }
223
  }
224
  });
225
  });
226
 
227
  var contentViewEditStatOs = (
228
  <div className="os-trivia-wrapper components-placeholder">
229
+ <p className="components-heading"><img src={getlogoImageLinkOs} alt=""/></p>
230
  <span id="oswpLauncherContentPopuptrivia" className="components-button is-button is-default is-block is-primary" data-opinionstage-content-launch data-os-block="trivia quiz">Select a Trivia Quiz</span>
231
  <input type="button" value="Create a New Trivia Quiz" className="components-button is-button is-default is-block is-primary" onClick={onCreateButtonClick} />
232
  <div className="components-placeholder__fieldset">
255
  }else if(buttonText == 'Change'){
256
  contentViewEditStatOs = (
257
  <div className="os-trivia-wrapper components-placeholder">
258
+ <p className="components-heading"><img src={getlogoImageLinkOs} alt=""/></p>
259
  <div className="components-preview__block" >
260
  <div className="components-preview__leftBlockImage">
261
  <img src={previewBlockOsImageUrl} alt={previewBlockOsTitle} className="image" />
includes/opinionstage-ajax-functions.php CHANGED
@@ -8,6 +8,7 @@ add_action( 'wp_ajax_opinionstage_ajax_toggle_article_placement', 'opinionstage_
8
  add_action( 'wp_ajax_opinionstage_ajax_toggle_sidebar_placement', 'opinionstage_ajax_toggle_sidebar_placement' );
9
  add_action( 'wp_ajax_opinionstage_ajax_tracking_user_data', 'opinionstage_ajax_tracking_user_data' );
10
  add_action( 'wp_ajax_osa_message_delete', 'opinionstage_message_delete' );
 
11
 
12
 
13
  // Toggle the flyout placement activation flag
@@ -55,4 +56,12 @@ function opinionstage_ajax_tracking_user_data() {
55
  wp_die('1');
56
  }
57
 
58
- ?>
 
 
 
 
 
 
 
 
8
  add_action( 'wp_ajax_opinionstage_ajax_toggle_sidebar_placement', 'opinionstage_ajax_toggle_sidebar_placement' );
9
  add_action( 'wp_ajax_opinionstage_ajax_tracking_user_data', 'opinionstage_ajax_tracking_user_data' );
10
  add_action( 'wp_ajax_osa_message_delete', 'opinionstage_message_delete' );
11
+ add_action( 'wp_ajax_opinionstage_ajax_item_count', 'opinionstage_ajax_item_count' );
12
 
13
 
14
  // Toggle the flyout placement activation flag
56
  wp_die('1');
57
  }
58
 
59
+ function opinionstage_ajax_item_count() {
60
+ $os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
61
+ $os_options['item_count'] = intval($_POST['oswp_item_count']);
62
+
63
+ update_option(OPINIONSTAGE_OPTIONS_KEY, $os_options);
64
+ wp_die('1');
65
+ }
66
+
67
+ ?>
includes/opinionstage-sidebar-widget.php CHANGED
@@ -95,35 +95,38 @@ require_once( plugin_dir_path( __FILE__ ).'opinionstage-client-session.php' );
95
 
96
  <div class="opinionstage-sidebar-widget">
97
  <?php if ( $os_client_logged_in ) {?>
98
- <div class="opinionstage-sidebar-connected">
99
  <div class="os-icon icon-os-form-success"></div>
100
  <div class="opinionstage-connected-info">
101
  <div class="opinionstage-connected-title"><b>You are connected</b> to Opinion Stage with:</div>
102
  <input id="os-email" type="email" disabled="disabled" value="<?php echo($os_options["email"]) ?>">
103
  <a href="javascript:void(0)" class="switch-email" id="os-switch-email" >Switch Account</a>
104
  </div>
105
- </div>
 
106
  <p>
107
  <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title', OPINIONSTAGE_TEXT_DOMAIN); ?></label>
108
  <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" placeholder="Enter the title here" value="<?php echo $title; ?>" >
109
  </p>
110
  <div class="opinionstage-sidebar-actions">
111
- <div class="opinionstage-sidebar-enabled">
112
  <input type="checkbox" id="<?php echo $this->get_field_id('enabled'); ?>" name="<?php echo $this->get_field_name('enabled'); ?>" value="1" <?php echo($enabled == '1' ? "checked" : "") ?> />
113
  <label for="<?php echo $this->get_field_id('enabled'); ?>">Enabled</label>
114
- </div>
115
  <div class="opinionstage-sidebar-config">
116
- <a href="<?php echo opinionstage_sidebar_placement_edit_url('content'); ?>" target="_blank" class='opinionstage-blue-bordered-btn'>EDIT CONTENT</a>
117
  <a href="<?php echo opinionstage_sidebar_placement_edit_url('settings'); ?>" class='opinionstage-blue-bordered-btn opinionstage-edit-settings <?php echo( $os_client_logged_in ? '' : 'disabled' ) ?>' target="_blank">
118
  <div class="os-icon icon-os-common-settings"></div>
119
  </a>
120
  </div>
121
  </div>
122
  <?php } else { ?>
123
- <p>Connect WordPress with Opinion Stage to enable the widget</p>
124
- <div class="os-icon icon-os-poll-client"></div>
125
- <input id="os-email" type="email" class="os-email" placeholder="Enter Your Email">
126
- <a href="javascript:void(0)" class="os-button start-login" id="os-start-login">Connect</a>
 
 
127
  <?php } ?>
128
  </div>
129
  <?php
95
 
96
  <div class="opinionstage-sidebar-widget">
97
  <?php if ( $os_client_logged_in ) {?>
98
+ <!-- <div class="opinionstage-sidebar-connected">
99
  <div class="os-icon icon-os-form-success"></div>
100
  <div class="opinionstage-connected-info">
101
  <div class="opinionstage-connected-title"><b>You are connected</b> to Opinion Stage with:</div>
102
  <input id="os-email" type="email" disabled="disabled" value="<?php echo($os_options["email"]) ?>">
103
  <a href="javascript:void(0)" class="switch-email" id="os-switch-email" >Switch Account</a>
104
  </div>
105
+ </div> -->
106
+ <img src="<?php echo plugins_url( 'admin/images/os-logo.png', dirname(__FILE__) ); ?>" >
107
  <p>
108
  <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title', OPINIONSTAGE_TEXT_DOMAIN); ?></label>
109
  <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" placeholder="Enter the title here" value="<?php echo $title; ?>" >
110
  </p>
111
  <div class="opinionstage-sidebar-actions">
112
+ <!-- <div class="opinionstage-sidebar-enabled">
113
  <input type="checkbox" id="<?php echo $this->get_field_id('enabled'); ?>" name="<?php echo $this->get_field_name('enabled'); ?>" value="1" <?php echo($enabled == '1' ? "checked" : "") ?> />
114
  <label for="<?php echo $this->get_field_id('enabled'); ?>">Enabled</label>
115
+ </div> -->
116
  <div class="opinionstage-sidebar-config">
117
+ <a href="<?php echo opinionstage_sidebar_placement_edit_url('content'); ?>" target="_blank" class='opinionstage-blue-bordered-btn opinionstage-edit-content'>EDIT CONTENT</a>
118
  <a href="<?php echo opinionstage_sidebar_placement_edit_url('settings'); ?>" class='opinionstage-blue-bordered-btn opinionstage-edit-settings <?php echo( $os_client_logged_in ? '' : 'disabled' ) ?>' target="_blank">
119
  <div class="os-icon icon-os-common-settings"></div>
120
  </a>
121
  </div>
122
  </div>
123
  <?php } else { ?>
124
+ <img src="<?php echo plugins_url( 'admin/images/os-logo.png', dirname(__FILE__) ); ?>" >
125
+ <p class="connection_message">Connect WordPress with Opinion Stage to enable the widget</p>
126
+ <!-- <div class="os-icon icon-os-poll-client"></div>
127
+ <input id="os-email" type="email" class="os-email" placeholder="Enter Your Email">
128
+ <a href="javascript:void(0)" class="os-button start-login" id="os-start-login">Connect</a>-->
129
+ <a href="<?php echo admin_url( 'admin.php?page=opinionstage-getting-started' ); ?>" class="os-button start-login opinionstage-blue-btn" id="os-start-login">Connect</a>
130
  <?php } ?>
131
  </div>
132
  <?php
includes/opinionstage-utility-functions.php CHANGED
@@ -17,7 +17,12 @@ function opinionstage_link($caption, $path, $css_class = '', $query_data = array
17
  return "<a href='{$link}' target='_blank' class='{$css_class}'>{$caption}</a>";
18
  }
19
  function opinionstage_template_link($caption, $path, $css_class = '') {
20
- $link = OPINIONSTAGE_SERVER_BASE.'/'.$path;
 
 
 
 
 
21
  return "<a href='{$link}' target='_blank' class='{$css_class}'>{$caption}</a>";
22
  }
23
 
17
  return "<a href='{$link}' target='_blank' class='{$css_class}'>{$caption}</a>";
18
  }
19
  function opinionstage_template_link($caption, $path, $css_class = '') {
20
+ $query_data['utm_source'] = OPINIONSTAGE_UTM_SOURCE;
21
+ $query_data['utm_campaign'] = OPINIONSTAGE_UTM_CAMPAIGN;
22
+ $query_data['utm_medium'] = OPINIONSTAGE_UTM_MEDIUM;
23
+ $query_data['o'] = OPINIONSTAGE_WIDGET_API_KEY;
24
+
25
+ $link = OPINIONSTAGE_SERVER_BASE.'/'.$path.'&'.http_build_query($query_data);
26
  return "<a href='{$link}' target='_blank' class='{$css_class}'>{$caption}</a>";
27
  }
28
 
opinionstage-polls.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Poll, Survey, Form & Quiz Maker by OpinionStage (Deprecated)
4
  Plugin URI: https://www.opinionstage.com
5
  Description: Add a highly engaging poll, survey, quiz or contact form builder to your site. You can add the poll, survey, quiz or form to any post/page or to the sidebar.
6
- Version: 19.6.15
7
  Author: OpinionStage.com
8
  Author URI: https://www.opinionstage.com
9
  Text Domain: social-polls-by-opinionstage
3
  Plugin Name: Poll, Survey, Form & Quiz Maker by OpinionStage (Deprecated)
4
  Plugin URI: https://www.opinionstage.com
5
  Description: Add a highly engaging poll, survey, quiz or contact form builder to your site. You can add the poll, survey, quiz or form to any post/page or to the sidebar.
6
+ Version: 19.6.17
7
  Author: OpinionStage.com
8
  Author URI: https://www.opinionstage.com
9
  Text Domain: social-polls-by-opinionstage
plugin.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Poll, Survey, Form & Quiz Maker by OpinionStage
4
  Plugin URI: https://www.opinionstage.com
5
  Description: Add a highly engaging poll, survey, quiz or contact form builder to your site. You can add the poll, survey, quiz or form to any post/page or to the sidebar.
6
- Version: 19.6.15
7
  Author: OpinionStage.com
8
  Author URI: https://www.opinionstage.com
9
  Text Domain: social-polls-by-opinionstage
@@ -24,7 +24,7 @@ if ( defined('WP_DEBUG') && true === WP_DEBUG ) {
24
  }
25
  }
26
 
27
- define('OPINIONSTAGE_WIDGET_VERSION', '19.6.15');
28
 
29
  define('OPINIONSTAGE_TEXT_DOMAIN', 'social-polls-by-opinionstage');
30
 
@@ -41,6 +41,7 @@ define('OPINIONSTAGE_WIDGET_API_KEY', 'wp35e8');
41
  define('OPINIONSTAGE_UTM_SOURCE', 'wordpress');
42
  define('OPINIONSTAGE_UTM_CAMPAIGN', 'WPMainPI');
43
  define('OPINIONSTAGE_UTM_MEDIUM', 'link');
 
44
 
45
  define('OPINIONSTAGE_OPTIONS_KEY', 'opinionstage_widget');
46
 
@@ -51,6 +52,7 @@ define('OPINIONSTAGE_PLACEMENT_SHORTCODE', 'osplacement');
51
  define('OPINIONSTAGE_MENU_SLUG', 'opinionstage-settings');
52
  define('OPINIONSTAGE_PLACEMENT_SLUG', 'opinionstage-my-placements');
53
  define('OPINIONSTAGE_GETTING_STARTED_SLUG', 'opinionstage-getting-started');
 
54
 
55
  define('OPINIONSTAGE_LOGIN_CALLBACK_SLUG', 'opinionstage-login-callback');
56
 
3
  Plugin Name: Poll, Survey, Form & Quiz Maker by OpinionStage
4
  Plugin URI: https://www.opinionstage.com
5
  Description: Add a highly engaging poll, survey, quiz or contact form builder to your site. You can add the poll, survey, quiz or form to any post/page or to the sidebar.
6
+ Version: 19.6.17
7
  Author: OpinionStage.com
8
  Author URI: https://www.opinionstage.com
9
  Text Domain: social-polls-by-opinionstage
24
  }
25
  }
26
 
27
+ define('OPINIONSTAGE_WIDGET_VERSION', '19.6.17');
28
 
29
  define('OPINIONSTAGE_TEXT_DOMAIN', 'social-polls-by-opinionstage');
30
 
41
  define('OPINIONSTAGE_UTM_SOURCE', 'wordpress');
42
  define('OPINIONSTAGE_UTM_CAMPAIGN', 'WPMainPI');
43
  define('OPINIONSTAGE_UTM_MEDIUM', 'link');
44
+ define('OPINIONSTAGE_UTM_CONNECT_MEDIUM', 'connect');
45
 
46
  define('OPINIONSTAGE_OPTIONS_KEY', 'opinionstage_widget');
47
 
52
  define('OPINIONSTAGE_MENU_SLUG', 'opinionstage-settings');
53
  define('OPINIONSTAGE_PLACEMENT_SLUG', 'opinionstage-my-placements');
54
  define('OPINIONSTAGE_GETTING_STARTED_SLUG', 'opinionstage-getting-started');
55
+ define('OPINIONSTAGE_VIEW_ITEM_SLUG', 'opinionstage-view-my-items');
56
 
57
  define('OPINIONSTAGE_LOGIN_CALLBACK_SLUG', 'opinionstage-login-callback');
58
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: OpinionStage.com
3
  Donate link: https://www.opinionstage.com
4
  Tags: poll, quiz, survey, form, interactive content
5
  Requires at least: 2.8
6
- Tested up to: 5.0
7
- Stable tag: 19.6.15
8
 
9
  Add a beautiful & top performing Poll, Survey, Quiz or Form to your site. Create from scratch or use templates. Set it up in Minutes.
10
 
@@ -14,46 +14,35 @@ Looking for a Top-Notch Poll, Survey, Form & Quiz Wordpress Plugin?
14
 
15
  Check out:
16
 
17
- <a href="https://www.opinionstage.com/poll?o=wp35e8" target="_blank">Poll Maker</a> | <a href="https://www.opinionstage.com/pollstage/why-do-you-use-opinion-stage2?o=wp35e8" target="_blank">Poll Example</a>
18
- <a href="https://www.opinionstage.com/quiz?o=wp35e8" target="_blank">Quiz Maker</a> | <a href="https://www.opinionstage.com/rsacks/how-healthy-are-you?o=wp35e8" target="_blank">Quiz Example</a>
19
- <a href="https://www.opinionstage.com/survey?o=wp35e8" target="_blank">Survey Maker</a> | <a href="https://www.opinionstage.com/opinionstage/help-us-improve-opinion-stage1?o=wp35e8" target="_blank">Survey Example</a>
20
- <a href="https://www.opinionstage.com/form?o=wp35e8" target="_blank">Form Maker</a> | <a href="https://www.opinionstage.com/jamiescott935/inquiry-form?o=wp35e8" target="_blank">Form Example</a>
21
-
22
- = Why use Opinion Stage Poll, Survey, Form & Quiz Maker WordPress Plugin? =
23
-
24
- * Manage all your interactive content (polls, surveys, quizzes, forms, slideshow & article stories) from one dashboard
25
- * Opinion Stage makes it easy and fast to create content. It literally takes minutes to get up & going with a poll, quiz, survey or form
26
- * Create from scratch or use pre-made poll, quiz, survey and form templates to further speed the creation process
27
- * Boost engagement - add a poll, survey or quiz to your posts/pages to increases participation, time-on-site & page views
28
- * Drive new traffic from social shares - Using an effective quiz or poll is one of the best ways to increase social sharing and viral distribution
29
- * Generate revenue by integrating ads in your polls & quizzes - take advantage of the high engagement rates to increase revenue from your ads
30
- * Gather more leads by integrating a lead form inside the poll, quiz or survey. This will not only produce more leads, but will also produce qualified leads, as the leads will be associated with the answers of the users.
31
- * Works seamlessly on all environments - Opinion Stage uses responsive design techniques to fully support all platforms & screen sizes, including desktops, tablets and mobile devices. Reach your target audience wherever they are
32
- * Embed in any location - in the sidebar, inside a post/page, in a section on your site or in a popup
33
- * Supports setting the color theme, fonts & sizes & title ortientation of the different content formats
34
- * White label your poll, survey, quiz or form and add your own logo to make it seem as if it was built by your brand/site
35
 
36
  = Main Poll WordPress Plugin Features: =
37
 
38
- * Create polls with 4 different graphic layouts - standard poll layout, image poll layout, thumbnails poll layout & head-to-head poll layout
39
  * Easily add images & videos into the polls either from your computer or by using an integrated search poll image function
40
  * Configure if user can select one or more options when voting on the poll
41
  * Allow users to add their own answers to the poll
42
  * Block repeat voting in the poll using different mechanisms (e.g. Cookie, IP, etc)
43
  * Permit user to vote on the poll once every configured time frame (e.g. every hour, day, etc)
44
- * Display a customized message to the user after he votes on thge poll
45
- * Configure to close the poll at a specified time. You can also always manually open or close the poll
46
- * Redirect users to different landing pages based no what they voted for on the poll
47
- * Configure the order of the poll displayed options (e.g. most votes on top, random)
48
  * Configure if the poll results are displayed before voting, after voting or only to the poll creator
49
  * Configure how results are displayed to the poll voters (only percentage, number of votes, both, etc)
50
- * Configure if users are allowed to change their vote after they voted on the poll
51
- * Configure to request users to follow your facebook handle before viewing the poll results
52
- * Configure to offer users to follow your twitter handle when they share the poll in twitter
53
  * Configure webhooks for sending the information gathered from your poll to any 3rd party application
54
- * Configure to integrate ads inside the poll to increase ad-revenue from your site
55
- * Get reports of number of views and leads gathered with your polls
56
- * View graphic presentations of the poll results including pie & chart bars that show the break down of votes in the different sides
57
  * View a detailed result table of all poll votes (e.g. vote side, vote timestamp, etc)
58
  * Export the poll results to an xls or csv file
59
 
@@ -111,9 +100,9 @@ Check out:
111
 
112
  = Placements: =
113
 
114
- * Sidebar placement - you can add a poll, quiz, survey or form to the site sidebar using a dedicated Opinion Stage sidebar widget
115
- * Popup placement - you can configure to popup content (e.g. a poll, quiz, survey, etc) when users enter or exit your site using a highly configurable popup component
116
- * Articles placement - you can display the a poll, quiz, survey or form at the end of all your posts/pages by enabling the articles placement
117
 
118
  = Language support =
119
 
@@ -121,7 +110,7 @@ Opinion Stage supports over 42 languages, missing a language? Let us know!
121
 
122
  = About Opinion Stage: =
123
 
124
- Opinion Stage is a powerful & easy-to-use interactive content (e.g. poll, quiz, survey, forms, etc) creation service. Opinion Stage's highly engaging content formats are used to boost engagement, gather leads, generate revenue and to extract actionable insights. Opinion Stage works with world-leading publishers, brands & agencies as well as small sites & blogs, offering their audiences content engagement experiences that convert to measurable business values. For more details, visit <a href="https://www.opinionstage.com?o=wp35e8" target="_blank">the Opinion Stage site.</a>
125
 
126
  == Installation ==
127
 
@@ -134,7 +123,7 @@ Opinion Stage is a powerful & easy-to-use interactive content (e.g. poll, quiz,
134
 
135
  Yes, all content (e.g. poll, quiz, survey, form, etc) created with Opinion Stage is fully responsive, and designed to optimaly display on mobile, tablet and desktop
136
 
137
- = What content formats does Opinion Stage support? =
138
 
139
  With Opinion Stage you can create the following content formats: Poll, Poll Sets, Personality Quiz, Trivia Quiz, Survey, Slideshow, Form, Story Article, List. We are constantly adding additional interactive content formats so stay tuned!
140
 
@@ -142,6 +131,11 @@ With Opinion Stage you can create the following content formats: Poll, Poll Sets
142
 
143
  Polls include one question and are used for getting a quick answer on a question. Polls are often used for gathering opinions, getting feedback, running contents & competitions and generating engagement. Surveys include multiple questions of different types. Surveys are often used to gather feedback and insights. If you are still unsure whether to use a poll or a survey, contact our support team and we'll be happy to help.
144
 
 
 
 
 
 
145
  == Other Notes ==
146
 
147
  == Screenshots ==
@@ -162,6 +156,10 @@ Polls include one question and are used for getting a quick answer on a question
162
  N/A
163
 
164
  == Changelog ==
 
 
 
 
165
  = 19.6.15 =
166
  * Gutenberg fixes and improvements
167
  = 19.6.14 =
3
  Donate link: https://www.opinionstage.com
4
  Tags: poll, quiz, survey, form, interactive content
5
  Requires at least: 2.8
6
+ Tested up to: 5.1
7
+ Stable tag: 19.6.17
8
 
9
  Add a beautiful & top performing Poll, Survey, Quiz or Form to your site. Create from scratch or use templates. Set it up in Minutes.
10
 
14
 
15
  Check out:
16
 
17
+ <a href="https://www.opinionstage.com/poll?o=wp35e8" target="_blank">Poll Maker</a> | <a href="https://www.opinionstage.com/templates?utf8=✓&types%5B%5D=poll&o=wp35e8" target="_blank">Poll Examples</a>
18
+ <a href="https://www.opinionstage.com/quiz?o=wp35e8" target="_blank">Quiz Maker</a> | <a href="https://www.opinionstage.com/templates?utf8=%E2%9C%93&types%5B%5D=personality_quiz&o=wp35e8" target="_blank">Quiz Examples</a>
19
+ <a href="https://www.opinionstage.com/survey?o=wp35e8" target="_blank">Survey Maker</a> | <a href="https://www.opinionstage.com/templates?utf8=%E2%9C%93&types%5B%5D=survey&o=wp35e8" target="_blank">Survey Examples</a>
20
+ <a href="https://www.opinionstage.com/form?o=wp35e8" target="_blank">Form Maker</a> | <a href="https://www.opinionstage.com/templates?utf8=%E2%9C%93&types%5B%5D=form&o=wp35e8" target="_blank">Form Examples</a>
21
+
22
+ = Why use Opinion Stage? =
23
+
24
+ * Boost engagement & traffic - add a poll, survey or quiz to your posts/pages to increases participation, time-on-site & page views. Increase social sharing and viral distribution
25
+ * Gather more qualified leads - integrate a lead form inside the poll, quiz or survey. This will not only produce more leads, but will also produce qualified leads, as the leads will be associated with the answers of the users.
26
+ * Generate revenue - take advantage of the high engagement rates to increase revenue from ads inside and outside of the interactive content.
27
+ * Extract insights - get more insights using interactive polls & surveys designed to maximize participation. Extract actionable insights with a intuitive analytics dashboard.
 
 
 
 
 
 
 
28
 
29
  = Main Poll WordPress Plugin Features: =
30
 
31
+ * Create polls with 4 different layouts (standard, image, thumbnails & head-to-head)
32
  * Easily add images & videos into the polls either from your computer or by using an integrated search poll image function
33
  * Configure if user can select one or more options when voting on the poll
34
  * Allow users to add their own answers to the poll
35
  * Block repeat voting in the poll using different mechanisms (e.g. Cookie, IP, etc)
36
  * Permit user to vote on the poll once every configured time frame (e.g. every hour, day, etc)
37
+ * Display a customized message to the user after he votes on the poll
38
+ * Configure to close the poll at a specified time
39
+ * Redirect users to different landing pages based on their poll vote
40
+ * Configure the display order of the poll options (e.g. most votes on top, random)
41
  * Configure if the poll results are displayed before voting, after voting or only to the poll creator
42
  * Configure how results are displayed to the poll voters (only percentage, number of votes, both, etc)
43
+ * Integrate ads inside the polls to increase ad-revenue from your site
 
 
44
  * Configure webhooks for sending the information gathered from your poll to any 3rd party application
45
+ * Graphic presentations of the poll results including pie & chart bars
 
 
46
  * View a detailed result table of all poll votes (e.g. vote side, vote timestamp, etc)
47
  * Export the poll results to an xls or csv file
48
 
100
 
101
  = Placements: =
102
 
103
+ * Sidebar placement - add to the site sidebar using a dedicated Opinion Stage sidebar widget
104
+ * Popup placement - popup when users enter or exit your site using a highly configurable popup component
105
+ * Articles placement - display at the end of all your posts/pages
106
 
107
  = Language support =
108
 
110
 
111
  = About Opinion Stage: =
112
 
113
+ Opinion Stage is a powerful & easy-to-use interactive content (e.g. poll, quiz, survey, forms, etc) creation service. Opinion Stages' highly engaging content formats are used to boost engagement, gather leads, generate revenue and to extract actionable insights. Opinion Stage works with 100,000+ publishers, brands & agenencies, including world-leading publishers, brands & agencies. For more details, visit <a href="https://www.opinionstage.com?o=wp35e8" target="_blank">the Opinion Stage site.</a>
114
 
115
  == Installation ==
116
 
123
 
124
  Yes, all content (e.g. poll, quiz, survey, form, etc) created with Opinion Stage is fully responsive, and designed to optimaly display on mobile, tablet and desktop
125
 
126
+ = What interactive content formats does Opinion Stage support? =
127
 
128
  With Opinion Stage you can create the following content formats: Poll, Poll Sets, Personality Quiz, Trivia Quiz, Survey, Slideshow, Form, Story Article, List. We are constantly adding additional interactive content formats so stay tuned!
129
 
131
 
132
  Polls include one question and are used for getting a quick answer on a question. Polls are often used for gathering opinions, getting feedback, running contents & competitions and generating engagement. Surveys include multiple questions of different types. Surveys are often used to gather feedback and insights. If you are still unsure whether to use a poll or a survey, contact our support team and we'll be happy to help.
133
 
134
+ = What customization options do you offer? =
135
+
136
+ Opinion Stage offers many built-in customization options such as selecting the color theme, font and sizes. You can also use a CSS override feature to fully match the items to your brand. You can also white label the items and add your own logo.
137
+
138
+
139
  == Other Notes ==
140
 
141
  == Screenshots ==
156
  N/A
157
 
158
  == Changelog ==
159
+ = 19.6.17 =
160
+ * UI looks & feel revamp
161
+ = 19.6.16 =
162
+ * Support 5.1 and Readme updates
163
  = 19.6.15 =
164
  * Gutenberg fixes and improvements
165
  = 19.6.14 =