2018-02-16 18:30:11 +02:00
|
|
|
<template>
|
|
|
|
<div class="mk-drive-folder-chooser">
|
|
|
|
<div class="body">
|
|
|
|
<header>
|
2018-04-14 19:04:40 +03:00
|
|
|
<h1>%i18n:@select-folder%</h1>
|
2018-02-16 18:30:11 +02:00
|
|
|
<button class="close" @click="cancel">%fa:times%</button>
|
2018-02-21 19:00:30 +02:00
|
|
|
<button class="ok" @click="ok">%fa:check%</button>
|
2018-02-16 18:30:11 +02:00
|
|
|
</header>
|
|
|
|
<mk-drive ref="browser"
|
|
|
|
select-folder
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
export default Vue.extend({
|
|
|
|
methods: {
|
|
|
|
cancel() {
|
|
|
|
this.$emit('canceled');
|
2018-09-15 15:53:04 +03:00
|
|
|
this.destroyDom();
|
2018-02-16 18:30:11 +02:00
|
|
|
},
|
|
|
|
ok() {
|
|
|
|
this.$emit('selected', (this.$refs.browser as any).folder);
|
2018-09-15 15:53:04 +03:00
|
|
|
this.destroyDom();
|
2018-02-16 18:30:11 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
.mk-drive-folder-chooser
|
|
|
|
position fixed
|
|
|
|
z-index 2048
|
|
|
|
top 0
|
|
|
|
left 0
|
|
|
|
width 100%
|
|
|
|
height 100%
|
|
|
|
padding 8px
|
2018-04-29 02:51:17 +03:00
|
|
|
background rgba(#000, 0.2)
|
2018-02-16 18:30:11 +02:00
|
|
|
|
|
|
|
> .body
|
|
|
|
width 100%
|
|
|
|
height 100%
|
|
|
|
background #fff
|
|
|
|
|
|
|
|
> header
|
|
|
|
border-bottom solid 1px #eee
|
|
|
|
|
|
|
|
> h1
|
|
|
|
margin 0
|
|
|
|
padding 0
|
|
|
|
text-align center
|
|
|
|
line-height 42px
|
|
|
|
font-size 1em
|
|
|
|
font-weight normal
|
|
|
|
|
|
|
|
> .close
|
|
|
|
position absolute
|
|
|
|
top 0
|
|
|
|
left 0
|
|
|
|
line-height 42px
|
|
|
|
width 42px
|
|
|
|
|
|
|
|
> .ok
|
|
|
|
position absolute
|
|
|
|
top 0
|
|
|
|
right 0
|
|
|
|
line-height 42px
|
|
|
|
width 42px
|
|
|
|
|
|
|
|
> .mk-drive
|
|
|
|
height calc(100% - 42px)
|
|
|
|
overflow scroll
|
|
|
|
-webkit-overflow-scrolling touch
|
|
|
|
|
|
|
|
</style>
|