Version Notes
REVE Chat v1.0.1
Download this release
Release Info
Developer | REVE Chat |
Extension | ReveChat |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 1.0.1
- app/code/local/Reve/ReveChat/Helper/Data.php +0 -5
- app/code/local/Reve/{ReveChat → Revechat}/Block/Accountconfig.php +1 -1
- app/code/local/Reve/{ReveChat → Revechat}/Block/index.php +0 -0
- app/code/local/Reve/Revechat/Helper/Data.php +5 -0
- app/code/local/Reve/{ReveChat/Model/Mysql4/ReveChat.php → Revechat/Model/Mysql4/Revechat.php} +1 -1
- app/code/local/Reve/{ReveChat/Model/Mysql4/ReveChat → Revechat/Model/Mysql4/Revechat}/collection.php +1 -1
- app/code/local/Reve/{ReveChat/Model/ReveChat.php → Revechat/Model/Revechat.php} +1 -1
- app/code/local/Reve/{ReveChat → Revechat}/controllers/AdminController.php +1 -1
- app/code/local/Reve/{ReveChat → Revechat}/controllers/IndexController.php +0 -0
- app/code/local/Reve/{ReveChat → Revechat}/etc/config.xml +16 -16
- app/code/local/Reve/{ReveChat → Revechat}/sql/revechat_setup/mysql4-install-0.1.0.php +0 -0
- app/code/local/Reve/Revechat/sql/revechat_setup/mysql4-install-1.0.1.php +18 -0
- app/design/frontend/base/default/template/revechat/footer.phtml +3 -23
- app/etc/modules/{Reve_ReveChat.xml → Reve_Revechat.xml} +2 -2
- js/revechat/revechat.js +1 -200
- package.xml +5 -5
- skin/adminhtml/base/default/revechat/revechat.css +1 -1
app/code/local/Reve/ReveChat/Helper/Data.php
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Reve_ReveChat_Helper_data extends Mage_Core_Helper_Abstract
|
3 |
-
{
|
4 |
-
|
5 |
-
}
|
|
|
|
|
|
|
|
|
|
app/code/local/Reve/{ReveChat → Revechat}/Block/Accountconfig.php
RENAMED
@@ -3,7 +3,7 @@
|
|
3 |
define('REVECHAT_LOGIN_URL', REVECHAT_BASE_URL."plugins/login");
|
4 |
define('REVECHAT_SIGNUP_URL', REVECHAT_BASE_URL."plugins/createTrialAccount");
|
5 |
define('REVECHAT_GETACCOUNTDETAILS_URL', REVECHAT_BASE_URL."plugins/getAccountDetails");
|
6 |
-
class
|
7 |
{
|
8 |
|
9 |
private $revechat_model;
|
3 |
define('REVECHAT_LOGIN_URL', REVECHAT_BASE_URL."plugins/login");
|
4 |
define('REVECHAT_SIGNUP_URL', REVECHAT_BASE_URL."plugins/createTrialAccount");
|
5 |
define('REVECHAT_GETACCOUNTDETAILS_URL', REVECHAT_BASE_URL."plugins/getAccountDetails");
|
6 |
+
class Reve_Revechat_Block_Accountconfig extends Mage_Core_Block_Template
|
7 |
{
|
8 |
|
9 |
private $revechat_model;
|
app/code/local/Reve/{ReveChat → Revechat}/Block/index.php
RENAMED
File without changes
|
app/code/local/Reve/Revechat/Helper/Data.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Reve_Revechat_Helper_data extends Mage_Core_Helper_Abstract
|
3 |
+
{
|
4 |
+
|
5 |
+
}
|
app/code/local/Reve/{ReveChat/Model/Mysql4/ReveChat.php → Revechat/Model/Mysql4/Revechat.php}
RENAMED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
class
|
3 |
{
|
4 |
protected function _construct()
|
5 |
{
|
1 |
<?php
|
2 |
+
class Reve_Revechat_Model_Mysql4_Revechat extends Mage_Core_Model_Mysql4_Abstract
|
3 |
{
|
4 |
protected function _construct()
|
5 |
{
|
app/code/local/Reve/{ReveChat/Model/Mysql4/ReveChat → Revechat/Model/Mysql4/Revechat}/collection.php
RENAMED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
class
|
3 |
{
|
4 |
protected $_revechatTable;
|
5 |
|
1 |
<?php
|
2 |
+
class Reve_Revechat_Model_Mysql4_Revechat_Collection extends Varien_Data_Collection_Db
|
3 |
{
|
4 |
protected $_revechatTable;
|
5 |
|
app/code/local/Reve/{ReveChat/Model/ReveChat.php → Revechat/Model/Revechat.php}
RENAMED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
class
|
3 |
{
|
4 |
|
5 |
protected function _construct()
|
1 |
<?php
|
2 |
+
class Reve_Revechat_Model_Revechat extends Mage_Core_Model_Abstract
|
3 |
{
|
4 |
|
5 |
protected function _construct()
|
app/code/local/Reve/{ReveChat → Revechat}/controllers/AdminController.php
RENAMED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
class
|
3 |
{
|
4 |
public function accountconfigAction()
|
5 |
{
|
1 |
<?php
|
2 |
+
class Reve_Revechat_AdminController extends Mage_Adminhtml_Controller_Action
|
3 |
{
|
4 |
public function accountconfigAction()
|
5 |
{
|
app/code/local/Reve/{ReveChat → Revechat}/controllers/IndexController.php
RENAMED
File without changes
|
app/code/local/Reve/{ReveChat → Revechat}/etc/config.xml
RENAMED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<config>
|
3 |
<modules>
|
4 |
-
<
|
5 |
-
<version>0.1
|
6 |
-
</
|
7 |
</modules>
|
8 |
<global>
|
9 |
<models>
|
10 |
<revechat>
|
11 |
-
<class>
|
12 |
<resourceModel>revechat_mysql4</resourceModel>
|
13 |
</revechat>
|
14 |
<revechat_mysql4>
|
15 |
-
<class>
|
16 |
<entities>
|
17 |
<revechat>
|
18 |
<table>revechat</table>
|
@@ -22,16 +22,16 @@
|
|
22 |
</models>
|
23 |
<blocks>
|
24 |
<revechat>
|
25 |
-
<class>
|
26 |
</revechat>
|
27 |
</blocks>
|
28 |
<helpers>
|
29 |
-
<revechat><class>
|
30 |
</helpers>
|
31 |
<resources>
|
32 |
<revechat_setup>
|
33 |
<setup>
|
34 |
-
<module>
|
35 |
</setup>
|
36 |
<connection>
|
37 |
<use>core_setup</use>
|
@@ -51,31 +51,31 @@
|
|
51 |
</global>
|
52 |
<frontend>
|
53 |
<routers>
|
54 |
-
<
|
55 |
<use>standard</use>
|
56 |
<args>
|
57 |
-
<module>
|
58 |
<frontName>revechat</frontName>
|
59 |
</args>
|
60 |
-
</
|
61 |
</routers>
|
62 |
<layout>
|
63 |
<updates>
|
64 |
-
<
|
65 |
<file>revechat.xml</file>
|
66 |
-
</
|
67 |
</updates>
|
68 |
</layout>
|
69 |
</frontend>
|
70 |
<admin>
|
71 |
<routers>
|
72 |
-
<
|
73 |
<use>admin</use>
|
74 |
<args>
|
75 |
-
<module>
|
76 |
<frontName>revechat</frontName>
|
77 |
</args>
|
78 |
-
</
|
79 |
</routers>
|
80 |
</admin>
|
81 |
<adminhtml>
|
1 |
<?xml version="1.0"?>
|
2 |
<config>
|
3 |
<modules>
|
4 |
+
<Reve_Revechat>
|
5 |
+
<version>1.0.1</version>
|
6 |
+
</Reve_Revechat>
|
7 |
</modules>
|
8 |
<global>
|
9 |
<models>
|
10 |
<revechat>
|
11 |
+
<class>Reve_Revechat_Model</class>
|
12 |
<resourceModel>revechat_mysql4</resourceModel>
|
13 |
</revechat>
|
14 |
<revechat_mysql4>
|
15 |
+
<class>Reve_Revechat_Model_Mysql4</class>
|
16 |
<entities>
|
17 |
<revechat>
|
18 |
<table>revechat</table>
|
22 |
</models>
|
23 |
<blocks>
|
24 |
<revechat>
|
25 |
+
<class>Reve_Revechat_Block</class>
|
26 |
</revechat>
|
27 |
</blocks>
|
28 |
<helpers>
|
29 |
+
<revechat><class>Reve_Revechat_Helper</class></revechat>
|
30 |
</helpers>
|
31 |
<resources>
|
32 |
<revechat_setup>
|
33 |
<setup>
|
34 |
+
<module>Reve_Revechat</module>
|
35 |
</setup>
|
36 |
<connection>
|
37 |
<use>core_setup</use>
|
51 |
</global>
|
52 |
<frontend>
|
53 |
<routers>
|
54 |
+
<Reve_Revechat>
|
55 |
<use>standard</use>
|
56 |
<args>
|
57 |
+
<module>Reve_Revechat</module>
|
58 |
<frontName>revechat</frontName>
|
59 |
</args>
|
60 |
+
</Reve_Revechat>
|
61 |
</routers>
|
62 |
<layout>
|
63 |
<updates>
|
64 |
+
<Reve_Revechat>
|
65 |
<file>revechat.xml</file>
|
66 |
+
</Reve_Revechat>
|
67 |
</updates>
|
68 |
</layout>
|
69 |
</frontend>
|
70 |
<admin>
|
71 |
<routers>
|
72 |
+
<Reve_Revechat>
|
73 |
<use>admin</use>
|
74 |
<args>
|
75 |
+
<module>Reve_Revechat</module>
|
76 |
<frontName>revechat</frontName>
|
77 |
</args>
|
78 |
+
</Reve_Revechat>
|
79 |
</routers>
|
80 |
</admin>
|
81 |
<adminhtml>
|
app/code/local/Reve/{ReveChat → Revechat}/sql/revechat_setup/mysql4-install-0.1.0.php
RENAMED
File without changes
|
app/code/local/Reve/Revechat/sql/revechat_setup/mysql4-install-1.0.1.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
$installer->startSetup();
|
4 |
+
|
5 |
+
$installer->run("
|
6 |
+
CREATE TABLE IF NOT EXISTS {$this->getTable('revechat')} (
|
7 |
+
`revechat_id` int(11) NOT NULL auto_increment,
|
8 |
+
`revechat_aid` varchar(100) NULL,
|
9 |
+
`revechat_tracking_id` varchar(100) NULL,
|
10 |
+
PRIMARY KEY (`revechat_id`)
|
11 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
12 |
+
|
13 |
+
INSERT INTO {$this->getTable('revechat')}
|
14 |
+
(`revechat_id`, `revechat_aid`, `revechat_tracking_id`) VALUES
|
15 |
+
(1, '','');
|
16 |
+
");
|
17 |
+
|
18 |
+
$installer->endSetup();
|
app/design/frontend/base/default/template/revechat/footer.phtml
CHANGED
@@ -6,31 +6,11 @@ if (!isset($revechat_options)){
|
|
6 |
}
|
7 |
?>
|
8 |
|
9 |
-
<?php if($revechat_options['revechat_aid'] != null
|
10 |
|
11 |
?>
|
12 |
-
<script type='text/javascript'>
|
13 |
-
var
|
14 |
-
function initializeWidget(){
|
15 |
-
var aid="<?php echo $revechat_options['revechat_aid']; ?>";
|
16 |
-
new ReveChatWidget(aid);
|
17 |
-
var trackingID ="<?php echo $revechat_options['revechat_tracking_id']; ?>";}
|
18 |
-
(function loadSrc(src_url, onload_callback){
|
19 |
-
var script = document.createElement("script");
|
20 |
-
if(script.readyState){
|
21 |
-
script.onreadystatechange = function (){
|
22 |
-
if(script.readyState === "loaded" || script.readyState === "complete"){
|
23 |
-
script.onreadystatechange = null
|
24 |
-
onload_callback();}}
|
25 |
-
} else {
|
26 |
-
script.onload = function(){
|
27 |
-
onload_callback();
|
28 |
-
} }
|
29 |
-
script.src = src_url;
|
30 |
-
var first_script = document.getElementsByTagName("script")[0];
|
31 |
-
first_script.parentNode.insertBefore(script, first_script);
|
32 |
-
})(url, initializeWidget);
|
33 |
-
<!-- Add textArea code at every page in your website -->
|
34 |
</script>
|
35 |
|
36 |
<?php } ?>
|
6 |
}
|
7 |
?>
|
8 |
|
9 |
+
<?php if($revechat_options['revechat_aid'] != null){
|
10 |
|
11 |
?>
|
12 |
+
<script type='text/javascript'>
|
13 |
+
;!function(){function e(){var e="<?php echo $revechat_options['revechat_aid']; ?>";new ReveChatWidget(e)}var t=document.createElement("script");t.readyState?t.onreadystatechange=function(){("loaded"===t.readyState||"complete"===t.readyState)&&(t.onreadystatechange=null,e())}:t.onload=function(){e()},t.src="https://static.revechat.com/client/scripts/configuration.js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(t,a)}();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
</script>
|
15 |
|
16 |
<?php } ?>
|
app/etc/modules/{Reve_ReveChat.xml → Reve_Revechat.xml}
RENAMED
@@ -1,9 +1,9 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<config>
|
3 |
<modules>
|
4 |
-
<
|
5 |
<active>true</active>
|
6 |
<codePool>local</codePool>
|
7 |
-
</
|
8 |
</modules>
|
9 |
</config>
|
1 |
<?xml version="1.0"?>
|
2 |
<config>
|
3 |
<modules>
|
4 |
+
<Reve_Revechat>
|
5 |
<active>true</active>
|
6 |
<codePool>local</codePool>
|
7 |
+
</Reve_Revechat>
|
8 |
</modules>
|
9 |
</config>
|
js/revechat/revechat.js
CHANGED
@@ -1,200 +1 @@
|
|
1 |
-
jQuery.noConflict();
|
2 |
-
(function($){
|
3 |
-
var baseUrl = 'https://dashboard.revechat.com/';
|
4 |
-
var ReveChat ={
|
5 |
-
init: function () {
|
6 |
-
this.toggleForms();
|
7 |
-
this.bindFormSubmit();
|
8 |
-
},
|
9 |
-
|
10 |
-
toggleForms: function ()
|
11 |
-
{
|
12 |
-
var toggleForms = function ()
|
13 |
-
{
|
14 |
-
if ($('#new_revechat_account').is(':checked'))
|
15 |
-
{
|
16 |
-
$('#revechat_already_have').hide();
|
17 |
-
$('#revechat_new_account').show();
|
18 |
-
$('#edit-name').focus();
|
19 |
-
}
|
20 |
-
else if ($('#has_revechat_account').is(':checked'))
|
21 |
-
{
|
22 |
-
$('#revechat_new_account').hide();
|
23 |
-
$('#revechat_already_have').show();
|
24 |
-
$('#edit-revechat-account-email').focus();
|
25 |
-
}
|
26 |
-
};
|
27 |
-
toggleForms();
|
28 |
-
$('#revechat_choose_form input').click(toggleForms);
|
29 |
-
},
|
30 |
-
|
31 |
-
bindFormSubmit: function () {
|
32 |
-
$('#revechat-admin-settings-form').submit(function(e)
|
33 |
-
{
|
34 |
-
//e.preventDefault();
|
35 |
-
if (((parseInt($('input[name=revechat_aid]').val()) !== 0)&&(parseInt($('input[name=revechat_trackingid]').val()) !== 0)) || $('#has_revechat_account').is(':checked'))
|
36 |
-
{
|
37 |
-
return ReveChat.alreadyHaveAccountForm();
|
38 |
-
}
|
39 |
-
else
|
40 |
-
{
|
41 |
-
return ReveChat.newLicenseForm();
|
42 |
-
}
|
43 |
-
|
44 |
-
});
|
45 |
-
},
|
46 |
-
|
47 |
-
alreadyHaveAccountForm: function()
|
48 |
-
{
|
49 |
-
if(this.validEmail())
|
50 |
-
{
|
51 |
-
if((parseInt($('input[name=revechat_aid]').val()) == 0)||(parseInt($('input[name=revechat_trackingid]').val()) == 0))
|
52 |
-
{
|
53 |
-
var login = $.trim($('#edit-revechat-account-email').val());
|
54 |
-
if(!login.length)
|
55 |
-
{
|
56 |
-
$('#edit-revechat-account-email').focus();
|
57 |
-
return false;
|
58 |
-
}
|
59 |
-
$('#revechat_already_have .ajax_message').removeClass('message').addClass('wait').html('Please wait…');
|
60 |
-
var signInUrl = baseUrl +'/license/adminId/'+$('#edit-revechat-account-email').val()+'/?callback=?';
|
61 |
-
|
62 |
-
$.getJSON(signInUrl,
|
63 |
-
function(response)
|
64 |
-
{
|
65 |
-
|
66 |
-
if (response.error)
|
67 |
-
{
|
68 |
-
$('#revechat_already_have .ajax_message').removeClass('wait').addClass('message alert').html('Incorrect REVE Chat login.');
|
69 |
-
$('#edit-revechat-account-email').focus();
|
70 |
-
return false;
|
71 |
-
}
|
72 |
-
else
|
73 |
-
{
|
74 |
-
$('input[name=revechat_aid]').val(response.data.account_id);
|
75 |
-
$('input[name=revechat_trackingid]').val(response.data.tracking_id);
|
76 |
-
|
77 |
-
$('#revechat-admin-settings-form').submit();
|
78 |
-
}
|
79 |
-
});
|
80 |
-
return false;
|
81 |
-
}
|
82 |
-
}
|
83 |
-
else
|
84 |
-
{
|
85 |
-
$('#revechat_already_have .ajax_message').removeClass('wait').addClass('message alert').html('Invalid Email.');
|
86 |
-
$('#edit-revechat-account-email').focus();
|
87 |
-
return false;
|
88 |
-
}
|
89 |
-
return true;
|
90 |
-
},
|
91 |
-
|
92 |
-
newLicenseForm: function()
|
93 |
-
{
|
94 |
-
if (parseInt(($('input[name=revechat_aid]').val()) > 0) && parseInt(($('input[name=revechat_trackingid]').val()) > 0))
|
95 |
-
{
|
96 |
-
return true;
|
97 |
-
}
|
98 |
-
|
99 |
-
if(this.validateNewLicenseForm())
|
100 |
-
{
|
101 |
-
$('#revechat_new_account .ajax_message').removeClass('message').addClass('wait').html('Please wait...');
|
102 |
-
|
103 |
-
ReveChat.createLicense();
|
104 |
-
}
|
105 |
-
return false;
|
106 |
-
},
|
107 |
-
createLicense: function()
|
108 |
-
{
|
109 |
-
|
110 |
-
$('#revechat_new_account .ajax_message').removeClass('message').addClass('wait').html('Creating new account…');
|
111 |
-
|
112 |
-
var signUpUrl = baseUrl + '/revechat/rest/api/signup.do';
|
113 |
-
|
114 |
-
$.ajax({
|
115 |
-
data: { 'firstname':$('#edit-name').val(), 'lastname':' ', 'mailAddr':$('#edit-email').val(), 'phoneNo':$('#edit-phone').val() },
|
116 |
-
type:'POST',
|
117 |
-
url:signUpUrl,
|
118 |
-
dataType: 'json',
|
119 |
-
cache:false,
|
120 |
-
success: function(response) {
|
121 |
-
if(response.error)
|
122 |
-
{
|
123 |
-
$('#revechat_new_account .ajax_message').html(response.error).addClass('message alert').removeClass('wait');
|
124 |
-
return false;
|
125 |
-
}
|
126 |
-
else if(response.success)
|
127 |
-
{
|
128 |
-
$('#revechat-admin-settings-form').children('div').remove();
|
129 |
-
var message = '<div class="revechat_success_message">';
|
130 |
-
message += '<h3>Thank you for sigining up with REVE Chat</h3>';
|
131 |
-
message += '<p>A verification link has been sent to your registered email address from <strong>noreply-support@revechat.com</strong>. Kindly verify your email to complete the signup process</p>';
|
132 |
-
message += '<p>Then come backe again to integrate REVE Chat in your website.</p>';
|
133 |
-
message += '</div>';
|
134 |
-
$(message).appendTo('#revechat-admin-settings-form');
|
135 |
-
return false;
|
136 |
-
}
|
137 |
-
}
|
138 |
-
});
|
139 |
-
},
|
140 |
-
validEmail: function()
|
141 |
-
{
|
142 |
-
|
143 |
-
if($('#edit-submit').val() != 'Remove')
|
144 |
-
{
|
145 |
-
if (/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i.test($('#edit-revechat-account-email').val()) == false)
|
146 |
-
{
|
147 |
-
//alert ('Please enter a valid email address.');
|
148 |
-
$('#edit-email').focus();
|
149 |
-
return false;
|
150 |
-
}
|
151 |
-
}
|
152 |
-
return true;
|
153 |
-
},
|
154 |
-
|
155 |
-
validateNewLicenseForm: function()
|
156 |
-
{
|
157 |
-
if ($('#edit-name').val().length < 1)
|
158 |
-
{
|
159 |
-
alert ('Please enter your full name.');
|
160 |
-
$('#edit-name').addClass('error').focus();
|
161 |
-
return false;
|
162 |
-
}
|
163 |
-
|
164 |
-
if (/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i.test($('#edit-email').val()) == false)
|
165 |
-
{
|
166 |
-
alert ('Please enter a valid email address.');
|
167 |
-
$('#edit-email').addClass('error').focus();
|
168 |
-
return false;
|
169 |
-
}
|
170 |
-
|
171 |
-
if ($('#edit-phone').val().length < 1)
|
172 |
-
{
|
173 |
-
alert ('Please enter your phone number.');
|
174 |
-
$('#edit-phone').addClass('error').focus();
|
175 |
-
return false;
|
176 |
-
}
|
177 |
-
|
178 |
-
return true;
|
179 |
-
},
|
180 |
-
getWebsite: function()
|
181 |
-
{
|
182 |
-
return location.href.replace(/admin\/config\/.*/, '');
|
183 |
-
},
|
184 |
-
calculateGMT: function()
|
185 |
-
{
|
186 |
-
var date, dateGMTString, date2, gmt;
|
187 |
-
|
188 |
-
date = new Date((new Date()).getFullYear(), 0, 1, 0, 0, 0, 0);
|
189 |
-
dateGMTString = date.toGMTString();
|
190 |
-
date2 = new Date(dateGMTString.substring(0, dateGMTString.lastIndexOf(" ")-1));
|
191 |
-
gmt = ((date - date2) / (1000 * 60 * 60)).toString();
|
192 |
-
|
193 |
-
return gmt;
|
194 |
-
}
|
195 |
-
}
|
196 |
-
$(document).ready(function()
|
197 |
-
{
|
198 |
-
ReveChat.init();
|
199 |
-
});
|
200 |
-
})(jQuery);
|
1 |
+
jQuery.noConflict(),function(e){var a="https://dashboard.revechat.com/",t={init:function(){this.toggleForms(),this.bindFormSubmit()},toggleForms:function(){var a=function(){e("#new_revechat_account").is(":checked")?(e("#revechat_already_have").hide(),e("#revechat_new_account").show(),e("#edit-name").focus()):e("#has_revechat_account").is(":checked")&&(e("#revechat_new_account").hide(),e("#revechat_already_have").show(),e("#edit-revechat-account-email").focus())};a(),e("#revechat_choose_form input").click(a)},bindFormSubmit:function(){e("#revechat-admin-settings-form").submit(function(a){return 0!==parseInt(e("input[name=revechat_aid]").val())&&0!==parseInt(e("input[name=revechat_trackingid]").val())||e("#has_revechat_account").is(":checked")?t.alreadyHaveAccountForm():t.newLicenseForm()})},alreadyHaveAccountForm:function(){if(!this.validEmail())return e("#revechat_already_have .ajax_message").removeClass("wait").addClass("message alert").html("Invalid Email."),e("#edit-revechat-account-email").focus(),!1;if(0==parseInt(e("input[name=revechat_aid]").val())||0==parseInt(e("input[name=revechat_trackingid]").val())){var t=e.trim(e("#edit-revechat-account-email").val());if(!t.length)return e("#edit-revechat-account-email").focus(),!1;e("#revechat_already_have .ajax_message").removeClass("message").addClass("wait").html("Please wait…");var r=a+"/license/adminId/"+e("#edit-revechat-account-email").val()+"/?callback=?";return e.getJSON(r,function(a){return a.error?(e("#revechat_already_have .ajax_message").removeClass("wait").addClass("message alert").html("Incorrect REVE Chat login."),e("#edit-revechat-account-email").focus(),!1):(e("input[name=revechat_aid]").val(a.data.account_id),e("input[name=revechat_trackingid]").val(a.data.tracking_id),e("#revechat-admin-settings-form").submit(),void 0)}),!1}return!0},newLicenseForm:function(){return parseInt(e("input[name=revechat_aid]").val()>0)&&parseInt(e("input[name=revechat_trackingid]").val()>0)?!0:(this.validateNewLicenseForm()&&(e("#revechat_new_account .ajax_message").removeClass("message").addClass("wait").html("Please wait..."),t.createLicense()),!1)},createLicense:function(){e("#revechat_new_account .ajax_message").removeClass("message").addClass("wait").html("Creating new account…");var t=a+"/revechat/rest/api/signup.do";e.ajax({data:{firstname:e("#edit-name").val(),lastname:" ",mailAddr:e("#edit-email").val(),phoneNo:e("#edit-phone").val()},type:"POST",url:t,dataType:"json",cache:!1,success:function(a){if(a.error)return e("#revechat_new_account .ajax_message").html(a.error).addClass("message alert").removeClass("wait"),!1;if(a.success){e("#revechat-admin-settings-form").children("div").remove();var t='<div class="revechat_success_message">';return t+="<h3>Thank you for sigining up with REVE Chat</h3>",t+="<p>A verification link has been sent to your registered email address from <strong>noreply-support@revechat.com</strong>. Kindly verify your email to complete the signup process</p>",t+="<p>Then come backe again to integrate REVE Chat in your website.</p>",t+="</div>",e(t).appendTo("#revechat-admin-settings-form"),!1}}})},validEmail:function(){return"Remove"!=e("#edit-submit").val()&&0==/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i.test(e("#edit-revechat-account-email").val())?(e("#edit-email").focus(),!1):!0},validateNewLicenseForm:function(){return e("#edit-name").val().length<1?(alert("Please enter your full name."),e("#edit-name").addClass("error").focus(),!1):0==/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i.test(e("#edit-email").val())?(alert("Please enter a valid email address."),e("#edit-email").addClass("error").focus(),!1):e("#edit-phone").val().length<1?(alert("Please enter your phone number."),e("#edit-phone").addClass("error").focus(),!1):!0}};e(document).ready(function(){t.init()})}(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>ReveChat</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.gnu.org/licenses/gpl-3.0.en.html">GPL</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>REVE Chat is powerful and intuitive real-time customer engagement tools.</summary>
|
10 |
<description>REVE Chat is a powerful and intuitive live support chat software. It allows your agents to personally guide and help visitors, while they go through the various sections of your website.</description>
|
11 |
-
<notes>REVE Chat v1.0.
|
12 |
<authors><author><name>REVE Chat</name><user>REVEChat_Main</user><email>product@revechat.com</email></author></authors>
|
13 |
-
<date>2016-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magelocal"><dir name="Reve"><dir name="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.4.0</min><max>7.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>ReveChat</name>
|
4 |
+
<version>1.0.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.gnu.org/licenses/gpl-3.0.en.html">GPL</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>REVE Chat is powerful and intuitive real-time customer engagement tools.</summary>
|
10 |
<description>REVE Chat is a powerful and intuitive live support chat software. It allows your agents to personally guide and help visitors, while they go through the various sections of your website.</description>
|
11 |
+
<notes>REVE Chat v1.0.1</notes>
|
12 |
<authors><author><name>REVE Chat</name><user>REVEChat_Main</user><email>product@revechat.com</email></author></authors>
|
13 |
+
<date>2016-08-02</date>
|
14 |
+
<time>11:15:30</time>
|
15 |
+
<contents><target name="magelocal"><dir name="Reve"><dir name="Revechat"><dir name="Block"><file name="Accountconfig.php" hash="f4593004891818104ca54ad1aa3504df"/><file name="index.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="Helper"><file name="Data.php" hash="339184bdca83b945f07869e7d800008a"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Revechat"><file name="collection.php" hash="25aa6160ab86da1400d81c94b9d18564"/></dir><file name="Revechat.php" hash="47d960c1331a7dcf2c70389c1eac2e76"/></dir><file name="Revechat.php" hash="f1b0ebbdc86ebb6b3d329c612a6f32f3"/></dir><dir name="controllers"><file name="AdminController.php" hash="19581401d082e45b0ad01d2adb87c355"/><file name="IndexController.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="etc"><file name="config.xml" hash="56b8bdbcd3acdfd78c7338310d99de6f"/></dir><dir name="sql"><dir name="revechat_setup"><file name="mysql4-install-0.1.0.php" hash="d14c5ac02972c963340be40bb19be6eb"/><file name="mysql4-install-1.0.1.php" hash="d14c5ac02972c963340be40bb19be6eb"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="revechat.xml" hash="1b4656e3ba8ad4669ed7351a6a451500"/></dir><dir name="template"><dir name="revechat"><file name="footer.phtml" hash="f41e16a315a9d5faa3e5147f98b35967"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Reve_Revechat.xml" hash="bc5c70af935a018ec3e1cb86c9eab3fa"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="revechat"><file name="ajax_loader.gif" hash="af962b37779a443a77ab836b3b7a93f5"/><file name="revechat.css" hash="b2f0c621b1b5c58133043d6b3143c217"/></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="revechat"><file name="jquery-1.4.2.min.js" hash="10092eee563dec2dca82b77d2cf5a1ae"/><file name="revechat.js" hash="a0d5dfcac82ab1c472949105c767bcd7"/></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.4.0</min><max>7.0.0</max></php></required></dependencies>
|
18 |
</package>
|
skin/adminhtml/base/default/revechat/revechat.css
CHANGED
@@ -71,7 +71,7 @@ ul#revechat_choose_form li label{
|
|
71 |
margin-bottom: 30px;
|
72 |
padding: 18px;
|
73 |
}
|
74 |
-
fieldset {
|
75 |
border: 1px solid #c0c0c0;
|
76 |
margin-top: 20px;
|
77 |
}
|
71 |
margin-bottom: 30px;
|
72 |
padding: 18px;
|
73 |
}
|
74 |
+
#revechat-admin-settings-form fieldset {
|
75 |
border: 1px solid #c0c0c0;
|
76 |
margin-top: 20px;
|
77 |
}
|