-
Notifications
You must be signed in to change notification settings - Fork 87
/
editproject.html
68 lines (65 loc) · 2.29 KB
/
editproject.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
<div class="editproject modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title">Edit project details</h4>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="nameInp">Name</label> <input type="text" class="form-control nameInp" id="nameInp">
</div>
<div class="form-group">
<label for="descriptionInp">Description</label> <textarea class="form-control descriptionInp" id="descriptionInp"></textarea>
</div>
<div class="form-group">
<label class="control-label" for="lengthMeasureInput">Uniform length measure for combined download</label>
<select class="lengthMeasureInput form-control span6" id="lengthMeasureInput">
<option>meter</option>
<option>attometer</option>
<option>femtometer</option>
<option>picometer</option>
<option>nanometer</option>
<option>micrometer</option>
<option>millimeter</option>
<option>centimeter</option>
<option>decimeter</option>
<option>decameter</option>
<option>hectometer</option>
<option>kilometer</option>
<option>megameter</option>
<option>gigameter</option>
<option>terameter</option>
<option>petameter</option>
<option>exameter</option>
</select>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary btnSave">Save changes</button>
</div>
</div>
</div>
<script>
function EditProject(cd, project) {
var o = this;
cd.find(".nameInp").val(project.name);
cd.find(".descriptionInp").val(project.description);
cd.find(".lengthMeasureInput").val(project.exportLengthMeasurePrefix);
cd.find(".btnSave").click(function(){
project.name = cd.find(".nameInp").val();
project.description = cd.find(".descriptionInp").val();
project.exportLengthMeasurePrefix = cd.find(".lengthMeasureInput").val();
Global.bimServerApi.call("ServiceInterface", "updateProject", {
sProject: project
}, function(){
cd.modal("hide");
document.location.reload();
});
});
}
</script>