aladdin 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +7 -0
- data/assets/javascripts/app.js +5 -5
- data/lib/aladdin/version.rb +1 -1
- data/views/scss/_forms.scss +9 -0
- data/views/scss/{github.scss → _github.scss} +0 -0
- data/views/scss/{mathjax.scss → _mathjax.scss} +0 -0
- data/views/scss/{pygment.scss → _pygment.scss} +0 -0
- data/views/scss/app.scss +1 -0
- metadata +5 -4
data/README.md
CHANGED
@@ -47,3 +47,10 @@ Note that the following directory names are reserved:
|
|
47
47
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
48
48
|
4. Push to the branch (`git push origin my-new-feature`)
|
49
49
|
5. Create new Pull Request
|
50
|
+
|
51
|
+
## Troublesome Parts
|
52
|
+
|
53
|
+
1. Launch an Ubuntu instance
|
54
|
+
1. Install ruby through rvm
|
55
|
+
1. Install build-essentials
|
56
|
+
1. install libxslt-dev libxml2-dev
|
data/assets/javascripts/app.js
CHANGED
@@ -15,22 +15,22 @@
|
|
15
15
|
// TODO: refactor
|
16
16
|
|
17
17
|
// Shows results of last submission at the given button and form.
|
18
|
-
var showResult = function(
|
18
|
+
var showResult = function(form) {
|
19
19
|
return function(result) {
|
20
20
|
switch(result) {
|
21
21
|
case true:
|
22
|
-
button.addClass('success');
|
23
22
|
form.removeClass('error');
|
23
|
+
form.addClass('success');
|
24
24
|
break;
|
25
25
|
case false:
|
26
|
-
|
26
|
+
form.removeClass('success');
|
27
27
|
form.addClass('error');
|
28
28
|
break;
|
29
29
|
default:
|
30
30
|
$.each(result, function(i, row) {
|
31
31
|
$.each(row, function(j, cell) {
|
32
32
|
var input = form.find("input[name='answer["+i+"]["+j+"]']");
|
33
|
-
|
33
|
+
showResult(input)(cell);
|
34
34
|
});
|
35
35
|
});
|
36
36
|
}
|
@@ -44,7 +44,7 @@
|
|
44
44
|
var button = $(e.target);
|
45
45
|
var form = button.parents('form');
|
46
46
|
var id = form.find('input.q-id').val();
|
47
|
-
$.post('/verify/quiz/' + id, form.serialize(), showResult(
|
47
|
+
$.post('/verify/quiz/' + id, form.serialize(), showResult(form));
|
48
48
|
return false;
|
49
49
|
});
|
50
50
|
|
data/lib/aladdin/version.rb
CHANGED
@@ -0,0 +1,9 @@
|
|
1
|
+
@import "settings";
|
2
|
+
|
3
|
+
/* Successes */
|
4
|
+
.success input, input.success, .success textarea, textarea.success { border-color: $successColor; background-color: rgba($successColor, 0.1); }
|
5
|
+
.success label, label.success { color: $successColor; }
|
6
|
+
.success small, small.success { display: block; padding: 6px 4px; margin-top: -($formSpacing) - 1; margin-bottom: $formSpacing; background: $successColor; color: #fff; font-size: ms(0) - 2; font-weight: bold; @include border-corner-radius(bottom, $defaultFloat, $inputBorderRadius); @include border-corner-radius(bottom, $defaultOpposite, $inputBorderRadius); }
|
7
|
+
.success textarea, textarea.success {
|
8
|
+
&:focus { background: darken($white, 2%); border-color: darken($white, 30%); }
|
9
|
+
}
|
File without changes
|
File without changes
|
File without changes
|
data/views/scss/app.scss
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aladdin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -297,11 +297,12 @@ files:
|
|
297
297
|
- views/haml/nav.haml
|
298
298
|
- views/haml/short.haml
|
299
299
|
- views/haml/table.haml
|
300
|
+
- views/scss/_forms.scss
|
301
|
+
- views/scss/_github.scss
|
302
|
+
- views/scss/_mathjax.scss
|
303
|
+
- views/scss/_pygment.scss
|
300
304
|
- views/scss/_settings.scss
|
301
305
|
- views/scss/app.scss
|
302
|
-
- views/scss/github.scss
|
303
|
-
- views/scss/mathjax.scss
|
304
|
-
- views/scss/pygment.scss
|
305
306
|
- bin/aladdin
|
306
307
|
- skeleton/images/graphic.png
|
307
308
|
- skeleton/index.md
|