diff --git a/composer.json b/composer.json index 4c4f823..9fa6935 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "symfony/yaml": "2.3.*", "twig/twig": "1.12.*", "doctrine/common": "2.4.*@beta", - "guzzle/http": "3.7.*", + "guzzle/http": "3.1.*", "kriswallsmith/assetic": "1.1.*@alpha", "symfony-cmf/routing": "1.1.*@alpha", "easyrdf/easyrdf": "0.8.*@beta", diff --git a/composer.lock b/composer.lock index ce988ad..35f3e82 100644 --- a/composer.lock +++ b/composer.lock @@ -3,7 +3,7 @@ "This file locks the dependencies of your project to a known state", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" ], - "hash": "eb2c59507a34a3831afe33b16c4d5775", + "hash": "99355ea2b3166a2c7d7029c8ddc76f4e", "packages": [ { "name": "doctrine/annotations", @@ -449,17 +449,17 @@ }, { "name": "guzzle/common", - "version": "v3.7.1", + "version": "v3.1.2", "target-dir": "Guzzle/Common", "source": { "type": "git", - "url": "https://github.com/guzzle/common.git", - "reference": "v3.7.1" + "url": "git://github.com/guzzle/common.git", + "reference": "v3.1.2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/common/zipball/v3.7.1", - "reference": "v3.7.1", + "url": "https://github.com/guzzle/common/archive/v3.1.2.zip", + "reference": "v3.1.2", "shasum": "" }, "require": { @@ -469,7 +469,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.7-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -489,21 +489,21 @@ "event", "exception" ], - "time": "2013-07-05 20:17:54" + "time": "2013-01-28 00:07:40" }, { "name": "guzzle/http", - "version": "v3.7.1", + "version": "v3.1.2", "target-dir": "Guzzle/Http", "source": { "type": "git", - "url": "https://github.com/guzzle/http.git", - "reference": "v3.7.1" + "url": "git://github.com/guzzle/http.git", + "reference": "v3.1.2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/http/zipball/v3.7.1", - "reference": "v3.7.1", + "url": "https://github.com/guzzle/http/archive/v3.1.2.zip", + "reference": "v3.1.2", "shasum": "" }, "require": { @@ -518,7 +518,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.7-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -546,21 +546,21 @@ "http", "http client" ], - "time": "2013-07-02 19:53:26" + "time": "2013-01-26 08:20:43" }, { "name": "guzzle/parser", - "version": "v3.7.1", + "version": "v3.1.2", "target-dir": "Guzzle/Parser", "source": { "type": "git", - "url": "https://github.com/guzzle/parser.git", - "reference": "v3.7.1" + "url": "git://github.com/guzzle/parser.git", + "reference": "v3.1.2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/parser/zipball/v3.7.1", - "reference": "v3.7.1", + "url": "https://github.com/guzzle/parser/archive/v3.1.2.zip", + "reference": "v3.1.2", "shasum": "" }, "require": { @@ -569,7 +569,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.7-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -590,34 +590,31 @@ "message", "url" ], - "time": "2013-06-11 00:24:07" + "time": "2013-01-12 21:43:21" }, { "name": "guzzle/stream", - "version": "v3.7.1", + "version": "v3.1.2", "target-dir": "Guzzle/Stream", "source": { "type": "git", - "url": "https://github.com/guzzle/stream.git", - "reference": "v3.7.1" + "url": "https://github.com/guzzle/stream", + "reference": "v3.0.7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/stream/zipball/v3.7.1", - "reference": "v3.7.1", + "url": "https://github.com/guzzle/stream/archive/v3.0.7.zip", + "reference": "v3.0.7", "shasum": "" }, "require": { "guzzle/common": "self.version", "php": ">=5.3.2" }, - "suggest": { - "guzzle/http": "To convert Guzzle request objects to PHP streams" - }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.7-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -643,7 +640,7 @@ "component", "stream" ], - "time": "2013-06-27 00:50:43" + "time": "2012-12-07 16:45:11" }, { "name": "kriswallsmith/assetic", diff --git a/core/CHANGELOG.txt b/core/CHANGELOG.txt index 80e38a4..3debd6f 100644 --- a/core/CHANGELOG.txt +++ b/core/CHANGELOG.txt @@ -47,7 +47,7 @@ Drupal 8.0, xxxx-xx-xx (development version) - Universally Unique IDentifier (UUID): * Support for generating and validating UUIDs. - JavaScript changes: - * Updated to jQuery 2.0.3 + * Updated to jQuery 2.0 * Updated to jQuery UI 1.10.2 - Tremendously improved language support all around. * Great language improvements for users: diff --git a/core/assets/vendor/jquery-form/jquery.form.js b/core/assets/vendor/jquery-form/jquery.form.js index 8ca137a..73ed98b 100644 --- a/core/assets/vendor/jquery-form/jquery.form.js +++ b/core/assets/vendor/jquery-form/jquery.form.js @@ -1,113 +1,95 @@ /*! * jQuery Form Plugin - * version: 3.39.0-2013.07.31 + * version: 3.27.0-2013.02.06 * @requires jQuery v1.5 or later - * Copyright (c) 2013 M. Alsup + * * Examples and documentation at: http://malsup.com/jquery/form/ * Project repository: https://github.com/malsup/form - * Dual licensed under the MIT and GPL licenses. - * https://github.com/malsup/form#copyright-and-license + * Dual licensed under the MIT and GPL licenses: + * http://malsup.github.com/mit-license.txt + * http://malsup.github.com/gpl-license-v2.txt */ -/*global ActiveXObject */ +/*global ActiveXObject alert */ ;(function($) { -"use strict"; - -/* - Usage Note: - ----------- - Do not use both ajaxSubmit and ajaxForm on the same form. These - functions are mutually exclusive. Use ajaxSubmit if you want - to bind your own submit handler to the form. For example, - - $(document).ready(function() { - $('#myForm').on('submit', function(e) { - e.preventDefault(); // <-- important - $(this).ajaxSubmit({ - target: '#output' - }); - }); - }); - - Use ajaxForm when you want the plugin to manage all the event binding - for you. For example, - - $(document).ready(function() { - $('#myForm').ajaxForm({ - target: '#output' - }); - }); - - You can also use ajaxForm with delegation (requires jQuery v1.7+), so the - form does not have to exist when you invoke ajaxForm: - - $('#myForm').ajaxForm({ - delegation: true, - target: '#output' - }); - - When using ajaxForm, the ajaxSubmit function will be invoked for you - at the appropriate time. -*/ - -/** - * Feature detection - */ -var feature = {}; -feature.fileapi = $("").get(0).files !== undefined; -feature.formdata = window.FormData !== undefined; - -var hasProp = !!$.fn.prop; - -// attr2 uses prop when it can but checks the return type for -// an expected string. this accounts for the case where a form -// contains inputs with names like "action" or "method"; in those -// cases "prop" returns the element -$.fn.attr2 = function() { - if ( ! hasProp ) - return this.attr.apply(this, arguments); - var val = this.prop.apply(this, arguments); - if ( ( val && val.jquery ) || typeof val === 'string' ) - return val; - return this.attr.apply(this, arguments); -}; - -/** - * ajaxSubmit() provides a mechanism for immediately submitting - * an HTML form using AJAX. - */ -$.fn.ajaxSubmit = function(options) { + "use strict"; + + /* + Usage Note: + ----------- + Do not use both ajaxSubmit and ajaxForm on the same form. These + functions are mutually exclusive. Use ajaxSubmit if you want + to bind your own submit handler to the form. For example, + + $(document).ready(function() { + $('#myForm').on('submit', function(e) { + e.preventDefault(); // <-- important + $(this).ajaxSubmit({ + target: '#output' + }); + }); + }); + + Use ajaxForm when you want the plugin to manage all the event binding + for you. For example, + + $(document).ready(function() { + $('#myForm').ajaxForm({ + target: '#output' + }); + }); + + You can also use ajaxForm with delegation (requires jQuery v1.7+), so the + form does not have to exist when you invoke ajaxForm: + + $('#myForm').ajaxForm({ + delegation: true, + target: '#output' + }); + + When using ajaxForm, the ajaxSubmit function will be invoked for you + at the appropriate time. + */ + + /** + * Feature detection + */ + var feature = {}; + feature.fileapi = $("").get(0).files !== undefined; + feature.formdata = window.FormData !== undefined; + + /** + * ajaxSubmit() provides a mechanism for immediately submitting + * an HTML form using AJAX. + */ + $.fn.ajaxSubmit = function(options) { /*jshint scripturl:true */ // fast fail if nothing selected (http://dev.jquery.com/ticket/2752) if (!this.length) { - log('ajaxSubmit: skipping submit process - no element selected'); - return this; + log('ajaxSubmit: skipping submit process - no element selected'); + return this; } var method, action, url, $form = this; if (typeof options == 'function') { - options = { success: options }; - } - else if ( options === undefined ) { - options = {}; + options = { success: options }; } - method = options.type || this.attr2('method'); - action = options.url || this.attr2('action'); - + method = this.attr('method'); + action = this.attr('action'); url = (typeof action === 'string') ? $.trim(action) : ''; url = url || window.location.href || ''; if (url) { - // clean url (don't include hash vaue) - url = (url.match(/^([^#]+)/)||[])[1]; + // clean url (don't include hash vaue) + url = (url.match(/^([^#]+)/)||[])[1]; } options = $.extend(true, { - url: url, - success: $.ajaxSettings.success, - type: method || $.ajaxSettings.type, - iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank' + url: url, + success: $.ajaxSettings.success, + type: method || 'GET', + iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank' }, options); // hook for manipulating the form data before it is extracted; @@ -115,101 +97,85 @@ $.fn.ajaxSubmit = function(options) { var veto = {}; this.trigger('form-pre-serialize', [this, options, veto]); if (veto.veto) { - log('ajaxSubmit: submit vetoed via form-pre-serialize trigger'); - return this; + log('ajaxSubmit: submit vetoed via form-pre-serialize trigger'); + return this; } // provide opportunity to alter form data before it is serialized if (options.beforeSerialize && options.beforeSerialize(this, options) === false) { - log('ajaxSubmit: submit aborted via beforeSerialize callback'); - return this; + log('ajaxSubmit: submit aborted via beforeSerialize callback'); + return this; } var traditional = options.traditional; if ( traditional === undefined ) { - traditional = $.ajaxSettings.traditional; + traditional = $.ajaxSettings.traditional; } var elements = []; var qx, a = this.formToArray(options.semantic, elements); if (options.data) { - options.extraData = options.data; - qx = $.param(options.data, traditional); + options.extraData = options.data; + qx = $.param(options.data, traditional); } // give pre-submit callback an opportunity to abort the submit if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) { - log('ajaxSubmit: submit aborted via beforeSubmit callback'); - return this; + log('ajaxSubmit: submit aborted via beforeSubmit callback'); + return this; } // fire vetoable 'validate' event this.trigger('form-submit-validate', [a, this, options, veto]); if (veto.veto) { - log('ajaxSubmit: submit vetoed via form-submit-validate trigger'); - return this; + log('ajaxSubmit: submit vetoed via form-submit-validate trigger'); + return this; } var q = $.param(a, traditional); if (qx) { - q = ( q ? (q + '&' + qx) : qx ); + q = ( q ? (q + '&' + qx) : qx ); } if (options.type.toUpperCase() == 'GET') { - options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q; - options.data = null; // data is null for 'get' + options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q; + options.data = null; // data is null for 'get' } else { - options.data = q; // data is the query string for 'post' + options.data = q; // data is the query string for 'post' } var callbacks = []; if (options.resetForm) { - callbacks.push(function() { $form.resetForm(); }); + callbacks.push(function() { $form.resetForm(); }); } if (options.clearForm) { - callbacks.push(function() { $form.clearForm(options.includeHidden); }); + callbacks.push(function() { $form.clearForm(options.includeHidden); }); } // perform a load on the target only if dataType is not provided if (!options.dataType && options.target) { - var oldSuccess = options.success || function(){}; - callbacks.push(function(data) { - var fn = options.replaceTarget ? 'replaceWith' : 'html'; - $(options.target)[fn](data).each(oldSuccess, arguments); - }); + var oldSuccess = options.success || function(){}; + callbacks.push(function(data) { + var fn = options.replaceTarget ? 'replaceWith' : 'html'; + $(options.target)[fn](data).each(oldSuccess, arguments); + }); } else if (options.success) { - callbacks.push(options.success); + callbacks.push(options.success); } options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg - var context = options.context || this ; // jQuery 1.4+ supports scope context - for (var i=0, max=callbacks.length; i < max; i++) { - callbacks[i].apply(context, [data, status, xhr || $form, $form]); - } + var context = options.context || this ; // jQuery 1.4+ supports scope context + for (var i=0, max=callbacks.length; i < max; i++) { + callbacks[i].apply(context, [data, status, xhr || $form, $form]); + } }; - if (options.error) { - var oldError = options.error; - options.error = function(xhr, status, error) { - var context = options.context || this; - oldError.apply(context, [xhr, status, error, $form]); - }; - } - - if (options.complete) { - var oldComplete = options.complete; - options.complete = function(xhr, status) { - var context = options.context || this; - oldComplete.apply(context, [xhr, status, $form]); - }; - } - // are there files to upload? // [value] (issue #113), also see comment: // https://github.com/malsup/form/commit/588306aedba1de01388032d5f42a60159eea9228#commitcomment-2180219 - var fileInputs = $('input[type=file]:enabled:not([value=""])', this); + var fileInputs = $('input[type=file]:enabled[value!=""]', this); var hasFileInputs = fileInputs.length > 0; var mp = 'multipart/form-data'; @@ -224,29 +190,29 @@ $.fn.ajaxSubmit = function(options) { // options.iframe allows user to force iframe mode // 06-NOV-09: now defaulting to iframe mode if file input is detected if (options.iframe !== false && (options.iframe || shouldUseFrame)) { - // hack to fix Safari hang (thanks to Tim Molendijk for this) - // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d - if (options.closeKeepAlive) { - $.get(options.closeKeepAlive, function() { - jqxhr = fileUploadIframe(a); - }); - } - else { - jqxhr = fileUploadIframe(a); - } + // hack to fix Safari hang (thanks to Tim Molendijk for this) + // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d + if (options.closeKeepAlive) { + $.get(options.closeKeepAlive, function() { + jqxhr = fileUploadIframe(a); + }); + } + else { + jqxhr = fileUploadIframe(a); + } } else if ((hasFileInputs || multipart) && fileAPI) { - jqxhr = fileUploadXhr(a); + jqxhr = fileUploadXhr(a); } else { - jqxhr = $.ajax(options); + jqxhr = $.ajax(options); } $form.removeData('jqxhr').data('jqxhr', jqxhr); // clear element array for (var k=0; k < elements.length; k++) - elements[k] = null; + elements[k] = null; // fire 'notify' event this.trigger('form-submit-notify', [this, options]); @@ -254,945 +220,908 @@ $.fn.ajaxSubmit = function(options) { // utility fn for deep serialization function deepSerialize(extraData){ - var serialized = $.param(extraData, options.traditional).split('&'); - var len = serialized.length; - var result = []; - var i, part; - for (i=0; i < len; i++) { - // #252; undo param space replacement - serialized[i] = serialized[i].replace(/\+/g,' '); - part = serialized[i].split('='); - // #278; use array instead of object storage, favoring array serializations - result.push([decodeURIComponent(part[0]), decodeURIComponent(part[1])]); - } - return result; + var serialized = $.param(extraData).split('&'); + var len = serialized.length; + var result = []; + var i, part; + for (i=0; i < len; i++) { + // #252; undo param space replacement + serialized[i] = serialized[i].replace(/\+/g,' '); + part = serialized[i].split('='); + // #278; use array instead of object storage, favoring array serializations + result.push([decodeURIComponent(part[0]), decodeURIComponent(part[1])]); + } + return result; } - // XMLHttpRequest Level 2 file uploads (big hat tip to francois2metz) + // XMLHttpRequest Level 2 file uploads (big hat tip to francois2metz) function fileUploadXhr(a) { - var formdata = new FormData(); - - for (var i=0; i < a.length; i++) { - formdata.append(a[i].name, a[i].value); - } - - if (options.extraData) { - var serializedData = deepSerialize(options.extraData); - for (i=0; i < serializedData.length; i++) - if (serializedData[i]) - formdata.append(serializedData[i][0], serializedData[i][1]); - } - - options.data = null; - - var s = $.extend(true, {}, $.ajaxSettings, options, { - contentType: false, - processData: false, - cache: false, - type: method || 'POST' - }); - - if (options.uploadProgress) { - // workaround because jqXHR does not expose upload property - s.xhr = function() { - var xhr = $.ajaxSettings.xhr(); - if (xhr.upload) { - xhr.upload.addEventListener('progress', function(event) { - var percent = 0; - var position = event.loaded || event.position; /*event.position is deprecated*/ - var total = event.total; - if (event.lengthComputable) { - percent = Math.ceil(position / total * 100); - } - options.uploadProgress(event, position, total, percent); - }, false); - } - return xhr; - }; - } - - s.data = null; - var beforeSend = s.beforeSend; - s.beforeSend = function(xhr, o) { - o.data = formdata; - if(beforeSend) - beforeSend.call(this, xhr, o); + var formdata = new FormData(); + + for (var i=0; i < a.length; i++) { + formdata.append(a[i].name, a[i].value); + } + + if (options.extraData) { + var serializedData = deepSerialize(options.extraData); + for (i=0; i < serializedData.length; i++) + if (serializedData[i]) + formdata.append(serializedData[i][0], serializedData[i][1]); + } + + options.data = null; + + var s = $.extend(true, {}, $.ajaxSettings, options, { + contentType: false, + processData: false, + cache: false, + type: method || 'POST' + }); + + if (options.uploadProgress) { + // workaround because jqXHR does not expose upload property + s.xhr = function() { + var xhr = jQuery.ajaxSettings.xhr(); + if (xhr.upload) { + xhr.upload.addEventListener('progress', function(event) { + var percent = 0; + var position = event.loaded || event.position; /*event.position is deprecated*/ + var total = event.total; + if (event.lengthComputable) { + percent = Math.ceil(position / total * 100); + } + options.uploadProgress(event, position, total, percent); + }, false); + } + return xhr; }; - return $.ajax(s); + } + + s.data = null; + var beforeSend = s.beforeSend; + s.beforeSend = function(xhr, o) { + o.data = formdata; + if(beforeSend) + beforeSend.call(this, xhr, o); + }; + return $.ajax(s); } // private function for handling file uploads (hat tip to YAHOO!) function fileUploadIframe(a) { - var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle; - var deferred = $.Deferred(); - - // #341 - deferred.abort = function(status) { - xhr.abort(status); - }; - - if (a) { - // ensure that every serialized input is still enabled - for (i=0; i < elements.length; i++) { - el = $(elements[i]); - if ( hasProp ) - el.prop('disabled', false); - else - el.removeAttr('disabled'); + var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle; + var useProp = !!$.fn.prop; + var deferred = $.Deferred(); + + if (a) { + // ensure that every serialized input is still enabled + for (i=0; i < elements.length; i++) { + el = $(elements[i]); + if ( useProp ) + el.prop('disabled', false); + else + el.removeAttr('disabled'); + } + } + + s = $.extend(true, {}, $.ajaxSettings, options); + s.context = s.context || s; + id = 'jqFormIO' + (new Date().getTime()); + if (s.iframeTarget) { + $io = $(s.iframeTarget); + n = $io.attr('name'); + if (!n) + $io.attr('name', id); + else + id = n; + } + else { + $io = $('