更新前端

This commit is contained in:
季圣华
2018-12-19 23:51:59 +08:00
parent 609756e9e7
commit 91a6b722b9
1149 changed files with 124088 additions and 0 deletions

1112
erp_web/js/webqq/desktop.js Normal file

File diff suppressed because it is too large Load Diff

4
erp_web/js/webqq/jquery-1.7.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,10 @@
/*
* smartMenu.js 智能上下文菜单插件
* http://www.zhangxinxu.com/
*
* Copyright 2011, zhangxinxu
*
* 2011-05-26 v1.0 编写
* 2011-06-03 v1.1 修复func中this失准问题
*/
(function(a){var b=a(document).data("func",{}),c=a("body");a.smartMenu=a.noop;a.fn.smartMenu=function(g,d){var h={name:"",offsetX:2,offsetY:2,textLimit:6,beforeShow:a.noop,afterShow:a.noop};var i=a.extend(h,d||{});var f=function(k){var m=k||g,j=k?Math.random().toString():i.name,o="",n="",l="smart_menu_";if(a.isArray(m)&&m.length){o='<div id="smartMenu_'+j+'" class="'+l+'box"><div class="'+l+'body"><ul class="'+l+'ul">';a.each(m,function(q,p){if(q){o=o+'<li class="'+l+'li_separate">&nbsp;</li>'}if(a.isArray(p)){a.each(p,function(s,v){var w=v.text,u="",r="",t=Math.random().toString().replace(".","");if(w){if(w.length>i.textLimit){w=w.slice(0,i.textLimit)+"…";r=' title="'+v.text+'"'}if(a.isArray(v.data)&&v.data.length){u='<li class="'+l+'li" data-hover="true">'+f(v.data)+'<a href="javascript:" class="'+l+'a"'+r+' data-key="'+t+'"><i class="'+l+'triangle"></i>'+w+"</a></li>"}else{u='<li class="'+l+'li"><a href="javascript:" class="'+l+'a"'+r+' data-key="'+t+'">'+w+"</a></li>"}o+=u;var x=b.data("func");x[t]=v.func;b.data("func",x)}})}});o=o+"</ul></div></div>"}return o},e=function(){var j="#smartMenu_",l="smart_menu_",k=a(j+i.name);if(!k.size()){a("body").append(f());a(j+i.name+" a").bind("click",function(){var m=a(this).attr("data-key"),n=b.data("func")[m];if(a.isFunction(n)){n.call(b.data("trigger"))}a.smartMenu.hide();return false});a(j+i.name+" li").each(function(){var m=a(this).attr("data-hover"),n=l+"li_hover";if(m){a(this).hover(function(){a(this).addClass(n).children("."+l+"box").show();a(this).children("."+l+"a").addClass(l+"a_hover")},function(){a(this).removeClass(n).children("."+l+"box").hide();a(this).children("."+l+"a").removeClass(l+"a_hover")})}});return a(j+i.name)}return k};a(this).each(function(){this.oncontextmenu=function(l){if(a.isFunction(i.beforeShow)){i.beforeShow.call(this)}l=l||window.event;l.cancelBubble=true;if(l.stopPropagation){l.stopPropagation()}a.smartMenu.hide();var k=b.scrollTop();var j=e();if(j){j.css({display:"block",left:l.clientX+i.offsetX,top:l.clientY+k+i.offsetY});b.data("target",j);b.data("trigger",this);if(a.isFunction(i.afterShow)){i.afterShow.call(this)}return false}}});if(!c.data("bind")){c.bind("click",a.smartMenu.hide).data("bind",true)}};a.extend(a.smartMenu,{hide:function(){var d=b.data("target");if(d&&d.css("display")==="block"){d.hide()}},remove:function(){var d=b.data("target");if(d){d.remove()}}})})(jQuery);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,68 @@
// JavaScript Document
/*
===============================================================================
WResize is the jQuery plugin for fixing the IE window resize bug
...............................................................................
Copyright 2007 / Andrea Ercolino
-------------------------------------------------------------------------------
LICENSE: http://www.opensource.org/licenses/mit-license.php
WEBSITE: http://noteslog.com/
===============================================================================
*/
( function( $ )
{
$.fn.wresize = function( f )
{
version = '1.1';
wresize = {fired: false, width: 0};
function resizeOnce()
{
if ( $.browser.msie )
{
if ( ! wresize.fired )
{
wresize.fired = true;
}
else
{
var version = parseInt( $.browser.version, 10 );
wresize.fired = false;
if ( version < 7 )
{
return false;
}
else if ( version == 7 )
{
//a vertical resize is fired once, an horizontal resize twice
var width = $( window ).width();
if ( width != wresize.width )
{
wresize.width = width;
return false;
}
}
}
}
return true;
}
function handleWResize( e )
{
if ( resizeOnce() )
{
return f.apply(this, [e]);
}
}
this.each( function()
{
if ( this == window )
{
$( this ).resize( handleWResize );
}
else
{
$( this ).resize( f );
}
} );
return this;
};
} ) ( jQuery );

