-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmagicbox.inventory.html
80 lines (75 loc) · 2.3 KB
/
magicbox.inventory.html
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
71
72
73
74
75
76
77
78
79
80
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="./css/ui/widgets/inventory/ui.widget.inventory_panel.css">
<link rel="stylesheet" type="text/css" href="./css/ui/widgets/inventory/ui.widget.inventory_slot.css">
<link rel="stylesheet" type="text/css" href="./css/ui/widgets/inventory/ui.widget.inventory_item.css">
<title>MagicBox.Inventory</title>
<script src="./js/libs/vendor/jquery.min.js" content-type="text/javascript"></script>
<script src="./js/libs/vendor/jquery-ui.min.js" content-type="text/javascript"></script>
<!-- MagicBox framework init-->
<script src="./js/libs/custom/magicbox/utils/miniTemplate.js" content-type="text/javascript"></script>
<script src="./js/libs/custom/magicbox/widgets/mBox.inventory.js" content-type="text/javascript"></script>
</head>
<script>
$(document).ready(function(){
$('#my_inventory1').inventory({
rows: 3,
cols: 4,
widgets: {
panel: {
template: "./js/templates/inventory_panel.jst"
},
slot: {
template: "./js/templates/inventory_slot.jst"
},
item: {
template: "./js/templates/inventory_item.jst"
}
},
snap: "#inventories"
});
$('#my_inventory2').inventory({
rows: 3,
cols: 2,
widgets: {
panel: {
template: "./js/templates/inventory_panel.jst"
},
slot: {
template: "./js/templates/inventory_slot.jst"
},
item: {
template: "./js/templates/inventory_item.jst"
}
},
snap: "#inventories"
});
$('#my_inventory3').inventory({
rows: 2,
cols: 2,
widgets: {
panel: {
template: "./js/templates/inventory_panel.jst"
},
slot: {
template: "./js/templates/inventory_slot.jst"
},
item: {
template: "./js/templates/inventory_item.jst"
}
},
snap: "#inventories"
});
//$('body').inventory_panel("option", "slot:width", 45); //// set single option ///
//$('body').inventory_panel("option", { "slot:width" : 55}); /// set multiple options /////
});
</script>
<body>
<section id="inventories_wrapper" style="width:90%; height: 90%; border: 1px solid #000">
<div id="my_inventory1"></div>
<div id="my_inventory2"></div>
<div id="my_inventory3"></div>
</section>
</body>
</html>