"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "web_src/js/index.js" between
gitea-1.13.1.tar.gz and gitea-1.13.2.tar.gz

About: Gitea allows to set up a self-hosted code hosting Git service (a fork of Gogs).

index.js  (gitea-1.13.1):index.js  (gitea-1.13.2)
skipping to change at line 115 skipping to change at line 115
return; return;
} }
initEditPreviewTab($('.edit.form')); initEditPreviewTab($('.edit.form'));
initEditDiffTab($('.edit.form')); initEditDiffTab($('.edit.form'));
} }
function initBranchSelector() { function initBranchSelector() {
const $selectBranch = $('.ui.select-branch'); const $selectBranch = $('.ui.select-branch');
const $branchMenu = $selectBranch.find('.reference-list-menu'); const $branchMenu = $selectBranch.find('.reference-list-menu');
const $isNewIssue = $branchMenu.hasClass('new-issue');
$branchMenu.find('.item:not(.no-select)').click(function () { $branchMenu.find('.item:not(.no-select)').click(function () {
const selectedValue = $(this).data('id'); const selectedValue = $(this).data('id');
const editMode = $('#editing_mode').val(); const editMode = $('#editing_mode').val();
$($(this).data('id-selector')).val(selectedValue); $($(this).data('id-selector')).val(selectedValue);
if ($isNewIssue) {
$selectBranch.find('.ui .branch-name').text($(this).data('name'));
return;
}
if (editMode === 'true') { if (editMode === 'true') {
const form = $('#update_issueref_form'); const form = $('#update_issueref_form');
$.post(form.attr('action'), { $.post(form.attr('action'), {
_csrf: csrf, _csrf: csrf,
ref: selectedValue ref: selectedValue
}, },
() => { () => {
window.location.reload(); window.location.reload();
skipping to change at line 161 skipping to change at line 166
}); });
createColorPicker($('.color-picker')); createColorPicker($('.color-picker'));
$('.precolors .color').on('click', function () { $('.precolors .color').on('click', function () {
const color_hex = $(this).data('color-hex'); const color_hex = $(this).data('color-hex');
$('.color-picker').val(color_hex); $('.color-picker').val(color_hex);
$('.minicolors-swatch-color').css('background-color', color_hex); $('.minicolors-swatch-color').css('background-color', color_hex);
}); });
$('.edit-label-button').on('click', function () { $('.edit-label-button').on('click', function () {
$('.color-picker').minicolors('value', $(this).data('color')); $('.edit-label .color-picker').minicolors('value', $(this).data('color'));
$('#label-modal-id').val($(this).data('id')); $('#label-modal-id').val($(this).data('id'));
$('.edit-label .new-label-input').val($(this).data('title')); $('.edit-label .new-label-input').val($(this).data('title'));
$('.edit-label .new-label-desc-input').val($(this).data('description')); $('.edit-label .new-label-desc-input').val($(this).data('description'));
$('.edit-label .color-picker').val($(this).data('color')); $('.edit-label .color-picker').val($(this).data('color'));
$('.minicolors-swatch-color').css('background-color', $(this).data('color')) ; $('.edit-label .minicolors-swatch-color').css('background-color', $(this).da ta('color'));
$('.edit-label.modal').modal({ $('.edit-label.modal').modal({
onApprove() { onApprove() {
$('.edit-label.form').trigger('submit'); $('.edit-label.form').trigger('submit');
} }
}).modal('show'); }).modal('show');
return false; return false;
}); });
} }
function updateIssuesMeta(url, action, issueIds, elementId) { function updateIssuesMeta(url, action, issueIds, elementId) {
skipping to change at line 1357 skipping to change at line 1362
} else { } else {
$('.organization.new.team .team-units').show(); $('.organization.new.team .team-units').show();
} }
}); });
} }
function initWikiForm() { function initWikiForm() {
const $editArea = $('.repository.wiki textarea#edit_area'); const $editArea = $('.repository.wiki textarea#edit_area');
let sideBySideChanges = 0; let sideBySideChanges = 0;
let sideBySideTimeout = null; let sideBySideTimeout = null;
if ($editArea.length > 0 && isMobile) { if ($editArea.length > 0 && isMobile()) {
$editArea.css('display', 'inline-block'); $editArea.css('display', 'inline-block');
return; return;
} }
if ($editArea.length > 0) { if ($editArea.length > 0) {
const simplemde = new SimpleMDE({ const simplemde = new SimpleMDE({
autoDownloadFontAwesome: false, autoDownloadFontAwesome: false,
element: $editArea[0], element: $editArea[0],
forceSync: true, forceSync: true,
previewRender(plainText, preview) { // Async method previewRender(plainText, preview) { // Async method
setTimeout(() => { setTimeout(() => {
skipping to change at line 2196 skipping to change at line 2201
return true; return true;
} }
function u2fError(errorType) { function u2fError(errorType) {
const u2fErrors = { const u2fErrors = {
browser: $('#unsupported-browser'), browser: $('#unsupported-browser'),
1: $('#u2f-error-1'), 1: $('#u2f-error-1'),
2: $('#u2f-error-2'), 2: $('#u2f-error-2'),
3: $('#u2f-error-3'), 3: $('#u2f-error-3'),
4: $('#u2f-error-4'), 4: $('#u2f-error-4'),
5: $('.u2f-error-5') 5: $('.u2f_error_5')
}; };
u2fErrors[errorType].removeClass('hide'); u2fErrors[errorType].removeClass('hide');
Object.keys(u2fErrors).forEach((type) => { Object.keys(u2fErrors).forEach((type) => {
if (type !== errorType) { if (type !== errorType) {
u2fErrors[type].addClass('hide'); u2fErrors[type].addClass('hide');
} }
}); });
$('#u2f-error').modal('show'); $('#u2f-error').modal('show');
} }
 End of changes. 6 change blocks. 
4 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)