trans 0.5.6 → 0.5.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 63b4b2b265754a66119a810a5506e42c3fe77a9a
4
- data.tar.gz: 32e34d5b07a1b1908d009297e27eb639df80cf48
3
+ metadata.gz: 2c4c613078aefbbfce8a15bf00b7e4cfc30965c2
4
+ data.tar.gz: 724987af5eb69baa201e293e7faca6525de7fa98
5
5
  SHA512:
6
- metadata.gz: af5bfd60da042445112590013b9a65f744be3ad4890905c38a24eeb42f335e0ae4fe3044739ece19b940f395d6ea58cb0b727a7a16a193974e6da6909cf95a9c
7
- data.tar.gz: 977f600d7bd36d4a54d9f90bc30787cc108bde3eb956b61750283fff6b723311de7dc17894e88710de4cbf40e76702294e78ea58f8d90eb63c86303661264f1c
6
+ metadata.gz: 49c1cc758b5bde17aaba368063973486bc73289b0b89df5d56c9c07f1460ec2906041053bc314a66912e3b24dd5c6e864ad93735bb1cf4bb39780a11bc4e41af
7
+ data.tar.gz: ac039b909163050643e6ea6723c1432d8f8d819242235df132ecc43a78158e25b11c498adbd676e19393ffa383fc806761bf3edaf83b24355d2e4ecb22294ae7
@@ -1,3 +1,3 @@
1
1
  module Tocmd
2
- VERSION = "0.5.6"
2
+ VERSION = "0.5.7"
3
3
  end
@@ -23,7 +23,16 @@
23
23
 
24
24
  $.each(opts.states,function(){
25
25
  $.each(this,function(key,value){
26
- optsion_html += "<li id='" + key + "'><a class='icon "+ value.icon +"' href='#1'>" + value.display + "</a></li>";
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
  }
@@ -36,11 +36,13 @@ var transtool_opts = {
36
36
  }
37
37
  },
38
38
  'zh':{
39
- 'icon':'icon-world',
40
- 'display':"中文",
41
- click:function(){
42
- alert('zh111');
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',
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trans
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - shiren1118