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-top:13%;
|
||||||
margin-bottom:0;
|
margin-bottom:0;
|
||||||
height:auto;
|
height:auto;
|
||||||
max-width:600px;
|
max-width:60%;
|
||||||
box-shadow: 0px 5px 10px #222222;
|
box-shadow: 0px 5px 10px #222222;
|
||||||
padding-bottom:0;
|
padding-bottom:0;
|
||||||
padding-top:0;
|
padding-top:0;
|
||||||
|
|||||||
@ -15,8 +15,8 @@
|
|||||||
{{#each chromebooks}}
|
{{#each chromebooks}}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{{> chromebook}}
|
{{> chromebook}}
|
||||||
<!-- fa-times -->
|
<i class="icons yield fa fa-exclamation-triangle fa-lg"></i>
|
||||||
<i class="icons cross fa fa-exclamation-triangle fa-lg"></i>
|
<i class="icons cross fa fa-times fa-lg"></i>
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -9,7 +9,9 @@ Template.admin.events({
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
var chromebook_number = $("input[name='anumber']")[0].value;
|
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({
|
Chromebooks.insert({
|
||||||
"status": 0,
|
"status": 0,
|
||||||
@ -20,10 +22,34 @@ Template.admin.events({
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Clear form
|
// Clear form
|
||||||
chromebook_number.value = "";
|
$("input[name='anumber']")[0].value = "";
|
||||||
chromebook_serial.value = "";
|
$("input[name='aserial']")[0].value = "";
|
||||||
|
|
||||||
// Prevent default form
|
// Prevent default form
|
||||||
return false;
|
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 {
|
.titleword {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
|
|||||||
@ -22,6 +22,15 @@ Template.chromebook.helpers({
|
|||||||
});
|
});
|
||||||
|
|
||||||
Template.chromebook.events({
|
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() {
|
'click .available': function() {
|
||||||
if ((Chromebooks.findOne({userid: Meteor.userId()}) === undefined)
|
if ((Chromebooks.findOne({userid: Meteor.userId()}) === undefined)
|
||||||
|| (Roles.userIsInRole(Meteor.userId(), ['admin', 'teacher']))) {
|
|| (Roles.userIsInRole(Meteor.userId(), ['admin', 'teacher']))) {
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
<h5>Chromebook Checkout</h5>
|
<h5>Chromebook Checkout</h5>
|
||||||
<button id="submit">Checkout!</button>
|
<button id="submit">Checkout!</button>
|
||||||
</div>
|
</div>
|
||||||
<p class="bottom">Checkout a chromebook.
|
<p class="bottom">Checkout a chromebook.</p>
|
||||||
<img class="chromeicon" src="ico/chrico.png">
|
<img class="chromeicon" src="ico/chrico.png">
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -18,6 +18,14 @@ html {
|
|||||||
display: table;
|
display: table;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.chromeicon {
|
||||||
|
height: 35px;
|
||||||
|
width: 35px;
|
||||||
|
float: right;
|
||||||
|
margin-right: 31%;
|
||||||
|
margin-top: 1.2%;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font:35px/1.5 'Lato';
|
font:35px/1.5 'Lato';
|
||||||
color:#777;
|
color:#777;
|
||||||
@ -100,12 +108,17 @@ p {
|
|||||||
}
|
}
|
||||||
p.bottom {
|
p.bottom {
|
||||||
padding-top:0%;
|
padding-top:0%;
|
||||||
margin-left:auto;
|
margin-left:30%;
|
||||||
margin-right:auto;
|
margin-right:auto;
|
||||||
color:#f7f7f7;
|
color:#f7f7f7;
|
||||||
max-width:325px;
|
max-width:325px;
|
||||||
font:27px 'Lato';
|
font:27px 'Lato';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bottom {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
p.footer {
|
p.footer {
|
||||||
color:#f7f7f7
|
color:#f7f7f7
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user