Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
76a0033a
"vscode:/vscode.git/clone" did not exist on "7e217d8573c0b7c3b17b6a22abec104b46f46ff9"
Commit
76a0033a
authored
Apr 07, 2021
by
季圣华
Browse files
清空旧版本
parent
df57ada9
Changes
644
Hide whitespace changes
Inline
Side-by-side
Too many changes to show.
To preserve performance only
4 of 644+
files are displayed.
Plain diff
Email patch
erp_web/js/easyui/plugins/jquery.messager.js
deleted
100644 → 0
View file @
df57ada9
/**
* EasyUI for jQuery 1.9.4
*
* Copyright (c) 2009-2020 www.jeasyui.com. All rights reserved.
*
* Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php
* To use it on other terms please contact us: info@jeasyui.com
*
*/
(
function
(
$
){
function
_1
(){
$
(
document
).
_unbind
(
"
.messager
"
).
_bind
(
"
keydown.messager
"
,
function
(
e
){
if
(
e
.
keyCode
==
27
){
$
(
"
body
"
).
children
(
"
div.messager-window
"
).
children
(
"
div.messager-body
"
).
each
(
function
(){
$
(
this
).
dialog
(
"
close
"
);
});
}
else
{
if
(
e
.
keyCode
==
9
){
var
_2
=
$
(
"
body
"
).
children
(
"
div.messager-window
"
);
if
(
!
_2
.
length
){
return
;
}
var
_3
=
_2
.
find
(
"
.messager-input,.messager-button .l-btn
"
);
for
(
var
i
=
0
;
i
<
_3
.
length
;
i
++
){
if
(
$
(
_3
[
i
]).
is
(
"
:focus
"
)){
$
(
_3
[
i
>=
_3
.
length
-
1
?
0
:
i
+
1
]).
focus
();
return
false
;
}
}
}
else
{
if
(
e
.
keyCode
==
13
){
var
_4
=
$
(
e
.
target
).
closest
(
"
input.messager-input
"
);
if
(
_4
.
length
){
var
_5
=
_4
.
closest
(
"
.messager-body
"
);
_6
(
_5
,
_4
.
val
());
}
}
}
}
});
};
function
_7
(){
$
(
document
).
_unbind
(
"
.messager
"
);
};
function
_8
(
_9
){
var
_a
=
$
.
extend
({},
$
.
messager
.
defaults
,{
modal
:
false
,
shadow
:
false
,
draggable
:
false
,
resizable
:
false
,
closed
:
true
,
style
:{
left
:
""
,
top
:
""
,
right
:
0
,
zIndex
:
$
.
fn
.
window
.
defaults
.
zIndex
++
,
bottom
:
-
document
.
body
.
scrollTop
-
document
.
documentElement
.
scrollTop
},
title
:
""
,
width
:
300
,
height
:
150
,
minHeight
:
0
,
showType
:
"
slide
"
,
showSpeed
:
600
,
content
:
_9
.
msg
,
timeout
:
4000
},
_9
);
var
_b
=
$
(
"
<div class=
\"
messager-body
\"
></div>
"
).
appendTo
(
"
body
"
);
_b
.
dialog
(
$
.
extend
({},
_a
,{
noheader
:(
_a
.
title
?
false
:
true
),
openAnimation
:(
_a
.
showType
),
closeAnimation
:(
_a
.
showType
==
"
show
"
?
"
hide
"
:
_a
.
showType
),
openDuration
:
_a
.
showSpeed
,
closeDuration
:
_a
.
showSpeed
,
onOpen
:
function
(){
_b
.
dialog
(
"
dialog
"
).
hover
(
function
(){
if
(
_a
.
timer
){
clearTimeout
(
_a
.
timer
);
}
},
function
(){
_c
();
});
_c
();
function
_c
(){
if
(
_a
.
timeout
>
0
){
_a
.
timer
=
setTimeout
(
function
(){
if
(
_b
.
length
&&
_b
.
data
(
"
dialog
"
)){
_b
.
dialog
(
"
close
"
);
}
},
_a
.
timeout
);
}
};
if
(
_9
.
onOpen
){
_9
.
onOpen
.
call
(
this
);
}
else
{
_a
.
onOpen
.
call
(
this
);
}
},
onClose
:
function
(){
if
(
_a
.
timer
){
clearTimeout
(
_a
.
timer
);
}
if
(
_9
.
onClose
){
_9
.
onClose
.
call
(
this
);
}
else
{
_a
.
onClose
.
call
(
this
);
}
_b
.
dialog
(
"
destroy
"
);
}}));
_b
.
dialog
(
"
dialog
"
).
css
(
_a
.
style
);
_b
.
dialog
(
"
open
"
);
return
_b
;
};
function
_d
(
_e
){
_1
();
var
_f
=
$
(
"
<div class=
\"
messager-body
\"
></div>
"
).
appendTo
(
"
body
"
);
_f
.
dialog
(
$
.
extend
({},
_e
,{
noheader
:(
_e
.
title
?
false
:
true
),
onClose
:
function
(){
_7
();
if
(
_e
.
onClose
){
_e
.
onClose
.
call
(
this
);
}
_f
.
dialog
(
"
destroy
"
);
}}));
var
win
=
_f
.
dialog
(
"
dialog
"
).
addClass
(
"
messager-window
"
);
win
.
find
(
"
.dialog-button
"
).
addClass
(
"
messager-button
"
).
find
(
"
a:first
"
).
focus
();
return
_f
;
};
function
_6
(
dlg
,
_10
){
var
_11
=
dlg
.
dialog
(
"
options
"
);
dlg
.
dialog
(
"
close
"
);
_11
.
fn
(
_10
);
};
$
.
messager
=
{
show
:
function
(
_12
){
return
_8
(
_12
);
},
alert
:
function
(
_13
,
msg
,
_14
,
fn
){
var
_15
=
typeof
_13
==
"
object
"
?
_13
:{
title
:
_13
,
msg
:
msg
,
icon
:
_14
,
fn
:
fn
};
var
cls
=
_15
.
icon
?
"
messager-icon messager-
"
+
_15
.
icon
:
""
;
_15
=
$
.
extend
({},
$
.
messager
.
defaults
,{
content
:
"
<div class=
\"
"
+
cls
+
"
\"
></div>
"
+
"
<div>
"
+
_15
.
msg
+
"
</div>
"
+
"
<div style=
\"
clear:both;
\"
/>
"
},
_15
);
if
(
!
_15
.
buttons
){
_15
.
buttons
=
[{
text
:
_15
.
ok
,
onClick
:
function
(){
_6
(
dlg
);
}}];
}
var
dlg
=
_d
(
_15
);
return
dlg
;
},
confirm
:
function
(
_16
,
msg
,
fn
){
var
_17
=
typeof
_16
==
"
object
"
?
_16
:{
title
:
_16
,
msg
:
msg
,
fn
:
fn
};
_17
=
$
.
extend
({},
$
.
messager
.
defaults
,{
content
:
"
<div class=
\"
messager-icon messager-question
\"
></div>
"
+
"
<div>
"
+
_17
.
msg
+
"
</div>
"
+
"
<div style=
\"
clear:both;
\"
/>
"
},
_17
);
if
(
!
_17
.
buttons
){
_17
.
buttons
=
[{
text
:
_17
.
ok
,
onClick
:
function
(){
_6
(
dlg
,
true
);
}},{
text
:
_17
.
cancel
,
onClick
:
function
(){
_6
(
dlg
,
false
);
}}];
}
var
dlg
=
_d
(
_17
);
return
dlg
;
},
prompt
:
function
(
_18
,
msg
,
fn
){
var
_19
=
typeof
_18
==
"
object
"
?
_18
:{
title
:
_18
,
msg
:
msg
,
fn
:
fn
};
_19
=
$
.
extend
({},
$
.
messager
.
defaults
,{
content
:
"
<div class=
\"
messager-icon messager-question
\"
></div>
"
+
"
<div>
"
+
_19
.
msg
+
"
</div>
"
+
"
<br/>
"
+
"
<div style=
\"
clear:both;
\"
/>
"
+
"
<div><input class=
\"
messager-input
\"
type=
\"
text
\"
/></div>
"
},
_19
);
if
(
!
_19
.
buttons
){
_19
.
buttons
=
[{
text
:
_19
.
ok
,
onClick
:
function
(){
_6
(
dlg
,
dlg
.
find
(
"
.messager-input
"
).
val
());
}},{
text
:
_19
.
cancel
,
onClick
:
function
(){
_6
(
dlg
);
}}];
}
var
dlg
=
_d
(
_19
);
dlg
.
find
(
"
.messager-input
"
).
focus
();
return
dlg
;
},
progress
:
function
(
_1a
){
var
_1b
=
{
bar
:
function
(){
return
$
(
"
body>div.messager-window
"
).
find
(
"
div.messager-p-bar
"
);
},
close
:
function
(){
var
dlg
=
$
(
"
body>div.messager-window>div.messager-body:has(div.messager-progress)
"
);
if
(
dlg
.
length
){
dlg
.
dialog
(
"
close
"
);
}
}};
if
(
typeof
_1a
==
"
string
"
){
var
_1c
=
_1b
[
_1a
];
return
_1c
();
}
_1a
=
_1a
||
{};
var
_1d
=
$
.
extend
({},{
title
:
""
,
minHeight
:
0
,
content
:
undefined
,
msg
:
""
,
text
:
undefined
,
interval
:
300
},
_1a
);
var
dlg
=
_d
(
$
.
extend
({},
$
.
messager
.
defaults
,{
content
:
"
<div class=
\"
messager-progress
\"
><div class=
\"
messager-p-msg
\"
>
"
+
_1d
.
msg
+
"
</div><div class=
\"
messager-p-bar
\"
></div></div>
"
,
closable
:
false
,
doSize
:
false
},
_1d
,{
onClose
:
function
(){
if
(
this
.
timer
){
clearInterval
(
this
.
timer
);
}
if
(
_1a
.
onClose
){
_1a
.
onClose
.
call
(
this
);
}
else
{
$
.
messager
.
defaults
.
onClose
.
call
(
this
);
}
}}));
var
bar
=
dlg
.
find
(
"
div.messager-p-bar
"
);
bar
.
progressbar
({
text
:
_1d
.
text
});
dlg
.
dialog
(
"
resize
"
);
if
(
_1d
.
interval
){
dlg
[
0
].
timer
=
setInterval
(
function
(){
var
v
=
bar
.
progressbar
(
"
getValue
"
);
v
+=
10
;
if
(
v
>
100
){
v
=
0
;
}
bar
.
progressbar
(
"
setValue
"
,
v
);
},
_1d
.
interval
);
}
return
dlg
;
}};
$
.
messager
.
defaults
=
$
.
extend
({},
$
.
fn
.
dialog
.
defaults
,{
ok
:
"
Ok
"
,
cancel
:
"
Cancel
"
,
width
:
300
,
height
:
"
auto
"
,
minHeight
:
150
,
modal
:
true
,
collapsible
:
false
,
minimizable
:
false
,
maximizable
:
false
,
resizable
:
false
,
fn
:
function
(){
}});
})(
jQuery
);
erp_web/js/easyui/plugins/jquery.mobile.js
deleted
100644 → 0
View file @
df57ada9
/**
* EasyUI for jQuery 1.9.4
*
* Copyright (c) 2009-2020 www.jeasyui.com. All rights reserved.
*
* Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php
* To use it on other terms please contact us: info@jeasyui.com
*
*/
(
function
(
$
){
$
.
fn
.
navpanel
=
function
(
_1
,
_2
){
if
(
typeof
_1
==
"
string
"
){
var
_3
=
$
.
fn
.
navpanel
.
methods
[
_1
];
return
_3
?
_3
(
this
,
_2
):
this
.
panel
(
_1
,
_2
);
}
else
{
_1
=
_1
||
{};
return
this
.
each
(
function
(){
var
_4
=
$
.
data
(
this
,
"
navpanel
"
);
if
(
_4
){
$
.
extend
(
_4
.
options
,
_1
);
}
else
{
_4
=
$
.
data
(
this
,
"
navpanel
"
,{
options
:
$
.
extend
({},
$
.
fn
.
navpanel
.
defaults
,
$
.
fn
.
navpanel
.
parseOptions
(
this
),
_1
)});
}
$
(
this
).
panel
(
_4
.
options
);
});
}
};
$
.
fn
.
navpanel
.
methods
=
{
options
:
function
(
jq
){
return
$
.
data
(
jq
[
0
],
"
navpanel
"
).
options
;
}};
$
.
fn
.
navpanel
.
parseOptions
=
function
(
_5
){
return
$
.
extend
({},
$
.
fn
.
panel
.
parseOptions
(
_5
),
$
.
parser
.
parseOptions
(
_5
,[]));
};
$
.
fn
.
navpanel
.
defaults
=
$
.
extend
({},
$
.
fn
.
panel
.
defaults
,{
fit
:
true
,
border
:
false
,
cls
:
"
navpanel
"
});
$
.
parser
.
plugins
.
push
(
"
navpanel
"
);
})(
jQuery
);
(
function
(
$
){
$
(
function
(){
$
.
mobile
.
init
();
});
$
.
mobile
=
{
defaults
:{
animation
:
"
slide
"
,
direction
:
"
left
"
,
reverseDirections
:{
up
:
"
down
"
,
down
:
"
up
"
,
left
:
"
right
"
,
right
:
"
left
"
}},
panels
:[],
init
:
function
(
_6
){
$
.
mobile
.
panels
=
[];
var
_7
=
$
(
_6
||
"
body
"
).
children
(
"
.navpanel:visible
"
);
if
(
_7
.
length
){
_7
.
not
(
"
:first
"
).
children
(
"
.panel-body
"
).
navpanel
(
"
close
"
);
var
p
=
_7
.
eq
(
0
).
children
(
"
.panel-body
"
);
$
.
mobile
.
panels
.
push
({
panel
:
p
,
animation
:
$
.
mobile
.
defaults
.
animation
,
direction
:
$
.
mobile
.
defaults
.
direction
});
}
$
(
document
).
_unbind
(
"
.mobile
"
).
_bind
(
"
click.mobile
"
,
function
(
e
){
var
a
=
$
(
e
.
target
).
closest
(
"
a
"
);
if
(
a
.
length
){
var
_8
=
$
.
parser
.
parseOptions
(
a
[
0
],[
"
animation
"
,
"
direction
"
,{
back
:
"
boolean
"
}]);
if
(
_8
.
back
){
$
.
mobile
.
back
();
e
.
preventDefault
();
}
else
{
var
_9
=
$
.
trim
(
a
.
attr
(
"
href
"
));
if
(
/^#/
.
test
(
_9
)){
var
to
=
$
(
_9
);
if
(
to
.
length
&&
to
.
hasClass
(
"
panel-body
"
)){
$
.
mobile
.
go
(
to
,
_8
.
animation
,
_8
.
direction
);
e
.
preventDefault
();
}
}
}
}
});
$
(
window
).
_unbind
(
"
.mobile
"
).
_bind
(
"
hashchange.mobile
"
,
function
(){
var
_a
=
$
.
mobile
.
panels
.
length
;
if
(
_a
>
1
){
var
_b
=
location
.
hash
;
var
p
=
$
.
mobile
.
panels
[
_a
-
2
];
if
(
!
_b
||
_b
==
"
#&
"
+
p
.
panel
.
attr
(
"
id
"
)){
$
.
mobile
.
_back
();
}
}
});
},
nav
:
function
(
_c
,
to
,
_d
,
_e
){
if
(
window
.
WebKitAnimationEvent
){
_d
=
_d
!=
undefined
?
_d
:
$
.
mobile
.
defaults
.
animation
;
_e
=
_e
!=
undefined
?
_e
:
$
.
mobile
.
defaults
.
direction
;
var
_f
=
"
m-
"
+
_d
+
(
_e
?
"
-
"
+
_e
:
""
);
var
p1
=
$
(
_c
).
panel
(
"
open
"
).
panel
(
"
resize
"
).
panel
(
"
panel
"
);
var
p2
=
$
(
to
).
panel
(
"
open
"
).
panel
(
"
resize
"
).
panel
(
"
panel
"
);
p1
.
add
(
p2
).
_bind
(
"
webkitAnimationEnd
"
,
function
(){
$
(
this
).
_unbind
(
"
webkitAnimationEnd
"
);
var
p
=
$
(
this
).
children
(
"
.panel-body
"
);
if
(
$
(
this
).
hasClass
(
"
m-in
"
)){
p
.
panel
(
"
open
"
).
panel
(
"
resize
"
);
}
else
{
p
.
panel
(
"
close
"
);
}
$
(
this
).
removeClass
(
_f
+
"
m-in m-out
"
);
});
p2
.
addClass
(
_f
+
"
m-in
"
);
p1
.
addClass
(
_f
+
"
m-out
"
);
}
else
{
$
(
to
).
panel
(
"
open
"
).
panel
(
"
resize
"
);
$
(
_c
).
panel
(
"
close
"
);
}
},
_go
:
function
(
_10
,
_11
,
_12
){
_11
=
_11
!=
undefined
?
_11
:
$
.
mobile
.
defaults
.
animation
;
_12
=
_12
!=
undefined
?
_12
:
$
.
mobile
.
defaults
.
direction
;
var
_13
=
$
.
mobile
.
panels
[
$
.
mobile
.
panels
.
length
-
1
].
panel
;
var
to
=
$
(
_10
);
if
(
_13
[
0
]
!=
to
[
0
]){
$
.
mobile
.
nav
(
_13
,
to
,
_11
,
_12
);
$
.
mobile
.
panels
.
push
({
panel
:
to
,
animation
:
_11
,
direction
:
_12
});
}
},
_back
:
function
(){
if
(
$
.
mobile
.
panels
.
length
<
2
){
return
;
}
var
p1
=
$
.
mobile
.
panels
.
pop
();
var
p2
=
$
.
mobile
.
panels
[
$
.
mobile
.
panels
.
length
-
1
];
var
_14
=
p1
.
animation
;
var
_15
=
$
.
mobile
.
defaults
.
reverseDirections
[
p1
.
direction
]
||
""
;
$
.
mobile
.
nav
(
p1
.
panel
,
p2
.
panel
,
_14
,
_15
);
},
go
:
function
(
_16
,
_17
,
_18
){
_17
=
_17
!=
undefined
?
_17
:
$
.
mobile
.
defaults
.
animation
;
_18
=
_18
!=
undefined
?
_18
:
$
.
mobile
.
defaults
.
direction
;
location
.
hash
=
"
#&
"
+
$
(
_16
).
attr
(
"
id
"
);
$
.
mobile
.
_go
(
_16
,
_17
,
_18
);
},
back
:
function
(){
history
.
go
(
-
1
);
}};
$
.
map
([
"
validatebox
"
,
"
textbox
"
,
"
passwordbox
"
,
"
filebox
"
,
"
searchbox
"
,
"
combo
"
,
"
combobox
"
,
"
combogrid
"
,
"
combotree
"
,
"
combotreegrid
"
,
"
datebox
"
,
"
datetimebox
"
,
"
numberbox
"
,
"
spinner
"
,
"
numberspinner
"
,
"
timespinner
"
,
"
datetimespinner
"
],
function
(
_19
){
if
(
$
.
fn
[
_19
]){
$
.
extend
(
$
.
fn
[
_19
].
defaults
,{
iconWidth
:
28
,
tipPosition
:
"
bottom
"
});
}
});
$
.
map
([
"
spinner
"
,
"
numberspinner
"
,
"
timespinner
"
,
"
datetimespinner
"
],
function
(
_1a
){
if
(
$
.
fn
[
_1a
]){
$
.
extend
(
$
.
fn
[
_1a
].
defaults
,{
iconWidth
:
56
,
spinAlign
:
"
horizontal
"
});
}
});
if
(
$
.
fn
.
menu
){
$
.
extend
(
$
.
fn
.
menu
.
defaults
,{
itemHeight
:
30
,
noline
:
true
});
}
})(
jQuery
);
erp_web/js/easyui/plugins/jquery.numberbox.js
deleted
100644 → 0
View file @
df57ada9
/**
* EasyUI for jQuery 1.9.4
*
* Copyright (c) 2009-2020 www.jeasyui.com. All rights reserved.
*
* Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php
* To use it on other terms please contact us: info@jeasyui.com
*
*/
(
function
(
$
){
function
_1
(
_2
){
var
_3
=
$
.
data
(
_2
,
"
numberbox
"
);
var
_4
=
_3
.
options
;
$
(
_2
).
addClass
(
"
numberbox-f
"
).
textbox
(
_4
);
$
(
_2
).
textbox
(
"
textbox
"
).
css
({
imeMode
:
"
disabled
"
});
$
(
_2
).
attr
(
"
numberboxName
"
,
$
(
_2
).
attr
(
"
textboxName
"
));
_3
.
numberbox
=
$
(
_2
).
next
();
_3
.
numberbox
.
addClass
(
"
numberbox
"
);
var
_5
=
_4
.
parser
.
call
(
_2
,
_4
.
value
);
var
_6
=
_4
.
formatter
.
call
(
_2
,
_5
);
$
(
_2
).
numberbox
(
"
initValue
"
,
_5
).
numberbox
(
"
setText
"
,
_6
);
};
function
_7
(
_8
,
_9
){
var
_a
=
$
.
data
(
_8
,
"
numberbox
"
);
var
_b
=
_a
.
options
;
_b
.
value
=
parseFloat
(
_9
);
var
_9
=
_b
.
parser
.
call
(
_8
,
_9
);
var
_c
=
_b
.
formatter
.
call
(
_8
,
_9
);
_b
.
value
=
_9
;
$
(
_8
).
textbox
(
"
setText
"
,
_c
).
textbox
(
"
setValue
"
,
_9
);
_c
=
_b
.
formatter
.
call
(
_8
,
$
(
_8
).
textbox
(
"
getValue
"
));
$
(
_8
).
textbox
(
"
setText
"
,
_c
);
};
$
.
fn
.
numberbox
=
function
(
_d
,
_e
){
if
(
typeof
_d
==
"
string
"
){
var
_f
=
$
.
fn
.
numberbox
.
methods
[
_d
];
if
(
_f
){
return
_f
(
this
,
_e
);
}
else
{
return
this
.
textbox
(
_d
,
_e
);
}
}
_d
=
_d
||
{};
return
this
.
each
(
function
(){
var
_10
=
$
.
data
(
this
,
"
numberbox
"
);
if
(
_10
){
$
.
extend
(
_10
.
options
,
_d
);
}
else
{
_10
=
$
.
data
(
this
,
"
numberbox
"
,{
options
:
$
.
extend
({},
$
.
fn
.
numberbox
.
defaults
,
$
.
fn
.
numberbox
.
parseOptions
(
this
),
_d
)});
}
_1
(
this
);
});
};
$
.
fn
.
numberbox
.
methods
=
{
options
:
function
(
jq
){
var
_11
=
jq
.
data
(
"
textbox
"
)?
jq
.
textbox
(
"
options
"
):{};
return
$
.
extend
(
$
.
data
(
jq
[
0
],
"
numberbox
"
).
options
,{
width
:
_11
.
width
,
originalValue
:
_11
.
originalValue
,
disabled
:
_11
.
disabled
,
readonly
:
_11
.
readonly
});
},
cloneFrom
:
function
(
jq
,
_12
){
return
jq
.
each
(
function
(){
$
(
this
).
textbox
(
"
cloneFrom
"
,
_12
);
$
.
data
(
this
,
"
numberbox
"
,{
options
:
$
.
extend
(
true
,{},
$
(
_12
).
numberbox
(
"
options
"
))});
$
(
this
).
addClass
(
"
numberbox-f
"
);
});
},
fix
:
function
(
jq
){
return
jq
.
each
(
function
(){
var
_13
=
$
(
this
).
numberbox
(
"
options
"
);
_13
.
value
=
null
;
var
_14
=
_13
.
parser
.
call
(
this
,
$
(
this
).
numberbox
(
"
getText
"
));
$
(
this
).
numberbox
(
"
setValue
"
,
_14
);
});
},
setValue
:
function
(
jq
,
_15
){
return
jq
.
each
(
function
(){
_7
(
this
,
_15
);
});
},
clear
:
function
(
jq
){
return
jq
.
each
(
function
(){
$
(
this
).
textbox
(
"
clear
"
);
$
(
this
).
numberbox
(
"
options
"
).
value
=
""
;
});
},
reset
:
function
(
jq
){
return
jq
.
each
(
function
(){
$
(
this
).
textbox
(
"
reset
"
);
$
(
this
).
numberbox
(
"
setValue
"
,
$
(
this
).
numberbox
(
"
getValue
"
));
});
}};
$
.
fn
.
numberbox
.
parseOptions
=
function
(
_16
){
var
t
=
$
(
_16
);
return
$
.
extend
({},
$
.
fn
.
textbox
.
parseOptions
(
_16
),
$
.
parser
.
parseOptions
(
_16
,[
"
decimalSeparator
"
,
"
groupSeparator
"
,
"
suffix
"
,{
min
:
"
number
"
,
max
:
"
number
"
,
precision
:
"
number
"
}]),{
prefix
:(
t
.
attr
(
"
prefix
"
)?
t
.
attr
(
"
prefix
"
):
undefined
)});
};
$
.
fn
.
numberbox
.
defaults
=
$
.
extend
({},
$
.
fn
.
textbox
.
defaults
,{
inputEvents
:{
keypress
:
function
(
e
){
var
_17
=
e
.
data
.
target
;
var
_18
=
$
(
_17
).
numberbox
(
"
options
"
);
return
_18
.
filter
.
call
(
_17
,
e
);
},
blur
:
function
(
e
){
$
(
e
.
data
.
target
).
numberbox
(
"
fix
"
);
},
keydown
:
function
(
e
){
if
(
e
.
keyCode
==
13
){
$
(
e
.
data
.
target
).
numberbox
(
"
fix
"
);
}
}},
min
:
null
,
max
:
null
,
precision
:
0
,
decimalSeparator
:
"
.
"
,
groupSeparator
:
""
,
prefix
:
""
,
suffix
:
""
,
filter
:
function
(
e
){
var
_19
=
$
(
this
).
numberbox
(
"
options
"
);
var
s
=
$
(
this
).
numberbox
(
"
getText
"
);
if
(
e
.
metaKey
||
e
.
ctrlKey
){
return
true
;
}
if
(
$
.
inArray
(
String
(
e
.
which
),[
"
46
"
,
"
8
"
,
"
13
"
,
"
0
"
])
>=
0
){
return
true
;
}
var
tmp
=
$
(
"
<span></span>
"
);
tmp
.
html
(
String
.
fromCharCode
(
e
.
which
));
var
c
=
tmp
.
text
();
tmp
.
remove
();
if
(
!
c
){
return
true
;
}
if
(
c
==
"
-
"
&&
_19
.
min
!=
null
&&
_19
.
min
>=
0
){
return
false
;
}
if
(
c
==
"
-
"
||
c
==
_19
.
decimalSeparator
){
return
(
s
.
indexOf
(
c
)
==-
1
)?
true
:
false
;
}
else
{
if
(
c
==
_19
.
groupSeparator
){
return
true
;
}
else
{
if
(
"
0123456789
"
.
indexOf
(
c
)
>=
0
){
return
true
;
}
else
{
return
false
;
}
}
}
},
formatter
:
function
(
_1a
){
if
(
!
_1a
){
return
_1a
;
}
_1a
=
_1a
+
""
;
var
_1b
=
$
(
this
).
numberbox
(
"
options
"
);
var
s1
=
_1a
,
s2
=
""
;
var
_1c
=
_1a
.
indexOf
(
"
.
"
);
if
(
_1c
>=
0
){
s1
=
_1a
.
substring
(
0
,
_1c
);
s2
=
_1a
.
substring
(
_1c
+
1
,
_1a
.
length
);
}
if
(
_1b
.
groupSeparator
){
var
p
=
/
(\d
+
)(\d{3})
/
;
while
(
p
.
test
(
s1
)){
s1
=
s1
.
replace
(
p
,
"
$1
"
+
_1b
.
groupSeparator
+
"
$2
"
);
}
}
if
(
s2
){
return
_1b
.
prefix
+
s1
+
_1b
.
decimalSeparator
+
s2
+
_1b
.
suffix
;
}
else
{
return
_1b
.
prefix
+
s1
+
_1b
.
suffix
;
}
},
parser
:
function
(
s
){
s
=
s
+
""
;
var
_1d
=
$
(
this
).
numberbox
(
"
options
"
);
if
(
_1d
.
prefix
){
s
=
$
.
trim
(
s
.
replace
(
new
RegExp
(
"
\\
"
+
$
.
trim
(
_1d
.
prefix
),
"
g
"
),
""
));
}
if
(
_1d
.
suffix
){
s
=
$
.
trim
(
s
.
replace
(
new
RegExp
(
"
\\
"
+
$
.
trim
(
_1d
.
suffix
),
"
g
"
),
""
));
}
if
(
parseFloat
(
s
)
!=
_1d
.
value
){
if
(
_1d
.
groupSeparator
){
s
=
$
.
trim
(
s
.
replace
(
new
RegExp
(
"
\\
"
+
_1d
.
groupSeparator
,
"
g
"
),
""
));
}
if
(
_1d
.
decimalSeparator
){
s
=
$
.
trim
(
s
.
replace
(
new
RegExp
(
"
\\
"
+
_1d
.
decimalSeparator
,
"
g
"
),
"
.
"
));
}
s
=
s
.
replace
(
/
\s
/g
,
""
);
}
var
val
=
parseFloat
(
s
).
toFixed
(
_1d
.
precision
);
if
(
isNaN
(
val
)){
val
=
""
;
}
else
{
if
(
typeof
(
_1d
.
min
)
==
"
number
"
&&
val
<
_1d
.
min
){
val
=
_1d
.
min
.
toFixed
(
_1d
.
precision
);
}
else
{
if
(
typeof
(
_1d
.
max
)
==
"
number
"
&&
val
>
_1d
.
max
){
val
=
_1d
.
max
.
toFixed
(
_1d
.
precision
);
}
}
}
return
val
;
}});
})(
jQuery
);
erp_web/js/easyui/plugins/jquery.numberspinner.js
deleted
100644 → 0
View file @
df57ada9
/**
* EasyUI for jQuery 1.9.4
*
* Copyright (c) 2009-2020 www.jeasyui.com. All rights reserved.
*
* Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php
* To use it on other terms please contact us: info@jeasyui.com
*
*/
(
function
(
$
){
function
_1
(
_2
){
$
(
_2
).
addClass
(
"
numberspinner-f
"
);
var
_3
=
$
.
data
(
_2
,
"
numberspinner
"
).
options
;
$
(
_2
).
numberbox
(
$
.
extend
({},
_3
,{
doSize
:
false
})).
spinner
(
_3
);
$
(
_2
).
numberbox
(
"
setValue
"
,
_3
.
value
);
};
function
_4
(
_5
,
_6
){
var
_7
=
$
.
data
(
_5
,
"
numberspinner
"
).
options
;
var
v
=
parseFloat
(
$
(
_5
).
numberbox
(
"
getValue
"
)
||
_7
.
value
)
||
0
;
if
(
_6
){
v
-=
_7
.
increment
;
}
else
{
v
+=
_7
.
increment
;
}
$
(
_5
).
numberbox
(
"
setValue
"
,
v
);
};
$
.
fn
.
numberspinner
=
function
(
_8
,
_9
){
if
(
typeof
_8
==
"
string
"
){
var
_a
=
$
.
fn
.
numberspinner
.
methods
[
_8
];
if
(
_a
){
return
_a
(
this
,
_9
);
}
else
{
return
this
.
numberbox
(
_8
,
_9
);
}
}
_8
=
_8
||
{};
return
this
.
each
(
function
(){
var
_b
=
$
.
data
(
this
,
"
numberspinner
"
);
if
(
_b
){
$
.
extend
(
_b
.
options
,
_8
);
}
else
{
$
.
data
(
this
,
"
numberspinner
"
,{
options
:
$
.
extend
({},
$
.
fn
.
numberspinner
.
defaults
,
$
.
fn
.
numberspinner
.
parseOptions
(
this
),
_8
)});
}
_1
(
this
);
});
};
$
.
fn
.
numberspinner
.
methods
=
{
options
:
function
(
jq
){
var
_c
=
jq
.
numberbox
(
"
options
"
);
return
$
.
extend
(
$
.
data
(
jq
[
0
],
"
numberspinner
"
).
options
,{
width
:
_c
.
width
,
value
:
_c
.
value
,
originalValue
:
_c
.
originalValue
,
disabled
:
_c
.
disabled
,
readonly
:
_c
.
readonly
});
}};
$
.
fn
.
numberspinner
.
parseOptions
=
function
(
_d
){
return
$
.
extend
({},
$
.
fn
.
spinner
.
parseOptions
(
_d
),
$
.
fn
.
numberbox
.
parseOptions
(
_d
),{});
};
$
.
fn
.
numberspinner
.
defaults
=
$
.
extend
({},
$
.
fn
.
spinner
.
defaults
,
$
.
fn
.
numberbox
.
defaults
,{
spin
:
function
(
_e
){
_4
(
this
,
_e
);
}});
})(
jQuery
);
Prev
1
…
29
30
31
32
33
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment