Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
Ygopro Arena Web
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
Ygopro Arena Web
Commits
6378ab54
Commit
6378ab54
authored
Jul 17, 2012
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复附件rep播放地址
parent
06996158
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
6 deletions
+61
-6
app/assets/javascripts/boards.js.coffee
app/assets/javascripts/boards.js.coffee
+56
-1
app/assets/javascripts/rooms.js.coffee
app/assets/javascripts/rooms.js.coffee
+2
-2
app/views/attachments/_attachment.html.erb
app/views/attachments/_attachment.html.erb
+3
-3
app/views/layouts/losses.html.erb
app/views/layouts/losses.html.erb
+0
-0
No files found.
app/assets/javascripts/boards.js.coffee
View file @
6378ab54
...
...
@@ -4,4 +4,59 @@
/
/=
require
jquery
.
markitup
//
=
require
jquery
.
markitup
.
set
//
=
require
jquery
.
captcha
//
=
require
jquery
-
ui
\ No newline at end of file
//
=
require
jquery
-
ui
localStorage
=
{}
if
Storage
?
localStorage
[
'stream'
]
=
{}
getstream
=
(
data
)
->
for
key
,
value
of
data
for
item
in
value
localStorage
[
'stream'
][
key
]
||=
{}
localStorage
[
'stream'
][
key
][
item
.
id
]
=
item
for
post
in
data
.
posts
post_element
=
$
(
'<div />'
,
class
:
'post'
id
:
"post"
+
post
.
id
)
post_element
.
append
$
(
'<img />'
,
src
:
'/users/'
+
post
.
user_id
+
'.png?size=small'
)
post_element
.
append
$
(
'<span />'
,
class
:
'post[user]'
text
:
localStorage
[
'stream'
][
'users'
][
post
.
user_id
].
name
)
post_element
.
append
$
(
'<span />'
,
class
:
'post[content]'
text
:
post
.
content
)
if
$
(
'#topic'
+
post
.
topic_id
).
length
==
0
if
$
(
'#topics .topic'
).
length
>=
5
$
(
'#topics .topic'
).
last
().
remove
()
$
(
'#topics'
).
prepend
$
(
'<div />'
,
id
:
'topic'
+
post
.
topic_id
class
:
'topic'
)
$
(
'#topic'
+
post
.
topic_id
).
append
$
(
'<span />'
,
class
:
"topic[name]"
text
:
localStorage
[
'stream'
][
'topics'
][
post
.
topic_id
].
name
)
$
(
'#topic'
+
post
.
topic_id
).
append
$
(
'<span />'
,
class
:
"topic[board]"
text
:
localStorage
[
'stream'
][
'boards'
][
localStorage
[
'stream'
][
'topics'
][
post
.
topic_id
].
category_id
].
name
href
:
'/boards/'
+
localStorage
[
'stream'
][
'topics'
][
post
.
topic_id
].
category_id
)
$
(
'#topic'
+
post
.
topic_id
).
append
post_element
else
post_element
.
addClass
(
'last'
)
if
$
(
'#post'
+
post
.
id
).
length
==
0
if
$
(
'#topic'
+
post
.
topic_id
).
length
==
1
$
(
'#topic'
+
post
.
topic_id
+
' .post'
).
addClass
(
'first'
)
$
(
'#topic'
+
post
.
topic_id
).
append
post_element
else
$
(
'#topic'
+
post
.
topic_id
+
' .post'
).
last
().
html
post_element
else
$
(
'#post'
+
post
.
id
).
html
post_element
$
.
get
(
'/stream.json?pull=2012-06-10 15:14:44 +0800'
,
getstream
)
app/assets/javascripts/rooms.js.coffee
View file @
6378ab54
...
...
@@ -35,7 +35,7 @@ refresh_do = (rooms) ->
$
(
'#users'
).
append
$
(
'<a />'
,
class
:
'user'
text
:
user
.
name
#
href: '/users/' + user.id unless user.id == 0
href
:
'/users/'
+
user
.
id
unless
user
.
id
==
0
)
if
user
=
room
.
player2
room_html
.
append
$
(
'<a />'
,
...
...
@@ -52,7 +52,7 @@ refresh_do = (rooms) ->
$
(
'#users'
).
append
$
(
'<a />'
,
class
:
"user"
text
:
user
.
name
#
href: '/users/' + user.id unless user.id == 0
href
:
'/users/'
+
user
.
id
unless
user
.
id
==
0
)
if
room
.
status
==
'wait'
room_html
.
append
$
(
'<a />'
,
...
...
app/views/attachments/_attachment.html.erb
View file @
6378ab54
...
...
@@ -6,11 +6,11 @@
<%
else
%>
<%
case
File
.
extname
attachment
.
data
.
original_filename
%>
<%
when
".yrp"
%>
<span>
<%=
link_to
"播放"
,
'mycard://'
+
request
.
env
[
'HTTP_HOST'
]
+
URI
.
escape
(
URI
.
escape
(
attachment
.
data
.
url
nil
,
timestamp:
false
)
)
%>
</span>
<span>
<%=
link_to
"播放"
,
'mycard://'
+
request
.
env
[
'HTTP_HOST'
]
+
URI
.
escape
(
attachment
.
data
.
url
nil
,
timestamp:
false
)
%>
</span>
<%
when
".ydk"
%>
<span>
<%=
link_to
"编辑"
,
'mycard://'
+
request
.
env
[
'HTTP_HOST'
]
+
URI
.
escape
(
URI
.
escape
(
attachment
.
data
.
url
nil
,
timestamp:
false
)
)
%>
</span>
<span>
<%=
link_to
"编辑"
,
'mycard://'
+
request
.
env
[
'HTTP_HOST'
]
+
URI
.
escape
(
attachment
.
data
.
url
nil
,
timestamp:
false
)
%>
</span>
<%
when
".deck"
%>
<span>
<%=
link_to
"编辑"
,
'mycard://'
+
request
.
env
[
'HTTP_HOST'
]
+
URI
.
escape
(
URI
.
escape
(
attachment
.
data
.
url
nil
,
timestamp:
false
)
)
%>
</span>
<span>
<%=
link_to
"编辑"
,
'mycard://'
+
request
.
env
[
'HTTP_HOST'
]
+
URI
.
escape
(
attachment
.
data
.
url
nil
,
timestamp:
false
)
%>
</span>
<%
end
%>
<%
end
%>
</li>
\ No newline at end of file
app/views/layouts/losses.html.erb
deleted
100644 → 0
View file @
06996158
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