Readded packages
This commit is contained in:
parent
0bcec1bfd6
commit
a7154c17dc
23
hourglass/packages/meteor-admin-lte/README.md
Normal file
23
hourglass/packages/meteor-admin-lte/README.md
Normal file
@ -0,0 +1,23 @@
|
||||
AdminLTE dashboard theme
|
||||
========================
|
||||
|
||||
`meteor add mfactory:admin-lte`
|
||||
|
||||
## Usage ##
|
||||
|
||||
1. Get familiar with [AdminLTE](https://almsaeedstudio.com/AdminLTE) docs.
|
||||
2. Use `AdminLTE` template to load AdminLTE files.
|
||||
|
||||
```
|
||||
{{#AdminLTE skin="green"}}
|
||||
<!-- your html here -->
|
||||
{{/AdminLTE}}
|
||||
```
|
||||
|
||||
### Available options ###
|
||||
|
||||
**skin** - specifies which skin to use. Accepted values: `black black-light blue blue-light green green-light purple purple-light red red-light yellow yellow-light`. Defaults to 'blue'.
|
||||
|
||||
**fixed** - set to `true` to get fixed header and sidebar. Defaults to `false`.
|
||||
|
||||
**sidebarMini** - set to `true` to make sidebar small when collapsed. Defaults to `false`.
|
||||
16
hourglass/packages/meteor-admin-lte/admin-lte.html
Normal file
16
hourglass/packages/meteor-admin-lte/admin-lte.html
Normal file
@ -0,0 +1,16 @@
|
||||
<template name="AdminLTE">
|
||||
<link rel="stylesheet" type="text/css" href="bootstrap/bootstrap.min.css">
|
||||
{{#unless isReady}}
|
||||
{{> Template.dynamic template=loadingTemplate}}
|
||||
{{else}}
|
||||
<div class="skin-{{skin}}">
|
||||
<div class="wrapper">
|
||||
{{> UI.contentBlock}}
|
||||
</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
</template>
|
||||
|
||||
<template name="AdminLTE_loading">
|
||||
<b>Loading</b>
|
||||
</template>
|
||||
182
hourglass/packages/meteor-admin-lte/admin-lte.js
Normal file
182
hourglass/packages/meteor-admin-lte/admin-lte.js
Normal file
@ -0,0 +1,182 @@
|
||||
var screenSizes = {
|
||||
xs: 480,
|
||||
sm: 768,
|
||||
md: 992,
|
||||
lg: 1200
|
||||
};
|
||||
|
||||
Template.AdminLTE.onCreated(function () {
|
||||
var self = this;
|
||||
var skin = 'blue';
|
||||
var fixed = false;
|
||||
var sidebarMini = false;
|
||||
|
||||
if (this.data) {
|
||||
skin = this.data.skin || skin;
|
||||
fixed = this.data.fixed || fixed;
|
||||
sidebarMini = this.data.sidebarMini || sidebarMini;
|
||||
}
|
||||
|
||||
self.isReady = new ReactiveVar(false);
|
||||
self.style = waitOnCSS(cssUrl());
|
||||
self.skin = waitOnCSS(skinUrl(skin));
|
||||
|
||||
fixed && $('body').addClass('fixed');
|
||||
sidebarMini && $('body').addClass('sidebar-mini');
|
||||
self.removeClasses = function () {
|
||||
fixed && $('body').removeClass('fixed');
|
||||
sidebarMini && $('body').removeClass('sidebar-mini');
|
||||
}
|
||||
|
||||
this.autorun(function () {
|
||||
if (self.style.ready() && self.skin.ready()) {
|
||||
self.isReady.set(true);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Template.AdminLTE.onDestroyed(function () {
|
||||
this.removeClasses();
|
||||
this.style.remove();
|
||||
this.skin.remove();
|
||||
});
|
||||
|
||||
Template.AdminLTE.helpers({
|
||||
isReady: function () {
|
||||
return Template.instance().isReady.get();
|
||||
},
|
||||
|
||||
loadingTemplate: function () {
|
||||
return this.loadingTemplate || 'AdminLTE_loading';
|
||||
},
|
||||
|
||||
skin: function () {
|
||||
return this.skin || 'blue';
|
||||
}
|
||||
});
|
||||
|
||||
Template.AdminLTE.events({
|
||||
'click [data-toggle=offcanvas]': function (e, t) {
|
||||
e.preventDefault();
|
||||
|
||||
//Enable sidebar push menu
|
||||
if ($(window).width() > (screenSizes.sm - 1)) {
|
||||
$("body").toggleClass('sidebar-collapse');
|
||||
}
|
||||
//Handle sidebar push menu for small screens
|
||||
else {
|
||||
if ($("body").hasClass('sidebar-open')) {
|
||||
$("body").removeClass('sidebar-open');
|
||||
$("body").removeClass('sidebar-collapse')
|
||||
} else {
|
||||
$("body").addClass('sidebar-open');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
'click .content-wrapper': function (e, t) {
|
||||
//Enable hide menu when clicking on the content-wrapper on small screens
|
||||
if ($(window).width() <= (screenSizes.sm - 1) && $("body").hasClass("sidebar-open")) {
|
||||
$("body").removeClass('sidebar-open');
|
||||
}
|
||||
},
|
||||
|
||||
'click .sidebar li a': function (e, t) {
|
||||
//Get the clicked link and the next element
|
||||
var $this = $(e.currentTarget);
|
||||
var checkElement = $this.next();
|
||||
|
||||
//Check if the next element is a menu and is visible
|
||||
if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible'))) {
|
||||
//Close the menu
|
||||
checkElement.slideUp('normal', function () {
|
||||
checkElement.removeClass('menu-open');
|
||||
});
|
||||
checkElement.parent("li").removeClass("active");
|
||||
}
|
||||
//If the menu is not visible
|
||||
else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) {
|
||||
//Get the parent menu
|
||||
var parent = $this.parents('ul').first();
|
||||
//Close all open menus within the parent
|
||||
var ul = parent.find('ul:visible').slideUp('normal');
|
||||
//Remove the menu-open class from the parent
|
||||
ul.removeClass('menu-open');
|
||||
//Get the parent li
|
||||
var parent_li = $this.parent("li");
|
||||
|
||||
//Open the target menu and add the menu-open class
|
||||
checkElement.slideDown('normal', function () {
|
||||
//Add the class active to the parent li
|
||||
checkElement.addClass('menu-open');
|
||||
parent.find('li.active').removeClass('active');
|
||||
parent_li.addClass('active');
|
||||
});
|
||||
}
|
||||
//if this isn't a link, prevent the page from being redirected
|
||||
if (checkElement.is('.treeview-menu')) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function cssUrl () {
|
||||
return Meteor.absoluteUrl('packages/mfactory_admin-lte/css/AdminLTE.min.css');
|
||||
}
|
||||
|
||||
function skinUrl (name) {
|
||||
return Meteor.absoluteUrl(
|
||||
'packages/mfactory_admin-lte/css/skins/skin-' + name + '.min.css');
|
||||
}
|
||||
|
||||
function waitOnCSS (url, timeout) {
|
||||
var isLoaded = new ReactiveVar(false);
|
||||
timeout = timeout || 5000;
|
||||
|
||||
var link = document.createElement('link');
|
||||
link.type = 'text/css';
|
||||
link.rel = 'stylesheet';
|
||||
link.href = url;
|
||||
|
||||
link.onload = function () {
|
||||
isLoaded.set(true);
|
||||
};
|
||||
|
||||
if (link.addEventListener) {
|
||||
link.addEventListener('load', function () {
|
||||
isLoaded.set(true);
|
||||
}, false);
|
||||
}
|
||||
|
||||
link.onreadystatechange = function () {
|
||||
var state = link.readyState;
|
||||
if (state === 'loaded' || state === 'complete') {
|
||||
link.onreadystatechange = null;
|
||||
isLoaded.set(true);
|
||||
}
|
||||
};
|
||||
|
||||
var cssnum = document.styleSheets.length;
|
||||
var ti = setInterval(function () {
|
||||
if (document.styleSheets.length > cssnum) {
|
||||
isLoaded.set(true);
|
||||
clearInterval(ti);
|
||||
}
|
||||
}, 10);
|
||||
|
||||
setTimeout(function () {
|
||||
isLoaded.set(true);
|
||||
}, timeout);
|
||||
|
||||
$(document.head).append(link);
|
||||
|
||||
return {
|
||||
ready: function () {
|
||||
return isLoaded.get();
|
||||
},
|
||||
|
||||
remove: function () {
|
||||
$('link[href="' + url + '"]').remove();
|
||||
}
|
||||
};
|
||||
}
|
||||
7
hourglass/packages/meteor-admin-lte/css/AdminLTE.min.css
vendored
Normal file
7
hourglass/packages/meteor-admin-lte/css/AdminLTE.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
hourglass/packages/meteor-admin-lte/css/skins/skin-black-light.min.css
vendored
Normal file
1
hourglass/packages/meteor-admin-lte/css/skins/skin-black-light.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.skin-black-light .main-header{-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.skin-black-light .main-header .navbar-toggle{color:#333}.skin-black-light .main-header .navbar-brand{color:#333;border-right:1px solid #eee}.skin-black-light .main-header>.navbar{background-color:#fff}.skin-black-light .main-header>.navbar .nav>li>a{color:#333}.skin-black-light .main-header>.navbar .nav>li>a:hover,.skin-black-light .main-header>.navbar .nav>li>a:active,.skin-black-light .main-header>.navbar .nav>li>a:focus,.skin-black-light .main-header>.navbar .nav .open>a,.skin-black-light .main-header>.navbar .nav .open>a:hover,.skin-black-light .main-header>.navbar .nav .open>a:focus{background:#fff;color:#999}.skin-black-light .main-header>.navbar .sidebar-toggle{color:#333}.skin-black-light .main-header>.navbar .sidebar-toggle:hover{color:#999;background:#fff}.skin-black-light .main-header>.navbar>.sidebar-toggle{color:#333;border-right:1px solid #eee}.skin-black-light .main-header>.navbar .navbar-nav>li>a{border-right:1px solid #eee}.skin-black-light .main-header>.navbar .navbar-custom-menu .navbar-nav>li>a,.skin-black-light .main-header>.navbar .navbar-right>li>a{border-left:1px solid #eee;border-right-width:0}.skin-black-light .main-header>.logo{background-color:#fff;color:#333;border-bottom:0 solid transparent;border-right:1px solid #eee}.skin-black-light .main-header>.logo:hover{background-color:#fcfcfc}@media (max-width:767px){.skin-black-light .main-header>.logo{background-color:#222;color:#fff;border-bottom:0 solid transparent;border-right:none}.skin-black-light .main-header>.logo:hover{background-color:#1f1f1f}}.skin-black-light .main-header li.user-header{background-color:#222}.skin-black-light .content-header{background:transparent;box-shadow:none}.skin-black-light .wrapper,.skin-black-light .main-sidebar,.skin-black-light .left-side{background-color:#f9fafc}.skin-black-light .content-wrapper,.skin-black-light .main-footer{border-left:1px solid #d2d6de}.skin-black-light .user-panel>.info,.skin-black-light .user-panel>.info>a{color:#444}.skin-black-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-black-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-black-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-black-light .sidebar-menu>li:hover>a,.skin-black-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-black-light .sidebar-menu>li.active{border-left-color:#fff}.skin-black-light .sidebar-menu>li.active>a{font-weight:600}.skin-black-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-black-light .sidebar a{color:#444}.skin-black-light .sidebar a:hover{text-decoration:none}.skin-black-light .treeview-menu>li>a{color:#777}.skin-black-light .treeview-menu>li.active>a,.skin-black-light .treeview-menu>li>a:hover{color:#000}.skin-black-light .treeview-menu>li.active>a{font-weight:600}.skin-black-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-black-light .sidebar-form input[type="text"],.skin-black-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.skin-black-light .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px !important;border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;border-bottom-left-radius:2px !important}.skin-black-light .sidebar-form input[type="text"]:focus,.skin-black-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-black-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-black-light .sidebar-form .btn{color:#999;border-top-left-radius:0 !important;border-top-right-radius:2px !important;border-bottom-right-radius:2px !important;border-bottom-left-radius:0 !important}@media (min-width:768px){.skin-black-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}
|
||||
1
hourglass/packages/meteor-admin-lte/css/skins/skin-black.min.css
vendored
Normal file
1
hourglass/packages/meteor-admin-lte/css/skins/skin-black.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.skin-black .main-header{-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.skin-black .main-header .navbar-toggle{color:#333}.skin-black .main-header .navbar-brand{color:#333;border-right:1px solid #eee}.skin-black .main-header>.navbar{background-color:#fff}.skin-black .main-header>.navbar .nav>li>a{color:#333}.skin-black .main-header>.navbar .nav>li>a:hover,.skin-black .main-header>.navbar .nav>li>a:active,.skin-black .main-header>.navbar .nav>li>a:focus,.skin-black .main-header>.navbar .nav .open>a,.skin-black .main-header>.navbar .nav .open>a:hover,.skin-black .main-header>.navbar .nav .open>a:focus{background:#fff;color:#999}.skin-black .main-header>.navbar .sidebar-toggle{color:#333}.skin-black .main-header>.navbar .sidebar-toggle:hover{color:#999;background:#fff}.skin-black .main-header>.navbar>.sidebar-toggle{color:#333;border-right:1px solid #eee}.skin-black .main-header>.navbar .navbar-nav>li>a{border-right:1px solid #eee}.skin-black .main-header>.navbar .navbar-custom-menu .navbar-nav>li>a,.skin-black .main-header>.navbar .navbar-right>li>a{border-left:1px solid #eee;border-right-width:0}.skin-black .main-header>.logo{background-color:#fff;color:#333;border-bottom:0 solid transparent;border-right:1px solid #eee}.skin-black .main-header>.logo:hover{background-color:#fcfcfc}@media (max-width:767px){.skin-black .main-header>.logo{background-color:#222;color:#fff;border-bottom:0 solid transparent;border-right:none}.skin-black .main-header>.logo:hover{background-color:#1f1f1f}}.skin-black .main-header li.user-header{background-color:#222}.skin-black .content-header{background:transparent;box-shadow:none}.skin-black .wrapper,.skin-black .main-sidebar,.skin-black .left-side{background-color:#222d32}.skin-black .user-panel>.info,.skin-black .user-panel>.info>a{color:#fff}.skin-black .sidebar-menu>li.header{color:#4b646f;background:#1a2226}.skin-black .sidebar-menu>li>a{border-left:3px solid transparent}.skin-black .sidebar-menu>li:hover>a,.skin-black .sidebar-menu>li.active>a{color:#fff;background:#1e282c;border-left-color:#fff}.skin-black .sidebar-menu>li>.treeview-menu{margin:0 1px;background:#2c3b41}.skin-black .sidebar a{color:#b8c7ce}.skin-black .sidebar a:hover{text-decoration:none}.skin-black .treeview-menu>li>a{color:#8aa4af}.skin-black .treeview-menu>li.active>a,.skin-black .treeview-menu>li>a:hover{color:#fff}.skin-black .sidebar-form{border-radius:3px;border:1px solid #374850;margin:10px 10px}.skin-black .sidebar-form input[type="text"],.skin-black .sidebar-form .btn{box-shadow:none;background-color:#374850;border:1px solid transparent;height:35px;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.skin-black .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px !important;border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;border-bottom-left-radius:2px !important}.skin-black .sidebar-form input[type="text"]:focus,.skin-black .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-black .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-black .sidebar-form .btn{color:#999;border-top-left-radius:0 !important;border-top-right-radius:2px !important;border-bottom-right-radius:2px !important;border-bottom-left-radius:0 !important}
|
||||
1
hourglass/packages/meteor-admin-lte/css/skins/skin-blue-light.min.css
vendored
Normal file
1
hourglass/packages/meteor-admin-lte/css/skins/skin-blue-light.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.skin-blue-light .main-header .navbar{background-color:#3c8dbc}.skin-blue-light .main-header .navbar .nav>li>a{color:#fff}.skin-blue-light .main-header .navbar .nav>li>a:hover,.skin-blue-light .main-header .navbar .nav>li>a:active,.skin-blue-light .main-header .navbar .nav>li>a:focus,.skin-blue-light .main-header .navbar .nav .open>a,.skin-blue-light .main-header .navbar .nav .open>a:hover,.skin-blue-light .main-header .navbar .nav .open>a:focus{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-blue-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue-light .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-blue-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue-light .main-header .navbar .sidebar-toggle:hover{background-color:#367fa9}@media (max-width:767px){.skin-blue-light .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-blue-light .main-header .navbar .dropdown-menu li a{color:#fff}.skin-blue-light .main-header .navbar .dropdown-menu li a:hover{background:#367fa9}}.skin-blue-light .main-header .logo{background-color:#3c8dbc;color:#fff;border-bottom:0 solid transparent}.skin-blue-light .main-header .logo:hover{background-color:#3b8ab8}.skin-blue-light .main-header li.user-header{background-color:#3c8dbc}.skin-blue-light .content-header{background:transparent}.skin-blue-light .wrapper,.skin-blue-light .main-sidebar,.skin-blue-light .left-side{background-color:#f9fafc}.skin-blue-light .content-wrapper,.skin-blue-light .main-footer{border-left:1px solid #d2d6de}.skin-blue-light .user-panel>.info,.skin-blue-light .user-panel>.info>a{color:#444}.skin-blue-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-blue-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-blue-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-blue-light .sidebar-menu>li:hover>a,.skin-blue-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-blue-light .sidebar-menu>li.active{border-left-color:#3c8dbc}.skin-blue-light .sidebar-menu>li.active>a{font-weight:600}.skin-blue-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-blue-light .sidebar a{color:#444}.skin-blue-light .sidebar a:hover{text-decoration:none}.skin-blue-light .treeview-menu>li>a{color:#777}.skin-blue-light .treeview-menu>li.active>a,.skin-blue-light .treeview-menu>li>a:hover{color:#000}.skin-blue-light .treeview-menu>li.active>a{font-weight:600}.skin-blue-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-blue-light .sidebar-form input[type="text"],.skin-blue-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.skin-blue-light .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px !important;border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;border-bottom-left-radius:2px !important}.skin-blue-light .sidebar-form input[type="text"]:focus,.skin-blue-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-blue-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-blue-light .sidebar-form .btn{color:#999;border-top-left-radius:0 !important;border-top-right-radius:2px !important;border-bottom-right-radius:2px !important;border-bottom-left-radius:0 !important}@media (min-width:768px){.skin-blue-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}.skin-blue-light .main-footer{border-top-color:#d2d6de}.skin-blue.layout-top-nav .main-header>.logo{background-color:#3c8dbc;color:#fff;border-bottom:0 solid transparent}.skin-blue.layout-top-nav .main-header>.logo:hover{background-color:#3b8ab8}
|
||||
1
hourglass/packages/meteor-admin-lte/css/skins/skin-blue.min.css
vendored
Normal file
1
hourglass/packages/meteor-admin-lte/css/skins/skin-blue.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.skin-blue .main-header .navbar{background-color:#3c8dbc}.skin-blue .main-header .navbar .nav>li>a{color:#fff}.skin-blue .main-header .navbar .nav>li>a:hover,.skin-blue .main-header .navbar .nav>li>a:active,.skin-blue .main-header .navbar .nav>li>a:focus,.skin-blue .main-header .navbar .nav .open>a,.skin-blue .main-header .navbar .nav .open>a:hover,.skin-blue .main-header .navbar .nav .open>a:focus{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-blue .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-blue .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue .main-header .navbar .sidebar-toggle:hover{background-color:#367fa9}@media (max-width:767px){.skin-blue .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-blue .main-header .navbar .dropdown-menu li a{color:#fff}.skin-blue .main-header .navbar .dropdown-menu li a:hover{background:#367fa9}}.skin-blue .main-header .logo{background-color:#367fa9;color:#fff;border-bottom:0 solid transparent}.skin-blue .main-header .logo:hover{background-color:#357ca5}.skin-blue .main-header li.user-header{background-color:#3c8dbc}.skin-blue .content-header{background:transparent}.skin-blue .wrapper,.skin-blue .main-sidebar,.skin-blue .left-side{background-color:#222d32}.skin-blue .user-panel>.info,.skin-blue .user-panel>.info>a{color:#fff}.skin-blue .sidebar-menu>li.header{color:#4b646f;background:#1a2226}.skin-blue .sidebar-menu>li>a{border-left:3px solid transparent}.skin-blue .sidebar-menu>li:hover>a,.skin-blue .sidebar-menu>li.active>a{color:#fff;background:#1e282c;border-left-color:#3c8dbc}.skin-blue .sidebar-menu>li>.treeview-menu{margin:0 1px;background:#2c3b41}.skin-blue .sidebar a{color:#b8c7ce}.skin-blue .sidebar a:hover{text-decoration:none}.skin-blue .treeview-menu>li>a{color:#8aa4af}.skin-blue .treeview-menu>li.active>a,.skin-blue .treeview-menu>li>a:hover{color:#fff}.skin-blue .sidebar-form{border-radius:3px;border:1px solid #374850;margin:10px 10px}.skin-blue .sidebar-form input[type="text"],.skin-blue .sidebar-form .btn{box-shadow:none;background-color:#374850;border:1px solid transparent;height:35px;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.skin-blue .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px !important;border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;border-bottom-left-radius:2px !important}.skin-blue .sidebar-form input[type="text"]:focus,.skin-blue .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-blue .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-blue .sidebar-form .btn{color:#999;border-top-left-radius:0 !important;border-top-right-radius:2px !important;border-bottom-right-radius:2px !important;border-bottom-left-radius:0 !important}.skin-blue.layout-top-nav .main-header>.logo{background-color:#3c8dbc;color:#fff;border-bottom:0 solid transparent}.skin-blue.layout-top-nav .main-header>.logo:hover{background-color:#3b8ab8}
|
||||
1
hourglass/packages/meteor-admin-lte/css/skins/skin-green-light.min.css
vendored
Normal file
1
hourglass/packages/meteor-admin-lte/css/skins/skin-green-light.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.skin-green-light .main-header .navbar{background-color:#00a65a}.skin-green-light .main-header .navbar .nav>li>a{color:#fff}.skin-green-light .main-header .navbar .nav>li>a:hover,.skin-green-light .main-header .navbar .nav>li>a:active,.skin-green-light .main-header .navbar .nav>li>a:focus,.skin-green-light .main-header .navbar .nav .open>a,.skin-green-light .main-header .navbar .nav .open>a:hover,.skin-green-light .main-header .navbar .nav .open>a:focus{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-green-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-green-light .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-green-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-green-light .main-header .navbar .sidebar-toggle:hover{background-color:#008d4c}@media (max-width:767px){.skin-green-light .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-green-light .main-header .navbar .dropdown-menu li a{color:#fff}.skin-green-light .main-header .navbar .dropdown-menu li a:hover{background:#008d4c}}.skin-green-light .main-header .logo{background-color:#00a65a;color:#fff;border-bottom:0 solid transparent}.skin-green-light .main-header .logo:hover{background-color:#00a157}.skin-green-light .main-header li.user-header{background-color:#00a65a}.skin-green-light .content-header{background:transparent}.skin-green-light .wrapper,.skin-green-light .main-sidebar,.skin-green-light .left-side{background-color:#f9fafc}.skin-green-light .content-wrapper,.skin-green-light .main-footer{border-left:1px solid #d2d6de}.skin-green-light .user-panel>.info,.skin-green-light .user-panel>.info>a{color:#444}.skin-green-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-green-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-green-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-green-light .sidebar-menu>li:hover>a,.skin-green-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-green-light .sidebar-menu>li.active{border-left-color:#00a65a}.skin-green-light .sidebar-menu>li.active>a{font-weight:600}.skin-green-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-green-light .sidebar a{color:#444}.skin-green-light .sidebar a:hover{text-decoration:none}.skin-green-light .treeview-menu>li>a{color:#777}.skin-green-light .treeview-menu>li.active>a,.skin-green-light .treeview-menu>li>a:hover{color:#000}.skin-green-light .treeview-menu>li.active>a{font-weight:600}.skin-green-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-green-light .sidebar-form input[type="text"],.skin-green-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.skin-green-light .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px !important;border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;border-bottom-left-radius:2px !important}.skin-green-light .sidebar-form input[type="text"]:focus,.skin-green-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-green-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-green-light .sidebar-form .btn{color:#999;border-top-left-radius:0 !important;border-top-right-radius:2px !important;border-bottom-right-radius:2px !important;border-bottom-left-radius:0 !important}@media (min-width:768px){.skin-green-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}
|
||||
1
hourglass/packages/meteor-admin-lte/css/skins/skin-green.min.css
vendored
Normal file
1
hourglass/packages/meteor-admin-lte/css/skins/skin-green.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.skin-green .main-header .navbar{background-color:#00a65a}.skin-green .main-header .navbar .nav>li>a{color:#fff}.skin-green .main-header .navbar .nav>li>a:hover,.skin-green .main-header .navbar .nav>li>a:active,.skin-green .main-header .navbar .nav>li>a:focus,.skin-green .main-header .navbar .nav .open>a,.skin-green .main-header .navbar .nav .open>a:hover,.skin-green .main-header .navbar .nav .open>a:focus{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-green .main-header .navbar .sidebar-toggle{color:#fff}.skin-green .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-green .main-header .navbar .sidebar-toggle{color:#fff}.skin-green .main-header .navbar .sidebar-toggle:hover{background-color:#008d4c}@media (max-width:767px){.skin-green .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-green .main-header .navbar .dropdown-menu li a{color:#fff}.skin-green .main-header .navbar .dropdown-menu li a:hover{background:#008d4c}}.skin-green .main-header .logo{background-color:#008d4c;color:#fff;border-bottom:0 solid transparent}.skin-green .main-header .logo:hover{background-color:#008749}.skin-green .main-header li.user-header{background-color:#00a65a}.skin-green .content-header{background:transparent}.skin-green .wrapper,.skin-green .main-sidebar,.skin-green .left-side{background-color:#222d32}.skin-green .user-panel>.info,.skin-green .user-panel>.info>a{color:#fff}.skin-green .sidebar-menu>li.header{color:#4b646f;background:#1a2226}.skin-green .sidebar-menu>li>a{border-left:3px solid transparent}.skin-green .sidebar-menu>li:hover>a,.skin-green .sidebar-menu>li.active>a{color:#fff;background:#1e282c;border-left-color:#00a65a}.skin-green .sidebar-menu>li>.treeview-menu{margin:0 1px;background:#2c3b41}.skin-green .sidebar a{color:#b8c7ce}.skin-green .sidebar a:hover{text-decoration:none}.skin-green .treeview-menu>li>a{color:#8aa4af}.skin-green .treeview-menu>li.active>a,.skin-green .treeview-menu>li>a:hover{color:#fff}.skin-green .sidebar-form{border-radius:3px;border:1px solid #374850;margin:10px 10px}.skin-green .sidebar-form input[type="text"],.skin-green .sidebar-form .btn{box-shadow:none;background-color:#374850;border:1px solid transparent;height:35px;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.skin-green .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px !important;border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;border-bottom-left-radius:2px !important}.skin-green .sidebar-form input[type="text"]:focus,.skin-green .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-green .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-green .sidebar-form .btn{color:#999;border-top-left-radius:0 !important;border-top-right-radius:2px !important;border-bottom-right-radius:2px !important;border-bottom-left-radius:0 !important}
|
||||
1
hourglass/packages/meteor-admin-lte/css/skins/skin-purple-light.min.css
vendored
Normal file
1
hourglass/packages/meteor-admin-lte/css/skins/skin-purple-light.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.skin-purple-light .main-header .navbar{background-color:#605ca8}.skin-purple-light .main-header .navbar .nav>li>a{color:#fff}.skin-purple-light .main-header .navbar .nav>li>a:hover,.skin-purple-light .main-header .navbar .nav>li>a:active,.skin-purple-light .main-header .navbar .nav>li>a:focus,.skin-purple-light .main-header .navbar .nav .open>a,.skin-purple-light .main-header .navbar .nav .open>a:hover,.skin-purple-light .main-header .navbar .nav .open>a:focus{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-purple-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-purple-light .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-purple-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-purple-light .main-header .navbar .sidebar-toggle:hover{background-color:#555299}@media (max-width:767px){.skin-purple-light .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-purple-light .main-header .navbar .dropdown-menu li a{color:#fff}.skin-purple-light .main-header .navbar .dropdown-menu li a:hover{background:#555299}}.skin-purple-light .main-header .logo{background-color:#605ca8;color:#fff;border-bottom:0 solid transparent}.skin-purple-light .main-header .logo:hover{background-color:#5d59a6}.skin-purple-light .main-header li.user-header{background-color:#605ca8}.skin-purple-light .content-header{background:transparent}.skin-purple-light .wrapper,.skin-purple-light .main-sidebar,.skin-purple-light .left-side{background-color:#f9fafc}.skin-purple-light .content-wrapper,.skin-purple-light .main-footer{border-left:1px solid #d2d6de}.skin-purple-light .user-panel>.info,.skin-purple-light .user-panel>.info>a{color:#444}.skin-purple-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-purple-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-purple-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-purple-light .sidebar-menu>li:hover>a,.skin-purple-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-purple-light .sidebar-menu>li.active{border-left-color:#605ca8}.skin-purple-light .sidebar-menu>li.active>a{font-weight:600}.skin-purple-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-purple-light .sidebar a{color:#444}.skin-purple-light .sidebar a:hover{text-decoration:none}.skin-purple-light .treeview-menu>li>a{color:#777}.skin-purple-light .treeview-menu>li.active>a,.skin-purple-light .treeview-menu>li>a:hover{color:#000}.skin-purple-light .treeview-menu>li.active>a{font-weight:600}.skin-purple-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-purple-light .sidebar-form input[type="text"],.skin-purple-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.skin-purple-light .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px !important;border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;border-bottom-left-radius:2px !important}.skin-purple-light .sidebar-form input[type="text"]:focus,.skin-purple-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-purple-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-purple-light .sidebar-form .btn{color:#999;border-top-left-radius:0 !important;border-top-right-radius:2px !important;border-bottom-right-radius:2px !important;border-bottom-left-radius:0 !important}@media (min-width:768px){.skin-purple-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}
|
||||
1
hourglass/packages/meteor-admin-lte/css/skins/skin-purple.min.css
vendored
Normal file
1
hourglass/packages/meteor-admin-lte/css/skins/skin-purple.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.skin-purple .main-header .navbar{background-color:#605ca8}.skin-purple .main-header .navbar .nav>li>a{color:#fff}.skin-purple .main-header .navbar .nav>li>a:hover,.skin-purple .main-header .navbar .nav>li>a:active,.skin-purple .main-header .navbar .nav>li>a:focus,.skin-purple .main-header .navbar .nav .open>a,.skin-purple .main-header .navbar .nav .open>a:hover,.skin-purple .main-header .navbar .nav .open>a:focus{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-purple .main-header .navbar .sidebar-toggle{color:#fff}.skin-purple .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-purple .main-header .navbar .sidebar-toggle{color:#fff}.skin-purple .main-header .navbar .sidebar-toggle:hover{background-color:#555299}@media (max-width:767px){.skin-purple .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-purple .main-header .navbar .dropdown-menu li a{color:#fff}.skin-purple .main-header .navbar .dropdown-menu li a:hover{background:#555299}}.skin-purple .main-header .logo{background-color:#555299;color:#fff;border-bottom:0 solid transparent}.skin-purple .main-header .logo:hover{background-color:#545096}.skin-purple .main-header li.user-header{background-color:#605ca8}.skin-purple .content-header{background:transparent}.skin-purple .wrapper,.skin-purple .main-sidebar,.skin-purple .left-side{background-color:#222d32}.skin-purple .user-panel>.info,.skin-purple .user-panel>.info>a{color:#fff}.skin-purple .sidebar-menu>li.header{color:#4b646f;background:#1a2226}.skin-purple .sidebar-menu>li>a{border-left:3px solid transparent}.skin-purple .sidebar-menu>li:hover>a,.skin-purple .sidebar-menu>li.active>a{color:#fff;background:#1e282c;border-left-color:#605ca8}.skin-purple .sidebar-menu>li>.treeview-menu{margin:0 1px;background:#2c3b41}.skin-purple .sidebar a{color:#b8c7ce}.skin-purple .sidebar a:hover{text-decoration:none}.skin-purple .treeview-menu>li>a{color:#8aa4af}.skin-purple .treeview-menu>li.active>a,.skin-purple .treeview-menu>li>a:hover{color:#fff}.skin-purple .sidebar-form{border-radius:3px;border:1px solid #374850;margin:10px 10px}.skin-purple .sidebar-form input[type="text"],.skin-purple .sidebar-form .btn{box-shadow:none;background-color:#374850;border:1px solid transparent;height:35px;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.skin-purple .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px !important;border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;border-bottom-left-radius:2px !important}.skin-purple .sidebar-form input[type="text"]:focus,.skin-purple .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-purple .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-purple .sidebar-form .btn{color:#999;border-top-left-radius:0 !important;border-top-right-radius:2px !important;border-bottom-right-radius:2px !important;border-bottom-left-radius:0 !important}
|
||||
1
hourglass/packages/meteor-admin-lte/css/skins/skin-red-light.min.css
vendored
Normal file
1
hourglass/packages/meteor-admin-lte/css/skins/skin-red-light.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.skin-red-light .main-header .navbar{background-color:#dd4b39}.skin-red-light .main-header .navbar .nav>li>a{color:#fff}.skin-red-light .main-header .navbar .nav>li>a:hover,.skin-red-light .main-header .navbar .nav>li>a:active,.skin-red-light .main-header .navbar .nav>li>a:focus,.skin-red-light .main-header .navbar .nav .open>a,.skin-red-light .main-header .navbar .nav .open>a:hover,.skin-red-light .main-header .navbar .nav .open>a:focus{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-red-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-red-light .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-red-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-red-light .main-header .navbar .sidebar-toggle:hover{background-color:#d73925}@media (max-width:767px){.skin-red-light .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-red-light .main-header .navbar .dropdown-menu li a{color:#fff}.skin-red-light .main-header .navbar .dropdown-menu li a:hover{background:#d73925}}.skin-red-light .main-header .logo{background-color:#dd4b39;color:#fff;border-bottom:0 solid transparent}.skin-red-light .main-header .logo:hover{background-color:#dc4735}.skin-red-light .main-header li.user-header{background-color:#dd4b39}.skin-red-light .content-header{background:transparent}.skin-red-light .wrapper,.skin-red-light .main-sidebar,.skin-red-light .left-side{background-color:#f9fafc}.skin-red-light .content-wrapper,.skin-red-light .main-footer{border-left:1px solid #d2d6de}.skin-red-light .user-panel>.info,.skin-red-light .user-panel>.info>a{color:#444}.skin-red-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-red-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-red-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-red-light .sidebar-menu>li:hover>a,.skin-red-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-red-light .sidebar-menu>li.active{border-left-color:#dd4b39}.skin-red-light .sidebar-menu>li.active>a{font-weight:600}.skin-red-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-red-light .sidebar a{color:#444}.skin-red-light .sidebar a:hover{text-decoration:none}.skin-red-light .treeview-menu>li>a{color:#777}.skin-red-light .treeview-menu>li.active>a,.skin-red-light .treeview-menu>li>a:hover{color:#000}.skin-red-light .treeview-menu>li.active>a{font-weight:600}.skin-red-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-red-light .sidebar-form input[type="text"],.skin-red-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.skin-red-light .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px !important;border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;border-bottom-left-radius:2px !important}.skin-red-light .sidebar-form input[type="text"]:focus,.skin-red-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-red-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-red-light .sidebar-form .btn{color:#999;border-top-left-radius:0 !important;border-top-right-radius:2px !important;border-bottom-right-radius:2px !important;border-bottom-left-radius:0 !important}@media (min-width:768px){.skin-red-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}
|
||||
1
hourglass/packages/meteor-admin-lte/css/skins/skin-red.min.css
vendored
Normal file
1
hourglass/packages/meteor-admin-lte/css/skins/skin-red.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.skin-red .main-header .navbar{background-color:#dd4b39}.skin-red .main-header .navbar .nav>li>a{color:#fff}.skin-red .main-header .navbar .nav>li>a:hover,.skin-red .main-header .navbar .nav>li>a:active,.skin-red .main-header .navbar .nav>li>a:focus,.skin-red .main-header .navbar .nav .open>a,.skin-red .main-header .navbar .nav .open>a:hover,.skin-red .main-header .navbar .nav .open>a:focus{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-red .main-header .navbar .sidebar-toggle{color:#fff}.skin-red .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-red .main-header .navbar .sidebar-toggle{color:#fff}.skin-red .main-header .navbar .sidebar-toggle:hover{background-color:#d73925}@media (max-width:767px){.skin-red .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-red .main-header .navbar .dropdown-menu li a{color:#fff}.skin-red .main-header .navbar .dropdown-menu li a:hover{background:#d73925}}.skin-red .main-header .logo{background-color:#d73925;color:#fff;border-bottom:0 solid transparent}.skin-red .main-header .logo:hover{background-color:#d33724}.skin-red .main-header li.user-header{background-color:#dd4b39}.skin-red .content-header{background:transparent}.skin-red .wrapper,.skin-red .main-sidebar,.skin-red .left-side{background-color:#222d32}.skin-red .user-panel>.info,.skin-red .user-panel>.info>a{color:#fff}.skin-red .sidebar-menu>li.header{color:#4b646f;background:#1a2226}.skin-red .sidebar-menu>li>a{border-left:3px solid transparent}.skin-red .sidebar-menu>li:hover>a,.skin-red .sidebar-menu>li.active>a{color:#fff;background:#1e282c;border-left-color:#dd4b39}.skin-red .sidebar-menu>li>.treeview-menu{margin:0 1px;background:#2c3b41}.skin-red .sidebar a{color:#b8c7ce}.skin-red .sidebar a:hover{text-decoration:none}.skin-red .treeview-menu>li>a{color:#8aa4af}.skin-red .treeview-menu>li.active>a,.skin-red .treeview-menu>li>a:hover{color:#fff}.skin-red .sidebar-form{border-radius:3px;border:1px solid #374850;margin:10px 10px}.skin-red .sidebar-form input[type="text"],.skin-red .sidebar-form .btn{box-shadow:none;background-color:#374850;border:1px solid transparent;height:35px;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.skin-red .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px !important;border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;border-bottom-left-radius:2px !important}.skin-red .sidebar-form input[type="text"]:focus,.skin-red .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-red .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-red .sidebar-form .btn{color:#999;border-top-left-radius:0 !important;border-top-right-radius:2px !important;border-bottom-right-radius:2px !important;border-bottom-left-radius:0 !important}
|
||||
1
hourglass/packages/meteor-admin-lte/css/skins/skin-yellow-light.min.css
vendored
Normal file
1
hourglass/packages/meteor-admin-lte/css/skins/skin-yellow-light.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.skin-yellow-light .main-header .navbar{background-color:#f39c12}.skin-yellow-light .main-header .navbar .nav>li>a{color:#fff}.skin-yellow-light .main-header .navbar .nav>li>a:hover,.skin-yellow-light .main-header .navbar .nav>li>a:active,.skin-yellow-light .main-header .navbar .nav>li>a:focus,.skin-yellow-light .main-header .navbar .nav .open>a,.skin-yellow-light .main-header .navbar .nav .open>a:hover,.skin-yellow-light .main-header .navbar .nav .open>a:focus{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-yellow-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-yellow-light .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-yellow-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-yellow-light .main-header .navbar .sidebar-toggle:hover{background-color:#e08e0b}@media (max-width:767px){.skin-yellow-light .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-yellow-light .main-header .navbar .dropdown-menu li a{color:#fff}.skin-yellow-light .main-header .navbar .dropdown-menu li a:hover{background:#e08e0b}}.skin-yellow-light .main-header .logo{background-color:#f39c12;color:#fff;border-bottom:0 solid transparent}.skin-yellow-light .main-header .logo:hover{background-color:#f39a0d}.skin-yellow-light .main-header li.user-header{background-color:#f39c12}.skin-yellow-light .content-header{background:transparent}.skin-yellow-light .wrapper,.skin-yellow-light .main-sidebar,.skin-yellow-light .left-side{background-color:#f9fafc}.skin-yellow-light .content-wrapper,.skin-yellow-light .main-footer{border-left:1px solid #d2d6de}.skin-yellow-light .user-panel>.info,.skin-yellow-light .user-panel>.info>a{color:#444}.skin-yellow-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-yellow-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-yellow-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-yellow-light .sidebar-menu>li:hover>a,.skin-yellow-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-yellow-light .sidebar-menu>li.active{border-left-color:#f39c12}.skin-yellow-light .sidebar-menu>li.active>a{font-weight:600}.skin-yellow-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-yellow-light .sidebar a{color:#444}.skin-yellow-light .sidebar a:hover{text-decoration:none}.skin-yellow-light .treeview-menu>li>a{color:#777}.skin-yellow-light .treeview-menu>li.active>a,.skin-yellow-light .treeview-menu>li>a:hover{color:#000}.skin-yellow-light .treeview-menu>li.active>a{font-weight:600}.skin-yellow-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-yellow-light .sidebar-form input[type="text"],.skin-yellow-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.skin-yellow-light .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px !important;border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;border-bottom-left-radius:2px !important}.skin-yellow-light .sidebar-form input[type="text"]:focus,.skin-yellow-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-yellow-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-yellow-light .sidebar-form .btn{color:#999;border-top-left-radius:0 !important;border-top-right-radius:2px !important;border-bottom-right-radius:2px !important;border-bottom-left-radius:0 !important}@media (min-width:768px){.skin-yellow-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}
|
||||
1
hourglass/packages/meteor-admin-lte/css/skins/skin-yellow.min.css
vendored
Normal file
1
hourglass/packages/meteor-admin-lte/css/skins/skin-yellow.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.skin-yellow .main-header .navbar{background-color:#f39c12}.skin-yellow .main-header .navbar .nav>li>a{color:#fff}.skin-yellow .main-header .navbar .nav>li>a:hover,.skin-yellow .main-header .navbar .nav>li>a:active,.skin-yellow .main-header .navbar .nav>li>a:focus,.skin-yellow .main-header .navbar .nav .open>a,.skin-yellow .main-header .navbar .nav .open>a:hover,.skin-yellow .main-header .navbar .nav .open>a:focus{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-yellow .main-header .navbar .sidebar-toggle{color:#fff}.skin-yellow .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-yellow .main-header .navbar .sidebar-toggle{color:#fff}.skin-yellow .main-header .navbar .sidebar-toggle:hover{background-color:#e08e0b}@media (max-width:767px){.skin-yellow .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-yellow .main-header .navbar .dropdown-menu li a{color:#fff}.skin-yellow .main-header .navbar .dropdown-menu li a:hover{background:#e08e0b}}.skin-yellow .main-header .logo{background-color:#e08e0b;color:#fff;border-bottom:0 solid transparent}.skin-yellow .main-header .logo:hover{background-color:#db8b0b}.skin-yellow .main-header li.user-header{background-color:#f39c12}.skin-yellow .content-header{background:transparent}.skin-yellow .wrapper,.skin-yellow .main-sidebar,.skin-yellow .left-side{background-color:#222d32}.skin-yellow .user-panel>.info,.skin-yellow .user-panel>.info>a{color:#fff}.skin-yellow .sidebar-menu>li.header{color:#4b646f;background:#1a2226}.skin-yellow .sidebar-menu>li>a{border-left:3px solid transparent}.skin-yellow .sidebar-menu>li:hover>a,.skin-yellow .sidebar-menu>li.active>a{color:#fff;background:#1e282c;border-left-color:#f39c12}.skin-yellow .sidebar-menu>li>.treeview-menu{margin:0 1px;background:#2c3b41}.skin-yellow .sidebar a{color:#b8c7ce}.skin-yellow .sidebar a:hover{text-decoration:none}.skin-yellow .treeview-menu>li>a{color:#8aa4af}.skin-yellow .treeview-menu>li.active>a,.skin-yellow .treeview-menu>li>a:hover{color:#fff}.skin-yellow .sidebar-form{border-radius:3px;border:1px solid #374850;margin:10px 10px}.skin-yellow .sidebar-form input[type="text"],.skin-yellow .sidebar-form .btn{box-shadow:none;background-color:#374850;border:1px solid transparent;height:35px;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.skin-yellow .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px !important;border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;border-bottom-left-radius:2px !important}.skin-yellow .sidebar-form input[type="text"]:focus,.skin-yellow .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-yellow .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-yellow .sidebar-form .btn{color:#999;border-top-left-radius:0 !important;border-top-right-radius:2px !important;border-bottom-right-radius:2px !important;border-bottom-left-radius:0 !important}
|
||||
37
hourglass/packages/meteor-admin-lte/package.js
Normal file
37
hourglass/packages/meteor-admin-lte/package.js
Normal file
@ -0,0 +1,37 @@
|
||||
Package.describe({
|
||||
name: 'mfactory:admin-lte',
|
||||
version: '0.0.2',
|
||||
summary: 'AdminLTE dashboard theme',
|
||||
git: 'https://github.com/meteor-factory/meteor-admin-lte.git',
|
||||
documentation: 'README.md'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.1.0.2');
|
||||
|
||||
api.use([
|
||||
'templating',
|
||||
'reactive-var'
|
||||
], 'client');
|
||||
|
||||
api.addFiles([
|
||||
'admin-lte.html',
|
||||
'admin-lte.js'
|
||||
], 'client');
|
||||
|
||||
api.addFiles([
|
||||
'css/AdminLTE.min.css',
|
||||
'css/skins/skin-black-light.min.css',
|
||||
'css/skins/skin-black.min.css',
|
||||
'css/skins/skin-blue-light.min.css',
|
||||
'css/skins/skin-blue.min.css',
|
||||
'css/skins/skin-green-light.min.css',
|
||||
'css/skins/skin-green.min.css',
|
||||
'css/skins/skin-purple-light.min.css',
|
||||
'css/skins/skin-purple.min.css',
|
||||
'css/skins/skin-red-light.min.css',
|
||||
'css/skins/skin-red.min.css',
|
||||
'css/skins/skin-yellow-light.min.css',
|
||||
'css/skins/skin-yellow.min.css'
|
||||
], 'client', { isAsset: true });
|
||||
});
|
||||
674
hourglass/packages/meteor-admin/LICENSE
Normal file
674
hourglass/packages/meteor-admin/LICENSE
Normal file
@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
{one line to give the program's name and a brief idea of what it does.}
|
||||
Copyright (C) {year} {name of author}
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
{project} Copyright (C) {year} {fullname}
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
@ -0,0 +1,77 @@
|
||||
AdminDashboard =
|
||||
schemas: {}
|
||||
sidebarItems: []
|
||||
collectionItems: []
|
||||
alertSuccess: (message)->
|
||||
Session.set 'adminSuccess', message
|
||||
alertFailure: (message)->
|
||||
Session.set 'adminError', message
|
||||
|
||||
checkAdmin: ->
|
||||
if not Roles.userIsInRole Meteor.userId(), ['admin']
|
||||
Meteor.call 'adminCheckAdmin'
|
||||
if (typeof AdminConfig?.nonAdminRedirectRoute == "string")
|
||||
Router.go AdminConfig.nonAdminRedirectRoute
|
||||
if typeof @.next == 'function'
|
||||
@next()
|
||||
adminRoutes: ['adminDashboard','adminDashboardUsersNew','adminDashboardUsersEdit','adminDashboardView','adminDashboardNew','adminDashboardEdit']
|
||||
collectionLabel: (collection)->
|
||||
if collection == 'Users'
|
||||
'Users'
|
||||
else if collection? and typeof AdminConfig.collections[collection]?.label == 'string'
|
||||
AdminConfig.collections[collection].label
|
||||
else Session.get 'admin_collection_name'
|
||||
|
||||
addSidebarItem: (title, url, options) ->
|
||||
item = title: title
|
||||
if _.isObject(url) and typeof options == 'undefined'
|
||||
item.options = url
|
||||
else
|
||||
item.url = url
|
||||
item.options = options
|
||||
|
||||
@sidebarItems.push item
|
||||
|
||||
extendSidebarItem: (title, urls) ->
|
||||
if _.isObject(urls) then urls = [urls]
|
||||
|
||||
existing = _.find @sidebarItems, (item) -> item.title == title
|
||||
if existing
|
||||
existing.options.urls = _.union existing.options.urls, urls
|
||||
|
||||
addCollectionItem: (fn) ->
|
||||
@collectionItems.push fn
|
||||
|
||||
path: (s) ->
|
||||
path = '/admin'
|
||||
if typeof s == 'string' and s.length > 0
|
||||
path += (if s[0] == '/' then '' else '/') + s
|
||||
path
|
||||
|
||||
|
||||
AdminDashboard.schemas.newUser = new SimpleSchema
|
||||
email:
|
||||
type: String
|
||||
label: "Email address"
|
||||
chooseOwnPassword:
|
||||
type: Boolean
|
||||
label: 'Let this user choose their own password with an email'
|
||||
defaultValue: true
|
||||
password:
|
||||
type: String
|
||||
label: 'Password'
|
||||
optional: true
|
||||
sendPassword:
|
||||
type: Boolean
|
||||
label: 'Send this user their password by email'
|
||||
optional: true
|
||||
|
||||
AdminDashboard.schemas.sendResetPasswordEmail = new SimpleSchema
|
||||
_id:
|
||||
type: String
|
||||
|
||||
AdminDashboard.schemas.changePassword = new SimpleSchema
|
||||
_id:
|
||||
type: String
|
||||
password:
|
||||
type: String
|
||||
@ -0,0 +1 @@
|
||||
@AdminCollectionsCount = new Mongo.Collection 'adminCollectionsCount'
|
||||
80
hourglass/packages/meteor-admin/lib/both/router.coffee
Normal file
80
hourglass/packages/meteor-admin/lib/both/router.coffee
Normal file
@ -0,0 +1,80 @@
|
||||
@AdminController = RouteController.extend
|
||||
layoutTemplate: 'AdminLayout'
|
||||
waitOn: ->
|
||||
[
|
||||
Meteor.subscribe 'adminUsers'
|
||||
Meteor.subscribe 'adminUser'
|
||||
Meteor.subscribe 'adminCollectionsCount'
|
||||
]
|
||||
onBeforeAction: ->
|
||||
Session.set 'adminSuccess', null
|
||||
Session.set 'adminError', null
|
||||
|
||||
Session.set 'admin_title', ''
|
||||
Session.set 'admin_subtitle', ''
|
||||
Session.set 'admin_collection_page', null
|
||||
Session.set 'admin_collection_name', null
|
||||
Session.set 'admin_id', null
|
||||
Session.set 'admin_doc', null
|
||||
|
||||
if not Roles.userIsInRole Meteor.userId(), ['admin']
|
||||
Meteor.call 'adminCheckAdmin'
|
||||
if typeof AdminConfig?.nonAdminRedirectRoute == 'string'
|
||||
Router.go AdminConfig.nonAdminRedirectRoute
|
||||
|
||||
@next()
|
||||
|
||||
|
||||
Router.route "adminDashboard",
|
||||
path: "/admin"
|
||||
template: "AdminDashboard"
|
||||
controller: "AdminController"
|
||||
action: ->
|
||||
@render()
|
||||
onAfterAction: ->
|
||||
Session.set 'admin_title', 'Dashboard'
|
||||
Session.set 'admin_collection_name', ''
|
||||
Session.set 'admin_collection_page', ''
|
||||
|
||||
Router.route "adminDashboardUsersView",
|
||||
path: "/admin/Users"
|
||||
template: "AdminDashboardView"
|
||||
controller: "AdminController"
|
||||
action: ->
|
||||
@render()
|
||||
data: ->
|
||||
admin_table: AdminTables.Users
|
||||
onAfterAction: ->
|
||||
Session.set 'admin_title', 'Users'
|
||||
Session.set 'admin_subtitle', 'View'
|
||||
Session.set 'admin_collection_name', 'Users'
|
||||
|
||||
Router.route "adminDashboardUsersNew",
|
||||
path: "/admin/Users/new"
|
||||
template: "AdminDashboardUsersNew"
|
||||
controller: 'AdminController'
|
||||
action: ->
|
||||
@render()
|
||||
onAfterAction: ->
|
||||
Session.set 'admin_title', 'Users'
|
||||
Session.set 'admin_subtitle', 'Create new user'
|
||||
Session.set 'admin_collection_page', 'New'
|
||||
Session.set 'admin_collection_name', 'Users'
|
||||
|
||||
Router.route "adminDashboardUsersEdit",
|
||||
path: "/admin/Users/:_id/edit"
|
||||
template: "AdminDashboardUsersEdit"
|
||||
controller: "AdminController"
|
||||
data: ->
|
||||
user: Meteor.users.find(@params._id).fetch()
|
||||
roles: Roles.getRolesForUser @params._id
|
||||
otherRoles: _.difference _.map(Meteor.roles.find().fetch(), (role) -> role.name), Roles.getRolesForUser(@params._id)
|
||||
action: ->
|
||||
@render()
|
||||
onAfterAction: ->
|
||||
Session.set 'admin_title', 'Users'
|
||||
Session.set 'admin_subtitle', 'Edit user ' + @params._id
|
||||
Session.set 'admin_collection_page', 'edit'
|
||||
Session.set 'admin_collection_name', 'Users'
|
||||
Session.set 'admin_id', @params._id
|
||||
Session.set 'admin_doc', Meteor.users.findOne({_id:@params._id})
|
||||
211
hourglass/packages/meteor-admin/lib/both/startup.coffee
Normal file
211
hourglass/packages/meteor-admin/lib/both/startup.coffee
Normal file
@ -0,0 +1,211 @@
|
||||
@AdminTables = {}
|
||||
|
||||
adminTablesDom = '<"box"<"box-header"<"box-toolbar"<"pull-left"<lf>><"pull-right"p>>><"box-body"t>><r>'
|
||||
|
||||
adminEditButton = {
|
||||
data: '_id'
|
||||
title: 'Edit'
|
||||
createdCell: (node, cellData, rowData) ->
|
||||
$(node).html(Blaze.toHTMLWithData Template.adminEditBtn, {_id: cellData})
|
||||
width: '40px'
|
||||
orderable: false
|
||||
}
|
||||
adminDelButton = {
|
||||
data: '_id'
|
||||
title: 'Delete'
|
||||
createdCell: (node, cellData, rowData) ->
|
||||
$(node).html(Blaze.toHTMLWithData Template.adminDeleteBtn, {_id: cellData})
|
||||
width: '40px'
|
||||
orderable: false
|
||||
}
|
||||
|
||||
adminEditDelButtons = [
|
||||
adminEditButton,
|
||||
adminDelButton
|
||||
]
|
||||
|
||||
defaultColumns = () -> [
|
||||
data: '_id',
|
||||
title: 'ID'
|
||||
]
|
||||
|
||||
adminTablePubName = (collection) ->
|
||||
"admin_tabular_#{collection}"
|
||||
|
||||
adminCreateTables = (collections) ->
|
||||
_.each AdminConfig?.collections, (collection, name) ->
|
||||
_.defaults collection, {
|
||||
showEditColumn: true
|
||||
showDelColumn: true
|
||||
showInSideBar: true
|
||||
}
|
||||
|
||||
columns = _.map collection.tableColumns, (column) ->
|
||||
if column.template
|
||||
createdCell = (node, cellData, rowData) ->
|
||||
$(node).html ''
|
||||
Blaze.renderWithData(Template[column.template], {value: cellData, doc: rowData}, node)
|
||||
|
||||
data: column.name
|
||||
title: column.label
|
||||
createdCell: createdCell
|
||||
|
||||
if columns.length == 0
|
||||
columns = defaultColumns()
|
||||
|
||||
if collection.showEditColumn
|
||||
columns.push(adminEditButton)
|
||||
if collection.showDelColumn
|
||||
columns.push(adminDelButton)
|
||||
|
||||
AdminTables[name] = new Tabular.Table
|
||||
name: name
|
||||
collection: adminCollectionObject(name)
|
||||
pub: collection.children and adminTablePubName(name)
|
||||
sub: collection.sub
|
||||
columns: columns
|
||||
extraFields: collection.extraFields
|
||||
dom: adminTablesDom
|
||||
selector: collection.selector || ->
|
||||
return {}
|
||||
|
||||
adminCreateRoutes = (collections) ->
|
||||
_.each collections, adminCreateRouteView
|
||||
_.each collections, adminCreateRouteNew
|
||||
_.each collections, adminCreateRouteEdit
|
||||
|
||||
adminCreateRouteView = (collection, collectionName) ->
|
||||
Router.route "adminDashboard#{collectionName}View",
|
||||
adminCreateRouteViewOptions collection, collectionName
|
||||
|
||||
adminCreateRouteViewOptions = (collection, collectionName) ->
|
||||
options =
|
||||
path: "/admin/#{collectionName}"
|
||||
template: "AdminDashboardViewWrapper"
|
||||
controller: "AdminController"
|
||||
data: ->
|
||||
admin_table: AdminTables[collectionName]
|
||||
action: ->
|
||||
@render()
|
||||
onAfterAction: ->
|
||||
Session.set 'admin_title', collectionName
|
||||
Session.set 'admin_subtitle', 'View'
|
||||
Session.set 'admin_collection_name', collectionName
|
||||
collection.routes?.view?.onAfterAction
|
||||
_.defaults options, collection.routes?.view
|
||||
|
||||
adminCreateRouteNew = (collection, collectionName) ->
|
||||
Router.route "adminDashboard#{collectionName}New",
|
||||
adminCreateRouteNewOptions collection, collectionName
|
||||
|
||||
adminCreateRouteNewOptions = (collection, collectionName) ->
|
||||
options =
|
||||
path: "/admin/#{collectionName}/new"
|
||||
template: "AdminDashboardNew"
|
||||
controller: "AdminController"
|
||||
action: ->
|
||||
@render()
|
||||
onAfterAction: ->
|
||||
Session.set 'admin_title', AdminDashboard.collectionLabel collectionName
|
||||
Session.set 'admin_subtitle', 'Create new'
|
||||
Session.set 'admin_collection_page', 'new'
|
||||
Session.set 'admin_collection_name', collectionName
|
||||
collection.routes?.new?.onAfterAction
|
||||
data: ->
|
||||
admin_collection: adminCollectionObject collectionName
|
||||
_.defaults options, collection.routes?.new
|
||||
|
||||
adminCreateRouteEdit = (collection, collectionName) ->
|
||||
Router.route "adminDashboard#{collectionName}Edit",
|
||||
adminCreateRouteEditOptions collection, collectionName
|
||||
|
||||
adminCreateRouteEditOptions = (collection, collectionName) ->
|
||||
options =
|
||||
path: "/admin/#{collectionName}/:_id/edit"
|
||||
template: "AdminDashboardEdit"
|
||||
controller: "AdminController"
|
||||
waitOn: ->
|
||||
Meteor.subscribe 'adminCollectionDoc', collectionName, parseID(@params._id)
|
||||
collection.routes?.edit?.waitOn
|
||||
action: ->
|
||||
@render()
|
||||
onAfterAction: ->
|
||||
Session.set 'admin_title', AdminDashboard.collectionLabel collectionName
|
||||
Session.set 'admin_subtitle', 'Edit ' + @params._id
|
||||
Session.set 'admin_collection_page', 'edit'
|
||||
Session.set 'admin_collection_name', collectionName
|
||||
Session.set 'admin_id', parseID(@params._id)
|
||||
Session.set 'admin_doc', adminCollectionObject(collectionName).findOne _id : parseID(@params._id)
|
||||
collection.routes?.edit?.onAfterAction
|
||||
data: ->
|
||||
admin_collection: adminCollectionObject collectionName
|
||||
_.defaults options, collection.routes?.edit
|
||||
|
||||
adminPublishTables = (collections) ->
|
||||
_.each collections, (collection, name) ->
|
||||
if not collection.children then return undefined
|
||||
Meteor.publishComposite adminTablePubName(name), (tableName, ids, fields) ->
|
||||
check tableName, String
|
||||
check ids, Array
|
||||
check fields, Match.Optional Object
|
||||
|
||||
extraFields = _.reduce collection.extraFields, (fields, name) ->
|
||||
fields[name] = 1
|
||||
fields
|
||||
, {}
|
||||
_.extend fields, extraFields
|
||||
|
||||
@unblock()
|
||||
|
||||
find: ->
|
||||
@unblock()
|
||||
adminCollectionObject(name).find {_id: {$in: ids}}, {fields: fields}
|
||||
children: collection.children
|
||||
|
||||
Meteor.startup ->
|
||||
adminCreateTables AdminConfig?.collections
|
||||
adminCreateRoutes AdminConfig?.collections
|
||||
adminPublishTables AdminConfig?.collections if Meteor.isServer
|
||||
|
||||
if AdminTables.Users then return undefined
|
||||
|
||||
AdminTables.Users = new Tabular.Table
|
||||
# Modify selector to allow search by email
|
||||
changeSelector: (selector, userId) ->
|
||||
$or = selector['$or']
|
||||
$or and selector['$or'] = _.map $or, (exp) ->
|
||||
if exp.emails?['$regex']?
|
||||
emails: $elemMatch: address: exp.emails
|
||||
else
|
||||
exp
|
||||
selector
|
||||
|
||||
name: 'Users'
|
||||
collection: Meteor.users
|
||||
columns: _.union [
|
||||
{
|
||||
data: '_id'
|
||||
title: 'Admin'
|
||||
# TODO: use `tmpl`
|
||||
createdCell: (node, cellData, rowData) ->
|
||||
$(node).html(Blaze.toHTMLWithData Template.adminUsersIsAdmin, {_id: cellData})
|
||||
width: '40px'
|
||||
}
|
||||
{
|
||||
data: 'emails'
|
||||
title: 'Email'
|
||||
render: (value) ->
|
||||
value[0].address
|
||||
searchable: true
|
||||
}
|
||||
{
|
||||
data: 'emails'
|
||||
title: 'Mail'
|
||||
# TODO: use `tmpl`
|
||||
createdCell: (node, cellData, rowData) ->
|
||||
$(node).html(Blaze.toHTMLWithData Template.adminUsersMailBtn, {emails: cellData})
|
||||
width: '40px'
|
||||
}
|
||||
{ data: 'createdAt', title: 'Joined' }
|
||||
], adminEditDelButtons
|
||||
dom: adminTablesDom
|
||||
38
hourglass/packages/meteor-admin/lib/both/utils.coffee
Normal file
38
hourglass/packages/meteor-admin/lib/both/utils.coffee
Normal file
@ -0,0 +1,38 @@
|
||||
@adminCollectionObject = (collection) ->
|
||||
if typeof AdminConfig.collections[collection] != 'undefined' and typeof AdminConfig.collections[collection].collectionObject != 'undefined'
|
||||
AdminConfig.collections[collection].collectionObject
|
||||
else
|
||||
lookup collection
|
||||
|
||||
@adminCallback = (name, args, callback) ->
|
||||
stop = false
|
||||
if typeof AdminConfig?.callbacks?[name] == 'function'
|
||||
stop = AdminConfig.callbacks[name](args...) is false
|
||||
if typeof callback == 'function'
|
||||
callback args... unless stop
|
||||
|
||||
@lookup = (obj, root, required=true) ->
|
||||
if typeof root == 'undefined'
|
||||
root = if Meteor.isServer then global else window
|
||||
if typeof obj == 'string'
|
||||
ref = root
|
||||
arr = obj.split '.'
|
||||
continue while arr.length and (ref = ref[arr.shift()])
|
||||
if not ref and required
|
||||
throw new Error(obj + ' is not in the ' + root.toString())
|
||||
else
|
||||
return ref
|
||||
return obj
|
||||
|
||||
@parseID = (id) ->
|
||||
if typeof id == 'string'
|
||||
if(id.indexOf("ObjectID") > -1)
|
||||
return new Mongo.ObjectID(id.slice(id.indexOf('"') + 1,id.lastIndexOf('"')))
|
||||
else
|
||||
return id
|
||||
else
|
||||
return id
|
||||
|
||||
@parseIDs = (ids) ->
|
||||
return _.map ids, (id) ->
|
||||
parseID id
|
||||
@ -0,0 +1,97 @@
|
||||
.admin-alert
|
||||
{
|
||||
margin-left: 0px !important;
|
||||
}
|
||||
|
||||
.admin-layout
|
||||
{
|
||||
th.admin-sortable
|
||||
{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.header
|
||||
{
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.dataTables_wrapper {
|
||||
position: relative !important;
|
||||
|
||||
table.dataTable {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
table.dataTable > tbody > tr > td {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
table.dataTable > thead:first-child > tr:first-child > th,
|
||||
table.dataTable > tbody > tr:nth-child(even) > td {
|
||||
background-color: #f3f4f5 !important;
|
||||
}
|
||||
|
||||
table.dataTable > thead:first-child > tr:first-child > th {
|
||||
border-bottom: none !important;
|
||||
padding: 8px
|
||||
}
|
||||
|
||||
table.dataTable > thead > tr:first-child > th,
|
||||
table.dataTable > tbody > tr > td {
|
||||
border-top: 1px solid #ddd !important;
|
||||
}
|
||||
|
||||
.box-body {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.box > .box-header {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.box-toolbar {
|
||||
padding: 10px;
|
||||
|
||||
.pull-left {
|
||||
min-width: 310px;
|
||||
}
|
||||
|
||||
.dataTables_filter,
|
||||
.dataTables_length {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.dataTables_length {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.dataTables_filter input {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
div.dataTables_processing {
|
||||
position: absolute !important;
|
||||
top: 0;
|
||||
left: 0;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
z-index: 99999991;
|
||||
line-height: 100%;
|
||||
font-size: 0;
|
||||
|
||||
&:after {
|
||||
content: 'Loading...';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
font-size: 35px;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
<template name="AdminHeader">
|
||||
<header class="main-header">
|
||||
<a href="/admin" class="logo">
|
||||
{{#if AdminConfig.name}}
|
||||
{{AdminConfig.name}}
|
||||
{{else}}
|
||||
Admin
|
||||
{{/if}}
|
||||
</a>
|
||||
<nav class="navbar navbar-static-top" role="navigation">
|
||||
<!-- Sidebar toggle button-->
|
||||
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</a>
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
{{#if AdminConfig.dashboard.homeUrl}}
|
||||
<a href="{{AdminConfig.dashboard.homeUrl}}">Home</a>
|
||||
{{else}}
|
||||
<a href="/">Home</a>
|
||||
{{/if}}
|
||||
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span>Admin<i class="caret"></i></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="">
|
||||
<a href="{{pathFor 'adminDashboardUsersEdit' _id=currentUser._id}}">
|
||||
Your profile
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="#" class="btn-sign-out">Sign out
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
</template>
|
||||
@ -0,0 +1,102 @@
|
||||
<template name="AdminLayout">
|
||||
{{#if AdminConfig}}
|
||||
{{#if isInRole 'admin'}}
|
||||
<div class="admin-layout">
|
||||
{{# AdminLTE skin=admin_skin }}
|
||||
{{> AdminHeader }}
|
||||
{{> AdminSidebar }}
|
||||
<div class="content-wrapper" style="min-height: {{minHeight}}">
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
{{$.Session.get 'admin_title'}}
|
||||
<small>{{$.Session.get 'admin_subtitle'}}</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="/admin/">Dashboard</a></li>
|
||||
{{#if $.Session.get 'admin_collection_name'}}
|
||||
<li><a href="/admin/{{$.Session.get 'admin_collection_name'}}/">
|
||||
{{adminCollectionLabel admin_collection_name}}
|
||||
</a></li>
|
||||
{{/if}}
|
||||
|
||||
{{#if $.Session.equals 'admin_collection_page' 'new'}}
|
||||
<li>New</li>
|
||||
{{/if}}
|
||||
|
||||
{{#if $.Session.equals 'admin_collection_page' 'edit'}}
|
||||
<li>Edit</li>
|
||||
{{/if}}
|
||||
</ol>
|
||||
</section>
|
||||
<section class="content">
|
||||
{{> yield }}
|
||||
</section>
|
||||
</div>
|
||||
{{/ AdminLTE }}
|
||||
</div>
|
||||
{{> AdminDeleteModal }}
|
||||
{{else}}
|
||||
{{> NotAdmin}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{> NoConfig}}
|
||||
{{/if}}
|
||||
</template>
|
||||
|
||||
<template name="AdminDeleteModal">
|
||||
<div class="modal fade" id="admin-delete-modal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">Confirm delete</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Are you sure you want to delete this?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" id="confirm-delete" class="btn btn-danger">Delete</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
</template>
|
||||
|
||||
<template name="NotAdmin">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<p class="alert alert-info" style="margin-top:100px;">
|
||||
You need to be an admin to view this page
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template name="NoConfig">
|
||||
<p class="alert alert-info">
|
||||
You need to define an AdminConfig object to use the admin dashboard.
|
||||
<br/>
|
||||
A basic config to manage the 'Posts' and 'Comments' collection would look like this:
|
||||
<br/>
|
||||
<code>
|
||||
AdminConfig = {
|
||||
<br/>
|
||||
adminEmails: [' ben@code2create.com'],
|
||||
<br/>
|
||||
collections:
|
||||
<br/>
|
||||
{
|
||||
<br/>
|
||||
Posts: {},
|
||||
<br/>
|
||||
Comments: {}
|
||||
<br/>
|
||||
}
|
||||
<br/>
|
||||
}
|
||||
</code>
|
||||
</p>
|
||||
</template>
|
||||
@ -0,0 +1,66 @@
|
||||
<template name="AdminSidebar">
|
||||
<aside class="main-sidebar">
|
||||
<div class="sidebar">
|
||||
<ul class="sidebar-menu">
|
||||
<li class="{{isActiveRoute 'adminDashboard'}}">
|
||||
<a href="{{pathFor 'adminDashboard'}}">
|
||||
<i class="fa fa-dashboard"></i> <span>Dashboard</span>
|
||||
</a>
|
||||
</li>
|
||||
{{#each admin_collections}}
|
||||
{{#unless $eq showInSideBar false}}
|
||||
<li class="treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-{{this.icon}}"></i>
|
||||
<span>{{this.label}}</span>
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li class="{{isActivePath path=newPath}}"><a href="{{newPath}}"><i class="fa fa-angle-double-right"></i> New</a></li>
|
||||
<li class="{{isActivePath path=viewPath}}"><a href="{{viewPath}}"><i class="fa fa-angle-double-right"></i> View All</a></li>
|
||||
{{#each admin_collection_items}}
|
||||
<li class="{{isActivePath path=url}}"><a href="{{url}}"><i class="fa fa-angle-double-right"></i> {{title}}</a></li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</li>
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
{{#each admin_sidebar_items}}
|
||||
{{#if options.urls}}
|
||||
{{> adminSidebarItemTree}}
|
||||
{{else}}
|
||||
{{> adminSidebarItem}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
</aside>
|
||||
</template>
|
||||
|
||||
<template name="adminSidebarItem">
|
||||
<li class="{{isActivePath path=url}}">
|
||||
<a href="{{url}}">
|
||||
{{#if options.icon}}
|
||||
<i class="fa fa-{{options.icon}}"></i>
|
||||
{{/if}}
|
||||
<span>{{title}}</span>
|
||||
</a>
|
||||
</li>
|
||||
</template>
|
||||
|
||||
<template name="adminSidebarItemTree">
|
||||
<li class="treeview">
|
||||
<a href="#">
|
||||
{{#if options.icon}}
|
||||
<i class="fa fa-{{options.icon}}"></i>
|
||||
{{/if}}
|
||||
<span>{{title}}</span>
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
{{#each options.urls}}
|
||||
<li class="{{isActivePath path=url}}"><a href="{{url}}"><i class="fa fa-angle-double-right"></i>{{title}}</a></li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</li>
|
||||
</template>
|
||||
@ -0,0 +1,166 @@
|
||||
<template name="AdminDashboard">
|
||||
{{#each adminWidgets}}
|
||||
{{> UI.dynamic template=template data=data}}
|
||||
{{else}}
|
||||
{{> adminDefaultWidgets}}
|
||||
{{/each}}
|
||||
</template>
|
||||
|
||||
<template name="AdminDashboardNew">
|
||||
{{> adminAlert}}
|
||||
{{#if adminTemplate admin_collection_name 'new'}}
|
||||
{{#with adminTemplate admin_collection_name 'new'}}
|
||||
{{> UI.dynamic template=name data=data }}
|
||||
{{/with}}
|
||||
{{else}}
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
{{> quickForm id="admin_insert" collection=admin_collection fields=admin_fields omitFields=admin_omit_fields buttonContent='Create'}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</template>
|
||||
|
||||
<template name="AdminDashboardEdit">
|
||||
{{> adminAlert}}
|
||||
{{#if adminTemplate admin_collection_name 'edit'}}
|
||||
{{#with adminTemplate admin_collection_name 'edit'}}
|
||||
{{> UI.dynamic template=name data=data }}
|
||||
{{/with}}
|
||||
{{else}}
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
{{#if admin_current_doc}}
|
||||
{{> quickForm id="admin_update" collection=admin_collection doc=admin_current_doc fields=admin_fields omitFields=admin_omit_fields buttonContent='Update'}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</template>
|
||||
|
||||
<template name="AdminDashboardViewWrapper">
|
||||
<div></div>
|
||||
{{! This template is used to manually re-render AdminDashboardView on route transition }}
|
||||
</template>
|
||||
|
||||
<template name="AdminDashboardView">
|
||||
{{> adminAlert}}
|
||||
{{#if adminTemplate admin_collection_name 'view'}}
|
||||
{{#with adminTemplate admin_collection_name 'view'}}
|
||||
{{> UI.dynamic template=name data=data }}
|
||||
{{/with}}
|
||||
{{else}}
|
||||
{{#if hasDocuments}}
|
||||
{{> tabular table=admin_table class="table dataTable"}}
|
||||
{{else}}
|
||||
<div class="alert alert-info">
|
||||
<p>There are no visible items in this collection.</p>
|
||||
<p><a href="{{newPath}}" class="btn btn-primary"><i class="fa fa-plus"></i> Add one</a></p>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</template>
|
||||
|
||||
<template name="AdminDashboardUsersNew">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
{{> adminAlert}}
|
||||
{{# autoForm id="adminNewUser" schema=AdminSchemas.newUser type="method" meteormethod="adminNewUser"}}
|
||||
|
||||
{{>afQuickField name="email"}}
|
||||
{{>afQuickField name="chooseOwnPassword"}}
|
||||
|
||||
{{#if afFieldValueIs name="chooseOwnPassword" value=false}}
|
||||
|
||||
{{>afQuickField name="password"}}
|
||||
{{>afQuickField name="sendPassword"}}
|
||||
|
||||
{{/if}}
|
||||
|
||||
<button type="submit" class="btn btn-primary">Add User</button>
|
||||
|
||||
{{/autoForm}}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template name="AdminDashboardUsersEdit">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
{{> adminAlert}}
|
||||
{{#if adminGetUserSchema}}
|
||||
{{> quickForm id="adminUpdateUser" buttonContent="Update" buttonClasses="btn btn-primary btn-sm" collection=adminGetUsers schema=adminGetUserSchema doc=admin_current_doc omitFields="roles,services"}}
|
||||
<hr/>
|
||||
{{/if}}
|
||||
|
||||
<h4>User Roles</h4>
|
||||
{{#each roles}}
|
||||
<button class="btn btn-primary btn-xs btn-remove-role" role="{{this}}" user="{{admin_current_id}}">{{this}}</button>
|
||||
{{/each}}
|
||||
{{#each otherRoles}}
|
||||
<button class="btn btn-default btn-xs btn-add-role" role="{{this}}" user="{{admin_current_id}}">{{this}}</button>
|
||||
{{/each}}
|
||||
{{#if roles}}
|
||||
<p style="margin-top:5px;">Click a role to toggle it.</p>
|
||||
{{else}}
|
||||
<p>User not in any roles. Click a role to add it to a user.</p>
|
||||
{{/if}}
|
||||
|
||||
<hr/>
|
||||
<h4>Reset Password</h4>
|
||||
{{#autoForm id="adminSendResetPasswordEmail" schema=AdminSchemas.sendResetPasswordEmail type="method" meteormethod="adminSendResetPasswordEmail"}}
|
||||
<div class="form-group hidden">
|
||||
<label class="control-label" for="title">ID</label>
|
||||
<input value="{{admin_current_id}}" type="text" name="_id" omitfields="createdAtupdatedAt" required="" data-schema-key="_id" class="form-control" autocomplete="off" />
|
||||
<span class="help-block"></span>
|
||||
</div>
|
||||
<p>Send a reset password email to {{admin_current_doc.emails.[0].address}}</p>
|
||||
<button type="submit" class="btn btn-primary btn-sm">Send Email</button>
|
||||
{{/autoForm}}
|
||||
|
||||
<hr/>
|
||||
<h4>Change Password</h4>
|
||||
{{#autoForm id="adminChangePassword" schema=AdminSchemas.changePassword type="method" meteormethod="adminChangePassword"}}
|
||||
<div class="form-group hidden">
|
||||
<label class="control-label" for="title">ID</label>
|
||||
<input value="{{admin_current_id}}" type="text" name="_id" omitfields="createdAtupdatedAt" required="" data-schema-key="_id" class="form-control" autocomplete="off" />
|
||||
<span class="help-block"></span>
|
||||
</div>
|
||||
{{>afQuickField name="password"}}
|
||||
<button type="submit" class="btn btn-primary btn-sm">Change Password</button>
|
||||
{{/autoForm}}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template name="adminAlert">
|
||||
{{#if $.Session.get 'adminSuccess'}}
|
||||
<div class="alert alert-success admin-alert">
|
||||
{{$.Session.get 'adminSuccess'}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if $.Session.get 'adminError'}}
|
||||
<div class="alert alert-danger admin-alert">
|
||||
{{$.Session.get 'adminError'}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</template>
|
||||
|
||||
<template name="adminUsersIsAdmin">
|
||||
{{#if adminIsUserInRole this._id 'admin'}}<i class="fa fa-check"></i>{{/if}}
|
||||
</template>
|
||||
|
||||
<template name="adminUsersMailBtn">
|
||||
<a href="mailto:{{adminUserEmail this}}" class="btn btn-default btn-xs"><i class="fa fa-envelope"></i></a>
|
||||
</template>
|
||||
|
||||
<template name="adminEditBtn">
|
||||
<a href="{{path}}" class="hidden-xs btn btn-xs btn-primary"><i class="fa fa-pencil"></i></a>
|
||||
<a href="{{path}}" class="visible-xs btn btn-sm btn-primary"><i class="fa fa-pencil"></i> Edit</a>
|
||||
</template>
|
||||
|
||||
<template name="adminDeleteBtn">
|
||||
<a data-toggle="modal" doc="{{_id}}" href='#admin-delete-modal' class="hidden-xs btn btn-xs btn-danger btn-delete"><i class="fa fa-times" doc="{{_id}}"></i></a>
|
||||
<a data-toggle="modal" doc="{{_id}}" href='#admin-delete-modal' class="visible-xs btn btn-sm btn-danger btn-delete"><i class="fa fa-times" doc="{{_id}}"></i> Delete</a>
|
||||
</template>
|
||||
@ -0,0 +1,32 @@
|
||||
<template name="adminDefaultWidgets">
|
||||
{{#each admin_collections}}
|
||||
{{#unless $eq showWidget false}}
|
||||
{{> adminCollectionWidget collection=name}}
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
</template>
|
||||
|
||||
<template name="adminCollectionWidget">
|
||||
<div class="{{#if class}}{{class}}{{else}}col-lg-3 col-xs-6{{/if}}">
|
||||
{{#with adminGetCollection collection}}
|
||||
<a href="/admin/{{this.name}}">
|
||||
<div class="small-box bg-{{color}}">
|
||||
<div class="inner">
|
||||
<h3>
|
||||
{{adminCollectionCount name}}
|
||||
</h3>
|
||||
<p>
|
||||
{{this.label}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-{{this.icon}}"></i>
|
||||
</div>
|
||||
<a class="small-box-footer">
|
||||
See all <i class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</a>
|
||||
{{/with}}
|
||||
</div>
|
||||
</template>
|
||||
@ -0,0 +1,32 @@
|
||||
Template.AdminLayout.created = function () {
|
||||
var self = this;
|
||||
|
||||
self.minHeight = new ReactiveVar(
|
||||
$(window).height() - $('.main-header').height());
|
||||
|
||||
$(window).resize(function () {
|
||||
self.minHeight.set($(window).height() - $('.main-header').height());
|
||||
});
|
||||
|
||||
$('body').addClass('fixed');
|
||||
};
|
||||
|
||||
Template.AdminLayout.destroyed = function () {
|
||||
$('body').removeClass('fixed');
|
||||
};
|
||||
|
||||
Template.AdminLayout.helpers({
|
||||
minHeight: function () {
|
||||
return Template.instance().minHeight.get() + 'px'
|
||||
}
|
||||
});
|
||||
|
||||
dataTableOptions = {
|
||||
"aaSorting": [],
|
||||
"bPaginate": true,
|
||||
"bLengthChange": false,
|
||||
"bFilter": true,
|
||||
"bSort": true,
|
||||
"bInfo": true,
|
||||
"bAutoWidth": false
|
||||
};
|
||||
@ -0,0 +1,64 @@
|
||||
# Add hooks used by many forms
|
||||
AutoForm.addHooks [
|
||||
'admin_insert',
|
||||
'admin_update',
|
||||
'adminNewUser',
|
||||
'adminUpdateUser',
|
||||
'adminSendResetPasswordEmail',
|
||||
'adminChangePassword'],
|
||||
beginSubmit: ->
|
||||
$('.btn-primary').addClass('disabled')
|
||||
endSubmit: ->
|
||||
$('.btn-primary').removeClass('disabled')
|
||||
onError: (formType, error)->
|
||||
AdminDashboard.alertFailure error.message
|
||||
|
||||
AutoForm.hooks
|
||||
admin_insert:
|
||||
onSubmit: (insertDoc, updateDoc, currentDoc)->
|
||||
hook = @
|
||||
Meteor.call 'adminInsertDoc', insertDoc, Session.get('admin_collection_name'), (e,r)->
|
||||
if e
|
||||
hook.done(e)
|
||||
else
|
||||
adminCallback 'onInsert', [Session.get 'admin_collection_name', insertDoc, updateDoc, currentDoc], (collection) ->
|
||||
hook.done null, collection
|
||||
return false
|
||||
onSuccess: (formType, collection)->
|
||||
AdminDashboard.alertSuccess 'Successfully created'
|
||||
Router.go "/admin/#{collection}"
|
||||
|
||||
admin_update:
|
||||
onSubmit: (insertDoc, updateDoc, currentDoc)->
|
||||
hook = @
|
||||
Meteor.call 'adminUpdateDoc', updateDoc, Session.get('admin_collection_name'), Session.get('admin_id'), (e,r)->
|
||||
if e
|
||||
hook.done(e)
|
||||
else
|
||||
adminCallback 'onUpdate', [Session.get 'admin_collection_name', insertDoc, updateDoc, currentDoc], (collection) ->
|
||||
hook.done null, collection
|
||||
return false
|
||||
onSuccess: (formType, collection)->
|
||||
AdminDashboard.alertSuccess 'Successfully updated'
|
||||
Router.go "/admin/#{collection}"
|
||||
|
||||
adminNewUser:
|
||||
onSuccess: (formType, result)->
|
||||
AdminDashboard.alertSuccess 'Created user'
|
||||
Router.go '/admin/Users'
|
||||
|
||||
adminUpdateUser:
|
||||
onSubmit: (insertDoc, updateDoc, currentDoc)->
|
||||
Meteor.call 'adminUpdateUser', updateDoc, Session.get('admin_id'), @done
|
||||
return false
|
||||
onSuccess: (formType, result)->
|
||||
AdminDashboard.alertSuccess 'Updated user'
|
||||
Router.go '/admin/Users'
|
||||
|
||||
adminSendResetPasswordEmail:
|
||||
onSuccess: (formType, result)->
|
||||
AdminDashboard.alertSuccess 'Email sent'
|
||||
|
||||
adminChangePassword:
|
||||
onSuccess: (operation, result, template)->
|
||||
AdminDashboard.alertSuccess 'Password reset'
|
||||
29
hourglass/packages/meteor-admin/lib/client/js/events.coffee
Normal file
29
hourglass/packages/meteor-admin/lib/client/js/events.coffee
Normal file
@ -0,0 +1,29 @@
|
||||
Template.AdminLayout.events
|
||||
'click .btn-delete': (e,t) ->
|
||||
_id = $(e.target).attr('doc')
|
||||
if Session.equals 'admin_collection_name', 'Users'
|
||||
Session.set 'admin_id', _id
|
||||
Session.set 'admin_doc', Meteor.users.findOne(_id)
|
||||
else
|
||||
Session.set 'admin_id', parseID(_id)
|
||||
Session.set 'admin_doc', adminCollectionObject(Session.get('admin_collection_name')).findOne(parseID(_id))
|
||||
|
||||
Template.AdminDeleteModal.events
|
||||
'click #confirm-delete': () ->
|
||||
collection = Session.get 'admin_collection_name'
|
||||
_id = Session.get 'admin_id'
|
||||
Meteor.call 'adminRemoveDoc', collection, _id, (e,r)->
|
||||
$('#admin-delete-modal').modal('hide')
|
||||
|
||||
Template.AdminDashboardUsersEdit.events
|
||||
'click .btn-add-role': (e,t) ->
|
||||
console.log 'adding user'
|
||||
Meteor.call 'adminAddUserToRole', $(e.target).attr('user'), $(e.target).attr('role')
|
||||
'click .btn-remove-role': (e,t) ->
|
||||
console.log 'removing user'
|
||||
Meteor.call 'adminRemoveUserToRole', $(e.target).attr('user'), $(e.target).attr('role')
|
||||
|
||||
Template.AdminHeader.events
|
||||
'click .btn-sign-out': () ->
|
||||
Meteor.logout ->
|
||||
Router.go(AdminConfig?.logoutRedirect or '/')
|
||||
113
hourglass/packages/meteor-admin/lib/client/js/helpers.coffee
Normal file
113
hourglass/packages/meteor-admin/lib/client/js/helpers.coffee
Normal file
@ -0,0 +1,113 @@
|
||||
Template.registerHelper('AdminTables', AdminTables);
|
||||
|
||||
adminCollections = ->
|
||||
collections = {}
|
||||
|
||||
if typeof AdminConfig != 'undefined' and typeof AdminConfig.collections == 'object'
|
||||
collections = AdminConfig.collections
|
||||
|
||||
collections.Users =
|
||||
collectionObject: Meteor.users
|
||||
icon: 'user'
|
||||
label: 'Users'
|
||||
|
||||
_.map collections, (obj, key) ->
|
||||
obj = _.extend obj, {name: key}
|
||||
obj = _.defaults obj, {label: key, icon: 'plus', color: 'blue'}
|
||||
obj = _.extend obj,
|
||||
viewPath: Router.path "adminDashboard#{key}View"
|
||||
newPath: Router.path "adminDashboard#{key}New"
|
||||
|
||||
UI.registerHelper 'AdminConfig', ->
|
||||
AdminConfig if typeof AdminConfig != 'undefined'
|
||||
|
||||
UI.registerHelper 'admin_skin', ->
|
||||
AdminConfig?.skin or 'blue'
|
||||
|
||||
UI.registerHelper 'admin_collections', adminCollections
|
||||
|
||||
UI.registerHelper 'admin_collection_name', ->
|
||||
Session.get 'admin_collection_name'
|
||||
|
||||
UI.registerHelper 'admin_current_id', ->
|
||||
Session.get 'admin_id'
|
||||
|
||||
UI.registerHelper 'admin_current_doc', ->
|
||||
Session.get 'admin_doc'
|
||||
|
||||
UI.registerHelper 'admin_is_users_collection', ->
|
||||
Session.get('admin_collection_name') == 'Users'
|
||||
|
||||
UI.registerHelper 'admin_sidebar_items', ->
|
||||
AdminDashboard.sidebarItems
|
||||
|
||||
UI.registerHelper 'admin_collection_items', ->
|
||||
items = []
|
||||
_.each AdminDashboard.collectionItems, (fn) =>
|
||||
item = fn @name, '/admin/' + @name
|
||||
if item?.title and item?.url
|
||||
items.push item
|
||||
items
|
||||
|
||||
UI.registerHelper 'admin_omit_fields', ->
|
||||
if typeof AdminConfig.autoForm != 'undefined' and typeof AdminConfig.autoForm.omitFields == 'object'
|
||||
global = AdminConfig.autoForm.omitFields
|
||||
if not Session.equals('admin_collection_name','Users') and typeof AdminConfig != 'undefined' and typeof AdminConfig.collections[Session.get 'admin_collection_name'].omitFields == 'object'
|
||||
collection = AdminConfig.collections[Session.get 'admin_collection_name'].omitFields
|
||||
if typeof global == 'object' and typeof collection == 'object'
|
||||
_.union global, collection
|
||||
else if typeof global == 'object'
|
||||
global
|
||||
else if typeof collection == 'object'
|
||||
collection
|
||||
|
||||
UI.registerHelper 'AdminSchemas', ->
|
||||
AdminDashboard.schemas
|
||||
|
||||
UI.registerHelper 'adminGetSkin', ->
|
||||
if typeof AdminConfig.dashboard != 'undefined' and typeof AdminConfig.dashboard.skin == 'string'
|
||||
AdminConfig.dashboard.skin
|
||||
else
|
||||
'blue'
|
||||
|
||||
UI.registerHelper 'adminIsUserInRole', (_id,role)->
|
||||
Roles.userIsInRole _id, role
|
||||
|
||||
UI.registerHelper 'adminGetUsers', ->
|
||||
Meteor.users
|
||||
|
||||
UI.registerHelper 'adminGetUserSchema', ->
|
||||
if _.has(AdminConfig, 'userSchema')
|
||||
schema = AdminConfig.userSchema
|
||||
else if typeof Meteor.users._c2 == 'object'
|
||||
schema = Meteor.users.simpleSchema()
|
||||
|
||||
return schema
|
||||
|
||||
UI.registerHelper 'adminCollectionLabel', (collection)->
|
||||
AdminDashboard.collectionLabel(collection) if collection?
|
||||
|
||||
UI.registerHelper 'adminCollectionCount', (collection)->
|
||||
if collection == 'Users'
|
||||
Meteor.users.find().count()
|
||||
else
|
||||
AdminCollectionsCount.findOne({collection: collection})?.count
|
||||
|
||||
UI.registerHelper 'adminTemplate', (collection, mode)->
|
||||
if collection?.toLowerCase() != 'users' && typeof AdminConfig?.collections?[collection]?.templates != 'undefined'
|
||||
AdminConfig.collections[collection].templates[mode]
|
||||
|
||||
UI.registerHelper 'adminGetCollection', (collection)->
|
||||
_.find adminCollections(), (item) -> item.name == collection
|
||||
|
||||
UI.registerHelper 'adminWidgets', ->
|
||||
if typeof AdminConfig.dashboard != 'undefined' and typeof AdminConfig.dashboard.widgets != 'undefined'
|
||||
AdminConfig.dashboard.widgets
|
||||
|
||||
UI.registerHelper 'adminUserEmail', (user) ->
|
||||
if user && user.emails && user.emails[0] && user.emails[0].address
|
||||
user.emails[0].address
|
||||
else if user && user.services && user.services.facebook && user.services.facebook.email
|
||||
user.services.facebook.email
|
||||
else if user && user.services && user.services.google && user.services.google.email
|
||||
user.services.google.email
|
||||
16
hourglass/packages/meteor-admin/lib/client/js/slim_scroll.js
Normal file
16
hourglass/packages/meteor-admin/lib/client/js/slim_scroll.js
Normal file
@ -0,0 +1,16 @@
|
||||
/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
|
||||
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
||||
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
||||
*
|
||||
* Version: 1.3.0
|
||||
*
|
||||
*/
|
||||
(function(f){jQuery.fn.extend({slimScroll:function(h){var a=f.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:0.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:0.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},h);this.each(function(){function r(d){if(s){d=d||
|
||||
window.event;var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);f(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&m(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function m(d,f,h){k=!1;var e=d,g=b.outerHeight()-c.outerHeight();f&&(e=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),e=Math.min(Math.max(e,0),g),e=0<d?Math.ceil(e):Math.floor(e),c.css({top:e+"px"}));l=parseInt(c.css("top"))/(b.outerHeight()-c.outerHeight());
|
||||
e=l*(b[0].scrollHeight-b.outerHeight());h&&(e=d,d=e/b[0].scrollHeight*b.outerHeight(),d=Math.min(Math.max(d,0),g),c.css({top:d+"px"}));b.scrollTop(e);b.trigger("slimscrolling",~~e);v();p()}function C(){window.addEventListener?(this.addEventListener("DOMMouseScroll",r,!1),this.addEventListener("mousewheel",r,!1),this.addEventListener("MozMousePixelScroll",r,!1)):document.attachEvent("onmousewheel",r)}function w(){u=Math.max(b.outerHeight()/b[0].scrollHeight*b.outerHeight(),D);c.css({height:u+"px"});
|
||||
var a=u==b.outerHeight()?"none":"block";c.css({display:a})}function v(){w();clearTimeout(A);l==~~l?(k=a.allowPageScroll,B!=l&&b.trigger("slimscroll",0==~~l?"top":"bottom")):k=!1;B=l;u>=b.outerHeight()?k=!0:(c.stop(!0,!0).fadeIn("fast"),a.railVisible&&g.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(A=setTimeout(function(){a.disableFadeOut&&s||(x||y)||(c.fadeOut("slow"),g.fadeOut("slow"))},1E3))}var s,x,y,A,z,u,l,B,D=30,k=!1,b=f(this);if(b.parent().hasClass(a.wrapperClass)){var n=b.scrollTop(),
|
||||
c=b.parent().find("."+a.barClass),g=b.parent().find("."+a.railClass);w();if(f.isPlainObject(h)){if("height"in h&&"auto"==h.height){b.parent().css("height","auto");b.css("height","auto");var q=b.parent().parent().height();b.parent().css("height",q);b.css("height",q)}if("scrollTo"in h)n=parseInt(a.scrollTo);else if("scrollBy"in h)n+=parseInt(a.scrollBy);else if("destroy"in h){c.remove();g.remove();b.unwrap();return}m(n,!1,!0)}}else{a.height="auto"==a.height?b.parent().height():a.height;n=f("<div></div>").addClass(a.wrapperClass).css({position:"relative",
|
||||
overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",width:a.width,height:a.height});var g=f("<div></div>").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=f("<div></div>").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?
|
||||
"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,WebkitBorderRadius:a.borderRadius,zIndex:99}),q="right"==a.position?{right:a.distance}:{left:a.distance};g.css(q);c.css(q);b.wrap(n);b.parent().append(c);b.parent().append(g);a.railDraggable&&c.bind("mousedown",function(a){var b=f(document);y=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);m(0,c.position().top,!1)});
|
||||
b.bind("mouseup.slimscroll",function(a){y=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",function(a){a.stopPropagation();a.preventDefault();return!1});g.hover(function(){v()},function(){p()});c.hover(function(){x=!0},function(){x=!1});b.hover(function(){s=!0;v();p()},function(){s=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(z=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&
|
||||
(m((z-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),z=b.originalEvent.touches[0].pageY)});w();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),m(0,!0)):"top"!==a.start&&(m(f(a.start).position().top,null,!0),a.alwaysVisible||c.hide());C()}});return this}});jQuery.fn.extend({slimscroll:jQuery.fn.slimScroll})})(jQuery);
|
||||
@ -0,0 +1,55 @@
|
||||
Template.AdminDashboardViewWrapper.rendered = ->
|
||||
node = @firstNode
|
||||
|
||||
@autorun ->
|
||||
data = Template.currentData()
|
||||
|
||||
if data.view then Blaze.remove data.view
|
||||
while node.firstChild
|
||||
node.removeChild node.firstChild
|
||||
|
||||
data.view = Blaze.renderWithData Template.AdminDashboardView, data, node
|
||||
|
||||
Template.AdminDashboardViewWrapper.destroyed = ->
|
||||
Blaze.remove @data.view
|
||||
|
||||
Template.AdminDashboardView.rendered = ->
|
||||
table = @$('.dataTable').DataTable();
|
||||
filter = @$('.dataTables_filter')
|
||||
length = @$('.dataTables_length')
|
||||
|
||||
filter.html '
|
||||
<div class="input-group">
|
||||
<input type="search" class="form-control input-sm" placeholder="Search"></input>
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-sm btn-default">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
'
|
||||
|
||||
length.html '
|
||||
<select class="form-control input-sm">
|
||||
<option value="10">10</option>
|
||||
<option value="25">25</option>
|
||||
<option value="50">50</option>
|
||||
<option value="100">100</option>
|
||||
</select>
|
||||
'
|
||||
|
||||
filter.find('input').on 'keyup', ->
|
||||
table.search(@value).draw()
|
||||
|
||||
length.find('select').on 'change', ->
|
||||
table.page.len(parseInt @value).draw()
|
||||
|
||||
Template.AdminDashboardView.helpers
|
||||
hasDocuments: ->
|
||||
AdminCollectionsCount.findOne({collection: Session.get 'admin_collection_name'})?.count > 0
|
||||
newPath: ->
|
||||
Router.path 'adminDashboard' + Session.get('admin_collection_name') + 'New'
|
||||
|
||||
Template.adminEditBtn.helpers
|
||||
path: ->
|
||||
Router.path "adminDashboard" + Session.get('admin_collection_name') + "Edit", _id: @_id
|
||||
101
hourglass/packages/meteor-admin/lib/server/methods.coffee
Normal file
101
hourglass/packages/meteor-admin/lib/server/methods.coffee
Normal file
@ -0,0 +1,101 @@
|
||||
Meteor.methods
|
||||
adminInsertDoc: (doc,collection)->
|
||||
check arguments, [Match.Any]
|
||||
if Roles.userIsInRole this.userId, ['admin']
|
||||
this.unblock()
|
||||
result = adminCollectionObject(collection).insert doc
|
||||
|
||||
return result
|
||||
|
||||
adminUpdateDoc: (modifier,collection,_id)->
|
||||
check arguments, [Match.Any]
|
||||
if Roles.userIsInRole this.userId, ['admin']
|
||||
this.unblock()
|
||||
result = adminCollectionObject(collection).update {_id:_id},modifier
|
||||
return result
|
||||
|
||||
adminRemoveDoc: (collection,_id)->
|
||||
check arguments, [Match.Any]
|
||||
if Roles.userIsInRole this.userId, ['admin']
|
||||
if collection == 'Users'
|
||||
Meteor.users.remove {_id:_id}
|
||||
else
|
||||
# global[collection].remove {_id:_id}
|
||||
adminCollectionObject(collection).remove {_id: _id}
|
||||
|
||||
|
||||
adminNewUser: (doc) ->
|
||||
check arguments, [Match.Any]
|
||||
if Roles.userIsInRole this.userId, ['admin']
|
||||
emails = doc.email.split(',')
|
||||
_.each emails, (email)->
|
||||
user = {}
|
||||
user.email = email
|
||||
unless doc.chooseOwnPassword
|
||||
user.password = doc.password
|
||||
|
||||
_id = Accounts.createUser user
|
||||
|
||||
if doc.sendPassword and AdminConfig.fromEmail?
|
||||
Email.send
|
||||
to: user.email
|
||||
from: AdminConfig.fromEmail
|
||||
subject: 'Your account has been created'
|
||||
html: 'You\'ve just had an account created for ' + Meteor.absoluteUrl() + ' with password ' + doc.password
|
||||
|
||||
if not doc.sendPassword
|
||||
Accounts.sendEnrollmentEmail _id
|
||||
|
||||
adminUpdateUser: (modifier,_id)->
|
||||
check arguments, [Match.Any]
|
||||
if Roles.userIsInRole this.userId, ['admin']
|
||||
this.unblock()
|
||||
result = Meteor.users.update {_id:_id}, modifier
|
||||
return result
|
||||
|
||||
adminSendResetPasswordEmail: (doc)->
|
||||
check arguments, [Match.Any]
|
||||
if Roles.userIsInRole this.userId, ['admin']
|
||||
console.log 'Changing password for user ' + doc._id
|
||||
Accounts.sendResetPasswordEmail(doc._id)
|
||||
|
||||
adminChangePassword: (doc)->
|
||||
check arguments, [Match.Any]
|
||||
if Roles.userIsInRole this.userId, ['admin']
|
||||
console.log 'Changing password for user ' + doc._id
|
||||
Accounts.setPassword(doc._id, doc.password)
|
||||
label: 'Email user their new password'
|
||||
|
||||
adminCheckAdmin: ->
|
||||
check arguments, [Match.Any]
|
||||
user = Meteor.users.findOne(_id:this.userId)
|
||||
if this.userId and !Roles.userIsInRole(this.userId, ['admin']) and (user.emails.length > 0)
|
||||
email = user.emails[0].address
|
||||
if typeof Meteor.settings.adminEmails != 'undefined'
|
||||
adminEmails = Meteor.settings.adminEmails
|
||||
if adminEmails.indexOf(email) > -1
|
||||
console.log 'Adding admin user: ' + email
|
||||
Roles.addUsersToRoles this.userId, ['admin'], Roles.GLOBAL_GROUP
|
||||
else if typeof AdminConfig != 'undefined' and typeof AdminConfig.adminEmails == 'object'
|
||||
adminEmails = AdminConfig.adminEmails
|
||||
if adminEmails.indexOf(email) > -1
|
||||
console.log 'Adding admin user: ' + email
|
||||
Roles.addUsersToRoles this.userId, ['admin'], Roles.GLOBAL_GROUP
|
||||
else if this.userId == Meteor.users.findOne({},{sort:{createdAt:1}})._id
|
||||
console.log 'Making first user admin: ' + email
|
||||
Roles.addUsersToRoles this.userId, ['admin']
|
||||
|
||||
adminAddUserToRole: (_id,role)->
|
||||
check arguments, [Match.Any]
|
||||
if Roles.userIsInRole this.userId, ['admin']
|
||||
Roles.addUsersToRoles _id, role, Roles.GLOBAL_GROUP
|
||||
|
||||
adminRemoveUserToRole: (_id,role)->
|
||||
check arguments, [Match.Any]
|
||||
if Roles.userIsInRole this.userId, ['admin']
|
||||
Roles.removeUsersFromRoles _id, role, Roles.GLOBAL_GROUP
|
||||
|
||||
adminSetCollectionSort: (collection, _sort) ->
|
||||
check arguments, [Match.Any]
|
||||
global.AdminPages[collection].set
|
||||
sort: _sort
|
||||
46
hourglass/packages/meteor-admin/lib/server/publish.coffee
Normal file
46
hourglass/packages/meteor-admin/lib/server/publish.coffee
Normal file
@ -0,0 +1,46 @@
|
||||
Meteor.publishComposite 'adminCollectionDoc', (collection, id) ->
|
||||
check collection, String
|
||||
check id, Match.OneOf(String, Mongo.ObjectID)
|
||||
if Roles.userIsInRole this.userId, ['admin']
|
||||
find: ->
|
||||
adminCollectionObject(collection).find(id)
|
||||
children: AdminConfig?.collections?[collection]?.children or []
|
||||
else
|
||||
@ready()
|
||||
|
||||
Meteor.publish 'adminUsers', ->
|
||||
if Roles.userIsInRole @userId, ['admin']
|
||||
Meteor.users.find()
|
||||
else
|
||||
@ready()
|
||||
|
||||
Meteor.publish 'adminUser', ->
|
||||
Meteor.users.find @userId
|
||||
|
||||
Meteor.publish 'adminCollectionsCount', ->
|
||||
handles = []
|
||||
self = @
|
||||
|
||||
_.each AdminTables, (table, name) ->
|
||||
id = new Mongo.ObjectID
|
||||
count = 0
|
||||
table = AdminTables[name]
|
||||
ready = false
|
||||
selector = if table.selector then table.selector(self.userId) else {}
|
||||
handles.push table.collection.find().observeChanges
|
||||
added: ->
|
||||
count += 1
|
||||
ready and self.changed 'adminCollectionsCount', id, {count: count}
|
||||
removed: ->
|
||||
count -= 1
|
||||
ready and self.changed 'adminCollectionsCount', id, {count: count}
|
||||
ready = true
|
||||
|
||||
self.added 'adminCollectionsCount', id, {collection: name, count: count}
|
||||
|
||||
self.onStop ->
|
||||
_.each handles, (handle) -> handle.stop()
|
||||
self.ready()
|
||||
|
||||
Meteor.publish null, ->
|
||||
Meteor.roles.find({})
|
||||
66
hourglass/packages/meteor-admin/package.js
Normal file
66
hourglass/packages/meteor-admin/package.js
Normal file
@ -0,0 +1,66 @@
|
||||
Package.describe({
|
||||
name: "yogiben:admin-edit",
|
||||
summary: "A complete admin dashboard solution",
|
||||
version: "1.2.8",
|
||||
git: "https://github.com/yogiben/meteor-admin"
|
||||
});
|
||||
|
||||
Package.on_use(function(api){
|
||||
|
||||
both = ['client','server']
|
||||
|
||||
api.versionsFrom('METEOR@1.0');
|
||||
|
||||
api.use(
|
||||
['iron:router@1.0.9',
|
||||
'coffeescript',
|
||||
'underscore',
|
||||
'reactive-var',
|
||||
'check',
|
||||
'aldeed:collection2@2.5.0',
|
||||
'aldeed:autoform@5.5.1',
|
||||
'aldeed:template-extension@4.0.0',
|
||||
'alanning:roles@1.2.13',
|
||||
'raix:handlebar-helpers@0.2.5',
|
||||
'reywood:publish-composite@1.4.2',
|
||||
'momentjs:moment@2.10.6',
|
||||
'aldeed:tabular@1.4.0',
|
||||
'meteorhacks:unblock@1.1.0',
|
||||
'zimme:active-route@2.3.2'
|
||||
],
|
||||
both);
|
||||
|
||||
api.use(['less@1.0.0 || 2.5.0','session','jquery','templating'],'client')
|
||||
|
||||
api.use(['email'],'server')
|
||||
|
||||
api.add_files([
|
||||
'lib/both/AdminDashboard.coffee',
|
||||
'lib/both/router.coffee',
|
||||
'lib/both/utils.coffee',
|
||||
'lib/both/startup.coffee',
|
||||
'lib/both/collections.coffee'
|
||||
], both);
|
||||
|
||||
api.add_files([
|
||||
'lib/client/html/admin_templates.html',
|
||||
'lib/client/html/admin_widgets.html',
|
||||
'lib/client/html/admin_layouts.html',
|
||||
'lib/client/html/admin_sidebar.html',
|
||||
'lib/client/html/admin_header.html',
|
||||
'lib/client/css/admin-custom.less',
|
||||
'lib/client/js/admin_layout.js',
|
||||
'lib/client/js/helpers.coffee',
|
||||
'lib/client/js/templates.coffee',
|
||||
'lib/client/js/events.coffee',
|
||||
'lib/client/js/slim_scroll.js',
|
||||
'lib/client/js/autoForm.coffee'
|
||||
], 'client');
|
||||
|
||||
api.add_files([
|
||||
'lib/server/publish.coffee',
|
||||
'lib/server/methods.coffee'
|
||||
], 'server');
|
||||
|
||||
api.export('AdminDashboard',both)
|
||||
});
|
||||
275
hourglass/packages/meteor-admin/versions.json
Normal file
275
hourglass/packages/meteor-admin/versions.json
Normal file
@ -0,0 +1,275 @@
|
||||
{
|
||||
"dependencies": [
|
||||
[
|
||||
"accounts-base",
|
||||
"1.1.2"
|
||||
],
|
||||
[
|
||||
"accounts-password",
|
||||
"1.0.4"
|
||||
],
|
||||
[
|
||||
"alanning:roles",
|
||||
"1.2.13"
|
||||
],
|
||||
[
|
||||
"aldeed:autoform",
|
||||
"4.0.7"
|
||||
],
|
||||
[
|
||||
"aldeed:collection2",
|
||||
"2.2.0"
|
||||
],
|
||||
[
|
||||
"aldeed:simple-schema",
|
||||
"1.1.0"
|
||||
],
|
||||
[
|
||||
"aldeed:template-extension",
|
||||
"4.0.0"
|
||||
],
|
||||
[
|
||||
"alethes:pages",
|
||||
"1.7.1"
|
||||
],
|
||||
[
|
||||
"application-configuration",
|
||||
"1.0.3"
|
||||
],
|
||||
[
|
||||
"base64",
|
||||
"1.0.1"
|
||||
],
|
||||
[
|
||||
"binary-heap",
|
||||
"1.0.1"
|
||||
],
|
||||
[
|
||||
"blaze",
|
||||
"2.0.3"
|
||||
],
|
||||
[
|
||||
"blaze-tools",
|
||||
"1.0.1"
|
||||
],
|
||||
[
|
||||
"boilerplate-generator",
|
||||
"1.0.1"
|
||||
],
|
||||
[
|
||||
"callback-hook",
|
||||
"1.0.1"
|
||||
],
|
||||
[
|
||||
"check",
|
||||
"1.0.2"
|
||||
],
|
||||
[
|
||||
"coffeescript",
|
||||
"1.0.4"
|
||||
],
|
||||
[
|
||||
"ddp",
|
||||
"1.0.11"
|
||||
],
|
||||
[
|
||||
"deps",
|
||||
"1.0.5"
|
||||
],
|
||||
[
|
||||
"ejson",
|
||||
"1.0.4"
|
||||
],
|
||||
[
|
||||
"email",
|
||||
"1.0.4"
|
||||
],
|
||||
[
|
||||
"follower-livedata",
|
||||
"1.0.2"
|
||||
],
|
||||
[
|
||||
"geojson-utils",
|
||||
"1.0.1"
|
||||
],
|
||||
[
|
||||
"html-tools",
|
||||
"1.0.2"
|
||||
],
|
||||
[
|
||||
"htmljs",
|
||||
"1.0.2"
|
||||
],
|
||||
[
|
||||
"id-map",
|
||||
"1.0.1"
|
||||
],
|
||||
[
|
||||
"iron:controller",
|
||||
"1.0.3"
|
||||
],
|
||||
[
|
||||
"iron:core",
|
||||
"1.0.3"
|
||||
],
|
||||
[
|
||||
"iron:dynamic-template",
|
||||
"1.0.3"
|
||||
],
|
||||
[
|
||||
"iron:layout",
|
||||
"1.0.3"
|
||||
],
|
||||
[
|
||||
"iron:location",
|
||||
"1.0.3"
|
||||
],
|
||||
[
|
||||
"iron:middleware-stack",
|
||||
"1.0.3"
|
||||
],
|
||||
[
|
||||
"iron:router",
|
||||
"1.0.3"
|
||||
],
|
||||
[
|
||||
"iron:url",
|
||||
"1.0.3"
|
||||
],
|
||||
[
|
||||
"jquery",
|
||||
"1.0.1"
|
||||
],
|
||||
[
|
||||
"json",
|
||||
"1.0.1"
|
||||
],
|
||||
[
|
||||
"less",
|
||||
"1.0.11"
|
||||
],
|
||||
[
|
||||
"livedata",
|
||||
"1.0.11"
|
||||
],
|
||||
[
|
||||
"localstorage",
|
||||
"1.0.1"
|
||||
],
|
||||
[
|
||||
"logging",
|
||||
"1.0.5"
|
||||
],
|
||||
[
|
||||
"meteor",
|
||||
"1.1.3"
|
||||
],
|
||||
[
|
||||
"minifiers",
|
||||
"1.1.2"
|
||||
],
|
||||
[
|
||||
"minimongo",
|
||||
"1.0.5"
|
||||
],
|
||||
[
|
||||
"mongo",
|
||||
"1.0.8"
|
||||
],
|
||||
[
|
||||
"mongo-livedata",
|
||||
"1.0.6"
|
||||
],
|
||||
[
|
||||
"mrt:moment",
|
||||
"2.8.1"
|
||||
],
|
||||
[
|
||||
"npm-bcrypt",
|
||||
"0.7.7"
|
||||
],
|
||||
[
|
||||
"observe-sequence",
|
||||
"1.0.3"
|
||||
],
|
||||
[
|
||||
"ordered-dict",
|
||||
"1.0.1"
|
||||
],
|
||||
[
|
||||
"raix:handlebar-helpers",
|
||||
"0.1.3"
|
||||
],
|
||||
[
|
||||
"random",
|
||||
"1.0.1"
|
||||
],
|
||||
[
|
||||
"reactive-dict",
|
||||
"1.0.4"
|
||||
],
|
||||
[
|
||||
"reactive-var",
|
||||
"1.0.3"
|
||||
],
|
||||
[
|
||||
"retry",
|
||||
"1.0.1"
|
||||
],
|
||||
[
|
||||
"routepolicy",
|
||||
"1.0.2"
|
||||
],
|
||||
[
|
||||
"service-configuration",
|
||||
"1.0.2"
|
||||
],
|
||||
[
|
||||
"session",
|
||||
"1.0.4"
|
||||
],
|
||||
[
|
||||
"sha",
|
||||
"1.0.1"
|
||||
],
|
||||
[
|
||||
"spacebars",
|
||||
"1.0.3"
|
||||
],
|
||||
[
|
||||
"spacebars-compiler",
|
||||
"1.0.3"
|
||||
],
|
||||
[
|
||||
"srp",
|
||||
"1.0.1"
|
||||
],
|
||||
[
|
||||
"templating",
|
||||
"1.0.9"
|
||||
],
|
||||
[
|
||||
"tracker",
|
||||
"1.0.3"
|
||||
],
|
||||
[
|
||||
"ui",
|
||||
"1.0.4"
|
||||
],
|
||||
[
|
||||
"underscore",
|
||||
"1.0.1"
|
||||
],
|
||||
[
|
||||
"webapp",
|
||||
"1.1.4"
|
||||
],
|
||||
[
|
||||
"webapp-hashing",
|
||||
"1.0.1"
|
||||
]
|
||||
],
|
||||
"pluginDependencies": [],
|
||||
"toolVersion": "meteor-tool@1.0.35",
|
||||
"format": "1.0"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user