jscalc 0.0.96 → 0.0.99

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b02f837b68168212b6f61a5b5742a68d2f8cf14
4
- data.tar.gz: 3b41f28b27ffddf46ab1e4ffcd95d53ae22d9717
3
+ metadata.gz: 0f27b0b20844ccc8fb246eef995bffcaeb005d0c
4
+ data.tar.gz: b0f4a0ecfbf2cb938aa3490d85753137808412de
5
5
  SHA512:
6
- metadata.gz: 25920e8636be26ab73e6e9f63c1538ed3f5110da42625bd94790bd096ad68b4192865fc5e0ccfaac59e932e9cd4e7732452458ec83115a16e85904051832f2eb
7
- data.tar.gz: 1e0e6c6dad7b6d875891eb5f91b9009ff4f1248df5b2406581d2ce435760b3d74bae763c39fe99156bbd7b73906c599a93971a6108c41b89744b9e56238864d9
6
+ metadata.gz: 2ac35995c7d4cdbb1e6d4ca1c0c480b67525f6b7db7c9b9c06574bad7fe1ac6763f8bd212f164b8dc90d7885e20347b1b2efba74e88fe84e7f0465a6e27fc2e6
7
+ data.tar.gz: bdb502540645420a29972c6e53a0f140ea193f39267b4571331fc6ec0cc9abe50e09fd1dbed570e361a9bd8c3ddb0c2a1025acf10546994e2049b0ca2dd5fec9
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # jscals
2
2
 
3
3
  jscalc is a calculator written in JavaScript/CSS3
4
+ As well as having basic calculator functions, many in-build JavaScript
5
+ functions (such as Math.random ()) are available
4
6
 
5
7
  ## Installation
6
8
 
@@ -16,33 +18,68 @@ Or install it yourself as:
16
18
 
17
19
  $ gem install jscalc
18
20
 
19
- ## Usage
20
-
21
21
  Add the following HTML code to the page where you want the calculator to appear
22
22
 
23
- <div id = "myCalculator">
23
+ **"<div id = "myCalculator">
24
24
  <div id="panelDiv">
25
25
  <input type ="text" id = "calcPanel" />
26
26
  </div> <!--End panelDiv-->
27
- </div><!--End myCalculator Div-->
27
+ </div><!--End myCalculator Div-->"**
28
28
 
29
29
 
30
30
  Add the following to the bottom of application.html.erb (the script file must render in the body
31
31
  section of the HTML page, not in the head section)
32
32
 
33
- <%= javascript_include_tag "jscalc_v3.js" %>
33
+ **<%= javascript_include_tag "jscalc.js" %>**
34
34
 
35
35
  Add the following line to the head section of application.html.erb
36
36
 
37
- <%= stylesheet_link_tag "jscalc.css" %>
37
+ **<%= stylesheet_link_tag "jscalc.css" %>**
38
+
39
+ **TO MAKE THE CALCULATOR DRAGGABLE**, ensure that jQuery-ui is installed or add the following files to the head section of application.html.erb BEFORE the stylesheet link tag.
40
+
41
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script>
42
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script>
43
+ ## Usage
44
+
45
+ Math.random()
46
+
47
+ x = new Date()
48
+
49
+ x.getMonth() => 8
50
+
51
+ x.getDate() => 26
52
+
53
+ x.getDay() => 4
54
+
55
+ x.getFullYear() => 13
56
+
57
+ x.getHours()
38
58
 
39
- TO MAKE THE CALCULATOR DRAGGABLE, ensure that jQuery-ui is installed or add the following to the head section of application.html.erb
59
+ x.getMinutes()
40
60
 
41
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script>
61
+ x.getSeconds()
62
+
63
+ x.getMilliseconds();
64
+
65
+ Math.round();
66
+
67
+ navigator.appName
68
+
69
+ parseInt(1101,2)
70
+
71
+ isNaN(2)
72
+
73
+ typeof(2)
42
74
 
43
75
  ## Contributing
44
76
 
45
77
  Written by Thomas Dowling (tomgdow)
78
+
46
79
  The National College of Ireland
80
+
47
81
  thomasgdowling@gmail.com
48
82
 
83
+
84
+
85
+
@@ -1,8 +1,4 @@
1
- h1 {
2
- font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
3
- font-style: italic;
4
- font-weight: bold;
5
- }
1
+
6
2
  .mybtn {
7
3
  font-size: 20px;
8
4
  height: 55px;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jscalc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.96
4
+ version: 0.0.99
5
5
  platform: ruby
6
6
  authors:
7
7
  - tomgdow