diff options
author | Peter Grassberger <petertheone@gmail.com> | 2016-05-07 00:27:58 (GMT) |
---|---|---|
committer | Peter Grassberger <petertheone@gmail.com> | 2016-05-07 00:27:58 (GMT) |
commit | dd7e48b1d9ad67a8d59b1779c1c9f3be9b2ed668 (patch) | |
tree | 447b8cc721f9e95297049984c2467cf1fdaf6979 /www/js | |
parent | 0458e9929d687b571692e78d389ef9ab3f8ef4cd (diff) |
replace .html('') with .empty() and .html(...) with .text(...)
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/auth.js | 2 | ||||
-rw-r--r-- | www/js/jingles.js | 10 | ||||
-rw-r--r-- | www/js/musicgrid.js | 12 | ||||
-rw-r--r-- | www/js/musicpools.js | 4 | ||||
-rw-r--r-- | www/js/shows.js | 2 |
5 files changed, 15 insertions, 15 deletions
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 = $('<span>').addClass('label').addClass('label-danger').text(responseCode).after($('<b>').html(' ' + errorString)); + var reason = $('<span>').addClass('label').addClass('label-danger').text(responseCode).after($('<b>').text(' ' + errorString)); var dismiss_button = '<button class="btn btn-info btn-xs">' + '<span class="glyphicon glyphicon-remove"></span> Ok</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>'); - $tr.append($('<td>').html(musicpool.clock)); - $tr.append($('<td>').html(musicpool.title)); + $tr.append($('<td>').text(musicpool.clock)); + $tr.append($('<td>').text(musicpool.title)); $tr.append($('<td>').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 = $('<span>').addClass('label').addClass('label-danger').text(responseCode).after($('<b>').html(' ' + errorString)); + var reason = $('<span>').addClass('label').addClass('label-danger').text(responseCode).after($('<b>').text(' ' + errorString)); var dismiss_button = '<button class="btn btn-info btn-xs">' + '<span class="glyphicon glyphicon-remove"></span> Ok</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 = $('<span>').addClass('label').addClass('label-danger').text(responseCode).after($('<b>').html(' ' + errorString)); + var reason = $('<span>').addClass('label').addClass('label-danger').text(responseCode).after($('<b>').text(' ' + errorString)); var dismiss_button = '<button class="btn btn-info btn-xs">' + '<span class="glyphicon glyphicon-remove"></span> Ok</button>'; |