Añade el plugin Redmine Git Hosting 5.0.0
This commit is contained in:
parent
cfa0d58b18
commit
a3bddad233
458 changed files with 30396 additions and 1 deletions
48
plugins/redmine_git_hosting/assets/javascripts/git_urls.js
Normal file
48
plugins/redmine_git_hosting/assets/javascripts/git_urls.js
Normal file
|
@ -0,0 +1,48 @@
|
|||
// GIT URLS
|
||||
function updateUrl(element) {
|
||||
var url = $(element).data('url');
|
||||
var target = $(element).data('target');
|
||||
var committer = $(element).data('committer');
|
||||
$('#git_url_text_' + target).val(url);
|
||||
$('#git_url_permissions_' + target).html(committer);
|
||||
$(element).parent().find('li').removeClass('selected');
|
||||
$(element).addClass('selected');
|
||||
}
|
||||
|
||||
function setGitUrls(elements) {
|
||||
$(elements).each(function(index, element){
|
||||
$(element).on('click', function(){
|
||||
updateUrl($(this));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function setFirstGitUrl(elements) {
|
||||
$(elements).each(function(index, element){
|
||||
var first_url = $(element).children().first();
|
||||
updateUrl(first_url);
|
||||
});
|
||||
}
|
||||
|
||||
// GIT INSTRUCTIONS
|
||||
function updateInstructionUrl(element) {
|
||||
var url = $(element).data('url');
|
||||
var committer = $(element).data('committer');
|
||||
$('.git_url_access').html(url);
|
||||
if (committer == 'RW') {
|
||||
$('#repository_setup').show();
|
||||
} else {
|
||||
$('#repository_setup').hide();
|
||||
}
|
||||
}
|
||||
|
||||
function setGitUrlsInstructions(elements) {
|
||||
$(elements).each(function(index, element){
|
||||
if (index == 0){
|
||||
updateInstructionUrl(element);
|
||||
};
|
||||
$(element).on('click', function(){
|
||||
updateInstructionUrl($(this));
|
||||
});
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue