minor css fix, added chromebook sorting (code from yaman)
This commit is contained in:
parent
a59371a8fa
commit
fd3e78aa28
@ -1,6 +1,6 @@
|
|||||||
Template.admin.helpers({
|
Template.admin.helpers({
|
||||||
chromebooks: function() {
|
chromebooks: function() {
|
||||||
return Chromebooks.find();
|
return Chromebooks.find({}, {sort: {number: 1}});
|
||||||
},
|
},
|
||||||
carts: function() {
|
carts: function() {
|
||||||
return carts.find();
|
return carts.find();
|
||||||
@ -36,7 +36,7 @@ Template.admin.events({
|
|||||||
"serial": chromebook_serial,
|
"serial": chromebook_serial,
|
||||||
"number": chromebook_number
|
"number": chromebook_number
|
||||||
});
|
});
|
||||||
|
|
||||||
// Clear form
|
// Clear form
|
||||||
$("input[name='anumber']")[0].value = "";
|
$("input[name='anumber']")[0].value = "";
|
||||||
$("input[name='aserial']")[0].value = "";
|
$("input[name='aserial']")[0].value = "";
|
||||||
@ -117,6 +117,8 @@ Template.admin.events({
|
|||||||
Template.admin.rendered = function() {
|
Template.admin.rendered = function() {
|
||||||
|
|
||||||
$(".border.tabs-content").mCustomScrollbar({
|
$(".border.tabs-content").mCustomScrollbar({
|
||||||
theme: 'dark'
|
theme: 'dark',
|
||||||
|
scrollInertia: 0,
|
||||||
|
mouseWheelPixels: 30
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Template.checkout.helpers({
|
Template.checkout.helpers({
|
||||||
chromebooks: function() {
|
chromebooks: function() {
|
||||||
return Chromebooks.find();
|
return Chromebooks.find({}, {sort: {number: 1}});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -25,6 +25,8 @@ Template.checkout.events({
|
|||||||
Template.checkout.rendered = function() {
|
Template.checkout.rendered = function() {
|
||||||
|
|
||||||
$(".chckChromebooks").mCustomScrollbar({
|
$(".chckChromebooks").mCustomScrollbar({
|
||||||
theme: 'dark'
|
theme: 'dark',
|
||||||
|
scrollInertia: 0,
|
||||||
|
mouseWheelPixels: 30
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -38,4 +38,5 @@ Template.chromebook.events({
|
|||||||
Chromebooks.update(this._id, {$set: {user: null}});
|
Chromebooks.update(this._id, {$set: {user: null}});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,7 @@ h6 {
|
|||||||
box-shadow: 0px 5px 10px #222222;
|
box-shadow: 0px 5px 10px #222222;
|
||||||
}
|
}
|
||||||
.main-center, .main-center-admin {
|
.main-center, .main-center-admin {
|
||||||
max-height:700px;
|
max-height:650px;
|
||||||
margin-top:4%;
|
margin-top:4%;
|
||||||
}
|
}
|
||||||
.main-center {
|
.main-center {
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
float: left;
|
float: left;
|
||||||
padding: 13px 23.2%;
|
padding: 13px 23.18%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@ -19,7 +19,7 @@
|
|||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
margin-bottom: -1px !important;
|
margin-bottom: -1px !important;
|
||||||
padding: 13px 23.18% 14px 23.18% !important;
|
padding: 13px 23.15% 14px 23.15% !important;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,7 +16,7 @@ Template.teacher.helpers({
|
|||||||
|
|
||||||
Template.teacher.helpers({
|
Template.teacher.helpers({
|
||||||
chromebooks: function() {
|
chromebooks: function() {
|
||||||
return Chromebooks.find();
|
return Chromebooks.find({}, {sort: {number: 1}});
|
||||||
},
|
},
|
||||||
carts: function() {
|
carts: function() {
|
||||||
return carts.find();
|
return carts.find();
|
||||||
@ -25,6 +25,8 @@ Template.teacher.helpers({
|
|||||||
Template.teacher.rendered = function() {
|
Template.teacher.rendered = function() {
|
||||||
|
|
||||||
$(".tchChromebooks").mCustomScrollbar({
|
$(".tchChromebooks").mCustomScrollbar({
|
||||||
theme: 'dark'
|
theme: 'dark',
|
||||||
|
scrollInertia: 0,
|
||||||
|
mouseWheelPixels: 30
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
Meteor.publish('chromebook', function() {
|
Meteor.publish('chromebook', function() {
|
||||||
|
|
||||||
if (Roles.userIsInRole(this.userId, ['admin'])) {
|
if (Roles.userIsInRole(this.userId, ['admin'])) {
|
||||||
|
|
||||||
return Chromebooks.find();
|
return Chromebooks.find();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user