From dd7e48b1d9ad67a8d59b1779c1c9f3be9b2ed668 Mon Sep 17 00:00:00 2001 From: Peter Grassberger Date: Sat, 7 May 2016 02:27:58 +0200 Subject: replace .html('') with .empty() and .html(...) with .text(...) diff --git a/www/js/auth.js b/www/js/auth.js index 3931022..691a19e 100644 --- a/www/js/auth.js +++ b/www/js/auth.js @@ -61,7 +61,7 @@ Rdxport.AuthView = function(model) { Rdxport.AuthView.prototype.renderLoggedIn = function() { $('#loginbox').slideUp(); $('#mainwindow').fadeIn(); - $('#username-field').html(this.model.fullname + ' (' + this.model.username + ')'); + $('#username-field').text(this.model.fullname + ' (' + this.model.username + ')'); $('button.logout').off().on('click', function() { router.route('logout'); diff --git a/www/js/jingles.js b/www/js/jingles.js index 02070ae..e819570 100644 --- a/www/js/jingles.js +++ b/www/js/jingles.js @@ -44,7 +44,7 @@ Rdxport.JingleGroupListView = function(model) { this.jingleGroupViews = []; - $('#app-jingles .groups').html(''); + $('#app-jingles .groups').empty(); var self = this; $(this.model).on('update', function() { @@ -87,7 +87,7 @@ Rdxport.JingleGroupView = function(model) { var self = this; $(this.model).on('update', function() { - $('table > tbody', self.$el).html(''); + $('table > tbody', self.$el).empty(); self.model.mainCart = self.model.carts[0]; self.mainCartView = new Rdxport.JingleCartView(self.model.mainCart, self, true); @@ -105,7 +105,7 @@ Rdxport.JingleGroupView.prototype.render = function() { this.$el = $('#hiddenTemplates .jingleGroupTemplate').clone().removeClass('jingleGroupTemplate'); this.$el.appendTo('#app-jingles .groups'); - $('h2', this.$el).html(this.model.title); + $('h2', this.$el).text(this.model.title); $('table tbody tr', this.$el).remove(); $('.uploadButton', this.$el).on('click', function() { @@ -114,7 +114,7 @@ Rdxport.JingleGroupView.prototype.render = function() { }; Rdxport.JingleGroupView.prototype.destroy = function() { - $('table > tbody', this.$el).html(''); + $('table > tbody', this.$el).empty(); }; Rdxport.JingleGroupView.prototype.uploadProgress = function(upload, file) { @@ -149,7 +149,7 @@ Rdxport.JingleGroupView.prototype.uploadError = function(upload, file, msg, xhr, //var msg = $(xmlDoc); //var responseCode = msg.find('ResponseCode').text(); //var errorString = msg.find('ErrorString').text(); - var reason = $('').addClass('label').addClass('label-danger').text(responseCode).after($('').html(' ' + errorString)); + var reason = $('').addClass('label').addClass('label-danger').text(responseCode).after($('').text(' ' + errorString)); var dismiss_button = ''; diff --git a/www/js/musicgrid.js b/www/js/musicgrid.js index dbb2210..a0a0c10 100644 --- a/www/js/musicgrid.js +++ b/www/js/musicgrid.js @@ -58,7 +58,7 @@ Rdxport.MusicgridView = function(model) { Rdxport.MusicgridView.prototype.clean = function() { $('tr td', this.$el) - .html('') + .empty() .removeClass('clock') .css('background-color', '') .css('color', '') @@ -71,7 +71,7 @@ Rdxport.MusicgridView.prototype.update = function() { $(this.model.clocks).each(function(index, clock) { var $td = $('tr[data-dow="' + clock.dow + '"] td[data-hour="' + clock.hour +'"]', this.$el); $td.addClass('clock'); - $td.html(clock.name); + $td.text(clock.name); $td.attr('title', clock.title); $td.css('background-color', clock.color); if($td.isBackgroundDark()) { @@ -105,9 +105,9 @@ Rdxport.MusicpoolModal.prototype.selectClock = function(dow, hour, clockName) { var $modalHeader = $('#musicpoolModal .modal-header'); var $modalBody = $('#musicpoolModal .modal-body'); - $('h4', $modalHeader).html('Musikpool auswählen für Tag: ' + dow + ' Stunde: ' + hour + '.'); + $('h4', $modalHeader).text('Musikpool auswählen für Tag: ' + dow + ' Stunde: ' + hour + '.'); - $('tbody', $modalBody).html(''); + $('tbody', $modalBody).empty(); var self = this; $(this.model).off().on('update', function() { @@ -128,8 +128,8 @@ Rdxport.MusicpoolModal.prototype.selectClock = function(dow, hour, clockName) { }); var $tr = $(''); - $tr.append($('').html(musicpool.clock)); - $tr.append($('').html(musicpool.title)); + $tr.append($('').text(musicpool.clock)); + $tr.append($('').text(musicpool.title)); $tr.append($('').html($button)); $('tbody', $modalBody).append($tr); diff --git a/www/js/musicpools.js b/www/js/musicpools.js index 065b4d8..ac5a07e 100644 --- a/www/js/musicpools.js +++ b/www/js/musicpools.js @@ -154,7 +154,7 @@ Rdxport.MusicpoolView.prototype.render = function() { this.$el = $('#hiddenTemplates .musicpoolTemplate').clone().removeClass('musicpoolTemplate'); $('#app-musicpools .musicpoolContainer').html(this.$el); - $('h2', this.$el).html(this.model.title); + $('h2', this.$el).text(this.model.title); $('table tbody tr', this.$el).remove(); this.cartViews = []; @@ -202,7 +202,7 @@ Rdxport.MusicpoolView.prototype.uploadError = function(upload, file, msg, xhr, a //var msg = $(xmlDoc); //var responseCode = msg.find('ResponseCode').text(); //var errorString = msg.find('ErrorString').text(); - var reason = $('').addClass('label').addClass('label-danger').text(responseCode).after($('').html(' ' + errorString)); + var reason = $('').addClass('label').addClass('label-danger').text(responseCode).after($('').text(' ' + errorString)); var dismiss_button = ''; diff --git a/www/js/shows.js b/www/js/shows.js index bb8058d..9104bec 100644 --- a/www/js/shows.js +++ b/www/js/shows.js @@ -277,7 +277,7 @@ Rdxport.ShowView.prototype.uploadError = function(upload, file, msg, xhr, acknow //var msg = $(xmlDoc); //var responseCode = msg.find('ResponseCode').text(); //var errorString = msg.find('ErrorString').text(); - var reason = $('').addClass('label').addClass('label-danger').text(responseCode).after($('').html(' ' + errorString)); + var reason = $('').addClass('label').addClass('label-danger').text(responseCode).after($('').text(' ' + errorString)); var dismiss_button = ''; -- cgit v0.10.2