trans 0.5.6 → 0.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tocmd/version.rb +1 -1
- data/template/toc/js/jquery.transtool.js +12 -1
- data/template/toc/toc_conf.js +7 -5
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2c4c613078aefbbfce8a15bf00b7e4cfc30965c2
|
|
4
|
+
data.tar.gz: 724987af5eb69baa201e293e7faca6525de7fa98
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 49c1cc758b5bde17aaba368063973486bc73289b0b89df5d56c9c07f1460ec2906041053bc314a66912e3b24dd5c6e864ad93735bb1cf4bb39780a11bc4e41af
|
|
7
|
+
data.tar.gz: ac039b909163050643e6ea6723c1432d8f8d819242235df132ecc43a78158e25b11c498adbd676e19393ffa383fc806761bf3edaf83b24355d2e4ecb22294ae7
|
data/lib/tocmd/version.rb
CHANGED
|
@@ -23,7 +23,16 @@
|
|
|
23
23
|
|
|
24
24
|
$.each(opts.states,function(){
|
|
25
25
|
$.each(this,function(key,value){
|
|
26
|
-
|
|
26
|
+
if(value.href){
|
|
27
|
+
if(!value.target){
|
|
28
|
+
value.target = '_blank';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
optsion_html += "<li id='" + key + "'><a class='icon "+ value.icon +"' href='" + value.href + "' target='" + value.target+ "'>" + value.display + "</a></li>";
|
|
32
|
+
}else{
|
|
33
|
+
optsion_html += "<li id='" + key + "'><a class='icon "+ value.icon +"' href='#1'>" + value.display + "</a></li>";
|
|
34
|
+
}
|
|
35
|
+
|
|
27
36
|
$('#'+key).on('click',value.click);
|
|
28
37
|
});
|
|
29
38
|
|
|
@@ -128,6 +137,8 @@
|
|
|
128
137
|
{
|
|
129
138
|
'zh':{
|
|
130
139
|
'icon':'icon-edit',
|
|
140
|
+
'href':'http://baidu.com',
|
|
141
|
+
'target':'_self',
|
|
131
142
|
click:function(){
|
|
132
143
|
alert('zh');
|
|
133
144
|
}
|
data/template/toc/toc_conf.js
CHANGED
|
@@ -36,11 +36,13 @@ var transtool_opts = {
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
'zh':{
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
'icon':'icon-edit',
|
|
40
|
+
'href':'http://baidu.com',
|
|
41
|
+
'target':'_blank',
|
|
42
|
+
'display':"中文",
|
|
43
|
+
click:function(){
|
|
44
|
+
alert('zh111');
|
|
45
|
+
}
|
|
44
46
|
},
|
|
45
47
|
'en':{
|
|
46
48
|
'icon':'icon-cloud',
|