From 53bb566b550f71720439d00bdbc55c8279721771 Mon Sep 17 00:00:00 2001 From: Nicolas Brassard Date: Thu, 11 Feb 2016 13:39:47 -0500 Subject: [PATCH 01/81] Added link to MIT licence --- README.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/README.markdown b/README.markdown index e982b93a70..4d0321748e 100644 --- a/README.markdown +++ b/README.markdown @@ -8,6 +8,7 @@ - Date: 08th February 2016 - [Release notes](http://getsymphony.com/download/releases/version/2.6.7/) - [Github repository](https://github.com/symphonycms/symphony-2/tree/2.6.7) +- [MIT Licence](https://github.com/symphonycms/symphony-2/blob/master/LICENCE) ## Contents From 943a4541b25782502ee679914f2d7e79a7e164cc Mon Sep 17 00:00:00 2001 From: Nicolas Brassard Date: Thu, 11 Feb 2016 15:44:12 -0500 Subject: [PATCH 02/81] remove require_once call --- symphony/content/content.ajaxquery.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/symphony/content/content.ajaxquery.php b/symphony/content/content.ajaxquery.php index 56606dc0fd..0fc47f36f0 100644 --- a/symphony/content/content.ajaxquery.php +++ b/symphony/content/content.ajaxquery.php @@ -1,7 +1,5 @@ Date: Thu, 11 Feb 2016 15:46:31 -0500 Subject: [PATCH 03/81] added missing doc --- symphony/content/content.ajaxquery.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/symphony/content/content.ajaxquery.php b/symphony/content/content.ajaxquery.php index 0fc47f36f0..e3eb997809 100644 --- a/symphony/content/content.ajaxquery.php +++ b/symphony/content/content.ajaxquery.php @@ -1,4 +1,11 @@ Date: Thu, 11 Feb 2016 15:58:12 -0500 Subject: [PATCH 04/81] removed include_once calls They are not needed anymore since we use a auto loader --- symphony/content/content.blueprintsdatasources.php | 2 -- symphony/lib/core/class.administration.php | 1 - symphony/lib/core/class.symphony.php | 4 ---- symphony/lib/toolkit/class.email.php | 2 -- symphony/lib/toolkit/class.extensionmanager.php | 5 +---- symphony/lib/toolkit/class.sectionmanager.php | 2 -- .../lib/toolkit/data-sources/class.datasource.static.php | 2 -- symphony/lib/toolkit/fields/field.input.php | 2 -- symphony/lib/toolkit/fields/field.textarea.php | 2 -- symphony/template/usererror.database.php | 2 -- symphony/template/usererror.generic.php | 2 -- symphony/template/usererror.missing_extension.php | 2 -- symphony/template/usererror.xslt.php | 2 -- vendor/composer/autoload_classmap.php | 4 ++++ 14 files changed, 5 insertions(+), 29 deletions(-) diff --git a/symphony/content/content.blueprintsdatasources.php b/symphony/content/content.blueprintsdatasources.php index d45b11794c..9912452573 100644 --- a/symphony/content/content.blueprintsdatasources.php +++ b/symphony/content/content.blueprintsdatasources.php @@ -1138,8 +1138,6 @@ public function __formAction() } else { $xml_errors = null; - include_once TOOLKIT . '/class.xsltprocess.php'; - General::validateXML($fields['static_xml'], $xml_errors, false, new XsltProcess()); if (!empty($xml_errors)) { diff --git a/symphony/lib/core/class.administration.php b/symphony/lib/core/class.administration.php index 22cdbf78b8..aad33f1e1f 100644 --- a/symphony/lib/core/class.administration.php +++ b/symphony/lib/core/class.administration.php @@ -188,7 +188,6 @@ private function __buildPage($page) if (is_callable(array($this->Page, 'handleFailedAuthorisation'))) { $this->Page->handleFailedAuthorisation(); } else { - include_once(CONTENT . '/content.login.php'); $this->Page = new contentLogin; // Include the query string for the login, RE: #2324 diff --git a/symphony/lib/core/class.symphony.php b/symphony/lib/core/class.symphony.php index ea87dc3999..5e705984a5 100644 --- a/symphony/lib/core/class.symphony.php +++ b/symphony/lib/core/class.symphony.php @@ -586,10 +586,6 @@ public static function getMigrationVersion() if (self::isInstallerAvailable()) { $migrations = scandir(DOCROOT . '/install/migrations'); $migration_file = end($migrations); - - include_once DOCROOT . '/install/lib/class.migration.php'; - include_once DOCROOT . '/install/migrations/' . $migration_file; - $migration_class = 'migration_' . str_replace('.', '', substr($migration_file, 0, -4)); return call_user_func(array($migration_class, 'getVersion')); } diff --git a/symphony/lib/toolkit/class.email.php b/symphony/lib/toolkit/class.email.php index 7e3ff7a4d6..b3aa778089 100644 --- a/symphony/lib/toolkit/class.email.php +++ b/symphony/lib/toolkit/class.email.php @@ -11,8 +11,6 @@ class EmailException extends Exception { } -include_once TOOLKIT . '/class.emailgatewaymanager.php'; - /** * The Email class is a factory class to make it possible to send emails using different gateways. */ diff --git a/symphony/lib/toolkit/class.extensionmanager.php b/symphony/lib/toolkit/class.extensionmanager.php index e5279b79a4..f29d63a547 100644 --- a/symphony/lib/toolkit/class.extensionmanager.php +++ b/symphony/lib/toolkit/class.extensionmanager.php @@ -6,13 +6,10 @@ /** * The ExtensionManager class is responsible for managing all extensions * in Symphony. Extensions are stored on the file system in the `EXTENSIONS` - * folder. They are autodiscovered where the Extension class name is the same + * folder. They are auto-discovered where the Extension class name is the same * as it's folder name (excluding the extension prefix). */ -include_once FACE . '/interface.fileresource.php'; -include_once TOOLKIT . '/class.extension.php'; - class ExtensionManager implements FileResource { /** diff --git a/symphony/lib/toolkit/class.sectionmanager.php b/symphony/lib/toolkit/class.sectionmanager.php index 520138108a..7f8fe3369e 100644 --- a/symphony/lib/toolkit/class.sectionmanager.php +++ b/symphony/lib/toolkit/class.sectionmanager.php @@ -8,7 +8,6 @@ * installation by exposing basic CRUD operations. Sections are stored in the * database in `tbl_sections`. */ -include_once TOOLKIT . '/class.section.php'; class SectionManager { @@ -84,7 +83,6 @@ public static function delete($section_id) )); // Delete all the entries - include_once TOOLKIT . '/class.entrymanager.php'; $entries = Symphony::Database()->fetchCol('id', "SELECT `id` FROM `tbl_entries` WHERE `section_id` = '$section_id'"); EntryManager::delete($entries); diff --git a/symphony/lib/toolkit/data-sources/class.datasource.static.php b/symphony/lib/toolkit/data-sources/class.datasource.static.php index 2446757ca4..900b189dd7 100644 --- a/symphony/lib/toolkit/data-sources/class.datasource.static.php +++ b/symphony/lib/toolkit/data-sources/class.datasource.static.php @@ -14,8 +14,6 @@ class StaticXMLDatasource extends Datasource { public function execute(array &$param_pool = null) { - include_once TOOLKIT . '/class.xsltprocess.php'; - $result = new XMLElement($this->dsParamROOTELEMENT); $this->dsParamSTATIC = stripslashes($this->dsParamSTATIC); diff --git a/symphony/lib/toolkit/fields/field.input.php b/symphony/lib/toolkit/fields/field.input.php index c58b33dd6b..c420c2fbe5 100644 --- a/symphony/lib/toolkit/fields/field.input.php +++ b/symphony/lib/toolkit/fields/field.input.php @@ -197,8 +197,6 @@ public function appendFormattedElement(XMLElement &$wrapper, $data, $encode = fa if ($encode === true) { $value = General::sanitize($value); } else { - include_once TOOLKIT . '/class.xsltprocess.php'; - if (!General::validateXML($data['value'], $errors, false, new XsltProcess)) { $value = html_entity_decode($data['value'], ENT_QUOTES, 'UTF-8'); $value = $this->__replaceAmpersands($value); diff --git a/symphony/lib/toolkit/fields/field.textarea.php b/symphony/lib/toolkit/fields/field.textarea.php index dfba09a82e..554bf999dd 100644 --- a/symphony/lib/toolkit/fields/field.textarea.php +++ b/symphony/lib/toolkit/fields/field.textarea.php @@ -62,8 +62,6 @@ protected function __applyFormatting($data, $validate = false, &$errors = null) } if ($validate === true) { - include_once(TOOLKIT . '/class.xsltprocess.php'); - if (!General::validateXML($result, $errors, false, new XsltProcess)) { $result = html_entity_decode($result, ENT_QUOTES, 'UTF-8'); $result = $this->__replaceAmpersands($result); diff --git a/symphony/template/usererror.database.php b/symphony/template/usererror.database.php index 7491530aba..febcbd13e2 100644 --- a/symphony/template/usererror.database.php +++ b/symphony/template/usererror.database.php @@ -1,7 +1,5 @@ Html->setElementStyle('html'); diff --git a/symphony/template/usererror.generic.php b/symphony/template/usererror.generic.php index 2b63311a23..b560853bb3 100644 --- a/symphony/template/usererror.generic.php +++ b/symphony/template/usererror.generic.php @@ -1,7 +1,5 @@ Html->setElementStyle('html'); diff --git a/symphony/template/usererror.missing_extension.php b/symphony/template/usererror.missing_extension.php index 4753079939..9e9837eddd 100644 --- a/symphony/template/usererror.missing_extension.php +++ b/symphony/template/usererror.missing_extension.php @@ -1,7 +1,5 @@ Html->setElementStyle('html'); diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index e69fabb388..ad13a9e767 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -154,4 +154,8 @@ 'migration_261' => $baseDir . '/install/migrations/2.6.1.php', 'migration_262' => $baseDir . '/install/migrations/2.6.2.php', 'migration_263' => $baseDir . '/install/migrations/2.6.3.php', + 'migration_264' => $baseDir . '/install/migrations/2.6.4.php', + 'migration_265' => $baseDir . '/install/migrations/2.6.5.php', + 'migration_266' => $baseDir . '/install/migrations/2.6.6.php', + 'migration_267' => $baseDir . '/install/migrations/2.6.7.php', ); From 143ae74f451df07146166f4c8969a0c537c7d723 Mon Sep 17 00:00:00 2001 From: Nicolas Brassard Date: Thu, 18 Feb 2016 16:45:43 -0500 Subject: [PATCH 05/81] Updated grunt deps --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index b7e6b2ce9c..57ba5cc304 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,10 @@ "license": "MIT", "devDependencies": { "grunt": "~0.4.5", - "grunt-autoprefixer": "~3.0.3", - "grunt-csso": "~0.8.0", - "grunt-contrib-jshint": "~0.11.3", - "grunt-contrib-uglify": "~0.11.0", + "grunt-autoprefixer": "~3.0.4", + "grunt-csso": "~0.8.1", + "grunt-contrib-jshint": "~1.0.0", + "grunt-contrib-uglify": "~0.11.1", "grunt-contrib-concat": "~0.5.1", "grunt-contrib-watch": "~0.6.1" } From 22069f4dabc428b1c4f5e937bf94a8f3884b5900 Mon Sep 17 00:00:00 2001 From: Nicolas Brassard Date: Thu, 18 Feb 2016 16:58:17 -0500 Subject: [PATCH 06/81] Added a grunt task to run phpcs This commit adds a grunt task (named `php`) that will run phpcs with the PSR-2 standard. Note that you have to install php_codesniffer which has been added as a require-dev lib. Doing `composer install` will mess up Symphony's auto loader, so please `git checkout vendor` after the composer call --- composer.json | 3 +++ gruntfile.js | 19 +++++++++++++++++++ package.json | 7 ++++--- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 142c130247..ee80c601ad 100644 --- a/composer.json +++ b/composer.json @@ -15,6 +15,9 @@ "issues": "https://github.com/symphonycms/symphony-2/issues", "wiki": "https://github.com/symphonycms/symphony-2/wiki" }, + "require-dev": { + "squizlabs/php_codesniffer": "2.*" + }, "minimum-stability": "stable", "autoload": { "classmap": ["symphony/content", "symphony/lib", "symphony/template", "install"], diff --git a/gruntfile.js b/gruntfile.js index 8dc046f0a9..5378817e0e 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -127,6 +127,23 @@ module.exports = function (grunt) { scripts: { files: 'symphony/assets/js/src/*.js', tasks: ['js'] + }, + php: { + files: ['symphony/**/*.php', 'install/**/*.php'], + tasks: ['php'] + } + }, + + phpcs: { + application: { + src: ['symphony/**/*.php', 'install/**/*.php', 'index.php'] + }, + options: { + bin: 'vendor/bin/phpcs', + standard: 'PSR1', + showSniffCodes: true, + tabWidth: 4, + errorSeverity: 10 } } @@ -138,8 +155,10 @@ module.exports = function (grunt) { //grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-phpcs'); grunt.registerTask('default', ['concat', 'autoprefixer', 'csso', 'uglify']); grunt.registerTask('css', ['concat', 'autoprefixer', 'csso']); + grunt.registerTask('php', ['phpcs']); grunt.registerTask('js', ['uglify']); }; \ No newline at end of file diff --git a/package.json b/package.json index 57ba5cc304..63031dfc93 100644 --- a/package.json +++ b/package.json @@ -9,10 +9,11 @@ "devDependencies": { "grunt": "~0.4.5", "grunt-autoprefixer": "~3.0.4", - "grunt-csso": "~0.8.1", + "grunt-contrib-concat": "~0.5.1", "grunt-contrib-jshint": "~1.0.0", "grunt-contrib-uglify": "~0.11.1", - "grunt-contrib-concat": "~0.5.1", - "grunt-contrib-watch": "~0.6.1" + "grunt-contrib-watch": "~0.6.1", + "grunt-csso": "~0.8.1", + "grunt-phpcs": "^0.4.0" } } From d68b132606c3aab638e87dd55cfcc68a62741b5a Mon Sep 17 00:00:00 2001 From: Nicolas Brassard Date: Thu, 18 Feb 2016 17:21:44 -0500 Subject: [PATCH 07/81] Added github specific files for contribution --- CONTRIBUTING.md | 15 +++++++++++++++ ISSUE_TEMPLATE.md | 3 +++ PULL_REQUEST_TEMPLATE.md | 5 +++++ 3 files changed, 23 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 ISSUE_TEMPLATE.md create mode 100644 PULL_REQUEST_TEMPLATE.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..73930e322c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,15 @@ +# Contributing to Symphony + +This is a TL;DR version of the [complete contribution guide](https://github.com/symphonycms/symphony-2/wiki/Contributing-to-Symphony). + +The two most important things are [comments](https://github.com/symphonycms/symphony-2/wiki/Contributing-to-Symphony#commenting) and [https://github.com/symphonycms/symphony-2/wiki/Contributing-to-Symphony#code-style](code style). + +Please insure that any new method is properly documented and that the code style is respected. + +Thanks! + +- The Symphony Team + +### Legal + +This submitting your code to the community, you agree to release all copyrights on the code you submit. diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md new file mode 100644 index 0000000000..387900afc9 --- /dev/null +++ b/ISSUE_TEMPLATE.md @@ -0,0 +1,3 @@ +Affected Symphony version(s) : +PHP version(s) : +OS(es) : \ No newline at end of file diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..f68d363860 --- /dev/null +++ b/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,5 @@ +Fix for # + +or + +Describe new feature here \ No newline at end of file From 0e27ff517b03e17df68b5fe0c9db3a7158adf87e Mon Sep 17 00:00:00 2001 From: nitriques Date: Mon, 19 Oct 2015 21:38:10 -0400 Subject: [PATCH 08/81] Added Default Value plugin This commit introduce a new jQuery plugin called Default Value, which gives a input a source element to value its value from, when a specified event occurs on this source element. This behaviour is switched to off when the users focuses on the input field and then blurs out, leaving a value in the input. This commit also hooks this behaviours on the Data Source name input and on the Event name input. Closes #2511 --- gruntfile.js | 1 + symphony/assets/js/src/backend.views.js | 8 ++ .../assets/js/src/symphony.defaultvalue.js | 95 +++++++++++++++++++ 3 files changed, 104 insertions(+) create mode 100644 symphony/assets/js/src/symphony.defaultvalue.js diff --git a/gruntfile.js b/gruntfile.js index 5378817e0e..6bd076537d 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -101,6 +101,7 @@ module.exports = function (grunt) { 'symphony/assets/js/src/symphony.js', 'symphony/assets/js/src/symphony.affix.js', 'symphony/assets/js/src/symphony.collapsible.js', + 'symphony/assets/js/src/symphony.defaultvalue.js', 'symphony/assets/js/src/symphony.orderable.js', 'symphony/assets/js/src/symphony.selectable.js', 'symphony/assets/js/src/symphony.duplicator.js', diff --git a/symphony/assets/js/src/backend.views.js b/symphony/assets/js/src/backend.views.js index 989cc63843..4aa770d551 100644 --- a/symphony/assets/js/src/backend.views.js +++ b/symphony/assets/js/src/backend.views.js @@ -606,6 +606,10 @@ Symphony.View.add('/blueprints/datasources/:action:/:id:/:status:/:*:', function }); } }, 500, nameChangeCount, current, value); + }) + // Enable the default value for Data Source name + .symphonyDefaultValue({ + sourceElement: context }); // Update output parameters @@ -735,6 +739,10 @@ Symphony.View.add('/blueprints/events/:action:/:name:/:status:/:*:', function() Symphony.Elements.contents.trigger('update.admin'); } }, 500, nameChangeCount, current); + }) + // Enable the default value for Event name + .symphonyDefaultValue({ + sourceElement: context }); // Change context diff --git a/symphony/assets/js/src/symphony.defaultvalue.js b/symphony/assets/js/src/symphony.defaultvalue.js new file mode 100644 index 0000000000..7b73e242b2 --- /dev/null +++ b/symphony/assets/js/src/symphony.defaultvalue.js @@ -0,0 +1,95 @@ +/** + * @package assets + */ + +(function($, Symphony) { + + /** + * Fills the target input/textarea with a value from the source element. + * The plugin cease to change the value when the target is edited by the user and has a value. + * + * @name $.symphonyDefaultValue + * @class + * + * @param {Object} options An object specifying containing the attributes specified below + * @param {String} [options.sourceElement='.js-defaultvalue-source'] Selector to find the default value + * @param {String} [options.sourceEvent='select'] The event that triggers setting the value in the target element + * @param {String} [options.targetEvent='keyup blur'] The event(s) to watch for user interaction + * + * @example + + $('.js-defaultvalue-target').symphonyDefaultValue(); + */ + $.fn.symphonyDefaultValue = function(options) { + var objects = this, + isOn = false, + settings = { + sourceElement: '.js-defaultvalue-source', + sourceEvent: 'change', + targetEvent: 'keyup blur' + }; + + $.extend(settings, options); + + // append our namespace on the sourceEvent + settings.sourceEvent += '.symphony-defaultvalue'; + + var source = $(settings.sourceElement); + + var getTargetValue = function () { + return objects.val(); + }; + + var setTargetValue = function (val) { + objects.val(val); + }; + + var getSourceValue = function () { + return source.find('option:selected').text(); + }; + + var sourceChanged = function (e) { + if (isOn) { + setTargetValue(getSourceValue()); + } + }; + + var on = function () { + if (isOn) { + return; + } + source.on(settings.sourceEvent, sourceChanged); + isOn = true; + }; + + var off = function () { + if (!isOn) { + return; + } + $(settings.sourceElement).off(settings.sourceEvent); + isOn = false; + }; + + /*------------------------------------------------------------------------- + Initialisation + -------------------------------------------------------------------------*/ + + objects.on(settings.targetEvent, function (e) { + if (!getTargetValue()) { + on(); + } + else { + off(); + } + }); + + if (!getTargetValue()) { + on(); + } + + /*-----------------------------------------------------------------------*/ + + return objects; + }; + +})(window.jQuery, window.Symphony); From 15f8cef00cd5988122cbc7f8216a701245a33ac3 Mon Sep 17 00:00:00 2001 From: nitriques Date: Mon, 19 Oct 2015 21:44:12 -0400 Subject: [PATCH 09/81] new assets build --- symphony/assets/js/symphony.min.js | 3403 +++++++++++++++++++++++++++- 1 file changed, 3387 insertions(+), 16 deletions(-) diff --git a/symphony/assets/js/symphony.min.js b/symphony/assets/js/symphony.min.js index 75cc05f6e3..fb575d40e7 100644 --- a/symphony/assets/js/symphony.min.js +++ b/symphony/assets/js/symphony.min.js @@ -11,7 +11,353 @@ * * Date: 2015-04-28T16:01Z */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b="length"in a&&a.length,c=_.type(a);return"function"===c||_.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a,b,c){if(_.isFunction(b))return _.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return _.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(ha.test(b))return _.filter(b,a,c);b=_.filter(b,a)}return _.grep(a,function(a){return U.call(b,a)>=0!==c})}function e(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function f(a){var b=oa[a]={};return _.each(a.match(na)||[],function(a,c){b[c]=!0}),b}function g(){Z.removeEventListener("DOMContentLoaded",g,!1),a.removeEventListener("load",g,!1),_.ready()}function h(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=_.expando+h.uid++}function i(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(ua,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:ta.test(c)?_.parseJSON(c):c}catch(e){}sa.set(a,b,c)}else c=void 0;return c}function j(){return!0}function k(){return!1}function l(){try{return Z.activeElement}catch(a){}}function m(a,b){return _.nodeName(a,"table")&&_.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function n(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function o(a){var b=Ka.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function p(a,b){for(var c=0,d=a.length;d>c;c++)ra.set(a[c],"globalEval",!b||ra.get(b[c],"globalEval"))}function q(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(ra.hasData(a)&&(f=ra.access(a),g=ra.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)_.event.add(b,e,j[e][c])}sa.hasData(a)&&(h=sa.access(a),i=_.extend({},h),sa.set(b,i))}}function r(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&_.nodeName(a,b)?_.merge([a],c):c}function s(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ya.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}function t(b,c){var d,e=_(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:_.css(e[0],"display");return e.detach(),f}function u(a){var b=Z,c=Oa[a];return c||(c=t(a,b),"none"!==c&&c||(Na=(Na||_("