diff --git a/kallithea/public/js/base.js b/kallithea/public/js/base.js
--- a/kallithea/public/js/base.js
+++ b/kallithea/public/js/base.js
@@ -524,7 +524,7 @@ var _show_tooltip = function(e, tipText,
// save org title
$el.attr('tt_title', tipText);
// reset title to not show org tooltips
- $el.attr('title', '');
+ $el.prop('title', '');
var $tipBox = $('#tip-box');
if (safe) {
@@ -548,7 +548,7 @@ var _close_tooltip = function(e){
var $tipBox = $('#tip-box');
$tipBox.hide();
var el = e.currentTarget;
- $(el).attr('title', $(el).attr('tt_title'));
+ $(el).prop('title', $(el).attr('tt_title'));
};
/**
@@ -767,7 +767,7 @@ function deleteComment(comment_id) {
*/
var linkInlineComments = function($firstlinks, $comments){
if ($comments.length > 0) {
- $firstlinks.html('First comment'.format($comments.attr('id')));
+ $firstlinks.html('First comment'.format($comments.prop('id')));
}
if ($comments.length <= 1) {
return;
@@ -776,12 +776,12 @@ var linkInlineComments = function($first
$comments.each(function(i, e){
var prev = '';
if (i > 0){
- var prev_anchor = $($comments.get(i-1)).attr('id');
+ var prev_anchor = $($comments.get(i-1)).prop('id');
prev = 'Previous comment'.format(prev_anchor);
}
var next = '';
if (i+1 < $comments.length){
- var next_anchor = $($comments.get(i+1)).attr('id');
+ var next_anchor = $($comments.get(i+1)).prop('id');
next = 'Next comment'.format(next_anchor);
}
$(this).find('.comment-prev-next-links').html(
@@ -976,7 +976,7 @@ var getSelectionLink = function(e) {
$('body').prepend($hl_div);
}
- $hl_div.append($('').html(_TM['Selection link']).attr('href', location.href.substring(0, location.href.indexOf('#')) + '#L' + ranges[0] + '-'+ranges[1]));
+ $hl_div.append($('').html(_TM['Selection link']).prop('href', location.href.substring(0, location.href.indexOf('#')) + '#L' + ranges[0] + '-'+ranges[1]));
var xy = $(till).offset();
$hl_div.css('top', (xy.top + yoffset) + 'px').css('left', xy.left + 'px');
$hl_div.show();
@@ -1184,7 +1184,7 @@ var MembersAutoComplete = function ($inp
// Handler for selection of an entry
var itemSelectHandler = function (sType, aArgs) {
- var nextId = $inputElement.attr('id').split('perm_new_member_name_')[1];
+ var nextId = $inputElement.prop('id').split('perm_new_member_name_')[1];
var myAC = aArgs[0]; // reference back to the AC instance
var elLI = aArgs[1]; // reference to the selected LI element
var oData = aArgs[2]; // object literal of selected item's result data
@@ -1327,7 +1327,7 @@ var addReviewMember = function(id,fname,
var removeReviewMember = function(reviewer_id, repo_name, pull_request_id){
var $li = $('#reviewer_{0}'.format(reviewer_id));
$li.find('div div').css("text-decoration", "line-through");
- $li.find('input').attr('name', 'review_members_removed');
+ $li.find('input').prop('name', 'review_members_removed');
$li.find('.reviewer_member_remove').replaceWith(' (remove not saved)');
}
@@ -1886,7 +1886,7 @@ var branchSort = function(results, conta
$(document).ready(function(){
$('.diff-collapse-button').click(function(e) {
var $button = $(e.currentTarget);
- var $target = $('#' + $button.attr('target'));
+ var $target = $('#' + $button.prop('target'));
if($target.hasClass('hidden')){
$target.removeClass('hidden');
$button.html("↑ {0} ↑".format(_TM['Collapse Diff']));
diff --git a/kallithea/templates/admin/gists/edit.html b/kallithea/templates/admin/gists/edit.html
--- a/kallithea/templates/admin/gists/edit.html
+++ b/kallithea/templates/admin/gists/edit.html
@@ -94,7 +94,7 @@
$(opt).attr('mode', m.mode);
if (m.mime == 'text/plain') {
// default plain text
- $(opt).attr('selected', 'selected');
+ $(opt).prop('selected', true);
modes_select.options[0] = opt;
} else {
modes_select.options[index++] = opt;
diff --git a/kallithea/templates/admin/gists/new.html b/kallithea/templates/admin/gists/new.html
--- a/kallithea/templates/admin/gists/new.html
+++ b/kallithea/templates/admin/gists/new.html
@@ -72,7 +72,7 @@
$(opt).attr('mode', m.mode);
if (m.mime == 'text/plain') {
// default plain text
- $(opt).attr('selected', 'selected');
+ $(opt).prop('selected', true);
modes_select.options[0] = opt;
} else {
modes_select.options[index++] = opt;
diff --git a/kallithea/templates/changeset/diff_block.html b/kallithea/templates/changeset/diff_block.html
--- a/kallithea/templates/changeset/diff_block.html
+++ b/kallithea/templates/changeset/diff_block.html
@@ -134,7 +134,7 @@ $(document).ready(function(){
$('.btn-image-diff-swap').show();
$('.img-diff-swapable')
.each(function(i,e){
- $(e).attr('src', $(e).attr('realsrc'));
+ $(e).prop('src', $(e).attr('realsrc'));
})
.show();
});
diff --git a/kallithea/templates/files/files_add.html b/kallithea/templates/files/files_add.html
--- a/kallithea/templates/files/files_add.html
+++ b/kallithea/templates/files/files_add.html
@@ -79,7 +79,7 @@ ${self.repo_context_bar('files')}
$(opt).attr('mode', m.mode);
if (m.mime == 'text/plain') {
// default plain text
- $(opt).attr('selected', 'selected');
+ $(opt).prop('selected', true);
modes_select.options[0] = opt;
} else {
modes_select.options[index++] = opt;
diff --git a/kallithea/templates/files/files_edit.html b/kallithea/templates/files/files_edit.html
--- a/kallithea/templates/files/files_edit.html
+++ b/kallithea/templates/files/files_edit.html
@@ -87,7 +87,7 @@ $(document).ready(function(){
$(opt).attr('mode', m.mode);
if (m.mime == 'text/plain') {
// default plain text
- $(opt).attr('selected', 'selected');
+ $(opt).prop('selected', true);
modes_select.options[0] = opt;
} else {
modes_select.options[index++] = opt;
@@ -98,7 +98,7 @@ $(document).ready(function(){
var detected_mode = CodeMirror.findModeByExtension("${c.file.extension}");
if(detected_mode){
setCodeMirrorMode(myCodeMirror, detected_mode);
- $($('#set_mode option[value="'+detected_mode.mime+'"]')[0]).attr("selected", "selected");
+ $($('#set_mode option[value="'+detected_mode.mime+'"]')[0]).prop('selected', true);
}
$('#set_mode').on('change', function(e){
diff --git a/kallithea/templates/pullrequests/pullrequest.html b/kallithea/templates/pullrequests/pullrequest.html
--- a/kallithea/templates/pullrequests/pullrequest.html
+++ b/kallithea/templates/pullrequests/pullrequest.html
@@ -129,7 +129,7 @@ ${self.repo_context_bar('showpullrequest
$other_ref.empty();
for(var i = 0; i < data.refs.length; i++)
{
- var $optgroup = $('').attr('label', data.refs[i][1]);
+ var $optgroup = $('').prop('label', data.refs[i][1]);
var options = data.refs[i][0];
var length = options.length;
for(var j = 0; j < length; j++)