Version Notes
Frontend update
Download this release
Release Info
Developer | Davide Costa |
Extension | Squeezol_Payment |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
app/design/frontend/base/default/template/squeezol_payment/start.phtml
CHANGED
@@ -11,7 +11,7 @@ Squeezol ti permette di dividire il costo del carrello con amici, colleghi e par
|
|
11 |
<h3> Come procedere: </h3>
|
12 |
<p> <p class="sq-text">Clicca su Pay With Squeezol</p> e autorizza l'utilizzo del servizio. </p>
|
13 |
<p> Dai un nome e una descrizione alla colletta e dillo ai tuoi invitati con email e Facebook.</p>
|
14 |
-
<p> <p class="sq-text">Paga la tua quota</p> e...non aver fretta, i partecipanti avranno <p class="sq-text">
|
15 |
|
16 |
<div id="squeezol_btn"></div>
|
17 |
|
11 |
<h3> Come procedere: </h3>
|
12 |
<p> <p class="sq-text">Clicca su Pay With Squeezol</p> e autorizza l'utilizzo del servizio. </p>
|
13 |
<p> Dai un nome e una descrizione alla colletta e dillo ai tuoi invitati con email e Facebook.</p>
|
14 |
+
<p> <p class="sq-text">Paga la tua quota</p> e...non aver fretta, i partecipanti avranno <p class="sq-text">20 giorni</p> di tempo per completare l'acquisto!</p>
|
15 |
|
16 |
<div id="squeezol_btn"></div>
|
17 |
|
package.xml
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
<package><name>Squeezol_Payment</name><version>1.0.
|
1 |
<?xml version="1.0"?>
|
2 |
+
<package><name>Squeezol_Payment</name><version>1.0.3</version><stability>stable</stability><license>OSL</license><channel>community</channel><extends></extends><summary>It enables group payments, a split of cart amount</summary><description>Squeezol Split is the innovative payment technology that solves personal fundraising problems between people, simplifying scheduling, budget planning and finally payments. Enable group purchasing on your e-commerce site or marketplace just integrating ‘Pay with Squeezol’ button: everyone puts his share in, then the merchant receives the entire payment due. A buying system used in current life now completely digitalized, taking advantage of social media tools to ease at the same time the whole customers’ experience and the viral diffusion of merchants brand.</description><notes>Frontend update</notes><authors><author><name>Davide Costa</name><user>nafta86</user><email>davide.costa@squeezol.com</email></author><author><name>Alessandro Caligaris</name><user>alfietto91</user><email>alessandro.caligaris1991@gmail.com</email></author><author><name>John Doe</name><user>john</user><email>john3@doe.com</email></author></authors><date>2014-12-01</date><time>8:07:44</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies><contents><target name="mage"><file name="README.md" hash="97f9dbb159f7cfa3f574c2374f906b83"/><dir name="lib"><dir name="Squeezol"><file name="endpoints.php" hash="bb57c3f817e4a7bbe578056475c2c85b"/></dir><dir name="oauth2"><file name="Client.php" hash="cd46e543dc9ce042347e929bafb2637a"/><file name="README" hash="8ef3bf723c93b6e091b707a546df2804"/><file name="auth_request.php" hash="d78edf267fee0e4c9c483d46f4405d98"/><file name="composer.json" hash="b1a24295215d44d727f603e7da644a5a"/><dir name="GrantType"><file name="AuthorizationCode.php" hash="a1ff324a733fc33dbf938153c4c1667c"/><file name="ClientCredentials.php" hash="21b30fbb06d4b67263499d687316ae8b"/><file name="IGrantType.php" hash="ee03d4c5bc20f518716fc2c616b4d38d"/><file name="Password.php" hash="2e938e60c4af8bad71b5c4f0f1a40969"/><file name="RefreshToken.php" hash="a773f48348ad7aa510955099ba18d3ad"/></dir></dir></dir><dir name="app"><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="squeezol_payment"><file name="create.phtml" hash="7f33a4cd28d0f09ab8b8b94af207b326"/><file name="digest.phtml" hash="ad115777c40a2bf9de8287963340c42c"/><file name="invitation.phtml" hash="769550bdcdeec4c37d2dc46befe32db1"/><file name="logo.phtml" hash="92c3ba5d33319de8c2253f7207751d10"/><file name="review.phtml" hash="788d3e1812a08c0ec53675d16b5ff11e"/><file name="start.phtml" hash="e779004296acfdfa280cbe8b8edacbbd"/></dir></dir><dir name="layout"><file name="squeezol_payment.xml" hash="2f74ae0cd241dc84f1253f905256460a"/></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Squeezol_Payment.xml" hash="8069f82ec151f6c45be892bcc32460f8"/></dir></dir><dir name="code"><dir name="local"><dir name="Squeezol"><dir name="Payment"><dir name="Helper"><file name="Data.php" hash="435781e5e5e1a60ddd4c631f8efcfb42"/></dir><dir name="Block"><file name="Logo.php" hash="f9c7b30ccf3d9c947ec4a33c1662c395"/><file name="Start.php" hash="7edb0747a52d16fa21a2952c6d356191"/></dir><dir name="data"><dir name="squeezol_payment_setup"><file name="data-install-0.1.0.php" hash="3b58d0cdbc68e0260e839a2c8f0d4675"/></dir></dir><dir name="etc"><file name="config.xml" hash="816f839cf9155c94838938ee9b4c1532"/><file name="system.xml" hash="f21029a6dce1a2225501fe793e03897c"/></dir><dir name="Model"><file name="Params.php" hash="60fe9d8365773cc9de53e5d904d82fac"/><file name="Paramsandbox.php" hash="1f90070265de7948188c79590009ac1d"/><file name="PaymentMethod.php" hash="37fcaf2619c43b2713c4a5441d5345cc"/><file name="Session.php" hash="6453e3413705bde3e492ac9829b954e8"/><dir name="Mysql4"><file name="Params.php" hash="b12305337a72803ed2d61f6b8cac0159"/><dir name="Params"><file name="Collection.php" hash="5c73d0c799b880eed0bfc65bd50f17b6"/></dir></dir><dir name="Resource"><file name="Setup.php" hash="0340022ca0914dfcd7b6b589767dbc21"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="ffe4397ad8b493b65c6323ca0d3e66b9"/><file name="OrderProcessingController.php" hash="5e56204902a16dd1c726dc61050c2503"/></dir><dir name="sql"><dir name="squeezol_payment_setup"><file name="install-0.1.0.php" hash="404031896ca519d8739300687fc1ab9e"/><file name="upgrade-0.1.0-0.2.0.php" hash="1bd99cfd46a27f7d94754540d32af500"/><file name="upgrade-0.2.0-1.0.0.php" hash="36edcf31ba4f44b97b80d77868da31e9"/></dir></dir></dir></dir></dir></dir></dir><dir name="skin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="DejaVuSansCondensed-BoldOblique.eot" hash="2c79dd754287cea48f32a3fff983bf15"/><file name="DejaVuSansCondensed-BoldOblique.svg" hash="326f9917a1db7537c95bf0b6124b899f"/><file name="DejaVuSansCondensed-BoldOblique.ttf" hash="7bb71c1ec629c0bf5d27e2e2d5e20066"/><file name="DejaVuSansCondensed-BoldOblique.woff" hash="3242cc1f8b2373420e38d3aefcc9e408"/><file name="absolut_pro_boldcondensed-webfont.ttf" hash="dee7ac19c5727e29ba33192f466560ea"/><file name="absolut_pro_boldcondensed-webfont.woff" hash="585c3a24a09cd230d2e456db4a04d4d7"/><file name="absolut_pro_bookcondensed-webfont.ttf" hash="2c8c3c2eb35d5d36ab0927d2fd6f1732"/><file name="absolut_pro_bookcondensed-webfont.woff" hash="4868c6df04841d20c0ff3ee3a2e9830d"/><file name="bootstrap-responsive.css" hash="d2c30d07a98d50e945570bf32c56435f"/><file name="bootstrap-responsive.min.css" hash="365a247af4036532701d83957e490adc"/><file name="bootstrap.css" hash="08f2256002f66a415dbc2e8afb722d70"/><file name="bootstrap.min.css" hash="7f1ef7e98cc02f65b5dce59bafa038db"/><file name="dejavusanscondensed-bold-webfont.eot" hash="fa2f3a00c08cc9f47201cac746a06bf2"/><file name="dejavusanscondensed-bold-webfont.svg" hash="f4f7213b78edc8ce3756a61868540ea4"/><file name="dejavusanscondensed-bold-webfont.ttf" hash="c2ca6902c10cb361346e2561c41af171"/><file name="dejavusanscondensed-bold-webfont.woff" hash="2eefe2ee018b50741c817aff2e25931a"/><file name="dejavusanscondensed-webfont.ttf" hash="5c1e2a1d836ff13b21d208ae62263331"/><file name="dejavusanscondensed-webfont.woff" hash="3aa174b6ab569947533738c8d9cd1808"/><file name="pikaday.css" hash="5a32b7adc30d7de002b204036e5c40ae"/><file name="squeezol.css" hash="2fa3298fba49721bc70d4f0487e69b95"/></dir><dir name="js"><file name="_squeezol3.js" hash="df706b1e33a748c44b82ba47d35e6e59"/><file name="bootstrap.min.js" hash="a121f0e47edc5182e1aca1396807db70"/><file name="jquery.min.js" hash="8101d596b2b8fa35fe3a634ea342d7c3"/><file name="noconflict.js" hash="537d75ac65cd7588ce5addbd6d977d80"/><file name="pikaday.js" hash="441d514c9231d36b1d589bb3b78accb1"/></dir><dir name="images"><dir name="squeezol_payment"><file name="btn-finger.png" hash="32939ad91cd1416e303fe72edde3389e"/><file name="btn2.jpg" hash="ddc15e5c081115513a9e9e6dc41cdafc"/><file name="busta.png" hash="f5da1e0e1e1a5eb3cea2d6d9d89a91d6"/><file name="busta2.jpg" hash="6056ab70cbb9fb274510fafc79ebc745"/><file name="default.jpg" hash="dd9154d475d1abaa69163378cfa482f8"/><file name="facebook_small.png" hash="24a08c9069e7a37d56ef7c2514c652b5"/><file name="fenicottero.png" hash="dd5753b966338ca1f711ceec5dbcf75b"/><file name="ghianda_step_blu.png" hash="9ff125808d9fbdef766caf502a304ad2"/><file name="ghianda_step_grigia.png" hash="4d58eee97a1f8655a87c7a0f20e66eda"/><file name="info-black.png" hash="10de26a1713ff21b9a4f169da5abdbdb"/><file name="logo_min.png" hash="70e11306eda7fbd42d78a72f1109a17d"/><file name="mail_small.png" hash="da8257e98dd2ad413c61309043f71ed9"/><file name="pay_button.png" hash="970ec7feff9b6b7b9062d8f5a8e10bd1"/><file name="pay_button2.png" hash="6f6727fb922f128dc3cf3a9b42b00e1a"/><file name="salva2.jpg" hash="557ff279658464685464b856d4d3f634"/><file name="salvadanaio.png" hash="a2a0d69adabe332b8106bfaec0d49f87"/><file name="shopping-cart.jpg" hash="ccf6a2d64c387127e988724f2a986ca3"/><file name="squeezol.png" hash="e2059411e9f14fdfe1e8b21739f7a512"/><file name="squeezol_icon-aziende.png" hash="e1231a071b99b6fe07db08d247a4a086"/><file name="squeezol_icon-creasplit-pink.png" hash="a7d5094fca629f3f8d068049db852d03"/><file name="squeezol_icon-creasplit.png" hash="decd22b53c32b8472b0a46d0aed4afe9"/><file name="squeezol_icon-invita-pink.png" hash="b1eb9ef65c147d6552d4d402373bcf10"/><file name="squeezol_icon-invita.png" hash="0b274298ec828752a61db8686af9f720"/><file name="squeezol_icon-riassunto-pink.png" hash="82db5c7c4329194760ad7cb728bd1014"/><file name="squeezol_icon-riassunto.png" hash="2e50238f01e7a407e5d491ec75c25ec8"/></dir></dir></dir></dir></dir></dir></target></contents></package>
|
skin/frontend/base/default/css/squeezol.css
CHANGED
@@ -126,6 +126,23 @@ label { font-weight: bold !important; color: #08B3C7 !important; }
|
|
126 |
cursor: pointer !important;
|
127 |
}
|
128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
|
130 |
.sq-buttonEmail {
|
131 |
background-color: #FC8F1A !important;
|
126 |
cursor: pointer !important;
|
127 |
}
|
128 |
|
129 |
+
#sq-fb-sharer {
|
130 |
+
background-color: #3B5998;
|
131 |
+
color: #FFF;
|
132 |
+
display: block;
|
133 |
+
border-radius: 1em;
|
134 |
+
font-family: DejaVuSansCondensed-BoldOblique;
|
135 |
+
font-size: 12px;
|
136 |
+
color: #FFF;
|
137 |
+
font-style: normal;
|
138 |
+
text-align: center;
|
139 |
+
line-height: 10px;
|
140 |
+
letter-spacing: 0em;
|
141 |
+
cursor: pointer;
|
142 |
+
float: right;
|
143 |
+
padding-right: 5px;
|
144 |
+
}
|
145 |
+
|
146 |
|
147 |
.sq-buttonEmail {
|
148 |
background-color: #FC8F1A !important;
|
skin/frontend/base/default/js/_squeezol3.js
CHANGED
@@ -759,7 +759,12 @@ throw new SyntaxError('JSON.parse');
|
|
759 |
|
760 |
var UserInterface = function() {
|
761 |
var that = {};
|
762 |
-
|
|
|
|
|
|
|
|
|
|
|
763 |
that.drawHeader = function(page, mode) {
|
764 |
var viewPortDiv, modalDiv;
|
765 |
var active='blu';
|
@@ -1004,8 +1009,8 @@ throw new SyntaxError('JSON.parse');
|
|
1004 |
return txt;
|
1005 |
},
|
1006 |
that.iconPopover = function(){
|
1007 |
-
|
1008 |
-
|
1009 |
$sqjQuery(this).popover('show')
|
1010 |
});
|
1011 |
$sqjQuery('.icon').on('mouseout', function(){
|
@@ -1013,7 +1018,7 @@ throw new SyntaxError('JSON.parse');
|
|
1013 |
});
|
1014 |
$sqjQuery('.icon').on('hidden.bs.popover', function(){
|
1015 |
$sqjQuery(this).css("display", "");
|
1016 |
-
})
|
1017 |
|
1018 |
};
|
1019 |
return that;
|
@@ -1074,9 +1079,9 @@ throw new SyntaxError('JSON.parse');
|
|
1074 |
var helpText = { 'name': 'Dai un titolo allo Split. Per esempio: regalo per Marco, week end in Montagna ecc.',
|
1075 |
'description': 'Il posto giusto dove inserire qualche dettaglio che invogli i tuoi amici a partecipare',
|
1076 |
'max_acceptance_date': 'Scegli la data entro la quale gli invitati dovranno confermare la propria partecipazione',
|
1077 |
-
'max_payment_date': 'Scegli la data entro la quale i partecipanti possono effettuare i pagamenti. La durata massima consentita è
|
1078 |
'occurrence': 'Fai sapere ai partecipanti per quale occasione si effettua l\'acquisto',
|
1079 |
-
'promo_code': 'Inserisci un codice promozionale valido: ti consente di avere uno sconto
|
1080 |
'alert_email': 'Disattiva le notifiche email sulle azioni degli invitati',
|
1081 |
'hide_contribution': 'Nasconde ai soli partecipanti la quota versata da ognuno. Resta visibile a tutti il totale raccolto',
|
1082 |
'hide_invitation': 'Nasconde l\' identità dei partecipanti tra di loro.',
|
@@ -1415,6 +1420,7 @@ throw new SyntaxError('JSON.parse');
|
|
1415 |
var that = {};
|
1416 |
makeData = function() {
|
1417 |
var temp = {};
|
|
|
1418 |
var quotaTmp= {};
|
1419 |
var p;
|
1420 |
p = document.getElementById('squeezol_single_amount');
|
@@ -1424,11 +1430,28 @@ throw new SyntaxError('JSON.parse');
|
|
1424 |
else {
|
1425 |
quotaTmp.value = 0.00;
|
1426 |
}
|
|
|
1427 |
temp.group_id=groupId;
|
1428 |
temp.participant_id=targetBtn.getAttribute('data-participant');
|
1429 |
-
temp.action=
|
1430 |
temp.single_amount=quotaTmp.value;
|
1431 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1432 |
}
|
1433 |
answerCallBack = function() {
|
1434 |
var answer, ajaxAnswer, response;
|
@@ -1950,7 +1973,7 @@ throw new SyntaxError('JSON.parse');
|
|
1950 |
containerDiv.appendChild(fbDiv);
|
1951 |
SqDiv.appendChild(containerDiv);
|
1952 |
|
1953 |
-
// Render Amici
|
1954 |
ui.renderAlreadyInvited(emailDiv, fbDiv, alreadyInvited, group);
|
1955 |
ui.drawSeparator('');
|
1956 |
|
@@ -2181,7 +2204,7 @@ throw new SyntaxError('JSON.parse');
|
|
2181 |
renderBtn.create('Rimborsa', 'small', 'SqueezolRefund_');
|
2182 |
renderBtn.get().setAttribute('data-participant', participantId);
|
2183 |
renderBtn.get().setAttribute('data-action', 'RG');
|
2184 |
-
renderBtn.get().className='btn btn-sm btn-danger';
|
2185 |
renderBtn.regHandler('click', buttonHandler);
|
2186 |
}
|
2187 |
// Se i pagamenti sono aperti
|
@@ -2211,7 +2234,7 @@ throw new SyntaxError('JSON.parse');
|
|
2211 |
renderRef.create('Rimborsa', 'small', 'SqueezolRefund_');
|
2212 |
renderRef.get().setAttribute('data-participant', participantId);
|
2213 |
renderRef.get().setAttribute('data-action', 'RG');
|
2214 |
-
renderRef.get().className='btn btn-sm btn-danger';
|
2215 |
renderRef.regHandler('click', buttonHandler);
|
2216 |
refContainer.append(renderRef.wrap(wrapBtn));
|
2217 |
SqDiv.appendChild(refContainer.wrap(wrapper_row));
|
@@ -2264,6 +2287,7 @@ throw new SyntaxError('JSON.parse');
|
|
2264 |
// Render
|
2265 |
if (openPay == false) {
|
2266 |
var superTemp = document.createElement('div');
|
|
|
2267 |
superTemp.className = 'sq-col-xs-10 sq-col-xs-offset-1 sq-alert sq-alert-info';
|
2268 |
if (isAdmin == true){
|
2269 |
superTemp.innerHTML = '<p class="sq-text-center"> Inizia i pagamenti: sarà possibile a tutti versare la propria quota (una notifica verrà inoltrata a tutti i partecipanti!)</p>';
|
@@ -2298,7 +2322,7 @@ throw new SyntaxError('JSON.parse');
|
|
2298 |
alertDes.className = 'sq-row'
|
2299 |
alertDes.innerHTML = '<div class="sq-col-xs-10 sq-col-xs-offset-1 sq-alert sq-alert-warning"><p>'+
|
2300 |
'<strong>Attenzione!</strong>'+
|
2301 |
-
'Lo
|
2302 |
'</div></p>';
|
2303 |
SqDiv.appendChild(alertDes);
|
2304 |
}
|
@@ -2328,7 +2352,7 @@ throw new SyntaxError('JSON.parse');
|
|
2328 |
state = 'refused';
|
2329 |
ghianda = 'grigia';
|
2330 |
}
|
2331 |
-
if (answer.group.hide_contribution == true
|
2332 |
contribution_amount = '-';
|
2333 |
else
|
2334 |
contribution_amount = p.single_amount + ' ' + answer.group.currency;
|
@@ -2391,7 +2415,7 @@ throw new SyntaxError('JSON.parse');
|
|
2391 |
|
2392 |
p=document.getElementById('squeezolNotifyAmount_');
|
2393 |
if (answer.status == 'ok'){
|
2394 |
-
message='Importo
|
2395 |
currency=inputDiv.nextSibling.innerHTML;
|
2396 |
quota=document.getElementById('sq-modify-amount').innerHTML=inputDiv.value+' '+currency;
|
2397 |
}
|
@@ -2473,14 +2497,15 @@ throw new SyntaxError('JSON.parse');
|
|
2473 |
'<p class="sq-content-body">Organizzatore:</p>'+
|
2474 |
'<strong>'+admin_name+'</strong>'+
|
2475 |
'</div>'+
|
2476 |
-
'<div class="sq-col-xs-10 sq-col-xs-offset-1 sq-col-md-
|
2477 |
-
'<
|
2478 |
-
'<
|
2479 |
-
|
|
|
|
|
2480 |
'</div>';
|
2481 |
groupDigest=Div(groupDigest);
|
2482 |
sqDiv.appendChild(groupDigest.get());
|
2483 |
-
|
2484 |
groupDigest=document.createElement('div');
|
2485 |
groupDigest.className = "sq-row row-separata";
|
2486 |
groupDigest.innerHTML = '<div class="sq-col-md-10 sq-col-md-offset-1">'+
|
@@ -2524,25 +2549,35 @@ throw new SyntaxError('JSON.parse');
|
|
2524 |
'</div>';
|
2525 |
groupDigest=Div(groupDigest);
|
2526 |
sqDiv.appendChild(groupDigest.get());
|
2527 |
-
|
2528 |
},
|
2529 |
that.POSTcallback = function(answer, action, targetUrl){
|
2530 |
-
var oldBtn, parentDiv, payBox, payBoxP, alertPaid;
|
2531 |
-
|
2532 |
-
var participantId, form;
|
2533 |
if (action == 'OPENPAY'){
|
2534 |
oldBtn = document.getElementById('SqueezolStartPay_');
|
2535 |
participantId = oldBtn.getAttribute('data-participant');
|
2536 |
parentDiv = oldBtn.parentNode;
|
2537 |
parentDiv.removeChild(oldBtn);
|
2538 |
-
|
2539 |
-
|
2540 |
-
|
|
|
|
|
|
|
|
|
|
|
2541 |
var event= e || window.event;
|
2542 |
var target = event.target || event.srcElement || event.originalTarget;
|
2543 |
request = DigestPostAJAX(answer.group_id, target, targetUrl);
|
2544 |
request.send(target);
|
2545 |
});
|
|
|
|
|
|
|
|
|
|
|
2546 |
}
|
2547 |
else if (action == 'FINISH'){
|
2548 |
oldBtn = document.getElementById('SqueezolFinishPay_');
|
@@ -2560,6 +2595,9 @@ throw new SyntaxError('JSON.parse');
|
|
2560 |
renderBtn.append(alertPaid);
|
2561 |
payBoxP = payBox.parentNode;
|
2562 |
payBoxP.removeChild(payBox);
|
|
|
|
|
|
|
2563 |
}
|
2564 |
else if(action == 'PAY'){
|
2565 |
if (answer.status == 'ok'){
|
@@ -2573,11 +2611,8 @@ throw new SyntaxError('JSON.parse');
|
|
2573 |
} else if(answer.status == 'error'){
|
2574 |
this.notifyAmount(answer);
|
2575 |
}
|
2576 |
-
return;
|
2577 |
}
|
2578 |
-
|
2579 |
-
renderBtn.get().className='sq-btn sq-btn-lg';
|
2580 |
-
parentDiv.appendChild(renderBtn.get());
|
2581 |
},
|
2582 |
that.switchStatus = function(status){
|
2583 |
var ret_st;
|
@@ -2630,11 +2665,6 @@ throw new SyntaxError('JSON.parse');
|
|
2630 |
div = Div();
|
2631 |
div.get('squeezol_btn');
|
2632 |
div.append(btn.get());
|
2633 |
-
//txt = document.createElement('div');
|
2634 |
-
//txt.className = 'wizardOpen';
|
2635 |
-
//txt.innerHTML = ui.getText('Scopri cos\'è Squeezol');
|
2636 |
-
//div.append(txt);
|
2637 |
-
//ui.drawWizard('top', txt);
|
2638 |
},
|
2639 |
createGroup: function(amount, currency, codProducts, targetUrl, firstUrl, secondUrl) {
|
2640 |
var trolley, groupCr, ui;
|
759 |
|
760 |
var UserInterface = function() {
|
761 |
var that = {};
|
762 |
+
that.fbSharer = function(id, url){
|
763 |
+
$sqjQuery('#'+id).on('click', function(e){
|
764 |
+
e.preventDefault();
|
765 |
+
window.open('https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(url), 'facebook-share-dialog', 'width=626,height=436');
|
766 |
+
});
|
767 |
+
},
|
768 |
that.drawHeader = function(page, mode) {
|
769 |
var viewPortDiv, modalDiv;
|
770 |
var active='blu';
|
1009 |
return txt;
|
1010 |
},
|
1011 |
that.iconPopover = function(){
|
1012 |
+
//$sqjQuery('.icon').popover();
|
1013 |
+
$sqjQuery('.icon').on('mouseenter', function(){
|
1014 |
$sqjQuery(this).popover('show')
|
1015 |
});
|
1016 |
$sqjQuery('.icon').on('mouseout', function(){
|
1018 |
});
|
1019 |
$sqjQuery('.icon').on('hidden.bs.popover', function(){
|
1020 |
$sqjQuery(this).css("display", "");
|
1021 |
+
});
|
1022 |
|
1023 |
};
|
1024 |
return that;
|
1079 |
var helpText = { 'name': 'Dai un titolo allo Split. Per esempio: regalo per Marco, week end in Montagna ecc.',
|
1080 |
'description': 'Il posto giusto dove inserire qualche dettaglio che invogli i tuoi amici a partecipare',
|
1081 |
'max_acceptance_date': 'Scegli la data entro la quale gli invitati dovranno confermare la propria partecipazione',
|
1082 |
+
'max_payment_date': 'Scegli la data entro la quale i partecipanti possono effettuare i pagamenti. La durata massima consentita è 20 giorni',
|
1083 |
'occurrence': 'Fai sapere ai partecipanti per quale occasione si effettua l\'acquisto',
|
1084 |
+
'promo_code': 'Inserisci un codice promozionale valido: ti consente di avere uno sconto sullo Split',
|
1085 |
'alert_email': 'Disattiva le notifiche email sulle azioni degli invitati',
|
1086 |
'hide_contribution': 'Nasconde ai soli partecipanti la quota versata da ognuno. Resta visibile a tutti il totale raccolto',
|
1087 |
'hide_invitation': 'Nasconde l\' identità dei partecipanti tra di loro.',
|
1420 |
var that = {};
|
1421 |
makeData = function() {
|
1422 |
var temp = {};
|
1423 |
+
var mex, action;
|
1424 |
var quotaTmp= {};
|
1425 |
var p;
|
1426 |
p = document.getElementById('squeezol_single_amount');
|
1430 |
else {
|
1431 |
quotaTmp.value = 0.00;
|
1432 |
}
|
1433 |
+
action=targetBtn.getAttribute('data-action');
|
1434 |
temp.group_id=groupId;
|
1435 |
temp.participant_id=targetBtn.getAttribute('data-participant');
|
1436 |
+
temp.action=action
|
1437 |
temp.single_amount=quotaTmp.value;
|
1438 |
+
if (action == 'CG'){
|
1439 |
+
mex = "Stai per concludere lo Split e nessuno potrà più pagare. Vuoi proseguire?"
|
1440 |
+
}
|
1441 |
+
else if (action == 'RG'){
|
1442 |
+
mex = "Stai per annullare lo Split, TUTTI i partecipanti verranno rimborsati. Vuoi proseguire?"
|
1443 |
+
}
|
1444 |
+
else if (action == 'OP'){
|
1445 |
+
mex = "Stai per dare a tutti la possibilità di pagare. Vuoi proseguire?"
|
1446 |
+
}
|
1447 |
+
else{
|
1448 |
+
return SqObj(temp).toFormUrlEnc();
|
1449 |
+
}
|
1450 |
+
r=confirm(mex)
|
1451 |
+
if (r == true) {
|
1452 |
+
return SqObj(temp).toFormUrlEnc();
|
1453 |
+
}
|
1454 |
+
return
|
1455 |
}
|
1456 |
answerCallBack = function() {
|
1457 |
var answer, ajaxAnswer, response;
|
1973 |
containerDiv.appendChild(fbDiv);
|
1974 |
SqDiv.appendChild(containerDiv);
|
1975 |
|
1976 |
+
// Render Amici gia' invitati
|
1977 |
ui.renderAlreadyInvited(emailDiv, fbDiv, alreadyInvited, group);
|
1978 |
ui.drawSeparator('');
|
1979 |
|
2204 |
renderBtn.create('Rimborsa', 'small', 'SqueezolRefund_');
|
2205 |
renderBtn.get().setAttribute('data-participant', participantId);
|
2206 |
renderBtn.get().setAttribute('data-action', 'RG');
|
2207 |
+
renderBtn.get().className='sq-btn sq-btn-sm sq-btn-danger';
|
2208 |
renderBtn.regHandler('click', buttonHandler);
|
2209 |
}
|
2210 |
// Se i pagamenti sono aperti
|
2234 |
renderRef.create('Rimborsa', 'small', 'SqueezolRefund_');
|
2235 |
renderRef.get().setAttribute('data-participant', participantId);
|
2236 |
renderRef.get().setAttribute('data-action', 'RG');
|
2237 |
+
renderRef.get().className='sq-btn sq-btn-sm sq-btn-danger';
|
2238 |
renderRef.regHandler('click', buttonHandler);
|
2239 |
refContainer.append(renderRef.wrap(wrapBtn));
|
2240 |
SqDiv.appendChild(refContainer.wrap(wrapper_row));
|
2287 |
// Render
|
2288 |
if (openPay == false) {
|
2289 |
var superTemp = document.createElement('div');
|
2290 |
+
superTemp.id='sq-alert-start-pay';
|
2291 |
superTemp.className = 'sq-col-xs-10 sq-col-xs-offset-1 sq-alert sq-alert-info';
|
2292 |
if (isAdmin == true){
|
2293 |
superTemp.innerHTML = '<p class="sq-text-center"> Inizia i pagamenti: sarà possibile a tutti versare la propria quota (una notifica verrà inoltrata a tutti i partecipanti!)</p>';
|
2322 |
alertDes.className = 'sq-row'
|
2323 |
alertDes.innerHTML = '<div class="sq-col-xs-10 sq-col-xs-offset-1 sq-alert sq-alert-warning"><p>'+
|
2324 |
'<strong>Attenzione!</strong>'+
|
2325 |
+
'Lo Split è stato chiuso dall\'organizzatore o è scaduto il termine di 20 giorni entro i quali effettuare il pagamento. Le quote versate torneranno disponibili al massimo entro 30 giorni dalla data del pagamento.'+
|
2326 |
'</div></p>';
|
2327 |
SqDiv.appendChild(alertDes);
|
2328 |
}
|
2352 |
state = 'refused';
|
2353 |
ghianda = 'grigia';
|
2354 |
}
|
2355 |
+
if (answer.group.hide_contribution == true && !isAdmin)
|
2356 |
contribution_amount = '-';
|
2357 |
else
|
2358 |
contribution_amount = p.single_amount + ' ' + answer.group.currency;
|
2415 |
|
2416 |
p=document.getElementById('squeezolNotifyAmount_');
|
2417 |
if (answer.status == 'ok'){
|
2418 |
+
message='Importo correttamente modificato';
|
2419 |
currency=inputDiv.nextSibling.innerHTML;
|
2420 |
quota=document.getElementById('sq-modify-amount').innerHTML=inputDiv.value+' '+currency;
|
2421 |
}
|
2497 |
'<p class="sq-content-body">Organizzatore:</p>'+
|
2498 |
'<strong>'+admin_name+'</strong>'+
|
2499 |
'</div>'+
|
2500 |
+
'<div class="sq-col-xs-10 sq-col-xs-offset-1 sq-col-md-3 sq-col-md-offset-0">'+
|
2501 |
+
'<button id="sq-fb-sharer">'+
|
2502 |
+
'<span class="sq-img-social">'+
|
2503 |
+
'<img class="sq-img-responsive" style="display:inline;" src="'+ img_url +'/facebook_small.png">'+
|
2504 |
+
'</span>Condividi'+
|
2505 |
+
'</button>'+
|
2506 |
'</div>';
|
2507 |
groupDigest=Div(groupDigest);
|
2508 |
sqDiv.appendChild(groupDigest.get());
|
|
|
2509 |
groupDigest=document.createElement('div');
|
2510 |
groupDigest.className = "sq-row row-separata";
|
2511 |
groupDigest.innerHTML = '<div class="sq-col-md-10 sq-col-md-offset-1">'+
|
2549 |
'</div>';
|
2550 |
groupDigest=Div(groupDigest);
|
2551 |
sqDiv.appendChild(groupDigest.get());
|
2552 |
+
ui.fbSharer('sq-fb-sharer', params.link_url);
|
2553 |
},
|
2554 |
that.POSTcallback = function(answer, action, targetUrl){
|
2555 |
+
var oldBtn, parentDiv, payBox, payBoxP, alertPaid, renderBtn;
|
2556 |
+
var renderButton=Button();
|
2557 |
+
var participantId, form, sq_message;
|
2558 |
if (action == 'OPENPAY'){
|
2559 |
oldBtn = document.getElementById('SqueezolStartPay_');
|
2560 |
participantId = oldBtn.getAttribute('data-participant');
|
2561 |
parentDiv = oldBtn.parentNode;
|
2562 |
parentDiv.removeChild(oldBtn);
|
2563 |
+
sq_message=document.getElementById('sq-alert-start-pay');
|
2564 |
+
parentDiv=sq_message.parentNode;
|
2565 |
+
parentDiv.removeChild(sq_message);
|
2566 |
+
parentDiv=document.getElementById('squeezolPayBox');
|
2567 |
+
parentDiv.innerHTML='';
|
2568 |
+
renderButton.create('Paga ora', 'big', 'SqueezolPay_');
|
2569 |
+
renderButton.get().setAttribute('data-action', 'P');
|
2570 |
+
renderButton.regHandler('click', function(e){
|
2571 |
var event= e || window.event;
|
2572 |
var target = event.target || event.srcElement || event.originalTarget;
|
2573 |
request = DigestPostAJAX(answer.group_id, target, targetUrl);
|
2574 |
request.send(target);
|
2575 |
});
|
2576 |
+
renderButton.addClass('sq-btn')
|
2577 |
+
renderBtn=Div(document.createElement('div'));
|
2578 |
+
renderBtn.addClass('sq-col-md-3 sq-col-md-offset-1 sq-col-xs-10 sq-col-xs-offset-1');
|
2579 |
+
renderBtn.append(renderButton.get());
|
2580 |
+
parentDiv.appendChild(renderBtn.get());
|
2581 |
}
|
2582 |
else if (action == 'FINISH'){
|
2583 |
oldBtn = document.getElementById('SqueezolFinishPay_');
|
2595 |
renderBtn.append(alertPaid);
|
2596 |
payBoxP = payBox.parentNode;
|
2597 |
payBoxP.removeChild(payBox);
|
2598 |
+
renderBtn.get().setAttribute('data-participant', participantId);
|
2599 |
+
renderBtn.get().className='sq-btn sq-btn-lg';
|
2600 |
+
parentDiv.appendChild(renderBtn.get());
|
2601 |
}
|
2602 |
else if(action == 'PAY'){
|
2603 |
if (answer.status == 'ok'){
|
2611 |
} else if(answer.status == 'error'){
|
2612 |
this.notifyAmount(answer);
|
2613 |
}
|
|
|
2614 |
}
|
2615 |
+
return;
|
|
|
|
|
2616 |
},
|
2617 |
that.switchStatus = function(status){
|
2618 |
var ret_st;
|
2665 |
div = Div();
|
2666 |
div.get('squeezol_btn');
|
2667 |
div.append(btn.get());
|
|
|
|
|
|
|
|
|
|
|
2668 |
},
|
2669 |
createGroup: function(amount, currency, codProducts, targetUrl, firstUrl, secondUrl) {
|
2670 |
var trolley, groupCr, ui;
|