forked from microsoft/PhETOfficeAddIn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
store.html
192 lines (171 loc) · 15.4 KB
/
store.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PhET Simulations</title>
<link href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" />
<link href="site.css" rel="stylesheet" />
</head>
<body>
<script type="text/html" id="loadingTemplate">
Loading...
</script>
<script type="text/html" id="viewTemplate">
<div class="terms-header">
<div id="banner-title-terms">
<a href="http://www.colorado.edu/physics/phet/dev/license.html" target="_blank">Privacy & Terms</a>
</div>
</div>
<div class="window-size">
<iframe id="view-frame" frameborder="0" data-bind="attr: {src: activeItemUrl }"></iframe>
</div>
</script>
<script type="text/html" id="editTemplate">
<div id="edit-pages">
<!-- select page -->
<!-- ko ifnot: item() -->
<div id="select-contents">
<div id="top">
<img id="banner-logo" src="https://phetmixapp.cloudapp.net/Content/Icons/cu-logo-half.png" />
<div id="banner-title">
<img id="banner-title-logo" src="https://phetmixapp.cloudapp.net/Content/Icons/phet-logo-117.svg" />
<div id="banner-title-terms">
<a id="banner-title-terms" href="http://www.colorado.edu/physics/phet/dev/license.html" target="_blank">Privacy & Terms</a>
</div>
</div>
</div>
<div id="domain-list-container">
<div class="domain">
<b>SIMULATIONS</b>
</div>
</div>
<div id="main-container">
<div id="categories-container">
<div class="categories" data-bind="with: activeDomain">
<!-- ko foreach: { data: children, as: 'category' } -->
<div class="category" data-bind="visible: children.length > 0">
<div class="category-title">
<span data-bind="text: title + ' >'"></span>
</div>
<!-- ko foreach: children -->
<div class="content">
<a href="#" class="app-btn">
<div><img class="content-image" data-bind="attr:{src:thumbnailUrl, alt:title}, click: function() {$root.moveToDetailPage($data);}" /></div>
<div class="content-title">
<span data-bind="text: (title.length > 30 ? title.substring(0, 30) : title), attr:{title: title}"
data-toggle="tooltip">
</span>
</div>
</a>
</div>
<!-- /ko -->
</div>
<!-- /ko -->
</div>
</div>
</div>
</div>
<!-- /ko -->
<!-- detail page -->
<!-- ko if: item() -->
<div id="content-detail">
<div id="content-detail-wrapper" class="row">
<div id="detail-left" class="col-sm-3 col-xs-5">
<div id="detail-title">
<span data-bind="text: item().title" />
</div>
<div id="detail-description">
<span data-bind="text: item().description" />
</div>
<div id="detail-buttons">
<div id="detail-insert" class="btn btn-detail">
<a href="#" data-bind="click: onInsertClick">Insert</a>
</div>
<div id="detail-cancel" class="btn btn-detail">
<a href="#" data-bind="click: moveToSelectPage">Cancel</a>
</div>
</div>
</div>
<div id="detail-right" class="col-sm-9 col-xs-7">
<iframe id="detail-content-preview-frame" class="preview-frame" frameborder="0" data-bind="attr: {src: activeItemUrl }"></iframe>
</div>
</div>
</div>
<!-- /ko -->
</div>
</script>
<div class="active-template" data-bind="template: { name: view() }">
</div>
<script src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js" type="text/javascript"></script>
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js"></script>
<script src="https://ajax.aspnetcdn.com/ajax/knockout/knockout-3.0.0.js"></script>
<script src="https://az592748.vo.msecnd.net/sdk/LabsJS-1.0.4/labs-1.0.4.min.js"></script>
<script src="store.js"></script>
<script>
var browseUrl = "/api/Phet/Browse";
var categoryUrl = "/api/Phet/Simulations";
var getUrl = "/api/Phet/GetSimulation";
var apps = [
{ "id": "phet-https://phet.colorado.edu/sims/html/ph-scale/latest/ph-scale_en.html", "providerId": "https://phet.colorado.edu/sims/html/ph-scale/latest/ph-scale_en.html", "readableId": "https://phet.colorado.edu/sims/html/ph-scale/latest/ph-scale_en.html", "youtubeId": null, "durationInSec": 0, "type": "exercise", "title": "pH Scale", "depth": 2, "thumbnailUrl": "https://phet.colorado.edu/sims/html/ph-scale/latest/ph-scale-128.png", "contentUrl": "https://phet.colorado.edu/sims/html/ph-scale/latest/ph-scale_en.html", "author": null, "description": "Test the pH of things like coffee, spit, and soap to determine whether each is acidic, basic, or neutral. Visualize the relative number of hydroxide ions and hydronium ions in solution. Switch between logarithmic and linear scales. Investigate whether changing the volume or diluting with water affects the pH. Or you can design your own liquid!", "children": [] },
{ "id": "phet-https://phet.colorado.edu/sims/html/beers-law-lab/latest/beers-law-lab_en.html", "providerId": "https://phet.colorado.edu/sims/html/beers-law-lab/latest/beers-law-lab_en.html", "readableId": "https://phet.colorado.edu/sims/html/beers-law-lab/latest/beers-law-lab_en.html", "youtubeId": null, "durationInSec": 0, "type": "exercise", "title": "Beer's Law Lab", "depth": 2, "thumbnailUrl": "https://phet.colorado.edu/sims/html/beers-law-lab/latest/beers-law-lab-128.png", "contentUrl": "https://phet.colorado.edu/sims/html/beers-law-lab/latest/beers-law-lab_en.html", "author": null, "description": "Test the pH of things like coffee, spit, and soap to determine whether each is acidic, basic, or neutral. Visualize the relative number of hydroxide ions and hydronium ions in solution. Switch between logarithmic and linear scales. Investigate whether changing the volume or diluting with water affects the pH. Or you can design your own liquid!", "children": [] },
{ "id": "phet-https://phet.colorado.edu/sims/html/concentration/latest/concentration_en.html", "providerId": "https://phet.colorado.edu/sims/html/concentration/latest/concentration_en.html", "readableId": "https://phet.colorado.edu/sims/html/concentration/latest/concentration_en.html", "youtubeId": null, "durationInSec": 0, "type": "exercise", "title": "Concentration", "depth": 2, "thumbnailUrl": "https://phet.colorado.edu/sims/html/concentration/latest/concentration-128.png", "contentUrl": "https://phet.colorado.edu/sims/html/concentration/latest/concentration_en.html", "author": null, "description": "Watch your solution change color as you mix chemicals with water. Then check molarity with the concentration meter. What are all the ways you can change the concentration of your solution? Switch solutes to compare different chemicals and find out how concentrated you can go before you hit saturation!", "children": [] },
{ "id": "phet-https://phet.colorado.edu/sims/html/build-an-atom/latest/build-an-atom_en.html", "providerId": "https://phet.colorado.edu/sims/html/build-an-atom/latest/build-an-atom_en.html", "readableId": "https://phet.colorado.edu/sims/html/build-an-atom/latest/build-an-atom_en.html", "youtubeId": null, "durationInSec": 0, "type": "exercise", "title": "Build an Atom", "depth": 2, "thumbnailUrl": "https://phet.colorado.edu/sims/html/build-an-atom/latest/build-an-atom-128.png", "contentUrl": "https://phet.colorado.edu/sims/html/build-an-atom/latest/build-an-atom_en.html", "author": null, "description": "Build an atom out of protons, neutrons, and electrons, and see how the element, charge, and mass change. Then play a game to test your ideas!", "children": [] },
{ "id": "phet-https://phet.colorado.edu/sims/html/john-travoltage/latest/john-travoltage_en.html", "providerId": "https://phet.colorado.edu/sims/html/john-travoltage/latest/john-travoltage_en.html", "readableId": "https://phet.colorado.edu/sims/html/john-travoltage/latest/john-travoltage_en.html", "youtubeId": null, "durationInSec": 0, "type": "exercise", "title": "John Travoltage", "depth": 2, "thumbnailUrl": "https://phet.colorado.edu/sims/html/john-travoltage/latest/john-travoltage-128.png", "contentUrl": "https://phet.colorado.edu/sims/html/john-travoltage/latest/john-travoltage_en.html", "author": null, "description": "Make sparks fly with John Travoltage. Wiggle Johnnie's foot and he picks up charges from the carpet. Bring his hand close to the door knob and get rid of the excess charge.", "children": [] },
{ "id": "phet-https://phet.colorado.edu/sims/html/forces-and-motion-basics/latest/forces-and-motion-basics_en.html", "providerId": "https://phet.colorado.edu/sims/html/forces-and-motion-basics/latest/forces-and-motion-basics_en.html", "readableId": "https://phet.colorado.edu/sims/html/forces-and-motion-basics/latest/forces-and-motion-basics_en.html", "youtubeId": null, "durationInSec": 0, "type": "exercise", "title": "Forces and Motion: Basics", "depth": 2, "thumbnailUrl": "https://phet.colorado.edu/sims/html/forces-and-motion-basics/latest/forces-and-motion-basics-128.png", "contentUrl": "https://phet.colorado.edu/sims/html/forces-and-motion-basics/latest/forces-and-motion-basics_en.html", "author": null, "description": "Explore the forces at work in a tug of war or pushing a refrigerator, crate, or person. Create an applied force and see how it makes objects move. Change friction and see how it affects the motion of objects.", "children": [] },
{ "id": "phet-https://phet.colorado.edu/sims/html/ph-scale-basics/latest/ph-scale-basics_en.html", "providerId": "https://phet.colorado.edu/sims/html/ph-scale-basics/latest/ph-scale-basics_en.html", "readableId": "https://phet.colorado.edu/sims/html/ph-scale-basics/latest/ph-scale-basics_en.html", "youtubeId": null, "durationInSec": 0, "type": "exercise", "title": "pH Scale: Basics", "depth": 2, "thumbnailUrl": "https://phet.colorado.edu/sims/html/ph-scale-basics/latest/ph-scale-basics-128.png", "contentUrl": "https://phet.colorado.edu/sims/html/ph-scale-basics/latest/ph-scale-basics_en.html", "author": null, "description": "Test the pH of things like coffee, spit, and soap to determine whether each is acidic, basic, or neutral. Visualize the relative number of hydroxide ions and hydronium ions in solution. Switch between logarithmic and linear scales. Investigate whether changing the volume or diluting with water affects the pH. Or you can design your own liquid!", "children": [] },
{ "id": "phet-https://phet.colorado.edu/sims/html/friction/latest/friction_en.html", "providerId": "https://phet.colorado.edu/sims/html/friction/latest/friction_en.html", "readableId": "https://phet.colorado.edu/sims/html/friction/latest/friction_en.html", "youtubeId": null, "durationInSec": 0, "type": "exercise", "title": "Friction", "depth": 2, "thumbnailUrl": "https://phet.colorado.edu/sims/html/friction/latest/friction-128.png", "contentUrl": "https://phet.colorado.edu/sims/html/friction/latest/friction_en.html", "author": null, "description": "Learn how friction causes a material to heat up and melt. Rub two objects together and they heat up. When one reaches the melting temperature, particles break free as the material melts away.", "children": [] },
{ "id": "phet-https://phet.colorado.edu/sims/html/balancing-act/latest/balancing-act_en.html", "providerId": "https://phet.colorado.edu/sims/html/balancing-act/latest/balancing-act_en.html", "readableId": "https://phet.colorado.edu/sims/html/balancing-act/latest/balancing-act_en.html", "youtubeId": null, "durationInSec": 0, "type": "exercise", "title": "Balancing Act", "depth": 2, "thumbnailUrl": "https://phet.colorado.edu/sims/html/balancing-act/latest/balancing-act-128.png", "contentUrl": "https://phet.colorado.edu/sims/html/balancing-act/latest/balancing-act_en.html", "author": null, "description": "Play with objects on a teeter totter to learn about balance. Test what you've learned by trying the Balance Challenge game.", "children": [] }]
var phetDriver = {
loadCategories: function (maxDepth) {
return $.when([{ title: "Browse All", id: "PhET", depth: 0, children: [{ title: "HTML5 Simulations", id: "HTML5 Simulations", depth: 1, children: [] }] }]);
},
loadCategory: function (categoryId, searchText) {
return $.when(apps);
},
get: function (id) {
var app = null;
for (var i = 0; i < apps.length; i++) {
if (apps[i].id === id) {
app = apps[i];
break;
}
}
return $.when(app);
},
buildConfiguration: function (content) {
var appVersion = { major: 1, minor: 1 };
var activityComponent = {
type: Labs.Components.ActivityComponentType,
name: content.title,
values: {},
data: {
id: content.id
},
secure: false
};
var configuration = {
appVersion: appVersion,
components: [activityComponent],
name: content.title,
timeline: null,
analytics: null
};
return configuration;
},
getIdFromConfiguration: function (configuration) {
return configuration.components[0].data.id;
}
};
Labs.DefaultHostBuilder = function () {
if (window.location.href.indexOf("PostMessageLabHost") !== -1) {
return new Labs.PostMessageLabHost("test", parent, "*");
} else {
return new Labs.OfficeJSLabHost();
}
};
MixAppBrowser.initialize(phetDriver);
</script>
</body>
</html>