File tree Expand file tree Collapse file tree 6 files changed +40
-6
lines changed
views/templates/admin/tawkto/helpers/view
views/templates/admin/tawkto/helpers/view Expand file tree Collapse file tree 6 files changed +40
-6
lines changed Original file line number Diff line number Diff line change 22<module >
33 <name >tawkto</name >
44 <displayName ><![CDATA[ tawk.to]]> </displayName >
5- <version ><![CDATA[ 1.2.0 ]]> </version >
5+ <version ><![CDATA[ 1.2.1 ]]> </version >
66 <description ><![CDATA[ tawk.to live chat integration.]]> </description >
77 <author ><![CDATA[ tawk.to]]> </author >
88 <tab ><![CDATA[ front_office_features]]> </tab >
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public function __construct()
3333 {
3434 $ this ->name = 'tawkto ' ;
3535 $ this ->tab = 'front_office_features ' ;
36- $ this ->version = '1.2.0 ' ;
36+ $ this ->version = '1.2.1 ' ;
3737 $ this ->author = 'tawk.to ' ;
3838 $ this ->need_instance = 0 ;
3939 $ this ->ps_versions_compliancy = array ('min ' => '1.5 ' , 'max ' => '1.6 ' );
Original file line number Diff line number Diff line change 3939<script type =" text/javascript" >
4040 var domain = " { $domain |escape :' url' :' UTF-8' } " ;;
4141 var currentHost = window .location .protocol + " //" + window .location .host ,
42- url = decodeURIComponent (" { $iframe_url |cat :' &parentDomain=' |escape :' url' :' UTF-8' } " ) + currentHost,
42+ url = decodeURIComponent (" { $iframe_url |cat :' &pltf=prestashop&pltfv=1.6& parentDomain=' |escape :' url' :' UTF-8' } " ) + currentHost,
4343 baseUrl = decodeURIComponent (" { $base_url |escape :' url' :' UTF-8' } " ),
4444 current_id_tab = " { $tab_id |escape :' javascript' :' UTF-8' } " ,
4545 controller = decodeURIComponent (" { $controller |escape :' url' :' UTF-8' } " );
5858 if (e.data.action === ' removeWidget' ) {
5959 removeWidget(e);
6060 }
61+
62+ if (e.data.action === ' reloadHeight' ) {
63+ reloadIframeHeight(e.data.height);
64+ }
6165 }
6266 } );
6367
111115 }
112116 } );
113117 }
118+
119+ function reloadIframeHeight(height) {
120+ if (! height) {
121+ return;
122+ }
123+
124+ var iframe = jQuery(' #tawkIframe' );
125+ if (height === iframe.height()) {
126+ return;
127+ }
128+
129+ iframe.height(height);
130+ }
114131 { /literal }
115132</script >
116133
Original file line number Diff line number Diff line change 22<module >
33 <name >tawkto</name >
44 <displayName ><![CDATA[ tawk.to]]> </displayName >
5- <version ><![CDATA[ 1.2.0 ]]> </version >
5+ <version ><![CDATA[ 1.2.1 ]]> </version >
66 <description ><![CDATA[ tawk.to live chat integration.]]> </description >
77 <author ><![CDATA[ tawk.to]]> </author >
88 <tab ><![CDATA[ front_office_features]]> </tab >
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public function __construct()
3333 {
3434 $ this ->name = 'tawkto ' ;
3535 $ this ->tab = 'front_office_features ' ;
36- $ this ->version = '1.2.0 ' ;
36+ $ this ->version = '1.2.1 ' ;
3737 $ this ->author = 'tawk.to ' ;
3838 $ this ->need_instance = 0 ;
3939 $ this ->ps_versions_compliancy = array ('min ' => '1.5 ' , 'max ' => '1.7 ' );
Original file line number Diff line number Diff line change 3939<script >
4040 var domain = " { $domain |escape :' url' :' UTF-8' } " ;;
4141 var currentHost = window .location .protocol + " //" + window .location .host ,
42- url = decodeURIComponent (" { $iframe_url |cat :' &parentDomain=' |escape :' url' :' UTF-8' } " ) + currentHost,
42+ url = decodeURIComponent (" { $iframe_url |cat :' &pltf=prestashop&pltfv=1.7& parentDomain=' |escape :' url' :' UTF-8' } " ) + currentHost,
4343 baseUrl = decodeURIComponent (" { $base_url |escape :' url' :' UTF-8' } " ),
4444 current_id_tab = " { $tab_id |escape :' javascript' :' UTF-8' } " ,
4545 controller = decodeURIComponent (" { $controller |escape :' url' :' UTF-8' } " );
5959 if (e.data.action === ' removeWidget' ) {
6060 removeWidget(e);
6161 }
62+
63+ if (e.data.action === ' reloadHeight' ) {
64+ reloadIframeHeight(e.data.height);
65+ }
6266 }
6367 } );
6468
118122 }
119123 } );
120124 }
125+
126+ function reloadIframeHeight(height) {
127+ if (! height) {
128+ return;
129+ }
130+
131+ var iframe = jQuery(' #tawkIframe' );
132+ if (height === iframe.height()) {
133+ return;
134+ }
135+
136+ iframe.height(height);
137+ }
121138 { /literal }
122139</script >
123140
You can’t perform that action at this time.
0 commit comments