parent
4221f5edb3
commit
90e4387395
|
@ -125,6 +125,7 @@ GEM
|
|||
mocha (1.1.0)
|
||||
metaclass (~> 0.0.1)
|
||||
multi_json (1.10.1)
|
||||
mysql2 (0.3.11)
|
||||
mysql2 (0.3.11-x86-mingw32)
|
||||
net-ldap (0.3.1)
|
||||
nokogiri (1.6.3)
|
||||
|
|
|
@ -2,13 +2,7 @@
|
|||
/* Redmine - project management software
|
||||
Copyright (C) 2006-2013 Jean-Philippe Lang */
|
||||
|
||||
$(function() {
|
||||
$.ajaxSetup({
|
||||
beforeSend: function ( xhr ) {
|
||||
xhr.setRequestHeader("Accept", "text/javascript")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function cleanArray (actual){
|
||||
var newArray = new Array();
|
||||
|
@ -397,6 +391,7 @@ function submitPreview(url, form, target) {
|
|||
$.ajax({
|
||||
url: url,
|
||||
type: 'post',
|
||||
beforeSend: function(xhr) {xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'))},
|
||||
data: $('#'+form).serialize(),
|
||||
success: function(data){
|
||||
$('#'+target).html(data);
|
||||
|
@ -441,6 +436,7 @@ function scmEntryClick(id, url) {
|
|||
el.addClass('loading');
|
||||
$.ajax({
|
||||
url: url,
|
||||
beforeSend: function(xhr) {xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'))},
|
||||
success: function(data){
|
||||
el.after(data);
|
||||
el.addClass('open').addClass('loaded').removeClass('loading');
|
||||
|
@ -462,6 +458,7 @@ function randomKey(size) {
|
|||
function updateIssueFrom(url) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
beforeSend: function(xhr) {xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'))},
|
||||
type: 'post',
|
||||
data: $('#issue-form').serialize()
|
||||
});
|
||||
|
@ -470,6 +467,7 @@ function updateIssueFrom(url) {
|
|||
function updateBulkEditFrom(url) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
beforeSend: function(xhr) {xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'))},
|
||||
type: 'post',
|
||||
data: $('#bulk_edit_form').serialize()
|
||||
});
|
||||
|
@ -508,6 +506,7 @@ function observeSearchfield(fieldId, targetId, url) {
|
|||
$.ajax({
|
||||
url: url,
|
||||
type: 'get',
|
||||
beforeSend: function(xhr) {xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'))},
|
||||
data: {q: $this.val()},
|
||||
success: function(data){ if(targetId) $('#'+targetId).html(data); },
|
||||
beforeSend: function(){ $this.addClass('ajax-loading'); },
|
||||
|
@ -548,6 +547,7 @@ function initMyPageSortable(list, url) {
|
|||
$.ajax({
|
||||
url: url,
|
||||
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');})}
|
||||
});
|
||||
}
|
||||
|
@ -629,6 +629,14 @@ function transpotUrl (scope) {
|
|||
$(document).ready(setupAjaxIndicator);
|
||||
$(document).ready(hideOnLoad);
|
||||
$(document).ready(addFormObserversForDoubleSubmit);
|
||||
$(document).ready(function(){
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
});
|
||||
}
|
||||
)
|
||||
|
||||
function img_thumbnails() {
|
||||
$('.thumbnails a').colorbox({rel:'nofollow'});
|
||||
|
|
Loading…
Reference in New Issue