forked from Gwyrdain/apprentices-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscribble.html.erb
124 lines (103 loc) · 4.84 KB
/
scribble.html.erb
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
Misc Notes
---
bitfield :misc_flags,
2**0 => :flag, # Dec: 1 / Hex: 1
2**1 => :flag, # Dec: 2 / Hex: 2
2**2 => :flag, # Dec: 4 / Hex: 4
2**3 => :flag, # Dec: 8 / Hex: 8
2**4 => :flag, # Dec: 16 / Hex: 10
2**5 => :flag, # Dec: 32 / Hex: 20
2**6 => :flag, # Dec: 64 / Hex: 40
2**7 => :flag, # Dec: 128 / Hex: 80
2**8 => :flag, # Dec: 256 / Hex: 100
2**9 => :flag, # Dec: 512 / Hex: 200
2**10 => :flag, # Dec: 1024 / Hex: 400
2**11 => :flag, # Dec: 2048 / Hex: 800
2**12 => :flag, # Dec: 4096 / Hex: 1000
2**13 => :flag, # Dec: 8192 / Hex: 2000
2**14 => :flag, # Dec: 16384 / Hex: 4000
2**15 => :flag, # Dec: 32768 / Hex: 8000
2**16 => :flag, # Dec: 65536 / Hex: 10000
2**17 => :flag, # Dec: 131072 / Hex: 20000
2**18 => :flag, # Dec: 262144 / Hex: 40000
2**19 => :flag, # Dec: 524288 / Hex: 80000
2**20 => :flag, # Dec: 1048576 / Hex: 100000
2**21 => :flag, # Dec: 2097152 / Hex: 200000
2**22 => :flag, # Dec: 4194304 / Hex: 400000
2**23 => :flag, # Dec: 8388608 / Hex: 800000
2**24 => :flag, # Dec: 16777216 / Hex: 1000000
2**25 => :flag, # Dec: 33554432 / Hex: 2000000
2**26 => :flag, # Dec: 67108864 / Hex: 4000000
2**27 => :flag, # Dec: 134217728 / Hex: 8000000
2**28 => :flag, # Dec: 268435456 / Hex: 10000000
2**29 => :flag, # Dec: 536870912 / Hex: 20000000
2**30 => :flag, # Dec: 1073741824 / Hex: 40000000
2**31 => :flag, # Dec: 2147483648 / Hex: 80000000
2**32 => :flag, # Dec: 4294967296 / Hex: 100000000
<%
=begin *** OLD CONTAINER value_0 DISPLAY ***
<div class="form-group">
<%= f.label :v0, 'Weight (loaded)', :class => 'control-label col-md-2' %>
<div class="col-md-10">
<%= f.text_field :v0, {:class => 'text_field form-control', :readonly => true} %>
</div>
</div>
=end %>
<br/><div class="row">
<div class="col-md-2">
<strong>Weight (loaded):</strong>
</div>
<div class="col-md-10">
<div class="col-md-10">
<%= @obj.v0 %>
</div>
</div>
</div>
<script type="text/javascript">
var opts = {
lines: 11, // The number of lines to draw
length: 15, // The length of each line
width: 10, // The line thickness
radius: 30, // The radius of the inner circle
corners: 1, // Corner roundness (0..1)
rotate: 0, // The rotation offset
direction: 1, // 1: clockwise, -1: counterclockwise
color: '#000', // #rgb or #rrggbb
speed: 0.6, // Rounds per second
trail: 60, // Afterglow percentage
shadow: false, // Whether to render a shadow
hwaccel: false, // Whether to use hardware acceleration
className: 'spinner', // The CSS class to assign to the spinner
zIndex: 2e9, // The z-index (defaults to 2000000000)
top: 'auto', // Top position relative to parent in px
left: 'auto' // Left position relative to parent in px
};
var spinner = null;
var spinner_div = 0;
$(document).ready(function() {
spinner_div = $('#spinner').get(0);
$("#Download").click(function(e) {
if(spinner == null) {
spinner = new Spinner(opts).spin(spinner_div);
} else {
spinner.spin(spinner_div);
}
});
$("#Review").click(function(e) {
if(spinner == null) {
spinner = new Spinner(opts).spin(spinner_div);
} else {
spinner.spin(spinner_div);
}
});
$("#button2").click(function(e) {
spinner.stop(spinner_div);
});
});
</script>
<div id='spinner' class='spinner'></div>
<p class='centered'>
<br/> <br/>
<input type="button" id="button1" value="START">
<input type="button" id="button2" value="STOP">