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
759301b2
Commit
759301b2
authored
Apr 02, 2013
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
easypignate
parent
12cc9ad8
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
302 additions
and
118 deletions
+302
-118
assets/javascripts/decks.coffee
assets/javascripts/decks.coffee
+9
-0
assets/javascripts/decks.js
assets/javascripts/decks.js
+160
-95
assets/stylesheets/decks.less
assets/stylesheets/decks.less
+9
-11
decks/new/index.html
decks/new/index.html
+4
-12
vendor/javascripts/easypaginate.js
vendor/javascripts/easypaginate.js
+120
-0
No files found.
assets/javascripts/decks.coffee
View file @
759301b2
...
...
@@ -354,7 +354,16 @@ class CardsController extends Spine.Controller
$
(
'#search_cards_'
+
(
if
$
(
'.operate_area'
).
hasClass
(
'text'
)
then
'text'
else
'graphic'
)
+
'_template'
)
search
:
(
name
)
->
Card
.
fetch_by_name
name
,
(
cards
)
=>
category_count
=
{}
for
category
in
Card
.
categories
category_count
[
category
]
=
0
for
card
in
cards
category_count
[(
category
for
category
in
card
.
card_type
when
category
in
Card
.
categories
).
pop
()]
++
$
(
"#search_cards_spells_count"
).
html
category_count
.
Spell
$
(
"#search_cards_traps_count"
).
html
category_count
.
Trap
$
(
"#search_cards_monsters_count"
).
html
category_count
.
Monster
@
html
@
template
().
tmpl
cards
@
el
.
easyPaginate
(
step
:
7
,
delay
:
30
)
decks
=
new
DecksController
(
el
:
$
(
"#deck"
))
...
...
assets/javascripts/decks.js
View file @
759301b2
This diff is collapsed.
Click to expand it.
assets/stylesheets/decks.less
View file @
759301b2
...
...
@@ -104,17 +104,15 @@ body{margin:0;padding:0;background:#eee;}
label{float:left;}
}
}
.page
{
max-width:518px;height:60px;padding:20px 15px 0 0;text-align:right;
#pagination
{
max-width:518px;height:60px;padding:20px 15px 0 0;text-align:right;
float:right;
a{margin:0 4px;}
}
.page_home{background:url('/assets/images/decks/page_arrows.gif') -26px 0 no-repeat;width:23px;height:17px;display:block;float:left;}
.page_pre{background:url('/assets/images/decks/page_arrows.gif') -1px 0 no-repeat;width:13px;height:17px;display:block;float:left;}
.page_next{background:url('/assets/images/decks/page_arrows.gif') -13px 0 no-repeat;width:13px;height:17px;display:block;float:left;}
.page_last{background:url('/assets/images/decks/page_arrows.gif') -47px 0 no-repeat;width:23px;height:17px;display:block;float:left;}
.page_num{
display:block;float:left;height:17px;line-height:17px;width:16px;font-size:14px;color:#999;text-decoration:none;text-align:center;
&:hover{text-decoration:underline;}
li{
display:block;float:left;height:17px;line-height:17px;width:16px;font-size:14px;color:#999;text-decoration:none;text-align:center;
&:hover{text-decoration:underline;}
}
.next{background:url('/assets/images/decks/page_arrows.gif') -13px 0 no-repeat;width:13px;height:17px;display:block;float:left;font-size: 0px;}
.prev{background:url('/assets/images/decks/page_arrows.gif') -1px 0 no-repeat;width:13px;height:17px;display:block;float:left;font-size: 0px;}
}
.card_group{
height:565px;//width:150px;
...
...
@@ -237,7 +235,7 @@ body{margin:0;padding:0;background:#eee;}
}
span{font-size:12px;}
}
.page
{
#pagination
{
padding:20px 5px 0 0;
a{margin:0 2px;}
}
...
...
decks/new/index.html
View file @
759301b2
...
...
@@ -442,22 +442,13 @@
<!-- 修改 -->
<div
class=
"floatleft search_results"
>
<span
style=
"color:#3366CC;font-weight:bold;"
>
结果数
</span>
魔法:
<span
style=
"color:#FFAD6E;"
>
XXX
</span>
陷阱:
<span
style=
"color:#FFAD6E;"
>
XXX
</span>
怪兽:
<span
style=
"color:#FFAD6E;"
>
XXX
</span>
魔法:
<span
id=
"search_cards_spells_count"
style=
"color:#FFAD6E;"
>
-
</span>
陷阱:
<span
id=
"search_cards_traps_count"
style=
"color:#FFAD6E;"
>
-
</span>
怪兽:
<span
id=
"search_cards_monsters_count"
style=
"color:#FFAD6E;"
>
-
</span>
</div>
</div>
<div
class=
"floatleft main_area"
id=
"search_cards"
></div>
<div
class=
"floatright page"
>
<a
class=
"page_home"
href=
""
></a>
<a
class=
"page_pre"
href=
""
></a>
<a
class=
"page_num"
href=
""
>
9
</a>
<a
class=
"page_num"
href=
""
>
10
</a>
<a
class=
"page_num"
href=
""
>
11
</a>
<a
class=
"page_next"
href=
""
></a>
<a
class=
"page_last"
href=
""
></a>
</div>
<!--{"archetypes":"","card_type":"\u6548\u679c\u602a\u517d","id":2067,"lore":"\u8fd9\u5f20\u5361\u653b\u51fb\u7684\u573a\u5408\uff0c\u5bf9\u65b9\u76f4\u5230\u4f24\u5bb3\u6b65\u9aa4\u7ed3\u675f\u65f6\u4e0d\u80fd\u53d1\u52a8\u9b54\u6cd5\u00b7\u9677\u9631\u5361\u3002\u7528\u4ee5\u4e0b\u7684\u602a\u517d\u4e3a\u796d\u54c1\u4f5c\u796d\u54c1\u53ec\u5524\u7684\u573a\u5408\uff0c\u8fd9\u5f20\u5361\u5f97\u5230\u5404\u81ea\u7684\u6548\u679c\u3002\u25cf\u7eff\u9f7f\u8f6e\uff1a\u8fd9\u5f20\u5361\u653b\u51fb\u5b88\u5907\u8868\u793a\u602a\u517d\u65f6\uff0c\u82e5\u8fd9\u5f20\u5361\u7684\u653b\u51fb\u529b\u8d85\u8fc7\u5b88\u5907\u8868\u793a\u602a\u517d\u7684\u5b88\u5907\u529b\uff0c\u7ed9\u4e88\u5bf9\u65b9\u57fa\u672c\u5206\u90a3\u4e2a\u6570\u503c\u7684\u6218\u6597\u4f24\u5bb3\u3002\u25cf\u7ea2\u9f7f\u8f6e\uff1a\u7ed9\u4e88\u5bf9\u65b9\u73a9\u5bb6\u6218\u6597\u4f24\u5bb3\u65f6\uff0c\u7ed9\u4e88\u5bf9\u65b9\u57fa\u672c\u5206400\u5206\u4f24\u5bb3\u3002\u25cf\u9ec4\u9f7f\u8f6e\uff1a\u6218\u6597\u7834\u574f\u5bf9\u65b9\u602a\u517d\u7684\u573a\u5408\uff0c\u7ed9\u4e88\u5bf9\u65b9\u57fa\u672c\u5206600\u5206\u4f24\u5bb3\u3002","mediums":"OCG\tTCG","monster_atk":3000,"monster_attribute":"\u5730","monster_def":2000,"monster_level":8,"monster_type":null,"name":"\u53e4\u4ee3\u7684\u673a\u68b0\u5de8\u9f99","number":50933533,"stats":"21,26,37","status":3,"tokens":0,"type":"\u673a\u68b0"} -->
</div>
...
...
@@ -533,6 +524,7 @@
<script
src=
"/vendor/javascripts/jquery.i18n.properties-min-1.0.9.js"
></script>
<script
src=
"/vendor/javascripts/jquery-ui-1.9.1.custom.min.js"
></script>
<script
src=
"/vendor/javascripts/jquery.base64.min.js"
></script>
<script
src=
"/vendor/javascripts/easypaginate.js"
></script>
<script
src=
"/vendor/javascripts/hScrollPane.js"
></script>
<script
src=
"/vendor/javascripts/jscroll.js"
></script>
<script
src=
"/vendor/javascripts/json2.js"
></script>
...
...
vendor/javascripts/easypaginate.js
0 → 100644
View file @
759301b2
/*
* Easy Paginate 1.0 - jQuery plugin
* written by Alen Grakalic
* http://cssglobe.com/
*
* Copyright (c) 2011 Alen Grakalic (http://cssglobe.com)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* Built for jQuery library
* http://jquery.com
*
*/
(
function
(
$
)
{
$
.
fn
.
easyPaginate
=
function
(
options
){
var
defaults
=
{
step
:
4
,
delay
:
100
,
numeric
:
true
,
nextprev
:
true
,
auto
:
false
,
loop
:
false
,
pause
:
4000
,
clickstop
:
true
,
controls
:
'
pagination
'
,
current
:
'
current
'
,
randomstart
:
false
};
var
options
=
$
.
extend
(
defaults
,
options
);
var
step
=
options
.
step
;
var
lower
,
upper
;
var
children
=
$
(
this
).
children
();
var
count
=
children
.
length
;
var
obj
,
next
,
prev
;
var
pages
=
Math
.
floor
(
count
/
step
);
var
page
=
(
options
.
randomstart
)
?
Math
.
floor
(
Math
.
random
()
*
pages
)
+
1
:
1
;
var
timeout
;
var
clicked
=
false
;
function
show
(){
clearTimeout
(
timeout
);
lower
=
((
page
-
1
)
*
step
);
upper
=
lower
+
step
;
$
(
children
).
each
(
function
(
i
){
var
child
=
$
(
this
);
child
.
hide
();
if
(
i
>=
lower
&&
i
<
upper
){
setTimeout
(
function
(){
child
.
fadeIn
(
'
fast
'
)
},
(
i
-
(
Math
.
floor
(
i
/
step
)
*
step
)
)
*
options
.
delay
);
}
if
(
options
.
nextprev
){
if
(
upper
>=
count
)
{
next
.
fadeOut
(
'
fast
'
);
}
else
{
next
.
fadeIn
(
'
fast
'
);
};
if
(
lower
>=
1
)
{
prev
.
fadeIn
(
'
fast
'
);
}
else
{
prev
.
fadeOut
(
'
fast
'
);
};
};
});
$
(
'
li
'
,
'
#
'
+
options
.
controls
).
removeClass
(
options
.
current
);
$
(
'
li[data-index="
'
+
page
+
'
"]
'
,
'
#
'
+
options
.
controls
).
addClass
(
options
.
current
);
if
(
options
.
auto
){
if
(
options
.
clickstop
&&
clicked
){}
else
{
timeout
=
setTimeout
(
auto
,
options
.
pause
);
};
};
};
function
auto
(){
if
(
options
.
loop
)
if
(
upper
>=
count
){
page
=
0
;
show
();
}
if
(
upper
<
count
){
page
++
;
show
();
}
};
this
.
each
(
function
(){
obj
=
this
;
if
(
count
>
step
){
if
((
count
/
step
)
>
pages
)
pages
++
;
var
ol
=
$
(
'
<ol id="
'
+
options
.
controls
+
'
"></ol>
'
).
insertAfter
(
obj
);
if
(
options
.
nextprev
){
prev
=
$
(
'
<li class="prev">Previous</li>
'
)
.
hide
()
.
appendTo
(
ol
)
.
click
(
function
(){
clicked
=
true
;
page
--
;
show
();
});
};
if
(
options
.
numeric
){
for
(
var
i
=
1
;
i
<=
pages
;
i
++
){
$
(
'
<li data-index="
'
+
i
+
'
">
'
+
i
+
'
</li>
'
)
.
appendTo
(
ol
)
.
click
(
function
(){
clicked
=
true
;
page
=
$
(
this
).
attr
(
'
data-index
'
);
show
();
});
};
};
if
(
options
.
nextprev
){
next
=
$
(
'
<li class="next">Next</li>
'
)
.
hide
()
.
appendTo
(
ol
)
.
click
(
function
(){
clicked
=
true
;
page
++
;
show
();
});
};
show
();
};
});
};
})(
jQuery
);
\ No newline at end of file
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