|
|
@ -2,6 +2,8 @@
|
|
|
|
/* Redmine - project management software
|
|
|
|
/* Redmine - project management software
|
|
|
|
Copyright (C) 2006-2013 Jean-Philippe Lang */
|
|
|
|
Copyright (C) 2006-2013 Jean-Philippe Lang */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function cleanArray (actual){
|
|
|
|
function cleanArray (actual){
|
|
|
|
var newArray = new Array();
|
|
|
|
var newArray = new Array();
|
|
|
|
for (var i = 0; i< actual.length; i++){
|
|
|
|
for (var i = 0; i< actual.length; i++){
|
|
|
@ -389,6 +391,7 @@ function submitPreview(url, form, target) {
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
url: url,
|
|
|
|
url: url,
|
|
|
|
type: 'post',
|
|
|
|
type: 'post',
|
|
|
|
|
|
|
|
beforeSend: function(xhr) {xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'))},
|
|
|
|
data: $('#'+form).serialize(),
|
|
|
|
data: $('#'+form).serialize(),
|
|
|
|
success: function(data){
|
|
|
|
success: function(data){
|
|
|
|
$('#'+target).html(data);
|
|
|
|
$('#'+target).html(data);
|
|
|
@ -454,6 +457,7 @@ function randomKey(size) {
|
|
|
|
function updateIssueFrom(url) {
|
|
|
|
function updateIssueFrom(url) {
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
url: url,
|
|
|
|
url: url,
|
|
|
|
|
|
|
|
beforeSend: function(xhr) {xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'))},
|
|
|
|
type: 'post',
|
|
|
|
type: 'post',
|
|
|
|
data: $('#issue-form').serialize()
|
|
|
|
data: $('#issue-form').serialize()
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -462,6 +466,7 @@ function updateIssueFrom(url) {
|
|
|
|
function updateBulkEditFrom(url) {
|
|
|
|
function updateBulkEditFrom(url) {
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
url: url,
|
|
|
|
url: url,
|
|
|
|
|
|
|
|
beforeSend: function(xhr) {xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'))},
|
|
|
|
type: 'post',
|
|
|
|
type: 'post',
|
|
|
|
data: $('#bulk_edit_form').serialize()
|
|
|
|
data: $('#bulk_edit_form').serialize()
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -540,6 +545,7 @@ function initMyPageSortable(list, url) {
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
url: url,
|
|
|
|
url: url,
|
|
|
|
type: 'post',
|
|
|
|
type: 'post',
|
|
|
|
|
|
|
|
beforeSend: function(xhr) {xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'))},
|
|
|
|
data: {'blocks': $.map($('#list-'+list).children(), function(el){return $(el).attr('id');})}
|
|
|
|
data: {'blocks': $.map($('#list-'+list).children(), function(el){return $(el).attr('id');})}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -621,6 +627,14 @@ function transpotUrl (scope) {
|
|
|
|
$(document).ready(setupAjaxIndicator);
|
|
|
|
$(document).ready(setupAjaxIndicator);
|
|
|
|
$(document).ready(hideOnLoad);
|
|
|
|
$(document).ready(hideOnLoad);
|
|
|
|
$(document).ready(addFormObserversForDoubleSubmit);
|
|
|
|
$(document).ready(addFormObserversForDoubleSubmit);
|
|
|
|
|
|
|
|
$(document).ready(function(){
|
|
|
|
|
|
|
|
$.ajaxSetup({
|
|
|
|
|
|
|
|
headers: {
|
|
|
|
|
|
|
|
'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
function img_thumbnails() {
|
|
|
|
function img_thumbnails() {
|
|
|
|
$('.thumbnails a').colorbox({rel:'nofollow'});
|
|
|
|
$('.thumbnails a').colorbox({rel:'nofollow'});
|
|
|
|