Skip to content

Commit 5dcfe51

Browse files
committed
Minor formatting and comment modifications.
1 parent e3265dd commit 5dcfe51

File tree

3 files changed

+23
-48
lines changed

3 files changed

+23
-48
lines changed

hlcreate.html

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,27 @@
11
<!DOCTYPE html>
22
<html>
3-
<head>
4-
<meta charset="UTF-8">
5-
<meta name="viewport" content="width=device-width, initial-scale=1">
6-
<!-- <script src="js/tpxLocalize.js"></script> -->
7-
<!-- <script src="js/tpxHighLevelBasketAPIKO.js"></script> -->
8-
<script src="js/tpxHighLevelBasketAPI.js"></script>
9-
<link rel="stylesheet" href="css/basicModal.min.css">
10-
<script src="js/basicModal.min.js"></script>
11-
<script>
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
126

13-
/**********************************************************************************/
14-
/************* POSSIBLE FIX TO THE BACK BUTTON LOOP ISSUE *******************/
15-
/**********************************************************************************/
16-
7+
<script src="js/tpxHighLevelBasketAPI.js"></script>
8+
9+
<link rel="stylesheet" href="css/basicModal.min.css">
10+
<script src="js/basicModal.min.js"></script>
11+
12+
<script>
13+
// The only reason to override this function is to fix an issue
14+
// that creates unwanted dummy projects each time the user clicks the back button
15+
// in the designer instead of getting back to the previous page.
1716
function tpxHighLevelCreateProjectView(pJsonResponseObject) {
1817
if ((pJsonResponseObject.result == 0) || (pJsonResponseObject.result == -2)) {
1918
onlineDesignURL = pJsonResponseObject.designurl;
2019

2120
if (pJsonResponseObject.result == -2) {
2221
onlineDesignURL = onlineDesignURL;
2322
}
24-
/**********************************************************************************/
25-
/************* FIX START *******************/
26-
/**********************************************************************************/
27-
28-
// commented: window.location = onlineDesignURL;
23+
// Fix: Instead of "window.location = onlineDesignURL;" we use:
2924
window.location.replace(onlineDesignURL);
30-
31-
/**********************************************************************************/
32-
/************* FIX END *******************/
33-
/**********************************************************************************/
3425
}
3526
else {
3627
var resultAlert = {
@@ -49,16 +40,14 @@
4940
}
5041
}
5142
}
52-
5343
basicModal.show(resultAlert);
5444
}
55-
5645
return false;
5746
}
47+
</script>
48+
</head>
5849

50+
<body onLoad="tpxHighLevelBasketInitialise()">
51+
</body>
5952

60-
</script>
61-
</head>
62-
<body onLoad="tpxHighLevelBasketInitialise()">
63-
</body>
64-
</html>
53+
</html>

js/tpxBasketAPICustomize.js

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
1-
// CUSTOMIZATION FOR TPXHIGHLEVELBASKETAPI
2-
// The purpose of this file is to separate original taopix provided file from the customization we need to do.
3-
// This will make easier future upgrades and maintenance.On each new taopix release we can simply overwrite tpxHighLevelBasketAPI.js and be sure that
4-
// all modifications are in this file and others that can be loaded after this one.
5-
// The way we customize functions and variables in original is by overriding them here.
6-
// So it is critical that this file is loaded after tpxHighLevelBasketAPI.js
7-
8-
9-
// External Dependencies:
10-
// tpxBasketAPIViewModel
11-
12-
1+
// It is critical that this file is loaded after tpxHighLevelBasketAPI.js
132

143
var kServerURL = "";
15-
// fixing a translation issue. When this is fixed by taopix, we can remove this line.
16-
var kStr_LabelSignIn = "en Sign In<p>cs Přihlásit<p>da Log på<p>de Anmelden<p>es Iniciar Sesión<p>fi Kirjaudu<p>fr Connectez-vous<p>it Accedere<p>ja サインイン<p>ko 로그인<p>nl Aanmelden<p>no Logg inn<p>pl Zaloguj<p>pt Entre<p>ru Вход<p>sv Logga in<p>th เข้าสู่ระบบ<p>zh_cn 登录<p>zh_tw 登入";
174

5+
// fixing an spanish translation issue. When this is fixed by Taopix, we can remove this line.
6+
var kStr_LabelSignIn = "en Sign In<p>cs Přihlásit<p>da Log på<p>de Anmelden<p>es Iniciar Sesión<p>fi Kirjaudu<p>fr Connectez-vous<p>it Accedere<p>ja サインイン<p>ko 로그인<p>nl Aanmelden<p>no Logg inn<p>pl Zaloguj<p>pt Entre<p>ru Вход<p>sv Logga in<p>th เข้าสู่ระบบ<p>zh_cn 登录<p>zh_tw 登入";
187

198

209
// GET PROJECT LIST CUSTOMIZATION
@@ -29,7 +18,7 @@ function tpxHighLevelGetProjectListView(pJsonResponseObject)
2918
// RENAME PROJECT CUSTOMIZATION
3019
// As an exception we need to override the control function too. Explained why below.
3120

32-
// MATIAS: added a new parameter pProjectName.
21+
// Added a new parameter pProjectName.
3322
// That is what is already done by Taopix for duplicateProjectControl and deleteProjectControl.
3423
// Not sure why here it is different
3524
// The parameter is to avoid having to extract the projectname from an element in the html.
@@ -180,7 +169,6 @@ function tpxHighLevelGetBasketContentsView(pJsonResponseObject)
180169

181170

182171
// REMOVE ITEM FROM BASKET CUSTOMIZATION
183-
184172
function tpxHighLevelRemoveItemFromBasketView(pJsonResponseObject)
185173
{
186174
if (pJsonResponseObject.result == 32)
@@ -230,7 +218,6 @@ function tpxHighLevelRemoveItemFromBasketView(pJsonResponseObject)
230218

231219

232220
// EMPTY BASKET CUSTOMIZATION
233-
234221
function tpxHighLevelEmptyBasketView(pJsonResponseObject)
235222
{
236223
if (pJsonResponseObject.result == 32)
@@ -284,6 +271,5 @@ function tpxHighLevelLoggedInStatusCallBack(pIsSignedIn)
284271
tpxBasketAPIViewModel.isSignedIn(pIsSignedIn);
285272
}
286273

287-
288274
// DISABLING TAOPIX INITIAL UI LOCALIZATION BECAUSE IT IS NOT NEEDED WITH KNOCKOUT
289275
function tpxHighLevelBasketLocalise() { }

js/tpxBasketAPIViewModel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
}
2727

2828
self.localize = function (key) {
29-
var translated = tpxGetLocaleString(key); // tpxLocalize.localize(key);
29+
var translated = tpxGetLocaleString(key);
3030

3131
if (!translated) {
3232
console.error('unable to translate string: ' + key);

0 commit comments

Comments
 (0)