Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit 04f4684

Browse files
committed
update span to links for menu
1 parent 6012686 commit 04f4684

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/resources/assets/js/bulma/menu_child.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
<div class="notification is-dark menu-item" :class="classObj(item)">
1313
<p>
1414
{{ getTitle(item.title) }}
15-
<span class="icon is-medium link" @click="goTo($event, item.id)"><icon name="pencil"/></span>
15+
<a :href="goTo(item.id)" class="is-inline-block is-paddingless">
16+
<span class="icon is-medium"><icon name="pencil"/></span>
17+
</a>
1618
</p>
1719

1820
<!-- ops -->

src/resources/assets/js/bulma/mixins/menu.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,8 @@ export default {
1515

1616
return title.hasOwnProperty(locale) ? Object.values(title)[v] : Object.values(title)[0].concat(` "${Object.keys(title)[0]}"`)
1717
},
18-
goTo(e, id) {
19-
let url = this.editPage.replace(0, id)
20-
21-
if (e.altKey || e.metaKey) {
22-
return window.open(url, '_blank')
23-
}
24-
25-
window.location.assign(url)
18+
goTo(id) {
19+
return this.editPage.replace(0, id)
2620
},
2721
trans(key) {
2822
return this.translation[key]

src/resources/views/admin/bulma/menus/edit.blade.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ class="column is-4 menu-list"
7272
{{-- title --}}
7373
@{{ getTitle(item.title) }}
7474
{{-- edit --}}
75-
<span class="icon is-medium link" @click="goTo($event, item.id)"><icon name="pencil"/></span>
75+
<a :href="goTo(item.id)" class="is-inline-block is-paddingless">
76+
<span class="icon is-medium"><icon name="pencil"/></span>
77+
</a>
7678
</p>
7779

7880
{{-- ops --}}
@@ -120,7 +122,9 @@ class="column"
120122
{{-- title --}}
121123
@{{ getTitle(item.title) }}
122124
{{-- edit --}}
123-
<span class="icon is-medium link" @click="goTo($event, item.id)"><icon name="pencil"/></span>
125+
<a :href="goTo(item.id)" class="is-inline-block is-paddingless">
126+
<span class="icon is-medium"><icon name="pencil"/></span>
127+
</a>
124128
</p>
125129
</li>
126130
</draggable>

0 commit comments

Comments
 (0)