common_wev8.js
3.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
String.prototype.replaceAll = function(reallyDo, replaceWith, ignoreCase) {
if (!RegExp.prototype.isPrototypeOf(reallyDo)) {
return this.replace(new RegExp(reallyDo, (ignoreCase ? "gi": "g")), replaceWith);
} else {
return this.replace(reallyDo, replaceWith);
}
}
function OpenNewWindow(sURL,w,h){
var iWidth = 0 ;
var iHeight = 0 ;
iWidth=(window.screen.availWidth-10)*w;
iHeight=(window.screen.availHeight-50)*h;
ileft=(window.screen.availWidth - iWidth)/2;
itop= (window.screen.availHeight - iHeight + 50)/2;
var szFeatures = "" ;
szFeatures = "resizable=no,status=no,menubar=no,width=" +
iWidth + ",height=" + iHeight*h + ",top="+itop+",left="+ileft
window.open(sURL,"",szFeatures)
}
function openFullWindowForXtable(url){
var redirectUrl = url ;
var width = screen.width ;
var height = screen.height ;
var szFeatures = "top=100," ;
szFeatures +="left=400," ;
szFeatures +="width="+width/2+"," ;
szFeatures +="height="+height/2+"," ;
szFeatures +="directories=no," ;
szFeatures +="status=yes," ;
szFeatures +="menubar=no," ;
szFeatures +="scrollbars=yes," ;
szFeatures +="resizable=yes" ; //channelmode
window.open(redirectUrl,"",szFeatures) ;
}
function clearNoNum(obj){
obj.value = obj.value.replace(/[^\d.]/g,"");
obj.value = obj.value.replace(/^\./g,"");
obj.value = obj.value.replace(/\.{2,}/g,".");
obj.value = obj.value.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
}
var dialog = null;
function closeDialog(){
if(dialog)
dialog.close();
}
function openDialog(url,title,width,height,blankTab,maxiumnable){
dialog = new window.top.Dialog();
dialog.currentWindow = window;
if(width){
dialog.Width = width;
}else{
dialog.Width = 600;
}
if(height){
dialog.Height = height;
}else{
dialog.Height = 260;
}
if(title){
dialog.Title=title;
}
dialog.Drag = true;
if(maxiumnable&&maxiumnable==true){
dialog.maxiumnable=true;
}
if(blankTab==true){
dialog.URL = "/album/AlbumBlankTab.jsp?url="+url.replaceAll("&","%26",false) +"&title="+title;
}else{
dialog.URL = url;
}
//console.log("dialogurl:"+dialog.URL);
dialog.show();
}
function resetForm(obj){
var form= obj.parents("form").first();
//form.find("input[type='text']").val("");
form.find(".e8_os").find("span.e8_showNameClass").remove();
form.find(".e8_os").find("input[type='hidden']").val("");
form.find("select[name!=mouldid]").selectbox("detach");
form.find("select[name!=mouldid]").val("");
form.find("select[name!=mouldid]").trigger("change");
form.find("span.jNiceCheckbox").removeClass("jNiceChecked");
beautySelect(form.find("select[name!=mouldid]"));
form.find(".calendar").siblings("span").html("");
form.find(".calendar").siblings("input[type='hidden']").val("");
}
jQuery(document).ready(function () {
jQuery("form").find("input[type=reset]").bind('click',function(){resetForm(jQuery(this));});
jQuery("input[type=checkbox]").each(function(){
if(jQuery(this).attr("tzCheckbox")=="true"){
jQuery(this).tzCheckbox({labels:['','']});
}
});
});
function refreshTab(){
jQuery('.flowMenusTd',parent.document).toggle();
jQuery('.leftTypeSearch',parent.document).toggle();
}