¨4.0.1¨

This commit is contained in:
¨NW¨
2023-12-03 14:07:47 +00:00
parent c08b36d1b6
commit f35052522d
1112 changed files with 43019 additions and 24987 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@@ -1,4 +1,4 @@
import NProgress from 'nprogress';
import NProgress from "nprogress";
export default class {
constructor() {
@@ -14,43 +14,52 @@ export default class {
}
selectize() {
let selects = $('select.selectize').removeClass('form-control custom-select-black');
let selects = $("select.selectize").removeClass(
"form-control custom-select-black"
);
let options = _.merge({
valueField: 'id',
labelField: 'name',
searchField: 'name',
delimiter: ',',
persist: true,
selectOnTab: true,
hideSelected: false,
allowEmptyOption: true,
onItemAdd(value) {
this.getItem(value)[0].innerHTML = this.getItem(value)[0].innerHTML.replace(/¦––\s/g, '');
},
onInitialize() {
for (let index in this.options) {
let label = this.options[index].name;
let value = this.options[index].id;
let options = _.merge(
{
valueField: "id",
labelField: "name",
searchField: "name",
delimiter: ",",
persist: true,
selectOnTab: true,
hideSelected: true,
allowEmptyOption: true,
onItemAdd(value) {
this.getItem(value)[0].innerHTML = this.getItem(
value
)[0].innerHTML.replace(/¦––\s/g, "");
},
onInitialize() {
for (let index in this.options) {
let label = this.options[index].name;
let value = this.options[index].id;
this.$control.find(`.item[data-value="${value}"]`).html(
label.replace(/¦––\s/g, '') +
'<a href="javascript:void(0)" class="remove" tabindex="-1">×</a>'
);
}
this.$control
.find(`.item[data-value="${value}"]`)
.html(
label.replace(/¦––\s/g, "") +
'<a href="javascript:void(0)" class="remove" tabindex="-1">×</a>'
);
}
},
},
}, ...FleetCart.selectize);
...FleetCart.selectize
);
for (let select of selects) {
select = $(select);
let create = true;
let plugins = ['remove_button', 'restore_on_backspace'];
let plugins = ["remove_button", "restore_on_backspace"];
if (select.hasClass('prevent-creation')) {
if (select.hasClass("prevent-creation")) {
create = false;
plugins.remove('restore_on_backspace');
plugins.remove("restore_on_backspace");
}
select.selectize(_.merge(options, { create, plugins }));
@@ -58,33 +67,33 @@ export default class {
}
dateTimePicker(elements) {
elements = elements || $('.datetime-picker');
elements = elements || $(".datetime-picker");
elements = elements instanceof jQuery ? elements : $(elements);
for (let el of elements) {
$(el).flatpickr({
mode: el.hasAttribute('data-range') ? 'range' : 'single',
enableTime: el.hasAttribute('data-time'),
noCalender: el.hasAttribute('data-no-calender'),
mode: el.hasAttribute("data-range") ? "range" : "single",
enableTime: el.hasAttribute("data-time"),
noCalender: el.hasAttribute("data-no-calender"),
altInput: true,
});
}
}
changeAccordionTabState() {
$('.accordion-box [data-toggle="tab"]').on('click', (e) => {
if (! $(e.currentTarget).parent().hasClass('active')) {
$('.accordion-tab li.active').removeClass('active');
$('.accordion-box [data-toggle="tab"]').on("click", (e) => {
if (!$(e.currentTarget).parent().hasClass("active")) {
$(".accordion-tab li.active").removeClass("active");
}
});
}
preventChangingCurrentTab() {
$('[data-toggle="tab"]').on('click', (e) => {
$('[data-toggle="tab"]').on("click", (e) => {
let targetElement = $(e.currentTarget);
if (targetElement.parent().hasClass('active')) {
if (targetElement.parent().hasClass("active")) {
return false;
}
});
@@ -93,76 +102,85 @@ export default class {
removeSubmitButtonOffsetOn(tabs, tabsSelector = null) {
tabs = Array.isArray(tabs) ? tabs : [tabs];
$(tabsSelector || '.accordion-tab li > a').on('click', (e) => {
if (tabs.includes(e.currentTarget.getAttribute('href'))) {
$(tabsSelector || ".accordion-tab li > a").on("click", (e) => {
if (tabs.includes(e.currentTarget.getAttribute("href"))) {
setTimeout(() => {
$('button[type=submit]').parent().removeClass('col-md-offset-2');
$("button[type=submit]")
.parent()
.removeClass("col-md-offset-2");
}, 150);
} else {
setTimeout(() => {
$('button[type=submit]').parent().addClass('col-md-offset-2');
$("button[type=submit]")
.parent()
.addClass("col-md-offset-2");
}, 150);
}
});
}
buttonLoading() {
$(document).on('click', '[data-loading]', (e) => {
$(document).on("click", "[data-loading]", (e) => {
let button = $(e.currentTarget);
button.data('loading-text', button.html())
.addClass('btn-loading')
.button('loading');
button
.data("loading-text", button.html())
.addClass("btn-loading")
.button("loading");
});
}
stopButtonLoading(button) {
button = button instanceof jQuery ? button : $(button);
button.data('loading-text', button.html())
.removeClass('btn-loading')
.button('reset');
button
.data("loading-text", button.html())
.removeClass("btn-loading")
.button("reset");
}
confirmationModal() {
let confirmationModal = $('#confirmation-modal');
let confirmationModal = $("#confirmation-modal");
$('[data-confirm]').on('click', () => {
confirmationModal.modal('show');
$("[data-confirm]").on("click", () => {
confirmationModal.modal("show");
});
confirmationModal.find('form').on('submit', () => {
confirmationModal.find('button.delete').prop('disabled', true);
confirmationModal.find("form").on("submit", () => {
confirmationModal.find("button.delete").prop("disabled", true);
});
confirmationModal.on('hidden.bs.modal', () => {
confirmationModal.find('button.delete').prop('disabled', false);
confirmationModal.on("hidden.bs.modal", () => {
confirmationModal.find("button.delete").prop("disabled", false);
});
confirmationModal.on('shown.bs.modal', () => {
confirmationModal.find('button.delete').focus();
confirmationModal.on("shown.bs.modal", () => {
confirmationModal.find("button.delete").focus();
});
}
tooltip() {
$('[data-toggle="tooltip"]').tooltip({ trigger : 'hover' })
.on('click', (e) => {
$(e.currentTarget).tooltip('hide');
$('[data-toggle="tooltip"]')
.tooltip({ trigger: "hover" })
.on("click", (e) => {
$(e.currentTarget).tooltip("hide");
});
}
shortcuts() {
Mousetrap.bind('f1', () => {
window.open(`http://envaysoft.com/fleetcart/docs/${FleetCart.version}`, '_blank');
Mousetrap.bind("f1", () => {
window.open("https://docs.envaysoft.com/", "_blank");
});
Mousetrap.bind('?', () => {
$('#keyboard-shortcuts-modal').modal();
Mousetrap.bind("?", () => {
$("#keyboard-shortcuts-modal").modal();
});
}
nprogress() {
let inMobile = /iphone|ipod|android|ie|blackberry|fennec/i.test(window.navigator.userAgent);
let inMobile = /iphone|ipod|android|ie|blackberry|fennec/i.test(
window.navigator.userAgent
);
if (inMobile) {
return;

View File

@@ -1,3 +1,6 @@
import "datatables.net";
import "datatables.net-bs";
// Initialize state holders.
FleetCart.dataTable = { routes: {}, selected: {} };
@@ -24,7 +27,7 @@ export default class {
{
serverSide: true,
processing: true,
ajax: this.route("index", { table: true }),
ajax: this.route("table", { table: true }),
stateSave: true,
sort: true,
info: true,
@@ -34,9 +37,6 @@ export default class {
autoWidth: false,
pageLength: 20,
lengthMenu: [10, 20, 50, 100, 200],
language: {
processing: '<i class="fa fa-refresh fa-spin"></i>',
},
order: [
sortColumn.index() !== -1 ? sortColumn.index() : 1,
sortColumn.data("sort") || "desc",
@@ -74,7 +74,6 @@ export default class {
});
},
stateSaveParams(settings, data) {
delete data.start;
delete data.search;
},
},
@@ -136,7 +135,6 @@ export default class {
deleted = _.flatten(deleted.concat(ids));
this.constructor.setSelectedIds(this.selector, []);
this.constructor.reload(this.element);
},
error: (xhr) => {
@@ -145,7 +143,6 @@ export default class {
deleted = _.flatten(deleted.concat(ids));
this.constructor.setSelectedIds(this.selector, []);
this.constructor.reload(this.element);
},
});
@@ -157,10 +154,6 @@ export default class {
let url = this.route(key, { id });
$(row).addClass("clickable-row").data("href", url);
setTimeout(() => {
$(".clickable-row td:not(:first-child)").css("cursor", "pointer");
});
}
onRowClick(handler) {

View File

@@ -0,0 +1,56 @@
import Vue from "vue";
export default class {
constructor() {
this.errors = {};
}
record(errors) {
this.errors = Object.assign({}, this.errors, errors);
}
any() {
return Object.keys(this.errors).length > 0;
}
has(key) {
return this.errors.hasOwnProperty(this.normalizeKey(key));
}
get(key) {
if (this.errors[this.normalizeKey(key)]) {
return this.errors[this.normalizeKey(key)][0];
}
}
set(errors = {}) {
this.errors = Object.assign({}, this.errors, errors);
}
clear(keys) {
if (keys === undefined) {
return;
}
keys = Array.isArray(keys) ? keys : [keys];
keys.forEach((key) => {
Vue.delete(this.errors, this.normalizeKey(key));
});
}
reset() {
this.errors = {};
}
normalizeKey(key) {
let keyParts = key.split("[");
// No need to normalize the key.
if (keyParts.length === 1) {
return key;
}
return keyParts.join(".").slice(0, -1).replace(/]/g, "");
}
}

View File

@@ -0,0 +1,245 @@
$.FleetCart = {};
/* ----------------------------------
- FleetCart Options -
---------------------------------- */
$.FleetCart.options = {
animationSpeed: 300,
// Sidebar push menu toggle button selector
sidebarToggleSelector: "[data-toggle='offcanvas']",
// Activate sidebar push menu
sidebarPushMenu: true,
// BoxRefresh Plugin
enableBoxRefresh: true,
// Bootstrap.js tooltip
enableBSToppltip: true,
BSTooltipSelector: "[data-toggle='tooltip']",
// Control Sidebar Tree views
enableControlTreeView: true,
// The standard screen sizes that bootstrap uses.
screenSizes: {
xs: 480,
sm: 768,
md: 992,
lg: 1200,
},
};
/* ----------------------------------
- Implementation -
---------------------------------- */
$(function () {
// Easy access to options
var o = $.FleetCart.options;
// Set up the object
_init();
// Activate layout
$.FleetCart.layout.activate();
// Enable sidebar tree view controls
if (o.enableControlTreeView) {
$.FleetCart.tree(".sidebar");
}
// Activate sidebar push menu
if (o.sidebarPushMenu) {
$.FleetCart.pushMenu.activate(o.sidebarToggleSelector);
}
// Activate Bootstrap tooltip
if (o.enableBSToppltip) {
$("body").tooltip({
selector: o.BSTooltipSelector,
container: "body",
});
}
});
/* ----------------------------------
- Initialize the FleetCart Object -
---------------------------------- */
function _init() {
// Layout
$.FleetCart.layout = {
activate: function () {
var _this = this;
_this.fix();
$(window, ".wrapper").resize(function () {
_this.fix();
});
},
fix: function () {
var window_height = $(window).height();
$(".wrapper").css("min-height", window_height + "px");
},
};
// PushMenu
$.FleetCart.pushMenu = {
activate: function (toggleBtn) {
var screenSizes = $.FleetCart.options.screenSizes;
$(document).on("click", toggleBtn, function (e) {
e.preventDefault();
if ($(window).outerWidth() > screenSizes.md - 1) {
if ($("body").hasClass("sidebar-collapse")) {
$("body")
.removeClass("sidebar-collapse")
.trigger("expanded.pushMenu");
return;
}
$("body")
.addClass("sidebar-collapse")
.trigger("collapsed.pushMenu");
return;
}
if ($("body").hasClass("sidebar-open")) {
$("body")
.removeClass("sidebar-open")
.removeClass("sidebar-collapse")
.trigger("collapsed.pushMenu");
return;
}
$("body").addClass("sidebar-open").trigger("expanded.pushMenu");
});
$(window).on("resize", function () {
if ($(window).outerWidth() > screenSizes.md - 1) {
return;
} else {
$("body").removeClass("sidebar-collapse");
}
});
$(".content-wrapper").click(function () {
if (
$(window).width() <= screenSizes.md - 1 &&
$("body").hasClass("sidebar-open")
) {
$("body").removeClass("sidebar-open");
}
});
},
};
// Tree
$.FleetCart.tree = function (menu) {
var animationSpeed = $.FleetCart.options.animationSpeed;
$(document)
.off("click", menu + " li a")
.on("click", menu + " li a", function (e) {
var self = $(this);
var checkElement = self.next();
var activeElement = self
.closest(".sidebar-menu")
.find(".active");
if (checkElement.is(".treeview-menu")) {
self.closest(".sidebar-menu")
.find(".selected")
.removeClass("selected");
e.preventDefault();
}
if (self.parent().is(".active")) {
activeElement.toggleClass("closed");
} else {
activeElement.addClass("closed");
}
if (
checkElement.is(".treeview-menu") &&
checkElement.is(":visible") &&
!$("body").hasClass("sidebar-collapse")
) {
self.parent().removeClass("selected");
checkElement.slideUp(animationSpeed);
} else if (
checkElement.is(".treeview-menu") &&
!checkElement.is(":visible")
) {
var ul = self
.parents("ul")
.first()
.find("ul:visible")
.slideUp(animationSpeed);
self.parent().addClass("selected");
checkElement.slideDown(animationSpeed);
}
});
};
}
/* ----------------------------------
- Box Refresh Button -
---------------------------------- */
(function ($) {
$.fn.boxRefresh = function (options) {
var settings = $.extend(
{
trigger: ".refresh-btn",
source: "",
onLoadStart: function (box) {
return box;
},
onLoadDone: function (box) {
return box;
},
},
options
);
var overlay = $(
'<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>'
);
return this.each(function () {
if (settings.source === "") {
if (window.console) {
window.console.log(
"Please specify a source first - boxRefresh()"
);
}
return;
}
var box = $(this);
var rBtn = box.find(settings.trigger).first();
rBtn.on("click", function (e) {
e.preventDefault();
start(box);
box.find(".box-body").load(settings.source, function () {
done(box);
});
});
});
function start(box) {
box.append(overlay);
settings.onLoadStart.call(box);
}
function done(box) {
box.find(overlay).remove();
settings.onLoadDone.call(box);
}
};
})(jQuery);

View File

@@ -0,0 +1,16 @@
import Vue from "vue";
import VueToast from "vue-toast-notification";
Vue.use(VueToast);
export function toaster(message, options = {}) {
Vue.$toast.open({
message,
type: options.type || "default",
duration: 5000,
dismissible: true,
position: "bottom-right",
pauseOnHover: true,
...options,
});
}

View File

@@ -1,215 +1,48 @@
$.FleetCart = {};
import "bootstrap";
import "selectize";
import "flatpickr";
import "mousetrap";
import "./FleetCart";
import "./jquery.keypressAction";
/* ----------------------------------
- FleetCart Options -
---------------------------------- */
$.FleetCart.options = {
animationSpeed: 300,
// Sidebar push menu toggle button selector
sidebarToggleSelector: '[data-toggle=\'offcanvas\']',
// Activate sidebar push menu
sidebarPushMenu: true,
// BoxRefresh Plugin
enableBoxRefresh: true,
// Bootstrap.js tooltip
enableBSToppltip: true,
BSTooltipSelector: '[data-toggle=\'tooltip\']',
// Control Sidebar Tree views
enableControlTreeView: true,
// The standard screen sizes that bootstrap uses.
screenSizes: {
xs: 480,
sm: 768,
md: 992,
lg: 1200,
},
};
import Admin from "./Admin";
import Form from "./Form";
import DataTable from "./DataTable";
import {
trans,
keypressAction,
notify,
info,
success,
warning,
error,
} from "./functions";
/* ----------------------------------
- Implementation -
---------------------------------- */
$(function () {
// Easy access to options
var o = $.FleetCart.options;
// Set up the object
_init();
// Activate layout
$.FleetCart.layout.activate();
// Enable sidebar tree view controls
if (o.enableControlTreeView) {
$.FleetCart.tree('.sidebar');
}
// Activate sidebar push menu
if (o.sidebarPushMenu) {
$.FleetCart.pushMenu.activate(o.sidebarToggleSelector);
}
// Activate Bootstrap tooltip
if (o.enableBSToppltip) {
$('body').tooltip({
selector: o.BSTooltipSelector,
container: 'body',
});
}
});
/* ----------------------------------
- Initialize the FleetCart Object -
---------------------------------- */
function _init() {
// Layout
$.FleetCart.layout = {
activate: function () {
var _this = this;
_this.fix();
$(window, '.wrapper').resize(function () {
_this.fix();
});
},
fix: function () {
var window_height = $(window).height();
$('.wrapper').css('min-height', window_height + 'px');
}
};
// PushMenu
$.FleetCart.pushMenu = {
activate: function (toggleBtn) {
var screenSizes = $.FleetCart.options.screenSizes;
$(document).on('click', toggleBtn, function (e) {
e.preventDefault();
if ($(window).outerWidth() > (screenSizes.md - 1)) {
if ($('body').hasClass('sidebar-collapse')) {
$('body').removeClass('sidebar-collapse').trigger('expanded.pushMenu');
return;
}
$('body').addClass('sidebar-collapse').trigger('collapsed.pushMenu');
return;
}
if ($('body').hasClass('sidebar-open')) {
$('body').removeClass('sidebar-open').removeClass('sidebar-collapse').trigger('collapsed.pushMenu');
return;
}
$('body').addClass('sidebar-open').trigger('expanded.pushMenu');
});
$(window).on('resize', function () {
if ($(window).outerWidth() > (screenSizes.md - 1)) {
return;
} else {
$('body').removeClass('sidebar-collapse');
}
});
$('.content-wrapper').click(function () {
if ($(window).width() <= (screenSizes.md - 1) && $('body').hasClass('sidebar-open')) {
$('body').removeClass('sidebar-open');
}
});
}
};
// Tree
$.FleetCart.tree = function (menu) {
var animationSpeed = $.FleetCart.options.animationSpeed;
$(document).off('click', menu + ' li a')
.on('click', menu + ' li a', function (e) {
var self = $(this);
var checkElement = self.next();
var activeElement = self.closest('.sidebar-menu').find('.active');
if (checkElement.is('.treeview-menu')) {
self.closest('.sidebar-menu').find('.selected').removeClass('selected');
e.preventDefault();
}
if (self.parent().is('.active')) {
activeElement.toggleClass('closed');
} else {
activeElement.addClass('closed');
}
if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible')) && (!$('body').hasClass('sidebar-collapse'))) {
self.parent().removeClass('selected');
checkElement.slideUp(animationSpeed);
}
else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) {
var ul = self.parents('ul').first().find('ul:visible').slideUp(animationSpeed);
self.parent().addClass('selected');
checkElement.slideDown(animationSpeed);
}
});
};
if (
!route().current("admin.products.create") &&
!route().current("admin.products.edit")
) {
window.admin = new Admin();
}
/* ----------------------------------
- Box Refresh Button -
---------------------------------- */
(function ($) {
$.fn.boxRefresh = function (options) {
var settings = $.extend({
trigger: '.refresh-btn',
source: '',
onLoadStart: function (box) {
return box;
},
onLoadDone: function (box) {
return box;
},
}, options);
window.form = new Form();
window.DataTable = DataTable;
var overlay = $('<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>');
window.trans = trans;
window.keypressAction = keypressAction;
window.notify = notify;
window.info = info;
window.success = success;
window.warning = warning;
window.error = error;
return this.each(function () {
if (settings.source === '') {
if (window.console) {
window.console.log('Please specify a source first - boxRefresh()');
}
$.ajaxSetup({
headers: {
Authorization: FleetCart.apiToken,
"X-CSRF-TOKEN": FleetCart.csrfToken,
},
});
return;
}
var box = $(this);
var rBtn = box.find(settings.trigger).first();
rBtn.on('click', function (e) {
e.preventDefault();
start(box);
box.find('.box-body').load(settings.source, function () {
done(box);
});
});
});
function start(box) {
box.append(overlay);
settings.onLoadStart.call(box);
}
function done(box) {
box.find(overlay).remove();
settings.onLoadDone.call(box);
}
};
})(jQuery);
$(document).on("preInit.dt", () => {
$(".dataTables_length select").addClass("custom-select-black");
});

View File

@@ -1,11 +1,16 @@
import Chart from 'chart.js';
import Chart from "chart.js/auto";
$(function () {
$.ajax({
type: 'GET',
url: route('admin.sales_analytics.index'),
type: "GET",
url: route("admin.sales_analytics.index"),
success(response) {
let data = { labels: response.labels, sales: [], formatted: [], totalOrders: [] };
let data = {
labels: response.labels,
sales: [],
formatted: [],
totalOrders: [],
};
for (let item of response.data) {
data.sales.push(item.total.amount);
@@ -19,45 +24,56 @@ $(function () {
});
function initSalesAnalyticsChart(data) {
new Chart($('.sales-analytics .chart'), {
type: 'bar',
new Chart($(".sales-analytics .chart"), {
type: "bar",
data: {
labels: data.labels,
datasets: [{
data: data.sales,
backgroundColor: [
'rgba(255, 99, 132, 0.5)',
'rgba(54, 162, 235, 0.5)',
'rgba(255, 206, 86, 0.5)',
'rgba(75, 192, 192, 0.5)',
'rgba(153, 102, 255, 0.5)',
'rgba(255, 159, 64, 0.5)',
],
}],
datasets: [
{
data: data.sales,
backgroundColor: [
"rgba(255, 99, 132, 0.5)",
"rgba(54, 162, 235, 0.5)",
"rgba(255, 206, 86, 0.5)",
"rgba(75, 192, 192, 0.5)",
"rgba(153, 102, 255, 0.5)",
"rgba(255, 159, 64, 0.5)",
],
},
],
},
barThickness: 1,
options: {
responsive: true,
maintainAspectRatio: false,
legend: {
display: false,
},
tooltips: {
displayColors: false,
callbacks: {
label(item) {
let orders = `${trans('admin::dashboard.sales_analytics.orders')}: ${data.totalOrders[item.index]}`;
let sales = `${trans('admin::dashboard.sales_analytics.sales')}: ${data.formatted[item.index]}`;
plugins: {
legend: false,
tooltip: {
displayColors: false,
callbacks: {
label(item) {
let orders = `${trans(
"admin::dashboard.sales_analytics.orders"
)}: ${data.totalOrders[item.dataIndex]}`;
return [orders, sales];
let sales = `${trans(
"admin::dashboard.sales_analytics.sales"
)}: ${data.formatted[item.dataIndex]}`;
return [orders, sales];
},
},
},
},
scales: {
yAxes: [{
y: {
beginAtZero: true,
ticks: {
beginAtZero: true,
// Include the currency symbol in the ticks
callback: function (value) {
return data.formatted[0].charAt(0) + value;
},
},
}],
},
},
},
});

View File

@@ -1,4 +1,4 @@
import { ohSnap } from './ohsnap';
import { ohSnap } from "./ohsnap";
export function trans(langKey, replace = {}) {
let line = window.FleetCart.langs[langKey];
@@ -16,14 +16,14 @@ export function keypressAction(actions) {
export function notify(type, message, { duration = 5000, context = document }) {
let types = {
'info': 'blue',
'success': 'green',
'warning': 'yellow',
'error': 'red',
info: "blue",
success: "green",
warning: "yellow",
error: "red",
};
ohSnap(message, {
'container-id': 'notification-toast',
"container-id": "notification-toast",
context,
color: types[type],
duration,
@@ -31,27 +31,60 @@ export function notify(type, message, { duration = 5000, context = document }) {
}
export function info(message, duration) {
notify('info', message, { duration });
notify("info", message, { duration });
}
export function success(message, duration) {
notify('success', message, { duration });
notify("success", message, { duration });
}
export function warning(message, duration) {
notify('warning', message, { duration });
notify("warning", message, { duration });
}
export function error(message, duration) {
notify('error', message, { duration });
notify("error", message, { duration });
}
export function generateSlug(name) {
let slug = "";
// Change to lower case
const nameLower = name.toLowerCase();
// Letter "e"
slug = nameLower.replace(/e|é|è|ẽ|ẻ|ẹ|ê|ế|ề|ễ|ể|ệ/gi, "e");
// Letter "a"
slug = slug.replace(/a|á|à|ã|ả|ạ|ă|ắ|ằ|ẵ|ẳ|ặ|â|ấ|ầ|ẫ|ẩ|ậ/gi, "a");
// Letter "o"
slug = slug.replace(/o|ó|ò|õ|ỏ|ọ|ô|ố|ồ|ỗ|ổ|ộ|ơ|ớ|ờ|ỡ|ở|ợ/gi, "o");
// Letter "u"
slug = slug.replace(/u|ú|ù|ũ|ủ|ụ|ư|ứ|ừ|ữ|ử|ự/gi, "u");
// Letter "c"
slug = slug.replace(/ć|ĉ|č|ċ|ç/gi, "c");
// Letter "i"
slug = slug.replace(/î|ï|í|ī|į|ì/gi, "i");
// Letter (/, ', ")
slug = slug.replace(/\/|'|"|||,|\?|\.|;|]|\[|\+|=|\$|%|&|<|>|:/g, " ");
// Letter "d"
slug = slug.replace(/đ/gi, "d");
// Trim the last whitespace
slug = slug.replace(/\s*$/g, "");
// Change whitespace to "-"
slug = slug.replace(/\s+/g, "-");
return slug;
}
/**
* @see https://stackoverflow.com/a/3955096
*/
if (! Array.prototype.remove) {
if (!Array.prototype.remove) {
Array.prototype.remove = function () {
let what, a = arguments, L = a.length, ax;
let what,
a = arguments,
L = a.length,
ax;
while (L && this.length) {
what = a[--L];
@@ -68,10 +101,12 @@ if (! Array.prototype.remove) {
/**
* @see https://stackoverflow.com/a/4673436
*/
if (! String.prototype.format) {
if (!String.prototype.format) {
String.prototype.format = function () {
return this.replace(/%(\d+)%/g, (match, number) => {
return typeof arguments[number] !== 'undefined' ? arguments[number] : match;
return typeof arguments[number] !== "undefined"
? arguments[number]
: match;
});
};
}

View File

@@ -1,43 +1,7 @@
window._ = require('lodash');
window.Sortable = require('sortablejs');
window.$ = window.jQuery = require('jquery');
import jQuery from "jquery";
import _ from "lodash";
import Sortable from "sortablejs";
require('bootstrap');
require('selectize');
require('flatpickr');
require('jquery-slimscroll');
require('mousetrap');
require('datatables.net');
require('datatables.net-bs');
require('./app');
require('./wysiwyg');
require('./jquery.keypressAction');
import Admin from './Admin';
import Form from './Form';
import DataTable from './DataTable';
import { trans, keypressAction, notify, info, success, warning, error } from './functions';
window.admin = new Admin();
window.form = new Form();
window.DataTable = DataTable;
window.trans = trans;
window.keypressAction = keypressAction;
window.notify = notify;
window.info = info;
window.success = success;
window.warning = warning;
window.error = error;
$.ajaxSetup({
headers: {
'Authorization': FleetCart.apiToken,
'X-CSRF-TOKEN': FleetCart.csrfToken,
},
});
$(document).on('preInit.dt', () => {
$('.dataTables_length select').addClass('custom-select-black');
});
window.$ = window.jQuery = jQuery;
window._ = _;
window.Sortable = Sortable;

View File

@@ -1,38 +1,46 @@
import tinyMCE from 'tinymce';
import tinyMCE from "tinymce";
tinyMCE.baseURL = `${FleetCart.baseUrl}/modules/admin/js/wysiwyg`;
export default function () {
tinyMCE.baseURL = `${FleetCart.baseUrl}/build/assets/tinymce`;
tinyMCE.init({
selector: '.wysiwyg',
theme: 'silver',
mobile: { theme: 'mobile' },
height: 350,
menubar: false,
branding: false,
image_advtab: true,
automatic_uploads: true,
media_alt_source: false,
media_poster: false,
relative_urls: false,
directionality: FleetCart.rtl ? 'rtl' : 'ltr',
cache_suffix: `?v=${FleetCart.version}`,
plugins: 'lists, link, table, image, media, paste, autosave, autolink, wordcount, code, fullscreen',
toolbar: 'styleselect bold italic underline | bullist numlist | alignleft aligncenter alignright | outdent indent | image media link table | code fullscreen',
tinyMCE.init({
selector: ".wysiwyg",
theme: "silver",
height: 350,
menubar: false,
branding: false,
image_advtab: true,
automatic_uploads: true,
media_alt_source: false,
media_poster: false,
relative_urls: false,
toolbar_mode: "sliding", // Possible values: floating, sliding, scrolling, wrap
directionality: FleetCart.rtl ? "rtl" : "ltr",
cache_suffix: `?v=${FleetCart.version}`,
plugins:
"lists, link, table, image, media, paste, autosave, autolink,quickbars, wordcount, code, fullscreen",
toolbar:
"styleselect | bold italic underline strikethrough blockquote | bullist numlist | alignleft aligncenter alignright alignjustify | outdent indent | forecolor removeformat | table | image media link | code fullscreen",
quickbars_selection_toolbar:
"bold italic | quicklink h2 h3 blockquote quickimage quicktable",
images_upload_handler(blobInfo, success, failure) {
let formData = new FormData();
images_upload_handler(blobInfo, success, failure) {
let formData = new FormData();
formData.append('file', blobInfo.blob(), blobInfo.filename());
formData.append("file", blobInfo.blob(), blobInfo.filename());
$.ajax({
method: 'POST',
url: route('admin.media.store'),
data: formData,
processData: false,
contentType: false,
}).then((file) => {
success(file.path);
}).catch((xhr) => {
failure(xhr.responseJSON.message);
});
},
});
$.ajax({
method: "POST",
url: route("admin.media.store"),
data: formData,
processData: false,
contentType: false,
})
.then((file) => {
success(file.path);
})
.catch((xhr) => {
failure(xhr.responseJSON.message);
});
},
});
}

View File

@@ -1,6 +1,6 @@
.accordion-content {
background: #ffffff;
padding: 20px 0px;
padding: 20px 5px;
border-radius: 3px;
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.1);
}
@@ -57,7 +57,7 @@
top: 12px;
font-size: 20px;
line-height: 25px;
color: #000000;
color: #333333;
transform: rotateX(180deg);
transition: all 200ms ease-in-out;
}
@@ -68,14 +68,13 @@
position: absolute;
font-family: FontAwesome;
content: "\f107";
right: 10px;
top: 12px;
top: 15px;
right: 15px;
font-size: 20px;
line-height: 25px;
color: #000000;
color: #333333;
transform: rotateX(180deg);
transition: all 200ms ease-in-out;
top: 15px;
}
.accordion-box .panel-heading [data-toggle="collapse"].collapsed:after,
@@ -85,12 +84,12 @@
}
.accordion-box .panel-heading [data-toggle="collapse"].collapsed:hover:after {
color: #000000;
color: #333333;
}
.accordion-box-content {
.panel-heading [data-toggle="collapse"].collapsed:hover:after {
color: #000000;
color: #333333;
}
.panel-group .panel + .panel {
@@ -102,19 +101,20 @@
.accordion-box {
.panel-title a {
position: relative;
padding: 12px 15px;
padding: 10px 15px;
display: block;
text-decoration: none;
outline: none;
&.has-error.collapsed {
border-left: 3px solid #ff3366;
&.has-error {
border-left: 2px solid #ff3366;
}
}
.panel-body a {
color: #333333;
display: block;
padding: 14px 15px;
padding: 12px 15px;
transition: 200ms ease-in-out;
&:hover {
@@ -175,7 +175,7 @@
border-bottom: none;
> li {
float: none;
float: none !important;
z-index: 0;
> a {
@@ -193,7 +193,7 @@
}
&.has-error > a {
border-left: 3px solid #ff3366;
border-left: 2px solid #ff3366;
}
&.active > a {
@@ -206,9 +206,12 @@
&:focus {
border-left: 3px solid #0068e1;
border-bottom-color: #e9e9e9;
border-right: 0;
}
}
&.active.has-error > a {
border-left: 2px solid #ff3366;
}
}
&.nav-tabs > li.active > a {
@@ -223,19 +226,22 @@
.content-accordion {
&.panel-group {
margin-bottom: 15px;
margin-bottom: 12px;
}
.panel {
border: 1px solid #ebebed;
border-radius: 3px;
border: none;
border: 1px solid #e9e9e9;
box-shadow: none;
}
.panel-heading {
background: #f6f6f7;
padding: 0;
border-radius: 0;
}
.panel-title a {
.panel-title [data-toggle="collapse"] {
display: block;
padding: 15px;
@@ -244,9 +250,19 @@
&:focus {
color: #333333;
}
&.has-error {
border-left: 2px solid #ff3366;
border-radius: 2px 0 0 0;
&.collapsed {
border-radius: 2px 0 0 2px;
}
}
}
.panel-default > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #e9e9e9;
border-top-color: #ebebed;
}
}

View File

@@ -1,68 +1,69 @@
.alert {
border: none;
color: #555555;
font-size: 15px;
padding: 12px 15px;
border-radius: 3px;
border: none;
color: #555555;
font-size: 14px;
border-radius: 3px;
.close {
top: 4px;
right: 0;
outline: 0;
opacity: 0.5;
color: #626060;
text-shadow: none;
font-weight: normal;
transition: 200ms ease-in-out;
.close {
right: 0;
outline: 0;
opacity: 0.5;
color: #626060;
text-shadow: none;
font-weight: normal;
transition: 150ms ease-in-out;
&:hover {
opacity: 0.9;
}
}
&:hover {
opacity: 0.9;
}
}
.alert-text {
display: block;
margin: 6px 20px 0 45px;
}
.alert-text {
display: block;
}
}
.alert-icon {
float: left;
width: 30px;
height: 30px;
display: table;
border-radius: 50%;
text-align: center;
float: left;
width: 30px;
height: 30px;
display: table;
border-radius: 50%;
text-align: center;
> i {
font-size: 18px;
display: table-cell;
vertical-align: middle;
}
> i {
font-size: 18px;
display: table-cell;
vertical-align: middle;
}
}
.alert-success {
background: #deedee;
border-left: 3px solid #37bc9b;
background: #deedee;
border-left: 3px solid #37bc9b;
.alert-icon {
background: #c5e6e2;
.alert-icon {
background: #c5e6e2;
> i {
color: #37bc9b;
}
}
> i {
color: #37bc9b;
}
}
}
.alert-danger {
background: #f2e8ee;
border-left: 3px solid #ff3366;
background: #f2e8ee;
border-left: 3px solid #ff3366;
.alert-icon {
background: #f4ced5;
.alert-icon {
background: #f4ced5;
> i {
color: #ff3366;
}
}
> i {
color: #ff3366;
}
}
}
.alert-dismissible {
padding-right: 20px;
}

View File

@@ -1,17 +1,19 @@
/* buttons */
.btn {
font-size: 15px;
font-size: 14px;
font-weight: 500;
border: none;
border-radius: 3px;
padding: 10px 20px;
transition: 200ms ease-in-out;
padding: 8px 16px;
transition: 150ms ease-in-out;
}
.btn-default {
background: #f1f1f1;
outline: 0;
border-color: #dddddd;
&.focus,
&:focus,
&.active {
@@ -65,6 +67,10 @@
}
}
.btn-delete {
margin-left: 10px;
}
fieldset[disabled] .btn-default {
&:focus,
&.focus,
@@ -310,9 +316,9 @@ fieldset[disabled] .btn-info {
right: 0;
bottom: 0;
margin: auto;
height: 16px;
width: 16px;
border: 2px solid #ffffff;
height: 14px;
width: 14px;
border: 1px solid #ffffff;
border-radius: 100%;
border-right-color: transparent;
border-top-color: transparent;
@@ -320,7 +326,7 @@ fieldset[disabled] .btn-info {
}
&.btn-default:after {
border: 2px solid #0068e1;
border: 1px solid #0068e1;
border-right-color: transparent;
border-top-color: transparent;
}
@@ -380,26 +386,35 @@ fieldset[disabled] .btn-info {
/* label */
.label {
font-weight: normal;
font-weight: 500;
display: inline-block;
padding: 5px 10px;
}
.label-default {
background: #d2d6de;
color: #4b5563;
background: #e5e7eb;
}
.label-primary {
background: #0068e1;
color: #3b82f6;
background: #dbeafe;
}
.label-success {
background: #37bc9b;
color: #16a34a;
background: #bbf7d0;
}
.label-danger {
background: #fc4b4b;
color: #ef4444;
background: #fee2e2;
}
.label-warning {
color: #c08304;
background: #fdeba3;
}
/* form error */
@@ -429,8 +444,8 @@ fieldset[disabled] .btn-info {
.input-group-addon {
color: #ff3366;
background-color: #f2dede;
border-color: #ff3366;
background: #f6f6f7;
border-color: #d9d9d9;
}
.form-control-feedback {
@@ -438,13 +453,15 @@ fieldset[disabled] .btn-info {
}
}
.help-block {
margin-bottom: 0;
.input-group-addon {
background: #f6f6f7;
border-color: #d9d9d9;
}
.checkbox {
label {
font-size: 15px;
font-size: 14px;
font-weight: 400 !important;
color: #333333;
margin-bottom: 0 !important;
}
@@ -458,7 +475,7 @@ fieldset[disabled] .btn-info {
&:checked + label,
&:not(:checked) + label {
font-family: "Roboto", sans-serif;
font-family: "Inter", sans-serif;
position: relative;
padding-left: 28px;
cursor: pointer;
@@ -476,7 +493,7 @@ fieldset[disabled] .btn-info {
height: 17px;
border-radius: 3px;
background: #e9e9e9;
transition: 200ms ease-in-out;
transition: 150ms ease-in-out;
}
&:checked + label:after,
@@ -489,7 +506,7 @@ fieldset[disabled] .btn-info {
left: 2px;
color: #ffffff;
-webkit-text-stroke: 1px #0068e1;
transition: 200ms ease-in-out;
transition: 150ms ease-in-out;
}
&:checked + label:before {
@@ -509,8 +526,6 @@ fieldset[disabled] .btn-info {
}
}
/* radio button */
.radio {
text-align: left;
@@ -527,7 +542,7 @@ fieldset[disabled] .btn-info {
&:checked + label,
&:not(:checked) + label {
font-family: "Roboto", sans-serif;
font-family: "Inter", sans-serif;
position: relative;
padding-left: 28px;
cursor: pointer;
@@ -557,7 +572,7 @@ fieldset[disabled] .btn-info {
top: 4px;
left: 3px;
border-radius: 100%;
transition: 200ms ease-in-out;
transition: 150ms ease-in-out;
}
&:not(:checked) + label:after {
@@ -569,7 +584,7 @@ fieldset[disabled] .btn-info {
top: 3px;
left: 3px;
border-radius: 100%;
transition: 200ms ease-in-out;
transition: 150ms ease-in-out;
opacity: 0;
transform: scale(0);
}
@@ -589,11 +604,60 @@ fieldset[disabled] .btn-info {
margin-top: 0;
}
.switch {
[type="checkbox"] {
display: none;
&:checked + label::before {
background: #0068e1;
}
&:checked + label::after {
left: 16px;
}
}
label {
font-weight: 400 !important;
position: relative;
min-height: 20px;
margin-bottom: 0 !important;
padding-left: 46px;
cursor: pointer;
&:before {
content: "";
position: absolute;
left: 0;
top: 4px;
height: 12px;
width: 30px;
background: #e9e9e9;
border-radius: 8px;
transition: 150ms ease-in-out;
}
&:after {
content: "";
position: absolute;
left: -4px;
top: 1px;
height: 18px;
width: 18px;
background: #ffffff;
border-radius: 16px;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
transition: 150ms ease-in-out;
}
}
}
/* select option */
.custom-select-white {
appearance: none;
background: #f9f9f9 url('../images/arrow-white.png') no-repeat right 8px center;
background: #f9f9f9 url("../images/arrow-white.png") no-repeat right 8px
center;
background-size: 10px;
line-height: normal !important;
height: 40px;
@@ -604,9 +668,9 @@ fieldset[disabled] .btn-info {
.custom-select-black {
appearance: none;
background: #ffffff url('../images/arrow-black.png') no-repeat right 8px center;
background: #ffffff url("../images/arrow-black.png") no-repeat right 8px
center;
background-size: 10px;
line-height: normal !important;
height: 40px;
padding: 0 30px 0 10px;
border-radius: 3px;

View File

@@ -1,99 +1,125 @@
.grid {
.single-grid {
position: relative;
overflow: hidden;
height: 130px;
padding: 0 15px;
background: #ffffff;
border-radius: 3px;
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.1);
.content {
> .row {
> div {
padding-right: 10px;
padding-left: 10px;
h4 {
margin: 22px 0;
&:first-child {
padding-left: 15px;
}
&:last-child {
padding-right: 15px;
}
}
}
}
.grid {
> .row {
> div {
margin-bottom: 20px;
padding-left: 10px;
padding-right: 10px;
&:first-child {
padding-left: 15px;
}
&:last-child {
padding-right: 15px;
}
}
}
.single-grid {
position: relative;
display: flex;
flex-direction: column;
justify-content: space-between;
height: 130px;
padding: 25px;
border-radius: 3px;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
.title {
font-weight: 600;
display: block;
color: #ffffff;
text-transform: uppercase;
}
span {
.count {
font-size: 26px;
margin-top: 3px;
font-weight: 500;
color: #ffffff;
}
i {
font-size: 36px;
font-size: 96px;
position: absolute;
left: 15px;
bottom: 22px;
margin: 0;
}
&.total-orders {
i {
color: rgba(0, 104, 225, 0.7);
}
top: 10px;
right: -10px;
color: rgba(255, 255, 255, 0.25);
}
&.total-sales {
i {
color: rgba(112, 124, 210, 0.7);
}
background: #f24a78;
}
&.total-customers {
i {
color: rgba(255, 51, 102, 0.7);
}
&.total-orders {
background: #2faedf;
}
&.total-products {
i {
color: rgba(55, 188, 155, 0.7);
}
background: #3e8ce8;
}
}
}
.dashboard-panel {
margin-top: 30px;
padding: 0 15px;
background: #ffffff;
overflow: hidden;
border-radius: 3px;
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.1);
.table-responsive {
margin-bottom: 10px;
&.total-customers {
background: #3abcbf;
}
}
}
.grid-header {
overflow: auto;
h4 {
margin: 15px 0;
h5 {
margin: 12px 0;
float: left;
i {
margin-right: 8px;
}
}
}
}
.sales-analytics {
background: #ffffff;
margin-top: 30px;
padding: 0 15px 15px;
border-radius: 3px;
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.1);
.dashboard-panel {
margin-bottom: 20px;
padding: 0 15px;
background: #ffffff;
overflow: hidden;
border-radius: 3px;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
.chart {
height: 282px !important;
&:last-child {
margin-bottom: 0;
}
&.sales-analytics {
padding: 0 15px 15px;
.chart {
height: 282px !important;
}
}
.table-responsive {
margin-bottom: 10px;
}
}
.anchor-table {
.table {
> tbody {
> tr {
> td {
.table {
> tbody {
> tr {
> td {
padding: 0;
a {
@@ -114,7 +140,7 @@
color: #0059bd;
}
}
}
}
}
}
}
@@ -132,21 +158,42 @@
}
@media screen and (max-width: 1199px) {
.single-grid {
&.total-customers {
margin-top: 15px;
}
.content {
> .row {
> div {
padding-left: 15px;
padding-right: 15px;
&.total-products {
margin-top: 15px;
&:first-child {
margin-bottom: 20px;
}
}
}
}
.grid {
> .row {
> div {
&:nth-child(2) {
margin-bottom: 20px;
padding-right: 15px;
}
&:nth-child(3) {
padding-left: 15px;
}
}
}
}
}
@media screen and (max-width: 767px) {
.single-grid {
&.total-orders {
margin-top: 15px;
.grid {
> .row {
> div {
padding-left: 15px;
padding-right: 15px;
}
}
}
}

View File

@@ -1,14 +1,4 @@
.index-table {
.label {
padding: 6px 10px;
}
> .loading-spinner {
display: table;
margin: 0 auto;
margin-bottom: 10px;
}
}
@import "datatables.net-bs/css/dataTables.bootstrap";
.dataTable.table {
border-bottom: 1px solid #e9e9e9;
@@ -16,24 +6,20 @@
> {
thead > tr > th,
tfoot > tr > th {
font-family: 'Open Sans', sans-serif;
font-family: "Inter", sans-serif;
color: #4a4a4a;
padding: 10px 15px;
border-color: #e9e9e9;
&:after {
padding: 5px;
}
}
tbody > tr {
transition: 200ms ease-in-out;
transition: 150ms ease-in-out;
&:first-child > td {
border: none;
}
&:nth-of-type(2n+1) {
&:nth-of-type(2n + 1) {
background: #ffffff;
&:hover {
@@ -41,6 +27,12 @@
}
}
&.clickable-row {
> td:not(:first-child) {
cursor: pointer;
}
}
> td {
padding: 15px;
vertical-align: middle;
@@ -87,6 +79,32 @@
table.dataTable {
margin: 5px 0 !important;
&.table-hover {
> tbody {
> tr:hover {
> * {
box-shadow: none;
}
}
}
}
&.table-striped {
> tbody {
> tr {
&.odd > * {
box-shadow: none;
}
&:hover {
> * {
box-shadow: none;
}
}
}
}
}
thead {
.sorting,
.sorting_asc,
@@ -121,23 +139,24 @@ div.dataTables_wrapper {
}
div.dataTables_processing {
position: absolute;
top: 0;
left: 0;
margin: 0;
width: 100%;
height: 100%;
border: 0;
text-align: center;
margin: 0 !important;
background: rgba(255, 255, 255, 0.7);
border: 0;
z-index: 999;
transform: translate(-50%, -50%);
.fa-spin {
> div {
position: absolute;
top: 50%;
left: 50%;
color: #000;
font-size: 30px;
top: 50%;
margin: 0;
transform: translate(-50%, -50%);
> div {
background: #0068e1;
}
}
}
@@ -150,8 +169,10 @@ div.dataTables_wrapper {
}
}
.btn-delete {
margin-left: 10px;
div.dataTables_processing {
&.panel {
box-shadow: none;
}
}
.dataTables_empty {
@@ -191,30 +212,9 @@ div.dataTables_wrapper {
}
div.dataTables_wrapper {
> .row > .col-sm-6 {
width: 100%;
}
div.dataTables_filter {
text-align: left;
margin-top: 15px;
}
}
}
@media screen and (max-width: 340px) {
div.dataTables_length {
display: block;
.btn-delete {
display: table;
margin: 15px 0 0 0;
}
}
div.dataTables_wrapper {
div.dataTables_length {
text-align: left;
}
}
}

View File

@@ -1,43 +1,33 @@
@import '~flatpickr/dist/flatpickr';
@import "flatpickr/dist/flatpickr";
.flatpickr-calendar {
box-shadow: 0 1px 8px rgba(0, 0, 0, 0.15);
box-shadow: 0 1px 8px rgba(0, 0, 0, 0.15);
}
.flatpickr-months {
.flatpickr-month {
height: 50px;
}
.flatpickr-prev-month,
.flatpickr-next-month {
top: 8px;
}
}
.rtl {
.flatpickr-calendar {
&:before,
&:after {
right: 22px;
left: auto;
}
}
.flatpickr-prev-month,
.flatpickr-next-month {
transform: rotateY(180deg);
}
}
.flatpickr-month {
height: 50px;
}
.flatpickr-prev-month,
.flatpickr-next-month {
top: 10px;
}
.rtl {
.flatpickr-prev-month,
.flatpickr-next-month {
transform: rotateY(180deg);
}
}
span.flatpickr-current-month {
.cur-month {
font-family: "Open Sans", sans-serif !important;
}
.flatpickr-current-month {
height: auto;
}
.flatpickr-weekdays {
span {
font-family: "Open Sans", sans-serif;
}
span {
font-family: "Inter", sans-serif;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,21 +1,20 @@
@import '~bootstrap/dist/css/bootstrap';
@import '~font-awesome/css/font-awesome';
@import '~nprogress/nprogress';
@import '~datatables.net-bs/css/dataTables.bootstrap';
@import '~flatpickr/dist/ie';
@import './datatables';
@import './selectize';
@import './wysiwyg';
@import './ohsnap';
@import './flatpickr';
@import './classes';
@import './tab';
@import './alert';
@import './modal';
@import './utilities';
@import './accordion';
@import './fleetcart';
@import './panel';
@import "bootstrap/dist/css/bootstrap";
@import "font-awesome/css/font-awesome";
@import "nprogress/nprogress";
@import "flatpickr/dist/ie";
@import "./datatables";
@import "./selectize";
@import "./toaster.scss";
@import "./ohsnap";
@import "./flatpickr";
@import "./classes";
@import "./tab";
@import "./alert";
@import "./modal";
@import "./utilities";
@import "./accordion";
@import "./fleetcart";
@import "./panel";
html {
direction: ltr;
@@ -26,11 +25,11 @@ html {
> i {
margin-right: 5px;
}
}
}
.overflow-hidden {
overflow: hidden;
overflow: hidden;
}
#nprogress {
@@ -49,13 +48,13 @@ html {
}
.sortable-ghost {
opacity: .2;
opacity: 0.8;
}
.btn-group.open .dropdown-toggle,
.btn-group .dropdown-toggle:active {
-webkit-box-shadow: none;
box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
.dot {
@@ -74,23 +73,33 @@ html {
}
.options {
&.table > {
thead > {
tr > {
th {
padding: 6px 8px;
}
}
}
}
tr td:first-child {
width: 34px;
min-width: 34px;
width: 35px;
min-width: 35px;
}
tr td:last-child {
width: 60px;
}
.drag-icon {
.drag-handle {
font-size: 16px;
color: #737881;
cursor: move;
vertical-align: top;
margin-top: 12px;
margin-top: 11px;
white-space: nowrap;
display: inline-block;
cursor: move;
i {
float: left;
@@ -103,7 +112,11 @@ html {
.choose-file,
.delete-row {
padding: 10px 15px;
padding: 8px 14px;
}
.delete-row {
color: #4d4d4d;
}
}
@@ -115,7 +128,7 @@ html {
margin-left: -1px;
padding: 0;
border: 1px solid #e9e9e9;
transition: 200ms ease-in-out;
transition: 150ms ease-in-out;
&:hover {
cursor: pointer;
@@ -159,7 +172,8 @@ html {
background: transparent;
}
&:hover, &:focus {
&:hover,
&:focus {
color: #0068e1;
}
}
@@ -193,3 +207,7 @@ html {
.empty {
color: #626060;
}
[v-cloak] {
display: none;
}

View File

@@ -23,7 +23,7 @@
outline: 0;
margin-top: 2px;
-webkit-text-stroke: 1px #ffffff;
transition: 200ms ease-in-out;
transition: 150ms ease-in-out;
}
}

View File

@@ -1,19 +1,21 @@
.panel-wrap {
.panel {
margin-bottom: 15px;
box-shadow: none;
box-shadow: none;
border: 1px solid #e9e9e9;
border-radius: 3px;
.panel-header {
font-size: 16px;
font-weight: 500;
padding: 15px;
background: #f6f6f7;
border-bottom: 1px solid #e9e9e9;
.drag-icon {
.drag-handle {
font-size: 16px;
display: inline-block;
margin: 2px 10px 0 0;
margin: 3px 10px 0 0;
color: #737881;
cursor: move;
white-space: nowrap;
@@ -21,19 +23,24 @@
> i {
float: left;
&:last-child {
&:last-child {
margin-left: 1px;
}
}
}
.btn {
color: #737881;
padding: 0;
background: transparent;
i {
-webkit-text-stroke: 1px #f6f6f7;
}
&:hover {
color: #333333;
}
}
}
@@ -41,7 +48,7 @@
position: relative;
padding: 15px;
}
.panel-image {
position: absolute;
left: 15px;
@@ -101,4 +108,4 @@
}
}
}
}
}

View File

@@ -1,4 +1,4 @@
@import '~selectize/dist/css/selectize';
@import "selectize/dist/css/selectize";
.selectize-control:not(.multi) {
.selectize-input .item,
@@ -10,21 +10,34 @@
padding-right: 0 !important;
}
}
.selectize-control {
&.multi .selectize-input > div {
padding: 4px 8px;
&.multi {
.selectize-input {
&.has-items {
padding: 4px 4px 1px;
}
> div {
padding: 3px 8px;
}
}
}
&.single .selectize-input {
cursor: text;
&.full {
padding: 8px 12px;
}
&:after {
content: none;
}
> span {
display: flex;
padding: 2px 0
padding: 2px 0;
}
input {
@@ -39,6 +52,7 @@
display: flex;
align-items: center;
justify-content: center;
padding: 0;
border-left-color: #e9e9e9;
}
@@ -51,22 +65,19 @@
}
.selectize-input {
padding: 4px 12px;
border-radius: 3px;
border-color: #d9d9d9;
min-height: 40px;
min-height: 36px;
vertical-align: bottom;
box-shadow: none !important;
transition: border-color ease-in-out .15s;
transition: border-color ease-in-out 0.15s;
.dropdown-active {
-webkit-border-radius: 0;
border-radius: 0;
}
> input {
margin-top: 2px !important;
}
input {
font-size: 15px;
transition: 0ms !important;
@@ -87,7 +98,7 @@
&.focus {
border-color: #6f8dfd;
box-shadow: 0 0 2px rgba(30, 140, 190, .8);
box-shadow: 0 0 2px rgba(30, 140, 190, 0.8);
}
.item {
@@ -98,6 +109,14 @@
}
}
.ltr {
.selectize-input {
> input {
margin-top: 4px !important;
}
}
}
.selectize-dropdown {
[data-selectable] {
cursor: pointer;
@@ -108,7 +127,7 @@
}
.selectize-dropdown-content .create strong {
font-family: "Open Sans", sans-serif;
font-family: "Inter", sans-serif;
font-weight: 600;
}
}

View File

@@ -50,7 +50,7 @@
width: 0;
background: #0068e1;
height: 1px;
transition: 200ms ease-in-out;
transition: 150ms ease-in-out;
}
}

View File

@@ -0,0 +1,23 @@
@import "vue-toast-notification/dist/theme-sugar";
.v-toast {
padding: 20px 20px 15px;
}
.v-toast__item {
min-height: 3em;
.v-toast__icon {
display: none;
}
.v-toast__text {
padding: 0.5em 1em;
}
}
@media screen and (max-width: 991px) {
.v-toast {
padding: 15px 15px 10px !important;
}
}

View File

@@ -1,191 +1,219 @@
.p-tb-0 {
padding-top: 0;
padding-bottom: 0;
padding-top: 0;
padding-bottom: 0;
}
.p-tb-5 {
padding-top: 5px;
padding-bottom: 5px;
padding-top: 5px;
padding-bottom: 5px;
}
.p-tb-10 {
padding-top: 10px;
padding-bottom: 10px;
padding-top: 10px;
padding-bottom: 10px;
}
.p-tb-15 {
padding-top: 15px;
padding-bottom: 15px;
padding-top: 15px;
padding-bottom: 15px;
}
.p-t-0 {
padding-top: 0;
padding-top: 0;
}
.p-t-5 {
padding-top: 5px;
padding-top: 5px;
}
.p-t-10 {
padding-top: 10px;
padding-top: 10px;
}
.p-t-15 {
padding-top: 15px;
padding-top: 15px;
}
.p-b-0 {
padding-bottom: 0;
padding-bottom: 0;
}
.p-b-5 {
padding-bottom: 5px;
padding-bottom: 5px;
}
.p-b-10 {
padding-bottom: 10px;
padding-bottom: 10px;
}
.p-b-15 {
padding-bottom: 15px;
padding-bottom: 15px;
}
.p-l-0 {
padding-left: 0;
padding-left: 0;
}
.p-l-5 {
padding-left: 5px;
padding-left: 5px;
}
.p-l-10 {
padding-left: 10px;
padding-left: 10px;
}
.p-l-15 {
padding-left: 15px;
padding-left: 15px;
}
.p-r-0 {
padding-right: 0;
padding-right: 0;
}
.p-r-5 {
padding-right: 5px;
padding-right: 5px;
}
.p-r-10 {
padding-right: 10px;
padding-right: 10px;
}
.p-r-15 {
padding-right: 15px;
padding-right: 15px;
}
.m-tb-0 {
margin-top: 0;
margin-bottom: 0;
margin-top: 0;
margin-bottom: 0;
}
.m-tb-5 {
margin-top: 5px;
margin-bottom: 5px;
margin-top: 5px;
margin-bottom: 5px;
}
.m-tb-10 {
margin-top: 10px;
margin-bottom: 10px;
margin-top: 10px;
margin-bottom: 10px;
}
.m-tb-15 {
margin-top: 15px;
margin-bottom: 15px;
margin-top: 15px;
margin-bottom: 15px;
}
.m-t-0 {
margin-top: 0;
margin-top: 0;
}
.m-t-5 {
margin-top: 5px;
margin-top: 5px;
}
.m-t-10 {
margin-top: 10px;
margin-top: 10px !important;
}
.m-t-15 {
margin-top: 15px;
margin-top: 15px;
}
.m-b-0 {
margin-bottom: 0;
margin-bottom: 0 !important;
}
.m-b-5 {
margin-bottom: 5px;
margin-bottom: 5px;
}
.m-b-10 {
margin-bottom: 10px;
margin-bottom: 10px !important;
}
.m-b-15 {
margin-bottom: 15px;
margin-bottom: 15px;
}
.m-b-20 {
margin-bottom: 20px !important;
}
.m-l-0 {
margin-left: 0;
margin-left: 0;
}
.m-l-5 {
margin-left: 5px;
margin-left: 5px;
}
.m-l-10 {
margin-left: 10px;
margin-left: 10px;
}
.m-l-15 {
margin-left: 15px;
margin-left: 15px;
}
.m-r-0 {
margin-right: 0;
margin-right: 0;
}
.m-r-5 {
margin-right: 5px;
margin-right: 5px;
}
.m-r-10 {
margin-right: 10px;
margin-right: 10px;
}
.m-r-15 {
margin-right: 15px;
margin-right: 15px;
}
.no-border {
border: 0 !important;
border: 0 !important;
}
.no-padding {
padding: 0 !important;
padding: 0 !important;
}
.no-margin {
margin: 0 !important;
margin: 0 !important;
}
.no-shadow {
box-shadow: none !important;
box-shadow: none !important;
}
.cursor-auto {
cursor: auto !important;
cursor: auto !important;
}
.cursor-pointer {
cursor: pointer;
}
.cursor-move {
cursor: move;
}
.text-left {
text-align: left;
text-align: left;
}
.d-block {
display: block;
}
.d-flex {
display: flex;
}
.align-items-center {
align-items: center;
}
.justify-content-between {
justify-content: space-between;
}

View File

@@ -13,3 +13,7 @@
}
}
}
.tox-tinymce {
border-radius: 3px !important;
}