142
erp_web/js/webqq/myLib.js Normal file
View File

@@ -0,0 +1,142 @@
/*-----------------------------------------------------------------------------
*作者:Muzi*lei , email:530624206@qq.com
*http://www.muzilei.com/
*version:1.0 , 时间2011-09-14
-----------------------------------------------------------------------------*/
var myLib={
//创建子命名空间,用的是yui的方法------
NS:function(ns) {
if (!ns || !ns.length) {
return null;
}
var levels = ns.split(".");
var nsobj = myLib;
for (var i=(levels[0] == "myLib") ? 1 : 0; i<levels.length; ++i) {
nsobj[levels[i]] = nsobj[levels[i]] || {};
nsobj = nsobj[levels[i]];
}
return nsobj;
},
//获取对象类型名,["Array", "Boolean", "Date", "Number", "Object", "RegExp", "String", "Window", "HTMLDocument"]
_getType:function(object){
return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1];
},
//用来判断对象类型
_is:function(object,typeStr){
return this._getType(object)==typeStr;
},
textLength:function(text){
var intLength=0;
for (var i=0;i<text.length;i++){
if ((text.charCodeAt(i) < 0) || (text.charCodeAt(i) > 255)){
intLength=intLength+2;
}else{
intLength=intLength+1;
}
}
return intLength
},
//加载进度条
progressBar:function(){
$("<div id='myCover'></div><div id='loadimg'><span>正在加载,请稍等O(∩_∩)O哈</span></div>").appendTo('body');
var w=$(window).width(),h=$(window).height();
$('#myCover').css({'width':'100%','height':h,'position':'absolute','background':'#fff','z-index':9999,'left':0,'top':0}).fadeTo('slow',0.8);
$('#loadimg').css({'position':'absolute','background':'url(themes/default/images/loading.gif) no-repeat center center','z-index':10000,'width':'110px','height':'64px','left':(w-110)/2,'top':((h-64)/2)-50}).find('span').css({'position':'absolute','left':0,'bottom':'-40px','width':110,'display':'block','height':40,'text-align':'center'});
},
//停止进度条
stopProgress:function(){
$('#myCover').remove();
$('#loadimg').remove();
},
getImgWh:function(url, callback) {
var width, height, intervalId, check, div, img = new Image(),
body = document.body;
img.src = url;
//从缓存中读取
if (img.complete) {
return callback(img.width, img.height);
};
//通过占位提前获取图片头部数据
if (body) {
div = document.createElement('div');
div.style.cssText = 'visibility:hidden;position:absolute;left:0;top:0;width:1px;height:1px;overflow:hidden';
div.appendChild(img)
body.appendChild(div);
width = img.offsetWidth;
height = img.offsetHeight;
check = function() {
if (img.offsetWidth !== width || img.offsetHeight !== height) {
clearInterval(intervalId);
callback(img.offsetWidth, img.clientHeight);
img.onload = null;
div.innerHTML = '';
div.parentNode.removeChild(div);
};
};
intervalId = setInterval(check, 150);
};
// 加载完毕后方式获取
img.onload = function() {
callback(img.width, img.height);
img.onload = img.onerror = null;
clearInterval(intervalId);
body && img.parentNode.removeChild(img);
};
},
//全屏
fullscreen:function(){
var docElm = document.documentElement;
if (docElm.requestFullscreen) {
docElm.requestFullscreen();
}
else if (docElm.mozRequestFullScreen) {
docElm.mozRequestFullScreen();
}
else if (docElm.webkitRequestFullScreen) {
docElm.webkitRequestFullScreen();
}
},
//退出全屏
exitFullscreen:function(){
if (document.exitFullscreen) {
document.exitFullscreen();
}
else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
}
else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
}
},
//IE全屏
fullscreenIE:function(){
if($.browser.msie){
var wsh = new ActiveXObject("WScript.Shell");
wsh.sendKeys("{F11}");
}
}
}
/*------------------------------------------
*jquery扩展加载技术文件和css文件
-------------------------------------------*/
$.extend({
includePath: '',
include: function(file)
{
var files = typeof file == "string" ? [file] : file;
for (var i = 0; i < files.length; i++)
{
var name = files[i].replace(/^\s|\s$/g, "");
var att = name.split('.');
var ext = att[att.length - 1].toLowerCase();
var isCSS = ext == "css";
var tag = isCSS ? "link" : "script";
var attr = isCSS ? " type='text/css' rel='stylesheet' " : " language='javascript' type='text/javascript' ";
var link = (isCSS ? "href" : "src") + "='" + $.includePath + name + "'";
if ($(tag + "[" + link + "]").length == 0) document.write("<" + tag + attr + link + "></" + tag + ">");
}
}
});