forked from cite-sa/es2-service-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain-dock.js
58 lines (54 loc) · 2.17 KB
/
main-dock.js
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
$(function () {
$.widget("dock.mainDock", $.earthserver.dock, {
options: {
position: "left",
toggleIcon: "glyphicon glyphicon-menu-hamburger"
},
_create: function () {
this._super();
this.dockToggle
.append(
$("<span>", {class: this.options.toggleIcon + " dock-toggle-icon"})
);
},
addProjectionSelectPanel: function (callback) {
var projectionSelectPanel = $("<div>").selectPanel({
dock: this.dock,
panelId: "projection-selector",
panelTitle: "projections",
buttonId: "projectionDropdown"
}).selectPanel("instance");
$.each(projectionNames, function (index, projection) {
if (index == 0) {
projectionSelectPanel.setButtonContent(projection);
}
projectionSelectPanel.addSelectOption(projection.replace(/ /g, '').toLowerCase(), projection, callback);
});
return this;
},
addAvailableCoveragesPanel: function() {
var coverageSelectPanel = $("<div>").selectPanel({
dock: this.dock,
panelId: "coverage-selector",
panelTitle: "available coverages",
buttonId: "coverageDropdown"
}).selectPanel("instance");
$.each(coverageNames, function (index, coverage) {
if (index == 0) {
coverageSelectPanel.setButtonContent(coverage);
}
coverageSelectPanel.addSelectOption(coverage.replace(/ /g, '').toLowerCase(), coverage);
});
coverageSelectPanel.addButton("Retrieve");
return this;
},
addQueryTerminalPanel: function() {
var queryTerminalPanel = $("<div>").queryTerminalPanel({
dock: this.dock,
panelId: "query-terminal",
panelTitle: "wcps query"
}).queryTerminalPanel("instance");
return this;
}
})
});