summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js')
-rw-r--r--www/js/importer.js38
-rw-r--r--www/js/musicgrid.js1
-rw-r--r--www/js/shows.js2
3 files changed, 35 insertions, 6 deletions
diff --git a/www/js/importer.js b/www/js/importer.js
index 3776aad..d43c4b2 100644
--- a/www/js/importer.js
+++ b/www/js/importer.js
@@ -105,7 +105,7 @@ Rdxport.Importer.prototype.checkListWebSocket = function() {
if(!this.listWebSocket || this.listWebSocket.readyState == 3) {
this.initListWebSocket();
}
-}
+};
Rdxport.Importer.prototype.syncUploads = function(route, groupView, done) {
var sessions = this.sessions.filter(function(session) {
@@ -132,17 +132,49 @@ Rdxport.Importer.prototype.syncUploads = function(route, groupView, done) {
};
Rdxport.Importer.prototype.resetModal = function() {
- $('div.modal-header h4', this.$el).text("Datei auswählen...");
$('.modal-body .drop', this.$el).css("background-image", "url('/img/dz-backdrop.png')");
$('.modal-body .drop form input[type="file"]', this.$el).val('');
$('.modal-body #sourceUri', this.$el).val('');
$('#uploadModal-confirm', this.$el).attr('disabled','disabled').off('click');
$('form input[type="file"]', this.$el).removeAttr('multiple');
$('form ul', self.$el).empty();
+
+ // tab menu
+ $('.nav-tabs li', this.$el).removeClass('active');
+ $('.nav-tabs li:first', this.$el).addClass('active');
+ $('.upload-tabs > div', self.$el).hide();
+ $('.upload-tabs div:first', self.$el).show();
};
Rdxport.Importer.prototype.openModal = function(group, groupView, cartNumber, useMetadata, multifiles) {
this.resetModal();
+
+ var $datepicker = $('.datepicker', this.$el).datepicker({
+ format: "dd.mm.yyyy",
+ language: "de",
+ startDate: '01/01/2014',
+ endDate: new Date()
+ });
+ var $spinner = $('.spinner', this.$el);
+
+ // tab menu
+ var self = this;
+ $('.nav-tabs li a', this.$el).off().on('click', function(event) {
+ event.preventDefault();
+ $('.nav-tabs li', self.$el).removeClass('active');
+ $(this).parent().addClass('active');
+ var tabName = $(this).data('tab-name');
+ $('.upload-tabs > div', self.$el).hide();
+ $('.upload-tabs .tab-' + tabName, self.$el).show();
+ $('#uploadModal-confirm', this.$el).attr('disabled','disabled').off('click');
+ if (tabName === 'archive') {
+ /*$('#uploadModal-confirm', this.$el).removeAttr('disabled').on('click', function() {
+ var date = $datepicker.datepicker('getDate')
+
+ });*/
+ }
+ });
+
var $drop = $('.modal-body .drop', this.$el);
var $form = $('form', $drop);
var $fileInput = $('input[type="file"]', $form);
@@ -182,13 +214,11 @@ Rdxport.Importer.prototype.openModal = function(group, groupView, cartNumber, us
}*/
if (multifiles && files.length > 1) {
- $('div.modal-header h4', self.$el).text(files.length + ' files.');
var $formUl = $('form ul', self.$el).empty();
$.each(files, function(index, file) {
//$formUl.append($('<li>').text(file.name));
});
} else {
- $('div.modal-header h4', self.$el).text(files[0].name);
$('form ul', self.$el).empty();
}
$('div.modal-body .drop', self.$el).css("background-image", "url('/img/audio_file.png')");
diff --git a/www/js/musicgrid.js b/www/js/musicgrid.js
index a0a0c10..80b8735 100644
--- a/www/js/musicgrid.js
+++ b/www/js/musicgrid.js
@@ -102,7 +102,6 @@ Rdxport.MusicpoolModal = function(model) {
Rdxport.MusicpoolModal.prototype.selectClock = function(dow, hour, clockName) {
$('#musicpoolModal').modal({keyboard: true});
- var $modalHeader = $('#musicpoolModal .modal-header');
var $modalBody = $('#musicpoolModal .modal-body');
$('h4', $modalHeader).text('Musikpool auswählen für Tag: ' + dow + ' Stunde: ' + hour + '.');
diff --git a/www/js/shows.js b/www/js/shows.js
index 8e1d17e..d58aa66 100644
--- a/www/js/shows.js
+++ b/www/js/shows.js
@@ -386,7 +386,7 @@ Rdxport.ShowCartView.renderUploading = function(upload) {
};
Rdxport.ShowCartView.renderEmpty = function(group, groupView, cartNumber) {
- var $uploadButton = $('<button class="uploadButton btn btn-primary btn-xs"><span class="glyphicon glyphicon-upload"></span>&nbsp;&nbsp;Importieren</button>');
+ var $uploadButton = $('<button class="uploadButton btn btn-primary btn-xs"><span class="glyphicon glyphicon-plus-sign"></span>&nbsp;&nbsp;Importieren</button>');
$uploadButton.off('click').on('click', function() {
importer.openModal(group, groupView, cartNumber, true, false);