Commit cd1a788 1 parent 490c928 commit cd1a788 Copy full SHA for cd1a788
File tree 2 files changed +6
-1
lines changed
src/main/webapp/scripts/externalTinymcePlugins/github
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 33
33
</ div >
34
34
< input id ="gitHubHash " type ="hidden " />
35
35
< input id ="gitHubRepo " type ="hidden " />
36
+ < input id ="gitHubBranch " type ="hidden " />
36
37
< input id ="gitHubPath " type ="hidden " />
37
38
</ fieldset >
38
39
</ div >
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ var githubDialog = {
20
20
$ ( '#gitHubRepo' ) . val ( splitFile [ 0 ] ) ;
21
21
$ ( '#gitHubHash' ) . val ( splitFile [ 1 ] ) ;
22
22
$ ( '#gitHubPath' ) . val ( splitFile [ 2 ] ) ;
23
+
24
+ var branch = $ ( 'a[data-name="' + name + '"]' ) . attr ( 'rel' ) . split ( '#' ) [ 1 ] ;
25
+ $ ( '#gitHubBranch' ) . val ( branch ) ;
23
26
}
24
27
} ) ;
25
28
} ,
@@ -28,7 +31,8 @@ var githubDialog = {
28
31
var json = {
29
32
id : 'github-' + $ ( '#gitHubHash' ) . val ( ) ,
30
33
fileStore : 'github' ,
31
- recordURL : 'https://github.com/' + $ ( '#gitHubRepo' ) . val ( ) + '/blob/master' + $ ( '#gitHubPath' ) . val ( ) ,
34
+ recordURL : 'https://github.com/' + $ ( '#gitHubRepo' ) . val ( ) + '/blob/'
35
+ + $ ( '#gitHubBranch' ) . val ( ) + $ ( '#gitHubPath' ) . val ( ) ,
32
36
name : $ ( '#gitHubPath' ) . val ( ) . split ( "/" ) . splice ( - 1 ) [ 0 ] ,
33
37
iconPath : '/images/icons/textBig.png' ,
34
38
badgeIconPath : '/images/icons/GitHub-Mark-64px.png'
You can’t perform that action at this time.
0 commit comments