fixed bug of chrome icon being too big
This commit is contained in:
parent
41b5f913f3
commit
751bb05ec3
@ -10,7 +10,7 @@
|
||||
margin-top:13%;
|
||||
margin-bottom:0;
|
||||
height:auto;
|
||||
max-width:600px;
|
||||
max-width:60%;
|
||||
box-shadow: 0px 5px 10px #222222;
|
||||
padding-bottom:0;
|
||||
padding-top:0;
|
||||
|
||||
@ -15,8 +15,8 @@
|
||||
{{#each chromebooks}}
|
||||
<div class="row">
|
||||
{{> chromebook}}
|
||||
<!-- fa-times -->
|
||||
<i class="icons cross fa fa-exclamation-triangle fa-lg"></i>
|
||||
<i class="icons yield fa fa-exclamation-triangle fa-lg"></i>
|
||||
<i class="icons cross fa fa-times fa-lg"></i>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
@ -9,7 +9,9 @@ Template.admin.events({
|
||||
event.preventDefault();
|
||||
|
||||
var chromebook_number = $("input[name='anumber']")[0].value;
|
||||
var chromebook_serial = $("input[name='anumber']")[0].nextElementSibling.value;
|
||||
var chromebook_serial = $("input[name='aserial']")[0].value;
|
||||
|
||||
if (!((chromebook_number === "") || (chromebook_serial === "")))
|
||||
|
||||
Chromebooks.insert({
|
||||
"status": 0,
|
||||
@ -20,10 +22,34 @@ Template.admin.events({
|
||||
});
|
||||
|
||||
// Clear form
|
||||
chromebook_number.value = "";
|
||||
chromebook_serial.value = "";
|
||||
$("input[name='anumber']")[0].value = "";
|
||||
$("input[name='aserial']")[0].value = "";
|
||||
|
||||
// Prevent default form
|
||||
return false;
|
||||
},
|
||||
'click .cross' : function() {
|
||||
if (Roles.userIsInRole(Meteor.userId(), ['admin'])) {
|
||||
Chromebooks.remove(this._id);
|
||||
}
|
||||
},
|
||||
'click .yield' : function() {
|
||||
if (Roles.userIsInRole(Meteor.userId(), ['admin'])) {
|
||||
if (this.status === 0) {
|
||||
Chromebooks.update(this._id, {$set: {status: 2}});
|
||||
Chromebooks.update(this._id, {$set: {user: null}});
|
||||
}
|
||||
else if (this.status ===1) {
|
||||
Chromebooks.update(this._id, {$set: {status: 2}});
|
||||
}
|
||||
else {
|
||||
Chromebooks.update(this._id, {$set: {status: 0}});
|
||||
Chromebooks.update(this._id, {$set: {last_checkout: null}});
|
||||
Chromebooks.update(this._id, {$set: {userid: null}});
|
||||
}
|
||||
}
|
||||
else {
|
||||
alert("Access Denied");
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -20,6 +20,7 @@ margin-bottom: 25%;
|
||||
|
||||
.titleword {
|
||||
text-align: center;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.row {
|
||||
|
||||
@ -22,6 +22,15 @@ Template.chromebook.helpers({
|
||||
});
|
||||
|
||||
Template.chromebook.events({
|
||||
'click .available, click .unavailable, click .checkedout': function() {
|
||||
if (Roles.userIsInRole(Meteor.userId(), ['admin'])
|
||||
&& Router.current().route.path() === '/admin') {
|
||||
var chromebook_number = $("input[name='anumber']")[0].value;
|
||||
var chromebook_serial = $("input[name='anumber']")[0].nextElementSibling.value;
|
||||
chromebook_number = this.number;
|
||||
chromebook_serial = this.serial;
|
||||
}
|
||||
},
|
||||
'click .available': function() {
|
||||
if ((Chromebooks.findOne({userid: Meteor.userId()}) === undefined)
|
||||
|| (Roles.userIsInRole(Meteor.userId(), ['admin', 'teacher']))) {
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
<h5>Chromebook Checkout</h5>
|
||||
<button id="submit">Checkout!</button>
|
||||
</div>
|
||||
<p class="bottom">Checkout a chromebook.
|
||||
<p class="bottom">Checkout a chromebook.</p>
|
||||
<img class="chromeicon" src="ico/chrico.png">
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -18,6 +18,14 @@ html {
|
||||
display: table;
|
||||
}
|
||||
|
||||
.chromeicon {
|
||||
height: 35px;
|
||||
width: 35px;
|
||||
float: right;
|
||||
margin-right: 31%;
|
||||
margin-top: 1.2%;
|
||||
}
|
||||
|
||||
body {
|
||||
font:35px/1.5 'Lato';
|
||||
color:#777;
|
||||
@ -100,12 +108,17 @@ p {
|
||||
}
|
||||
p.bottom {
|
||||
padding-top:0%;
|
||||
margin-left:auto;
|
||||
margin-left:30%;
|
||||
margin-right:auto;
|
||||
color:#f7f7f7;
|
||||
max-width:325px;
|
||||
font:27px 'Lato';
|
||||
}
|
||||
|
||||
.bottom {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
p.footer {
|
||||
color:#f7f7f7
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user