Skip to content

Commit

Permalink
v1.2.6
Browse files Browse the repository at this point in the history
- we are now jQuery free 🤘
- update assets
  • Loading branch information
ctf0 committed Dec 3, 2017
1 parent 9625384 commit a614cb6
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 56 deletions.
5 changes: 0 additions & 5 deletions logs/v1.2.5.txt

This file was deleted.

2 changes: 2 additions & 0 deletions logs/v1.2.6.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- we are now jQuery free :metal:
- update assets
27 changes: 0 additions & 27 deletions src/resources/assets/js/Main/container.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ export default {
beforeMount() {
this.preVisited()
},
updated() {
this.tableFloatHead($('table'), 0)
this.reflowTable()
},
methods: {
// local-storage
preVisited() {
Expand Down Expand Up @@ -89,19 +85,6 @@ export default {
}
},
// table
tableFloatHead(table, offset) {
setTimeout(() => {
table.floatThead({
top: offset,
autoReflow: true,
responsiveContainer(table) {
return table.closest('section')
}
})
}, 600)
},
// tabs
activeTabIs(tab) {
return this.activeTab == tab
Expand Down Expand Up @@ -140,11 +123,6 @@ export default {
this[e] = ''
})
},
reflowTable() {
setTimeout(() => {
$('table').trigger('reflow')
}, 10)
},
trans(key) {
return this.lingoTrans[key]
},
Expand Down Expand Up @@ -181,11 +159,6 @@ export default {
},
missingVal(msg = null) {
this.showNotif(msg || this.trans('no_val'), 'warning')
},
// animation
afterEnter() {
this.reflowTable()
}
},
watch: {
Expand Down
14 changes: 7 additions & 7 deletions src/resources/assets/js/Tabs/ops.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,13 @@ export default {
}

// copy to clipboard
$(document).on('click', '.c2c', () => {
this.$copyText(this.keyToCopy)
this.refocus()
})
document.body.onclick = (e) => {
e = window.event ? event.srcElement : e.target
if (e.className && e.className.indexOf('c2c') != -1) {
this.$copyText(this.keyToCopy)
this.refocus()
}
}
},
activated() {
if (this.$parent.activeTab == this.getTabName()) {
Expand Down Expand Up @@ -108,9 +111,6 @@ export default {
trans(key) {
return this.parentMethod('trans', key) || ''
},
reflowTable() {
this.parentMethod('reflowTable')
},
getTabName() {
return this.$options.name
},
Expand Down
10 changes: 1 addition & 9 deletions src/resources/assets/js/Tabs/shared/content.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,6 @@
</template>

<style scoped>
.tag {
border-radius: 3px;
}
#tippyTemplate {
display: none;
}
Expand All @@ -162,7 +158,6 @@ export default{
}
},
updated() {
this.parentMethod('reflowTable')
this.tableColumnResize()
},
methods: {
Expand All @@ -172,7 +167,7 @@ export default{
let startOffset
document.querySelectorAll('table th').forEach((th) => {
th.style.position = 'relative'
th.style.position = 'sticky'
let grip = document.createElement('div')
grip.innerHTML = '&nbsp;'
Expand All @@ -192,7 +187,6 @@ export default{
document.addEventListener('mousemove', (e) => {
if (el) {
this.parentMethod('reflowTable')
el.style.width = startOffset + e.pageX + 'px'
}
})
Expand Down Expand Up @@ -240,7 +234,6 @@ export default{
setTimeout(() => {
this.selectedFile = old
this.parentMethod('reflowTable')
}, 10)
this.parentMethod('resetAll', ['selectedFile'])
Expand All @@ -252,7 +245,6 @@ export default{
// util
newEntry() {
this.dataChanged = true
this.parentMethod('reflowTable')
},
saveNewKey(e) {
let old_key = e.target.dataset.mainKey
Expand Down
4 changes: 0 additions & 4 deletions src/resources/assets/sass/bulma.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,3 @@
.level-item {
margin-bottom: 0.75rem;
}

.tabs li.is-active a {
margin-bottom: -1px;
}
7 changes: 7 additions & 0 deletions src/resources/assets/sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,10 @@ th {
color: white;
background-color: #363636;
}

thead th {
position: sticky;
z-index: 1;
top: 30px;
background-color: white;
}
6 changes: 2 additions & 4 deletions src/resources/views/lingo-bulma.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class="button is-primary"
</transition-group>

{{-- utils --}}
<div class="level">
<div class="level m-t-10">
<div class="level-right"></div>
<div class="level-left">
{{-- copied key format --}}
Expand Down Expand Up @@ -218,7 +218,7 @@ class="button is-primary"
</div>

{{-- Tabs Toggle --}}
<transition name="comp-fade" mode="out-in" v-on:after-enter="afterEnter">
<transition name="comp-fade" mode="out-in">
<keep-alive>
<component :is="activeTab"
dirs-route="{{ route('lingo.vendor_dirs') }}"
Expand All @@ -237,8 +237,6 @@ class="button is-primary"
{{-- Footer --}}
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
{{-- Scripts --}}
<script src="//code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/floatthead/2.0.3/jquery.floatThead.min.js"></script>
<script src="{{ asset("path/to/app.js") }}"></script>
</body>
</html>

0 comments on commit a614cb6

Please sign in to comment.