-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathapp.js
More file actions
72 lines (63 loc) · 3.08 KB
/
Copy pathapp.js
File metadata and controls
72 lines (63 loc) · 3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* (C) oekobox-online.eu 2016. Free for use with oekobox-online services */
/* we use requirejs to load all dependencies */
/* Example to add more js code , see the accordeon code below and in shop.html */
oor.requirejs.config({
paths: {
"acc" : "../../s7/js/jquery-ui_acc.min",
//"jquery1": "//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min"
}
});
oor.require([ "oo" /*, "acc" */ ],
function (oo) {
$=window.oojq; // that way you use the same jquery than the OO System, no matther f other jquerie's around
// code here executed BEFORE framework initialization - if called with ?noinit - otherwise undetermind
// jquery is undetermind, if multiple versions are loaded! Use window.oojq if you need oo's version.
console.log("Sample for manual app initialization!");
//$("body").css("background-color", "red"); // exaple usage of jquery
/* see above: use the library code here
$("#accordion").accordion({
active: 2
});
*/
oo.configureComponents({
// global settings (they have effect on more than one component)
"oo-logonmode": "normal", // normal: ask for tour first, email1st: ask for email first
"oo-skip-locate": false, // if true, never ask for a tour, assign the configure new-customer-tour
// component specific settings
"oo-profile-tabs-strict": true // if true, allow forward-stepping upon register only if a form is valid
});
// alternative way to configure components - in one place. See the reference for possible values.
/*
oo.configureComponents({
"oo-shop-page": "shop.html", // shared from many , if a map is used, thats the default
"oo-cart-page": "cart.html",
"oo-logon-page": "logon.html",
"oo-profile-page": "profile.html",
"oo-date-page": "date.html",
"oo-loggedon-page": "shop.html", // logon component
"oo-loggedout-page": "index.html",
"oo-register-page": "profile.html"
});
*/
/*
// example configuration for shop-page mapping: define a navigationLevel-to-page mapping here. Whenever
// the components want to display another navigation level, the'll check this map first.
oo.configureComponents({
"oo-shop-page": "shop.html" // default shop page if no mapping fires
});
oo.configureShopPageMap({ // mappings
// entity:entityid, target path - first match ist taken
'Group:66': "shop1.html",
'Group:68': "shop2.html"
});
*/
/* call initWeb() yourself, ONLY if the script was called with ?noinit . shopid is already set for you.
function appInit() {
// oo.ui.addFlash("hola hola!") // code executed AFTER framework initialization
// oo.ui.addFlashError("hola hola!")
// oo.ui.placeFlash();
}
oo.initWeb(appInit, false, shopid);
*/
}
);