opensource layout, strength...

This commit is contained in:
thinkgem
2023-09-28 16:32:53 +08:00
parent 4208223617
commit 6f49a9b5eb
11 changed files with 6542 additions and 0 deletions

View File

@@ -0,0 +1,249 @@
/*
* Default Layout Theme
* Created for jquery.layout
* Copyright (c) 2010
* Fabrizio Balliano (http://www.fabrizioballiano.net)
* Kevin Dalman (http://allpro.net)
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
* and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
* Last Updated: 2010-02-10、2022-09-27 jeesite
* NOTE: For best code readability, view this with a fixed-space font and tabs equal to 4-chars
*/
.ui-draggable-handle{-ms-touch-action:none;touch-action:none}
/*
* DEFAULT FONT
* Just to make demo-pages look better - not actually relevant to Layout!
*/
/* body { */
/* font-family: Geneva, Arial, Helvetica, sans-serif; */
/* font-size: 100%; */
/* *font-size: 80%; */
/* } */
/*
* PANES & CONTENT-DIVs
*/
.ui-layout-pane { /* all 'panes' */
/* background: #fff; */
/* border: 1px solid #eee; */
/* padding: 10px; */
overflow: auto;
/* DO NOT add scrolling (or padding) to 'panes' that have a content-div,
otherwise you may get double-scrollbars - on the pane AND on the content-div
- use ui-layout-wrapper class if pane has a content-div
- use ui-layout-container if pane has an inner-layout
*/
}
/* (scrolling) content-div inside pane allows for fixed header(s) and/or footer(s) */
.ui-layout-content {
padding: 10px;
position: relative; /* contain floated or positioned elements */
overflow: auto; /* add scrolling to content-div */
width: 100%;
border: 0;
}
/*
* UTILITY CLASSES
* Must come AFTER pane-class above so will override
* These classes are NOT auto-generated and are NOT used by Layout
*/
.layout-child-container,
.layout-content-container {
padding: 0;
overflow: hidden;
}
.layout-child-container {
border: 0; /* remove border because inner-layout-panes probably have borders */
}
.layout-scroll {
overflow: auto;
}
.layout-hide {
display: none;
}
/*
* RESIZER-BARS
*/
.ui-layout-resizer { /* all 'resizer-bars' */
background: #fafafa;
border: 1px solid #eee;
border-width: 0;
}
.ui-layout-resizer-drag { /* REAL resizer while resize in progress */
}
.ui-layout-resizer-hover { /* affects both open and closed states */
}
/* NOTE: It looks best when 'hover' and 'dragging' are set to the same color,
otherwise color shifts while dragging when bar can't keep up with mouse */
.ui-layout-resizer-open-hover , /* hover-color to 'resize' */
.ui-layout-resizer-dragging { /* resizer beging 'dragging' */
background: #fafafa;
}
.ui-layout-resizer-dragging { /* CLONED resizer being dragged */
border: 1px solid #eee;
}
.ui-layout-resizer-north-dragging,
.ui-layout-resizer-south-dragging {
border-width: 1px 0;
}
.ui-layout-resizer-west-dragging,
.ui-layout-resizer-east-dragging {
border-width: 0 1px;
}
/* NOTE: Add a 'dragging-limit' color to provide visual feedback when resizer hits min/max size limits */
.ui-layout-resizer-dragging-limit { /* CLONED resizer at min or max size-limit */
background: #E1A4A4; /* red */
}
.ui-layout-resizer-closed-hover { /* hover-color to 'slide open' */
background: #EBD5AA;
}
.ui-layout-resizer-sliding { /* resizer when pane is 'slid open' */
/* opacity: .10; show only a slight shadow */
/* filter: alpha(opacity=10); */
}
.ui-layout-resizer-sliding-hover { /* sliding resizer - hover */
/* opacity: 1.00; on-hover, show the resizer-bar normally */
/* filter: alpha(opacity=100); */
}
/* sliding resizer - add 'outside-border' to resizer on-hover
* this sample illustrates how to target specific panes and states */
.ui-layout-resizer-north-sliding-hover { border-bottom-width: 1px; }
.ui-layout-resizer-south-sliding-hover { border-top-width: 1px; }
.ui-layout-resizer-west-sliding-hover { border-right-width: 1px; }
.ui-layout-resizer-east-sliding-hover { border-left-width: 1px; }
/*
* TOGGLER-BUTTONS
*/
.ui-layout-toggler {
/* border: 1px solid #eee;
background-color: #eee; */
border-radius: 8px;
}
.ui-layout-resizer-hover .ui-layout-toggler {
opacity: 1.00;
filter: alpha(opacity=100);
}
.ui-layout-toggler-hover , /* need when NOT resizable */
.ui-layout-resizer-hover .ui-layout-toggler-hover { /* need specificity when IS resizable */
background-color: #dfdfdf;
opacity: 1.00;
filter: alpha(opacity=100);
}
.skin-dark .ui-layout-toggler-hover ,
.skin-dark .ui-layout-resizer-hover .ui-layout-toggler-hover {
background-color: #2e2e2e;
}
.ui-layout-toggler-north ,
.ui-layout-toggler-south {
border-width: 0 1px; /* left/right borders */
}
.ui-layout-toggler-west ,
.ui-layout-toggler-east {
border-width: 1px 0; /* top/bottom borders */
}
/* hide the toggler-button when the pane is 'slid open' */
.ui-layout-resizer-sliding .ui-layout-toggler {
display: none;
}
/*
* style the text we put INSIDE the togglers
*/
.ui-layout-toggler .ui-content {
color: #666;
font-size: 12px;
font-weight: bold;
line-height: 8px;
width: 100%;
padding-bottom: 0.35ex; /* to 'vertically center' text inside text-span */
}
.ui-layout-toggler .ui-content .fa{
line-height: 8px;
}
.ui-layout-toggler-north-closed .fa:before,
.ui-layout-toggler-south-open .fa:before {
content: "\f0d7";/* 下 */
}
.ui-layout-toggler-south-closed .fa:before,
.ui-layout-toggler-north-open .fa:before {
content: "\f0d8";/* 上 */
}
.ui-layout-toggler-west-closed .fa:before,
.ui-layout-toggler-east-open .fa:before {
content: "\f0da";/* 右 */
}
.ui-layout-toggler-east-closed .fa:before,
.ui-layout-toggler-west-open .fa:before {
content: "\f0d9";/* 左 */
}
/*
* PANE-MASKS
* these styles are hard-coded on mask elems, but are also
* included here as !important to ensure will overrides any generic styles
*/
.ui-layout-mask {
border: none !important;
padding: 0 !important;
margin: 0 !important;
overflow: hidden !important;
position: absolute !important;
opacity: 0 !important;
filter: Alpha(Opacity="0") !important;
}
.ui-layout-mask-inside-pane { /* masks always inside pane EXCEPT when pane is an iframe */
top: 0 !important;
left: 0 !important;
width: 100% !important;
height: 100% !important;
}
div.ui-layout-mask {} /* standard mask for iframes */
iframe.ui-layout-mask {} /* extra mask for objects/applets */
/*
* Default printing styles
*/
@media print {
/*
* Unless you want to print the layout as it appears onscreen,
* these html/body styles are needed to allow the content to 'flow'
*/
html {
height: auto !important;
overflow: visible !important;
}
body.ui-layout-container {
position: static !important;
top: auto !important;
bottom: auto !important;
left: auto !important;
right: auto !important;
/* only IE6 has container width & height set by Layout */
_width: auto !important;
_height: auto !important;
}
.ui-layout-resizer, .ui-layout-toggler {
display: none !important;
}
/*
* Default pane print styles disables positioning, borders and backgrounds.
* You can modify these styles however it suit your needs.
*/
.ui-layout-pane {
border: none !important;
background: transparent !important;
position: relative !important;
top: auto !important;
bottom: auto !important;
left: auto !important;
right: auto !important;
width: auto !important;
height: auto !important;
overflow: visible !important;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,15 @@
.strength {position:relative;}
.strength .strength_input {position:absolute;left:0;top:0;height:30px;background:transparent;border:transparent;z-index:2;color:#333;}
.strength .strength_input:focus {background:transparent;}
.strength .strength_meter {position:absolute;left:0;top:0;width:100%;height:30px;z-index:1;border:1px solid #dedede;border-radius:4px;}
.strength .strength_meter.veryweak {border-color:#F04040!important;}
.strength .strength_meter.weak {border-color:#FF853C!important;}
.strength .strength_meter.medium {border-color:#FC0!important;}
.strength .strength_meter.strong {border-color:#8DFF1C!important;}
.strength .strength_meter div {width:0%;height:28px;text-align:right;-webkit-transition:all .3s ease-in-out;border-radius:4px;}
.strength .strength_meter div.veryweak {background-color:#FFA0A0;width:25%!important;}
.strength .strength_meter div.weak {background-color:#FFB78C;width:50%!important;}
.strength .strength_meter div.medium {background-color:#FFEC8B;width:75%!important;}
.strength .strength_meter div.strong {background-color:#C3FF88;width:100%!important;}
.strength .strength_meter div p {position:absolute;right:15px;font-size:13px;line-height:29px;font-weight:bold;color:#333}
.strength .button_strength {text-decoration:none;display:block;padding-top:43px;color:#f59942;}

View File

@@ -0,0 +1,140 @@
/*!
* strength.js
* Original author: @aaronlumsden
* Further changes, comments: jeesite
* Licensed under the MIT license
*/
;(function ($, window, document, undefined) {
var pluginName = "strength";
function Plugin(element, options) {
this.element = element;
this.$elem = $(this.element);
this.options = $.extend({}, $.fn.strength.defaults, options);
this._defaults = $.fn.strength.defaults;
this._name = pluginName;
this.init();
}
Plugin.prototype = {
init : function () {
var options = this.options;
var upperCaseExp = new RegExp("[A-Z]");
var lowerCaseExp = new RegExp("[a-z]");
var numberExp = new RegExp("[0-9]");
var specialExp = new RegExp("[~!@#$%\\^&\\*()_+\\{\\}:\"\\|<>?`\\-=\\[\\];\\\'\\\\,\\./]");
function check_strength(thisval, thisid) {
var charLength = thisval.length >= 8 ? 1 : 0;
var upperCase = thisval.match(upperCaseExp) ? 1 : 0;
var lowerCase = thisval.match(lowerCaseExp) ? 1 : 0;
var number = thisval.match(numberExp) ? 1 : 0;
var special = thisval.match(specialExp) ? 1 : 0;
var total = charLength + upperCase + lowerCase + number + special;
get_total(total, thisid);
options.strengthCheck(thisval, total);
}
function get_total(total, thisid) {
var thismeter = $('div[data-meter="' + thisid + '"]').removeClass();
thismeter.parent().removeClass().addClass(options.strengthMeterClass);
if (total == 0) {
thismeter.html('');
} else if (total == 1) {
thismeter.parent().addClass('veryweak');
thismeter.addClass('veryweak').html('<p>'+options.veryweakText+'</p>');
} else if (total == 2) {
thismeter.parent().addClass('weak');
thismeter.addClass('weak').html('<p>'+options.weakText+'</p>');
} else if (total == 3 || total == 4) {
thismeter.parent().addClass('medium');
thismeter.addClass('medium').html('<p>'+options.mediumText+'</p>');
} else {
thismeter.parent().addClass('strong');
thismeter.addClass('strong').html('<p>'+options.strongText+'</p>');
}
}
var isShown = false;
var strengthButtonText = options.strengthTipText + ' ' + options.strengthButtonText;
var strengthButtonTextToggle = options.strengthTipText + ' ' + options.strengthButtonTextToggle;
var thisid = this.$elem.attr('id');
this.$elem.parent().addClass(options.strengthClass);
this.$elem.addClass(options.strengthInputClass).attr('data-password', thisid)
.after('<input style="display:none" class="' + this.$elem.attr('class') + '" data-password="'
+ thisid + '" type="text" name="" value=""><a data-password-button="' + thisid
+ '" href="javascript:" class="' + options.strengthButtonClass + '" tabindex="-1">'
+ strengthButtonText + '</a><div class="' + options.strengthMeterClass
+ '"><div data-meter="' + thisid + '"><p></p></div></div>');
this.$elem.bind('keyup keydown', function (event) {
thisval = $('#' + thisid).val();
var st = $('input[type="text"][data-password="' + thisid + '"]').val(thisval);
try{st.resetValid();}catch(e){}; // 如果表单加了验证,则验证。
check_strength(thisval, thisid);
});
$('input[type="text"][data-password="' + thisid + '"]').bind('keyup keydown', function (event) {
thisval = $('input[type="text"][data-password="' + thisid + '"]').val();
$('input[type="password"][data-password="' + thisid + '"]').val(thisval);
check_strength(thisval, thisid);
});
$(document.body).on('click', '.' + options.strengthButtonClass, function (e) {
e.preventDefault();
thisclass = 'hide_' + $(this).attr('class');
if (isShown) {
$('input[type="text"][data-password="' + thisid + '"]').hide();
$('input[type="password"][data-password="' + thisid + '"]').show().focus();
$('a[data-password-button="' + thisid + '"]').removeClass(thisclass).html(strengthButtonText);
isShown = false;
} else {
$('input[type="text"][data-password="' + thisid + '"]').show().focus();
$('input[type="password"][data-password="' + thisid + '"]').hide();
$('a[data-password-button="' + thisid + '"]').addClass(thisclass).html(strengthButtonTextToggle);
isShown = true;
}
});
}
};
// A really lightweight plugin wrapper around the constructor,
// preventing against multiple instantiations
$.fn[pluginName] = function (options) {
return this.each(function () {
if (!$.data(this, "plugin_" + pluginName)) {
$.data(this, "plugin_" + pluginName, new Plugin(this, options));
}
});
};
$.fn[pluginName].defaults = {
strengthClass : 'strength',
strengthInputClass : 'strength_input',
strengthMeterClass : 'strength_meter',
strengthButtonClass : 'button_strength',
strengthTipText: '建议长度不小于8位且包含大写英文字母、小写英文字母、数字和符号。',
strengthButtonText: '点击显示密码。',
strengthButtonTextToggle: '点击隐藏密码。',
veryweakText: '密码太弱啦!',
weakText: '密码比较弱哦!',
mediumText: '密码较安全!',
strongText: '密码很强很安全!',
// 验证后调用方法(当前值,安全级别)
strengthCheck: function(thisval, thislevel){ }
};
})(jQuery, window, document);

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@@ -0,0 +1,42 @@
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved.
No deletion without permission, or be held responsible to law. -->
<!DOCTYPE html><html lang="zh-CN"><head><meta charset="UTF-8" />
<title>请升级您的浏览器</title><meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" >
<meta name="renderer" content="webkit"><base target="_blank" /><style type="text/css">
a{text-decoration:none;color:#0072c6;}a:hover{text-decoration:none;color:#004d8c;}
body{width:960px;margin:0 auto;padding:10px;font-size:14px;line-height:24px;color:#454545;font-family:'Microsoft YaHei UI','Microsoft YaHei',DengXian,SimSun,'Segoe UI',Tahoma,Helvetica,sans-serif;}
h1{font-size:30px;line-height:80px;font-weight:100;margin-bottom:10px;}
h2{font-size:20px;line-height:25px;font-weight:100;margin:10px 0;}
p{margin-bottom:10px;font-size:16px;}
hr{margin:20px 0;border:0;border-top:1px solid #dadada}
img{width:34px;height:34px;border:0;float:left;margin-right:10px;}
span{display:block;font-size:12px;line-height:12px;}
.browser{padding:10px 0;}
.browser li{width:180px;height:34px;line-height:22px;float:left;list-style:none;padding-left:25px}
.clean{clear:both;}
</style></head><body>
<h1>浏览器版本过低,是时候升级您的浏览器了</h1>
<p>本系统 <a href="http://jeesite.com">JeeSite</a> 支持 IE9 及以上版本及其他所有现代浏览器,如:谷歌浏览器、火狐浏览器、国产浏览器 等。</p>
<p>您正在使用 Internet Explorer 的过期版本IE6、IE7、IE8 内核的浏览器)。这意味着在升级浏览器前,您将无法继续访问。</p>
<hr>
<h2>为什么会出现这个页面?</h2>
<p>如果您不知道升级浏览器是什么意思请请教一些熟练电脑操作的朋友。如果您使用的不是IE6/7/8而是360、QQ、搜狗等双核浏览器出现这个页面可能是您切换到了兼容模式<strong style="color:#f00;">切换到极速模式</strong>下,如果还不行请升级至最新版浏览器。</p>
<hr>
<h2>请注意微软Microsoft对 Windows XP 及 IE6、IE7、IE8、IE9、IE10 的支持已经结束</h2>
<p>自 2014 年 4 月 8 日起微软Microsoft不再为 Windows XP 和 Internet Explorer 8 及以下版本提供相应支持和更新。如果您继续使用这些,您将可能受到病毒、间谍软件和其他恶意软件的攻击,无法确保个人信息的安全。请参阅 <a href="http://windows.microsoft.com/zh-cn/windows/end-support-help">Microsoft 关于 Windows XP 支持已经结束的说明</a></p>
<p>尽管 Internet Explorer 11 将于 2022 年 6 月 15 日也停止了支持。但您也可以继续使用 <a href="http://windows.microsoft.com/zh-cn/internet-explorer/download-ie"> Internet Explorer 11 浏览器</a></p>
<hr>
<h2>您可以选择更先进的浏览器</h2>
<p>推荐使用以下浏览器的最新版本。如果您的电脑已有以下浏览器的最新版本则直接使用该浏览器访问 <b id="url"></b>即可。</p>
<div class="browser"><ul>
<li><img src="img/chrome360.jpg"><a href="http://chrome.360.cn/"> 360极速浏览器<span>360 Chrome</span></a></li>
<li><img src="img/chrome.jpg"><a href="http://www.google.cn/intl/zh-CN/chrome/browser/desktop/index.html"> 谷歌浏览器<span>Google Chrome</span></a></li>
<li><img src="img/firefox.jpg"><a href="http://www.firefox.com.cn/download/"> 火狐浏览器<span>Mozilla Firefox</span></a></li>
<li><img src="img/ie.jpg"><a href="https://www.microsoft.com/zh-cn/edge"> Edge 浏览器<span>Microsoft Edge</span></a></li>
</ul><div class="clean"></div></div>
<hr><br/>
<script>
var url = location.href; url = url.substring(0, url.indexOf('/static/upbw'));
document.getElementById("url").innerHTML = '<a href="' + url + '">' + url + '</a>&nbsp;';
</script>
</body></html>