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
8e6b9fc6
Commit
8e6b9fc6
authored
Nov 04, 2012
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wait for i18n
parent
e4ee0e23
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
24 deletions
+27
-24
assets/javascripts/decks.coffee
assets/javascripts/decks.coffee
+9
-3
assets/javascripts/decks.js
assets/javascripts/decks.js
+14
-5
decks/index.html
decks/index.html
+4
-16
No files found.
assets/javascripts/decks.coffee
View file @
8e6b9fc6
...
@@ -137,6 +137,12 @@ $(document).ready ->
...
@@ -137,6 +137,12 @@ $(document).ready ->
cards_encoded
=
$
.
url
().
param
(
'cards'
)
cards_encoded
=
$
.
url
().
param
(
'cards'
)
$
(
'img#qrcode'
).
attr
(
'src'
,
'https://chart.googleapis.com/chart?chs=200x200&cht=qr&chld=|0&chl='
+
encodeURIComponent
(
"http://my-card.in/decks/?name=
#{
name
}
&cards=
#{
cards_encoded
}
"
))
$
(
'img#qrcode'
).
attr
(
'src'
,
'https://chart.googleapis.com/chart?chs=200x200&cht=qr&chld=|0&chl='
+
encodeURIComponent
(
"http://my-card.in/decks/?name=
#{
name
}
&cards=
#{
cards_encoded
}
"
))
$
(
'#name'
).
html
(
name
)
$
(
'#name'
).
html
(
name
)
$
.
i18n
.
properties
name
:
'card'
path
:
'/locales/'
mode
:
'map'
cache
:
true
callback
:
->
deck
=
new
Deck
(
el
:
$
(
"#deck"
))
deck
=
new
Deck
(
el
:
$
(
"#deck"
))
deck
.
tab_control
()
deck
.
tab_control
()
deck
.
parse
cards_encoded
deck
.
parse
cards_encoded
\ No newline at end of file
assets/javascripts/decks.js
View file @
8e6b9fc6
...
@@ -321,16 +321,25 @@
...
@@ -321,16 +321,25 @@
})(
Spine
.
Controller
);
})(
Spine
.
Controller
);
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
var
cards_encoded
,
deck
,
name
;
var
cards_encoded
,
name
;
name
=
$
.
url
().
param
(
'
name
'
);
name
=
$
.
url
().
param
(
'
name
'
);
cards_encoded
=
$
.
url
().
param
(
'
cards
'
);
cards_encoded
=
$
.
url
().
param
(
'
cards
'
);
$
(
'
img#qrcode
'
).
attr
(
'
src
'
,
'
https://chart.googleapis.com/chart?chs=200x200&cht=qr&chld=|0&chl=
'
+
encodeURIComponent
(
"
http://my-card.in/decks/?name=
"
+
name
+
"
&cards=
"
+
cards_encoded
));
$
(
'
img#qrcode
'
).
attr
(
'
src
'
,
'
https://chart.googleapis.com/chart?chs=200x200&cht=qr&chld=|0&chl=
'
+
encodeURIComponent
(
"
http://my-card.in/decks/?name=
"
+
name
+
"
&cards=
"
+
cards_encoded
));
$
(
'
#name
'
).
html
(
name
);
$
(
'
#name
'
).
html
(
name
);
return
$
.
i18n
.
properties
({
name
:
'
card
'
,
path
:
'
/locales/
'
,
mode
:
'
map
'
,
cache
:
true
,
callback
:
function
()
{
var
deck
;
deck
=
new
Deck
({
deck
=
new
Deck
({
el
:
$
(
"
#deck
"
)
el
:
$
(
"
#deck
"
)
});
});
deck
.
tab_control
();
deck
.
tab_control
();
return
deck
.
parse
(
cards_encoded
);
return
deck
.
parse
(
cards_encoded
);
}
});
});
});
}).
call
(
this
);
}).
call
(
this
);
decks/index.html
View file @
8e6b9fc6
...
@@ -198,18 +198,8 @@
...
@@ -198,18 +198,8 @@
<script
src=
"/assets/javascripts/decks.js"
></script>
<script
src=
"/assets/javascripts/decks.js"
></script>
<script
src=
"/assets/javascripts/public.js"
></script>
<script
src=
"/assets/javascripts/public.js"
></script>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
jQuery
.
i18n
.
properties
({
/*$(document).ready(function () {
name
:
'
card
'
,
$(".main_area").hScrollPane({
path
:
'
/locales/
'
,
mode
:
'
map
'
,
cache
:
true
});
$
(
document
).
ready
(
function
()
{
/*$(".main_area").hScrollPane({
mover:".press", //指定container对象下的哪个元素需要滚动位置 | 必传项;
mover:".press", //指定container对象下的哪个元素需要滚动位置 | 必传项;
//showArrow:true, //指定是否显示左右箭头,默认不显示 | 可选项;
//showArrow:true, //指定是否显示左右箭头,默认不显示 | 可选项;
//moverW:function(){return $(".press").width();}(), //传入水平滚动对象的长度值,不传入的话默认直接获取mover的宽度值 | 可选项;
//moverW:function(){return $(".press").width();}(), //传入水平滚动对象的长度值,不传入的话默认直接获取mover的宽度值 | 可选项;
...
@@ -218,10 +208,8 @@
...
@@ -218,10 +208,8 @@
//easing:true, //滚动是否需要滑动效果,默认有滑动效果 | 可选项;
//easing:true, //滚动是否需要滑动效果,默认有滑动效果 | 可选项;
handleCssAlter:"draghandlealter", //指定拖动鼠标时滚动条的样式,不传入该参数则没有变化效果 | 可选项;
handleCssAlter:"draghandlealter", //指定拖动鼠标时滚动条的样式,不传入该参数则没有变化效果 | 可选项;
mousewheel:{bind:false, moveLength:500} //mousewheel: bind->'true',绑定mousewheel事件; ->'false',不绑定mousewheel事件;moveLength是指定鼠标滚动一次移动的距离,默认值:{bind:true,moveLength:300} | 可选项;
mousewheel:{bind:false, moveLength:500} //mousewheel: bind->'true',绑定mousewheel事件; ->'false',不绑定mousewheel事件;moveLength是指定鼠标滚动一次移动的距离,默认值:{bind:true,moveLength:300} | 可选项;
});*/
})
});
});;*/
</script>
</script>
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<!--<script>
<!--<script>
...
...
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