File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1010 <div class="ui language bottom floating slide up dropdown link item">
1111 <i class="world icon"></i>
1212 <div class="text">{{.LangName}}</div>
13- <div class="menu">
13+ <div class="menu language-menu ">
1414 {{range .AllLangs}}
15- <a lang="{{.Lang}}" class="item {{if eq $.Lang .Lang}}active selected{{end }}" href=" {{if eq $.Lang .Lang}}#{{else}}{{$.Link}}?lang={{.Lang}} {{end}}">{{.Name}}</a>
15+ <a lang="{{.Lang}}" data-url="{{AppSubUrl}}/?lang={{.Lang }}" class="item {{if eq $.Lang .Lang}}active selected {{end}}">{{.Name}}</a>
1616 {{end}}
1717 </div>
1818 </div>
Original file line number Diff line number Diff line change @@ -2314,6 +2314,7 @@ $(document).ready(async () => {
23142314 $ ( '.delete-button' ) . on ( 'click' , showDeletePopup ) ;
23152315 $ ( '.add-all-button' ) . on ( 'click' , showAddAllPopup ) ;
23162316 $ ( '.link-action' ) . on ( 'click' , linkAction ) ;
2317+ $ ( '.language-menu a[lang]' ) . on ( 'click' , linkLanguageAction ) ;
23172318 $ ( '.link-email-action' ) . on ( 'click' , linkEmailAction ) ;
23182319
23192320 $ ( '.delete-branch-button' ) . on ( 'click' , showDeletePopup ) ;
@@ -2602,6 +2603,13 @@ function linkAction(e) {
26022603 } ) ;
26032604}
26042605
2606+ function linkLanguageAction ( ) {
2607+ const $this = $ ( this ) ;
2608+ $ . post ( $this . data ( 'url' ) ) . always ( ( ) => {
2609+ window . location . reload ( ) ;
2610+ } ) ;
2611+ }
2612+
26052613function linkEmailAction ( e ) {
26062614 const $this = $ ( this ) ;
26072615 $ ( '#form-uid' ) . val ( $this . data ( 'uid' ) ) ;
You can’t perform that action at this time.
0 commit comments