mirror of https://github.com/abpframework/abp.git
14 changed files with 158 additions and 122 deletions
@ -0,0 +1,13 @@ |
|||
using System.Collections.Generic; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Bundling; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.Core |
|||
{ |
|||
public class CoreStyleContributor : BundleContributor |
|||
{ |
|||
public override void ConfigureBundle(BundleConfigurationContext context) |
|||
{ |
|||
context.Files.AddIfNotContains("/libs/abp/core/abp.css"); |
|||
} |
|||
} |
|||
} |
|||
@ -1,16 +0,0 @@ |
|||
using System.Collections.Generic; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Bundling; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Core; |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.FreezeUi |
|||
{ |
|||
[DependsOn(typeof(CoreScriptContributor))] |
|||
public class FreezeUiScriptContributor : BundleContributor |
|||
{ |
|||
public override void ConfigureBundle(BundleConfigurationContext context) |
|||
{ |
|||
context.Files.AddIfNotContains("/libs/freeze-ui/freeze-ui.min.js"); |
|||
} |
|||
} |
|||
} |
|||
@ -1,16 +0,0 @@ |
|||
using System.Collections.Generic; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Bundling; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Bootstrap; |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.FreezeUi |
|||
{ |
|||
[DependsOn(typeof(BootstrapStyleContributor))] |
|||
public class FreezeUiStyleContributor : BundleContributor |
|||
{ |
|||
public override void ConfigureBundle(BundleConfigurationContext context) |
|||
{ |
|||
context.Files.AddIfNotContains("/libs/freeze-ui/freeze-ui.min.css"); |
|||
} |
|||
} |
|||
} |
|||
@ -1,46 +0,0 @@ |
|||
var abp = abp || {}; |
|||
(function ($) { |
|||
if (!window.FreezeUI || !$) { |
|||
return; |
|||
} |
|||
|
|||
/* MESSAGE **************************************************/ |
|||
/*Package from https://alexradulescu.github.io/freeze-ui/*/ |
|||
|
|||
abp.ui = abp.ui || {}; |
|||
|
|||
/* UI BLOCK */ |
|||
|
|||
abp.ui.block = function (elm) { |
|||
if (elm) { |
|||
window.FreezeUI({ selector: elm }); |
|||
} else { |
|||
window.FreezeUI(); |
|||
} |
|||
}; |
|||
|
|||
abp.ui.unblock = function () { |
|||
window.UnFreezeUI(); |
|||
}; |
|||
|
|||
/* UI BUSY */ |
|||
|
|||
abp.ui.setBusy = function (element, text, freezeDelay) { |
|||
var opt = { text : text ? text : ' ' }; |
|||
|
|||
if (element) { |
|||
opt.element = element; |
|||
} |
|||
|
|||
if (freezeDelay) { |
|||
opt.freezeDelay = freezeDelay; |
|||
} |
|||
|
|||
window.FreezeUI(opt); |
|||
}; |
|||
|
|||
abp.ui.clearBusy = function () { |
|||
window.UnFreezeUI(); |
|||
}; |
|||
|
|||
})(jQuery); |
|||
@ -1,5 +1,5 @@ |
|||
module.exports = { |
|||
mappings: { |
|||
"@node_modules/@abp/core/src/abp.js": "@libs/abp/core/" |
|||
"@node_modules/@abp/core/src/*": "@libs/abp/core/" |
|||
} |
|||
} |
|||
@ -0,0 +1,56 @@ |
|||
@keyframes spin { |
|||
0% { |
|||
transform: translateZ(0) rotate(0deg); |
|||
} |
|||
|
|||
100% { |
|||
transform: translateZ(0) rotate(360deg); |
|||
} |
|||
} |
|||
|
|||
.abp-block-area { |
|||
position: fixed; |
|||
top: 0; |
|||
left: 0; |
|||
width: 100%; |
|||
height: 100%; |
|||
z-index: 999999999; |
|||
background-color: #fff; |
|||
opacity: .8; |
|||
transition: opacity .25s; |
|||
} |
|||
|
|||
.abp-block-area.abp-block-area-disappearing { |
|||
opacity: 0; |
|||
} |
|||
|
|||
.abp-block-area.abp-block-area-busy:after { |
|||
content: attr(data-text); |
|||
display: block; |
|||
max-width: 125px; |
|||
position: absolute; |
|||
top: 50%; |
|||
left: 50%; |
|||
transform: translate(-50%, -50%); |
|||
font-size: 20px; |
|||
font-family: sans-serif; |
|||
color: #343a40; |
|||
text-align: center; |
|||
text-transform: uppercase; |
|||
} |
|||
|
|||
.abp-block-area.abp-block-area-busy:before { |
|||
content: ""; |
|||
display: block; |
|||
width: 150px; |
|||
height: 150px; |
|||
border-radius: 50%; |
|||
border-width: 2px; |
|||
border-style: solid; |
|||
border-color: transparent #228ae6 #228ae6 #228ae6; |
|||
position: absolute; |
|||
top: calc(50% - 75px); |
|||
left: calc(50% - 75px); |
|||
will-change: transform; |
|||
animation: spin .75s infinite ease-in-out; |
|||
} |
|||
@ -1,6 +0,0 @@ |
|||
module.exports = { |
|||
mappings: { |
|||
"@node_modules/@abp/freeze-ui/lib/freeze-ui.min.js": "@libs/freeze-ui/", |
|||
"@node_modules/@abp/freeze-ui/lib/freeze-ui.min.css": "@libs/freeze-ui/" |
|||
} |
|||
} |
|||
@ -1 +0,0 @@ |
|||
@keyframes spin{0%{transform:translateZ(0) rotate(0)}100%{transform:translateZ(0) rotate(360deg)}}.freeze-ui{position:fixed;top:0;left:0;width:100%;height:100%;z-index:999999999;background-color:#fff;opacity:.8;transition:opacity .25s}.freeze-ui.is-unfreezing{opacity:0}.freeze-ui:after{content:attr(data-text);display:block;max-width:125px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:20px;font-family:sans-serif;color:#343a40;text-align:center;text-transform:uppercase}.freeze-ui:before{content:"";display:block;width:150px;height:150px;border-radius:50%;border-width:2px;border-style:solid;border-color:transparent #228ae6 #228ae6;position:absolute;top:calc(50% - 75px);left:calc(50% - 75px);will-change:transform;animation:spin .75s infinite ease-in-out} |
|||
@ -1 +0,0 @@ |
|||
(()=>{let a=document.createElement('div');a.classList.add('freeze-ui'),window.FreezeUI=(b={})=>{let c=document.querySelector(b.selector)||document.body;a.setAttribute('data-text',b.text||'Loading'),document.querySelector(b.selector)&&(a.style.position='absolute'),c.appendChild(a)},window.UnFreezeUI=()=>{let b=document.querySelector('.freeze-ui');b&&(b.classList.add('is-unfreezing'),setTimeout(()=>{b&&(b.classList.remove('is-unfreezing'),b.parentElement.removeChild(b))},250))}})(); |
|||
@ -1,11 +0,0 @@ |
|||
{ |
|||
"version": "0.6.2", |
|||
"name": "@abp/freeze-ui", |
|||
"publishConfig": { |
|||
"access": "public" |
|||
}, |
|||
"dependencies": { |
|||
"@abp/core": "^0.5.3" |
|||
}, |
|||
"gitHead": "824de4c615c1d4d1d7f07d6ec1e8d0cb3a303c72" |
|||
} |
|||
Loading…
Reference in new issue