Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Moecube Store
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Moecube Store
Commits
8dacab03
Commit
8dacab03
authored
Feb 19, 2013
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
humane
parent
0ce82231
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
83 additions
and
2 deletions
+83
-2
assets/javascripts/rooms.coffee
assets/javascripts/rooms.coffee
+3
-1
assets/javascripts/rooms.js
assets/javascripts/rooms.js
+4
-1
rooms/index.html
rooms/index.html
+3
-0
vendor/javascripts/humane.min.js
vendor/javascripts/humane.min.js
+1
-0
vendor/stylesheets/humane.css
vendor/stylesheets/humane.css
+72
-0
No files found.
assets/javascripts/rooms.coffee
View file @
8dacab03
...
...
@@ -225,7 +225,7 @@ $(document).ready ->
room
=
Room
.
find
(
room_id
)
mycard
.
join
(
room
.
server
().
ip
,
room
.
server
().
port
,
mycard
.
room_name
(
room
.
name
,
@
password
.
value
,
room
.
pvp
,
room
.
rule
,
room
.
mode
,
room
.
start_lp
,
room
.
start_hand
,
room
.
draw_count
),
Candy
.
Util
.
getCookie
(
'username'
),
Candy
.
Util
.
getCookie
(
'password'
)
if
room
.
server
().
auth
)
else
alert
'房间已经关闭'
humane
.
log
'房间已经关闭'
$
(
'#new_room_button'
).
click
->
new_room
.
name
.
value
=
Math
.
floor
Math
.
random
()
*
1000
...
...
@@ -246,6 +246,8 @@ $(document).ready ->
server_port
=
parseInt
new_room
.
server_port
.
value
server_auth
=
new_room
.
server_auth
.
checked
mycard
.
room_url
server_ip
,
server_port
,
mycard
.
room_name
(
new_room
.
name
.
value
,
null
,
new_room
.
pvp
.
checked
,
parseInt
(
new_room
.
rule
.
value
),
parseInt
(
new_room
.
mode
.
value
),
parseInt
(
new_room
.
start_lp
.
value
),
parseInt
(
new_room
.
start_hand
.
value
),
parseInt
(
new_room
.
draw_count
.
value
)),
null
,
null
,
new_room
.
password
.
value
.
length
,
server_auth
afterCopy
:
->
humane
.
log
'房间地址已复制到剪贴板'
new_room
.
password
.
onchange
=
->
$
(
'#new_room_copy_room_url_with_password'
).
zclip
(
'remove'
)
if
new_room
.
password
.
value
...
...
assets/javascripts/rooms.js
View file @
8dacab03
...
...
@@ -348,7 +348,7 @@
room
=
Room
.
find
(
room_id
);
return
mycard
.
join
(
room
.
server
().
ip
,
room
.
server
().
port
,
mycard
.
room_name
(
room
.
name
,
this
.
password
.
value
,
room
.
pvp
,
room
.
rule
,
room
.
mode
,
room
.
start_lp
,
room
.
start_hand
,
room
.
draw_count
),
Candy
.
Util
.
getCookie
(
'
username
'
),
room
.
server
().
auth
?
Candy
.
Util
.
getCookie
(
'
password
'
)
:
void
0
);
}
else
{
return
alert
(
'
房间已经关闭
'
);
return
humane
.
log
(
'
房间已经关闭
'
);
}
}
});
...
...
@@ -373,6 +373,9 @@
server_auth
=
new_room
.
server_auth
.
checked
;
}
return
mycard
.
room_url
(
server_ip
,
server_port
,
mycard
.
room_name
(
new_room
.
name
.
value
,
null
,
new_room
.
pvp
.
checked
,
parseInt
(
new_room
.
rule
.
value
),
parseInt
(
new_room
.
mode
.
value
),
parseInt
(
new_room
.
start_lp
.
value
),
parseInt
(
new_room
.
start_hand
.
value
),
parseInt
(
new_room
.
draw_count
.
value
)),
null
,
null
,
new_room
.
password
.
value
.
length
,
server_auth
);
},
afterCopy
:
function
()
{
return
humane
.
log
(
'
房间地址已复制到剪贴板
'
);
}
});
});
...
...
rooms/index.html
View file @
8dacab03
...
...
@@ -283,6 +283,9 @@
<script
src=
"/vendor/javascripts/stroll.min.js"
></script>
<script
src=
"/vendor/javascripts/jquery.zclip.min.js"
></script>
<script
src=
"/vendor/javascripts/humane.min.js"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/vendor/stylesheets/humane.css"
/>
<script
src=
"/vendor/javascripts/mycard.js"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/vendor/candy/res/default.css"
/>
...
...
vendor/javascripts/humane.min.js
0 → 100644
View file @
8dacab03
!
function
(
e
,
t
,
n
){
typeof
module
!=
"
undefined
"
?
module
.
exports
=
n
(
e
,
t
):
typeof
define
==
"
function
"
&&
typeof
define
.
amd
==
"
object
"
?
define
(
n
):
t
[
e
]
=
n
(
e
,
t
)}(
"
humane
"
,
this
,
function
(
e
,
t
){
var
n
=
window
,
r
=
document
,
i
=
{
on
:
function
(
e
,
t
,
r
){
"
addEventListener
"
in
n
?
e
.
addEventListener
(
t
,
r
,
!
1
):
e
.
attachEvent
(
"
on
"
+
t
,
r
)},
off
:
function
(
e
,
t
,
r
){
"
removeEventListener
"
in
n
?
e
.
removeEventListener
(
t
,
r
,
!
1
):
e
.
detachEvent
(
"
on
"
+
t
,
r
)},
bind
:
function
(
e
,
t
){
return
function
(){
e
.
apply
(
t
,
arguments
)}},
isArray
:
Array
.
isArray
||
function
(
e
){
return
Object
.
prototype
.
toString
.
call
(
e
)
===
"
[object Array]
"
},
config
:
function
(
e
,
t
){
return
e
!=
null
?
e
:
t
},
transSupport
:
!
1
,
useFilter
:
/msie
[
678
]
/i
.
test
(
navigator
.
userAgent
),
_checkTransition
:
function
(){
var
e
=
r
.
createElement
(
"
div
"
),
t
=
{
webkit
:
"
webkit
"
,
Moz
:
""
,
O
:
"
o
"
,
ms
:
"
MS
"
};
for
(
var
n
in
t
)
n
+
"
Transition
"
in
e
.
style
&&
(
this
.
vendorPrefix
=
t
[
n
],
this
.
transSupport
=!
0
)}};
i
.
_checkTransition
();
var
s
=
function
(
e
){
e
||
(
e
=
{}),
this
.
queue
=
[],
this
.
baseCls
=
e
.
baseCls
||
"
humane
"
,
this
.
addnCls
=
e
.
addnCls
||
""
,
this
.
timeout
=
"
timeout
"
in
e
?
e
.
timeout
:
2500
,
this
.
waitForMove
=
e
.
waitForMove
||!
1
,
this
.
clickToClose
=
e
.
clickToClose
||!
1
,
this
.
forceNew
=
e
.
forceNew
||!
1
,
this
.
container
=
e
.
container
;
try
{
this
.
_setupEl
()}
catch
(
t
){
i
.
on
(
n
,
"
load
"
,
i
.
bind
(
this
.
_setupEl
,
this
))}};
return
s
.
prototype
=
{
constructor
:
s
,
_setupEl
:
function
(){
var
e
=
r
.
createElement
(
"
div
"
);
e
.
style
.
display
=
"
none
"
,
this
.
container
||
(
this
.
container
=
r
.
body
),
this
.
container
.
appendChild
(
e
),
this
.
el
=
e
,
this
.
removeEvent
=
i
.
bind
(
this
.
remove
,
this
),
this
.
transEvent
=
i
.
bind
(
this
.
_afterAnimation
,
this
),
this
.
_run
()},
_afterTimeout
:
function
(){
i
.
config
(
this
.
currentMsg
.
waitForMove
,
this
.
waitForMove
)?
this
.
removeEventsSet
||
(
i
.
on
(
r
.
body
,
"
mousemove
"
,
this
.
removeEvent
),
i
.
on
(
r
.
body
,
"
click
"
,
this
.
removeEvent
),
i
.
on
(
r
.
body
,
"
keypress
"
,
this
.
removeEvent
),
i
.
on
(
r
.
body
,
"
touchstart
"
,
this
.
removeEvent
),
this
.
removeEventsSet
=!
0
):
this
.
remove
()},
_run
:
function
(){
if
(
this
.
_animating
||!
this
.
queue
.
length
||!
this
.
el
)
return
;
this
.
_animating
=!
0
,
this
.
currentTimer
&&
(
clearTimeout
(
this
.
currentTimer
),
this
.
currentTimer
=
null
);
var
e
=
this
.
queue
.
shift
(),
t
=
i
.
config
(
e
.
clickToClose
,
this
.
clickToClose
);
t
&&
(
i
.
on
(
this
.
el
,
"
click
"
,
this
.
removeEvent
),
i
.
on
(
this
.
el
,
"
touchstart
"
,
this
.
removeEvent
));
var
n
=
i
.
config
(
e
.
timeout
,
this
.
timeout
);
n
>
0
&&
(
this
.
currentTimer
=
setTimeout
(
i
.
bind
(
this
.
_afterTimeout
,
this
),
n
)),
i
.
isArray
(
e
.
html
)
&&
(
e
.
html
=
"
<ul><li>
"
+
e
.
html
.
join
(
"
<li>
"
)
+
"
</ul>
"
),
this
.
el
.
innerHTML
=
e
.
html
,
this
.
currentMsg
=
e
,
this
.
el
.
className
=
this
.
baseCls
,
i
.
transSupport
?(
this
.
el
.
style
.
display
=
"
block
"
,
setTimeout
(
i
.
bind
(
this
.
_showMsg
,
this
),
50
)):
this
.
_showMsg
()},
_setOpacity
:
function
(
e
){
i
.
useFilter
?
this
.
el
.
filters
.
item
(
"
DXImageTransform.Microsoft.Alpha
"
).
Opacity
=
e
*
100
:
this
.
el
.
style
.
opacity
=
String
(
e
)},
_showMsg
:
function
(){
var
e
=
i
.
config
(
this
.
currentMsg
.
addnCls
,
this
.
addnCls
);
if
(
i
.
transSupport
)
this
.
el
.
className
=
this
.
baseCls
+
"
"
+
e
+
"
"
+
this
.
baseCls
+
"
-animate
"
;
else
{
var
t
=
0
;
this
.
el
.
className
=
this
.
baseCls
+
"
"
+
e
+
"
"
+
this
.
baseCls
+
"
-js-animate
"
,
this
.
_setOpacity
(
0
),
this
.
el
.
style
.
display
=
"
block
"
;
var
n
=
this
,
r
=
setInterval
(
function
(){
t
<
1
?(
t
+=
.
1
,
t
>
1
&&
(
t
=
1
),
n
.
_setOpacity
(
t
)):
clearInterval
(
r
)},
30
)}},
_hideMsg
:
function
(){
var
e
=
i
.
config
(
this
.
currentMsg
.
addnCls
,
this
.
addnCls
);
if
(
i
.
transSupport
)
this
.
el
.
className
=
this
.
baseCls
+
"
"
+
e
,
i
.
on
(
this
.
el
,
i
.
vendorPrefix
?
i
.
vendorPrefix
+
"
TransitionEnd
"
:
"
transitionend
"
,
this
.
transEvent
);
else
var
t
=
1
,
n
=
this
,
r
=
setInterval
(
function
(){
t
>
0
?(
t
-=
.
1
,
t
<
0
&&
(
t
=
0
),
n
.
_setOpacity
(
t
)):(
n
.
el
.
className
=
n
.
baseCls
+
"
"
+
e
,
clearInterval
(
r
),
n
.
_afterAnimation
())},
30
)},
_afterAnimation
:
function
(){
i
.
transSupport
&&
i
.
off
(
this
.
el
,
i
.
vendorPrefix
?
i
.
vendorPrefix
+
"
TransitionEnd
"
:
"
transitionend
"
,
this
.
transEvent
),
this
.
currentMsg
.
cb
&&
this
.
currentMsg
.
cb
(),
this
.
el
.
style
.
display
=
"
none
"
,
this
.
_animating
=!
1
,
this
.
_run
()},
remove
:
function
(
e
){
var
t
=
typeof
e
==
"
function
"
?
e
:
null
;
i
.
off
(
r
.
body
,
"
mousemove
"
,
this
.
removeEvent
),
i
.
off
(
r
.
body
,
"
click
"
,
this
.
removeEvent
),
i
.
off
(
r
.
body
,
"
keypress
"
,
this
.
removeEvent
),
i
.
off
(
r
.
body
,
"
touchstart
"
,
this
.
removeEvent
),
i
.
off
(
this
.
el
,
"
click
"
,
this
.
removeEvent
),
i
.
off
(
this
.
el
,
"
touchstart
"
,
this
.
removeEvent
),
this
.
removeEventsSet
=!
1
,
t
&&
(
this
.
currentMsg
.
cb
=
t
),
this
.
_animating
?
this
.
_hideMsg
():
t
&&
t
()},
log
:
function
(
e
,
t
,
n
,
r
){
var
i
=
{};
if
(
r
)
for
(
var
s
in
r
)
i
[
s
]
=
r
[
s
];
if
(
typeof
t
==
"
function
"
)
n
=
t
;
else
if
(
t
)
for
(
var
s
in
t
)
i
[
s
]
=
t
[
s
];
return
i
.
html
=
e
,
n
&&
(
i
.
cb
=
n
),
this
.
queue
.
push
(
i
),
this
.
_run
(),
this
},
spawn
:
function
(
e
){
var
t
=
this
;
return
function
(
n
,
r
,
i
){
return
t
.
log
.
call
(
t
,
n
,
r
,
i
,
e
),
t
}},
create
:
function
(
e
){
return
new
s
(
e
)}},
new
s
});
\ No newline at end of file
vendor/stylesheets/humane.css
0 → 100644
View file @
8dacab03
html
,
body
{
min-height
:
100%
;
}
.humane
,
.humane-original
{
position
:
fixed
;
-moz-transition
:
all
0.2s
ease-out
;
-webkit-transition
:
all
0.2s
ease-out
;
-ms-transition
:
all
0.2s
ease-out
;
-o-transition
:
all
0.2s
ease-out
;
transition
:
all
0.2s
ease-out
;
z-index
:
100000
;
filter
:
progid
:
DXImageTransform
.
Microsoft
.
Alpha
(
Opacity
=
100
);
}
.humane
,
.humane-original
{
font-family
:
Ubuntu
,
Verdana
,
sans-serif
;
line-height
:
40px
;
font-size
:
25px
;
top
:
25%
;
left
:
25%
;
opacity
:
0
;
width
:
50%
;
min-height
:
40px
;
padding
:
10px
;
text-align
:
center
;
background-color
:
#000
;
color
:
#fff
;
-webkit-border-radius
:
15px
;
border-radius
:
15px
;
}
.humane
p
,
.humane-original
p
,
.humane
ul
,
.humane-original
ul
{
margin
:
0
;
padding
:
0
;
}
.humane
ul
,
.humane-original
ul
{
list-style
:
none
;
}
.humane.humane-original-info
,
.humane-original.humane-original-info
{
background-color
:
#030
;
}
.humane.humane-original-success
,
.humane-original.humane-original-success
{
background-color
:
#030
;
}
.humane.humane-original-error
,
.humane-original.humane-original-error
{
background-color
:
#300
;
}
.humane.humane-animate
,
.humane-original.humane-original-animate
{
opacity
:
0.8
;
}
.humane.humane-animate
:hover
,
.humane-original.humane-original-animate
:hover
{
opacity
:
0.6
;
}
.humane.humane-js-animate
,
.humane-original.humane-original-js-animate
{
opacity
:
0.8
;
}
.humane.humane-js-animate
:hover
,
.humane-original.humane-original-js-animate
:hover
{
opacity
:
0.6
;
filter
:
progid
:
DXImageTransform
.
Microsoft
.
Alpha
(
Opacity
=
60
);
}
Write
Preview
Markdown
is supported
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