Merge branch 'dev' into module_profiler

This commit is contained in:
Michal Kváček
2017-09-23 00:45:51 +02:00
711 changed files with 14073 additions and 84301 deletions
+9 -2
View File
@@ -22,8 +22,9 @@ a:focus {
padding-bottom: 20px !important;
}
.form-control {
margin: .3em 0;
.blur {
-webkit-filter: blur(3px);
filter: blur(3px);
}
.text-center {
@@ -413,5 +414,11 @@ img {
/*background-color: #C9302C;*/
/*}*/
.has-subpages:hover {
cursor: pointer;
}
#orderSetup .subpage td:first-child {
padding-left: 35px;
}
+27 -494
View File
@@ -1,487 +1,9 @@
var config = window.config = {};
// Config reference element
var $ref = $ ("#ref");
// Configure responsive bootstrap toolkit
config.ResponsiveBootstrapToolkitVisibilityDivs = {
'xs': $ ('<div class="device-xs hidden-sm-up"></div>'),
'sm': $ ('<div class="device-sm hidden-xs-down hidden-md-up"></div>'),
'md': $ ('<div class="device-md hidden-sm-down hidden-lg-up"></div>'),
'lg': $ ('<div class="device-lg hidden-md-down hidden-xl-up"></div>'),
'xl': $ ('<div class="device-xl hidden-lg-down"></div>')
};
ResponsiveBootstrapToolkit.use ('Custom', config.ResponsiveBootstrapToolkitVisibilityDivs);
//validation configuration
config.validations = {
debug: true,
errorClass: 'has-error',
validClass: 'success',
errorElement: "span",
// add error class
highlight: function (element, errorClass, validClass) {
$ (element).parents ("div.form-group")
.addClass (errorClass)
.removeClass (validClass);
},
// add error class
unhighlight: function (element, errorClass, validClass) {
$ (element).parents (".has-error")
.removeClass (errorClass)
.addClass (validClass);
},
// submit handler
submitHandler: function (form) {
form.submit ();
}
};
//delay time configuration
config.delayTime = 50;
// chart configurations
config.chart = {};
/***********************************************
* Animation Settings
***********************************************/
function animate(options) {
var animationName = "animated " + options.name;
var animationEnd = "webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend";
$ (options.selector)
.addClass (animationName)
.one (animationEnd,
function () {
$ (this).removeClass (animationName);
}
);
}
$ (function () {
var $itemActions = $ (".item-actions-dropdown");
$ (document).on ('click', function (e) {
if (!$ (e.target).closest ('.item-actions-dropdown').length) {
$itemActions.removeClass ('active');
}
});
$ ('.item-actions-toggle-btn').on ('click', function (e) {
e.preventDefault ();
var $thisActionList = $ (this).closest ('.item-actions-dropdown');
$itemActions.not ($thisActionList).removeClass ('active');
$thisActionList.toggleClass ('active');
});
});
// /***********************************************
// * NProgress Settings
// ***********************************************/
// var npSettings = {
// easing: 'ease',
// speed: 500
// };
//
// NProgress.configure (npSettings);
// $ (function () {
// setSameHeights ();
//
// var resizeTimer;
//
// $ (window).resize (function () {
// clearTimeout (resizeTimer);
// resizeTimer = setTimeout (setSameHeights, 150);
// });
// });
function setSameHeights($container) {
$container = $container || $ ('.sameheight-container');
var viewport = ResponsiveBootstrapToolkit.current ();
$container.each (function () {
var $items = $ (this).find (".sameheight-item");
// Get max height of items in container
var maxHeight = 0;
$items.each (function () {
$ (this).css ({height: 'auto'});
maxHeight = Math.max (maxHeight, $ (this).innerHeight ());
});
// Set heights of items
$items.each (function () {
// Ignored viewports for item
var excludedStr = $ (this).data ('exclude') || '';
var excluded = excludedStr.split (',');
// Set height of element if it's not excluded on
if (excluded.indexOf (viewport) === -1) {
$ (this).innerHeight (maxHeight);
}
});
});
}
$ (function () {
animate ({
name: 'flipInY',
selector: '.error-card > .error-title-block'
});
setTimeout (function () {
var $el = $ ('.error-card > .error-container');
animate ({
name: 'fadeInUp',
selector: $el
});
$el.addClass ('visible');
}, 500);
});
$ (function () {
$ ('#sidebar-menu, #customize-menu').metisMenu ({
activeClass: 'open'
});
$ ('#sidebar-collapse-btn').on ('click', function (event) {
event.preventDefault ();
$ ("#app").toggleClass ("sidebar-open");
});
$ ("#sidebar-overlay").on ('click', function () {
$ ("#app").removeClass ("sidebar-open");
});
});
$ (function () {
$ ('.actions-list > li').on ('click', '.check', function (e) {
e.preventDefault ();
$ (this).parents ('.tasks-item')
.find ('.checkbox')
.prop ("checked", true);
// removeActionList ();
});
});
// $ (function () {
// // set sortable options
// $ ('.images-container').sortable ({
// animation: 150,
// handle: ".control-btn.move",
// draggable: ".image-container",
// onMove: function (evt) {
// var $relatedElem = $ (evt.related);
//
// if ($relatedElem.hasClass ('add-image')) {
// return false;
// }
// }
// });
//
// var $controlsButtons = $ ('.controls');
//
// var $controlsButtonsStar = $controlsButtons.find ('.star');
//
// $controlsButtonsStar.on ('click', function (e) {
// e.preventDefault ();
//
// $controlsButtonsStar.removeClass ('active');
// $controlsButtonsStar.parents ('.image-container').removeClass ('main');
//
// $ (this).addClass ('active');
//
// $ (this).parents ('.image-container').addClass ('main');
// })
// });
$ (function () {
$ ('.nav-profile > li > a').on ('click', function () {
var $el = $ (this).next ();
animate ({
name: 'flipInX',
selector: $el
});
});
});
$ (function () {
// Local storage settings
var themeSettings = getThemeSettings ();
// Elements
var $app = $ ('#app');
var $styleLink = $ ('#theme-style');
var $customizeMenu = $ ('#customize-menu');
// Color switcher
var $customizeMenuColorBtns = $customizeMenu.find ('.color-item');
// Position switchers
var $customizeMenuRadioBtns = $customizeMenu.find ('.radio');
// /////////////////////////////////////////////////
// Initial state
// On setting event, set corresponding options
// Update customize view based on options
// Update theme based on options
/************************************************
* Initial State
*************************************************/
setThemeSettings ();
/************************************************
* Events
*************************************************/
// set theme type
$customizeMenuColorBtns.on ('click', function () {
themeSettings.themeName = $ (this).data ('theme');
setThemeSettings ();
});
$customizeMenuRadioBtns.on ('click', function () {
var optionName = $ (this).prop ('name');
themeSettings[optionName] = $ (this).val ();
setThemeSettings ();
});
function setThemeSettings() {
setThemeState ()
.delay (config.delayTime)
.queue (function (next) {
setThemeColor ();
setThemeControlsState ();
saveThemeSettings ();
$ (document).trigger ("themechange");
next ();
});
}
/************************************************
* Update theme based on options
*************************************************/
function setThemeState() {
// set theme type
if (themeSettings.themeName) {
$styleLink.attr ('href', window.cssPath + '/app-' + themeSettings.themeName + '.css');
}
else {
$styleLink.attr ('href', window.cssPath + '/app.css');
}
// App classes
$app.removeClass ('header-fixed footer-fixed sidebar-fixed');
// set header
$app.addClass (themeSettings.headerPosition);
// set footer
$app.addClass (themeSettings.footerPosition);
// set footer
$app.addClass (themeSettings.sidebarPosition);
return $app;
}
/************************************************
* Update theme controls based on options
*************************************************/
function setThemeControlsState() {
// set color switcher
$customizeMenuColorBtns.each (function () {
if ($ (this).data ('theme') === themeSettings.themeName) {
$ (this).addClass ('active');
}
else {
$ (this).removeClass ('active');
}
});
// set radio buttons
$customizeMenuRadioBtns.each (function () {
var name = $ (this).prop ('name');
var value = $ (this).val ();
if (themeSettings[name] === value) {
$ (this).prop ("checked", true);
}
else {
$ (this).prop ("checked", false);
}
});
}
/************************************************
* Update theme color
*************************************************/
function setThemeColor() {
config.chart.colorPrimary = tinycolor ($ref.find (".chart .color-primary").css ("color"));
config.chart.colorSecondary = tinycolor ($ref.find (".chart .color-secondary").css ("color"));
}
/************************************************
* Storage Functions
*************************************************/
function getThemeSettings() {
var settings = (localStorage.getItem ('themeSettings')) ? JSON.parse (localStorage.getItem ('themeSettings')) : {};
settings.headerPosition = settings.headerPosition || '';
settings.sidebarPosition = settings.sidebarPosition || '';
settings.footerPosition = settings.footerPosition || '';
return settings;
}
function saveThemeSettings() {
localStorage.setItem ('themeSettings', JSON.stringify (themeSettings));
}
});
$ (function () {
// bind some custom methods
$ (document).ready (function () {
$ ("body").addClass ("loaded");
var notification = $ ('.notification');
if (notification.length) {
notification.click (function () {
$ (this).fadeOut ('fast');
});
setTimeout (function () {
notification.fadeOut (1500)
}, 5 * 1000)
}
});
/**
* Makes slug from input string
*
* @param text
* @param trimSpaces
*
* @returns {string}
*/
function slugify(text, trimSpaces) {
text = text.toString ().toLowerCase ();
if (trimSpaces)
text = text.trim ();
return text.replace (/ /g, '-')
.replace (/[àáâãäå]/g, "a")
.replace (/[čç]/g, "c")
.replace (/[ěèéêë]/g, "e")
.replace (/[ùúûüů]/g, "u")
.replace (/[ìíîï]/g, "i")
.replace (/[ňńñ]/g, "n")
.replace (/[òóôõö]/g, "o")
.replace (/[ýÿ]/g, "y")
.replace (/œ/g, "oe")
.replace (/ď/g, "d")
.replace (/ř/g, "r")
.replace (/š/g, "s")
.replace (/ž/g, "z")
.replace (/ť/g, "t")
.replace (/æ/g, "ae")
.replace (/[^a-z0-9\-]+/g, '')
.replace (/--+/g, '-');
}
// bind some custom methods
$ (document).ready (function () {
var previousTitle, previousMessage;
$ ('.confirm').click (function (e) {
var titleElement = $ ('#confirmation-title');
var messageElement = $ ('#confirmation-message');
previousTitle = titleElement.text ();
previousMessage = messageElement.text ();
var confirmTitle = $ (this).data ('title');
var confirmMessage = $ (this).data ('message');
var href = $ (this).attr ('href');
$ ('#confirm-button').attr ('href', href);
if (confirmTitle)
titleElement.text (confirmTitle);
if (confirmMessage)
messageElement.text (confirmMessage);
$ ('#confirm-modal').modal ('show');
e.preventDefault ();
});
$ ('#confirm-modal').on ('hidden.bs.modal', function () {
$ ('#confirmation-title').text (previousTitle);
$ ('#confirmation-message').text (previousMessage);
});
$ ('#lockUrl').change (function () {
$ ('.slug-source').keyup ();
});
$ ('.slug-target').keyup (function () {
$ (this).val (slugify ($ (this).val (), false));
$ ('#lockUrl').prop ('checked', true);
});
$ ('.slug-source').keyup (function () {
var source = $ (this);
var target = $ ('.slug-target');
var locked = $ ('#lockUrl');
if (!locked.is (':checked'))
target.val (slugify (source.val (), true));
});
$ (function () {
$ ('[data-toggle="tooltip"]').tooltip ()
});
$ ('[data-toggle="tooltip"]').tooltip ()
// find if any error occured and mark tab with that error
$ ('.has-error').each (function () {
@@ -491,20 +13,31 @@ $ (document).ready (function () {
$ ("#" + tabCard.prop ('id') + "-tab").addClass ('tab-with-error');
});
$('#removeTitlePhoto').click(function () {
$('#titlePhotoContainer').remove();
// $('existingTitlePhoto').val(null);
$ ('#removeTitlePhoto').click (function () {
$ ('#titlePhotoContainer').remove ();
});
$('form').areYouSure();
$ ('form').areYouSure ();
});
// /***********************************************
// * NProgress Settings
// ***********************************************/
//
// // start load bar
// NProgress.start ();
//
// // end loading bar
// NProgress.done ();
$ ('.checkbox').change (function () {
var e = $ (this);
var checked = e.is (':checked');
var id = e.data ('id');
$ ('.child-' + id).prop ('checked', checked);
// check also parent
if (e.hasClass ('child-checkbox') && checked) {
var parent = e.data ('parent');
$ ('#checkbox-parent-' + parent).prop ('checked', true);
}
});
$ ('.has-subpages').click (function (e) {
if (!$ (e.target).is ("div"))
return;
var id = $ (this).data ('id');
$ ('.parent-page-' + id).toggleClass ('hidden-xs-up');
})
+43
View File
@@ -0,0 +1,43 @@
var previousTitle, previousMessage;
$ ('.confirm').click (function (e) {
var titleElement = $ ('#confirmation-title');
var messageElement = $ ('#confirmation-message');
previousTitle = titleElement.text ();
previousMessage = messageElement.text ();
var confirmTitle = $ (this).data ('title');
var confirmMessage = $ (this).data ('message');
var tag = $ (this).prop ('tagName');
if (tag === 'A') {
var href = $ (this).attr ('href');
$ ('#confirm-button').attr ('href', href);
} else if (tag === 'BUTTON') {
var form = $ (this).closest ('form');
$ ('#confirm-button').click (function () {
form.submit ();
})
}
if (confirmTitle)
titleElement.text (confirmTitle);
if (confirmMessage)
messageElement.text (confirmMessage);
$ ('#confirm-modal').modal ('show');
$ ('.main-wrapper').addClass ('blur');
e.preventDefault ();
});
$ ('#confirm-modal').on ('hidden.bs.modal', function () {
$ ('#confirmation-title').text (previousTitle);
$ ('#confirmation-message').text (previousMessage);
$ ('.main-wrapper').removeClass ('blur');
});
+11
View File
@@ -0,0 +1,11 @@
var notification = $ ('.notification');
if (notification.length) {
notification.click (function () {
$ (this).fadeOut ('fast');
});
setTimeout (function () {
notification.fadeOut (1500)
}, 5 * 1000)
}
+51
View File
@@ -0,0 +1,51 @@
/**
* Makes slug from input string
*
* @param text
* @param trimSpaces
*
* @returns {string}
*/
function slugify(text, trimSpaces) {
text = text.toString ().toLowerCase ();
if (trimSpaces)
text = text.trim ();
return text.replace (/ /g, '-')
.replace (/[àáâãäå]/g, "a")
.replace (/[čç]/g, "c")
.replace (/[ěèéêë]/g, "e")
.replace (/[ùúûüů]/g, "u")
.replace (/[ìíîï]/g, "i")
.replace (/[ňńñ]/g, "n")
.replace (/[òóôõö]/g, "o")
.replace (/[ýÿ]/g, "y")
.replace (/œ/g, "oe")
.replace (/ď/g, "d")
.replace (/ř/g, "r")
.replace (/š/g, "s")
.replace (/ž/g, "z")
.replace (/ť/g, "t")
.replace (/æ/g, "ae")
.replace (/[^a-z0-9\-]+/g, '')
.replace (/--+/g, '-');
}
$ ('#lockUrl').change (function () {
$ ('.slug-source').keyup ();
});
$ ('.slug-target').keyup (function () {
$ (this).val (slugify ($ (this).val (), false));
$ ('#lockUrl').prop ('checked', true);
});
$ ('.slug-source').keyup (function () {
var source = $ (this);
var target = $ ('.slug-target');
var locked = $ ('#lockUrl');
if (!locked.is (':checked'))
target.val (slugify (source.val (), true));
});
+316
View File
@@ -0,0 +1,316 @@
var config = window.config = {};
// Config reference element
var $ref = $ ("#ref");
// Configure responsive bootstrap toolkit
config.ResponsiveBootstrapToolkitVisibilityDivs = {
'xs': $ ('<div class="device-xs hidden-sm-up"></div>'),
'sm': $ ('<div class="device-sm hidden-xs-down hidden-md-up"></div>'),
'md': $ ('<div class="device-md hidden-sm-down hidden-lg-up"></div>'),
'lg': $ ('<div class="device-lg hidden-md-down hidden-xl-up"></div>'),
'xl': $ ('<div class="device-xl hidden-lg-down"></div>')
};
ResponsiveBootstrapToolkit.use ('Custom', config.ResponsiveBootstrapToolkitVisibilityDivs);
//validation configuration
config.validations = {
debug: true,
errorClass: 'has-error',
validClass: 'success',
errorElement: "span",
// add error class
highlight: function (element, errorClass, validClass) {
$ (element).parents ("div.form-group")
.addClass (errorClass)
.removeClass (validClass);
},
// add error class
unhighlight: function (element, errorClass, validClass) {
$ (element).parents (".has-error")
.removeClass (errorClass)
.addClass (validClass);
},
// submit handler
submitHandler: function (form) {
form.submit ();
}
};
//delay time configuration
config.delayTime = 50;
// chart configurations
config.chart = {};
/***********************************************
* Animation Settings
***********************************************/
function animate(options) {
var animationName = "animated " + options.name;
var animationEnd = "webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend";
$ (options.selector)
.addClass (animationName)
.one (animationEnd,
function () {
$ (this).removeClass (animationName);
}
);
}
$ (function () {
var $itemActions = $ (".item-actions-dropdown");
$ (document).on ('click', function (e) {
if (!$ (e.target).closest ('.item-actions-dropdown').length) {
$itemActions.removeClass ('active');
}
});
$ ('.item-actions-toggle-btn').on ('click', function (e) {
e.preventDefault ();
var $thisActionList = $ (this).closest ('.item-actions-dropdown');
$itemActions.not ($thisActionList).removeClass ('active');
$thisActionList.toggleClass ('active');
});
});
function setSameHeights($container) {
$container = $container || $ ('.sameheight-container');
var viewport = ResponsiveBootstrapToolkit.current ();
$container.each (function () {
var $items = $ (this).find (".sameheight-item");
// Get max height of items in container
var maxHeight = 0;
$items.each (function () {
$ (this).css ({height: 'auto'});
maxHeight = Math.max (maxHeight, $ (this).innerHeight ());
});
// Set heights of items
$items.each (function () {
// Ignored viewports for item
var excludedStr = $ (this).data ('exclude') || '';
var excluded = excludedStr.split (',');
// Set height of element if it's not excluded on
if (excluded.indexOf (viewport) === -1) {
$ (this).innerHeight (maxHeight);
}
});
});
}
$ (function () {
animate ({
name: 'flipInY',
selector: '.error-card > .error-title-block'
});
setTimeout (function () {
var $el = $ ('.error-card > .error-container');
animate ({
name: 'fadeInUp',
selector: $el
});
$el.addClass ('visible');
}, 500);
});
$ (function () {
$ ('#sidebar-menu, #customize-menu').metisMenu ({
activeClass: 'open'
});
$ ('#sidebar-collapse-btn').on ('click', function (event) {
event.preventDefault ();
$ ("#app").toggleClass ("sidebar-open");
});
$ ("#sidebar-overlay").on ('click', function () {
$ ("#app").removeClass ("sidebar-open");
});
});
$ (function () {
$ ('.actions-list > li').on ('click', '.check', function (e) {
e.preventDefault ();
$ (this).parents ('.tasks-item')
.find ('.checkbox')
.prop ("checked", true);
// removeActionList ();
});
});
$ (function () {
$ ('.nav-profile > li > a').on ('click', function () {
var $el = $ (this).next ();
animate ({
name: 'flipInX',
selector: $el
});
});
});
$ (function () {
// Local storage settings
var themeSettings = getThemeSettings ();
// Elements
var $app = $ ('#app');
var $styleLink = $ ('#theme-style');
var $customizeMenu = $ ('#customize-menu');
// Color switcher
var $customizeMenuColorBtns = $customizeMenu.find ('.color-item');
// Position switchers
var $customizeMenuRadioBtns = $customizeMenu.find ('.radio');
/************************************************
* Initial State
*************************************************/
setThemeSettings ();
setSameHeights ();
/************************************************
* Events
*************************************************/
// set theme type
$customizeMenuColorBtns.on ('click', function () {
themeSettings.themeName = $ (this).data ('theme');
setThemeSettings ();
});
$customizeMenuRadioBtns.on ('click', function () {
var optionName = $ (this).prop ('name');
themeSettings[optionName] = $ (this).val ();
setThemeSettings ();
});
function setThemeSettings() {
setThemeState ()
.delay (config.delayTime)
.queue (function (next) {
setThemeColor ();
setThemeControlsState ();
saveThemeSettings ();
$ (document).trigger ("themechange");
next ();
});
}
/************************************************
* Update theme based on options
*************************************************/
function setThemeState() {
// set theme type
if (themeSettings.themeName) {
$styleLink.attr ('href', window.cssPath + '/app-' + themeSettings.themeName + '.css');
}
else {
$styleLink.attr ('href', window.cssPath + '/app.css');
}
// App classes
$app.removeClass ('header-fixed footer-fixed sidebar-fixed');
// set header
$app.addClass (themeSettings.headerPosition);
// set footer
$app.addClass (themeSettings.footerPosition);
// set footer
$app.addClass (themeSettings.sidebarPosition);
return $app;
}
/************************************************
* Update theme controls based on options
*************************************************/
function setThemeControlsState() {
// set color switcher
$customizeMenuColorBtns.each (function () {
if ($ (this).data ('theme') === themeSettings.themeName) {
$ (this).addClass ('active');
}
else {
$ (this).removeClass ('active');
}
});
// set radio buttons
$customizeMenuRadioBtns.each (function () {
var name = $ (this).prop ('name');
var value = $ (this).val ();
if (themeSettings[name] === value) {
$ (this).prop ("checked", true);
}
else {
$ (this).prop ("checked", false);
}
});
}
/************************************************
* Update theme color
*************************************************/
function setThemeColor() {
config.chart.colorPrimary = tinycolor ($ref.find (".chart .color-primary").css ("color"));
config.chart.colorSecondary = tinycolor ($ref.find (".chart .color-secondary").css ("color"));
}
/************************************************
* Storage Functions
*************************************************/
function getThemeSettings() {
var settings = (localStorage.getItem ('themeSettings')) ? JSON.parse (localStorage.getItem ('themeSettings')) : {};
settings.headerPosition = settings.headerPosition || '';
settings.sidebarPosition = settings.sidebarPosition || '';
settings.footerPosition = settings.footerPosition || '';
return settings;
}
function saveThemeSettings() {
localStorage.setItem ('themeSettings', JSON.stringify (themeSettings));
}
});
@@ -3,8 +3,8 @@
.row {
.col {
padding-left: $grid-gutter-width/2;
padding-right: $grid-gutter-width/2;
padding-left: $grid-gutter-width-base/2;
padding-right: $grid-gutter-width-base/2;
float: left;
}
}
@@ -1,386 +1,390 @@
@import "../imports";
/* *******************************************
* Item List general styles
********************************************** */
.item-list {
list-style: none;
padding: 0;
margin: 0;
margin-bottom: 0;
line-height: $item-list-line-height;
@include media(lg) {
font-size: 1rem;
}
list-style: none;
padding: 0;
margin: 0;
line-height: $item-list-line-height;
@include media(md) {
font-size: 0.95rem;
}
@include media(lg) {
font-size: 1rem;
}
@include media-down(sm) {
font-size: 1.05rem;
}
@include media(md) {
font-size: 0.95rem;
}
display: flex;
flex-flow: column nowrap;
@include media-down(sm) {
font-size: 1.05rem;
}
&.striped {
& > li {
border-bottom: 1px solid $item-list-color-border;
}
& > li:nth-child(2n + 1) {
background-color: lighten($color-divider, 12%);
@include media-down(sm) {
background-color: lighten($color-divider, 11%);
}
}
.item-list-footer {
border-bottom: none;
}
}
display: flex;
flex-flow: column nowrap;
}
.striped {
& > div, & tr {
border-bottom: 1px solid $item-list-color-border;
}
& > div:nth-child(2n + 1), & tr:nth-child(2n + 1) {
background-color: lighten($color-divider, 12%);
@include media-down(sm) {
background-color: lighten($color-divider, 11%);
}
}
.item-list-footer {
border-bottom: none;
}
}
/* *******************************************
* Item general styles
********************************************** */
.item-list {
.item {
display: flex;
flex-direction: column;
}
.item-row {
display: flex;
align-items: stretch;
flex-direction: row;
justify-content: space-between;
flex-wrap: wrap;
min-width: 100%;
.subpage {
padding-left: 35px;
}
&.nowrap {
flex-wrap: nowrap;
}
}
.thumbnail {
width: 100%;
height: 80px;
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
}
.item-col {
align-items: center;
display: flex;
padding: $item-list-padding-y $item-list-padding-x $item-list-padding-y 0;
flex-basis: 0;
flex-grow: $item-list-col-grow;
flex-shrink: $item-list-col-shrink;
margin-left: auto;
margin-right: auto;
min-width: 0;
.item {
display: flex;
flex-direction: column;
}
&.fixed {
flex-grow: 0;
flex-shrink: 0;
flex-basis: auto;
}
.item-row {
display: flex;
align-items: stretch;
flex-direction: row;
justify-content: space-between;
flex-wrap: wrap;
min-width: 100%;
&.pull-left {
margin-right: auto;
}
&.nowrap {
flex-wrap: nowrap;
}
}
&.pull-right {
margin-left: auto;
}
.item-col {
align-items: center;
display: flex;
padding: $item-list-padding-y $item-list-padding-x $item-list-padding-y 0;
flex-basis: 0;
flex-grow: $item-list-col-grow;
flex-shrink: $item-list-col-shrink;
margin-left: auto;
margin-right: auto;
min-width: 0;
& > div {
width: 100%;
}
&.fixed {
flex-grow: 0;
flex-shrink: 0;
flex-basis: auto;
}
&:last-child {
padding-right: 0;
}
}
&.pull-left {
margin-right: auto;
}
.no-overflow {
overflow: hidden;
}
&.pull-right {
margin-left: auto;
}
.no-wrap {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
& > div {
width: 100%;
}
&:last-child {
padding-right: 0;
}
}
.no-overflow {
overflow: hidden;
}
.no-wrap {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
/* *******************************************
* Item components
********************************************** */
.item-list {
/********************************************
* Header
*********************************************/
/********************************************
* Header
*********************************************/
.item-list-header {
.item-col.item-col-header {
span {
color: #999;
font-size: 0.8rem;
font-weight: 700 !important;
}
}
}
.item-list-header {
.item-col.item-col-header {
span {
color: #999;
font-size: 0.8rem;
font-weight: 700 !important;
}
}
}
/********************************************
* Heading
*********************************************/
/********************************************
* Heading
*********************************************/
.item-heading {
font-size: 0.9rem;
display: none;
color: #666;
font-weight: 700;
padding-right: $item-list-padding-x;
.item-heading {
font-size: 0.9rem;
display: none;
color: #666;
font-weight: 700;
padding-right: $item-list-padding-x;
@include media-down(sm) {
display: block;
}
@include media-down(sm) {
display: block;
}
@include media(sm) {
width: 100%;
}
@include media(sm) {
width: 100%;
}
@include media(xs) {
width: 40%;
}
}
@include media(xs) {
width: 40%;
}
}
/********************************************
* Checkbox
*********************************************/
/********************************************
* Checkbox
*********************************************/
.item-col.item-col-check {
flex-basis: 20px + $item-list-padding-x;
.item-col.item-col-check {
flex-basis: 20px + $item-list-padding-x;
@include media-down(sm) {
order: -8;
}
}
@include media-down(sm) {
order: -8;
}
}
.item-check {
margin-bottom: 0;
.item-check {
margin-bottom: 0;
.checkbox + span {
padding-right: 0;
.checkbox + span {
padding-right: 0;
&:before {
width: 20px;
}
}
}
&:before {
width: 20px;
}
}
}
/********************************************
* Image
*********************************************/
/********************************************
* Image
*********************************************/
.item-col.item-col-img {
display: flex;
flex-basis: 60px + $item-list-padding-x;
.item-col.item-col-img {
display: flex;
flex-basis: 60px + $item-list-padding-x;
&.xs{
flex-basis: 30px + $item-list-padding-x;
}
&.xs {
flex-basis: 30px + $item-list-padding-x;
}
&.sm {
flex-basis: 40px + $item-list-padding-x;
}
&.sm {
flex-basis: 40px + $item-list-padding-x;
}
&.lg {
flex-basis: 90px + $item-list-padding-x;
}
&.lg {
flex-basis: 90px + $item-list-padding-x;
}
&.xl {
flex-basis: 110px + $item-list-padding-x;
}
&.xl {
flex-basis: 110px + $item-list-padding-x;
}
a {
width: 100%;
// display: flex;
}
}
a {
width: 100%;
// display: flex;
}
}
.item-img {
flex-grow: 1;
align-self: stretch;
background-color: #efefef;
padding-bottom: 100%;
width: 100%;
height: 0;
.item-img {
flex-grow: 1;
align-self: stretch;
background-color: #EFEFEF;
padding-bottom: 100%;
width: 100%;
height: 0;
@include bg-cover();
}
@include bg-cover();
}
/********************************************
* Title
*********************************************/
/********************************************
* Title
*********************************************/
.item-col.item-col-title {
.item-col.item-col-title {
@include media-down(sm) {
order: -4;
}
@include media-down(sm) {
order: -4;
}
a {
display: block;
}
}
a {
display: block;
}
}
.item-title {
margin: 0;
font-size: inherit;
line-height: inherit;
font-weight: 600;
}
.item-title {
margin: 0;
font-size: inherit;
line-height: inherit;
font-weight: 600;
}
/********************************************
* Stats
*********************************************/
/********************************************
* Stats
*********************************************/
.item-stats {
height: $item-list-line-height;
}
.item-stats {
height: $item-list-line-height;
}
/********************************************
* Actions
*********************************************/
/********************************************
* Actions
*********************************************/
.item-col.item-col-actions-dropdown {
flex-basis: 30px + $item-list-padding-x;
text-align: center;
padding-left: 0 !important;
.item-col.item-col-actions-dropdown {
flex-basis: 30px + $item-list-padding-x;
text-align: center;
padding-left: 0 !important;
@include media-down(sm) {
order: -3;
@include media-down(sm) {
order: -3;
flex-basis: 30px + $item-list-padding-x !important;
padding-right: $item-list-padding-x;
}
}
flex-basis: 30px + $item-list-padding-x !important;
padding-right: $item-list-padding-x;
}
}
.item-actions-dropdown {
position: relative;
font-size: 1.1rem;
.item-actions-dropdown {
position: relative;
font-size: 1.1rem;
&.active {
.item-actions-block {
max-width: 120px;
}
&.active {
.item-actions-block {
max-width: 120px;
}
.item-actions-toggle-btn {
color: $color-primary;
.item-actions-toggle-btn {
color: $color-primary;
.active {
display: block;
}
.active {
display: block;
}
.inactive {
display: none;
}
}
}
.inactive {
display: none;
}
}
}
.item-actions-toggle-btn {
color: lighten($color-text-light, 10);
font-size: 1.2rem;
cursor: pointer;
width: 100%;
line-height: 30px;
text-align: center;
text-decoration: none;
.item-actions-toggle-btn {
color: lighten($color-text-light, 10);
font-size: 1.2rem;
cursor: pointer;
width: 100%;
line-height: 30px;
text-align: center;
text-decoration: none;
.active {
display: none;
}
}
.active {
display: none;
}
}
.item-actions-block {
height: 30px;
max-width: 0px;
line-height: 30px;
overflow: hidden;
position: absolute;
top: 0;
right: 100%;
background-color: $color-divider;
border-radius: 3px;
transition: all 0.15s ease-in-out;
.item-actions-block {
height: 30px;
max-width: 0px;
line-height: 30px;
overflow: hidden;
position: absolute;
top: 0;
right: 100%;
background-color: $color-divider;
border-radius: 3px;
transition: all 0.15s ease-in-out;
&.direction-right {
right: auto;
left: 100%;
}
&.direction-right {
right: auto;
left: 100%;
}
.item-actions-list {
padding: 0;
list-style: none;
white-space: nowrap;
padding: 0 5px;
.item-actions-list {
padding: 0;
list-style: none;
white-space: nowrap;
padding: 0 5px;
li {
display: inline-block;
padding: 0;
}
li{
display: inline-block;
padding: 0;
}
a {
display: block;
padding: 0 5px;
a {
display: block;
padding: 0 5px;
&.edit {
color: #38424C;
}
&.edit {
color: #38424C;
}
&.check {
color: #40B726;
}
&.check {
color: #40B726;
}
&.remove {
color: #DB0E1E;
}
}
}
}
&.remove {
color: #DB0E1E;
}
}
}
}
}
}
/********************************************
* Something else?
*********************************************/
/********************************************
* Something else?
*********************************************/
}
/* *******************************************
* Adjustments
********************************************** */
// Item which is located inside card inside item-list
.card > .item-list .item > .item-row {
padding: 0 $card-padding-x;
padding: 0 $card-padding-x;
@include media(xl) {
padding: 0 $card-padding-x-xl;
}
@include media(xl) {
padding: 0 $card-padding-x-xl;
}
@include media-down(sm) {
padding: 0 $card-padding-x-sm;
}
@include media-down(sm) {
padding: 0 $card-padding-x-sm;
}
}
@@ -1,5 +1,9 @@
@import "../../../imports";
.item-list {
}
.items-list-page {
.title-search-block {
@@ -313,12 +317,7 @@
text-align: left;
}
}
}
}
}