Skip to content

Commit 552b4f5

Browse files
committed
Fix some styling issues with newer themes
1 parent a5a54bf commit 552b4f5

File tree

5 files changed

+24
-21
lines changed

5 files changed

+24
-21
lines changed

styles.css

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
.availability-item .availability_stash label {
2+
display: inline-block;
3+
}
14
.availability-item .availability_stash .quantity {
2-
width: 30px;
5+
width: 4em;
36
}
4-
.availability-item .availability_stash input[type="number"] {
5-
/* Copy from #fitem_id_availabilityconditionsjson input[type=text]. */
6-
position:relative;
7-
top: 4px;
7+
.availability-item .availability_stash label,
8+
.availability-item .availability_stash select,
9+
.availability-item .availability_stash input {
10+
margin-bottom: 0;
811
}

yui/build/moodle-availability_stash-form/moodle-availability_stash-form-debug.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ YUI.add('moodle-availability_stash-form', function (Y, NAME) {
2424
var TPLCONDITIONS = '' +
2525
'<label>' +
2626
' <span class="accesshide">{{get_string "condition" "availability_stash"}}</span>' +
27-
' <select name="condition">' +
27+
' <select name="condition" class="form-control">' +
2828
' {{#each conditions}}' +
2929
' <option value="{{value}}">{{name}}</option>' +
3030
' {{/each}}' +
@@ -34,13 +34,13 @@ var TPLCONDITIONS = '' +
3434
var TPLQUANTITY = '' +
3535
'<label>' +
3636
' <span class="accesshide">{{get_string "quantity" "availability_stash"}}</span>' +
37-
' <input type="number" name="quantity" class="quantity" min="0" value="1">' +
37+
' <input type="number" name="quantity" class="quantity form-control" min="0" value="1">' +
3838
'</label>';
3939

4040
var TPLOBJECTS = '' +
4141
'<label>' +
4242
' <span class="accesshide">{{get_string "object" "availability_stash"}}</span>' +
43-
' <select name="object">' +
43+
' <select name="object" class="form-control">' +
4444
' {{#each objects}}' +
4545
' <option value="{{id}}">{{name}}</option>' +
4646
' {{/each}}' +
@@ -51,7 +51,7 @@ var SELECTORS = {
5151
CONDITION: 'select[name="condition"]',
5252
QUANTITY: 'input[name="quantity"]',
5353
OBJECT: 'select[name="object"]'
54-
}
54+
};
5555

5656
M.availability_stash = M.availability_stash || {};
5757

@@ -128,7 +128,7 @@ M.availability_stash.form = Y.merge(M.core_availability.plugin, {
128128
condition: parent.one(SELECTORS.CONDITION),
129129
quantity: parent.one(SELECTORS.QUANTITY),
130130
object: parent.one(SELECTORS.OBJECT)
131-
}
131+
};
132132
},
133133

134134
fillValue: function(value, node) {

yui/build/moodle-availability_stash-form/moodle-availability_stash-form-min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

yui/build/moodle-availability_stash-form/moodle-availability_stash-form.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ YUI.add('moodle-availability_stash-form', function (Y, NAME) {
2424
var TPLCONDITIONS = '' +
2525
'<label>' +
2626
' <span class="accesshide">{{get_string "condition" "availability_stash"}}</span>' +
27-
' <select name="condition">' +
27+
' <select name="condition" class="form-control">' +
2828
' {{#each conditions}}' +
2929
' <option value="{{value}}">{{name}}</option>' +
3030
' {{/each}}' +
@@ -34,13 +34,13 @@ var TPLCONDITIONS = '' +
3434
var TPLQUANTITY = '' +
3535
'<label>' +
3636
' <span class="accesshide">{{get_string "quantity" "availability_stash"}}</span>' +
37-
' <input type="number" name="quantity" class="quantity" min="0" value="1">' +
37+
' <input type="number" name="quantity" class="quantity form-control" min="0" value="1">' +
3838
'</label>';
3939

4040
var TPLOBJECTS = '' +
4141
'<label>' +
4242
' <span class="accesshide">{{get_string "object" "availability_stash"}}</span>' +
43-
' <select name="object">' +
43+
' <select name="object" class="form-control">' +
4444
' {{#each objects}}' +
4545
' <option value="{{id}}">{{name}}</option>' +
4646
' {{/each}}' +
@@ -51,7 +51,7 @@ var SELECTORS = {
5151
CONDITION: 'select[name="condition"]',
5252
QUANTITY: 'input[name="quantity"]',
5353
OBJECT: 'select[name="object"]'
54-
}
54+
};
5555

5656
M.availability_stash = M.availability_stash || {};
5757

@@ -128,7 +128,7 @@ M.availability_stash.form = Y.merge(M.core_availability.plugin, {
128128
condition: parent.one(SELECTORS.CONDITION),
129129
quantity: parent.one(SELECTORS.QUANTITY),
130130
object: parent.one(SELECTORS.OBJECT)
131-
}
131+
};
132132
},
133133

134134
fillValue: function(value, node) {

yui/src/form/js/form.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
var TPLCONDITIONS = '' +
2323
'<label>' +
2424
' <span class="accesshide">{{get_string "condition" "availability_stash"}}</span>' +
25-
' <select name="condition">' +
25+
' <select name="condition" class="form-control">' +
2626
' {{#each conditions}}' +
2727
' <option value="{{value}}">{{name}}</option>' +
2828
' {{/each}}' +
@@ -32,13 +32,13 @@ var TPLCONDITIONS = '' +
3232
var TPLQUANTITY = '' +
3333
'<label>' +
3434
' <span class="accesshide">{{get_string "quantity" "availability_stash"}}</span>' +
35-
' <input type="number" name="quantity" class="quantity" min="0" value="1">' +
35+
' <input type="number" name="quantity" class="quantity form-control" min="0" value="1">' +
3636
'</label>';
3737

3838
var TPLOBJECTS = '' +
3939
'<label>' +
4040
' <span class="accesshide">{{get_string "object" "availability_stash"}}</span>' +
41-
' <select name="object">' +
41+
' <select name="object" class="form-control">' +
4242
' {{#each objects}}' +
4343
' <option value="{{id}}">{{name}}</option>' +
4444
' {{/each}}' +
@@ -49,7 +49,7 @@ var SELECTORS = {
4949
CONDITION: 'select[name="condition"]',
5050
QUANTITY: 'input[name="quantity"]',
5151
OBJECT: 'select[name="object"]'
52-
}
52+
};
5353

5454
M.availability_stash = M.availability_stash || {};
5555

@@ -126,7 +126,7 @@ M.availability_stash.form = Y.merge(M.core_availability.plugin, {
126126
condition: parent.one(SELECTORS.CONDITION),
127127
quantity: parent.one(SELECTORS.QUANTITY),
128128
object: parent.one(SELECTORS.OBJECT)
129-
}
129+
};
130130
},
131131

132132
fillValue: function(value, node) {

0 commit comments

Comments
 (0)