diff options
Diffstat (limited to 'uiframe-iui/src/main/resources/webroot/component/thirdparty/fakeLoader/fakeLoader.min.js')
-rw-r--r-- | uiframe-iui/src/main/resources/webroot/component/thirdparty/fakeLoader/fakeLoader.min.js | 174 |
1 files changed, 0 insertions, 174 deletions
diff --git a/uiframe-iui/src/main/resources/webroot/component/thirdparty/fakeLoader/fakeLoader.min.js b/uiframe-iui/src/main/resources/webroot/component/thirdparty/fakeLoader/fakeLoader.min.js deleted file mode 100644 index 243dc0b2..00000000 --- a/uiframe-iui/src/main/resources/webroot/component/thirdparty/fakeLoader/fakeLoader.min.js +++ /dev/null @@ -1,174 +0,0 @@ -/*--------------------------------------------------------------------
- *JAVASCRIPT "FakeLoader.js"
- *Version: 1.1.0 - 2014
- *author: João Pereira
- *website: http://www.joaopereira.pt
- *Licensed MIT
------------------------------------------------------------------------*/
-(function ($) {
-
- $.fn.fakeLoader = function(options) {
- //Defaults
- $.fn.settings = $.extend({
- timeToHide:0, // Default Time to hide fakeLoader
- pos:'fixed',// Default Position
- top:'0px', // Default Top value
- left:'0px', // Default Left value
- width:'100%', // Default width
- height:'100%', // Default Height
- zIndex: '999', // Default zIndex
- bgColor: '#2ecc71', // Default background color
- opacity:'0.6',//默认透明度
- text:'',//默认加载中文字
- spinner:'spinner1', // Default Spinner
- imagePath:'' // Default Path custom image
- }, options);
- var timer=null;
- $.fn.Setopacity=function(opacity){
- $(".loadingbackground").fadeTo("slow",opacity);
- };
- $.fn.SetTimeToHide=function(timetohide){
- var el = $(this);
- el.settings.timeToHide=timetohide;
- if(!!timer)clearTimeout(timer);
- el.css({
- 'display':"block"
- });//fadeTo("fast",el.settings.opacity);
- $(".loadingbackground").fadeTo(1,el.settings.opacity);
- setTimeout(function(){
- el.fadeOut();//fadeTo("slow",0);
- }, el.settings.timeToHide);
- };
- $.fn.setToHide=function(){
- var el = $(this);
- if(!!timer)clearTimeout(timer);
- el.fadeOut();//fadeTo("slow",0);
- };
- //The target
- var el = $(this);
-
- //Customized Spinners
- var spinner01 = '<div class="loadingbackground"></div><div class="loadingTip"><div class="fl spinner1"><div class="double-bounce1"></div><div class="double-bounce2"></div></div><br><div class="f2"><span class="loading">'+el.settings.text+'</span></div>';
- var spinner02 = '<div class="loadingbackground"></div><div class="loadingTip"><div class="fl spinner2"><div class="spinner-container container1"><div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div></div><div class="spinner-container container2"><div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div></div><div class="spinner-container container3"><div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div></div></div><br><div class="f2"><span class="loading">'+el.settings.text+'</span></div>';
- var spinner03 = '<div class="loadingbackground"></div><div class="loadingTip"><div class="fl spinner3"><div class="dot1"></div><div class="dot2"></div></div><br><div class="f2"><span class="loading">'+el.settings.text+'</span></div></div>';
- var spinner04 = '<div class="loadingbackground"></div><div class="loadingTip"><div class="fl spinner4"></div><br><div class="f2"><span class="loading">'+el.settings.text+'</span></div>';
- var spinner05 = '<div class="loadingbackground"></div><div class="loadingTip"><div class="fl spinner5"><div class="cube1"></div><div class="cube2"></div></div><br><div class="f2"><span class="loading">'+el.settings.text+'</span></div>';
- var spinner06 = '<div class="loadingbackground"></div><div class="loadingTip"><div class="fl spinner6"><div class="rect1"></div><div class="rect2"></div><div class="rect3"></div><div class="rect4"></div><div class="rect5"></div></div><br><div class="f2"><span class="loading">'+el.settings.text+'</span></div>';
- var spinner07 = '<div class="loadingbackground"></div><div class="loadingTip"><div class="fl spinner7"><div class="circ1"></div><div class="circ2"></div><div class="circ3"></div><div class="circ4"></div></div><br><div class="f2"><span class="loading">'+el.settings.text+'</span></div>';
-
- //Init styles
- var initStyles = {
- 'position':el.settings.pos,
- 'width':el.settings.width,
- 'height':el.settings.height,
- 'top':el.settings.top,
- 'left':el.settings.left
- };
-
- //Apply styles
- el.css(initStyles);
- //Each
- el.each(function() {
- var a = el.settings.spinner;
- //console.log(a)
- switch (a) {
- case 'spinner1':
- el.html(spinner01);
- break;
- case 'spinner2':
- el.html(spinner02);
- break;
- case 'spinner3':
- el.html(spinner03);
- break;
- case 'spinner4':
- el.html(spinner04);
- break;
- case 'spinner5':
- el.html(spinner05);
- break;
- case 'spinner6':
- el.html(spinner06);
- break;
- case 'spinner7':
- el.html(spinner07);
- break;
- default:
- el.html(spinner01);
- }
-
- //Add customized loader image
-
- if (el.settings.imagePath !='') {
- el.html('<div class="fl"><img src="'+el.settings.imagePath+'"><span>'+el.settings.text+'</span></div>');
- }
- centerLoader();
- });
-
- //Time to hide fakeLoader
- if(el.settings.timeToHide>0){
- timer=setTimeout(function(){
- el.fadeOut();//fadeTo("slow",0);
- }, el.settings.timeToHide);
- }
- //Return Styles
- this.css({
- //'backgroundColor':el.settings.bgColor,
- 'display':"block",
- 'zIndex':el.settings.zIndex
- });
-
- $(".loadingbackground").css(initStyles).css({
- 'backgroundColor':el.settings.bgColor,
- 'opacity':el.settings.opacity,
- 'zIndex':el.settings.zIndex+1
- });
- $(".loadingTip").css(initStyles).css({
- //'backgroundColor':el.settings.bgColor,
- 'zIndex':el.settings.zIndex+2
- });
- return this;
- }; // End Fake Loader
-
-
- //Center Spinner
- function centerLoader() {
-
- var winW = $(window).width();
- var winH = $(window).height();
-
- var spinnerW = $('.fl').outerWidth();
- var spinnerH = $('.fl').outerHeight();
- var fW = $('.f2').outerWidth();
- var left=(winW/2)-(spinnerW/2);
- var left2=(winW/2)-(fW/2);
- left=left>0?left:winW/2-20;
- left2=left2==0||fW==0?left:left2;
- //left2=left2>0?left2:winW/2-40;
- left2=left2-20;
- console.log("loding gif:"+left+" text:"+left2);
- $('.fl').css({
- 'position':'absolute',
- 'left':left,
- 'top':(winH/2)-(spinnerH/2)
- });
- $('.f2').css({
- 'position':'absolute',
- 'left':left2,
- 'top':(winH/2)+(spinnerH/2)
- });
- }
-
- $(window).load(function(){
- centerLoader();
- $(window).resize(function(){
- centerLoader();
- });
- });
-
-
-}(jQuery));
-
-
-
-
|