File diff suppressed because one or more lines are too long
											
										
									
								
							@ -38,5 +38,8 @@ sound-upload-url="{% url "api:sound-list" %}"
 | 
			
		||||
    {% endwith %}
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
</template>
 | 
			
		||||
<template #row-delete="{cell}">
 | 
			
		||||
    <input type="checkbox" :name="'{{ formset.prefix }}-' + cell.row + '-DELETE'">
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
@ -66,6 +66,7 @@ inline_labels_ = {
 | 
			
		||||
    "discard_changes": _("Discard changes"),
 | 
			
		||||
    "select_file": _("Select a file"),
 | 
			
		||||
    "submit": _("Submit"),
 | 
			
		||||
    "delete": _("Delete"),
 | 
			
		||||
    # track list
 | 
			
		||||
    "columns": _("Columns"),
 | 
			
		||||
    "timestamp": _("Timestamp"),
 | 
			
		||||
 | 
			
		||||
@ -55,9 +55,6 @@ class EpisodeUpdateView(UserPassesTestMixin, BaseProgramMixin, PageUpdateView):
 | 
			
		||||
        program = self.get_object().program
 | 
			
		||||
        return self.request.user.has_perm("aircox.%s" % program.change_permission_codename)
 | 
			
		||||
 | 
			
		||||
    def get_success_url(self):
 | 
			
		||||
        return reverse("episode-detail", kwargs={"slug": self.get_object().slug})
 | 
			
		||||
 | 
			
		||||
    def get_tracklist_queryset(self, episode):
 | 
			
		||||
        return Track.objects.filter(episode=episode).order_by("position")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -24,8 +24,8 @@
 | 
			
		||||
        </a-modal>
 | 
			
		||||
 | 
			
		||||
        <slot name="top" :set="set" :items="set.items"></slot>
 | 
			
		||||
        <a-rows :set="set" :columns="columns"
 | 
			
		||||
                :labels="initData.fields" :allow-create="true" :orderable="true"
 | 
			
		||||
        <a-rows :set="set" :columns="allColumns"
 | 
			
		||||
                :labels="allColumnsLabels" :allow-create="true" :orderable="true"
 | 
			
		||||
                @move="listItemMove">
 | 
			
		||||
            <template v-for="[name,slot] of rowsSlots" :key="slot"
 | 
			
		||||
                    v-slot:[slot]="data">
 | 
			
		||||
@ -49,7 +49,8 @@
 | 
			
		||||
                        :title="labels.add_sound"
 | 
			
		||||
                        :aria-label="labels.add_sound"
 | 
			
		||||
                        >
 | 
			
		||||
                    <span class="icon"><i class="fa fa-plus"/></span>
 | 
			
		||||
                    <span class="icon">
 | 
			
		||||
                        <i class="fa fa-plus"/></span>
 | 
			
		||||
                </button>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
@ -75,6 +76,7 @@ export default {
 | 
			
		||||
        settingsUrl: String,
 | 
			
		||||
        soundListUrl: String,
 | 
			
		||||
        soundUploadUrl: String,
 | 
			
		||||
        player: Object,
 | 
			
		||||
        columns: {
 | 
			
		||||
            type: Array,
 | 
			
		||||
            default: () => ['name', "type", 'is_public', 'is_downloadable']
 | 
			
		||||
@ -88,6 +90,18 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    computed: {
 | 
			
		||||
        player_() {
 | 
			
		||||
            return this.player || window.aircox.player
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
        allColumns() {
 | 
			
		||||
            return [...this.columns, "delete"]
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
        allColumnsLabels() {
 | 
			
		||||
            return {...this.labels, ...this.initData.fields}
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
        items() {
 | 
			
		||||
            return this.set.items
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user