laravel-6 support
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,119 +1,149 @@
|
||||
@media screen and (max-width: 768px) {
|
||||
#main {
|
||||
padding: 0px;
|
||||
}
|
||||
#nav {
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
#content > .row {
|
||||
margin: 0px;
|
||||
}
|
||||
}
|
||||
/* General */
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
#main {
|
||||
border-left: 1px solid silver;
|
||||
}
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
#wrapper > .panel {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#wrapper > .panel > .panel-heading {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#wrapper > .panel > .panel-heading > .panel-title {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
#wrapper > .row {
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
#fab a:hover, #fab a:focus{
|
||||
color: white;
|
||||
}
|
||||
|
||||
.item_name {
|
||||
width: 120px;
|
||||
overflow:hidden;
|
||||
white-space:nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.clickable {
|
||||
a {
|
||||
color: #333844;
|
||||
text-decoration: none !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.img-preview {
|
||||
background-color: #f7f7f7;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 200px;
|
||||
#nav a, #fab a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
#nav, #nav .dropdown-menu, .bg-main {
|
||||
background-color: #333844;
|
||||
}
|
||||
|
||||
.square {
|
||||
width: 100%;
|
||||
padding-bottom: 100%;
|
||||
position: relative;
|
||||
border: 1px solid rgb(221, 221, 221);
|
||||
border-radius: 3px;
|
||||
// max-width: 210px;
|
||||
max-height: 210px;
|
||||
#nav .dropdown-menu > a:hover {
|
||||
color: #333844;
|
||||
}
|
||||
.visible-xs .square {
|
||||
width: 60px;
|
||||
|
||||
#actions {
|
||||
display: flex;
|
||||
}
|
||||
.square > img {
|
||||
padding: 5px;
|
||||
position: absolute;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
margin: 0 auto;
|
||||
|
||||
#actions > a {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.square > i {
|
||||
font-size: 80px;
|
||||
padding: 5px;
|
||||
position: absolute;
|
||||
top: calc(50% - 40px);
|
||||
left: calc(50% - 40px);
|
||||
}
|
||||
.visible-xs .square > i {
|
||||
font-size: 50px;
|
||||
padding: 0px auto;
|
||||
padding-top: 5px;
|
||||
top: calc(50% - 25px);
|
||||
left: calc(50% - 25px);
|
||||
line-height: 4rem;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
.caption {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 20px;
|
||||
#actions > a > i {
|
||||
margin-right: .25rem;
|
||||
}
|
||||
.caption > .btn-group {
|
||||
|
||||
#actions > a + a {
|
||||
border-left: 1px solid #dee2e6;
|
||||
}
|
||||
|
||||
#multi_selection_toggle > i {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.breadcrumb-item:not(.active) {
|
||||
transition: .2s color;
|
||||
}
|
||||
|
||||
.breadcrumb-item:not(.active):hover {
|
||||
cursor: pointer;
|
||||
color: #75C7C3;
|
||||
}
|
||||
|
||||
#main {
|
||||
width: 100%;
|
||||
}
|
||||
.caption > .btn-group > .item_name {
|
||||
width: calc(100% - 25px);
|
||||
}
|
||||
.caption > .btn-group > .dropdown-toggle {
|
||||
width: 25px;
|
||||
|
||||
@media screen and (min-width: 992px) {
|
||||
#main {
|
||||
width: calc(100% - 300px);
|
||||
/*margin-left: 1rem;*/
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.invisible-lg {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
#lfm-loader{
|
||||
#tree {
|
||||
background-color: white;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 991px) {
|
||||
#tree {
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
left: 0;
|
||||
transform: translateX(-100%);
|
||||
transition: 1s transform;
|
||||
}
|
||||
|
||||
#tree.in {
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
#empty {
|
||||
height: 60vh;
|
||||
color: #333844;
|
||||
}
|
||||
|
||||
#empty:not(.d-none) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#empty > i {
|
||||
font-size: 10rem;
|
||||
}
|
||||
|
||||
.carousel-image {
|
||||
height: 50vh;
|
||||
background-position: center;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.carousel-indicators {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.carousel-label, .carousel-label:hover {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
background: linear-gradient(transparent 10px, rgba(0, 0, 0, .4), rgba(0, 0, 0, .5));
|
||||
padding: 40px 20px 30px;
|
||||
width: 100%;
|
||||
color: white;
|
||||
word-break: break-word;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.carousel-control-background {
|
||||
border-radius: 50%;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
box-shadow: 0 0 10px #666;
|
||||
background-color: #666;
|
||||
}
|
||||
|
||||
#uploadForm > .dz-default.dz-message {
|
||||
border: 2px dashed #ccc;
|
||||
border-radius: 5px;
|
||||
color: #aaa;
|
||||
margin: 0;
|
||||
padding: 3rem 0;
|
||||
}
|
||||
|
||||
/* Loader */
|
||||
|
||||
#lfm-loader {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
@@ -131,19 +161,227 @@
|
||||
vertical-align: middle;
|
||||
height: 100%;
|
||||
}
|
||||
#lfm-loader img{
|
||||
#lfm-loader img {
|
||||
width: 100px;
|
||||
margin: 0 auto;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.table-list-view{
|
||||
margin-bottom: 120px;
|
||||
/* Sidebar */
|
||||
|
||||
.nav-pills > .nav-item > .nav-link {
|
||||
height: 5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.table-list-view .actions{
|
||||
|
||||
.nav-pills > .sub-item > .nav-link {
|
||||
height: 3rem;
|
||||
padding-left: 3rem;
|
||||
}
|
||||
|
||||
.nav-pills > li.active > a, .nav-pills > li:hover > a {
|
||||
background-color: #ddd;
|
||||
border-radius: 0;
|
||||
color: #333844;
|
||||
}
|
||||
|
||||
/* Items */
|
||||
|
||||
#pagination > ul.pagination {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#pagination.preserve_actions_space {
|
||||
padding-top: 1em;
|
||||
padding-bottom: 4rem; /* preserve space for main actions */
|
||||
}
|
||||
|
||||
.square {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: .5rem;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.grid a {
|
||||
margin: .5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.list a {
|
||||
border-top: 1px solid rgb(221, 221, 221);
|
||||
padding: 5px;
|
||||
margin-top: 0;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.list a:last-child {
|
||||
border-bottom: 1px solid rgb(221, 221, 221);
|
||||
}
|
||||
|
||||
.grid .square {
|
||||
border: 1px solid rgb(221, 221, 221);
|
||||
width: 135px;
|
||||
height: 135px;
|
||||
}
|
||||
|
||||
.list .square {
|
||||
margin-right: 1rem;
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
}
|
||||
|
||||
.square > div {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.square > i {
|
||||
color: #333844;
|
||||
}
|
||||
.grid .square > i {
|
||||
padding: 20px;
|
||||
font-size: 80px;
|
||||
}
|
||||
.list .square > i {
|
||||
padding: 10px;
|
||||
font-size: 50px;
|
||||
}
|
||||
|
||||
.grid .square.selected {
|
||||
border: 5px solid #75C7C3;
|
||||
}
|
||||
.list .square.selected {
|
||||
border: 4px solid #75C7C3;
|
||||
}
|
||||
.square.selected {
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.grid .item_name {
|
||||
border: 1px solid rgb(221, 221, 221);
|
||||
border-top: none;
|
||||
margin-top: -1px;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
max-width: calc(135px);
|
||||
}
|
||||
|
||||
.list .item_name {
|
||||
font-size: 1.25rem;
|
||||
padding: 5px 0 5px;
|
||||
}
|
||||
|
||||
time {
|
||||
font-size: .9rem;
|
||||
}
|
||||
|
||||
.grid time {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.info > * {
|
||||
max-width: calc(100vw - 70px - 60px);
|
||||
}
|
||||
|
||||
/* Mime icon generator overwrite */
|
||||
|
||||
.grid .mime-icon:before {
|
||||
top: calc(45% - 1rem);
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.list .mime-icon .ico:before {
|
||||
top: calc(45% - .5rem);
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.mime-icon .ico {
|
||||
height: 100%;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* Floating action buttons */
|
||||
|
||||
.fab-wrapper {
|
||||
margin: 1.5rem;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
.fab-wrapper .fab-button {
|
||||
position: relative;
|
||||
background-color: #333844;
|
||||
width: 3.5rem;
|
||||
height: 3.5rem;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1.25rem;
|
||||
box-shadow: 0 0 4px rgba(0, 0, 0, 0.14), 0 4px 8px rgba(0, 0, 0, 0.28);
|
||||
}
|
||||
|
||||
.fab-wrapper .fab-toggle {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.fab-wrapper .fab-toggle i {
|
||||
-webkit-transform: scale(1) rotate(0deg);
|
||||
transform: scale(1) rotate(0deg);
|
||||
-webkit-transition: -webkit-transform 350ms;
|
||||
transition: transform 350ms;
|
||||
}
|
||||
|
||||
.fab-wrapper.fab-expand .fab-toggle i {
|
||||
-webkit-transform: scale(1) rotate(-225deg);
|
||||
transform: scale(1) rotate(-225deg);
|
||||
-webkit-transition: -webkit-transform 350ms;
|
||||
transition: transform 350ms;
|
||||
}
|
||||
|
||||
.fab-wrapper .fab-action {
|
||||
z-index: -1;
|
||||
margin-bottom: -3.5rem;
|
||||
opacity: 0;
|
||||
transition: margin-bottom 350ms, opacity 350ms;
|
||||
}
|
||||
|
||||
.fab-wrapper.fab-expand .fab-action {
|
||||
margin-bottom: 1rem;
|
||||
opacity: 1;
|
||||
transition: margin-bottom 350ms, opacity 350ms;
|
||||
}
|
||||
|
||||
.fab-wrapper .fab-action:before {
|
||||
position: absolute;
|
||||
right: 4rem;
|
||||
padding: .15rem .75rem;
|
||||
border-radius: .25rem;
|
||||
background-color: rgba(0, 0, 0, .4);
|
||||
color: rgba(255, 255, 255, .8);
|
||||
text-align: right;
|
||||
font-size: .9rem;
|
||||
white-space: nowrap;
|
||||
content: attr(data-label);
|
||||
}
|
||||
.table-list-view .actions a:hover{
|
||||
text-decoration: none;
|
||||
}
|
@@ -1,671 +0,0 @@
|
||||
/**
|
||||
* CONTENTS
|
||||
*
|
||||
* #Introduction........Naming conventions used throughout the code.
|
||||
*
|
||||
* #SETTINGS
|
||||
* Variables............Globally-available variables and config.
|
||||
*
|
||||
* #TOOLS
|
||||
* Mixins...............Useful mixins.
|
||||
*
|
||||
* #GENERIC
|
||||
* Demo styles..........Styles for demo only (consider removing these).
|
||||
*
|
||||
* #BASE
|
||||
* Raw styles...........The very basic component wrapper.
|
||||
* Modifiers............The basic styles dependant on component placement.
|
||||
* Debuggers............The basic styles dependant on component placement.
|
||||
*
|
||||
* #BUTTONS
|
||||
* Base..................Wrapping and constraining every button.
|
||||
* Modifiers.............Styles that depends on state and settings.
|
||||
* Animations............Main animations of the component.
|
||||
* Debuggers.............Styles for development.
|
||||
*
|
||||
* #LABELS
|
||||
* Base..................Wrapping and constraining every label.
|
||||
* Modifiers.............Styles that depends on state and settings.
|
||||
* Debuggers.............Styles for development.
|
||||
*
|
||||
* #DEVELOPMENT
|
||||
* In development........These styles are in development and not yet finalised
|
||||
* Debuggers.............Helper styles and flags for development.
|
||||
*/
|
||||
/*------------------------------------*\
|
||||
#Introduction
|
||||
\*------------------------------------*/
|
||||
/**
|
||||
* The code AND the comments use naming conventions to refer to each part of
|
||||
* the UI put in place by this component. If you see that somewhere they are
|
||||
* not followed please consider a Pull Request. The naming conventions are:
|
||||
*
|
||||
* "Component" : the widget itself as a whole. This is the last time it will be
|
||||
* called anything different than "component". So, stay away from
|
||||
* "widget", "button" or anything else when referring to the
|
||||
* Component in general.
|
||||
*
|
||||
* "Main Button" : the button that is always in view. Hovering or clicking on it
|
||||
* will reveal the child buttons.
|
||||
*
|
||||
* "Child buttons" : if you've read the previous point you know what they are.
|
||||
* Did you read the previous point? :)
|
||||
*
|
||||
* "Label(s)" : the tooltip that fades in when hovering over a button.
|
||||
|
||||
/*------------------------------------*\
|
||||
#SETTINGS | Variables
|
||||
\*------------------------------------*/
|
||||
/**
|
||||
* These variables are the default styles that serve as fallback and can be
|
||||
* easily customised at compile time.
|
||||
* Consider overriding them in your own style sheets rather than editing them
|
||||
* here. Refer to the docs for more info.
|
||||
*/
|
||||
/* COLORS ----------------------------*/
|
||||
/* EFFECTS ---------------------------*/
|
||||
/* SPEEDS ----------------------------*/
|
||||
/* SIZES -----------------------------*/
|
||||
/* SPACING ---------------------------*/
|
||||
/* OTHER VARIABLES -------------------*/
|
||||
/*------------------------------------*\
|
||||
#BASE | Raw styles
|
||||
\*------------------------------------*/
|
||||
/**
|
||||
* The very core styling of the button.
|
||||
* These styles are shared by every instance of the button.
|
||||
* Styles placed here should NOT care about placement in the screen,
|
||||
* options chosen by the user or state of the button.
|
||||
*/
|
||||
.mfb-component--tl, .mfb-component--tr, .mfb-component--bl, .mfb-component--br {
|
||||
box-sizing: border-box;
|
||||
margin: 25px;
|
||||
position: fixed;
|
||||
white-space: nowrap;
|
||||
z-index: 30;
|
||||
padding-left: 0;
|
||||
list-style: none; }
|
||||
.mfb-component--tl *, .mfb-component--tr *, .mfb-component--bl *, .mfb-component--br *, .mfb-component--tl *:before, .mfb-component--tr *:before, .mfb-component--bl *:before, .mfb-component--br *:before, .mfb-component--tl *:after, .mfb-component--tr *:after, .mfb-component--bl *:after, .mfb-component--br *:after {
|
||||
box-sizing: inherit; }
|
||||
|
||||
/*------------------------------------*\
|
||||
#BASE | Modifiers
|
||||
\*------------------------------------*/
|
||||
/**
|
||||
* These styles depends on the placement of the button.
|
||||
* Styles can be:
|
||||
* 1. Top-left: modified by the " --tl " suffix.
|
||||
* 2. Top-right: modified by the " --tr " suffix.
|
||||
* 3. Bottom-left: modified by the " --bl " suffix.
|
||||
* 4. Bottom-right: modified by the " --br " suffix.
|
||||
*/
|
||||
.mfb-component--tl {
|
||||
left: 0;
|
||||
top: 0; }
|
||||
|
||||
.mfb-component--tr {
|
||||
right: 0;
|
||||
top: 0; }
|
||||
|
||||
.mfb-component--bl {
|
||||
left: 0;
|
||||
bottom: 0; }
|
||||
|
||||
.mfb-component--br {
|
||||
right: 0;
|
||||
bottom: 0; }
|
||||
|
||||
/*------------------------------------*\
|
||||
#BUTTONS | Base
|
||||
\*------------------------------------*/
|
||||
.mfb-component__button--main, .mfb-component__button--child {
|
||||
background-color: #75C7C3;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 4px rgba(0, 0, 0, 0.14), 0 4px 8px rgba(0, 0, 0, 0.28);
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
-webkit-user-drag: none;
|
||||
color: #f1f1f1; }
|
||||
|
||||
/**
|
||||
* This is the unordered list for the list items that contain
|
||||
* the child buttons.
|
||||
*
|
||||
*/
|
||||
.mfb-component__list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0; }
|
||||
.mfb-component__list > li {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 1px;
|
||||
padding: 10px 0;
|
||||
margin: -10px 0; }
|
||||
|
||||
/**
|
||||
* These are the basic styles for all the icons inside the main button
|
||||
*/
|
||||
.mfb-component__icon, .mfb-component__main-icon--active,
|
||||
.mfb-component__main-icon--resting, .mfb-component__child-icon {
|
||||
position: absolute;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
line-height: 56px;
|
||||
width: 100%; }
|
||||
|
||||
.mfb-component__wrap {
|
||||
padding: 25px;
|
||||
margin: -25px; }
|
||||
|
||||
[data-mfb-toggle="hover"]:hover .mfb-component__icon, [data-mfb-toggle="hover"]:hover .mfb-component__main-icon--active,
|
||||
[data-mfb-toggle="hover"]:hover .mfb-component__main-icon--resting, [data-mfb-toggle="hover"]:hover .mfb-component__child-icon,
|
||||
[data-mfb-state="open"] .mfb-component__icon,
|
||||
[data-mfb-state="open"] .mfb-component__main-icon--active,
|
||||
[data-mfb-state="open"] .mfb-component__main-icon--resting,
|
||||
[data-mfb-state="open"] .mfb-component__child-icon {
|
||||
-webkit-transform: scale(1) rotate(0deg);
|
||||
transform: scale(1) rotate(0deg); }
|
||||
|
||||
/*------------------------------------*\
|
||||
#BUTTONS | Modifiers
|
||||
\*------------------------------------*/
|
||||
.mfb-component__button--main {
|
||||
height: 56px;
|
||||
width: 56px;
|
||||
z-index: 20; }
|
||||
|
||||
.mfb-component__button--child {
|
||||
height: 56px;
|
||||
width: 56px; }
|
||||
|
||||
.mfb-component__main-icon--active,
|
||||
.mfb-component__main-icon--resting {
|
||||
-webkit-transform: scale(1) rotate(360deg);
|
||||
transform: scale(1) rotate(360deg);
|
||||
-webkit-transition: -webkit-transform 150ms cubic-bezier(0.4, 0, 1, 1);
|
||||
transition: transform 150ms cubic-bezier(0.4, 0, 1, 1); }
|
||||
|
||||
.mfb-component__child-icon,
|
||||
.mfb-component__child-icon {
|
||||
line-height: 56px;
|
||||
font-size: 18px; }
|
||||
|
||||
.mfb-component__main-icon--active {
|
||||
opacity: 0; }
|
||||
|
||||
[data-mfb-toggle="hover"]:hover .mfb-component__main-icon,
|
||||
[data-mfb-state="open"] .mfb-component__main-icon {
|
||||
-webkit-transform: scale(1) rotate(0deg);
|
||||
transform: scale(1) rotate(0deg); }
|
||||
[data-mfb-toggle="hover"]:hover .mfb-component__main-icon--resting,
|
||||
[data-mfb-state="open"] .mfb-component__main-icon--resting {
|
||||
opacity: 0;
|
||||
position: absolute !important; }
|
||||
[data-mfb-toggle="hover"]:hover .mfb-component__main-icon--active,
|
||||
[data-mfb-state="open"] .mfb-component__main-icon--active {
|
||||
opacity: 1; }
|
||||
|
||||
/*------------------------------------*\
|
||||
#BUTTONS | Animations
|
||||
\*------------------------------------*/
|
||||
/**
|
||||
* SLIDE IN + FADE
|
||||
* When hovering the main button, the child buttons slide out from beneath
|
||||
* the main button while transitioning from transparent to opaque.
|
||||
*
|
||||
*/
|
||||
.mfb-component--tl.mfb-slidein .mfb-component__list li,
|
||||
.mfb-component--tr.mfb-slidein .mfb-component__list li {
|
||||
opacity: 0;
|
||||
transition: all 0.5s; }
|
||||
.mfb-component--tl.mfb-slidein[data-mfb-toggle="hover"]:hover .mfb-component__list li, .mfb-component--tl.mfb-slidein[data-mfb-state="open"] .mfb-component__list li,
|
||||
.mfb-component--tr.mfb-slidein[data-mfb-toggle="hover"]:hover .mfb-component__list li,
|
||||
.mfb-component--tr.mfb-slidein[data-mfb-state="open"] .mfb-component__list li {
|
||||
opacity: 1; }
|
||||
.mfb-component--tl.mfb-slidein[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(1), .mfb-component--tl.mfb-slidein[data-mfb-state="open"] .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--tr.mfb-slidein[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--tr.mfb-slidein[data-mfb-state="open"] .mfb-component__list li:nth-child(1) {
|
||||
-webkit-transform: translateY(70px);
|
||||
transform: translateY(70px); }
|
||||
.mfb-component--tl.mfb-slidein[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(2), .mfb-component--tl.mfb-slidein[data-mfb-state="open"] .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--tr.mfb-slidein[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--tr.mfb-slidein[data-mfb-state="open"] .mfb-component__list li:nth-child(2) {
|
||||
-webkit-transform: translateY(140px);
|
||||
transform: translateY(140px); }
|
||||
.mfb-component--tl.mfb-slidein[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(3), .mfb-component--tl.mfb-slidein[data-mfb-state="open"] .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--tr.mfb-slidein[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--tr.mfb-slidein[data-mfb-state="open"] .mfb-component__list li:nth-child(3) {
|
||||
-webkit-transform: translateY(210px);
|
||||
transform: translateY(210px); }
|
||||
.mfb-component--tl.mfb-slidein[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(4), .mfb-component--tl.mfb-slidein[data-mfb-state="open"] .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--tr.mfb-slidein[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--tr.mfb-slidein[data-mfb-state="open"] .mfb-component__list li:nth-child(4) {
|
||||
-webkit-transform: translateY(280px);
|
||||
transform: translateY(280px); }
|
||||
|
||||
.mfb-component--bl.mfb-slidein .mfb-component__list li,
|
||||
.mfb-component--br.mfb-slidein .mfb-component__list li {
|
||||
opacity: 0;
|
||||
transition: all 0.5s; }
|
||||
.mfb-component--bl.mfb-slidein[data-mfb-toggle="hover"]:hover .mfb-component__list li, .mfb-component--bl.mfb-slidein[data-mfb-state="open"] .mfb-component__list li,
|
||||
.mfb-component--br.mfb-slidein[data-mfb-toggle="hover"]:hover .mfb-component__list li,
|
||||
.mfb-component--br.mfb-slidein[data-mfb-state="open"] .mfb-component__list li {
|
||||
opacity: 1; }
|
||||
.mfb-component--bl.mfb-slidein[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(1), .mfb-component--bl.mfb-slidein[data-mfb-state="open"] .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--br.mfb-slidein[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--br.mfb-slidein[data-mfb-state="open"] .mfb-component__list li:nth-child(1) {
|
||||
-webkit-transform: translateY(-70px);
|
||||
transform: translateY(-70px); }
|
||||
.mfb-component--bl.mfb-slidein[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(2), .mfb-component--bl.mfb-slidein[data-mfb-state="open"] .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--br.mfb-slidein[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--br.mfb-slidein[data-mfb-state="open"] .mfb-component__list li:nth-child(2) {
|
||||
-webkit-transform: translateY(-140px);
|
||||
transform: translateY(-140px); }
|
||||
.mfb-component--bl.mfb-slidein[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(3), .mfb-component--bl.mfb-slidein[data-mfb-state="open"] .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--br.mfb-slidein[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--br.mfb-slidein[data-mfb-state="open"] .mfb-component__list li:nth-child(3) {
|
||||
-webkit-transform: translateY(-210px);
|
||||
transform: translateY(-210px); }
|
||||
.mfb-component--bl.mfb-slidein[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(4), .mfb-component--bl.mfb-slidein[data-mfb-state="open"] .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--br.mfb-slidein[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--br.mfb-slidein[data-mfb-state="open"] .mfb-component__list li:nth-child(4) {
|
||||
-webkit-transform: translateY(-280px);
|
||||
transform: translateY(-280px); }
|
||||
|
||||
/**
|
||||
* SLIDE IN SPRING
|
||||
* Same as slide-in but with a springy animation.
|
||||
*
|
||||
*/
|
||||
.mfb-component--tl.mfb-slidein-spring .mfb-component__list li,
|
||||
.mfb-component--tr.mfb-slidein-spring .mfb-component__list li {
|
||||
opacity: 0;
|
||||
transition: all 0.5s;
|
||||
transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); }
|
||||
.mfb-component--tl.mfb-slidein-spring .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--tr.mfb-slidein-spring .mfb-component__list li:nth-child(1) {
|
||||
transition-delay: 0.05s; }
|
||||
.mfb-component--tl.mfb-slidein-spring .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--tr.mfb-slidein-spring .mfb-component__list li:nth-child(2) {
|
||||
transition-delay: 0.1s; }
|
||||
.mfb-component--tl.mfb-slidein-spring .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--tr.mfb-slidein-spring .mfb-component__list li:nth-child(3) {
|
||||
transition-delay: 0.15s; }
|
||||
.mfb-component--tl.mfb-slidein-spring .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--tr.mfb-slidein-spring .mfb-component__list li:nth-child(4) {
|
||||
transition-delay: 0.2s; }
|
||||
.mfb-component--tl.mfb-slidein-spring[data-mfb-toggle="hover"]:hover .mfb-component__list li, .mfb-component--tl.mfb-slidein-spring[data-mfb-state="open"] .mfb-component__list li,
|
||||
.mfb-component--tr.mfb-slidein-spring[data-mfb-toggle="hover"]:hover .mfb-component__list li,
|
||||
.mfb-component--tr.mfb-slidein-spring[data-mfb-state="open"] .mfb-component__list li {
|
||||
opacity: 1; }
|
||||
.mfb-component--tl.mfb-slidein-spring[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(1), .mfb-component--tl.mfb-slidein-spring[data-mfb-state="open"] .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--tr.mfb-slidein-spring[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--tr.mfb-slidein-spring[data-mfb-state="open"] .mfb-component__list li:nth-child(1) {
|
||||
transition-delay: 0.05s;
|
||||
-webkit-transform: translateY(70px);
|
||||
transform: translateY(70px); }
|
||||
.mfb-component--tl.mfb-slidein-spring[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(2), .mfb-component--tl.mfb-slidein-spring[data-mfb-state="open"] .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--tr.mfb-slidein-spring[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--tr.mfb-slidein-spring[data-mfb-state="open"] .mfb-component__list li:nth-child(2) {
|
||||
transition-delay: 0.1s;
|
||||
-webkit-transform: translateY(140px);
|
||||
transform: translateY(140px); }
|
||||
.mfb-component--tl.mfb-slidein-spring[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(3), .mfb-component--tl.mfb-slidein-spring[data-mfb-state="open"] .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--tr.mfb-slidein-spring[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--tr.mfb-slidein-spring[data-mfb-state="open"] .mfb-component__list li:nth-child(3) {
|
||||
transition-delay: 0.15s;
|
||||
-webkit-transform: translateY(210px);
|
||||
transform: translateY(210px); }
|
||||
.mfb-component--tl.mfb-slidein-spring[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(4), .mfb-component--tl.mfb-slidein-spring[data-mfb-state="open"] .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--tr.mfb-slidein-spring[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--tr.mfb-slidein-spring[data-mfb-state="open"] .mfb-component__list li:nth-child(4) {
|
||||
transition-delay: 0.2s;
|
||||
-webkit-transform: translateY(280px);
|
||||
transform: translateY(280px); }
|
||||
|
||||
.mfb-component--bl.mfb-slidein-spring .mfb-component__list li,
|
||||
.mfb-component--br.mfb-slidein-spring .mfb-component__list li {
|
||||
opacity: 0;
|
||||
transition: all 0.5s;
|
||||
transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); }
|
||||
.mfb-component--bl.mfb-slidein-spring .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--br.mfb-slidein-spring .mfb-component__list li:nth-child(1) {
|
||||
transition-delay: 0.05s; }
|
||||
.mfb-component--bl.mfb-slidein-spring .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--br.mfb-slidein-spring .mfb-component__list li:nth-child(2) {
|
||||
transition-delay: 0.1s; }
|
||||
.mfb-component--bl.mfb-slidein-spring .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--br.mfb-slidein-spring .mfb-component__list li:nth-child(3) {
|
||||
transition-delay: 0.15s; }
|
||||
.mfb-component--bl.mfb-slidein-spring .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--br.mfb-slidein-spring .mfb-component__list li:nth-child(4) {
|
||||
transition-delay: 0.2s; }
|
||||
.mfb-component--bl.mfb-slidein-spring[data-mfb-toggle="hover"]:hover .mfb-component__list li, .mfb-component--bl.mfb-slidein-spring[data-mfb-state="open"] .mfb-component__list li,
|
||||
.mfb-component--br.mfb-slidein-spring[data-mfb-toggle="hover"]:hover .mfb-component__list li,
|
||||
.mfb-component--br.mfb-slidein-spring[data-mfb-state="open"] .mfb-component__list li {
|
||||
opacity: 1; }
|
||||
.mfb-component--bl.mfb-slidein-spring[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(1), .mfb-component--bl.mfb-slidein-spring[data-mfb-state="open"] .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--br.mfb-slidein-spring[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--br.mfb-slidein-spring[data-mfb-state="open"] .mfb-component__list li:nth-child(1) {
|
||||
transition-delay: 0.05s;
|
||||
-webkit-transform: translateY(-70px);
|
||||
transform: translateY(-70px); }
|
||||
.mfb-component--bl.mfb-slidein-spring[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(2), .mfb-component--bl.mfb-slidein-spring[data-mfb-state="open"] .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--br.mfb-slidein-spring[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--br.mfb-slidein-spring[data-mfb-state="open"] .mfb-component__list li:nth-child(2) {
|
||||
transition-delay: 0.1s;
|
||||
-webkit-transform: translateY(-140px);
|
||||
transform: translateY(-140px); }
|
||||
.mfb-component--bl.mfb-slidein-spring[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(3), .mfb-component--bl.mfb-slidein-spring[data-mfb-state="open"] .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--br.mfb-slidein-spring[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--br.mfb-slidein-spring[data-mfb-state="open"] .mfb-component__list li:nth-child(3) {
|
||||
transition-delay: 0.15s;
|
||||
-webkit-transform: translateY(-210px);
|
||||
transform: translateY(-210px); }
|
||||
.mfb-component--bl.mfb-slidein-spring[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(4), .mfb-component--bl.mfb-slidein-spring[data-mfb-state="open"] .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--br.mfb-slidein-spring[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--br.mfb-slidein-spring[data-mfb-state="open"] .mfb-component__list li:nth-child(4) {
|
||||
transition-delay: 0.2s;
|
||||
-webkit-transform: translateY(-280px);
|
||||
transform: translateY(-280px); }
|
||||
|
||||
/**
|
||||
* ZOOM-IN
|
||||
* When hovering the main button, the child buttons grow
|
||||
* from zero to normal size.
|
||||
*
|
||||
*/
|
||||
.mfb-component--tl.mfb-zoomin .mfb-component__list li,
|
||||
.mfb-component--tr.mfb-zoomin .mfb-component__list li {
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0); }
|
||||
.mfb-component--tl.mfb-zoomin .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--tr.mfb-zoomin .mfb-component__list li:nth-child(1) {
|
||||
-webkit-transform: translateY(70px) scale(0);
|
||||
transform: translateY(70px) scale(0);
|
||||
transition: all 0.5s;
|
||||
transition-delay: 0.15s; }
|
||||
.mfb-component--tl.mfb-zoomin .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--tr.mfb-zoomin .mfb-component__list li:nth-child(2) {
|
||||
-webkit-transform: translateY(140px) scale(0);
|
||||
transform: translateY(140px) scale(0);
|
||||
transition: all 0.5s;
|
||||
transition-delay: 0.1s; }
|
||||
.mfb-component--tl.mfb-zoomin .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--tr.mfb-zoomin .mfb-component__list li:nth-child(3) {
|
||||
-webkit-transform: translateY(210px) scale(0);
|
||||
transform: translateY(210px) scale(0);
|
||||
transition: all 0.5s;
|
||||
transition-delay: 0.05s; }
|
||||
.mfb-component--tl.mfb-zoomin .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--tr.mfb-zoomin .mfb-component__list li:nth-child(4) {
|
||||
-webkit-transform: translateY(280px) scale(0);
|
||||
transform: translateY(280px) scale(0);
|
||||
transition: all 0.5s;
|
||||
transition-delay: 0s; }
|
||||
.mfb-component--tl.mfb-zoomin[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(1), .mfb-component--tl.mfb-zoomin[data-mfb-state="open"] .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--tr.mfb-zoomin[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--tr.mfb-zoomin[data-mfb-state="open"] .mfb-component__list li:nth-child(1) {
|
||||
-webkit-transform: translateY(70px) scale(1);
|
||||
transform: translateY(70px) scale(1);
|
||||
transition-delay: 0.05s; }
|
||||
.mfb-component--tl.mfb-zoomin[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(2), .mfb-component--tl.mfb-zoomin[data-mfb-state="open"] .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--tr.mfb-zoomin[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--tr.mfb-zoomin[data-mfb-state="open"] .mfb-component__list li:nth-child(2) {
|
||||
-webkit-transform: translateY(140px) scale(1);
|
||||
transform: translateY(140px) scale(1);
|
||||
transition-delay: 0.1s; }
|
||||
.mfb-component--tl.mfb-zoomin[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(3), .mfb-component--tl.mfb-zoomin[data-mfb-state="open"] .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--tr.mfb-zoomin[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--tr.mfb-zoomin[data-mfb-state="open"] .mfb-component__list li:nth-child(3) {
|
||||
-webkit-transform: translateY(210px) scale(1);
|
||||
transform: translateY(210px) scale(1);
|
||||
transition-delay: 0.15s; }
|
||||
.mfb-component--tl.mfb-zoomin[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(4), .mfb-component--tl.mfb-zoomin[data-mfb-state="open"] .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--tr.mfb-zoomin[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--tr.mfb-zoomin[data-mfb-state="open"] .mfb-component__list li:nth-child(4) {
|
||||
-webkit-transform: translateY(280px) scale(1);
|
||||
transform: translateY(280px) scale(1);
|
||||
transition-delay: 0.2s; }
|
||||
|
||||
.mfb-component--bl.mfb-zoomin .mfb-component__list li,
|
||||
.mfb-component--br.mfb-zoomin .mfb-component__list li {
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0); }
|
||||
.mfb-component--bl.mfb-zoomin .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--br.mfb-zoomin .mfb-component__list li:nth-child(1) {
|
||||
-webkit-transform: translateY(-70px) scale(0);
|
||||
transform: translateY(-70px) scale(0);
|
||||
transition: all 0.5s;
|
||||
transition-delay: 0.15s; }
|
||||
.mfb-component--bl.mfb-zoomin .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--br.mfb-zoomin .mfb-component__list li:nth-child(2) {
|
||||
-webkit-transform: translateY(-140px) scale(0);
|
||||
transform: translateY(-140px) scale(0);
|
||||
transition: all 0.5s;
|
||||
transition-delay: 0.1s; }
|
||||
.mfb-component--bl.mfb-zoomin .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--br.mfb-zoomin .mfb-component__list li:nth-child(3) {
|
||||
-webkit-transform: translateY(-210px) scale(0);
|
||||
transform: translateY(-210px) scale(0);
|
||||
transition: all 0.5s;
|
||||
transition-delay: 0.05s; }
|
||||
.mfb-component--bl.mfb-zoomin .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--br.mfb-zoomin .mfb-component__list li:nth-child(4) {
|
||||
-webkit-transform: translateY(-280px) scale(0);
|
||||
transform: translateY(-280px) scale(0);
|
||||
transition: all 0.5s;
|
||||
transition-delay: 0s; }
|
||||
.mfb-component--bl.mfb-zoomin[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(1), .mfb-component--bl.mfb-zoomin[data-mfb-state="open"] .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--br.mfb-zoomin[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--br.mfb-zoomin[data-mfb-state="open"] .mfb-component__list li:nth-child(1) {
|
||||
-webkit-transform: translateY(-70px) scale(1);
|
||||
transform: translateY(-70px) scale(1);
|
||||
transition-delay: 0.05s; }
|
||||
.mfb-component--bl.mfb-zoomin[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(2), .mfb-component--bl.mfb-zoomin[data-mfb-state="open"] .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--br.mfb-zoomin[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--br.mfb-zoomin[data-mfb-state="open"] .mfb-component__list li:nth-child(2) {
|
||||
-webkit-transform: translateY(-140px) scale(1);
|
||||
transform: translateY(-140px) scale(1);
|
||||
transition-delay: 0.1s; }
|
||||
.mfb-component--bl.mfb-zoomin[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(3), .mfb-component--bl.mfb-zoomin[data-mfb-state="open"] .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--br.mfb-zoomin[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--br.mfb-zoomin[data-mfb-state="open"] .mfb-component__list li:nth-child(3) {
|
||||
-webkit-transform: translateY(-210px) scale(1);
|
||||
transform: translateY(-210px) scale(1);
|
||||
transition-delay: 0.15s; }
|
||||
.mfb-component--bl.mfb-zoomin[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(4), .mfb-component--bl.mfb-zoomin[data-mfb-state="open"] .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--br.mfb-zoomin[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--br.mfb-zoomin[data-mfb-state="open"] .mfb-component__list li:nth-child(4) {
|
||||
-webkit-transform: translateY(-280px) scale(1);
|
||||
transform: translateY(-280px) scale(1);
|
||||
transition-delay: 0.2s; }
|
||||
|
||||
/**
|
||||
* FOUNTAIN
|
||||
* When hovering the main button the child buttons
|
||||
* jump into view from outside the viewport
|
||||
*/
|
||||
.mfb-component--tl.mfb-fountain .mfb-component__list li,
|
||||
.mfb-component--tr.mfb-fountain .mfb-component__list li {
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0); }
|
||||
.mfb-component--tl.mfb-fountain .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--tr.mfb-fountain .mfb-component__list li:nth-child(1) {
|
||||
-webkit-transform: translateY(-70px) scale(0);
|
||||
transform: translateY(-70px) scale(0);
|
||||
transition: all 0.5s;
|
||||
transition-delay: 0.15s; }
|
||||
.mfb-component--tl.mfb-fountain .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--tr.mfb-fountain .mfb-component__list li:nth-child(2) {
|
||||
-webkit-transform: translateY(-140px) scale(0);
|
||||
transform: translateY(-140px) scale(0);
|
||||
transition: all 0.5s;
|
||||
transition-delay: 0.1s; }
|
||||
.mfb-component--tl.mfb-fountain .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--tr.mfb-fountain .mfb-component__list li:nth-child(3) {
|
||||
-webkit-transform: translateY(-210px) scale(0);
|
||||
transform: translateY(-210px) scale(0);
|
||||
transition: all 0.5s;
|
||||
transition-delay: 0.05s; }
|
||||
.mfb-component--tl.mfb-fountain .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--tr.mfb-fountain .mfb-component__list li:nth-child(4) {
|
||||
-webkit-transform: translateY(-280px) scale(0);
|
||||
transform: translateY(-280px) scale(0);
|
||||
transition: all 0.5s;
|
||||
transition-delay: 0s; }
|
||||
.mfb-component--tl.mfb-fountain[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(1), .mfb-component--tl.mfb-fountain[data-mfb-state="open"] .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--tr.mfb-fountain[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--tr.mfb-fountain[data-mfb-state="open"] .mfb-component__list li:nth-child(1) {
|
||||
-webkit-transform: translateY(70px) scale(1);
|
||||
transform: translateY(70px) scale(1);
|
||||
transition-delay: 0.05s; }
|
||||
.mfb-component--tl.mfb-fountain[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(2), .mfb-component--tl.mfb-fountain[data-mfb-state="open"] .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--tr.mfb-fountain[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--tr.mfb-fountain[data-mfb-state="open"] .mfb-component__list li:nth-child(2) {
|
||||
-webkit-transform: translateY(140px) scale(1);
|
||||
transform: translateY(140px) scale(1);
|
||||
transition-delay: 0.1s; }
|
||||
.mfb-component--tl.mfb-fountain[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(3), .mfb-component--tl.mfb-fountain[data-mfb-state="open"] .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--tr.mfb-fountain[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--tr.mfb-fountain[data-mfb-state="open"] .mfb-component__list li:nth-child(3) {
|
||||
-webkit-transform: translateY(210px) scale(1);
|
||||
transform: translateY(210px) scale(1);
|
||||
transition-delay: 0.15s; }
|
||||
.mfb-component--tl.mfb-fountain[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(4), .mfb-component--tl.mfb-fountain[data-mfb-state="open"] .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--tr.mfb-fountain[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--tr.mfb-fountain[data-mfb-state="open"] .mfb-component__list li:nth-child(4) {
|
||||
-webkit-transform: translateY(280px) scale(1);
|
||||
transform: translateY(280px) scale(1);
|
||||
transition-delay: 0.2s; }
|
||||
|
||||
.mfb-component--bl.mfb-fountain .mfb-component__list li,
|
||||
.mfb-component--br.mfb-fountain .mfb-component__list li {
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0); }
|
||||
.mfb-component--bl.mfb-fountain .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--br.mfb-fountain .mfb-component__list li:nth-child(1) {
|
||||
-webkit-transform: translateY(70px) scale(0);
|
||||
transform: translateY(70px) scale(0);
|
||||
transition: all 0.5s;
|
||||
transition-delay: 0.15s; }
|
||||
.mfb-component--bl.mfb-fountain .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--br.mfb-fountain .mfb-component__list li:nth-child(2) {
|
||||
-webkit-transform: translateY(140px) scale(0);
|
||||
transform: translateY(140px) scale(0);
|
||||
transition: all 0.5s;
|
||||
transition-delay: 0.1s; }
|
||||
.mfb-component--bl.mfb-fountain .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--br.mfb-fountain .mfb-component__list li:nth-child(3) {
|
||||
-webkit-transform: translateY(210px) scale(0);
|
||||
transform: translateY(210px) scale(0);
|
||||
transition: all 0.5s;
|
||||
transition-delay: 0.05s; }
|
||||
.mfb-component--bl.mfb-fountain .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--br.mfb-fountain .mfb-component__list li:nth-child(4) {
|
||||
-webkit-transform: translateY(280px) scale(0);
|
||||
transform: translateY(280px) scale(0);
|
||||
transition: all 0.5s;
|
||||
transition-delay: 0s; }
|
||||
.mfb-component--bl.mfb-fountain[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(1), .mfb-component--bl.mfb-fountain[data-mfb-state="open"] .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--br.mfb-fountain[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(1),
|
||||
.mfb-component--br.mfb-fountain[data-mfb-state="open"] .mfb-component__list li:nth-child(1) {
|
||||
-webkit-transform: translateY(-70px) scale(1);
|
||||
transform: translateY(-70px) scale(1);
|
||||
transition-delay: 0.05s; }
|
||||
.mfb-component--bl.mfb-fountain[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(2), .mfb-component--bl.mfb-fountain[data-mfb-state="open"] .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--br.mfb-fountain[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(2),
|
||||
.mfb-component--br.mfb-fountain[data-mfb-state="open"] .mfb-component__list li:nth-child(2) {
|
||||
-webkit-transform: translateY(-140px) scale(1);
|
||||
transform: translateY(-140px) scale(1);
|
||||
transition-delay: 0.1s; }
|
||||
.mfb-component--bl.mfb-fountain[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(3), .mfb-component--bl.mfb-fountain[data-mfb-state="open"] .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--br.mfb-fountain[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(3),
|
||||
.mfb-component--br.mfb-fountain[data-mfb-state="open"] .mfb-component__list li:nth-child(3) {
|
||||
-webkit-transform: translateY(-210px) scale(1);
|
||||
transform: translateY(-210px) scale(1);
|
||||
transition-delay: 0.15s; }
|
||||
.mfb-component--bl.mfb-fountain[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(4), .mfb-component--bl.mfb-fountain[data-mfb-state="open"] .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--br.mfb-fountain[data-mfb-toggle="hover"]:hover .mfb-component__list li:nth-child(4),
|
||||
.mfb-component--br.mfb-fountain[data-mfb-state="open"] .mfb-component__list li:nth-child(4) {
|
||||
-webkit-transform: translateY(-280px) scale(1);
|
||||
transform: translateY(-280px) scale(1);
|
||||
transition-delay: 0.2s; }
|
||||
|
||||
/*------------------------------------*\
|
||||
#LABELS | base
|
||||
\*------------------------------------*/
|
||||
/**
|
||||
* These are the labels associated to each button,
|
||||
* exposed only when hovering the related button.
|
||||
* They are called labels but are in fact data-attributes of
|
||||
* each button (an anchor tag).
|
||||
*/
|
||||
[data-mfb-label]:after {
|
||||
content: attr(data-mfb-label);
|
||||
opacity: 0;
|
||||
transition: all 0.5s;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
padding: 4px 10px;
|
||||
border-radius: 3px;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
pointer-events: none;
|
||||
line-height: normal;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -11px;
|
||||
transition: all 0.5s; }
|
||||
|
||||
[data-mfb-toggle="hover"] [data-mfb-label]:hover:after,
|
||||
[data-mfb-state="open"] [data-mfb-label]:after {
|
||||
content: attr(data-mfb-label);
|
||||
opacity: 1;
|
||||
transition: all 0.3s; }
|
||||
|
||||
/*------------------------------------*\
|
||||
#LABELS | Modifiers
|
||||
\*------------------------------------*/
|
||||
.mfb-component--br [data-mfb-label]:after, .mfb-component--tr [data-mfb-label]:after {
|
||||
content: attr(data-mfb-label);
|
||||
right: 70px; }
|
||||
|
||||
.mfb-component--br .mfb-component__list [data-mfb-label]:after, .mfb-component--tr .mfb-component__list [data-mfb-label]:after {
|
||||
content: attr(data-mfb-label);
|
||||
right: 70px; }
|
||||
|
||||
.mfb-component--tl [data-mfb-label]:after, .mfb-component--bl [data-mfb-label]:after {
|
||||
content: attr(data-mfb-label);
|
||||
left: 70px; }
|
||||
|
||||
.mfb-component--tl .mfb-component__list [data-mfb-label]:after, .mfb-component--bl .mfb-component__list [data-mfb-label]:after {
|
||||
content: attr(data-mfb-label);
|
||||
left: 70px; }
|
||||
|
||||
/*------------------------------------*\
|
||||
#DEVELOPMENT | In development
|
||||
\*------------------------------------*/
|
||||
/**
|
||||
* This part is where unfinished code should stay.
|
||||
* When a feature is ready(sh) move these styles to their proper place.
|
||||
*/
|
||||
/*------------------------------------*\
|
||||
#DEVELOPMENT | Debuggers
|
||||
\*------------------------------------*/
|
||||
/**
|
||||
* These are mainly helpers for development. They do not have to end up
|
||||
* in production but it's handy to keep them when developing.
|
||||
*/
|
||||
/**
|
||||
* Apply this class to the html tag when developing the slide-in button
|
||||
*/
|
||||
|
||||
/*# sourceMappingURL=mfb.css.map */
|
9
vendor/unisharp/laravel-filemanager/public/css/mime-icons.min.css
vendored
Normal file
9
vendor/unisharp/laravel-filemanager/public/css/mime-icons.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
vendor/unisharp/laravel-filemanager/public/img/152px color.png
vendored
Executable file
BIN
vendor/unisharp/laravel-filemanager/public/img/152px color.png
vendored
Executable file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
vendor/unisharp/laravel-filemanager/public/img/72px color.png
vendored
Executable file
BIN
vendor/unisharp/laravel-filemanager/public/img/72px color.png
vendored
Executable file
Binary file not shown.
After Width: | Height: | Size: 966 B |
BIN
vendor/unisharp/laravel-filemanager/public/img/92px color.png
vendored
Executable file
BIN
vendor/unisharp/laravel-filemanager/public/img/92px color.png
vendored
Executable file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
vendor/unisharp/laravel-filemanager/public/img/Logomark color.png
vendored
Executable file
BIN
vendor/unisharp/laravel-filemanager/public/img/Logomark color.png
vendored
Executable file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
22
vendor/unisharp/laravel-filemanager/public/js/filemanager.js
vendored
Normal file
22
vendor/unisharp/laravel-filemanager/public/js/filemanager.js
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Open file manager and return selected files.
|
||||
* Promise is never resolved if window is closed.
|
||||
*
|
||||
* @returns Promise<array> Array of selected files with properties:
|
||||
* icon string
|
||||
* is_file bool
|
||||
* is_image bool
|
||||
* name string
|
||||
* thumb_url string|null
|
||||
* time int
|
||||
* url string
|
||||
*/
|
||||
window.filemanager = function filemanager() {
|
||||
var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/filemanager';
|
||||
var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'FileManager';
|
||||
var features = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'width=900,height=600';
|
||||
return new Promise(function (resolve) {
|
||||
window.open(url, target, features);
|
||||
window.SetUrl = resolve;
|
||||
});
|
||||
};
|
1
vendor/unisharp/laravel-filemanager/public/js/filemanager.min.js
vendored
Normal file
1
vendor/unisharp/laravel-filemanager/public/js/filemanager.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
window.filemanager=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/filemanager",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"FileManager",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"width=900,height=600";return new Promise(function(o){window.open(n,e,i),window.SetUrl=o})};
|
File diff suppressed because one or more lines are too long
@@ -1,24 +0,0 @@
|
||||
(function( $ ){
|
||||
|
||||
$.fn.filemanager = function(type, options) {
|
||||
type = type || 'file';
|
||||
|
||||
this.on('click', function(e) {
|
||||
var route_prefix = (options && options.prefix) ? options.prefix : '/laravel-filemanager';
|
||||
localStorage.setItem('target_input', $(this).data('input'));
|
||||
localStorage.setItem('target_preview', $(this).data('preview'));
|
||||
window.open(route_prefix + '?type=' + type, 'FileManager', 'width=900,height=600');
|
||||
window.SetUrl = function (url, file_path) {
|
||||
//set the value of the desired input to image url
|
||||
var target_input = $('#' + localStorage.getItem('target_input'));
|
||||
target_input.val(file_path).trigger('change');
|
||||
|
||||
//set or change the preview image src
|
||||
var target_preview = $('#' + localStorage.getItem('target_preview'));
|
||||
target_preview.attr('src', url).trigger('change');
|
||||
};
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
})(jQuery);
|
@@ -1,98 +0,0 @@
|
||||
/**
|
||||
* Material floating button
|
||||
* By: Nobita
|
||||
* Repo and docs: https://github.com/nobitagit/material-floating-button
|
||||
*
|
||||
* License: MIT
|
||||
*/
|
||||
|
||||
// build script hook - don't remove
|
||||
;(function ( window, document, undefined ) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Some defaults
|
||||
*/
|
||||
var clickOpt = 'click',
|
||||
hoverOpt = 'hover',
|
||||
toggleMethod = 'data-mfb-toggle',
|
||||
menuState = 'data-mfb-state',
|
||||
isOpen = 'open',
|
||||
isClosed = 'closed',
|
||||
mainButtonClass = 'mfb-component__button--main';
|
||||
|
||||
/**
|
||||
* Internal references
|
||||
*/
|
||||
var elemsToClick,
|
||||
elemsToHover,
|
||||
mainButton,
|
||||
target,
|
||||
currentState;
|
||||
|
||||
/**
|
||||
* For every menu we need to get the main button and attach the appropriate evt.
|
||||
*/
|
||||
function attachEvt( elems, evt ){
|
||||
for( var i = 0, len = elems.length; i < len; i++ ){
|
||||
mainButton = elems[i].querySelector('.' + mainButtonClass);
|
||||
mainButton.addEventListener( evt , toggleButton, false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the hover option, set a click toggle and a default,
|
||||
* initial state of 'closed' to menu that's been targeted.
|
||||
*/
|
||||
function replaceAttrs( elems ){
|
||||
for( var i = 0, len = elems.length; i < len; i++ ){
|
||||
elems[i].setAttribute( toggleMethod, clickOpt );
|
||||
elems[i].setAttribute( menuState, isClosed );
|
||||
}
|
||||
}
|
||||
|
||||
function getElemsByToggleMethod( selector ){
|
||||
return document.querySelectorAll('[' + toggleMethod + '="' + selector + '"]');
|
||||
}
|
||||
|
||||
/**
|
||||
* The open/close action is performed by toggling an attribute
|
||||
* on the menu main element.
|
||||
*
|
||||
* First, check if the target is the menu itself. If it's a child
|
||||
* keep walking up the tree until we found the main element
|
||||
* where we can toggle the state.
|
||||
*/
|
||||
function toggleButton( evt ){
|
||||
|
||||
target = evt.target;
|
||||
while ( target && !target.getAttribute( toggleMethod ) ){
|
||||
target = target.parentNode;
|
||||
if(!target) { return; }
|
||||
}
|
||||
|
||||
currentState = target.getAttribute( menuState ) === isOpen ? isClosed : isOpen;
|
||||
|
||||
target.setAttribute(menuState, currentState);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* On touch enabled devices we assume that no hover state is possible.
|
||||
* So, we get the menu with hover action configured and we set it up
|
||||
* in order to make it usable with tap/click.
|
||||
**/
|
||||
if ( window.Modernizr && Modernizr.touch ){
|
||||
elemsToHover = getElemsByToggleMethod( hoverOpt );
|
||||
replaceAttrs( elemsToHover );
|
||||
}
|
||||
|
||||
elemsToClick = getElemsByToggleMethod( clickOpt );
|
||||
|
||||
attachEvt( elemsToClick, 'click' );
|
||||
|
||||
// build script hook - don't remove
|
||||
})( window, document );
|
||||
|
@@ -1,32 +1,111 @@
|
||||
var lfm_route = location.origin + location.pathname;
|
||||
var show_list;
|
||||
var sort_type = 'alphabetic';
|
||||
var multi_selection_enabled = false;
|
||||
var selected = [];
|
||||
var items = [];
|
||||
|
||||
$.fn.fab = function (options) {
|
||||
var menu = this;
|
||||
menu.addClass('fab-wrapper');
|
||||
|
||||
var toggler = $('<a>')
|
||||
.addClass('fab-button fab-toggle')
|
||||
.append($('<i>').addClass('fas fa-plus'))
|
||||
.click(function () {
|
||||
menu.toggleClass('fab-expand');
|
||||
});
|
||||
|
||||
menu.append(toggler);
|
||||
|
||||
options.buttons.forEach(function (button) {
|
||||
toggler.before(
|
||||
$('<a>').addClass('fab-button fab-action')
|
||||
.attr('data-label', button.label)
|
||||
.attr('id', button.attrs.id)
|
||||
.append($('<i>').addClass(button.icon))
|
||||
.click(function () {
|
||||
menu.removeClass('fab-expand');
|
||||
})
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
$(document).ready(function () {
|
||||
bootbox.setDefaults({locale:lang['locale-bootbox']});
|
||||
$('#fab').fab({
|
||||
buttons: [
|
||||
{
|
||||
icon: 'fas fa-upload',
|
||||
label: lang['nav-upload'],
|
||||
attrs: {id: 'upload'}
|
||||
},
|
||||
{
|
||||
icon: 'fas fa-folder',
|
||||
label: lang['nav-new'],
|
||||
attrs: {id: 'add-folder'}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
actions.reverse().forEach(function (action) {
|
||||
$('#nav-buttons > ul').prepend(
|
||||
$('<li>').addClass('nav-item').append(
|
||||
$('<a>').addClass('nav-link d-none')
|
||||
.attr('data-action', action.name)
|
||||
.attr('data-multiple', action.multiple)
|
||||
.append($('<i>').addClass('fas fa-fw fa-' + action.icon))
|
||||
.append($('<span>').text(action.label))
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
sortings.forEach(function (sort) {
|
||||
$('#nav-buttons .dropdown-menu').append(
|
||||
$('<a>').addClass('dropdown-item').attr('data-sortby', sort.by)
|
||||
.append($('<i>').addClass('fas fa-fw fa-' + sort.icon))
|
||||
.append($('<span>').text(sort.label))
|
||||
.click(function() {
|
||||
sort_type = sort.by;
|
||||
loadItems();
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
loadFolders();
|
||||
performLfmRequest('errors')
|
||||
.done(function (data) {
|
||||
var response = JSON.parse(data);
|
||||
for (var i = 0; i < response.length; i++) {
|
||||
.done(function (response) {
|
||||
JSON.parse(response).forEach(function (message) {
|
||||
$('#alerts').append(
|
||||
$('<div>').addClass('alert alert-warning')
|
||||
.append($('<i>').addClass('fa fa-exclamation-circle'))
|
||||
.append(' ' + response[i])
|
||||
.append($('<i>').addClass('fas fa-exclamation-circle'))
|
||||
.append(' ' + message)
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(window).on('dragenter', function(){
|
||||
$('#uploadModal').modal('show');
|
||||
});
|
||||
$(window).on('dragenter', function(){
|
||||
$('#uploadModal').modal('show');
|
||||
});
|
||||
|
||||
if (usingWysiwygEditor()) {
|
||||
$('#multi_selection_toggle').hide();
|
||||
}
|
||||
});
|
||||
|
||||
// ======================
|
||||
// == Navbar actions ==
|
||||
// ======================
|
||||
|
||||
$('#nav-buttons a').click(function (e) {
|
||||
e.preventDefault();
|
||||
$('#multi_selection_toggle').click(function () {
|
||||
multi_selection_enabled = !multi_selection_enabled;
|
||||
|
||||
$('#multi_selection_toggle i')
|
||||
.toggleClass('fa-times', multi_selection_enabled)
|
||||
.toggleClass('fa-check-double', !multi_selection_enabled);
|
||||
|
||||
if (!multi_selection_enabled) {
|
||||
clearSelected();
|
||||
}
|
||||
});
|
||||
|
||||
$('#to-previous').click(function () {
|
||||
@@ -35,72 +114,120 @@ $('#to-previous').click(function () {
|
||||
goTo(previous_dir);
|
||||
});
|
||||
|
||||
$('#add-folder').click(function () {
|
||||
bootbox.prompt(lang['message-name'], function (result) {
|
||||
if (result == null) return;
|
||||
createFolder(result);
|
||||
});
|
||||
function toggleMobileTree(should_display) {
|
||||
if (should_display === undefined) {
|
||||
should_display = !$('#tree').hasClass('in');
|
||||
}
|
||||
$('#tree').toggleClass('in', should_display);
|
||||
}
|
||||
|
||||
$('#show_tree').click(function (e) {
|
||||
toggleMobileTree();
|
||||
});
|
||||
|
||||
$('#upload').click(function () {
|
||||
$('#main').click(function (e) {
|
||||
if ($('#tree').hasClass('in')) {
|
||||
toggleMobileTree(false);
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '#add-folder', function () {
|
||||
dialog(lang['message-name'], '', createFolder);
|
||||
});
|
||||
|
||||
$(document).on('click', '#upload', function () {
|
||||
$('#uploadModal').modal('show');
|
||||
});
|
||||
|
||||
$('#upload-btn').click(function () {
|
||||
$(this).html('')
|
||||
.append($('<i>').addClass('fa fa-refresh fa-spin'))
|
||||
.append(" " + lang['btn-uploading'])
|
||||
.addClass('disabled');
|
||||
$(document).on('click', '[data-display]', function() {
|
||||
show_list = $(this).data('display');
|
||||
loadItems();
|
||||
});
|
||||
|
||||
function resetUploadForm() {
|
||||
$('#uploadModal').modal('hide');
|
||||
$('#upload-btn').html(lang['btn-upload']).removeClass('disabled');
|
||||
$('input#upload').val('');
|
||||
$(document).on('click', '[data-action]', function() {
|
||||
window[$(this).data('action')]($(this).data('multiple') ? getSelectedItems() : getOneSelectedElement());
|
||||
});
|
||||
|
||||
// ==========================
|
||||
// == Multiple Selection ==
|
||||
// ==========================
|
||||
|
||||
function toggleSelected (e) {
|
||||
if (!multi_selection_enabled) {
|
||||
selected = [];
|
||||
}
|
||||
|
||||
$('#uploadForm').ajaxSubmit({
|
||||
success: function (data, statusText, xhr, $form) {
|
||||
resetUploadForm();
|
||||
refreshFoldersAndItems(data);
|
||||
displaySuccessMessage(data);
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
displayErrorResponse(jqXHR);
|
||||
resetUploadForm();
|
||||
}
|
||||
var sequence = $(e.target).closest('a').data('id');
|
||||
var element_index = selected.indexOf(sequence);
|
||||
if (element_index === -1) {
|
||||
selected.push(sequence);
|
||||
} else {
|
||||
selected.splice(element_index, 1);
|
||||
}
|
||||
|
||||
updateSelectedStyle();
|
||||
}
|
||||
|
||||
function clearSelected () {
|
||||
selected = [];
|
||||
|
||||
multi_selection_enabled = false;
|
||||
|
||||
updateSelectedStyle();
|
||||
}
|
||||
|
||||
function updateSelectedStyle() {
|
||||
items.forEach(function (item, index) {
|
||||
$('[data-id=' + index + ']')
|
||||
.find('.square')
|
||||
.toggleClass('selected', selected.indexOf(index) > -1);
|
||||
});
|
||||
});
|
||||
toggleActions();
|
||||
}
|
||||
|
||||
$('#thumbnail-display').click(function () {
|
||||
show_list = 0;
|
||||
loadItems();
|
||||
});
|
||||
function getOneSelectedElement(orderOfItem) {
|
||||
var index = orderOfItem !== undefined ? orderOfItem : selected[0];
|
||||
return items[index];
|
||||
}
|
||||
|
||||
$('#list-display').click(function () {
|
||||
show_list = 1;
|
||||
loadItems();
|
||||
});
|
||||
function getSelectedItems() {
|
||||
return selected.reduce(function (arr_objects, id) {
|
||||
arr_objects.push(getOneSelectedElement(id));
|
||||
return arr_objects
|
||||
}, []);
|
||||
}
|
||||
|
||||
$('#list-sort-alphabetic').click(function() {
|
||||
sort_type = 'alphabetic';
|
||||
loadItems();
|
||||
});
|
||||
function toggleActions() {
|
||||
var one_selected = selected.length === 1;
|
||||
var many_selected = selected.length >= 1;
|
||||
var only_image = getSelectedItems()
|
||||
.filter(function (item) { return !item.is_image; })
|
||||
.length === 0;
|
||||
var only_file = getSelectedItems()
|
||||
.filter(function (item) { return !item.is_file; })
|
||||
.length === 0;
|
||||
|
||||
$('#list-sort-time').click(function() {
|
||||
sort_type = 'time';
|
||||
loadItems();
|
||||
});
|
||||
$('[data-action=use]').toggleClass('d-none', !(many_selected && only_file));
|
||||
$('[data-action=rename]').toggleClass('d-none', !one_selected);
|
||||
$('[data-action=preview]').toggleClass('d-none', !(many_selected && only_file));
|
||||
$('[data-action=move]').toggleClass('d-none', !many_selected);
|
||||
$('[data-action=download]').toggleClass('d-none', !(many_selected && only_file));
|
||||
$('[data-action=resize]').toggleClass('d-none', !(one_selected && only_image));
|
||||
$('[data-action=crop]').toggleClass('d-none', !(one_selected && only_image));
|
||||
$('[data-action=trash]').toggleClass('d-none', !many_selected);
|
||||
$('[data-action=open]').toggleClass('d-none', !one_selected || only_file);
|
||||
$('#multi_selection_toggle').toggleClass('d-none', usingWysiwygEditor() || !many_selected);
|
||||
$('#actions').toggleClass('d-none', selected.length === 0);
|
||||
$('#fab').toggleClass('d-none', selected.length !== 0);
|
||||
}
|
||||
|
||||
// ======================
|
||||
// == Folder actions ==
|
||||
// ======================
|
||||
|
||||
$(document).on('click', '.file-item', function (e) {
|
||||
useFile($(this).data('id'));
|
||||
});
|
||||
|
||||
$(document).on('click', '.folder-item', function (e) {
|
||||
goTo($(this).data('id'));
|
||||
$(document).on('click', '#tree a', function (e) {
|
||||
goTo($(e.target).closest('a').data('path'));
|
||||
toggleMobileTree(false);
|
||||
});
|
||||
|
||||
function goTo(new_dir) {
|
||||
@@ -109,28 +236,21 @@ function goTo(new_dir) {
|
||||
}
|
||||
|
||||
function getPreviousDir() {
|
||||
var ds = '/';
|
||||
var working_dir = $('#working_dir').val();
|
||||
var last_ds = working_dir.lastIndexOf(ds);
|
||||
var previous_dir = working_dir.substring(0, last_ds);
|
||||
return previous_dir;
|
||||
}
|
||||
|
||||
function dir_starts_with(str) {
|
||||
return $('#working_dir').val().indexOf(str) === 0;
|
||||
return working_dir.substring(0, working_dir.lastIndexOf('/'));
|
||||
}
|
||||
|
||||
function setOpenFolders() {
|
||||
var folders = $('.folder-item');
|
||||
|
||||
for (var i = folders.length - 1; i >= 0; i--) {
|
||||
$('#tree [data-path]').each(function (index, folder) {
|
||||
// close folders that are not parent
|
||||
if (! dir_starts_with($(folders[i]).data('id'))) {
|
||||
$(folders[i]).children('i').removeClass('fa-folder-open').addClass('fa-folder');
|
||||
} else {
|
||||
$(folders[i]).children('i').removeClass('fa-folder').addClass('fa-folder-open');
|
||||
}
|
||||
}
|
||||
var should_open = ($('#working_dir').val() + '/').startsWith($(folder).data('path') + '/');
|
||||
$(folder).children('i')
|
||||
.toggleClass('fa-folder-open', should_open)
|
||||
.toggleClass('fa-folder', !should_open);
|
||||
});
|
||||
|
||||
$('#tree .nav-item').removeClass('active');
|
||||
$('#tree [data-path="' + $('#working_dir').val() + '"]').parent('.nav-item').addClass('active');
|
||||
}
|
||||
|
||||
// ====================
|
||||
@@ -148,6 +268,12 @@ function performLfmRequest(url, parameter, type) {
|
||||
|
||||
return $.ajax({
|
||||
type: 'GET',
|
||||
beforeSend: function(request) {
|
||||
var token = getUrlParam('token');
|
||||
if (token !== null) {
|
||||
request.setRequestHeader("Authorization", 'Bearer ' + token);
|
||||
}
|
||||
},
|
||||
dataType: type || 'text',
|
||||
url: lfm_route + '/' + url,
|
||||
data: data,
|
||||
@@ -161,18 +287,6 @@ function displayErrorResponse(jqXHR) {
|
||||
notify('<div style="max-height:50vh;overflow: scroll;">' + jqXHR.responseText + '</div>');
|
||||
}
|
||||
|
||||
function displaySuccessMessage(data){
|
||||
if(data == 'OK'){
|
||||
var success = $('<div>').addClass('alert alert-success')
|
||||
.append($('<i>').addClass('fa fa-check'))
|
||||
.append(' File Uploaded Successfully.');
|
||||
$('#alerts').append(success);
|
||||
setTimeout(function () {
|
||||
success.remove();
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
|
||||
var refreshFoldersAndItems = function (data) {
|
||||
loadFolders();
|
||||
if (data != 'OK') {
|
||||
@@ -182,8 +296,10 @@ var refreshFoldersAndItems = function (data) {
|
||||
};
|
||||
|
||||
var hideNavAndShowEditor = function (data) {
|
||||
$('#nav-buttons > ul').addClass('hidden');
|
||||
$('#nav-buttons > ul').addClass('d-none');
|
||||
$('#content').html(data);
|
||||
$('#pagination').removeClass('preserve_actions_space')
|
||||
clearSelected();
|
||||
}
|
||||
|
||||
function loadFolders() {
|
||||
@@ -194,85 +310,349 @@ function loadFolders() {
|
||||
});
|
||||
}
|
||||
|
||||
function loadItems() {
|
||||
$('#lfm-loader').show();
|
||||
performLfmRequest('jsonitems', {show_list: show_list, sort_type: sort_type}, 'html')
|
||||
.done(function (data) {
|
||||
var response = JSON.parse(data);
|
||||
$('#content').html(response.html);
|
||||
$('#nav-buttons > ul').removeClass('hidden');
|
||||
$('#working_dir').val(response.working_dir);
|
||||
$('#current_dir').text(response.working_dir);
|
||||
console.log('Current working_dir : ' + $('#working_dir').val());
|
||||
if (getPreviousDir() == '') {
|
||||
$('#to-previous').addClass('hide');
|
||||
} else {
|
||||
$('#to-previous').removeClass('hide');
|
||||
function generatePaginationHTML(el, args) {
|
||||
var template = '<li class="page-item"><\/li>';
|
||||
var linkTemplate = '<a class="page-link"><\/a>';
|
||||
var currentPage = args.currentPage;
|
||||
var totalPage = args.totalPage;
|
||||
var rangeStart = args.rangeStart;
|
||||
var rangeEnd = args.rangeEnd;
|
||||
var i;
|
||||
|
||||
// Disable page range, display all the pages
|
||||
if (args.pageRange === null) {
|
||||
for (i = 1; i <= totalPage; i++) {
|
||||
var button = $(template)
|
||||
.attr('data-num', i)
|
||||
.append($(linkTemplate).html(i));
|
||||
if (i == currentPage) {
|
||||
button.addClass('active');
|
||||
}
|
||||
el.append(button);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (rangeStart <= 3) {
|
||||
for (i = 1; i < rangeStart; i++) {
|
||||
var button = $(template)
|
||||
.attr('data-num', i)
|
||||
.append($(linkTemplate).html(i));
|
||||
if (i == currentPage) {
|
||||
button.addClass('active');
|
||||
}
|
||||
el.append(button);
|
||||
}
|
||||
} else {
|
||||
var button = $(template)
|
||||
.attr('data-num', 1)
|
||||
.append($(linkTemplate).html(1));
|
||||
el.append(button);
|
||||
|
||||
var button = $(template)
|
||||
.addClass('disabled')
|
||||
.append($(linkTemplate).html('...'));
|
||||
el.append(button);
|
||||
}
|
||||
|
||||
for (i = rangeStart; i <= rangeEnd; i++) {
|
||||
var button = $(template)
|
||||
.attr('data-num', i)
|
||||
.append($(linkTemplate).html(i));
|
||||
if (i == currentPage) {
|
||||
button.addClass('active');
|
||||
}
|
||||
el.append(button);
|
||||
}
|
||||
|
||||
if (rangeEnd >= totalPage - 2) {
|
||||
for (i = rangeEnd + 1; i <= totalPage; i++) {
|
||||
var button = $(template)
|
||||
.attr('data-num', i)
|
||||
.append($(linkTemplate).html(i));
|
||||
el.append(button);
|
||||
}
|
||||
} else {
|
||||
var button = $(template)
|
||||
.addClass('disabled')
|
||||
.append($(linkTemplate).html('...'));
|
||||
el.append(button);
|
||||
|
||||
var button = $(template)
|
||||
.attr('data-num', totalPage)
|
||||
.append($(linkTemplate).html(totalPage));
|
||||
el.append(button);
|
||||
}
|
||||
}
|
||||
|
||||
function createPagination(paginationSetting) {
|
||||
var el = $('<ul class="pagination" role="navigation"></ul>');
|
||||
|
||||
var currentPage = paginationSetting.current_page;
|
||||
var pageRange = 5;
|
||||
var totalPage = Math.ceil(paginationSetting.total / paginationSetting.per_page);
|
||||
|
||||
var rangeStart = currentPage - pageRange;
|
||||
var rangeEnd = currentPage + pageRange;
|
||||
|
||||
if (rangeEnd > totalPage) {
|
||||
rangeEnd = totalPage;
|
||||
rangeStart = totalPage - pageRange * 2;
|
||||
rangeStart = rangeStart < 1 ? 1 : rangeStart;
|
||||
}
|
||||
|
||||
if (rangeStart <= 1) {
|
||||
rangeStart = 1;
|
||||
rangeEnd = Math.min(pageRange * 2 + 1, totalPage);
|
||||
}
|
||||
|
||||
generatePaginationHTML(el, {
|
||||
totalPage: totalPage,
|
||||
currentPage: currentPage,
|
||||
pageRange: pageRange,
|
||||
rangeStart: rangeStart,
|
||||
rangeEnd: rangeEnd
|
||||
});
|
||||
|
||||
$('#pagination').append(el);
|
||||
}
|
||||
|
||||
function loadItems(page) {
|
||||
loading(true);
|
||||
performLfmRequest('jsonitems', {show_list: show_list, sort_type: sort_type, page: page || 1}, 'html')
|
||||
.done(function (data) {
|
||||
selected = [];
|
||||
var response = JSON.parse(data);
|
||||
var working_dir = response.working_dir;
|
||||
items = response.items;
|
||||
var hasItems = items.length !== 0;
|
||||
var hasPaginator = !!response.paginator;
|
||||
$('#empty').toggleClass('d-none', hasItems);
|
||||
$('#content').html('').removeAttr('class');
|
||||
$('#pagination').html('').removeAttr('class');
|
||||
|
||||
if (hasItems) {
|
||||
$('#content').addClass(response.display);
|
||||
$('#pagination').addClass('preserve_actions_space');
|
||||
|
||||
items.forEach(function (item, index) {
|
||||
var template = $('#item-template').clone()
|
||||
.removeAttr('id class')
|
||||
.attr('data-id', index)
|
||||
.click(toggleSelected)
|
||||
.dblclick(function (e) {
|
||||
if (item.is_file) {
|
||||
use(getSelectedItems());
|
||||
} else {
|
||||
goTo(item.url);
|
||||
}
|
||||
});
|
||||
|
||||
if (item.thumb_url) {
|
||||
var image = $('<div>').css('background-image', 'url("' + item.thumb_url + '?timestamp=' + item.time + '")');
|
||||
} else {
|
||||
var icon = $('<div>').addClass('ico');
|
||||
var image = $('<div>').addClass('mime-icon ico-' + item.icon).append(icon);
|
||||
}
|
||||
|
||||
template.find('.square').append(image);
|
||||
template.find('.item_name').text(item.name);
|
||||
template.find('time').text((new Date(item.time * 1000)).toLocaleString());
|
||||
|
||||
$('#content').append(template);
|
||||
});
|
||||
}
|
||||
|
||||
if (hasPaginator) {
|
||||
createPagination(response.paginator);
|
||||
|
||||
$('#pagination a').on('click', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
loadItems($(this).closest('li')[0].getAttribute('data-num'));
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
$('#nav-buttons > ul').removeClass('d-none');
|
||||
|
||||
$('#working_dir').val(working_dir);
|
||||
console.log('Current working_dir : ' + working_dir);
|
||||
var breadcrumbs = [];
|
||||
var validSegments = working_dir.split('/').filter(function (e) { return e; });
|
||||
validSegments.forEach(function (segment, index) {
|
||||
if (index === 0) {
|
||||
// set root folder name as the first breadcrumb
|
||||
breadcrumbs.push($("[data-path='/" + segment + "']").text());
|
||||
} else {
|
||||
breadcrumbs.push(segment);
|
||||
}
|
||||
});
|
||||
|
||||
$('#current_folder').text(breadcrumbs[breadcrumbs.length - 1]);
|
||||
$('#breadcrumbs > ol').html('');
|
||||
breadcrumbs.forEach(function (breadcrumb, index) {
|
||||
var li = $('<li>').addClass('breadcrumb-item').text(breadcrumb);
|
||||
|
||||
if (index === breadcrumbs.length - 1) {
|
||||
li.addClass('active').attr('aria-current', 'page');
|
||||
} else {
|
||||
li.click(function () {
|
||||
// go to corresponding path
|
||||
goTo('/' + validSegments.slice(0, 1 + index).join('/'));
|
||||
});
|
||||
}
|
||||
|
||||
$('#breadcrumbs > ol').append(li);
|
||||
});
|
||||
|
||||
var atRootFolder = getPreviousDir() == '';
|
||||
$('#to-previous').toggleClass('d-none invisible-lg', atRootFolder);
|
||||
$('#show_tree').toggleClass('d-none', !atRootFolder).toggleClass('d-block', atRootFolder);
|
||||
setOpenFolders();
|
||||
})
|
||||
.always(function(){
|
||||
$('#lfm-loader').hide();
|
||||
loading(false);
|
||||
toggleActions();
|
||||
});
|
||||
}
|
||||
|
||||
function loading(show_loading) {
|
||||
$('#loading').toggleClass('d-none', !show_loading);
|
||||
}
|
||||
|
||||
function createFolder(folder_name) {
|
||||
performLfmRequest('newfolder', {name: folder_name})
|
||||
.done(refreshFoldersAndItems);
|
||||
}
|
||||
|
||||
function rename(item_name) {
|
||||
bootbox.prompt({
|
||||
title: lang['message-rename'],
|
||||
value: item_name,
|
||||
callback: function (result) {
|
||||
if (result == null) return;
|
||||
performLfmRequest('rename', {
|
||||
file: item_name,
|
||||
new_name: result
|
||||
}).done(refreshFoldersAndItems);
|
||||
}
|
||||
// ==================================
|
||||
// == File Actions ==
|
||||
// ==================================
|
||||
|
||||
function rename(item) {
|
||||
dialog(lang['message-rename'], item.name, function (new_name) {
|
||||
performLfmRequest('rename', {
|
||||
file: item.name,
|
||||
new_name: new_name
|
||||
}).done(refreshFoldersAndItems);
|
||||
});
|
||||
}
|
||||
|
||||
function trash(item_name) {
|
||||
bootbox.confirm(lang['message-delete'], function (result) {
|
||||
if (result == true) {
|
||||
performLfmRequest('delete', {items: item_name})
|
||||
.done(refreshFoldersAndItems);
|
||||
}
|
||||
function trash(items) {
|
||||
notify(lang['message-delete'], function () {
|
||||
performLfmRequest('delete', {
|
||||
items: items.map(function (item) { return item.name; })
|
||||
}).done(refreshFoldersAndItems)
|
||||
});
|
||||
}
|
||||
|
||||
function cropImage(image_name) {
|
||||
performLfmRequest('crop', {img: image_name})
|
||||
function crop(item) {
|
||||
performLfmRequest('crop', {img: item.name})
|
||||
.done(hideNavAndShowEditor);
|
||||
}
|
||||
|
||||
function resizeImage(image_name) {
|
||||
performLfmRequest('resize', {img: image_name})
|
||||
function resize(item) {
|
||||
performLfmRequest('resize', {img: item.name})
|
||||
.done(hideNavAndShowEditor);
|
||||
}
|
||||
|
||||
function download(file_name) {
|
||||
var data = defaultParameters();
|
||||
data['file'] = file_name;
|
||||
location.href = lfm_route + '/download?' + $.param(data);
|
||||
function download(items) {
|
||||
items.forEach(function (item, index) {
|
||||
var data = defaultParameters();
|
||||
|
||||
data['file'] = item.name;
|
||||
|
||||
var token = getUrlParam('token');
|
||||
if (token) {
|
||||
data['token'] = token;
|
||||
}
|
||||
|
||||
setTimeout(function () {
|
||||
location.href = lfm_route + '/download?' + $.param(data);
|
||||
}, index * 100);
|
||||
});
|
||||
}
|
||||
|
||||
// ==================================
|
||||
// == Ckeditor, Bootbox, preview ==
|
||||
// ==================================
|
||||
function open(item) {
|
||||
goTo(item.url);
|
||||
}
|
||||
|
||||
function useFile(file_url) {
|
||||
function preview(items) {
|
||||
var carousel = $('#carouselTemplate').clone().attr('id', 'previewCarousel').removeClass('d-none');
|
||||
var imageTemplate = carousel.find('.carousel-item').clone().removeClass('active');
|
||||
var indicatorTemplate = carousel.find('.carousel-indicators > li').clone().removeClass('active');
|
||||
carousel.children('.carousel-inner').html('');
|
||||
carousel.children('.carousel-indicators').html('');
|
||||
carousel.children('.carousel-indicators,.carousel-control-prev,.carousel-control-next').toggle(items.length > 1);
|
||||
|
||||
function getUrlParam(paramName) {
|
||||
var reParam = new RegExp('(?:[\?&]|&)' + paramName + '=([^&]+)', 'i');
|
||||
var match = window.location.search.match(reParam);
|
||||
return ( match && match.length > 1 ) ? match[1] : null;
|
||||
}
|
||||
items.forEach(function (item, index) {
|
||||
var carouselItem = imageTemplate.clone()
|
||||
.addClass(index === 0 ? 'active' : '');
|
||||
|
||||
if (item.thumb_url) {
|
||||
carouselItem.find('.carousel-image').css('background-image', 'url(\'' + item.url + '?timestamp=' + item.time + '\')');
|
||||
} else {
|
||||
carouselItem.find('.carousel-image').css('width', '50vh').append($('<div>').addClass('mime-icon ico-' + item.icon));
|
||||
}
|
||||
|
||||
carouselItem.find('.carousel-label').attr('target', '_blank').attr('href', item.url)
|
||||
.append(item.name)
|
||||
.append($('<i class="fas fa-external-link-alt ml-2"></i>'));
|
||||
|
||||
carousel.children('.carousel-inner').append(carouselItem);
|
||||
|
||||
var carouselIndicator = indicatorTemplate.clone()
|
||||
.addClass(index === 0 ? 'active' : '')
|
||||
.attr('data-slide-to', index);
|
||||
carousel.children('.carousel-indicators').append(carouselIndicator);
|
||||
});
|
||||
|
||||
|
||||
// carousel swipe control
|
||||
var touchStartX = null;
|
||||
|
||||
carousel.on('touchstart', function (event) {
|
||||
var e = event.originalEvent;
|
||||
if (e.touches.length == 1) {
|
||||
var touch = e.touches[0];
|
||||
touchStartX = touch.pageX;
|
||||
}
|
||||
}).on('touchmove', function (event) {
|
||||
var e = event.originalEvent;
|
||||
if (touchStartX != null) {
|
||||
var touchCurrentX = e.changedTouches[0].pageX;
|
||||
if ((touchCurrentX - touchStartX) > 60) {
|
||||
touchStartX = null;
|
||||
carousel.carousel('prev');
|
||||
} else if ((touchStartX - touchCurrentX) > 60) {
|
||||
touchStartX = null;
|
||||
carousel.carousel('next');
|
||||
}
|
||||
}
|
||||
}).on('touchend', function () {
|
||||
touchStartX = null;
|
||||
});
|
||||
// end carousel swipe control
|
||||
|
||||
notify(carousel);
|
||||
}
|
||||
|
||||
function move(items) {
|
||||
performLfmRequest('move', { items: items.map(function (item) { return item.name; }) })
|
||||
.done(refreshFoldersAndItems);
|
||||
}
|
||||
|
||||
function getUrlParam(paramName) {
|
||||
var reParam = new RegExp('(?:[\?&]|&)' + paramName + '=([^&]+)', 'i');
|
||||
var match = window.location.search.match(reParam);
|
||||
return ( match && match.length > 1 ) ? match[1] : null;
|
||||
}
|
||||
|
||||
function use(items) {
|
||||
function useTinymce3(url) {
|
||||
if (!usingTinymce3()) { return; }
|
||||
|
||||
var win = tinyMCEPopup.getWindowArg("window");
|
||||
win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = url;
|
||||
if (typeof(win.ImageDialog) != "undefined") {
|
||||
@@ -289,8 +669,10 @@ function useFile(file_url) {
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
|
||||
function useTinymce4AndColorbox(url, field_name) {
|
||||
parent.document.getElementById(field_name).value = url;
|
||||
function useTinymce4AndColorbox(url) {
|
||||
if (!usingTinymce4AndColorbox()) { return; }
|
||||
|
||||
parent.document.getElementById(getUrlParam('field_name')).value = url;
|
||||
|
||||
if(typeof parent.tinyMCE !== "undefined") {
|
||||
parent.tinyMCE.activeEditor.windowManager.close();
|
||||
@@ -300,7 +682,20 @@ function useFile(file_url) {
|
||||
}
|
||||
}
|
||||
|
||||
function useTinymce5(url){
|
||||
if (!usingTinymce5()) { return; }
|
||||
|
||||
parent.postMessage({
|
||||
mceAction: 'insert',
|
||||
content: url
|
||||
});
|
||||
|
||||
parent.postMessage({ mceAction: 'close' });
|
||||
}
|
||||
|
||||
function useCkeditor3(url) {
|
||||
if (!usingCkeditor3()) { return; }
|
||||
|
||||
if (window.opener) {
|
||||
// Popup
|
||||
window.opener.CKEDITOR.tools.callFunction(getUrlParam('CKEditorFuncNum'), url);
|
||||
@@ -312,41 +707,82 @@ function useFile(file_url) {
|
||||
}
|
||||
|
||||
function useFckeditor2(url) {
|
||||
if (!usingFckeditor2()) { return; }
|
||||
|
||||
var p = url;
|
||||
var w = data['Properties']['Width'];
|
||||
var h = data['Properties']['Height'];
|
||||
window.opener.SetUrl(p,w,h);
|
||||
}
|
||||
|
||||
var url = file_url;
|
||||
var field_name = getUrlParam('field_name');
|
||||
var is_ckeditor = getUrlParam('CKEditor');
|
||||
var is_fcke = typeof data != 'undefined' && data['Properties']['Width'] != '';
|
||||
var file_path = url.replace(route_prefix, '');
|
||||
var url = items[0].url;
|
||||
var callback = getUrlParam('callback');
|
||||
var useFileSucceeded = true;
|
||||
|
||||
if (window.opener || window.tinyMCEPopup || field_name || getUrlParam('CKEditorCleanUpFuncNum') || is_ckeditor) {
|
||||
if (window.tinyMCEPopup) { // use TinyMCE > 3.0 integration method
|
||||
useTinymce3(url);
|
||||
} else if (field_name) { // tinymce 4 and colorbox
|
||||
useTinymce4AndColorbox(url, field_name);
|
||||
} else if(is_ckeditor) { // use CKEditor 3.0 + integration method
|
||||
useCkeditor3(url);
|
||||
} else if (is_fcke) { // use FCKEditor 2.0 integration method
|
||||
useFckeditor2(url);
|
||||
} else { // standalone button or other situations
|
||||
window.opener.SetUrl(url, file_path);
|
||||
}
|
||||
if (usingWysiwygEditor()) {
|
||||
useTinymce3(url);
|
||||
|
||||
useTinymce4AndColorbox(url);
|
||||
|
||||
useTinymce5(url);
|
||||
|
||||
useCkeditor3(url);
|
||||
|
||||
useFckeditor2(url);
|
||||
} else if (callback && window[callback]) {
|
||||
window[callback](getSelectedItems());
|
||||
} else if (callback && parent[callback]) {
|
||||
parent[callback](getSelectedItems());
|
||||
} else if (window.opener) { // standalone button or other situations
|
||||
window.opener.SetUrl(getSelectedItems());
|
||||
} else {
|
||||
useFileSucceeded = false;
|
||||
}
|
||||
|
||||
if (useFileSucceeded) {
|
||||
if (window.opener) {
|
||||
window.close();
|
||||
}
|
||||
} else {
|
||||
console.log('window.opener not found');
|
||||
// No editor found, open/download file using browser's default method
|
||||
window.open(url);
|
||||
}
|
||||
}
|
||||
//end useFile
|
||||
|
||||
// ==================================
|
||||
// == WYSIWYG Editors Check ==
|
||||
// ==================================
|
||||
|
||||
function usingTinymce3() {
|
||||
return !!window.tinyMCEPopup;
|
||||
}
|
||||
|
||||
function usingTinymce4AndColorbox() {
|
||||
return !!getUrlParam('field_name');
|
||||
}
|
||||
|
||||
function usingTinymce5(){
|
||||
return !!getUrlParam('editor');
|
||||
}
|
||||
|
||||
function usingCkeditor3() {
|
||||
return !!getUrlParam('CKEditor') || !!getUrlParam('CKEditorCleanUpFuncNum');
|
||||
}
|
||||
|
||||
function usingFckeditor2() {
|
||||
return window.opener && typeof data != 'undefined' && data['Properties']['Width'] != '';
|
||||
}
|
||||
|
||||
function usingWysiwygEditor() {
|
||||
return usingTinymce3() || usingTinymce4AndColorbox() || usingTinymce5() || usingCkeditor3() || usingFckeditor2();
|
||||
}
|
||||
|
||||
// ==================================
|
||||
// == Others ==
|
||||
// ==================================
|
||||
|
||||
function defaultParameters() {
|
||||
return {
|
||||
working_dir: $('#working_dir').val(),
|
||||
@@ -358,18 +794,19 @@ function notImp() {
|
||||
notify('Not yet implemented!');
|
||||
}
|
||||
|
||||
function notify(message) {
|
||||
bootbox.alert(message);
|
||||
function notify(body, callback) {
|
||||
$('#notify').find('.btn-primary').toggle(callback !== undefined);
|
||||
$('#notify').find('.btn-primary').unbind().click(callback);
|
||||
$('#notify').modal('show').find('.modal-body').html(body);
|
||||
}
|
||||
|
||||
function fileView(file_url, timestamp) {
|
||||
bootbox.dialog({
|
||||
title: lang['title-view'],
|
||||
message: $('<img>')
|
||||
.addClass('img img-responsive center-block')
|
||||
.attr('src', file_url + '?timestamp=' + timestamp),
|
||||
size: 'large',
|
||||
onEscape: true,
|
||||
backdrop: true
|
||||
function dialog(title, value, callback) {
|
||||
$('#dialog').find('input').val(value);
|
||||
$('#dialog').on('shown.bs.modal', function () {
|
||||
$('#dialog').find('input').focus();
|
||||
});
|
||||
}
|
||||
$('#dialog').find('.btn-primary').unbind().click(function (e) {
|
||||
callback($('#dialog').find('input').val());
|
||||
});
|
||||
$('#dialog').modal('show').find('.modal-title').text(title);
|
||||
}
|
||||
|
36
vendor/unisharp/laravel-filemanager/public/js/stand-alone-button.js
vendored
Normal file
36
vendor/unisharp/laravel-filemanager/public/js/stand-alone-button.js
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
(function( $ ){
|
||||
|
||||
$.fn.filemanager = function(type, options) {
|
||||
type = type || 'file';
|
||||
|
||||
this.on('click', function(e) {
|
||||
var route_prefix = (options && options.prefix) ? options.prefix : '/filemanager';
|
||||
var target_input = $('#' + $(this).data('input'));
|
||||
var target_preview = $('#' + $(this).data('preview'));
|
||||
window.open(route_prefix + '?type=' + type, 'FileManager', 'width=900,height=600');
|
||||
window.SetUrl = function (items) {
|
||||
var file_path = items.map(function (item) {
|
||||
return item.url;
|
||||
}).join(',');
|
||||
|
||||
// set the value of the desired input to image url
|
||||
target_input.val('').val(file_path).trigger('change');
|
||||
|
||||
// clear previous preview
|
||||
target_preview.html('');
|
||||
|
||||
// set or change the preview image src
|
||||
items.forEach(function (item) {
|
||||
target_preview.append(
|
||||
$('<img>').css('height', '5rem').attr('src', item.thumb_url)
|
||||
);
|
||||
});
|
||||
|
||||
// trigger change event
|
||||
target_preview.trigger('change');
|
||||
};
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
})(jQuery);
|
Reference in New Issue
Block a user